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 15496 – NEMO

Changeset 15496


Ignore:
Timestamp:
2021-11-11T13:02:37+01:00 (3 years ago)
Author:
clem
Message:

trunk: 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/trunk/src/ICE/iceistate.F90

    r14997 r15496  
    7575   INTEGER , PARAMETER ::   jp_hld = 10          ! index of pnd lid depth    (m) 
    7676   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   si  ! structure of input fields (file informations, fields read) 
    77  
     77   ! 
     78#if defined key_agrif 
     79   REAL(wp), PUBLIC ::   rsshadj   !: initial mean ssh adjustment due to initial ice+snow mass 
     80#endif 
     81   ! 
    7882   !! * Substitutions 
    7983#  include "do_loop_substitute.h90" 
     
    108112      ! 
    109113      INTEGER  ::   ji, jj, jk, jl         ! dummy loop indices 
    110       REAL(wp) ::   ztmelts 
     114      REAL(wp) ::   ztmelts, zsshadj, area 
    111115      INTEGER , DIMENSION(4)           ::   itest 
    112116      REAL(wp), DIMENSION(jpi,jpj)     ::   z2d 
     
    414418      ENDIF ! ln_iceini 
    415419      ! 
    416       !---------------------------------------------- 
    417       ! 4) Snow-ice mass (case ice is fully embedded) 
    418       !---------------------------------------------- 
     420      !---------------------------------------------------------- 
     421      ! 4) Adjust ssh and vertical scale factors to snow-ice mass 
     422      !---------------------------------------------------------- 
    419423      snwice_mass  (:,:) = tmask(:,:,1) * SUM( rhos * v_s + rhoi * v_i + rhow * ( v_ip + v_il ), dim=3  )   ! snow+ice mass 
    420424      snwice_mass_b(:,:) = snwice_mass(:,:) 
    421425      ! 
    422426      IF( ln_ice_embd ) THEN            ! embedded sea-ice: deplete the initial ssh below sea-ice area 
    423          ! 
     427         !                              ! ---------------- 
    424428         ssh(:,:,Kmm) = ssh(:,:,Kmm) - snwice_mass(:,:) * r1_rho0 
    425429         ssh(:,:,Kbb) = ssh(:,:,Kbb) - snwice_mass(:,:) * r1_rho0 
    426430         ! 
     431      ELSE                              ! levitating sea-ice: deplete the initial ssh over the whole domain 
     432         !                              ! ------------------ 
     433         area    = glob_sum( 'iceistate', e1e2t(:,:) * ssmask(:,:) ) 
     434         zsshadj = glob_sum( 'iceistate', snwice_mass(:,:) * r1_rho0 * e1e2t(:,:) ) / area 
     435#if defined key_agrif 
     436         ! Override ssh adjustment in nested domains by the root-domain ssh adjustment; 
     437         ! store the adjustment value in a global module variable to make it retrievable in nested domains 
     438         IF( .NOT.Agrif_Root() ) THEN 
     439            zsshadj = Agrif_Parent(rsshadj) 
     440         ELSE 
     441            rsshadj = zsshadj 
     442         ENDIF 
     443#endif 
     444         IF(lwp) WRITE(numout,'(A23,F10.6,A20)') ' sea level adjusted by ', -zsshadj, ' m to compensate for' 
     445         IF(lwp) WRITE(numout,*) ' the initial snow+ice mass' 
     446         ! 
     447         WHERE( ssmask(:,:) == 1._wp ) 
     448            ssh(:,:,Kmm) = ssh(:,:,Kmm) - zsshadj 
     449            ssh(:,:,Kbb) = ssh(:,:,Kbb) - zsshadj 
     450         ENDWHERE 
     451         ! 
     452      ENDIF 
     453      ! 
     454      IF( .NOT.ln_linssh ) THEN 
    427455#if defined key_qco 
    428          IF( .NOT.ln_linssh )   CALL dom_qco_zgr( Kbb, Kmm )        ! upadte of r3=ssh/h0 ratios 
     456         CALL dom_qco_zgr( Kbb, Kmm )        ! upadte of r3=ssh/h0 ratios 
    429457#elif defined key_linssh 
    430          !                                                          ! fix in time coord. : no update of vertical coord. 
     458         !                                   ! Fix in time : key_linssh case, set through domzgr_substitute.h90 
    431459#else 
    432          IF( .NOT.ln_linssh )   CALL dom_vvl_zgr( Kbb, Kmm, Kaa )   ! interpolation scale factor, depth and water column 
     460         DO jk = 1, jpk 
     461            DO_2D( nn_hls, nn_hls, nn_hls, nn_hls) 
     462               IF( snwice_mass(ji,jj) /= 0._wp ) THEN 
     463                  e3t(ji,jj,jk,Kmm) = e3t_0(ji,jj,jk) * ( 1._wp + ssh(ji,jj,Kmm) * r1_ht_0(ji,jj) * tmask(ji,jj,jk) ) 
     464                  e3t(ji,jj,jk,Kbb) = e3t_0(ji,jj,jk) * ( 1._wp + ssh(ji,jj,Kbb) * r1_ht_0(ji,jj) * tmask(ji,jj,jk) ) 
     465               ENDIF 
     466            END_2D 
     467         END DO 
     468         ! 
     469         CALL dom_vvl_zgr( Kbb, Kmm, Kaa )   ! interpolation of scale factor, depth and water column 
    433470#endif 
    434  
    435471      ENDIF 
    436  
     472      ! 
    437473      !!clem: output of initial state should be written here but it is impossible because 
    438474      !!      the ocean and ice are in the same file 
Note: See TracChangeset for help on using the changeset viewer.