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 13540 for NEMO/branches/2020/r12377_ticket2386/src/ICE/iceitd.F90 – NEMO

Ignore:
Timestamp:
2020-09-29T12:41:06+02:00 (4 years ago)
Author:
andmirek
Message:

Ticket #2386: update to latest trunk

Location:
NEMO/branches/2020/r12377_ticket2386
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/r12377_ticket2386

    • Property svn:externals
      •  

        old new  
        33^/utils/build/mk@HEAD         mk 
        44^/utils/tools@HEAD            tools 
        5 ^/vendors/AGRIF/dev@HEAD      ext/AGRIF 
         5^/vendors/AGRIF/dev_r12970_AGRIF_CMEMS      ext/AGRIF 
        66^/vendors/FCM@HEAD            ext/FCM 
        77^/vendors/IOIPSL@HEAD         ext/IOIPSL 
        88 
        99# SETTE 
        10 ^/utils/CI/sette@HEAD         sette 
         10^/utils/CI/sette@13507        sette 
  • NEMO/branches/2020/r12377_ticket2386/src/ICE/iceitd.F90

    r12377 r13540  
    4747   LOGICAL                    ::   ln_cat_usr   ! ice categories are defined by rn_catbnd 
    4848   REAL(wp), DIMENSION(0:100) ::   rn_catbnd    ! ice categories bounds 
     49   REAL(wp)                   ::   rn_himax     ! maximum ice thickness allowed 
    4950   ! 
    5051   !! * Substitutions 
     
    9899      ! 
    99100      npti = 0   ;   nptidx(:) = 0 
    100       DO_2D_11_11 
     101      DO_2D( 1, 1, 1, 1 ) 
    101102         IF ( at_i(ji,jj) > epsi10 ) THEN 
    102103            npti = npti + 1 
     
    148149               !    Note: hn(t+1) must not be too close to either HR or HL otherwise a division by nearly 0 is possible  
    149150               !          in itd_glinear in the case (HR-HL) = 3(Hice - HL) or = 3(HR - Hice) 
     151# if defined key_single 
     152               IF( a_i_2d(ji,jl  ) > epsi10 .AND. h_i_2d(ji,jl  ) > ( zhbnew(ji,jl) - epsi06 ) )   nptidx(ji) = 0 
     153               IF( a_i_2d(ji,jl+1) > epsi10 .AND. h_i_2d(ji,jl+1) < ( zhbnew(ji,jl) + epsi06 ) )   nptidx(ji) = 0 
     154# else 
    150155               IF( a_i_2d(ji,jl  ) > epsi10 .AND. h_i_2d(ji,jl  ) > ( zhbnew(ji,jl) - epsi10 ) )   nptidx(ji) = 0 
    151156               IF( a_i_2d(ji,jl+1) > epsi10 .AND. h_i_2d(ji,jl+1) < ( zhbnew(ji,jl) + epsi10 ) )   nptidx(ji) = 0 
     157# endif 
    152158               ! 
    153159               ! 2) Hn-1 < Hn* < Hn+1   
     
    170176            !    h1(t) must not be too close to either HR or HL otherwise a division by nearly 0 is possible  
    171177            !    in itd_glinear in the case (HR-HL) = 3(Hice - HL) or = 3(HR - Hice) 
     178# if defined key_single 
     179            IF( h_ib_2d(ji,1) < ( hi_max(0) + epsi06 ) )   nptidx(ji) = 0 
     180            IF( h_ib_2d(ji,1) > ( hi_max(1) - epsi06 ) )   nptidx(ji) = 0 
     181# else 
    172182            IF( h_ib_2d(ji,1) < ( hi_max(0) + epsi10 ) )   nptidx(ji) = 0 
    173183            IF( h_ib_2d(ji,1) > ( hi_max(1) - epsi10 ) )   nptidx(ji) = 0 
     184# endif 
    174185         END DO 
    175186         ! 
     
    304315            IF ( a_i_1d(ji) > epsi10 .AND. h_i_1d(ji) < rn_himin ) THEN 
    305316               a_i_1d(ji) = a_i_1d(ji) * h_i_1d(ji) / rn_himin  
    306                IF( ln_pnd_H12 )   a_ip_1d(ji) = a_ip_1d(ji) * h_i_1d(ji) / rn_himin 
     317               IF( ln_pnd_LEV )   a_ip_1d(ji) = a_ip_1d(ji) * h_i_1d(ji) / rn_himin 
    307318               h_i_1d(ji) = rn_himin 
    308319            ENDIF 
     
    410421      CALL tab_3d_2d( npti, nptidx(1:npti), a_ip_2d(1:npti,1:jpl), a_ip ) 
    411422      CALL tab_3d_2d( npti, nptidx(1:npti), v_ip_2d(1:npti,1:jpl), v_ip ) 
     423      CALL tab_3d_2d( npti, nptidx(1:npti), v_il_2d(1:npti,1:jpl), v_il ) 
    412424      CALL tab_3d_2d( npti, nptidx(1:npti), t_su_2d(1:npti,1:jpl), t_su ) 
    413425      DO jl = 1, jpl 
     
    474486               zaTsfn(ji,jl2)  = zaTsfn(ji,jl2) + ztrans 
    475487               !   
    476                IF ( ln_pnd_H12 ) THEN 
     488               IF ( ln_pnd_LEV ) THEN 
    477489                  ztrans          = a_ip_2d(ji,jl1) * zworka(ji)     ! Pond fraction 
    478490                  a_ip_2d(ji,jl1) = a_ip_2d(ji,jl1) - ztrans 
     
    482494                  v_ip_2d(ji,jl1) = v_ip_2d(ji,jl1) - ztrans 
    483495                  v_ip_2d(ji,jl2) = v_ip_2d(ji,jl2) + ztrans 
     496                  ! 
     497                  IF ( ln_pnd_lids ) THEN                            ! Pond lid volume 
     498                     ztrans          = v_il_2d(ji,jl1) * zworka(ji) 
     499                     v_il_2d(ji,jl1) = v_il_2d(ji,jl1) - ztrans 
     500                     v_il_2d(ji,jl2) = v_il_2d(ji,jl2) + ztrans 
     501                  ENDIF 
    484502               ENDIF 
    485503               ! 
     
    526544      ! clem: The transfer between one category to another can lead to very small negative values (-1.e-20) 
    527545      !       because of truncation error ( i.e. 1. - 1. /= 0 ) 
    528       CALL ice_var_roundoff( a_i_2d, v_i_2d, v_s_2d, sv_i_2d, oa_i_2d, a_ip_2d, v_ip_2d, ze_s_2d, ze_i_2d ) 
     546      CALL ice_var_roundoff( a_i_2d, v_i_2d, v_s_2d, sv_i_2d, oa_i_2d, a_ip_2d, v_ip_2d, v_il_2d, ze_s_2d, ze_i_2d ) 
    529547 
    530548      ! at_i must be <= rn_amax 
     
    538556      ! 4) Update ice thickness and temperature 
    539557      !------------------------------------------------------------------------------- 
     558# if defined key_single 
     559      WHERE( a_i_2d(1:npti,:) >= epsi06 ) 
     560# else 
    540561      WHERE( a_i_2d(1:npti,:) >= epsi20 ) 
     562# endif 
    541563         h_i_2d (1:npti,:)  =  v_i_2d(1:npti,:) / a_i_2d(1:npti,:)  
    542564         t_su_2d(1:npti,:)  =  zaTsfn(1:npti,:) / a_i_2d(1:npti,:)  
     
    554576      CALL tab_2d_3d( npti, nptidx(1:npti), a_ip_2d(1:npti,1:jpl), a_ip ) 
    555577      CALL tab_2d_3d( npti, nptidx(1:npti), v_ip_2d(1:npti,1:jpl), v_ip ) 
     578      CALL tab_2d_3d( npti, nptidx(1:npti), v_il_2d(1:npti,1:jpl), v_il ) 
    556579      CALL tab_2d_3d( npti, nptidx(1:npti), t_su_2d(1:npti,1:jpl), t_su ) 
    557580      DO jl = 1, jpl 
     
    597620         !                    !--------------------------------------- 
    598621         npti = 0   ;   nptidx(:) = 0 
    599          DO_2D_11_11 
     622         DO_2D( 1, 1, 1, 1 ) 
    600623            IF( a_i(ji,jj,jl) > 0._wp .AND. v_i(ji,jj,jl) > (a_i(ji,jj,jl) * hi_max(jl)) ) THEN 
    601624               npti = npti + 1 
     
    636659         !                    !----------------------------------------- 
    637660         npti = 0 ; nptidx(:) = 0 
    638          DO_2D_11_11 
     661         DO_2D( 1, 1, 1, 1 ) 
    639662            IF( a_i(ji,jj,jl+1) > 0._wp .AND. v_i(ji,jj,jl+1) <= (a_i(ji,jj,jl+1) * hi_max(jl)) ) THEN 
    640663               npti = npti + 1 
     
    679702      REAL(wp) ::   zhmax, znum, zden, zalpha   !   -      - 
    680703      ! 
    681       NAMELIST/namitd/ ln_cat_hfn, rn_himean, ln_cat_usr, rn_catbnd, rn_himin 
     704      NAMELIST/namitd/ ln_cat_hfn, rn_himean, ln_cat_usr, rn_catbnd, rn_himin, rn_himax 
    682705      !!------------------------------------------------------------------ 
    683706      ! 
     
    696719         WRITE(numout,*) '         mean ice thickness in the domain                               rn_himean  = ', rn_himean 
    697720         WRITE(numout,*) '      Ice categories are defined by rn_catbnd                           ln_cat_usr = ', ln_cat_usr 
    698          WRITE(numout,*) '      minimum ice thickness                                             rn_himin   = ', rn_himin  
     721         WRITE(numout,*) '      minimum ice thickness allowed                                     rn_himin   = ', rn_himin  
     722         WRITE(numout,*) '      maximum ice thickness allowed                                     rn_himax   = ', rn_himax  
    699723      ENDIF 
    700724      ! 
     
    733757      END DO 
    734758      ! 
    735       hi_max(jpl) = 99._wp          ! set to a big value to ensure that all ice is thinner than hi_max(jpl) 
     759      hi_max(jpl) = rn_himax        ! set to a big value to ensure that all ice is thinner than hi_max(jpl) 
    736760      ! 
    737761      IF(lwp) WRITE(numout,*) 
Note: See TracChangeset for help on using the changeset viewer.