Changeset 2528 for trunk/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
- Timestamp:
- 2010-12-27T18:33:53+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
- Property svn:eol-style deleted
r1770 r2528 9 9 !! 3.0 ! 2008-06 (G. Madec) add ctmp4 to ctmp10 10 10 !! 3.2 ! 2009-08 (S. MAsson) add new ctl_opn 11 !! 3.3 ! 2010-10 (A. Coward) add NetCDF4 usage 11 12 !!---------------------------------------------------------------------- 12 13 … … 16 17 !! getunit : give the index of an unused logical unit 17 18 !!---------------------------------------------------------------------- 18 USE par_ kind ! kind definition19 USE par_oce ! ocean parameter20 USE lib_print ! formated print library19 USE par_oce ! ocean parameter 20 USE lib_print ! formated print library 21 USE nc4interface ! NetCDF4 interface 21 22 22 23 IMPLICIT NONE … … 26 27 !! namrun namelist parameters 27 28 !!---------------------------------------------------------------------- 28 CHARACTER(l en=16):: cn_exp = "exp0" !: experiment name used for output filename29 CHARACTER(l en=32):: cn_ocerst_in = "restart" !: suffix of ocean restart name (input)30 CHARACTER(l en=32):: cn_ocerst_out = "restart" !: suffix of ocean restart name (output)31 LOGICAL 32 INTEGER 33 INTEGER 34 INTEGER 35 INTEGER 36 INTEGER 37 INTEGER 38 INTEGER 39 INTEGER 40 INTEGER 41 INTEGER 42 LOGICAL 29 CHARACTER(lc) :: cn_exp = "exp0" !: experiment name used for output filename 30 CHARACTER(lc) :: cn_ocerst_in = "restart" !: suffix of ocean restart name (input) 31 CHARACTER(lc) :: cn_ocerst_out = "restart" !: suffix of ocean restart name (output) 32 LOGICAL :: ln_rstart = .FALSE. !: start from (F) rest or (T) a restart file 33 INTEGER :: nn_no = 0 !: job number 34 INTEGER :: nn_rstctl = 0 !: control of the time step (0, 1 or 2) 35 INTEGER :: nn_rstssh = 0 !: hand made initilization of ssh or not (1/0) 36 INTEGER :: nn_it000 = 1 !: index of the first time step 37 INTEGER :: nn_itend = 10 !: index of the last time step 38 INTEGER :: nn_date0 = 961115 !: initial calendar date aammjj 39 INTEGER :: nn_leapy = 0 !: Leap year calendar flag (0/1 or 30) 40 INTEGER :: nn_istate = 0 !: initial state output flag (0/1) 41 INTEGER :: nn_write = 10 !: model standard output frequency 42 INTEGER :: nn_stock = 10 !: restart file frequency 43 LOGICAL :: ln_dimgnnn = .FALSE. !: type of dimgout. (F): 1 file for all proc 43 44 !: (T): 1 file per proc 44 LOGICAL :: ln_mskland = .FALSE. !: mask land points in NetCDF outputs (costly: + ~15%) 45 LOGICAL :: ln_clobber = .FALSE. !: clobber (overwrite) an existing file 46 INTEGER :: nn_chunksz = 0 !: chunksize (bytes) for NetCDF file (working only with iom_nf90 routines) 45 LOGICAL :: ln_mskland = .FALSE. !: mask land points in NetCDF outputs (costly: + ~15%) 46 LOGICAL :: ln_clobber = .FALSE. !: clobber (overwrite) an existing file 47 INTEGER :: nn_chunksz = 0 !: chunksize (bytes) for NetCDF file (works only with iom_nf90 routines) 48 #if defined key_netcdf4 49 !!---------------------------------------------------------------------- 50 !! namnc4 namelist parameters (key_netcdf4) 51 !!---------------------------------------------------------------------- 52 ! The following four values determine the partitioning of the output fields 53 ! into netcdf4 chunks. They are unrelated to the nn_chunk_sz setting which is 54 ! for runtime optimisation. The individual netcdf4 chunks can be optionally 55 ! gzipped (recommended) leading to significant reductions in I/O volumes 56 ! !!!** variables only used with iom_nf90 routines and key_netcdf4 ** 57 INTEGER :: nn_nchunks_i = 1 !: number of chunks required in the i-dimension 58 INTEGER :: nn_nchunks_j = 1 !: number of chunks required in the j-dimension 59 INTEGER :: nn_nchunks_k = 1 !: number of chunks required in the k-dimension 60 INTEGER :: nn_nchunks_t = 1 !: number of chunks required in the t-dimension 61 LOGICAL :: ln_nc4zip = .TRUE. !: netcdf4 usage: (T) chunk and compress output using the HDF5 sublayers of netcdf4 62 ! ! (F) ignore chunking request and use the netcdf4 library 63 ! ! to produce netcdf3-compatible files 64 #endif 65 !$AGRIF_DO_NOT_TREAT 66 TYPE(snc4_ctl) :: snc4set !: netcdf4 chunking control structure (always needed for decision making) 67 !$AGRIF_END_DO_NOT_TREAT 68 47 69 48 70 !! conversion of DOCTOR norm namelist name into model name 49 71 !! (this should disappear in a near futur) 50 72 51 CHARACTER(l en=16):: cexper !: experiment name used for output filename52 INTEGER 53 INTEGER 54 INTEGER 55 INTEGER 56 INTEGER 57 INTEGER 58 INTEGER 59 INTEGER 60 INTEGER 73 CHARACTER(lc) :: cexper !: experiment name used for output filename 74 INTEGER :: no !: job number 75 INTEGER :: nrstdt !: control of the time step (0, 1 or 2) 76 INTEGER :: nit000 !: index of the first time step 77 INTEGER :: nitend !: index of the last time step 78 INTEGER :: ndate0 !: initial calendar date aammjj 79 INTEGER :: nleapy !: Leap year calendar flag (0/1 or 30) 80 INTEGER :: ninist !: initial state output flag (0/1) 81 INTEGER :: nwrite !: model standard output frequency 82 INTEGER :: nstock !: restart file frequency 61 83 62 84 !!---------------------------------------------------------------------- 63 85 !! was in restart but moved here because of the OFF line... better solution should be found... 64 86 !!---------------------------------------------------------------------- 65 INTEGER :: nitrst!: time step at which restart file should be written87 INTEGER :: nitrst !: time step at which restart file should be written 66 88 67 89 !!---------------------------------------------------------------------- 68 90 !! output monitoring 69 91 !!---------------------------------------------------------------------- 70 LOGICAL 71 INTEGER 72 INTEGER 73 INTEGER 74 INTEGER 75 INTEGER 76 INTEGER 77 INTEGER 78 INTEGER 79 INTEGER 80 81 ! !: OLD namelist names82 INTEGER :: nprint, nictls, nictle, njctls, njctle, isplt, jsplt, nbench , nbit_cmp83 84 INTEGER 92 LOGICAL :: ln_ctl = .FALSE. !: run control for debugging 93 INTEGER :: nn_print = 0 !: level of print (0 no print) 94 INTEGER :: nn_ictls = 0 !: Start i indice for the SUM control 95 INTEGER :: nn_ictle = 0 !: End i indice for the SUM control 96 INTEGER :: nn_jctls = 0 !: Start j indice for the SUM control 97 INTEGER :: nn_jctle = 0 !: End j indice for the SUM control 98 INTEGER :: nn_isplt = 1 !: number of processors following i 99 INTEGER :: nn_jsplt = 1 !: number of processors following j 100 INTEGER :: nn_bench = 0 !: 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 85 107 86 108 !!---------------------------------------------------------------------- 87 109 !! logical units 88 110 !!---------------------------------------------------------------------- 89 INTEGER 90 INTEGER 91 INTEGER 92 INTEGER 93 INTEGER 94 INTEGER 111 INTEGER :: numstp = -1 !: logical unit for time step 112 INTEGER :: numout = 6 !: logical unit for output print 113 INTEGER :: numnam = -1 !: logical unit for namelist 114 INTEGER :: numnam_ice = -1 !: logical unit for ice namelist 115 INTEGER :: numevo_ice = -1 !: logical unit for ice variables (temp. evolution) 116 INTEGER :: numsol = -1 !: logical unit for solver statistics 95 117 96 118 !!---------------------------------------------------------------------- 97 119 !! Run control 98 120 !!---------------------------------------------------------------------- 99 INTEGER :: nstop = 0 !: error flag (=number of reason for a premature stop run) 100 INTEGER :: nwarn = 0 !: warning flag (=number of warning found during the run) 101 CHARACTER(len=200) :: ctmp1, ctmp2, ctmp3 !: temporary characters 1 to 3 102 CHARACTER(len=200) :: ctmp4, ctmp5, ctmp6 !: temporary characters 4 to 6 103 CHARACTER(len=200) :: ctmp7, ctmp8, ctmp9 !: temporary characters 7 to 9 104 CHARACTER(len=200) :: ctmp10 !: temporary character 10 105 CHARACTER (len=64) :: cform_err = "(/,' ===>>> : E R R O R', /,' ===========',/)" !: 106 CHARACTER (len=64) :: cform_war = "(/,' ===>>> : W A R N I N G', /,' ===============',/)" !: 107 LOGICAL :: lwp = .FALSE. !: boolean : true on the 1st processor only 108 LOGICAL :: lsp_area = .TRUE. !: to make a control print over a specific area 109 !!---------------------------------------------------------------------- 110 !! NEMO/OPA 3.0 , LOCEAN-IPSL (2008) 121 INTEGER :: nstop = 0 !: error flag (=number of reason for a premature stop run) 122 INTEGER :: nwarn = 0 !: warning flag (=number of warning found during the run) 123 CHARACTER(lc) :: ctmp1, ctmp2, ctmp3 !: temporary characters 1 to 3 124 CHARACTER(lc) :: ctmp4, ctmp5, ctmp6 !: temporary characters 4 to 6 125 CHARACTER(lc) :: ctmp7, ctmp8, ctmp9 !: temporary characters 7 to 9 126 CHARACTER(lc) :: ctmp10 !: temporary character 10 127 CHARACTER(lc) :: cform_err = "(/,' ===>>> : E R R O R', /,' ===========',/)" !: 128 CHARACTER(lc) :: cform_war = "(/,' ===>>> : W A R N I N G', /,' ===============',/)" !: 129 LOGICAL :: lwp = .FALSE. !: boolean : true on the 1st processor only 130 LOGICAL :: lsp_area = .TRUE. !: to make a control print over a specific area 131 132 !!---------------------------------------------------------------------- 133 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 111 134 !! $Id$ 112 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 113 !!---------------------------------------------------------------------- 114 135 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 136 !!---------------------------------------------------------------------- 115 137 CONTAINS 116 138 … … 129 151 nstop = nstop + 1 130 152 IF(lwp) THEN 131 WRITE(numout, "(/,' ===>>> : E R R O R', /,' ===========',/)")153 WRITE(numout,cform_err) 132 154 IF( PRESENT(cd1 ) ) WRITE(numout,*) cd1 133 155 IF( PRESENT(cd2 ) ) WRITE(numout,*) cd2 … … 163 185 nwarn = nwarn + 1 164 186 IF(lwp) THEN 165 WRITE(numout, "(/,' ===>>> : W A R N I N G', /,' ===============',/)")187 WRITE(numout,cform_war) 166 188 IF( PRESENT(cd1 ) ) WRITE(numout,*) cd1 167 189 IF( PRESENT(cd2 ) ) WRITE(numout,*) cd2 … … 180 202 181 203 182 SUBROUTINE ctl_opn 204 SUBROUTINE ctl_opn( knum, cdfile, cdstat, cdform, cdacce, klengh, kout, ldwp, karea ) 183 205 !!---------------------------------------------------------------------- 184 206 !! *** ROUTINE ctl_opn *** … … 187 209 !! 188 210 !! ** Method : Fortan open 189 !! 190 !! History : 191 !! ! 1995-12 (G. Madec) Original code 192 !! 8.5 ! 2002-06 (G. Madec) F90: Free form and module 193 !!---------------------------------------------------------------------- 194 211 !!---------------------------------------------------------------------- 195 212 INTEGER , INTENT( out) :: knum ! logical unit to open 196 213 CHARACTER(len=*) , INTENT(in ) :: cdfile ! file name to open … … 205 222 CHARACTER(len=80) :: clfile 206 223 INTEGER :: iost 224 !!---------------------------------------------------------------------- 207 225 208 226 ! adapt filename
Note: See TracChangeset
for help on using the changeset viewer.