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 15418 for NEMO/branches/2020/ticket2487/src/OCE/SBC/sbcice_cice.F90 – NEMO

Ignore:
Timestamp:
2021-10-20T16:53:18+02:00 (11 months ago)
Author:
smueller
Message:

Addition of vertical-scale-factor and water-column-height updates to complete initial SSH adjustments due to non-zero sea-ice/snow mass (ticket #2487)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/ticket2487/src/OCE/SBC/sbcice_cice.F90

    r15264 r15418  
    231231 
    232232      IF( .NOT.ln_rstart ) THEN 
    233          IF( ln_ice_embd ) THEN            ! embedded sea-ice: deplete the initial ssh below sea-ice area 
    234             sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 
    235             sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 
    236  
     233         ! 
     234         IF( ln_ice_embd .OR. ln_ice_sladj ) THEN 
     235            ! 
     236            IF( ln_ice_embd ) THEN            ! embedded sea-ice: deplete the initial ssh below sea-ice area 
     237               sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 
     238               sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 
     239 
     240            ELSEIF( ln_ice_sladj ) THEN       ! adjustment of the sea level due to initial snow+ice mass 
     241               z1_area = 1.0_wp / glob_sum( 'sbcice_cice', e1e2t(:,:) ) 
     242               zsshadj = glob_sum( 'sbcice_cice', e1e2t(:,:) * snwice_mass(:,:) ) * r1_rau0 * z1_area 
     243#if defined key_agrif 
     244               ! Override ssh adjustment in nested domains by the root-domain ssh 
     245               ! adjustment; store the adjustment value in a global module variable to 
     246               ! make it retrievable in nested domains 
     247               IF( .NOT. Agrif_Root() ) zsshadj = Agrif_Parent(rsshadj) 
     248               rsshadj = zsshadj 
     249#endif 
     250               IF(lwp) WRITE(numout,'(A35,F10.6,A21)') 'iceistate:   sea level adjusted by ', -1.0_wp * zsshadj, ' m to compensate for' 
     251               IF(lwp) WRITE(numout,*) '             the initial snow+ice mass' 
     252               sshn(:,:) = sshn(:,:) - zsshadj 
     253               sshb(:,:) = sshb(:,:) - zsshadj 
     254            ENDIF 
     255            ! 
    237256!!gm This should be put elsewhere....   (same remark for limsbc) 
    238257!!gm especially here it is assumed zstar coordinate, but it can be ztilde.... 
    239258            IF( .NOT.ln_linssh ) THEN 
    240259               ! 
     260               ztmp1(:,:) = 1._wp + sshn(:,:) * ssmask(:,:) / ( ht_0(:,:) + 1._wp - ssmask(:,:) ) 
     261               ! 
    241262               DO jk = 1,jpkm1                     ! adjust initial vertical scale factors 
    242                   e3t_n(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshn(:,:)*ssmask(:,:)/(ht_0(:,:) + 1._wp - ssmask(:,:)) ) 
    243                   e3t_b(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshb(:,:)*ssmask(:,:)/(ht_0(:,:) + 1._wp - ssmask(:,:)) ) 
     263                  e3t_n(:,:,jk) = e3t_0(:,:,jk) * ( ztmp1(:,:) * tmask(:,:,jk) - ( tmask(:,:,jk) - 1.0_wp ) ) 
     264                  e3t_b(:,:,jk) = e3t_n(:,:,jk) 
    244265               ENDDO 
    245266               e3t_a(:,:,:) = e3t_b(:,:,:) 
    246                ! Reconstruction of all vertical scale factors at now and before time-steps 
    247                ! ============================================================================= 
    248                ! Horizontal scale factor interpolations 
    249                ! -------------------------------------- 
    250                CALL dom_vvl_interpol( e3t_b(:,:,:), e3u_b(:,:,:), 'U' ) 
    251                CALL dom_vvl_interpol( e3t_b(:,:,:), e3v_b(:,:,:), 'V' ) 
    252                CALL dom_vvl_interpol( e3t_n(:,:,:), e3u_n(:,:,:), 'U' ) 
    253                CALL dom_vvl_interpol( e3t_n(:,:,:), e3v_n(:,:,:), 'V' ) 
    254                CALL dom_vvl_interpol( e3u_n(:,:,:), e3f_n(:,:,:), 'F' ) 
    255                ! Vertical scale factor interpolations 
    256                ! ------------------------------------ 
    257                CALL dom_vvl_interpol( e3t_n(:,:,:), e3w_n (:,:,:), 'W'  ) 
    258                CALL dom_vvl_interpol( e3u_n(:,:,:), e3uw_n(:,:,:), 'UW' ) 
    259                CALL dom_vvl_interpol( e3v_n(:,:,:), e3vw_n(:,:,:), 'VW' ) 
    260                CALL dom_vvl_interpol( e3u_b(:,:,:), e3uw_b(:,:,:), 'UW' ) 
    261                CALL dom_vvl_interpol( e3v_b(:,:,:), e3vw_b(:,:,:), 'VW' ) 
    262                ! t- and w- points depth 
    263                ! ---------------------- 
    264                gdept_n(:,:,1) = 0.5_wp * e3w_n(:,:,1) 
    265                gdepw_n(:,:,1) = 0.0_wp 
    266                gde3w_n(:,:,1) = gdept_n(:,:,1) - sshn(:,:) 
    267                DO jk = 2, jpk 
    268                   gdept_n(:,:,jk) = gdept_n(:,:,jk-1) + e3w_n(:,:,jk) 
    269                   gdepw_n(:,:,jk) = gdepw_n(:,:,jk-1) + e3t_n(:,:,jk-1) 
    270                   gde3w_n(:,:,jk) = gdept_n(:,:,jk  ) - sshn   (:,:) 
    271                END DO 
    272             ENDIF 
    273          ELSEIF( ln_ice_sladj ) THEN       ! adjustment of the sea level due to initial snow+ice mass 
    274             z1_area = 1.0_wp / glob_sum( 'sbcice_cice', e1e2t(:,:) ) 
    275             zsshadj = glob_sum( 'sbcice_cice', e1e2t(:,:) * snwice_mass(:,:) ) * r1_rau0 * z1_area 
    276 #if defined key_agrif 
    277             ! Override ssh adjustment in nested domains by the root-domain ssh 
    278             ! adjustment; store the adjustment value in a global module variable to 
    279             ! make it retrievable in nested domains 
    280             IF( .NOT. Agrif_Root() ) zsshadj = Agrif_Parent(rsshadj) 
    281             rsshadj = zsshadj 
    282 #endif 
    283             IF(lwp) WRITE(numout,'(A35,F10.6,A21)') 'iceistate:   sea level adjusted by ', -1.0_wp * zsshadj, ' m to compensate for' 
    284             IF(lwp) WRITE(numout,*) '             the initial snow+ice mass' 
    285             sshn(:,:) = sshn(:,:) - zsshadj 
    286             sshb(:,:) = sshb(:,:) - zsshadj 
     267               ! 
     268               CALL dom_vvl_zgr 
     269               ! 
     270            END IF 
    287271         ENDIF 
    288272      ENDIF 
Note: See TracChangeset for help on using the changeset viewer.