[544] | 1 | MODULE iom_def |
---|
[9019] | 2 | !!====================================================================== |
---|
[544] | 3 | !! *** MODULE iom_def *** |
---|
| 4 | !! IOM variables definitions |
---|
[9019] | 5 | !!====================================================================== |
---|
| 6 | !! History : 9.0 ! 2006 09 (S. Masson) Original code |
---|
| 7 | !! - ! 2007 07 (D. Storkey) Add uldname |
---|
| 8 | !! 4.0 ! 2017-11 (M. Andrejczuk) Extend IOM interface to write any 3D fields |
---|
| 9 | !!---------------------------------------------------------------------- |
---|
[544] | 10 | USE par_kind |
---|
[12950] | 11 | USE netcdf |
---|
[544] | 12 | |
---|
| 13 | IMPLICIT NONE |
---|
| 14 | PRIVATE |
---|
| 15 | |
---|
[7646] | 16 | INTEGER, PARAMETER, PUBLIC :: jpdom_data = 1 !: ( 1 :jpiglo, 1 :jpjglo) !!gm to be suppressed |
---|
[544] | 17 | INTEGER, PARAMETER, PUBLIC :: jpdom_global = 2 !: ( 1 :jpiglo, 1 :jpjglo) |
---|
| 18 | INTEGER, PARAMETER, PUBLIC :: jpdom_local = 3 !: One of the 3 following cases |
---|
| 19 | INTEGER, PARAMETER, PUBLIC :: jpdom_local_full = 4 !: ( 1 :jpi , 1 :jpi ) |
---|
| 20 | INTEGER, PARAMETER, PUBLIC :: jpdom_local_noextra = 5 !: ( 1 :nlci , 1 :nlcj ) |
---|
| 21 | INTEGER, PARAMETER, PUBLIC :: jpdom_local_noovlap = 6 !: (nldi:nlei ,nldj:nlej ) |
---|
| 22 | INTEGER, PARAMETER, PUBLIC :: jpdom_unknown = 7 !: No dimension checking |
---|
[679] | 23 | INTEGER, PARAMETER, PUBLIC :: jpdom_autoglo = 8 !: |
---|
[6140] | 24 | INTEGER, PARAMETER, PUBLIC :: jpdom_autoglo_xy = 9 !: Automatically set horizontal dimensions only |
---|
| 25 | INTEGER, PARAMETER, PUBLIC :: jpdom_autodta = 10 !: |
---|
[544] | 26 | |
---|
[556] | 27 | INTEGER, PARAMETER, PUBLIC :: jp_r8 = 200 !: write REAL(8) |
---|
| 28 | INTEGER, PARAMETER, PUBLIC :: jp_r4 = 201 !: write REAL(4) |
---|
| 29 | INTEGER, PARAMETER, PUBLIC :: jp_i4 = 202 !: write INTEGER(4) |
---|
| 30 | INTEGER, PARAMETER, PUBLIC :: jp_i2 = 203 !: write INTEGER(2) |
---|
| 31 | INTEGER, PARAMETER, PUBLIC :: jp_i1 = 204 !: write INTEGER(1) |
---|
[544] | 32 | |
---|
[7646] | 33 | INTEGER, PARAMETER, PUBLIC :: jpmax_files = 100 !: maximum number of simultaneously opened file |
---|
| 34 | INTEGER, PARAMETER, PUBLIC :: jpmax_vars = 1200 !: maximum number of variables in one file |
---|
[544] | 35 | INTEGER, PARAMETER, PUBLIC :: jpmax_dims = 4 !: maximum number of dimensions for one variable |
---|
| 36 | INTEGER, PARAMETER, PUBLIC :: jpmax_digits = 5 !: maximum number of digits for the cpu number in the file name |
---|
| 37 | |
---|
[9367] | 38 | |
---|
[571] | 39 | !$AGRIF_DO_NOT_TREAT |
---|
[1359] | 40 | INTEGER, PUBLIC :: iom_open_init = 0 !: used to initialize iom_file(:)%nfid to 0 |
---|
[9367] | 41 | !XIOS write restart |
---|
| 42 | LOGICAL, PUBLIC :: lwxios !: write single file restart using XIOS |
---|
| 43 | INTEGER, PUBLIC :: nxioso !: type of restart file when writing using XIOS 1 - single, 2 - multiple |
---|
| 44 | !XIOS read restart |
---|
[12969] | 45 | LOGICAL, PUBLIC :: lrxios !: read single file restart using XIOS main switch |
---|
| 46 | LOGICAL, PUBLIC :: lroxios !: read single file restart using XIOS for oce |
---|
[9367] | 47 | LOGICAL, PUBLIC :: lxios_sini = .FALSE. ! is restart in a single file |
---|
[571] | 48 | |
---|
[9367] | 49 | |
---|
| 50 | |
---|
[556] | 51 | TYPE, PUBLIC :: file_descriptor |
---|
[544] | 52 | CHARACTER(LEN=240) :: name !: name of the file |
---|
[12649] | 53 | CHARACTER(LEN=3 ) :: comp !: name of component opening the file ('OCE', 'ICE'...) |
---|
[544] | 54 | INTEGER :: nfid !: identifier of the file (0 if closed) |
---|
[6140] | 55 | !: jpioipsl option has been removed) |
---|
[544] | 56 | INTEGER :: nvars !: number of identified varibles in the file |
---|
| 57 | INTEGER :: iduld !: id of the unlimited dimension |
---|
[6140] | 58 | INTEGER :: lenuld !: length of the unlimited dimension (number of records in file) |
---|
[544] | 59 | INTEGER :: irec !: writing record position |
---|
[911] | 60 | CHARACTER(LEN=32) :: uldname !: name of the unlimited dimension |
---|
[577] | 61 | CHARACTER(LEN=32), DIMENSION(jpmax_vars) :: cn_var !: names of the variables |
---|
[544] | 62 | INTEGER, DIMENSION(jpmax_vars) :: nvid !: id of the variables |
---|
| 63 | INTEGER, DIMENSION(jpmax_vars) :: ndims !: number of dimensions of the variables |
---|
| 64 | LOGICAL, DIMENSION(jpmax_vars) :: luld !: variable using the unlimited dimension |
---|
| 65 | INTEGER, DIMENSION(jpmax_dims,jpmax_vars) :: dimsz !: size of variables dimensions |
---|
| 66 | REAL(kind=wp), DIMENSION(jpmax_vars) :: scf !: scale_factor of the variables |
---|
| 67 | REAL(kind=wp), DIMENSION(jpmax_vars) :: ofs !: add_offset of the variables |
---|
[556] | 68 | END TYPE file_descriptor |
---|
| 69 | TYPE(file_descriptor), DIMENSION(jpmax_files), PUBLIC :: iom_file !: array containing the info for all opened files |
---|
[12950] | 70 | !metadata in restart file for restart read with XIOS |
---|
| 71 | INTEGER, PUBLIC, PARAMETER :: NMETA = 10 |
---|
| 72 | CHARACTER(LEN=nf90_max_name), PUBLIC :: meta(NMETA) |
---|
[550] | 73 | !$AGRIF_END_DO_NOT_TREAT |
---|
[9367] | 74 | ! |
---|
[12377] | 75 | !! * Substitutions |
---|
| 76 | # include "do_loop_substitute.h90" |
---|
[9019] | 77 | !!---------------------------------------------------------------------- |
---|
[9598] | 78 | !! NEMO/OCE 4.0 , NEMO Consortium (2018) |
---|
[9019] | 79 | !! $Id$ |
---|
[10068] | 80 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
[9019] | 81 | !!====================================================================== |
---|
[544] | 82 | END MODULE iom_def |
---|