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 10448 for NEMO/trunk/doc – NEMO

Changeset 10448 for NEMO/trunk/doc


Ignore:
Timestamp:
2018-12-21T17:43:27+01:00 (5 years ago)
Author:
nicolasmartin
Message:

Add case sensitive check for namelists parameters
We should clearly avoid using uppercase as it can only bring us further issues:

  • Uppercase does not provide any essential information
  • Fortran is case insensitive by default and convert all uppercase to lowercase
  • It generates collateral damage by adding more complexity, for instance when defining correct regular expression to match
File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/doc/bin/manuals_checking.sh

    r10443 r10448  
    5252 
    5353echo 
    54 echo '¤ Namelist parameters unfollowing naming conventions (^[cdlnr]n_*)' 
     54echo '¤ Namelist parameters unfollowing naming conventions (^[cdlnr]n_* or uppercase somewhere)' 
    5555 
    5656for nlst in $( ls namelists ); do 
    57     np_list=$( f90nml namelists/$nlst 2> /dev/null | awk '/=/ { print $1 }' ) 
     57    np_list=$( sed '/^ *[!/&]/d; s|[!/&].*||' namelists/$nlst | tr -d ' ' | cut -d= -f1 ) 
    5858    array=() 
    5959 
    6060    for np in ${np_list}; do 
    6161 
    62         if [[ ! ${np:0:3} =~ ^[cdlnr]n_$ ]]; then 
     62        if [[ ! ${np:0:3} =~ ^[cdlnr]n_$ || $( echo $np | grep [A-Z] ) ]]; then 
    6363            array+=$np' ' 
    6464        fi 
Note: See TracChangeset for help on using the changeset viewer.