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 15451 for NEMO/releases/r4.0/r4.0-HEAD/src/ICE – NEMO

Ignore:
Timestamp:
2021-10-27T16:46:28+02:00 (3 years ago)
Author:
clem
Message:

4.0-HEAD only: change vertical scale factors for embedded sea ice as proposed in ticket #2487.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/releases/r4.0/r4.0-HEAD/src/ICE/iceistate.F90

    r15405 r15451  
    9696      REAL(wp) ::   ztmelts 
    9797      INTEGER , DIMENSION(4)           ::   itest 
    98       REAL(wp), DIMENSION(jpi,jpj)     ::   z2d 
    9998      REAL(wp), DIMENSION(jpi,jpj)     ::   zswitch    ! ice indicator 
    10099      REAL(wp), DIMENSION(jpi,jpj)     ::   zht_i_ini, zat_i_ini, ztm_s_ini            !data from namelist or nc file 
     
    413412         IF( .NOT.ln_linssh ) THEN 
    414413            ! 
    415             WHERE( ht_0(:,:) > 0 )   ;   z2d(:,:) = 1._wp + sshn(:,:)*tmask(:,:,1) / ht_0(:,:) 
    416             ELSEWHERE                ;   z2d(:,:) = 1._wp   ;   END WHERE 
    417             ! 
    418             DO jk = 1,jpkm1                     ! adjust initial vertical scale factors                 
    419                e3t_n(:,:,jk) = e3t_0(:,:,jk) * ( z2d(:,:) * tmask(:,:,jk) - ( tmask(:,:,jk) - 1.0_wp ) ) 
    420                e3t_b(:,:,jk) = e3t_n(:,:,jk) 
    421                e3t_a(:,:,jk) = e3t_n(:,:,jk) 
     414            DO jk = 1, jpkm1            ! adjust initial vertical scale factors                 
     415               DO jj = 1, jpj 
     416                  DO ji = 1, jpi 
     417                     IF( snwice_mass(ji,jj) /= 0._wp ) THEN 
     418                        e3t_n(ji,jj,jk) = e3t_0(ji,jj,jk) * ( 1._wp + sshn(ji,jj) * tmask(ji,jj,jk) / ht_0(ji,jj) ) 
     419                        e3t_b(ji,jj,jk) = e3t_n(ji,jj,jk) 
     420                        e3t_a(ji,jj,jk) = e3t_n(ji,jj,jk) 
     421                     ENDIF 
     422                  END DO 
     423               END DO 
    422424            END DO 
    423425            ! 
    424             ! Reconstruction of all vertical scale factors at now and before time-steps 
    425             ! ========================================================================= 
    426             ! Horizontal scale factor interpolations 
    427             ! -------------------------------------- 
    428             CALL dom_vvl_interpol( e3t_b(:,:,:), e3u_b(:,:,:), 'U' ) 
    429             CALL dom_vvl_interpol( e3t_b(:,:,:), e3v_b(:,:,:), 'V' ) 
    430             CALL dom_vvl_interpol( e3t_n(:,:,:), e3u_n(:,:,:), 'U' ) 
    431             CALL dom_vvl_interpol( e3t_n(:,:,:), e3v_n(:,:,:), 'V' ) 
    432             CALL dom_vvl_interpol( e3u_n(:,:,:), e3f_n(:,:,:), 'F' ) 
    433             ! Vertical scale factor interpolations 
    434             ! ------------------------------------ 
    435             CALL dom_vvl_interpol( e3t_n(:,:,:), e3w_n (:,:,:), 'W'  ) 
    436             CALL dom_vvl_interpol( e3u_n(:,:,:), e3uw_n(:,:,:), 'UW' ) 
    437             CALL dom_vvl_interpol( e3v_n(:,:,:), e3vw_n(:,:,:), 'VW' ) 
    438             CALL dom_vvl_interpol( e3u_b(:,:,:), e3uw_b(:,:,:), 'UW' ) 
    439             CALL dom_vvl_interpol( e3v_b(:,:,:), e3vw_b(:,:,:), 'VW' ) 
    440             ! t- and w- points depth 
    441             ! ---------------------- 
    442             !!gm not sure of that.... 
    443             gdept_n(:,:,1) = 0.5_wp * e3w_n(:,:,1) 
    444             gdepw_n(:,:,1) = 0.0_wp 
    445             gde3w_n(:,:,1) = gdept_n(:,:,1) - sshn(:,:) 
    446             DO jk = 2, jpk 
    447                gdept_n(:,:,jk) = gdept_n(:,:,jk-1) + e3w_n(:,:,jk  ) 
    448                gdepw_n(:,:,jk) = gdepw_n(:,:,jk-1) + e3t_n(:,:,jk-1) 
    449                gde3w_n(:,:,jk) = gdept_n(:,:,jk  ) - sshn (:,:) 
    450             END DO 
     426            CALL dom_vvl_zgr            ! interpolation of all scale factors  
     427            ! 
    451428         ENDIF 
     429         ! 
    452430      ENDIF 
    453431 
Note: See TracChangeset for help on using the changeset viewer.