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 12065 for NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/ICE/icethd.F90 – NEMO

Ignore:
Timestamp:
2019-12-05T12:06:36+01:00 (4 years ago)
Author:
smueller
Message:

Synchronizing with /NEMO/trunk@12055 (ticket #2194)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/ICE/icethd.F90

    r10534 r12065  
    9595      IF( ln_timing    )   CALL timing_start('icethd')                                                             ! timing 
    9696      IF( ln_icediachk )   CALL ice_cons_hsm(0, 'icethd', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation 
     97      IF( ln_icediachk )   CALL ice_cons2D  (0, 'icethd',  diag_v,  diag_s,  diag_t,  diag_fv,  diag_fs,  diag_ft) ! conservation 
    9798 
    9899      IF( kt == nit000 .AND. lwp ) THEN 
     
    102103      ENDIF 
    103104       
    104       CALL ice_var_glo2eqv 
    105  
    106105      !---------------------------------------------! 
    107106      ! computation of friction velocity at T points 
     
    162161            qlead(ji,jj) = MIN( 0._wp , zqld - ( qsb_ice_bot(ji,jj) * at_i(ji,jj) * rdt_ice ) - zqfr ) 
    163162 
    164             ! If there is ice and leads are warming, then transfer energy from the lead budget and use it for bottom melting  
    165             IF( zqld > 0._wp ) THEN 
     163            ! If there is ice and leads are warming => transfer energy from the lead budget and use it for bottom melting  
     164            ! If the grid cell is fully covered by ice (no leads) => transfer energy from the lead budget to the ice bottom budget 
     165            IF( ( zqld >= 0._wp .AND. at_i(ji,jj) > 0._wp ) .OR. at_i(ji,jj) >= (1._wp - epsi10) ) THEN 
    166166               fhld (ji,jj) = rswitch * zqld * r1_rdtice / MAX( at_i(ji,jj), epsi10 ) ! divided by at_i since this is (re)multiplied by a_i in icethd_dh.F90 
    167167               qlead(ji,jj) = 0._wp 
     
    178178      ! In case we bypass open-water ice formation 
    179179      IF( .NOT. ln_icedO )  qlead(:,:) = 0._wp 
    180       ! In case we bypass growing/melting from top and bottom: we suppose ice is impermeable => ocean is isolated from atmosphere 
     180      ! In case we bypass growing/melting from top and bottom 
    181181      IF( .NOT. ln_icedH ) THEN 
    182          qt_atm_oi  (:,:) = ( 1._wp - at_i_b(:,:) ) * ( qns_oce(:,:) + qsr_oce(:,:) ) + qemp_oce(:,:) 
    183182         qsb_ice_bot(:,:) = 0._wp 
    184183         fhld       (:,:) = 0._wp 
     
    221220            dh_i_sub  (1:npti) = 0._wp ; dh_i_bog(1:npti) = 0._wp 
    222221            dh_snowice(1:npti) = 0._wp ; dh_s_mlt(1:npti) = 0._wp 
    223             ! 
    224             IF( ln_icedH ) THEN                                     ! --- growing/melting --- ! 
    225                               CALL ice_thd_zdf                             ! Ice/Snow Temperature profile 
    226                               CALL ice_thd_dh                              ! Ice/Snow thickness    
    227                               CALL ice_thd_pnd                             ! Melt ponds formation 
    228                               CALL ice_thd_ent( e_i_1d(1:npti,:) )         ! Ice enthalpy remapping 
     222            !                                       
     223                              CALL ice_thd_zdf                      ! --- Ice-Snow temperature --- ! 
     224            ! 
     225            IF( ln_icedH ) THEN                                     ! --- Growing/Melting --- ! 
     226                              CALL ice_thd_dh                           ! Ice-Snow thickness    
     227                              CALL ice_thd_pnd                          ! Melt ponds formation 
     228                              CALL ice_thd_ent( e_i_1d(1:npti,:) )      ! Ice enthalpy remapping 
    229229            ENDIF 
    230             ! 
    231230                              CALL ice_thd_sal( ln_icedS )          ! --- Ice salinity --- !     
    232231            ! 
    233                               CALL ice_thd_temp                     ! --- temperature update --- ! 
     232                              CALL ice_thd_temp                     ! --- Temperature update --- ! 
    234233            ! 
    235234            IF( ln_icedH .AND. ln_virtual_itd ) & 
    236                &              CALL ice_thd_mono                     ! --- extra lateral melting if virtual_itd --- ! 
    237             ! 
    238             IF( ln_icedA )    CALL ice_thd_da                       ! --- lateral melting --- ! 
     235               &              CALL ice_thd_mono                     ! --- Extra lateral melting if virtual_itd --- ! 
     236            ! 
     237            IF( ln_icedA )    CALL ice_thd_da                       ! --- Lateral melting --- ! 
    239238            ! 
    240239                              CALL ice_thd_1d2d( jl, 2 )            ! --- Change units of e_i, e_s from J/m3 to J/m2 --- ! 
    241240            !                                                       ! --- & Move to 2D arrays --- ! 
    242             ! 
    243241         ENDIF 
    244242         ! 
    245243      END DO 
    246       ! update ice age (in case a_i changed, i.e. becomes 0 or lateral melting) 
    247       oa_i(:,:,:) = o_i(:,:,:) * a_i(:,:,:) 
    248  
     244      ! 
    249245      IF( ln_icediachk )   CALL ice_cons_hsm(1, 'icethd', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) 
    250       ! 
    251                            CALL ice_var_zapsmall           ! --- remove very small ice concentration (<1e-10) --- ! 
    252       !                                                    !     & make sure at_i=SUM(a_i) & ato_i=1 where at_i=0 
     246      IF( ln_icediachk )   CALL ice_cons2D  (1, 'icethd',  diag_v,  diag_s,  diag_t,  diag_fv,  diag_fs,  diag_ft) 
    253247      !                    
    254       IF( jpl > 1      )   CALL ice_itd_rem( kt )          ! --- Transport ice between thickness categories --- ! 
    255       ! 
    256       IF( ln_icedO     )   CALL ice_thd_do                 ! --- frazil ice growing in leads --- ! 
     248      IF( jpl > 1  )          CALL ice_itd_rem( kt )                ! --- Transport ice between thickness categories --- ! 
     249      ! 
     250      IF( ln_icedO )          CALL ice_thd_do                       ! --- Frazil ice growth in leads --- ! 
    257251      ! 
    258252      ! controls 
     
    418412         CALL tab_2d_1d( npti, nptidx(1:npti), sst_1d(1:npti), sst_m ) 
    419413         CALL tab_2d_1d( npti, nptidx(1:npti), sss_1d(1:npti), sss_m ) 
    420  
     414         ! 
     415         ! to update ice age 
     416         CALL tab_2d_1d( npti, nptidx(1:npti), o_i_1d (1:npti), o_i (:,:,kl) ) 
     417         CALL tab_2d_1d( npti, nptidx(1:npti), oa_i_1d(1:npti), oa_i(:,:,kl) ) 
     418         ! 
    421419         ! --- Change units of e_i, e_s from J/m2 to J/m3 --- ! 
    422420         DO jk = 1, nlay_i 
     
    443441         sv_i_1d(1:npti) = s_i_1d (1:npti) * v_i_1d (1:npti) 
    444442         v_ip_1d(1:npti) = h_ip_1d(1:npti) * a_ip_1d(1:npti) 
     443         oa_i_1d(1:npti) = o_i_1d (1:npti) * a_i_1d (1:npti) 
    445444          
    446445         CALL tab_1d_2d( npti, nptidx(1:npti), at_i_1d(1:npti), at_i             ) 
     
    516515         CALL tab_1d_2d( npti, nptidx(1:npti), sv_i_1d(1:npti), sv_i(:,:,kl) ) 
    517516         CALL tab_1d_2d( npti, nptidx(1:npti), v_ip_1d(1:npti), v_ip(:,:,kl) ) 
     517         CALL tab_1d_2d( npti, nptidx(1:npti), oa_i_1d(1:npti), oa_i(:,:,kl) ) 
    518518         ! 
    519519      END SELECT 
     
    541541      REWIND( numnam_ice_ref )              ! Namelist namthd in reference namelist : Ice thermodynamics 
    542542      READ  ( numnam_ice_ref, namthd, IOSTAT = ios, ERR = 901) 
    543 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namthd in reference namelist', lwp ) 
     543901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namthd in reference namelist' ) 
    544544      REWIND( numnam_ice_cfg )              ! Namelist namthd in configuration namelist : Ice thermodynamics 
    545545      READ  ( numnam_ice_cfg, namthd, IOSTAT = ios, ERR = 902 ) 
    546 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namthd in configuration namelist', lwp ) 
     546902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namthd in configuration namelist' ) 
    547547      IF(lwm) WRITE( numoni, namthd ) 
    548548      ! 
Note: See TracChangeset for help on using the changeset viewer.