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 8680 for branches/2017 – NEMO

Changeset 8680 for branches/2017


Ignore:
Timestamp:
2017-11-09T10:34:26+01:00 (6 years ago)
Author:
clem
Message:

allow the user to define its own ice categories

Location:
branches/2017/dev_r8183_ICEMODEL/NEMOGCM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8183_ICEMODEL/NEMOGCM/CONFIG/SHARED/namelist_ice_lim3_ref

    r8678 r8680  
    4141&namitd         !   Ice discretization 
    4242!------------------------------------------------------------------------------ 
    43    rn_himean        =   2.0           !  expected domain-average ice thickness (m) 
     43   ln_cat_hfn       = .true.          !  ice categories are defined by a function following rn_himean**(-0.05) 
     44      rn_himean     =   2.0           !  expected domain-average ice thickness (m) 
     45   ln_cat_usr       = .false.         !  ice categories are defined by rn_catbnd below (m) 
     46      rn_catbnd     =   0.,0.45,1.1,2.1,3.7,6.0   
    4447   rn_himin         =   0.1           !  minimum ice thickness (m) used in remapping 
    4548/ 
  • branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/iceitd.F90

    r8597 r8680  
    3636   PUBLIC   ice_itd_reb   ! called in icecor 
    3737 
     38   INTEGER ::              nice_catbnd   ! choice of the type of ice category function 
     39   !                                       ! associated indices: 
     40   INTEGER, PARAMETER ::   np_cathfn = 1   ! categories defined by a function 
     41   INTEGER, PARAMETER ::   np_catusr = 2   ! categories defined by the user 
     42   ! 
    3843   ! ** namelist (namitd) ** 
     44   LOGICAL  ::   ln_cat_hfn  ! ice categories are defined by function like rn_himean**(-0.05) 
    3945   REAL(wp) ::   rn_himean   ! mean thickness of the domain 
    40  
     46   LOGICAL  ::   ln_cat_usr  ! ice categories are defined by rn_catbnd 
     47   REAL(wp), DIMENSION(0:100) ::   rn_catbnd   ! ice categories bounds 
     48   ! 
    4149   !!---------------------------------------------------------------------- 
    4250   !! NEMO/ICE 4.0 , NEMO Consortium (2017) 
     
    637645      !! ** input   :   Namelist namitd 
    638646      !!------------------------------------------------------------------- 
    639       INTEGER  ::   jl    ! dummy loop index 
    640       INTEGER  ::   ios   ! Local integer output status for namelist read 
     647      INTEGER  ::   jl            ! dummy loop index 
     648      INTEGER  ::   ios, ioptio   ! Local integer output status for namelist read 
    641649      REAL(wp) ::   zhmax, znum, zden, zalpha   !   -      - 
    642       !! 
    643       NAMELIST/namitd/ rn_himean, rn_himin 
     650      ! 
     651      NAMELIST/namitd/ ln_cat_hfn, rn_himean, ln_cat_usr, rn_catbnd, rn_himin 
    644652      !!------------------------------------------------------------------ 
    645653      ! 
     
    658666         WRITE(numout,*) '~~~~~~~~~~~~' 
    659667         WRITE(numout,*) '   Namelist namitd: ' 
    660          WRITE(numout,*) '      mean ice thickness in the domain               rn_himean = ', rn_himean 
    661          WRITE(numout,*) '      minimum ice thickness                          rn_himin  = ', rn_himin  
     668         WRITE(numout,*) '      Ice categories are defined by a function of rn_himean**(-0.05)    ln_cat_hfn = ', ln_cat_hfn 
     669         WRITE(numout,*) '         mean ice thickness in the domain                               rn_himean  = ', rn_himean 
     670         WRITE(numout,*) '      Ice categories are defined by rn_catbnd                           ln_cat_usr = ', ln_cat_usr 
     671         WRITE(numout,*) '         ice categories boundaries (m)                                  rn_catbnd  = ', rn_catbnd  
     672         WRITE(numout,*) '      minimum ice thickness                                             rn_himin   = ', rn_himin  
    662673      ENDIF 
    663674      ! 
     
    665676      !  Thickness categories boundaries  ! 
    666677      !-----------------------------------! 
    667       ! 
    668       zalpha = 0.05_wp              ! max of each category (from h^(-alpha) function) 
    669       zhmax  = 3._wp * rn_himean 
    670       DO jl = 1, jpl 
    671          znum = jpl * ( zhmax+1 )**zalpha 
    672          zden = REAL( jpl-jl , wp ) * ( zhmax + 1._wp )**zalpha + REAL( jl , wp ) 
    673          hi_max(jl) = ( znum / zden )**(1./zalpha) - 1 
    674       END DO 
     678      !                             !== set the choice of ice categories ==! 
     679      ioptio = 0  
     680      IF( ln_cat_hfn ) THEN   ;   ioptio = ioptio + 1   ;   nice_catbnd = np_cathfn    ;   ENDIF 
     681      IF( ln_cat_usr ) THEN   ;   ioptio = ioptio + 1   ;   nice_catbnd = np_catusr    ;   ENDIF 
     682      IF( ioptio /= 1 )   CALL ctl_stop( 'ice_itd_init: choose one and only one ice categories boundaries' ) 
     683      ! 
     684      SELECT CASE( nice_catbnd ) 
     685      !                                !------------------------! 
     686      CASE( np_cathfn )                ! h^(-alpha) function 
     687         !                             !------------------------! 
     688         zalpha = 0.05_wp 
     689         zhmax  = 3._wp * rn_himean 
     690         DO jl = 1, jpl 
     691            znum = jpl * ( zhmax+1 )**zalpha 
     692            zden = REAL( jpl-jl , wp ) * ( zhmax + 1._wp )**zalpha + REAL( jl , wp ) 
     693            hi_max(jl) = ( znum / zden )**(1./zalpha) - 1 
     694         END DO 
     695         !                             !------------------------! 
     696      CASE( np_catusr )                ! user defined 
     697         !                             !------------------------! 
     698         DO jl = 0, jpl 
     699            hi_max(jl) = rn_catbnd(jl) 
     700         END DO 
     701         ! 
     702      END SELECT 
    675703      ! 
    676704      DO jl = 1, jpl                ! mean thickness by category 
Note: See TracChangeset for help on using the changeset viewer.