New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 7506 for branches/2016/v3_6_CMIP6_ice_diagnostics/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90 – NEMO

Ignore:
Timestamp:
2016-12-15T20:41:18+01:00 (8 years ago)
Author:
vancop
Message:

Commit a first set of modifications

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/v3_6_CMIP6_ice_diagnostics/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90

    r6964 r7506  
    124124      REAL(wp) ::   zm1, zm2, zm3, zmassU, zmassV                            ! ice/snow mass 
    125125      REAL(wp) ::   zdelta, zp_delf, zds2, zdt, zdt2, zdiv, zdiv2            ! temporary scalars 
    126       REAL(wp) ::   zTauO, zTauE, zCor                                       ! temporary scalars 
     126      REAL(wp) ::   zTauO, zTauE                                             ! temporary scalars 
    127127 
    128128      REAL(wp) ::   zsig1, zsig2                                             ! internal ice stress 
     
    148148                                                                             !   ocean surface (ssh_m) if ice is not embedded 
    149149                                                                             !   ice top surface if ice is embedded    
     150      REAL(wp), POINTER, DIMENSION(:,:) ::   zCor                            ! Coriolis stress array (SIMIP) 
    150151      REAL(wp), POINTER, DIMENSION(:,:) ::   zswitchU, zswitchV              ! dummy arrays 
    151152      REAL(wp), POINTER, DIMENSION(:,:) ::   zmaskU, zmaskV                  ! mask for ice presence 
     
    162163      CALL wrk_alloc( jpi,jpj, zds, zs1, zs2, zs12, zu_ice, zv_ice, zresr, zpice ) 
    163164      CALL wrk_alloc( jpi,jpj, zswitchU, zswitchV, zmaskU, zmaskV, zfmask, zwf ) 
     165      CALL wrk_alloc( jpi,jpj, zCor) 
    164166 
    165167#if  defined key_lim2 && ! defined key_lim2_vp 
     
    325327         END DO 
    326328      END DO 
     329 
    327330      CALL lbc_lnk( zmf, 'T', 1. ) 
    328331      ! 
     
    445448 
    446449                  ! Coriolis at V-points (energy conserving formulation) 
    447                   zCor  = - 0.25_wp * r1_e2v(ji,jj) *  & 
     450                  zCor(ji,jj)  = - 0.25_wp * r1_e2v(ji,jj) *  & 
    448451                     &    ( zmf(ji,jj  ) * ( e2u(ji,jj  ) * u_ice(ji,jj  ) + e2u(ji-1,jj  ) * u_ice(ji-1,jj  ) )  & 
    449452                     &    + zmf(ji,jj+1) * ( e2u(ji,jj+1) * u_ice(ji,jj+1) + e2u(ji-1,jj+1) * u_ice(ji-1,jj+1) ) ) 
    450453 
    451454                  ! Sum of external forces (explicit solution) = F + tau_ia + Coriolis + spg + tau_io 
    452                   zTauE = zfV(ji,jj) + zTauV_ia(ji,jj) + zCor + zspgV(ji,jj) + zTauO * ( v_oce(ji,jj) - v_ice(ji,jj) ) 
     455                  zTauE = zfV(ji,jj) + zTauV_ia(ji,jj) + zCor(ji,jj) + zspgV(ji,jj) + zTauO * ( v_oce(ji,jj) - v_ice(ji,jj) ) 
    453456                   
    454457                  ! ice velocity using implicit formulation (cf Madec doc & Bouillon 2009) 
     
    460463            END DO 
    461464            CALL lbc_lnk( v_ice, 'V', -1. ) 
     465 
     466            ! SIMIP diag 
     467            IF ( jter .EQ. nn_nevp ) THEN 
     468               diag_corstry(:,:) = zCor(:,:)  
     469            ENDIF 
    462470             
    463471#if defined key_agrif && defined key_lim2 
     
    476484 
    477485                  ! Coriolis at U-points (energy conserving formulation) 
    478                   zCor  =   0.25_wp * r1_e1u(ji,jj) *  & 
     486                  zCor(ji,jj)  =   0.25_wp * r1_e1u(ji,jj) *  & 
    479487                     &    ( zmf(ji  ,jj) * ( e1v(ji  ,jj) * v_ice(ji  ,jj) + e1v(ji  ,jj-1) * v_ice(ji  ,jj-1) )  & 
    480488                     &    + zmf(ji+1,jj) * ( e1v(ji+1,jj) * v_ice(ji+1,jj) + e1v(ji+1,jj-1) * v_ice(ji+1,jj-1) ) ) 
    481489                   
    482490                  ! Sum of external forces (explicit solution) = F + tau_ia + Coriolis + spg + tau_io 
    483                   zTauE = zfU(ji,jj) + zTauU_ia(ji,jj) + zCor + zspgU(ji,jj) + zTauO * ( u_oce(ji,jj) - u_ice(ji,jj) ) 
     491                  zTauE = zfU(ji,jj) + zTauU_ia(ji,jj) + zCor(ji,jj) + zspgU(ji,jj) + zTauO * ( u_oce(ji,jj) - u_ice(ji,jj) ) 
    484492 
    485493                  ! ice velocity using implicit formulation (cf Madec doc & Bouillon 2009) 
     
    491499            END DO 
    492500            CALL lbc_lnk( u_ice, 'U', -1. ) 
     501            IF ( jter .EQ. nn_nevp ) THEN 
     502               diag_corstrx(:,:) = zCor(:,:)  
     503            ENDIF 
    493504             
    494505#if defined key_agrif && defined key_lim2 
     
    509520 
    510521                  ! Coriolis at U-points (energy conserving formulation) 
    511                   zCor  =   0.25_wp * r1_e1u(ji,jj) *  & 
     522                  zCor(ji,jj)  =   0.25_wp * r1_e1u(ji,jj) *  & 
    512523                     &    ( zmf(ji  ,jj) * ( e1v(ji  ,jj) * v_ice(ji  ,jj) + e1v(ji  ,jj-1) * v_ice(ji  ,jj-1) )  & 
    513524                     &    + zmf(ji+1,jj) * ( e1v(ji+1,jj) * v_ice(ji+1,jj) + e1v(ji+1,jj-1) * v_ice(ji+1,jj-1) ) ) 
    514525                   
    515526                  ! Sum of external forces (explicit solution) = F + tau_ia + Coriolis + spg + tau_io 
    516                   zTauE = zfU(ji,jj) + zTauU_ia(ji,jj) + zCor + zspgU(ji,jj) + zTauO * ( u_oce(ji,jj) - u_ice(ji,jj) ) 
     527                  zTauE = zfU(ji,jj) + zTauU_ia(ji,jj) + zCor(ji,jj) + zspgU(ji,jj) + zTauO * ( u_oce(ji,jj) - u_ice(ji,jj) ) 
    517528 
    518529                  ! ice velocity using implicit formulation (cf Madec doc & Bouillon 2009) 
     
    540551 
    541552                  ! Coriolis at V-points (energy conserving formulation) 
    542                   zCor  = - 0.25_wp * r1_e2v(ji,jj) *  & 
     553                  zCor(ji,jj)  = - 0.25_wp * r1_e2v(ji,jj) *  & 
    543554                     &    ( zmf(ji,jj  ) * ( e2u(ji,jj  ) * u_ice(ji,jj  ) + e2u(ji-1,jj  ) * u_ice(ji-1,jj  ) )  & 
    544555                     &    + zmf(ji,jj+1) * ( e2u(ji,jj+1) * u_ice(ji,jj+1) + e2u(ji-1,jj+1) * u_ice(ji-1,jj+1) ) ) 
    545556 
    546557                  ! Sum of external forces (explicit solution) = F + tau_ia + Coriolis + spg + tau_io 
    547                   zTauE = zfV(ji,jj) + zTauV_ia(ji,jj) + zCor + zspgV(ji,jj) + zTauO * ( v_oce(ji,jj) - v_ice(ji,jj) ) 
     558                  zTauE = zfV(ji,jj) + zTauV_ia(ji,jj) + zCor(ji,jj) + zspgV(ji,jj) + zTauO * ( v_oce(ji,jj) - v_ice(ji,jj) ) 
    548559                   
    549560                  ! ice velocity using implicit formulation (cf Madec doc & Bouillon 2009) 
     
    564575 
    565576         ENDIF 
    566           
     577 
    567578         IF(ln_ctl) THEN   ! Convergence test 
    568579            DO jj = k_j1+1, k_jpj-1 
     
    627638      stress2_i (:,:) = zs2 (:,:) 
    628639      stress12_i(:,:) = zs12(:,:) 
     640 
     641      ! SIMIP diagnostic internal stress 
     642      diag_dssh_dx(:,:) = zspgU(:,:) 
     643      diag_dssh_dy(:,:) = zspgV(:,:) 
     644      CALL lbc_lnk( diag_dssh_dx, 'U', -1. ) 
     645      CALL lbc_lnk( diag_dssh_dy, 'V', -1. ) 
     646 
     647      diag_intstrx(:,:) = zfU(:,:) 
     648      diag_intstry(:,:) = zfV(:,:) 
     649      CALL lbc_lnk( diag_intstrx, 'U', -1. ) 
     650      CALL lbc_lnk( diag_intstry, 'V', -1. ) 
    629651 
    630652      ! 
     
    670692      CALL wrk_dealloc( jpi,jpj, zds, zs1, zs2, zs12, zu_ice, zv_ice, zresr, zpice ) 
    671693      CALL wrk_dealloc( jpi,jpj, zswitchU, zswitchV, zmaskU, zmaskV, zfmask, zwf ) 
     694      CALL wrk_dealloc( jpi,jpj, zCor ) 
    672695 
    673696   END SUBROUTINE lim_rhg 
Note: See TracChangeset for help on using the changeset viewer.