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.
Developers/NamelistChecker (diff) – NEMO

Changes between Version 9 and Version 10 of Developers/NamelistChecker


Ignore:
Timestamp:
2020-06-08T15:51:58+02:00 (4 years ago)
Author:
acc
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Developers/NamelistChecker

    v9 v10  
    2323 * compare the contents lists for matching named blocks to confirm membership 
    2424 * report any mis-matches together with the line number in the configuration namelist 
     25 * where possible, suggest close matches that may indicate typos 
    2526 
    2627By default, the script will compare ''namelist_cfg'' and ''namelist_ref'' from the current directory. Alternative pairs can be named using the ''-c'' and ''-r'' command-line options: 
     
    3738  --cfg [CFGFILE], -c [CFGFILE]  configuration namelist 
    3839  --ref [REFFILE], -r [REFFILE]  reference namelist 
     40  --match [MFACTOR], -m [MFACTOR]   closeness factor (0-1) 
    3941}}} 
    4042 
     
    4345{{{ 
    4446python nemo_nml_check.py 
    45 No match for:  rn_rdt  in  namdom  (at line no.  39 ) 
     47No match in matching blocks for:                           |  Possible close match: 
     48rn_rdt                 in namdom       (at line no.   39)  |  rn_dt 
    4649}}} 
    4750 
     
    117120 
    118121{{{ 
    119 python nemo_nml_check.py -c namelist_ref -r pseudo_nml_ref  
    120 No match for:  sn_wnum  in  namsbc_wave  (at line no.  497 ) 
    121 No match for:  sn_tauwoc  in  namsbc_wave  (at line no.  498 ) 
    122 No match for:  sn_tauwx  in  namsbc_wave  (at line no.  499 ) 
    123 No match for:  sn_tauwy  in  namsbc_wave  (at line no.  500 ) 
    124 No match for:  clname(1)  in  nam_tide  (at line no.  581 ) 
    125 No match for:  tname(1)  in  nam_diaharm  (at line no.  1188 ) 
    126 No match for:  tname(2)  in  nam_diaharm  (at line no.  1189 ) 
    127 No match for:  sn_cfctl%l_config  in  namctl  (at line no.  1322 ) 
    128 No match for:  sn_cfctl%l_runstat  in  namctl  (at line no.  1323 ) 
    129 No match for:  sn_cfctl%l_trcstat  in  namctl  (at line no.  1324 ) 
    130 No match for:  sn_cfctl%l_oceout  in  namctl  (at line no.  1325 ) 
    131 No match for:  sn_cfctl%l_layout  in  namctl  (at line no.  1326 ) 
    132 No match for:  sn_cfctl%l_mppout  in  namctl  (at line no.  1327 ) 
    133 No match for:  sn_cfctl%l_mpptop  in  namctl  (at line no.  1328 ) 
    134 No match for:  sn_cfctl%procmin  in  namctl  (at line no.  1329 ) 
    135 No match for:  sn_cfctl%procmax  in  namctl  (at line no.  1330 ) 
    136 No match for:  sn_cfctl%procincr  in  namctl  (at line no.  1331 ) 
    137 No match for:  sn_cfctl%ptimincr  in  namctl  (at line no.  1332 ) 
    138 }}} 
    139  
    140 It is probably the case that the structure variables flagged (sn_*) are false positives. This is because only the structure name is declared in the namelist but individual members of the structure may be (and are) set in the ''namelist_ref''. Nonetheless, there are  a few normal variables to investigate and this does illustrate the potential usefulness of this tool. 
     122python nemo_nml_check.py -r pseudo_nml_ref -c namelist_ref -m 0.75 
     123No match in matching blocks for:                           |  Possible close match: 
     124sn_wnum                in namsbc_wave  (at line no.  497)  |  sn_wmp 
     125sn_tauwoc              in namsbc_wave  (at line no.  498)  | 
     126sn_tauwx               in namsbc_wave  (at line no.  499)  | 
     127sn_tauwy               in namsbc_wave  (at line no.  500)  | 
     128clname(1)              in nam_tide     (at line no.  581)  |  clname 
     129tname(1)               in nam_diaharm  (at line no. 1188)  |  tname 
     130tname(2)               in nam_diaharm  (at line no. 1189)  |  tname 
     131sn_cfctl%l_config      in namctl       (at line no. 1322)  | 
     132sn_cfctl%l_runstat     in namctl       (at line no. 1323)  | 
     133sn_cfctl%l_trcstat     in namctl       (at line no. 1324)  | 
     134sn_cfctl%l_oceout      in namctl       (at line no. 1325)  | 
     135sn_cfctl%l_layout      in namctl       (at line no. 1326)  | 
     136sn_cfctl%l_mppout      in namctl       (at line no. 1327)  | 
     137sn_cfctl%l_mpptop      in namctl       (at line no. 1328)  | 
     138sn_cfctl%procmin       in namctl       (at line no. 1329)  | 
     139sn_cfctl%procmax       in namctl       (at line no. 1330)  | 
     140sn_cfctl%procincr      in namctl       (at line no. 1331)  | 
     141sn_cfctl%ptimincr      in namctl       (at line no. 1332)  | 
     142}}} 
     143 
     144It is probably the case that the structure variables flagged (sn_*) are false positives. This is because only the structure name is declared in the namelist but individual members of the structure may be (and are) set in the ''namelist_ref''. Nonetheless, there are  a few normal variables to investigate and this does illustrate the potential usefulness of this tool. Note, the 'possible close matches' are provided by a simple string comparator. By default, only matches exceeding a closeness factor of 0.75 are reported. More (or fewer) possibilities can be provided by decreasing (or increasing) this factor between 0 and 1. This is done by providing the additional command line argument '-m fatc' as shown here (although it was unnecessary since 0.75 is the default value). 
    141145 
    142146Secondly, reversing the roles of the input namelists allows a check on whether or not all the available namelist variables have a default setting in ''namelist_ref'': 
     
    144148{{{ 
    145149python nemo_nml_check.py -r namelist_ref -c pseudo_nml_ref  
    146 No match for:  ln_rnf_icb  in  namsbc_rnf  (at line no.  169 ) 
    147 No match for:  sn_i_rnf  in  namsbc_rnf  (at line no.  172 ) 
    148 No match for:  clname  in  nam_tide  (at line no.  195 ) 
    149 No match for:  ln_time_average_weight  in  namberg  (at line no.  582 ) 
    150 No match for:  tname  in  nam_diaharm  (at line no.  814 ) 
    151 No match for:  sn_cfctl  in  namctl  (at line no.  949 ) 
    152 No match for:  ln_sto_ldf  in  namsto  (at line no.  1056 ) 
    153 No match for:  rn_ldf_std  in  namsto  (at line no.  1057 ) 
    154 No match for:  rn_ldf_tcor  in  namsto  (at line no.  1058 ) 
    155 No match for:  ln_sto_hpg  in  namsto  (at line no.  1059 ) 
    156 No match for:  rn_hpg_std  in  namsto  (at line no.  1060 ) 
    157 No match for:  rn_hpg_tcor  in  namsto  (at line no.  1061 ) 
    158 No match for:  ln_sto_pstar  in  namsto  (at line no.  1062 ) 
    159 No match for:  rn_pstar_std  in  namsto  (at line no.  1063 ) 
    160 No match for:  rn_pstar_tcor  in  namsto  (at line no.  1064 ) 
    161 No match for:  nn_pstar_flt  in  namsto  (at line no.  1065 ) 
    162 No match for:  nn_pstar_ord  in  namsto  (at line no.  1066 ) 
    163 No match for:  ln_sto_trd  in  namsto  (at line no.  1067 ) 
    164 No match for:  rn_trd_std  in  namsto  (at line no.  1068 ) 
    165 No match for:  rn_trd_tcor  in  namsto  (at line no.  1069 ) 
    166 No match for:  ln_sto_trc  in  namsto  (at line no.  1078 ) 
    167 No match for:  nn_sto_trc  in  namsto  (at line no.  1079 ) 
    168 No match for:  rn_trc_stdxy  in  namsto  (at line no.  1080 ) 
    169 No match for:  rn_trc_stdz  in  namsto  (at line no.  1081 ) 
    170 No match for:  rn_trc_tcor  in  namsto  (at line no.  1082 ) 
    171 No match for:  nn_trc_ord  in  namsto  (at line no.  1083 ) 
    172 No match for:  nn_trc_flt  in  namsto  (at line no.  1084 ) 
    173 No match for:  rn_trc_lim  in  namsto  (at line no.  1085 ) 
     150No match in matching blocks for:                           |  Possible close match: 
     151ln_rnf_icb             in namsbc_rnf   (at line no.  172)  | 
     152sn_i_rnf               in namsbc_rnf   (at line no.  175)  |  sn_t_rnf 
     153clname                 in nam_tide     (at line no.  198)  |  clname(1) 
     154ln_time_average_weight in namberg      (at line no.  594)  | 
     155tname                  in nam_diaharm  (at line no.  826)  |  tname(2) 
     156sn_cfctl               in namctl       (at line no.  984)  | 
     157ln_sto_ldf             in namsto       (at line no. 1100)  | 
     158rn_ldf_std             in namsto       (at line no. 1101)  | 
     159rn_ldf_tcor            in namsto       (at line no. 1102)  | 
     160ln_sto_hpg             in namsto       (at line no. 1103)  | 
     161rn_hpg_std             in namsto       (at line no. 1104)  | 
     162rn_hpg_tcor            in namsto       (at line no. 1105)  | 
     163ln_sto_pstar           in namsto       (at line no. 1106)  | 
     164rn_pstar_std           in namsto       (at line no. 1107)  | 
     165rn_pstar_tcor          in namsto       (at line no. 1108)  | 
     166nn_pstar_flt           in namsto       (at line no. 1109)  | 
     167nn_pstar_ord           in namsto       (at line no. 1110)  | 
     168ln_sto_trd             in namsto       (at line no. 1111)  | 
     169rn_trd_std             in namsto       (at line no. 1112)  | 
     170rn_trd_tcor            in namsto       (at line no. 1113)  | 
     171ln_sto_trc             in namsto       (at line no. 1122)  | 
     172nn_sto_trc             in namsto       (at line no. 1123)  | 
     173rn_trc_stdxy           in namsto       (at line no. 1124)  | 
     174rn_trc_stdz            in namsto       (at line no. 1125)  | 
     175rn_trc_tcor            in namsto       (at line no. 1126)  | 
     176nn_trc_ord             in namsto       (at line no. 1127)  | 
     177nn_trc_flt             in namsto       (at line no. 1128)  | 
     178rn_trc_lim             in namsto       (at line no. 1129)  | 
    174179}}} 
    175180 
     
    199204{{{ 
    200205python nemo_nml_check.py -c ../cfgs/SHARED/namelist_top_ref -r pseudo_nml_top_ref 
    201 No match for:  sn_trcdta(1)  in  namtrc_dta  (at line no.  61 ) 
    202 No match for:  ln_trdmld_trc_restart  in  namtrc_trd  (at line no.  124 ) 
    203 No match for:  ln_trdmld_trc_instant  in  namtrc_trd  (at line no.  125 ) 
    204 No match for:  ln_trdtrc( 1)  in  namtrc_trd  (at line no.  126 ) 
    205 No match for:  ln_trdtrc( 2)  in  namtrc_trd  (at line no.  127 ) 
    206 No match for:  ln_trdtrc(23)  in  namtrc_trd  (at line no.  128 ) 
    207  
     206No match in matching blocks for:                           |  Possible close match: 
     207sn_trcdta(1)           in namtrc_dta   (at line no.   61)  |  sn_trcdta 
     208ln_trdmld_trc_restart  in namtrc_trd   (at line no.  124)  |  ln_trdmxl_trc_restart 
     209ln_trdmld_trc_instant  in namtrc_trd   (at line no.  125)  |  ln_trdmxl_trc_instant 
     210ln_trdtrc( 1)          in namtrc_trd   (at line no.  126)  |  ln_trdtrc 
     211ln_trdtrc( 2)          in namtrc_trd   (at line no.  127)  |  ln_trdtrc 
     212ln_trdtrc(23)          in namtrc_trd   (at line no.  128)  |  ln_trdtrc 
    208213 
    209214python nemo_nml_check.py -r ../cfgs/SHARED/namelist_top_ref -c pseudo_nml_top_ref 
    210 No match for:  sn_trcobc  in  namtrc_bc  (at line no.  4 ) 
    211 No match for:  rn_trofac  in  namtrc_bc  (at line no.  5 ) 
    212 No match for:  sn_trcsbc  in  namtrc_bc  (at line no.  7 ) 
    213 No match for:  rn_trsfac  in  namtrc_bc  (at line no.  8 ) 
    214 No match for:  sn_trccbc  in  namtrc_bc  (at line no.  10 ) 
    215 No match for:  rn_trcfac  in  namtrc_bc  (at line no.  11 ) 
    216 No match for:  sn_tri_tracer  in  namtrc_ice  (at line no.  25 ) 
    217 No match for:  sn_tracer  in  namtrc  (at line no.  48 ) 
    218 No match for:  ln_trdmxl_trc_restart  in  namtrc_trd  (at line no.  59 ) 
    219 No match for:  ln_trdmxl_trc_instant  in  namtrc_trd  (at line no.  60 ) 
    220 No match for:  cn_trdrst_trc_in  in  namtrc_trd  (at line no.  61 ) 
    221 No match for:  cn_trdrst_trc_out  in  namtrc_trd  (at line no.  62 ) 
    222 No match for:  ln_trdtrc  in  namtrc_trd  (at line no.  63 ) 
    223 No match for:  sn_trcdta  in  namtrc_dta  (at line no.  67 ) 
    224 No match for:  rn_trfac  in  namtrc_dta  (at line no.  69 ) 
     215No match in matching blocks for:                           |  Possible close match: 
     216sn_trcobc              in namtrc_bc    (at line no.    4)  | 
     217rn_trofac              in namtrc_bc    (at line no.    5)  | 
     218sn_trcsbc              in namtrc_bc    (at line no.    7)  | 
     219rn_trsfac              in namtrc_bc    (at line no.    8)  | 
     220sn_trccbc              in namtrc_bc    (at line no.   10)  | 
     221rn_trcfac              in namtrc_bc    (at line no.   11)  | 
     222sn_tri_tracer          in namtrc_ice   (at line no.   25)  | 
     223sn_tracer              in namtrc       (at line no.   48)  | 
     224ln_trdmxl_trc_restart  in namtrc_trd   (at line no.   59)  |  ln_trdmld_trc_restart 
     225ln_trdmxl_trc_instant  in namtrc_trd   (at line no.   60)  |  ln_trdmld_trc_instant 
     226cn_trdrst_trc_in       in namtrc_trd   (at line no.   61)  | 
     227cn_trdrst_trc_out      in namtrc_trd   (at line no.   62)  | 
     228ln_trdtrc              in namtrc_trd   (at line no.   63)  |  nn_trd_trc 
     229sn_trcdta              in namtrc_dta   (at line no.   67)  |  sn_trcdta(1) 
     230rn_trfac               in namtrc_dta   (at line no.   69)  | 
    225231}}} 
    226232 
     
    236242{{{ 
    237243python nemo_nml_check.py -c ../cfgs/SHARED/namelist_pisces_ref -r pseudo_nml_pisces_ref 
    238 No match for:  mprat2  in  namp5zmort  (at line no.  199 ) 
    239 No match for:  xpref2p  in  namp5zmes  (at line no.  233 ) 
     244No match in matching blocks for:                           |  Possible close match: 
     245mprat2                 in namp5zmort   (at line no.  199)  |  mpratd 
     246xpref2p                in namp5zmes    (at line no.  233)  |  xpref2d 
    240247 
    241248python nemo_nml_check.py -r ../cfgs/SHARED/namelist_pisces_ref -c pseudo_nml_pisces_ref 
    242 No match for:  mpratd  in  namp5zmort  (at line no.  357 ) 
    243 No match for:  xpref2n  in  namp5zmes  (at line no.  398 ) 
     249No match in matching blocks for:                           |  Possible close match: 
     250mpratd                 in namp5zmort   (at line no.  357)  |  mprat2 
     251xpref2n                in namp5zmes    (at line no.  398)  |  xpref2c 
    244252}}} 
    245253