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.
in_out_manager.F90 in branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/IOM – NEMO

source: branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90 @ 11101

Last change on this file since 11101 was 11101, checked in by frrh, 5 years ago

Merge changes from Met Office GMED ticket 450 to reduce unnecessary
text output from NEMO.
This output, which is typically not switchable, is rarely of interest
in normal (non-debugging) runs and simply redunantley consumes extra
file space.
Further, the presence of this text output has been shown to
significantly degrade performance of models which are run during
Met Office HPC RAID (disk) checks.
The new code introduces switches which are configurable via the
changes made in the associated Met Office MOCI ticket 399.

File size: 12.3 KB
Line 
1MODULE 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 lib_print     ! formated print library
16   USE nc4interface  ! NetCDF4 interface
17
18   IMPLICIT NONE
19   PUBLIC
20
21 
22   !
23   !!----------------------------------------------------------------------
24   !!                   namrun namelist parameters
25   !!----------------------------------------------------------------------
26   CHARACTER(lc) ::   cn_exp           !: experiment name used for output filename
27   CHARACTER(lc) ::   cn_ocerst_in     !: suffix of ocean restart name (input)
28   CHARACTER(lc) ::   cn_ocerst_indir  !: restart input directory
29   CHARACTER(lc) ::   cn_ocerst_out    !: suffix of ocean restart name (output)
30   CHARACTER(lc) ::   cn_ocerst_outdir !: restart output directory
31   LOGICAL       ::   ln_rstart        !: start from (F) rest or (T) a restart file
32   LOGICAL       ::   ln_rstdate       !: datestamping of restarts
33   LOGICAL       ::   ln_rst_list      !: output restarts at list of times (T) or by frequency (F)
34   INTEGER       ::   nn_no            !: job number
35   INTEGER       ::   nn_rstctl        !: control of the time step (0, 1 or 2)
36   INTEGER       ::   nn_rstssh   = 0  !: hand made initilization of ssh or not (1/0)
37   INTEGER       ::   nn_it000         !: index of the first time step
38   INTEGER       ::   nn_itend         !: index of the last time step
39   INTEGER       ::   nn_date0         !: initial calendar date aammjj
40   INTEGER       ::   nn_leapy         !: Leap year calendar flag (0/1 or 30)
41   INTEGER       ::   nn_istate        !: initial state output flag (0/1)
42   INTEGER       ::   nn_write         !: model standard output frequency
43   INTEGER       ::   nn_stock         !: restart file frequency
44   INTEGER, DIMENSION(10) :: nn_stocklist  !: restart dump times
45   LOGICAL       ::   ln_dimgnnn       !: type of dimgout. (F): 1 file for all proc
46                                                       !:                  (T): 1 file per proc
47   LOGICAL       ::   ln_mskland       !: mask land points in NetCDF outputs (costly: + ~15%)
48   LOGICAL       ::   ln_cfmeta        !: output additional data to netCDF files required for compliance with the CF metadata standard
49   LOGICAL       ::   ln_clobber       !: clobber (overwrite) an existing file
50   INTEGER       ::   nn_chunksz       !: chunksize (bytes) for NetCDF file (works only with iom_nf90 routines)
51#if defined key_netcdf4
52   !!----------------------------------------------------------------------
53   !!                   namnc4 namelist parameters                         (key_netcdf4)
54   !!----------------------------------------------------------------------
55   ! The following four values determine the partitioning of the output fields
56   ! into netcdf4 chunks. They are unrelated to the nn_chunk_sz setting which is
57   ! for runtime optimisation. The individual netcdf4 chunks can be optionally
58   ! gzipped (recommended) leading to significant reductions in I/O volumes
59   !                         !!!**  variables only used with iom_nf90 routines and key_netcdf4 **
60   INTEGER ::   nn_nchunks_i   !: number of chunks required in the i-dimension
61   INTEGER ::   nn_nchunks_j   !: number of chunks required in the j-dimension
62   INTEGER ::   nn_nchunks_k   !: number of chunks required in the k-dimension
63   INTEGER ::   nn_nchunks_t   !: number of chunks required in the t-dimension
64   LOGICAL ::   ln_nc4zip      !: netcdf4 usage: (T) chunk and compress output using the HDF5 sublayers of netcdf4
65   !                           !                 (F) ignore chunking request and use the netcdf4 library
66   !                           !                     to produce netcdf3-compatible files
67#endif
68!$AGRIF_DO_NOT_TREAT
69   TYPE(snc4_ctl)     :: snc4set        !: netcdf4 chunking control structure (always needed for decision making)
70!$AGRIF_END_DO_NOT_TREAT
71
72
73   !! conversion of DOCTOR norm namelist name into model name
74   !! (this should disappear in a near futur)
75
76   CHARACTER(lc) ::   cexper                      !: experiment name used for output filename
77   INTEGER       ::   no                          !: job number
78   INTEGER       ::   nrstdt                      !: control of the time step (0, 1 or 2)
79   INTEGER       ::   nit000                      !: index of the first time step
80   INTEGER       ::   nitend                      !: index of the last time step
81   INTEGER       ::   ndate0                      !: initial calendar date aammjj
82   INTEGER       ::   nleapy                      !: Leap year calendar flag (0/1 or 30)
83   INTEGER       ::   ninist                      !: initial state output flag (0/1)
84   INTEGER       ::   nwrite                      !: model standard output frequency
85   INTEGER       ::   nstock                      !: restart file frequency
86   INTEGER, DIMENSION(10) :: nstocklist           !: restart dump times
87
88   !!----------------------------------------------------------------------
89   !! was in restart but moved here because of the OFF line... better solution should be found...
90   !!----------------------------------------------------------------------
91   INTEGER ::   nitrst                !: time step at which restart file should be written
92   LOGICAL ::   lrst_oce              !: logical to control the oce restart write
93   INTEGER ::   numror = 0            !: logical unit for ocean restart (read). Init to 0 is needed for SAS (in daymod.F90)
94   INTEGER ::   numrow                !: logical unit for ocean restart (write)
95   INTEGER ::   nrst_lst              !: number of restart to output next
96
97   !!----------------------------------------------------------------------
98   !!                    output monitoring
99   !!----------------------------------------------------------------------
100   LOGICAL ::   ln_ctl       !: run control for debugging
101   TYPE :: sn_ctl                !: optional use structure for finer control over output selection
102      LOGICAL :: l_config  = .FALSE.  !: activate/deactivate finer control
103                                      !  Note if l_config is True then ln_ctl is ignored.
104                                      !  Otherwise setting ln_ctl True is equivalent to setting
105                                      !  all the following logicals in this structure True
106      LOGICAL :: l_runstat = .FALSE.  !: Produce/do not produce run.stat file (T/F)
107      LOGICAL :: l_trcstat = .FALSE.  !: Produce/do not produce tracer.stat file (T/F)
108      LOGICAL :: l_oceout  = .FALSE.  !: Produce all ocean.outputs    (T) or just one (F)
109      LOGICAL :: l_layout  = .FALSE.  !: Produce all layout.dat files (T) or just one (F)
110      LOGICAL :: l_mppout  = .FALSE.  !: Produce/do not produce mpp.output_XXXX files (T/F)
111      LOGICAL :: l_mpptop  = .FALSE.  !: Produce/do not produce mpp.top.output_XXXX files (T/F)
112                                      !  Optional subsetting of processor report files
113                                      !  Default settings of 0/1000000/1 should ensure all areas report.
114                                      !  Set to a more restrictive range to select specific areas
115      INTEGER :: procmin   = 0        !: Minimum narea to output
116      INTEGER :: procmax   = 1000000  !: Maximum narea to output
117      INTEGER :: procincr  = 1        !: narea increment to output
118      INTEGER :: ptimincr  = 1        !: timestep increment to output (time.step and run.stat)
119   END TYPE
120   TYPE(sn_ctl) :: sn_cfctl     !: run control structure for selective output
121   INTEGER ::   nn_timing    !: run control for timing
122   INTEGER ::   nn_print     !: level of print (0 no print)
123   INTEGER ::   nn_ictls     !: Start i indice for the SUM control
124   INTEGER ::   nn_ictle     !: End   i indice for the SUM control
125   INTEGER ::   nn_jctls     !: Start j indice for the SUM control
126   INTEGER ::   nn_jctle     !: End   j indice for the SUM control
127   INTEGER ::   nn_isplt     !: number of processors following i
128   INTEGER ::   nn_jsplt     !: number of processors following j
129   INTEGER ::   nn_bench     !: benchmark parameter (0/1)
130   INTEGER ::   nn_bit_cmp   =    0    !: bit reproducibility  (0/1)
131   LOGICAL ::   ln_flush     !: namelist flush numout after write statement
132   !                                         
133   LOGICAL ::   lflush       !: flush numout after write statement
134   INTEGER ::   nprint, nictls, nictle, njctls, njctle, isplt, jsplt, nbench    !: OLD namelist names
135
136   INTEGER ::   ijsplt     =    1      !: nb of local domain = nb of processors
137
138   !!----------------------------------------------------------------------
139   !!                        logical units
140   !!----------------------------------------------------------------------
141   INTEGER ::   numstp          =   -1      !: logical unit for time step
142   INTEGER ::   numtime         =   -1      !: logical unit for timing
143   INTEGER ::   numout          =    6      !: logical unit for output print; Set to stdout to ensure any early
144                                            !  output can be collected; do not change
145   INTEGER ::   numnam_ref      =   -1      !: logical unit for reference namelist
146   INTEGER ::   numnam_cfg      =   -1      !: logical unit for configuration specific namelist
147   INTEGER ::   numond          =   -1      !: logical unit for Output Namelist Dynamics
148   INTEGER ::   numnam_ice_ref  =   -1      !: logical unit for ice reference namelist
149   INTEGER ::   numnam_ice_cfg  =   -1      !: logical unit for ice reference namelist
150   INTEGER ::   numoni          =   -1      !: logical unit for Output Namelist Ice
151   INTEGER ::   numevo_ice      =   -1      !: logical unit for ice variables (temp. evolution)
152   INTEGER ::   numsol          =   -1      !: logical unit for solver statistics
153   INTEGER ::   numdct_in       =   -1      !: logical unit for transports computing
154   INTEGER ::   numdct_vol      =   -1      !: logical unit for voulume transports output
155   INTEGER ::   numdct_heat     =   -1      !: logical unit for heat    transports output
156   INTEGER ::   numdct_salt     =   -1      !: logical unit for salt    transports output
157   INTEGER ::   numfl           =   -1      !: logical unit for floats ascii output
158   INTEGER ::   numflo          =   -1      !: logical unit for floats ascii output
159
160   !!----------------------------------------------------------------------
161   !!                          Run control 
162   !!----------------------------------------------------------------------
163   INTEGER       ::   nstop = 0             !: error flag (=number of reason for a premature stop run)
164   INTEGER       ::   nwarn = 0             !: warning flag (=number of warning found during the run)
165   CHARACTER(lc) ::   ctmp1, ctmp2, ctmp3   !: temporary characters 1 to 3
166   CHARACTER(lc) ::   ctmp4, ctmp5, ctmp6   !: temporary characters 4 to 6
167   CHARACTER(lc) ::   ctmp7, ctmp8, ctmp9   !: temporary characters 7 to 9
168   CHARACTER(lc) ::   ctmp10                !: temporary character 10
169   CHARACTER(lc) ::   cform_err = "(/,' ===>>> : E R R O R',     /,'         ===========',/)"       !:
170   CHARACTER(lc) ::   cform_war = "(/,' ===>>> : W A R N I N G', /,'         ===============',/)"   !:
171   LOGICAL       ::   lwm      = .FALSE.    !: boolean : true on the 1st processor only (always)
172   LOGICAL       ::   lwp      = .FALSE.    !: boolean : true on the 1st processor only .OR. ln_ctl
173   LOGICAL       ::   lsp_area = .TRUE.     !: to make a control print over a specific area
174   CHARACTER(lc) ::   cxios_context         !: context name used in xios
175
176   !!----------------------------------------------------------------------
177   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
178   !! $Id$
179   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
180   !!=====================================================================
181END MODULE in_out_manager
Note: See TracBrowser for help on using the repository browser.