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

Ignore:
Timestamp:
2021-11-10T17:18:22+01:00 (8 months ago)
Author:
clem
Message:

4.0-HEAD: solve ticket #2737. The ssh is now adjusted to the init of sea ice, hence the total oce+ice mass remains unchanged across simulations. This applies to both levitating and embedded sea ice. Therefore, results from the configurations with sea ice are changed

File:
1 edited

Legend:

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

    r15451 r15495  
    6565   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   si  ! structure of input fields (file informations, fields read) 
    6666   !    
     67#if defined key_agrif 
     68   REAL(wp), PUBLIC ::   rsshadj   !: initial mean ssh adjustment due to initial ice+snow mass 
     69#endif 
    6770   !!---------------------------------------------------------------------- 
    6871   !! NEMO/ICE 4.0 , NEMO Consortium (2018) 
     
    9497      !! 
    9598      INTEGER  ::   ji, jj, jk, jl         ! dummy loop indices 
    96       REAL(wp) ::   ztmelts 
     99      REAL(wp) ::   ztmelts, zsshadj, area 
    97100      INTEGER , DIMENSION(4)           ::   itest 
    98101      REAL(wp), DIMENSION(jpi,jpj)     ::   zswitch    ! ice indicator 
     
    399402      ENDIF ! ln_iceini 
    400403      ! 
    401       !---------------------------------------------- 
    402       ! 4) Snow-ice mass (case ice is fully embedded) 
    403       !---------------------------------------------- 
     404      !---------------------------------------------------------- 
     405      ! 4) Adjust ssh and vertical scale factors to snow-ice mass 
     406      !---------------------------------------------------------- 
    404407      snwice_mass  (:,:) = tmask(:,:,1) * SUM( rhos * v_s + rhoi * v_i + rhow * ( v_ip + v_il ), dim=3  )   ! snow+ice mass 
    405408      snwice_mass_b(:,:) = snwice_mass(:,:) 
    406409      ! 
    407410      IF( ln_ice_embd ) THEN            ! embedded sea-ice: deplete the initial ssh below sea-ice area 
    408          ! 
     411         !                              ! ---------------- 
    409412         sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 
    410413         sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 
    411414         ! 
    412          IF( .NOT.ln_linssh ) THEN 
    413             ! 
    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 
     415      ELSE                              ! levitating sea-ice: deplete the initial ssh over the whole domain 
     416         !                              ! ------------------ 
     417         area    = glob_sum( 'iceistate', e1e2t(:,:) * ssmask(:,:) ) 
     418         zsshadj = glob_sum( 'iceistate', snwice_mass(:,:) * r1_rau0 * e1e2t(:,:) ) / area 
     419#if defined key_agrif 
     420         ! Override ssh adjustment in nested domains by the root-domain ssh adjustment; 
     421         ! store the adjustment value in a global module variable to make it retrievable in nested domains 
     422         IF( .NOT.Agrif_Root() ) THEN  
     423            zsshadj = Agrif_Parent(rsshadj) 
     424         ELSE 
     425            rsshadj = zsshadj 
     426         ENDIF 
     427#endif 
     428         IF(lwp) WRITE(numout,'(A23,F10.6,A20)') ' sea level adjusted by ', -zsshadj, ' m to compensate for' 
     429         IF(lwp) WRITE(numout,*) ' the initial snow+ice mass' 
     430         ! 
     431         WHERE( ssmask(:,:) == 1._wp ) 
     432            sshn(:,:) = sshn(:,:) - zsshadj 
     433            sshb(:,:) = sshb(:,:) - zsshadj 
     434         ENDWHERE 
     435         ! 
     436      ENDIF 
     437       
     438      IF( .NOT.ln_linssh ) THEN 
     439         ! 
     440         DO jk = 1, jpkm1            ! adjust initial vertical scale factors                 
     441            DO jj = 1, jpj 
     442               DO ji = 1, jpi 
     443                  IF( snwice_mass(ji,jj) /= 0._wp ) THEN 
     444                     e3t_n(ji,jj,jk) = e3t_0(ji,jj,jk) * ( 1._wp + sshn(ji,jj) * tmask(ji,jj,jk) / ht_0(ji,jj) ) 
     445                     e3t_b(ji,jj,jk) = e3t_n(ji,jj,jk) 
     446                     e3t_a(ji,jj,jk) = e3t_n(ji,jj,jk) 
     447                  ENDIF 
    423448               END DO 
    424449            END DO 
    425             ! 
    426             CALL dom_vvl_zgr            ! interpolation of all scale factors  
    427             ! 
    428          ENDIF 
     450         END DO 
     451         ! 
     452         CALL dom_vvl_zgr            ! interpolation of all scale factors  
    429453         ! 
    430454      ENDIF 
    431  
     455      ! 
    432456!!clem: output of initial state should be written here but it is impossible because 
    433457!!      the ocean and ice are in the same file 
Note: See TracChangeset for help on using the changeset viewer.