Opened 3 years ago
Closed 3 years ago
#2486 closed Defect (fixed)
Fixing irregularities revealed by namelist integrity checks
Reported by: | acc | Owned by: | acc |
---|---|---|---|
Priority: | low | Milestone: | 2020 WP |
Component: | MULTIPLE | Version: | v4.0.* |
Severity: | minor | Keywords: | |
Cc: |
Description
Context
The application of namelist integrity checking tools to 4.0-HEAD@13089 revealed several irregularities that this ticket seeks to address. Most are resolved with trivial changes but a couple of the changes proposed here should be reviewed by those more familiar with those parts of the code. Namely the changes to the PISCES reference namelist and to the stochastic parameterisation module.
Analysis
Firstly, there are two changes to the code base to replace valid code with code more conformant with the conventions used elsewhere. These are merely to allow the namelist integrity checks to correctly identify namelists.
The first is uncontroversial and merely inserts a leading ampersand on a continuation line:
-
OCE/SBC/sbcwave.F90
391 391 & sn_tauwoc, sn_tauwx, sn_tauwy ! informations about the fields to be read 392 392 ! 393 393 NAMELIST/namsbc_wave/ sn_cdg, cn_dir, sn_usd, sn_vsd, sn_hsw, sn_wmp, sn_wfr, & 394 394 & sn_wnum, sn_tauwoc, sn_tauwx, sn_tauwy 395 395 !!--------------------------------------------------------------------- 396 396 ! 397 397 REWIND( numnam_ref ) ! Namelist namsbc_wave in reference namelist : File for drag coeff. from wave model
The second should also be uncontroversial unless there was an obscure reason for appending to the namelist in the manner used uniquely in bdydta.F90 (alignment of variables? Problems with a particular compiler?). Otherwise, the proposal is to replace the multiple declarations with a single declaration and continuation lines:
-
OCE/BDY/bdydta.F90
395 395 TYPE(FLD_N), DIMENSION(:), POINTER :: bn_alias ! must be an array to be used with fld_fill 396 396 TYPE(FLD ), DIMENSION(:), POINTER :: bf_alias 397 397 ! 398 NAMELIST/nambdy_dta/ cn_dir, bn_tem, bn_sal, bn_u3d, bn_v3d, bn_ssh, bn_u2d, bn_v2d 399 NAMELIST/nambdy_dta/ bn_a_i, bn_h_i, bn_h_s, bn_t_i, bn_t_s, bn_tsu, bn_s_i, bn_aip, bn_hip400 NAMELIST/nambdy_dta/ rn_ice_tem, rn_ice_sal, rn_ice_age, rn_ice_apnd, rn_ice_hpnd401 NAMELIST/nambdy_dta/ln_full_vel, ln_zinterp398 NAMELIST/nambdy_dta/ cn_dir, bn_tem, bn_sal, bn_u3d, bn_v3d, bn_ssh, bn_u2d, bn_v2d, & 399 & bn_a_i, bn_h_i, bn_h_s, bn_t_i, bn_t_s, bn_tsu, bn_s_i, bn_aip, bn_hip, & 400 & rn_ice_tem, rn_ice_sal, rn_ice_age, rn_ice_apnd, rn_ice_hpnd, & 401 & ln_full_vel, ln_zinterp 402 402 !!--------------------------------------------------------------------------- 403 403 ! 404 404 IF(lwp) WRITE(numout,*)
With these changes the namelist integrity checks reveal the issues shown in part 3 of:
Namelist checks
Many of the issues flagged relating to derived type variables (sn*) or array varaibles are not real issues. They are flagged simply because only the derived type name or array name appears in the namelist declaration but individual elements are set in the namelists. Ignoring these items there are still the following issues to be addressed:
Recommendation
OCE
ln_rnf_icb declared in namsbc_rnf (sbcrnf.F90) with no namelist_ref entry sn_i_rnf declared in namsbc_rnf (sbcrnf.F90) with no namelist_ref entry ln_time_average_weight declared in namberg (icb_oce.F90, icbini.F90) with no namelist_ref entry a large block of 23 variables declared in namsto (stopar.F90) with no namelist_ref entries
The first two of these are related and seem to be a simple omission. The proposed change is to add them to the namelist_ref:
-
SHARED/namelist_ref
416 416 rn_rnf_max = 5.735e-4 ! max value of the runoff climatologie over global domain ( ln_rnf_depth_ini = .true ) 417 417 rn_dep_max = 150. ! depth over which runoffs is spread ( ln_rnf_depth_ini = .true ) 418 418 nn_rnf_depth_file = 0 ! create (=1) a runoff depth file or not (=0) 419 ln_rnf_icb = .false. ! read in iceberg flux from a file (fill sn_i_rnf if .true.) 419 420 420 421 cn_dir = './' ! root directory for the runoff data location 421 422 !___________!_________________________!___________________!___________!_____________!________!___________!__________________!__________!_______________! … … 426 427 sn_s_rnf = 'runoffs' , 24. , 'rosaline', .true. , .true. , 'yearly' , '' , '' , '' 427 428 sn_t_rnf = 'runoffs' , 24. , 'rotemper', .true. , .true. , 'yearly' , '' , '' , '' 428 429 sn_dep_rnf = 'runoffs' , 0. , 'rodepth' , .false. , .true. , 'yearly' , '' , '' , '' 430 sn_i_rnf = 'NOT_USED' , -1. , 'sorunoff', .true. , .true. , 'yearly' , '' , '' , '' 429 431 / 430 432 !----------------------------------------------------------------------- 431 433 &namsbc_apr ! Atmospheric pressure used as ocean forcing (ln_apr_dyn =T)
The next variable is a logical switch which has no code to activate and no explanation of its intention. The proposed change is to remove it:
-
OCE/ICB/icb_oce.F90
121 121 REAL(wp), PUBLIC :: rn_sicn_shift !: Shift of sea-ice concentration in erosion flux modulation (0<sicn_shift<1) 122 122 LOGICAL , PUBLIC :: ln_operator_splitting !: Use first order operator splitting for thermodynamics 123 123 LOGICAL , PUBLIC :: ln_passive_mode !: iceberg - ocean decoupling 124 LOGICAL , PUBLIC :: ln_time_average_weight !: Time average the weight on the ocean !!gm I don't understand that !125 124 REAL(wp), PUBLIC :: rn_speed_limit !: CFL speed limit for a berg 126 125 ! 127 126 ! ! Mass thresholds between iceberg classes [kg] -
OCE/ICB/icbini.F90
381 381 & rn_distribution, rn_mass_scaling, rn_initial_thickness, nn_verbose_write , & 382 382 & rn_rho_bergs , rn_LoW_ratio , nn_verbose_level , ln_operator_splitting, & 383 383 & rn_bits_erosion_fraction , rn_sicn_shift , ln_passive_mode , & 384 & ln_time_average_weight , nn_test_icebergs , rn_test_box, &385 & ln_use_calving ,rn_speed_limit , cn_dir, sn_icb384 & nn_test_icebergs , rn_test_box , ln_use_calving , & 385 & rn_speed_limit , cn_dir, sn_icb 386 386 !!---------------------------------------------------------------------- 387 387 388 388 #if defined key_agrif … … 467 467 & '(0<sicn_shift<1) rn_sicn_shift = ', rn_sicn_shift 468 468 WRITE(numout,*) ' Do not add freshwater flux from icebergs to ocean ', & 469 469 & ' passive_mode = ', ln_passive_mode 470 WRITE(numout,*) ' Time average the weight on the ocean time_average_weight = ', ln_time_average_weight471 470 WRITE(numout,*) ' Create icebergs in absence of a restart file nn_test_icebergs = ', nn_test_icebergs 472 471 WRITE(numout,*) ' in lon/lat box = ', rn_test_box 473 472 WRITE(numout,*) ' Use calving data even if nn_test_icebergs > 0 ln_use_calving = ', ln_use_calving
The unused stochastic parameterisation variables present more of a dilemma. The entire namsto namelist declared in stopar.F90 is:
NAMELIST/namsto/ ln_sto_ldf, rn_ldf_std, rn_ldf_tcor, & & ln_sto_hpg, rn_hpg_std, rn_hpg_tcor, & & ln_sto_pstar, rn_pstar_std, rn_pstar_tcor, nn_pstar_flt, nn_pstar_ord, & & ln_sto_trd, rn_trd_std, rn_trd_tcor, & & ln_sto_eos, nn_sto_eos, rn_eos_stdxy, rn_eos_stdz, & & rn_eos_tcor, nn_eos_ord, nn_eos_flt, rn_eos_lim, & & ln_sto_trc, nn_sto_trc, rn_trc_stdxy, rn_trc_stdz, & & rn_trc_tcor, nn_trc_ord, nn_trc_flt, rn_trc_lim, & & ln_rststo, ln_rstseed, cn_storst_in, cn_storst_out
but of these only:
NAMELIST/namsto/ ln_sto_eos, nn_sto_eos, rn_eos_stdxy, rn_eos_stdz, & & rn_eos_tcor, nn_eos_ord, nn_eos_flt, rn_eos_lim, & & ln_rststo, ln_rstseed, cn_storst_in, cn_storst_out
are reported to ocean.output. The intent seems to be to limit access to only these options but the other options could be activated via the namelist and will activate code within the stochastic parameterisation module. The proposed change here is to properly disable the other options by:
-
OCE/STO/stopar.F90
244 244 !! 245 245 !! ** Purpose : define the stochastic parameterization 246 246 !!---------------------------------------------------------------------- 247 NAMELIST/namsto/ ln_sto_ldf, rn_ldf_std, rn_ldf_tcor, & 248 & ln_sto_hpg, rn_hpg_std, rn_hpg_tcor, & 249 & ln_sto_pstar, rn_pstar_std, rn_pstar_tcor, nn_pstar_flt, nn_pstar_ord, & 250 & ln_sto_trd, rn_trd_std, rn_trd_tcor, & 251 & ln_sto_eos, nn_sto_eos, rn_eos_stdxy, rn_eos_stdz, & 252 & rn_eos_tcor, nn_eos_ord, nn_eos_flt, rn_eos_lim, & 253 & ln_sto_trc, nn_sto_trc, rn_trc_stdxy, rn_trc_stdz, & 254 & rn_trc_tcor, nn_trc_ord, nn_trc_flt, rn_trc_lim, & 247 ! stochastic equation of state only (for now) 248 NAMELIST/namsto/ ln_sto_eos, nn_sto_eos, rn_eos_stdxy, rn_eos_stdz, & 249 & rn_eos_tcor, nn_eos_ord, nn_eos_flt, rn_eos_lim, & 255 250 & ln_rststo, ln_rstseed, cn_storst_in, cn_storst_out 251 !NAMELIST/namsto/ ln_sto_ldf, rn_ldf_std, rn_ldf_tcor, & 252 ! & ln_sto_hpg, rn_hpg_std, rn_hpg_tcor, & 253 ! & ln_sto_pstar, rn_pstar_std, rn_pstar_tcor, nn_pstar_flt, nn_pstar_ord, & 254 ! & ln_sto_trd, rn_trd_std, rn_trd_tcor, & 255 ! & ln_sto_trc, nn_sto_trc, rn_trc_stdxy, rn_trc_stdz, & 256 ! & rn_trc_tcor, nn_trc_ord, nn_trc_flt, rn_trc_lim 256 257 !!---------------------------------------------------------------------- 257 258 INTEGER :: jsto, jmem, jarea, jdof, jord, jordm1, jk, jflt 258 259 INTEGER(KIND=8) :: zseed1, zseed2, zseed3, zseed4 … … 260 261 INTEGER :: ios ! Local integer output status for namelist read 261 262 262 263 ! Read namsto namelist : stochastic parameterization 263 REWIND( numnam_ref ) ! Namelist nam dyn_adv in reference namelist : Momentum advection scheme264 REWIND( numnam_ref ) ! Namelist namsto in reference namelist : stochastic parameterization 264 265 READ ( numnam_ref, namsto, IOSTAT = ios, ERR = 901) 265 266 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsto in reference namelist' ) 266 267 267 REWIND( numnam_cfg ) ! Namelist nam dyn_adv in configuration namelist : Momentum advection scheme268 REWIND( numnam_cfg ) ! Namelist namsto in configuration namelist : stochastic parameterization 268 269 READ ( numnam_cfg, namsto, IOSTAT = ios, ERR = 902 ) 269 270 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsto in configuration namelist' ) 270 271 IF(lwm) WRITE ( numond, namsto )
TOP
The issues found in the TOP code reduce to just two mis-spelt variables and two missing default settings in namelist_top_ref. In fact the two missing character strings don't seem to have defaults set in the code either so the choice made here should be verified:
-
namelist_top_ref
121 121 nn_trd_trc = 5475 ! time step frequency and tracers trends 122 122 nn_ctls_trc = 0 ! control surface type in mixed-layer trends (0,1 or n<jpk) 123 123 rn_ucf_trc = 1 ! unit conversion factor (=1 -> /seconds ; =86400. -> /day) 124 ln_trdmld_trc_restart = .false. ! restart for ML diagnostics 125 ln_trdmld_trc_instant = .true. ! flag to diagnose trends of instantantaneous or mean ML T/S 124 ln_trdmxl_trc_restart = .false. ! restart for ML diagnostics 125 ln_trdmxl_trc_instant = .true. ! flag to diagnose trends of instantantaneous or mean ML T/S 126 cn_trdrst_trc_in = 'restart_trd' ! suffix of pass. tracer trends restart name (input) 127 cn_trdrst_trc_out = 'restart_trd' ! suffix of pass. tracer trends restart name (output) 126 128 ln_trdtrc( 1) = .true. 127 129 ln_trdtrc( 2) = .true. 128 130 ln_trdtrc(23) = .true.
PISCES
The issues found in PISCES are just two mis-spelt variables. Because there are many variables sharing names between the p4z and p5z versions it isn't immediately obvious what the correct choices are. The changes proposed here are a best guess but both the choice of variable and the validity of the default value should be verified:
-
namelist_pisces_ref
196 196 wchldm = 0.02 ! maximum quadratic mortality of diatoms 197 197 mpratn = 0.01 ! nanophytoplankton mortality rate 198 198 mpratp = 0.01 ! picophytoplankton mortality rate 199 mprat 2= 0.01 ! Diatoms mortality rate199 mpratd = 0.01 ! Diatoms mortality rate 200 200 / 201 201 !----------------------------------------------------------------------- 202 202 &namp4zmes ! parameters for mesozooplankton for PISCES std - ln_p4z … … 229 229 bmetexc2 = .true. ! Metabolic use of excess carbon 230 230 resrat2 = 0.005 ! exsudation rate of mesozooplankton 231 231 mzrat2 = 0.02 ! mesozooplankton mortality rate 232 xpref2d = 1. ! zoo preference for phyto233 xpref2 p = 1. ! zoo preference for POC232 xpref2d = 1. ! zoo preference for Diatoms 233 xpref2n = 1. ! zoo preference for nanophyto 234 234 xpref2z = 1. ! zoo preference for zoo 235 xpref2m = 0.2 ! meso preference forzoo236 xpref2c = 0.3 ! zoo preference for poc235 xpref2m = 0.2 ! zoo preference for mesozoo 236 xpref2c = 0.3 ! zoo preference for POC 237 237 xthresh2zoo = 1E-8 ! zoo feeding threshold for mesozooplankton 238 238 xthresh2dia = 1E-8 ! diatoms feeding threshold for mesozooplankton 239 239 xthresh2phy = 1E-8 ! nanophyto feeding threshold for mesozooplankton
Commit History (1)
Changeset | Author | Time | ChangeLog |
---|---|---|---|
13255 | acc | 2020-07-06T17:41:29+02:00 | r4.0-HEAD minor changes to satisfy namelist integrity checks. See #2486 and wiki:Developers/NamelistChecker for details. Fully SETTE tested |
Change History (2)
comment:1 Changed 3 years ago by acc
comment:2 Changed 3 years ago by acc
- Resolution set to fixed
- Status changed from new to closed
Submitted changes to rev13255. Ticket closed.
In 13255: