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 trunk/NEMOGCM/NEMO/OPA_SRC/IOM – NEMO

source: trunk/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90 @ 4624

Last change on this file since 4624 was 4624, checked in by acc, 10 years ago

#1305. Fix slow start-up problems on some systems by introducing and using lwm logical to restrict output of merged namelists to the first (or only) processor. lwm is true only on the first processor regardless of ln_ctl. Small changes to all flavours of nemogcm.F90 are also required to write namctl and namcfg after the call to mynode which now opens output.namelist.dyn and writes nammpp.

  • Property svn:keywords set to Id
File size: 9.7 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_out    !: suffix of ocean restart name (output)
29   LOGICAL       ::   ln_rstart        !: start from (F) rest or (T) a restart file
30   INTEGER       ::   nn_no            !: job number
31   INTEGER       ::   nn_rstctl        !: control of the time step (0, 1 or 2)
32   INTEGER       ::   nn_rstssh   = 0  !: hand made initilization of ssh or not (1/0)
33   INTEGER       ::   nn_it000         !: index of the first time step
34   INTEGER       ::   nn_itend         !: index of the last time step
35   INTEGER       ::   nn_date0         !: initial calendar date aammjj
36   INTEGER       ::   nn_leapy         !: Leap year calendar flag (0/1 or 30)
37   INTEGER       ::   nn_istate        !: initial state output flag (0/1)
38   INTEGER       ::   nn_write         !: model standard output frequency
39   INTEGER       ::   nn_stock         !: restart file frequency
40   LOGICAL       ::   ln_dimgnnn       !: type of dimgout. (F): 1 file for all proc
41                                                       !:                  (T): 1 file per proc
42   LOGICAL       ::   ln_mskland       !: mask land points in NetCDF outputs (costly: + ~15%)
43   LOGICAL       ::   ln_clobber       !: clobber (overwrite) an existing file
44   INTEGER       ::   nn_chunksz       !: chunksize (bytes) for NetCDF file (works only with iom_nf90 routines)
45#if defined key_netcdf4
46   !!----------------------------------------------------------------------
47   !!                   namnc4 namelist parameters                         (key_netcdf4)
48   !!----------------------------------------------------------------------
49   ! The following four values determine the partitioning of the output fields
50   ! into netcdf4 chunks. They are unrelated to the nn_chunk_sz setting which is
51   ! for runtime optimisation. The individual netcdf4 chunks can be optionally
52   ! gzipped (recommended) leading to significant reductions in I/O volumes
53   !                         !!!**  variables only used with iom_nf90 routines and key_netcdf4 **
54   INTEGER ::   nn_nchunks_i   !: number of chunks required in the i-dimension
55   INTEGER ::   nn_nchunks_j   !: number of chunks required in the j-dimension
56   INTEGER ::   nn_nchunks_k   !: number of chunks required in the k-dimension
57   INTEGER ::   nn_nchunks_t   !: number of chunks required in the t-dimension
58   LOGICAL ::   ln_nc4zip      !: netcdf4 usage: (T) chunk and compress output using the HDF5 sublayers of netcdf4
59   !                           !                 (F) ignore chunking request and use the netcdf4 library
60   !                           !                     to produce netcdf3-compatible files
61#endif
62!$AGRIF_DO_NOT_TREAT
63   TYPE(snc4_ctl)     :: snc4set        !: netcdf4 chunking control structure (always needed for decision making)
64!$AGRIF_END_DO_NOT_TREAT
65
66
67   !! conversion of DOCTOR norm namelist name into model name
68   !! (this should disappear in a near futur)
69
70   CHARACTER(lc) ::   cexper                      !: experiment name used for output filename
71   INTEGER       ::   no                          !: job number
72   INTEGER       ::   nrstdt                      !: control of the time step (0, 1 or 2)
73   INTEGER       ::   nit000                      !: index of the first time step
74   INTEGER       ::   nitend                      !: index of the last time step
75   INTEGER       ::   ndate0                      !: initial calendar date aammjj
76   INTEGER       ::   nleapy                      !: Leap year calendar flag (0/1 or 30)
77   INTEGER       ::   ninist                      !: initial state output flag (0/1)
78   INTEGER       ::   nwrite                      !: model standard output frequency
79   INTEGER       ::   nstock                      !: restart file frequency
80
81   !!----------------------------------------------------------------------
82   !! was in restart but moved here because of the OFF line... better solution should be found...
83   !!----------------------------------------------------------------------
84   INTEGER ::   nitrst                !: time step at which restart file should be written
85   LOGICAL ::   lrst_oce              !: logical to control the oce restart write
86   INTEGER ::   numror, numrow        !: logical unit for cean restart (read and write)
87
88   !!----------------------------------------------------------------------
89   !!                    output monitoring
90   !!----------------------------------------------------------------------
91   LOGICAL ::   ln_ctl       !: run control for debugging
92   INTEGER ::   nn_timing    !: run control for timing
93   INTEGER ::   nn_print     !: level of print (0 no print)
94   INTEGER ::   nn_ictls     !: Start i indice for the SUM control
95   INTEGER ::   nn_ictle     !: End   i indice for the SUM control
96   INTEGER ::   nn_jctls     !: Start j indice for the SUM control
97   INTEGER ::   nn_jctle     !: End   j indice for the SUM control
98   INTEGER ::   nn_isplt     !: number of processors following i
99   INTEGER ::   nn_jsplt     !: number of processors following j
100   INTEGER ::   nn_bench     !: benchmark parameter (0/1)
101   INTEGER ::   nn_bit_cmp   =    0    !: bit reproducibility  (0/1)
102
103   !                                         
104   INTEGER ::   nprint, nictls, nictle, njctls, njctle, isplt, jsplt, nbench    !: OLD namelist names
105
106   INTEGER ::   ijsplt     =    1      !: nb of local domain = nb of processors
107
108   !!----------------------------------------------------------------------
109   !!                        logical units
110   !!----------------------------------------------------------------------
111   INTEGER ::   numstp          =   -1      !: logical unit for time step
112   INTEGER ::   numtime         =   -1      !: logical unit for timing
113   INTEGER ::   numout          =    6      !: logical unit for output print
114   INTEGER ::   numnam_ref      =   -1      !: logical unit for reference namelist
115   INTEGER ::   numnam_cfg      =   -1      !: logical unit for configuration specific namelist
116   INTEGER ::   numond          =    7      !: logical unit for Output Namelist Dynamics
117   INTEGER ::   numnam_ice_ref  =   -1      !: logical unit for ice reference namelist
118   INTEGER ::   numnam_ice_cfg  =   -1      !: logical unit for ice reference namelist
119   INTEGER ::   numoni          =    8      !: logical unit for Output Namelist Ice
120   INTEGER ::   numevo_ice      =   -1      !: logical unit for ice variables (temp. evolution)
121   INTEGER ::   numsol          =   -1      !: logical unit for solver statistics
122   INTEGER ::   numdct_in       =   -1      !: logical unit for transports computing
123   INTEGER ::   numdct_vol      =   -1      !: logical unit for voulume transports output
124   INTEGER ::   numdct_heat     =   -1      !: logical unit for heat    transports output
125   INTEGER ::   numdct_salt     =   -1      !: logical unit for salt    transports output
126   INTEGER ::   numfl           =   -1      !: logical unit for floats ascii output
127   INTEGER ::   numflo          =   -1      !: logical unit for floats ascii output
128
129   !!----------------------------------------------------------------------
130   !!                          Run control 
131   !!----------------------------------------------------------------------
132   INTEGER       ::   nstop = 0             !: error flag (=number of reason for a premature stop run)
133   INTEGER       ::   nwarn = 0             !: warning flag (=number of warning found during the run)
134   CHARACTER(lc) ::   ctmp1, ctmp2, ctmp3   !: temporary characters 1 to 3
135   CHARACTER(lc) ::   ctmp4, ctmp5, ctmp6   !: temporary characters 4 to 6
136   CHARACTER(lc) ::   ctmp7, ctmp8, ctmp9   !: temporary characters 7 to 9
137   CHARACTER(lc) ::   ctmp10                !: temporary character 10
138   CHARACTER(lc) ::   cform_err = "(/,' ===>>> : E R R O R',     /,'         ===========',/)"       !:
139   CHARACTER(lc) ::   cform_war = "(/,' ===>>> : W A R N I N G', /,'         ===============',/)"   !:
140   LOGICAL       ::   lwm      = .FALSE.    !: boolean : true on the 1st processor only (always)
141   LOGICAL       ::   lwp      = .FALSE.    !: boolean : true on the 1st processor only .OR. ln_ctl
142   LOGICAL       ::   lsp_area = .TRUE.     !: to make a control print over a specific area
143
144   !!----------------------------------------------------------------------
145   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
146   !! $Id$
147   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
148   !!=====================================================================
149END MODULE in_out_manager
Note: See TracBrowser for help on using the repository browser.