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 8531 for branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icethd.F90 – NEMO

Ignore:
Timestamp:
2017-09-15T20:07:33+02:00 (7 years ago)
Author:
clem
Message:

changes in style - part6 - more clarity (still not finished)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icethd.F90

    r8522 r8531  
    2828      &                 fr1_i0, fr2_i0 
    2929   USE ice1D          ! thermodynamic sea-ice variables 
    30    USE icethd_dif     ! vertical diffusion 
     30   USE icethd_zdf     ! vertical diffusion 
    3131   USE icethd_dh      ! ice-snow growth and melt 
    3232   USE icethd_da      ! lateral melting 
    3333   USE icethd_sal     ! ice salinity 
    3434   USE icethd_ent     ! ice enthalpy redistribution 
    35    USE icethd_lac     ! lateral accretion 
     35   USE icethd_do      ! lateral accretion 
    3636   USE iceitd         ! remapping thickness distribution 
    3737   USE icetab         ! 1D <==> 2D transformation 
     
    5151   PUBLIC   ice_thd_init    ! called by ice_init 
    5252 
     53   !!** namelist (namthd) ** 
     54   LOGICAL ::   ln_icedH         ! activate ice thickness change from growing/melting (T) or not (F) 
     55   LOGICAL ::   ln_icedA         ! activate lateral melting param. (T) or not (F) 
     56   LOGICAL ::   ln_icedO         ! activate ice growth in open-water (T) or not (F) 
     57   LOGICAL ::   ln_icedS         ! activate gravity drainage and flushing (T) or not (F) 
     58 
    5359   !! * Substitutions 
    5460#  include "vectopt_loop_substitute.h90" 
     
    7076      !!               at the ice base, snow acc.,heat budget of the leads) 
    7177      !!             - selection of the icy points and put them in an array 
    72       !!             - call ice_thd_dif  for vertical heat diffusion 
     78      !!             - call ice_thd_zdf  for vertical heat diffusion 
    7379      !!             - call ice_thd_dh   for vertical ice growth and melt 
    7480      !!             - call ice_thd_ent  for enthalpy remapping 
    7581      !!             - call ice_thd_sal  for ice desalination 
    7682      !!             - call ice_thd_temp to  retrieve temperature from ice enthalpy 
     83      !!             - call ice_thd_lam  for extra lateral ice melt if monocat 
     84      !!             - call ice_thd_da   for lateral ice melt 
    7785      !!             - back to the geographic grid 
    7886      !!--------------------------------------------------------------------- 
     
    223231            ! 
    224232            IF( ln_icedH ) THEN                                     ! --- growing/melting --- ! 
    225                               CALL ice_thd_dif                             ! Ice/Snow Temperature profile 
     233                              CALL ice_thd_zdf                             ! Ice/Snow Temperature profile 
    226234                              CALL ice_thd_dh                              ! Ice/Snow thickness    
    227235                              CALL ice_thd_ent( e_i_1d(1:nidx,:) )         ! Ice enthalpy remapping 
    228236            ENDIF 
    229237            ! 
    230                               CALL ice_thd_sal                      ! --- Ice salinity --- !     
     238                              CALL ice_thd_sal( ln_icedS )          ! --- Ice salinity --- !     
    231239            ! 
    232240                              CALL ice_thd_temp                     ! --- temperature update --- ! 
     
    261269      IF( jpl > 1 )        CALL ice_itd_rem( kt )          ! --- Transport ice between thickness categories --- ! 
    262270      ! 
    263       IF( ln_icedO )       CALL ice_thd_lac                ! --- frazil ice growing in leads --- ! 
     271      IF( ln_icedO )       CALL ice_thd_do                 ! --- frazil ice growing in leads --- ! 
    264272      ! 
    265273      ! controls 
     
    523531      !!                   ***  ROUTINE ice_thd_init ***  
    524532      !!                  
    525       !! ** Purpose :   Physical constants and parameters linked to the ice  
    526       !!              thermodynamics 
     533      !! ** Purpose :   Physical constants and parameters associated with 
     534      !!                ice thermodynamics 
    527535      !! 
    528       !! ** Method  :   Read the namice_thd namelist and check the ice-thermo 
    529       !!              parameter values called at the first timestep (nit000) 
     536      !! ** Method  :   Read the namthd namelist and check the parameters 
     537      !!                called at the first timestep (nit000) 
    530538      !! 
    531       !! ** input   :   Namelist namicether 
     539      !! ** input   :   Namelist namthd 
    532540      !!------------------------------------------------------------------- 
    533541      INTEGER  ::   ios   ! Local integer output status for namelist read 
    534542      !! 
    535       NAMELIST/namice_thd/ rn_kappa_i, ln_cndi_U64, ln_cndi_P07, ln_dqns_i, rn_cnd_s,   & 
    536          &                 ln_icedH, rn_blow_s,                                                    & 
    537          &                 ln_icedA, rn_beta, rn_dmin,                                             & 
    538          &                 ln_icedO, rn_hinew, ln_frazil, rn_maxfraz, rn_vfraz, rn_Cfraz,          & 
    539          &                 nn_iceflx 
     543      NAMELIST/namthd/ ln_icedH, ln_icedA, ln_icedO, ln_icedS 
    540544      !!------------------------------------------------------------------- 
    541545      ! 
    542       REWIND( numnam_ice_ref )              ! Namelist namice_thd in reference namelist : Ice thermodynamics 
    543       READ  ( numnam_ice_ref, namice_thd, IOSTAT = ios, ERR = 901) 
    544 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namice_thd in reference namelist', lwp ) 
    545  
    546       REWIND( numnam_ice_cfg )              ! Namelist namice_thd in configuration namelist : Ice thermodynamics 
    547       READ  ( numnam_ice_cfg, namice_thd, IOSTAT = ios, ERR = 902 ) 
    548 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namice_thd in configuration namelist', lwp ) 
    549       IF(lwm) WRITE ( numoni, namice_thd ) 
     546      REWIND( numnam_ice_ref )              ! Namelist namthd in reference namelist : Ice thermodynamics 
     547      READ  ( numnam_ice_ref, namthd, IOSTAT = ios, ERR = 901) 
     548901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namthd in reference namelist', lwp ) 
     549 
     550      REWIND( numnam_ice_cfg )              ! Namelist namthd in configuration namelist : Ice thermodynamics 
     551      READ  ( numnam_ice_cfg, namthd, IOSTAT = ios, ERR = 902 ) 
     552902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namthd in configuration namelist', lwp ) 
     553      IF(lwm) WRITE ( numoni, namthd ) 
    550554      ! 
    551555      ! 
    552556      IF(lwp) THEN                          ! control print 
    553          WRITE(numout,*) 'ice_thd_init : Ice Thermodynamics' 
    554          WRITE(numout,*) '~~~~~~~~~~~~~' 
    555          WRITE(numout,*) '   Namelist namice_thd' 
    556          WRITE(numout,*) '   -- icethd_dif --' 
    557          WRITE(numout,*) '      extinction radiation parameter in sea ice               rn_kappa_i   = ', rn_kappa_i 
    558          WRITE(numout,*) '      thermal conductivity in the ice (Untersteiner 1964)     ln_cndi_U64  = ', ln_cndi_U64 
    559          WRITE(numout,*) '      thermal conductivity in the ice (Pringle et al 2007)    ln_cndi_P07  = ', ln_cndi_P07 
    560          WRITE(numout,*) '      change the surface non-solar flux with Tsu or not       ln_dqns_i    = ', ln_dqns_i 
    561          WRITE(numout,*) '      thermal conductivity of the snow                        rn_cnd_s     = ', rn_cnd_s 
    562          WRITE(numout,*) '   -- icethd_dh --' 
    563          WRITE(numout,*) '      activate ice thick change from top/bot (T) or not (F)   ln_icedH     = ', ln_icedH 
    564          WRITE(numout,*) '      coefficient for ice-lead partition of snowfall          rn_blow_s    = ', rn_blow_s 
    565          WRITE(numout,*) '   -- icethd_da --' 
    566          WRITE(numout,*) '      activate lateral melting (T) or not (F)                 ln_icedA     = ', ln_icedA 
    567          WRITE(numout,*) '      Coef. beta for lateral melting param.                   rn_beta      = ', rn_beta 
    568          WRITE(numout,*) '      Minimum floe diameter for lateral melting param.        rn_dmin      = ', rn_dmin 
    569          WRITE(numout,*) '   -- icethd_lac --' 
    570          WRITE(numout,*) '      activate ice growth in open-water (T) or not (F)        ln_icedO     = ', ln_icedO 
    571          WRITE(numout,*) '      ice thickness for lateral accretion                     rn_hinew     = ', rn_hinew 
    572          WRITE(numout,*) '      Frazil ice thickness as a function of wind or not       ln_frazil    = ', ln_frazil 
    573          WRITE(numout,*) '      Maximum proportion of frazil ice collecting at bottom   rn_maxfraz   = ', rn_maxfraz 
    574          WRITE(numout,*) '      Threshold relative drift speed for collection of frazil rn_vfraz     = ', rn_vfraz 
    575          WRITE(numout,*) '      Squeezing coefficient for collection of frazil          rn_Cfraz     = ', rn_Cfraz 
    576          WRITE(numout,*) '   -- icestp --' 
    577          WRITE(numout,*) '      Multicategory heat flux formulation                     nn_iceflx    = ', nn_iceflx 
     557         WRITE(numout,*) 'ice_thd_init: Ice Thermodynamics' 
     558         WRITE(numout,*) '~~~~~~~~~~~~' 
     559         WRITE(numout,*) '   Namelist namthd:' 
     560         WRITE(numout,*) '      activate ice thick change from top/bot (T) or not (F)   ln_icedH  = ', ln_icedH 
     561         WRITE(numout,*) '      activate lateral melting (T) or not (F)                 ln_icedA  = ', ln_icedA 
     562         WRITE(numout,*) '      activate ice growth in open-water (T) or not (F)        ln_icedO  = ', ln_icedO 
     563         WRITE(numout,*) '      activate gravity drainage and flushing (T) or not (F)   ln_icedS  = ', ln_icedS 
     564     ENDIF 
     565      ! 
     566                       CALL ice_thd_zdf_init   ! set ice heat diffusion parameters 
     567      IF( ln_icedA )   CALL ice_thd_da_init    ! set ice lateral melting parameters 
     568      IF( ln_icedO )   CALL ice_thd_do_init    ! set ice growth in open water parameters 
     569                       CALL ice_thd_sal_init   ! set ice salinity parameters 
     570      ! 
     571      IF( ln_icedS .AND. nn_icesal == 1 ) THEN 
     572         ln_icedS = .FALSE. 
     573         CALL ctl_warn('ln_icedS is set to false since constant ice salinity is chosen (nn_icesal=1)') 
    578574      ENDIF 
    579       ! 
    580       IF ( ( ln_cndi_U64 .AND. ln_cndi_P07 ) .OR. ( .NOT.ln_cndi_U64 .AND. .NOT.ln_cndi_P07 ) ) THEN 
    581          CALL ctl_stop( 'ice_thd_init: choose one and only one formulation for thermal conductivity (ln_cndi_U64 or ln_cndi_P07)' ) 
    582       ENDIF 
    583       ! 
    584       IF ( rn_hinew < rn_himin )   CALL ctl_stop( 'ice_thd_init : rn_hinew should be >= rn_himin' ) 
    585       ! 
    586       IF(lwp) WRITE(numout,*) 
    587       SELECT CASE( nn_iceflx )         ! LIM3 Multi-category heat flux formulation 
    588       CASE( -1  ) 
    589          IF(lwp) WRITE(numout,*) '   LIM3: use per-category fluxes (nn_iceflx = -1) ' 
    590          IF( ln_cpl )   CALL ctl_stop( 'ice_thd_init : the chosen nn_iceflx for LIM3 in coupled mode must be 0 or 2' ) 
    591       CASE(  0  ) 
    592          IF(lwp) WRITE(numout,*) '   LIM3: use average per-category fluxes (nn_iceflx = 0) ' 
    593       CASE(  1  ) 
    594          IF(lwp) WRITE(numout,*) '   LIM3: use average then redistribute per-category fluxes (nn_iceflx = 1) ' 
    595          IF( ln_cpl )   CALL ctl_stop( 'ice_thd_init : the chosen nn_iceflx for LIM3 in coupled mode must be 0 or 2' ) 
    596       CASE(  2  ) 
    597          IF(lwp) WRITE(numout,*) '   LIM3: Redistribute a single flux over categories (nn_iceflx = 2) ' 
    598          IF( .NOT. ln_cpl )   CALL ctl_stop( 'ice_thd_init : the chosen nn_iceflx for LIM3 in forced mode cannot be 2' ) 
    599       CASE DEFAULT 
    600          CALL ctl_stop( 'ice_thd_init: LIM3 option, nn_iceflx, should be between -1 and 2' ) 
    601       END SELECT 
    602575      ! 
    603576   END SUBROUTINE ice_thd_init 
Note: See TracChangeset for help on using the changeset viewer.