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

source: branches/UKMO/dev_merge_2017_restart_datestamp_GO6_mixing/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90 @ 9497

Last change on this file since 9497 was 9497, checked in by davestorkey, 6 years ago

branches/UKMO/dev_merge_2017_restart_datestamp_GO6_mixing : recommit science changes.

File size: 11.2 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 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   CHARACTER(lc) ::   cn_ocerst_in     !: suffix of ocean restart name (input)
25   CHARACTER(lc) ::   cn_ocerst_indir  !: restart input directory
26   CHARACTER(lc) ::   cn_ocerst_out    !: suffix of ocean restart name (output)
27   CHARACTER(lc) ::   cn_ocerst_outdir !: restart output directory
28   LOGICAL       ::   ln_rstart        !: start from (F) rest or (T) a restart file
29   LOGICAL       ::   ln_rst_list      !: output restarts at list of times (T) or by frequency (F)
30   INTEGER       ::   nn_rstctl        !: control of the time step (0, 1 or 2)
31   INTEGER       ::   nn_rstssh   = 0  !: hand made initilization of ssh or not (1/0)
32   INTEGER       ::   nn_it000         !: index of the first time step
33   INTEGER       ::   nn_itend         !: index of the last time step
34   INTEGER       ::   nn_date0         !: initial calendar date aammjj
35   INTEGER       ::   nn_time0         !: initial time of day in hhmm
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   INTEGER, DIMENSION(10) :: nn_stocklist  !: restart dump times
41   LOGICAL       ::   ln_mskland       !: mask land points in NetCDF outputs (costly: + ~15%)
42   LOGICAL       ::   ln_rstdate       !: T=> stamp output restart files with date instead of timestep
43   LOGICAL       ::   ln_cfmeta        !: output additional data to netCDF files required for compliance with the CF metadata standard
44   LOGICAL       ::   ln_clobber       !: clobber (overwrite) an existing file
45   INTEGER       ::   nn_chunksz       !: chunksize (bytes) for NetCDF file (works only with iom_nf90 routines)
46   LOGICAL       ::   ln_xios_read     !: use xios to read single file restart
47   INTEGER       ::   nn_wxios         !: write resart using xios 0 - no, 1 - single, 2 - multiple file output
48   INTEGER       ::   nn_no            !: Assimilation cycle
49
50#if defined key_netcdf4
51   !!----------------------------------------------------------------------
52   !!                   namnc4 namelist parameters                         (key_netcdf4)
53   !!----------------------------------------------------------------------
54   ! The following four values determine the partitioning of the output fields
55   ! into netcdf4 chunks. They are unrelated to the nn_chunk_sz setting which is
56   ! for runtime optimisation. The individual netcdf4 chunks can be optionally
57   ! gzipped (recommended) leading to significant reductions in I/O volumes
58   !                         !!!**  variables only used with iom_nf90 routines and key_netcdf4 **
59   INTEGER ::   nn_nchunks_i   !: number of chunks required in the i-dimension
60   INTEGER ::   nn_nchunks_j   !: number of chunks required in the j-dimension
61   INTEGER ::   nn_nchunks_k   !: number of chunks required in the k-dimension
62   INTEGER ::   nn_nchunks_t   !: number of chunks required in the t-dimension
63   LOGICAL ::   ln_nc4zip      !: netcdf4 usage: (T) chunk and compress output using the HDF5 sublayers of netcdf4
64   !                           !                 (F) ignore chunking request and use the netcdf4 library
65   !                           !                     to produce netcdf3-compatible files
66#endif
67
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       ::   nrstdt                      !: control of the time step (0, 1 or 2)
78   INTEGER       ::   nit000                      !: index of the first time step
79   INTEGER       ::   nitend                      !: index of the last time step
80   INTEGER       ::   ndate0                      !: initial calendar date aammjj
81   INTEGER       ::   nleapy                      !: Leap year calendar flag (0/1 or 30)
82   INTEGER       ::   ninist                      !: initial state output flag (0/1)
83   INTEGER       ::   nwrite                      !: model standard output frequency
84   INTEGER       ::   nstock                      !: restart file frequency
85   INTEGER, DIMENSION(10) :: nstocklist           !: restart dump times
86
87   !!----------------------------------------------------------------------
88   !! was in restart but moved here because of the OFF line... better solution should be found...
89   !!----------------------------------------------------------------------
90   INTEGER ::   nitrst                !: time step at which restart file should be written
91   LOGICAL ::   lrst_oce              !: logical to control the oce restart write
92   LOGICAL ::   lrst_ice              !: logical to control the ice restart write
93   INTEGER ::   numror = 0            !: logical unit for ocean restart (read). Init to 0 is needed for SAS (in daymod.F90)
94   INTEGER ::   numrir                !: logical unit for ice   restart (read)
95   INTEGER ::   numrow                !: logical unit for ocean restart (write)
96   INTEGER ::   numriw                !: logical unit for ice   restart (write)
97   INTEGER ::   nrst_lst              !: number of restart to output next
98
99   !!----------------------------------------------------------------------
100   !!                    output monitoring
101   !!----------------------------------------------------------------------
102   LOGICAL ::   ln_ctl           !: run control for debugging
103   LOGICAL ::   ln_timing        !: run control for timing
104   LOGICAL ::   ln_diacfl        !: flag whether to create CFL diagnostics
105   INTEGER ::   nn_print         !: level of print (0 no print)
106   INTEGER ::   nn_ictls         !: Start i indice for the SUM control
107   INTEGER ::   nn_ictle         !: End   i indice for the SUM control
108   INTEGER ::   nn_jctls         !: Start j indice for the SUM control
109   INTEGER ::   nn_jctle         !: End   j indice for the SUM control
110   INTEGER ::   nn_isplt         !: number of processors following i
111   INTEGER ::   nn_jsplt         !: number of processors following j
112   INTEGER ::   nn_bench         !: benchmark parameter (0/1)
113   INTEGER ::   nn_bit_cmp = 0   !: bit reproducibility  (0/1)
114   !                                         
115   INTEGER ::   nprint, nictls, nictle, njctls, njctle, isplt, jsplt    !: OLD namelist names
116
117   INTEGER ::   ijsplt     =    1      !: nb of local domain = nb of processors
118
119   !!----------------------------------------------------------------------
120   !!                        logical units
121   !!----------------------------------------------------------------------
122   INTEGER ::   numstp          =   -1      !: logical unit for time step
123   INTEGER ::   numtime         =   -1      !: logical unit for timing
124   INTEGER ::   numout          =    6      !: logical unit for output print; Set to stdout to ensure any
125      !                                     !  early output can be collected; do not change
126   INTEGER ::   numnam_ref      =   -1      !: logical unit for reference namelist
127   INTEGER ::   numnam_cfg      =   -1      !: logical unit for configuration specific namelist
128   INTEGER ::   numond          =   -1      !: logical unit for Output Namelist Dynamics
129   INTEGER ::   numnam_ice_ref  =   -1      !: logical unit for ice reference namelist
130   INTEGER ::   numnam_ice_cfg  =   -1      !: logical unit for ice reference namelist
131   INTEGER ::   numoni          =   -1      !: logical unit for Output Namelist Ice
132   INTEGER ::   numevo_ice      =   -1      !: logical unit for ice variables (temp. evolution)
133   INTEGER ::   numrun          =   -1      !: logical unit for run statistics
134   INTEGER ::   numdct_in       =   -1      !: logical unit for transports computing
135   INTEGER ::   numdct_vol      =   -1      !: logical unit for voulume transports output
136   INTEGER ::   numdct_heat     =   -1      !: logical unit for heat    transports output
137   INTEGER ::   numdct_salt     =   -1      !: logical unit for salt    transports output
138   INTEGER ::   numfl           =   -1      !: logical unit for floats ascii output
139   INTEGER ::   numflo          =   -1      !: logical unit for floats ascii output
140
141   !!----------------------------------------------------------------------
142   !!                          Run control 
143   !!----------------------------------------------------------------------
144   INTEGER       ::   no_print = 0          !: optional argument of fld_fill (if present, suppress some control print)
145   INTEGER       ::   nstop = 0             !: error flag (=number of reason for a premature stop run)
146   INTEGER       ::   nwarn = 0             !: warning flag (=number of warning found during the run)
147   CHARACTER(lc) ::   ctmp1, ctmp2, ctmp3   !: temporary characters 1 to 3
148   CHARACTER(lc) ::   ctmp4, ctmp5, ctmp6   !: temporary characters 4 to 6
149   CHARACTER(lc) ::   ctmp7, ctmp8, ctmp9   !: temporary characters 7 to 9
150   CHARACTER(lc) ::   ctmp10                !: temporary character 10
151   CHARACTER(lc) ::   cform_err = "(/,' ===>>> : E R R O R',     /,'         ===========',/)"       !:
152   CHARACTER(lc) ::   cform_war = "(/,' ===>>> : W A R N I N G', /,'         ===============',/)"   !:
153   LOGICAL       ::   lwm      = .FALSE.    !: boolean : true on the 1st processor only (always)
154   LOGICAL       ::   lwp      = .FALSE.    !: boolean : true on the 1st processor only .OR. ln_ctl
155   LOGICAL       ::   lsp_area = .TRUE.     !: to make a control print over a specific area
156   CHARACTER(lc) ::   cxios_context         !: context name used in xios
157   CHARACTER(lc) ::   crxios_context         !: context name used in xios to read restart
158   CHARACTER(lc) ::   cwxios_context        !: context name used in xios to write restart file
159
160   !!----------------------------------------------------------------------
161   !! NEMO/OPA 4.0 , NEMO Consortium (2018)
162   !! $Id$
163   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
164   !!=====================================================================
165END MODULE in_out_manager
Note: See TracBrowser for help on using the repository browser.