[6951] | 1 | MODULE in_out_manager |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE in_out_manager *** |
---|
| 4 | !! I/O manager utilities : Defines run parameters together with logical units |
---|
| 5 | !!===================================================================== |
---|
| 6 | !! History : 1.0 ! 2002-06 (G. Madec) original code |
---|
| 7 | !! 2.0 ! 2006-07 (S. Masson) iom, add ctl_stop, ctl_warn |
---|
| 8 | !! 3.0 ! 2008-06 (G. Madec) add ctmp4 to ctmp10 |
---|
| 9 | !! 3.2 ! 2009-08 (S. MAsson) add new ctl_opn |
---|
| 10 | !! 3.3 ! 2010-10 (A. Coward) add NetCDF4 usage |
---|
| 11 | !!---------------------------------------------------------------------- |
---|
| 12 | |
---|
| 13 | !!---------------------------------------------------------------------- |
---|
| 14 | USE par_oce ! ocean parameter |
---|
| 15 | USE nc4interface ! NetCDF4 interface |
---|
| 16 | |
---|
| 17 | IMPLICIT NONE |
---|
| 18 | PUBLIC |
---|
| 19 | |
---|
| 20 | !!---------------------------------------------------------------------- |
---|
| 21 | !! namrun namelist parameters |
---|
| 22 | !!---------------------------------------------------------------------- |
---|
| 23 | CHARACTER(lc) :: cn_exp !: experiment name used for output filename |
---|
| 24 | INTEGER :: nn_it000 !: index of the first time step |
---|
| 25 | INTEGER :: nn_itend !: index of the last time step |
---|
| 26 | INTEGER :: nn_date0 !: initial calendar date aammjj |
---|
| 27 | INTEGER :: nn_time0 !: initial time of day in hhmm |
---|
| 28 | INTEGER :: nn_leapy !: Leap year calendar flag (0/1 or 30) |
---|
| 29 | LOGICAL :: ln_mskland !: mask land points in NetCDF outputs (costly: + ~15%) |
---|
| 30 | LOGICAL :: ln_cfmeta !: output additional data to netCDF files required for compliance with the CF metadata standard |
---|
| 31 | LOGICAL :: ln_clobber !: clobber (overwrite) an existing file |
---|
| 32 | INTEGER :: nn_chunksz !: chunksize (bytes) for NetCDF file (works only with iom_nf90 routines) |
---|
[10727] | 33 | LOGICAL :: ln_xios_read !: use xios to read single file restart |
---|
| 34 | INTEGER :: nn_wxios !: write resart using xios 0 - no, 1 - single, 2 - multiple file output |
---|
| 35 | |
---|
| 36 | #if defined key_netcdf4 |
---|
| 37 | !!---------------------------------------------------------------------- |
---|
| 38 | !! namnc4 namelist parameters (key_netcdf4) |
---|
| 39 | !!---------------------------------------------------------------------- |
---|
| 40 | ! The following four values determine the partitioning of the output fields |
---|
| 41 | ! into netcdf4 chunks. They are unrelated to the nn_chunk_sz setting which is |
---|
| 42 | ! for runtime optimisation. The individual netcdf4 chunks can be optionally |
---|
| 43 | ! gzipped (recommended) leading to significant reductions in I/O volumes |
---|
| 44 | ! !!!** variables only used with iom_nf90 routines and key_netcdf4 ** |
---|
| 45 | INTEGER :: nn_nchunks_i !: number of chunks required in the i-dimension |
---|
| 46 | INTEGER :: nn_nchunks_j !: number of chunks required in the j-dimension |
---|
| 47 | INTEGER :: nn_nchunks_k !: number of chunks required in the k-dimension |
---|
| 48 | INTEGER :: nn_nchunks_t !: number of chunks required in the t-dimension |
---|
| 49 | LOGICAL :: ln_nc4zip !: netcdf4 usage: (T) chunk and compress output using the HDF5 sublayers of netcdf4 |
---|
| 50 | ! ! (F) ignore chunking request and use the netcdf4 library |
---|
| 51 | ! ! to produce netcdf3-compatible files |
---|
| 52 | #endif |
---|
| 53 | |
---|
[6951] | 54 | !$AGRIF_DO_NOT_TREAT |
---|
| 55 | TYPE(snc4_ctl) :: snc4set !: netcdf4 chunking control structure (always needed for decision making) |
---|
| 56 | !$AGRIF_END_DO_NOT_TREAT |
---|
| 57 | |
---|
| 58 | |
---|
| 59 | !! conversion of DOCTOR norm namelist name into model name |
---|
| 60 | !! (this should disappear in a near futur) |
---|
| 61 | |
---|
| 62 | CHARACTER(lc) :: cexper !: experiment name used for output filename |
---|
| 63 | INTEGER :: nit000 !: index of the first time step |
---|
| 64 | INTEGER :: nitend !: index of the last time step |
---|
| 65 | INTEGER :: ndate0 !: initial calendar date aammjj |
---|
| 66 | INTEGER :: nleapy !: Leap year calendar flag (0/1 or 30) |
---|
| 67 | |
---|
| 68 | !!---------------------------------------------------------------------- |
---|
| 69 | !! logical units |
---|
| 70 | !!---------------------------------------------------------------------- |
---|
| 71 | INTEGER :: numstp = -1 !: logical unit for time step |
---|
| 72 | INTEGER :: numtime = -1 !: logical unit for timing |
---|
[10727] | 73 | INTEGER :: numout = 6 !: logical unit for output print; Set to stdout to ensure any |
---|
| 74 | INTEGER :: numnul = -1 !: logical unit for /dev/null |
---|
| 75 | ! ! early output can be collected; do not change |
---|
[6951] | 76 | INTEGER :: numnam_ref = -1 !: logical unit for reference namelist |
---|
| 77 | INTEGER :: numnam_cfg = -1 !: logical unit for configuration specific namelist |
---|
| 78 | INTEGER :: numond = -1 !: logical unit for Output Namelist Dynamics |
---|
| 79 | INTEGER :: numoni = -1 !: logical unit for Output Namelist Ice |
---|
[10727] | 80 | INTEGER :: numrun = -1 !: logical unit for run statistics |
---|
[6951] | 81 | |
---|
| 82 | !!---------------------------------------------------------------------- |
---|
| 83 | !! Run control |
---|
| 84 | !!---------------------------------------------------------------------- |
---|
[10727] | 85 | INTEGER :: no_print = 0 !: optional argument of fld_fill (if present, suppress some control print) |
---|
[6951] | 86 | INTEGER :: nstop = 0 !: error flag (=number of reason for a premature stop run) |
---|
| 87 | INTEGER :: nwarn = 0 !: warning flag (=number of warning found during the run) |
---|
| 88 | CHARACTER(lc) :: ctmp1, ctmp2, ctmp3 !: temporary characters 1 to 3 |
---|
| 89 | CHARACTER(lc) :: ctmp4, ctmp5, ctmp6 !: temporary characters 4 to 6 |
---|
| 90 | CHARACTER(lc) :: ctmp7, ctmp8, ctmp9 !: temporary characters 7 to 9 |
---|
| 91 | CHARACTER(lc) :: ctmp10 !: temporary character 10 |
---|
| 92 | CHARACTER(lc) :: cform_err = "(/,' ===>>> : E R R O R', /,' ===========',/)" !: |
---|
| 93 | CHARACTER(lc) :: cform_war = "(/,' ===>>> : W A R N I N G', /,' ===============',/)" !: |
---|
| 94 | LOGICAL :: lwm = .FALSE. !: boolean : true on the 1st processor only (always) |
---|
| 95 | LOGICAL :: lwp = .FALSE. !: boolean : true on the 1st processor only .OR. ln_ctl |
---|
[10727] | 96 | CHARACTER(lc) :: cxios_context !: context name used in xios |
---|
| 97 | CHARACTER(lc) :: crxios_context !: context name used in xios to read restart |
---|
| 98 | CHARACTER(lc) :: cwxios_context !: context name used in xios to write restart file |
---|
[6951] | 99 | |
---|
| 100 | !!---------------------------------------------------------------------- |
---|
[9598] | 101 | !! NEMO/OCE 4.0 , NEMO Consortium (2018) |
---|
[10727] | 102 | !! $Id: in_out_manager.F90 10570 2019-01-24 15:14:49Z acc $ |
---|
| 103 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
[6951] | 104 | !!===================================================================== |
---|
| 105 | END MODULE in_out_manager |
---|