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.
iom_def.F90 in NEMO/branches/UKMO/NEMO4_beta_mirror/src/OCE/IOM – NEMO

source: NEMO/branches/UKMO/NEMO4_beta_mirror/src/OCE/IOM/iom_def.F90 @ 10321

Last change on this file since 10321 was 10321, checked in by davestorkey, 5 years ago

UKMO/NEMO4_beta_mirror: Update to version 10279 of the trunk.

File size: 5.6 KB
Line 
1MODULE iom_def
2   !!======================================================================
3   !!                    ***  MODULE  iom_def ***
4   !! IOM variables definitions
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   !!----------------------------------------------------------------------
10   USE par_kind
11
12   IMPLICIT NONE
13   PRIVATE
14
15   INTEGER, PARAMETER, PUBLIC ::   jpdom_data          = 1   !: ( 1  :jpiglo, 1  :jpjglo)    !!gm to be suppressed
16   INTEGER, PARAMETER, PUBLIC ::   jpdom_global        = 2   !: ( 1  :jpiglo, 1  :jpjglo)
17   INTEGER, PARAMETER, PUBLIC ::   jpdom_local         = 3   !: One of the 3 following cases
18   INTEGER, PARAMETER, PUBLIC ::   jpdom_local_full    = 4   !: ( 1  :jpi   , 1  :jpi   )
19   INTEGER, PARAMETER, PUBLIC ::   jpdom_local_noextra = 5   !: ( 1  :nlci  , 1  :nlcj  )
20   INTEGER, PARAMETER, PUBLIC ::   jpdom_local_noovlap = 6   !: (nldi:nlei  ,nldj:nlej  )
21   INTEGER, PARAMETER, PUBLIC ::   jpdom_unknown       = 7   !: No dimension checking
22   INTEGER, PARAMETER, PUBLIC ::   jpdom_autoglo       = 8   !:
23   INTEGER, PARAMETER, PUBLIC ::   jpdom_autoglo_xy    = 9   !: Automatically set horizontal dimensions only
24   INTEGER, PARAMETER, PUBLIC ::   jpdom_autodta       = 10  !:
25
26   INTEGER, PARAMETER, PUBLIC ::   jpnf90      = 101      !: Use nf90 library
27
28   INTEGER, PARAMETER, PUBLIC ::   jprstlib  = jpnf90     !: restarts io library
29
30   INTEGER, PARAMETER, PUBLIC ::   jp_r8    = 200      !: write REAL(8)
31   INTEGER, PARAMETER, PUBLIC ::   jp_r4    = 201      !: write REAL(4)
32   INTEGER, PARAMETER, PUBLIC ::   jp_i4    = 202      !: write INTEGER(4)
33   INTEGER, PARAMETER, PUBLIC ::   jp_i2    = 203      !: write INTEGER(2)
34   INTEGER, PARAMETER, PUBLIC ::   jp_i1    = 204      !: write INTEGER(1)
35
36   INTEGER, PARAMETER, PUBLIC ::   jpmax_files  = 100  !: maximum number of simultaneously opened file
37   INTEGER, PARAMETER, PUBLIC ::   jpmax_vars   = 1200 !: maximum number of variables in one file
38   INTEGER, PARAMETER, PUBLIC ::   jpmax_dims   =  4   !: maximum number of dimensions for one variable
39   INTEGER, PARAMETER, PUBLIC ::   jpmax_digits =  5   !: maximum number of digits for the cpu number in the file name
40
41
42!$AGRIF_DO_NOT_TREAT
43   INTEGER, PUBLIC            ::   iom_open_init = 0   !: used to initialize iom_file(:)%nfid to 0
44!XIOS write restart   
45   LOGICAL, PUBLIC            ::   lwxios          !: write single file restart using XIOS
46   INTEGER, PUBLIC            ::   nxioso          !: type of restart file when writing using XIOS 1 - single, 2 - multiple
47!XIOS read restart   
48   LOGICAL, PUBLIC            ::   lrxios          !: read single file restart using XIOS
49   LOGICAL, PUBLIC            ::   lxios_sini = .FALSE. ! is restart in a single file
50   LOGICAL, PUBLIC            ::   lxios_set  = .FALSE. 
51
52
53
54   TYPE, PUBLIC ::   file_descriptor
55      CHARACTER(LEN=240)                        ::   name     !: name of the file
56      INTEGER                                   ::   nfid     !: identifier of the file (0 if closed)
57      INTEGER                                   ::   iolib    !: library used to read the file (jpnf90 or new formats,
58                                                              !: jpioipsl option has been removed)
59      INTEGER                                   ::   nvars    !: number of identified varibles in the file
60      INTEGER                                   ::   iduld    !: id of the unlimited dimension
61      INTEGER                                   ::   lenuld   !: length of the unlimited dimension (number of records in file)
62      INTEGER                                   ::   irec     !: writing record position 
63      CHARACTER(LEN=32)                         ::   uldname  !: name of the unlimited dimension
64      CHARACTER(LEN=32), DIMENSION(jpmax_vars)  ::   cn_var   !: names of the variables
65      INTEGER, DIMENSION(jpmax_vars)            ::   nvid     !: id of the variables
66      INTEGER, DIMENSION(jpmax_vars)            ::   ndims    !: number of dimensions of the variables
67      LOGICAL, DIMENSION(jpmax_vars)            ::   luld     !: variable using the unlimited dimension
68      INTEGER, DIMENSION(jpmax_dims,jpmax_vars) ::   dimsz    !: size of variables dimensions
69      REAL(kind=wp), DIMENSION(jpmax_vars)      ::   scf      !: scale_factor of the variables
70      REAL(kind=wp), DIMENSION(jpmax_vars)      ::   ofs      !: add_offset of the variables
71      INTEGER                                   ::   nlev     ! number of vertical levels
72   END TYPE file_descriptor
73   TYPE(file_descriptor), DIMENSION(jpmax_files), PUBLIC ::   iom_file !: array containing the info for all opened files
74   INTEGER, PARAMETER, PUBLIC                   :: max_rst_fields = 95 !: maximum number of restart variables defined in iom_set_rst_vars
75   TYPE, PUBLIC :: RST_FIELD 
76    CHARACTER(len=30) :: vname = "NO_NAME" ! names of variables in restart file
77    CHARACTER(len=30) :: grid = "NO_GRID"
78    LOGICAL           :: active =.FALSE. ! for restart write only: true - write field, false do not write field
79   END TYPE RST_FIELD
80!$AGRIF_END_DO_NOT_TREAT
81   !
82   TYPE(RST_FIELD), PUBLIC, SAVE :: rst_wfields(max_rst_fields), rst_rfields(max_rst_fields)
83   !
84   !!----------------------------------------------------------------------
85   !! NEMO/OCE 4.0 , NEMO Consortium (2018)
86   !! $Id$
87   !! Software governed by the CeCILL license (see ./LICENSE)
88   !!======================================================================
89END MODULE iom_def
Note: See TracBrowser for help on using the repository browser.