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 utils/tools/DOMAINcfg/src – NEMO

source: utils/tools/DOMAINcfg/src/iom_def.F90 @ 14698

Last change on this file since 14698 was 14623, checked in by ldebreu, 3 years ago

AGFdomcfg: 1) Update DOMAINcfg to be compliant with the removal of halo cells 2) Update most of the LBC ... subroutines to a recent NEMO 4 version #2638

File size: 5.1 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_global        = 1   !: ( 1  :Ni0glo, 1  :Nj0glo)
16   INTEGER, PARAMETER, PUBLIC ::   jpdom_local         = 2   !: (Nis0: Nie0 ,Njs0: Nje0 )
17   INTEGER, PARAMETER, PUBLIC ::   jpdom_unknown       = 3   !: No dimension checking
18   INTEGER, PARAMETER, PUBLIC ::   jpdom_auto          = 4   !:
19   INTEGER, PARAMETER, PUBLIC ::   jpdom_auto_xy       = 5   !: Automatically set horizontal dimensions only
20
21   INTEGER, PARAMETER, PUBLIC ::   jpdom_data = jpdom_global
22
23   INTEGER, PARAMETER, PUBLIC ::   jp_r8    = 200      !: write REAL(8)
24   INTEGER, PARAMETER, PUBLIC ::   jp_r4    = 201      !: write REAL(4)
25   INTEGER, PARAMETER, PUBLIC ::   jp_i4    = 202      !: write INTEGER(4)
26   INTEGER, PARAMETER, PUBLIC ::   jp_i2    = 203      !: write INTEGER(2)
27   INTEGER, PARAMETER, PUBLIC ::   jp_i1    = 204      !: write INTEGER(1)
28
29   INTEGER, PARAMETER, PUBLIC ::   jpmax_files  = 100  !: maximum number of simultaneously opened file
30   INTEGER, PARAMETER, PUBLIC ::   jpmax_vars   = 1200 !: maximum number of variables in one file
31   INTEGER, PARAMETER, PUBLIC ::   jpmax_dims   =  4   !: maximum number of dimensions for one variable
32   INTEGER, PARAMETER, PUBLIC ::   jpmax_digits =  9   !: maximum number of digits for the cpu number in the file name
33
34!$AGRIF_DO_NOT_TREAT
35   INTEGER, PUBLIC            ::   iom_open_init = 0   !: used to initialize iom_file(:)%nfid to 0
36!XIOS write restart   
37   LOGICAL, PUBLIC            ::   lwxios          !: write single file restart using XIOS
38   INTEGER, PUBLIC            ::   nxioso          !: type of restart file when writing using XIOS 1 - single, 2 - multiple
39!XIOS read restart   
40   LOGICAL, PUBLIC            ::   lrxios          !: read single file restart using XIOS
41   LOGICAL, PUBLIC            ::   lxios_sini = .FALSE. ! is restart in a single file
42   LOGICAL, PUBLIC            ::   lxios_set  = .FALSE. 
43
44   TYPE, PUBLIC ::   file_descriptor
45      CHARACTER(LEN=240)                        ::   name     !: name of the file
46      CHARACTER(LEN=3  )                        ::   comp     !: name of component opening the file ('OCE', 'ICE'...)
47      INTEGER                                   ::   nfid     !: identifier of the file (0 if closed)
48                                                              !: jpioipsl option has been removed)
49      INTEGER                                   ::   nvars    !: number of identified varibles in the file
50      INTEGER                                   ::   iduld    !: id of the unlimited dimension
51      INTEGER                                   ::   lenuld   !: length of the unlimited dimension (number of records in file)
52      INTEGER                                   ::   irec     !: writing record position 
53      CHARACTER(LEN=32)                         ::   uldname  !: name of the unlimited dimension
54      CHARACTER(LEN=32), DIMENSION(jpmax_vars)  ::   cn_var   !: names of the variables
55      INTEGER, DIMENSION(jpmax_vars)            ::   nvid     !: id of the variables
56      INTEGER, DIMENSION(jpmax_vars)            ::   ndims    !: number of dimensions of the variables
57      LOGICAL, DIMENSION(jpmax_vars)            ::   luld     !: variable using the unlimited dimension
58      INTEGER, DIMENSION(jpmax_dims,jpmax_vars) ::   dimsz    !: size of variables dimensions
59      REAL(kind=wp), DIMENSION(jpmax_vars)      ::   scf      !: scale_factor of the variables
60      REAL(kind=wp), DIMENSION(jpmax_vars)      ::   ofs      !: add_offset of the variables
61   END TYPE file_descriptor
62   TYPE(file_descriptor), DIMENSION(jpmax_files), PUBLIC ::   iom_file !: array containing the info for all opened files
63   INTEGER, PARAMETER, PUBLIC                   :: max_rst_fields = 95 !: maximum number of restart variables defined in iom_set_rst_vars
64   TYPE, PUBLIC :: RST_FIELD 
65    CHARACTER(len=30) :: vname = "NO_NAME" ! names of variables in restart file
66    CHARACTER(len=30) :: grid = "NO_GRID"
67    LOGICAL           :: active =.FALSE. ! for restart write only: true - write field, false do not write field
68   END TYPE RST_FIELD
69!$AGRIF_END_DO_NOT_TREAT
70   !
71   TYPE(RST_FIELD), PUBLIC, SAVE :: rst_wfields(max_rst_fields), rst_rfields(max_rst_fields)
72   !
73   !! * Substitutions
74#  include "do_loop_substitute.h90"
75   !!----------------------------------------------------------------------
76   !! NEMO/OCE 4.0 , NEMO Consortium (2018)
77   !! $Id: iom_def.F90 13286 2020-07-09 15:48:29Z smasson $
78   !! Software governed by the CeCILL license (see ./LICENSE)
79   !!======================================================================
80END MODULE iom_def
Note: See TracBrowser for help on using the repository browser.