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 7 and Version 8 of Developers/NamelistChecker


Ignore:
Timestamp:
2020-06-05T17:31:50+02:00 (4 years ago)
Author:
acc
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Developers/NamelistChecker

    v7 v8  
    9797== Part 3 Checking reference namelist and source compatibility == 
    9898 
    99 The ''pseudo-namelist_ref'' produced this way should contain all the variables that can be set via namelists (at least for the 'blue ocean'). Treating the actual ''namelist_ref'' as a configuration namelist and checking its integrity against the pseudo version should confirm the validity of everything in the reference namelist, Surprisingly quite a few variables are flagged even for a fresh copy of r4.0-HEAD (Rev: 13029): 
     99The ''pseudo-namelist_ref'' produced this way should contain all the variables that can be set via namelists (at least for the 'blue ocean'). Treating the actual ''namelist_ref'' as a configuration namelist and checking its integrity against the pseudo version should confirm the validity of everything in the reference namelist.  
     100{{{ 
     101#!html 
     102<h3 style="text-align: left; color: red; background: yellow"> 
     103 Update:There is at least one namelist declared in the code with multiple declarations, namely: 
     104</h3> 
     105}}} 
     106 
     107{{{#!fortran 
     108      NAMELIST/nambdy_dta/ cn_dir, bn_tem, bn_sal, bn_u3d, bn_v3d, bn_ssh, bn_u2d, bn_v2d 
     109      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_hip 
     110      NAMELIST/nambdy_dta/ rn_ice_tem, rn_ice_sal, rn_ice_age, rn_ice_apnd, rn_ice_hpnd 
     111      NAMELIST/nambdy_dta/ ln_full_vel, ln_zinterp 
     112}}} 
     113 
     114The Perl script has been adapted to handle this but each entry will appear in the pseudo file as a separate block. These blocks should be combined by hand into a single block before running the integrity checks. 
     115 
     116Surprisingly a few variables are flagged even for a fresh copy of r4.0-HEAD (Rev: 13029): 
    100117 
    101118{{{ 
     
    106123No match for:  sn_tauwy  in  namsbc_wave  (at line no.  500 ) 
    107124No match for:  clname(1)  in  nam_tide  (at line no.  581 ) 
    108 No match for:  ln_zinterp  in  nambdy_dta  (at line no.  618 ) 
    109 No match for:  ln_full_vel  in  nambdy_dta  (at line no.  620 ) 
    110 No match for:  bn_a_i  in  nambdy_dta  (at line no.  635 ) 
    111 No match for:  bn_h_i  in  nambdy_dta  (at line no.  636 ) 
    112 No match for:  bn_h_s  in  nambdy_dta  (at line no.  637 ) 
    113 No match for:  bn_t_i  in  nambdy_dta  (at line no.  638 ) 
    114 No match for:  bn_t_s  in  nambdy_dta  (at line no.  639 ) 
    115 No match for:  bn_tsu  in  nambdy_dta  (at line no.  640 ) 
    116 No match for:  bn_s_i  in  nambdy_dta  (at line no.  641 ) 
    117 No match for:  bn_aip  in  nambdy_dta  (at line no.  643 ) 
    118 No match for:  bn_hip  in  nambdy_dta  (at line no.  644 ) 
    119 No match for:  rn_ice_tem  in  nambdy_dta  (at line no.  646 ) 
    120 No match for:  rn_ice_sal  in  nambdy_dta  (at line no.  647 ) 
    121 No match for:  rn_ice_age  in  nambdy_dta  (at line no.  648 ) 
    122 No match for:  rn_ice_apnd  in  nambdy_dta  (at line no.  649 ) 
    123 No match for:  rn_ice_hpnd  in  nambdy_dta  (at line no.  650 ) 
    124 No match for:  ln_zinterp  in  nambdy_dta  (at line no.  618 ) 
    125 No match for:  ln_full_vel  in  nambdy_dta  (at line no.  620 ) 
    126 No match for:  cn_dir  in  nambdy_dta  (at line no.  623 ) 
    127 No match for:  bn_ssh  in  nambdy_dta  (at line no.  627 ) 
    128 No match for:  bn_u2d  in  nambdy_dta  (at line no.  628 ) 
    129 No match for:  bn_v2d  in  nambdy_dta  (at line no.  629 ) 
    130 No match for:  bn_u3d  in  nambdy_dta  (at line no.  630 ) 
    131 No match for:  bn_v3d  in  nambdy_dta  (at line no.  631 ) 
    132 No match for:  bn_tem  in  nambdy_dta  (at line no.  632 ) 
    133 No match for:  bn_sal  in  nambdy_dta  (at line no.  633 ) 
    134 No match for:  bn_a_i  in  nambdy_dta  (at line no.  635 ) 
    135 No match for:  bn_h_i  in  nambdy_dta  (at line no.  636 ) 
    136 No match for:  bn_h_s  in  nambdy_dta  (at line no.  637 ) 
    137 No match for:  bn_t_i  in  nambdy_dta  (at line no.  638 ) 
    138 No match for:  bn_t_s  in  nambdy_dta  (at line no.  639 ) 
    139 No match for:  bn_tsu  in  nambdy_dta  (at line no.  640 ) 
    140 No match for:  bn_s_i  in  nambdy_dta  (at line no.  641 ) 
    141 No match for:  bn_aip  in  nambdy_dta  (at line no.  643 ) 
    142 No match for:  bn_hip  in  nambdy_dta  (at line no.  644 ) 
    143125No match for:  tname(1)  in  nam_diaharm  (at line no.  1188 ) 
    144126No match for:  tname(2)  in  nam_diaharm  (at line no.  1189 ) 
     
    156138}}} 
    157139 
    158 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 quite a few normal variables to investigate and this does illustrate the potential usefulness of this tool. 
     140It 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. 
    159141 
    160142Secondly, 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'':