| 15 | |
| 16 | Step 1: New interface to read namelists |
| 17 | A new way to read namelist variables has been implemented. Instead of reading one namelist with a sequence like: |
| 18 | |
| 19 | {{{ |
| 20 | REWIND ( numnam ) |
| 21 | READ( numnam, namctl ) |
| 22 | }}} |
| 23 | the new interface looks like: |
| 24 | |
| 25 | {{{ |
| 26 | REWIND( numnam_ref ) ! Namelist namctl in reference namelist : Control prints & Benchmark |
| 27 | READ ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) |
| 28 | 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in reference namelist', lwp ) |
| 29 | |
| 30 | REWIND( numnam_cfg ) ! Namelist namctl in confguration namelist : Control prints & Benchmark |
| 31 | READ ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) |
| 32 | 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist', lwp ) |
| 33 | WRITE( numond, namctl ) |
| 34 | |
| 35 | }}} |
| 36 | '''More details:''' |
| 37 | |
| 38 | |
| 39 | '''To read the namelist variables:''' |
| 40 | - a reference namelist is read first (this namelist_ref file is unique, located in CONFIG/SHARED directory, contains all the variables and is in read-only mode) |
| 41 | - a configuration namelist is read afterwards, only to overwrite the defaults values read from the reference namelist (this one is specific, short and located in EXP00) |
| 42 | |
| 43 | '''To deal with errors while reading:''' |
| 44 | A new ctl_nam subroutine has been implemented in lib_mpp.F90 to deal with erros and print them in ocean.output if needed |
| 45 | |
| 46 | '''To check the values of namelist variables''' |
| 47 | A new output.namelist, output_namelist_ice... output files are created: each time a namelist group_name is read, is it wirttin (ascii) in the output_namelist corresponding file, so that this file, created at execution time, contains all namelist avriables and their values as taken in account during the simulation. |
| 48 | |
| 49 | Done in the source code and in all EXP00 reference configurations, and in CONFIG/SHARED, see revision 3875 |