in_out_manager.F90 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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. USE par_oce ! ocean parameter
  14. USE lib_print ! formated print library
  15. USE nc4interface ! NetCDF4 interface
  16. IMPLICIT NONE
  17. PUBLIC
  18. !
  19. !!----------------------------------------------------------------------
  20. !! namrun namelist parameters
  21. !!----------------------------------------------------------------------
  22. CHARACTER(lc) :: cn_exp !: experiment name used for output filename
  23. CHARACTER(lc) :: cn_ocerst_in !: suffix of ocean restart name (input)
  24. CHARACTER(lc) :: cn_ocerst_indir !: restart input directory
  25. CHARACTER(lc) :: cn_ocerst_out !: suffix of ocean restart name (output)
  26. CHARACTER(lc) :: cn_ocerst_outdir !: restart output directory
  27. LOGICAL :: ln_rstart !: start from (F) rest or (T) a restart file
  28. LOGICAL :: ln_rst_list !: output restarts at list of times (T) or by frequency (F)
  29. INTEGER :: nn_no !: job number
  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_leapy !: Leap year calendar flag (0/1 or 30)
  36. INTEGER :: nn_istate !: initial state output flag (0/1)
  37. INTEGER :: nn_write !: model standard output frequency
  38. INTEGER :: nn_stock !: restart file frequency
  39. INTEGER, DIMENSION(10) :: nn_stocklist !: restart dump times
  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_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. #if defined key_netcdf4
  47. !!----------------------------------------------------------------------
  48. !! namnc4 namelist parameters (key_netcdf4)
  49. !!----------------------------------------------------------------------
  50. ! The following four values determine the partitioning of the output fields
  51. ! into netcdf4 chunks. They are unrelated to the nn_chunk_sz setting which is
  52. ! for runtime optimisation. The individual netcdf4 chunks can be optionally
  53. ! gzipped (recommended) leading to significant reductions in I/O volumes
  54. ! !!!** variables only used with iom_nf90 routines and key_netcdf4 **
  55. INTEGER :: nn_nchunks_i !: number of chunks required in the i-dimension
  56. INTEGER :: nn_nchunks_j !: number of chunks required in the j-dimension
  57. INTEGER :: nn_nchunks_k !: number of chunks required in the k-dimension
  58. INTEGER :: nn_nchunks_t !: number of chunks required in the t-dimension
  59. LOGICAL :: ln_nc4zip !: netcdf4 usage: (T) chunk and compress output using the HDF5 sublayers of netcdf4
  60. ! ! (F) ignore chunking request and use the netcdf4 library
  61. ! ! to produce netcdf3-compatible files
  62. #endif
  63. !$AGRIF_DO_NOT_TREAT
  64. TYPE(snc4_ctl) :: snc4set !: netcdf4 chunking control structure (always needed for decision making)
  65. !$AGRIF_END_DO_NOT_TREAT
  66. !! conversion of DOCTOR norm namelist name into model name
  67. !! (this should disappear in a near futur)
  68. CHARACTER(lc) :: cexper !: experiment name used for output filename
  69. INTEGER :: no !: job number
  70. INTEGER :: nrstdt !: control of the time step (0, 1 or 2)
  71. INTEGER :: nit000 !: index of the first time step
  72. INTEGER :: nitend !: index of the last time step
  73. INTEGER :: ndate0 !: initial calendar date aammjj
  74. INTEGER :: nleapy !: Leap year calendar flag (0/1 or 30)
  75. INTEGER :: ninist !: initial state output flag (0/1)
  76. INTEGER :: nwrite !: model standard output frequency
  77. INTEGER :: nstock !: restart file frequency
  78. INTEGER, DIMENSION(10) :: nstocklist !: restart dump times
  79. !!----------------------------------------------------------------------
  80. !! was in restart but moved here because of the OFF line... better solution should be found...
  81. !!----------------------------------------------------------------------
  82. INTEGER :: nitrst !: time step at which restart file should be written
  83. LOGICAL :: lrst_oce !: logical to control the oce restart write
  84. INTEGER :: numror = 0 !: logical unit for ocean restart (read). Init to 0 is needed for SAS (in daymod.F90)
  85. INTEGER :: numrow !: logical unit for ocean restart (write)
  86. INTEGER :: nrst_lst !: number of restart to output next
  87. !!----------------------------------------------------------------------
  88. !! output monitoring
  89. !!----------------------------------------------------------------------
  90. LOGICAL :: ln_ctl !: run control for debugging
  91. INTEGER :: nn_timing !: run control for timing
  92. INTEGER :: nn_print !: level of print (0 no print)
  93. INTEGER :: nn_ictls !: Start i indice for the SUM control
  94. INTEGER :: nn_ictle !: End i indice for the SUM control
  95. INTEGER :: nn_jctls !: Start j indice for the SUM control
  96. INTEGER :: nn_jctle !: End j indice for the SUM control
  97. INTEGER :: nn_isplt !: number of processors following i
  98. INTEGER :: nn_jsplt !: number of processors following j
  99. INTEGER :: nn_bench !: benchmark parameter (0/1)
  100. INTEGER :: nn_bit_cmp = 0 !: bit reproducibility (0/1)
  101. !
  102. INTEGER :: nprint, nictls, nictle, njctls, njctle, isplt, jsplt, nbench !: OLD namelist names
  103. INTEGER :: ijsplt = 1 !: nb of local domain = nb of processors
  104. !!----------------------------------------------------------------------
  105. !! logical units
  106. !!----------------------------------------------------------------------
  107. INTEGER :: numstp = -1 !: logical unit for time step
  108. INTEGER :: numtime = -1 !: logical unit for timing
  109. INTEGER :: numout = 6 !: logical unit for output print; Set to stdout to ensure any early
  110. ! output can be collected; do not change
  111. INTEGER :: numnam_ref = -1 !: logical unit for reference namelist
  112. INTEGER :: numnam_cfg = -1 !: logical unit for configuration specific namelist
  113. INTEGER :: numond = -1 !: logical unit for Output Namelist Dynamics
  114. INTEGER :: numnam_ice_ref = -1 !: logical unit for ice reference namelist
  115. INTEGER :: numnam_ice_cfg = -1 !: logical unit for ice reference namelist
  116. INTEGER :: numoni = -1 !: logical unit for Output Namelist Ice
  117. INTEGER :: numevo_ice = -1 !: logical unit for ice variables (temp. evolution)
  118. INTEGER :: numsol = -1 !: logical unit for solver statistics
  119. INTEGER :: numdct_in = -1 !: logical unit for transports computing
  120. INTEGER :: numdct_vol = -1 !: logical unit for voulume transports output
  121. INTEGER :: numdct_heat = -1 !: logical unit for heat transports output
  122. INTEGER :: numdct_salt = -1 !: logical unit for salt transports output
  123. INTEGER :: numfl = -1 !: logical unit for floats ascii output
  124. INTEGER :: numflo = -1 !: logical unit for floats ascii output
  125. !!----------------------------------------------------------------------
  126. !! Run control
  127. !!----------------------------------------------------------------------
  128. INTEGER :: nstop = 0 !: error flag (=number of reason for a premature stop run)
  129. INTEGER :: nwarn = 0 !: warning flag (=number of warning found during the run)
  130. CHARACTER(lc) :: ctmp1, ctmp2, ctmp3 !: temporary characters 1 to 3
  131. CHARACTER(lc) :: ctmp4, ctmp5, ctmp6 !: temporary characters 4 to 6
  132. CHARACTER(lc) :: ctmp7, ctmp8, ctmp9 !: temporary characters 7 to 9
  133. CHARACTER(lc) :: ctmp10 !: temporary character 10
  134. CHARACTER(lc) :: cform_err = "(/,' ===>>> : E R R O R', /,' ===========',/)" !:
  135. CHARACTER(lc) :: cform_war = "(/,' ===>>> : W A R N I N G', /,' ===============',/)" !:
  136. LOGICAL :: lwm = .FALSE. !: boolean : true on the 1st processor only (always)
  137. LOGICAL :: lwp = .FALSE. !: boolean : true on the 1st processor only .OR. ln_ctl
  138. LOGICAL :: lsp_area = .TRUE. !: to make a control print over a specific area
  139. CHARACTER(lc) :: cxios_context !: context name used in xios
  140. !!----------------------------------------------------------------------
  141. !! NEMO/OPA 3.3 , NEMO Consortium (2010)
  142. !! $Id: in_out_manager.F90 5518 2015-06-30 13:11:42Z clem $
  143. !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
  144. !!=====================================================================
  145. END MODULE in_out_manager