source: lmdz_wrf/WRFV3/frame/module_driver_constants.F @ 1

Last change on this file since 1 was 1, checked in by lfita, 10 years ago
  • -- --- Opening of the WRF+LMDZ coupling repository --- -- -

WRF: version v3.3
LMDZ: version v1818

More details in:

File size: 4.7 KB
Line 
1!WRF:DRIVER_LAYER:CONSTANTS
2!
3!  This MODULE contains all of the constants used in the model.  These
4!  are separated by uage within the code.
5
6MODULE module_driver_constants
7
8   !  0. The following tells the rest of the model what data ordering we are
9   !     using
10
11   INTEGER , PARAMETER :: DATA_ORDER_XYZ = 1
12   INTEGER , PARAMETER :: DATA_ORDER_YXZ = 2
13   INTEGER , PARAMETER :: DATA_ORDER_ZXY = 3
14   INTEGER , PARAMETER :: DATA_ORDER_ZYX = 4
15   INTEGER , PARAMETER :: DATA_ORDER_XZY = 5
16   INTEGER , PARAMETER :: DATA_ORDER_YZX = 6
17   INTEGER , PARAMETER :: DATA_ORDER_XY = DATA_ORDER_XYZ
18   INTEGER , PARAMETER :: DATA_ORDER_YX = DATA_ORDER_YXZ
19
20
21#include <model_data_order.inc>
22
23   !  1. Following are constants for use in defining maximal values for array
24   !     definitions. 
25   !
26
27   !  The maximum number of levels in the model is how deeply the domains may
28   !  be nested.
29
30   INTEGER , PARAMETER :: max_levels      =  20
31
32   !  The maximum number of nests that can depend on a single parent and other way round
33
34   INTEGER , PARAMETER :: max_nests        =  20
35
36   !  The maximum number of parents that a nest can have (simplified assumption -> one only)
37
38   INTEGER , PARAMETER :: max_parents      =  1
39
40   !  The maximum number of domains is how many grids the model will be running.
41
42   INTEGER , PARAMETER :: max_domains     =   ( MAX_DOMAINS_F - 1 ) / 2 + 1
43
44   !  The maximum number of nest move specifications allowed in a namelist
45
46   INTEGER , PARAMETER :: max_moves       =   50
47
48   !  The maximum number of eta levels
49
50   INTEGER , PARAMETER :: max_eta         =   501
51
52   !  The maximum number of outer iterations (for DA minimisation)
53
54   INTEGER , PARAMETER :: max_outer_iterations = 10
55
56   !  The maximum number of instruments (for radiance DA)
57
58   INTEGER , PARAMETER :: max_instruments =   30
59
60   !  The maximum number of bogus storms
61
62   INTEGER , PARAMETER :: max_bogus =  5
63
64   !  2. Following related to driver leve data structures for DM_PARALLEL communications
65
66#ifdef DM_PARALLEL
67   INTEGER , PARAMETER :: max_comms       =   1024
68#else
69   INTEGER , PARAMETER :: max_comms       =   1
70#endif
71
72   !  3. Following is information related to the file I/O.
73
74   !  These are the bounds of the available FORTRAN logical unit numbers for the file I/O.
75   !  Only logical unti numbers within these bounds will be chosen for I/O unit numbers.
76
77   INTEGER , PARAMETER :: min_file_unit = 10
78   INTEGER , PARAMETER :: max_file_unit = 99
79
80   !  4. Unfortunately, the following definition is needed here (rather
81   !     than the more logical place in share/module_model_constants.F)
82   !     for the namelist reads in frame/module_configure.F, and for some
83   !     conversions in share/set_timekeeping.F
84   !     Actually, using it here will mean that we don't need to set it
85   !     in share/module_model_constants.F, since this file will be
86   !     included (USEd) in:
87   !        frame/module_configure.F
88   !     which will be USEd in:
89   !        share/module_bc.F
90   !     which will be USEd in:
91   !        phys/module_radiation_driver.F
92   !     which is the other important place for it to be, and where
93   !     it is passed as a subroutine parameter to any physics subroutine.
94   !
95   !     P2SI is the number of SI seconds in an planetary solar day
96   !     divided by the number of SI seconds in an earth solar day
97#if defined MARS
98   !     For Mars, P2SI = 88775.2/86400.
99   REAL , PARAMETER :: P2SI = 1.0274907
100#elif defined TITAN
101   !     For Titan, P2SI = 1378080.0/86400.
102   REAL , PARAMETER :: P2SI = 15.95
103#else
104   !     Default for Earth
105   REAL , PARAMETER :: P2SI = 1.0
106#endif
107 CONTAINS
108   SUBROUTINE init_module_driver_constants
109   END SUBROUTINE init_module_driver_constants
110 END MODULE module_driver_constants
111
112! routines that external packages can call to get at WRF stuff that isn't available
113! through argument lists; since they are external we don't want them using WRF
114! modules unnecessarily (complicates the build even more)
115 SUBROUTINE inquire_of_wrf_data_order_xyz( data_order )
116   USE module_driver_constants, ONLY : DATA_ORDER_XYZ
117   IMPLICIT NONE
118   INTEGER, INTENT(OUT) :: data_order
119   data_order = DATA_ORDER_XYZ
120 END SUBROUTINE inquire_of_wrf_data_order_xyz
121
122 SUBROUTINE inquire_of_wrf_data_order_xzy( data_order )
123   USE module_driver_constants, ONLY : DATA_ORDER_XZY
124   IMPLICIT NONE
125   INTEGER, INTENT(OUT) :: data_order
126   data_order = DATA_ORDER_XZY
127 END SUBROUTINE inquire_of_wrf_data_order_xzy
128
129 SUBROUTINE inquire_of_wrf_iwordsize( iwordsz )
130   IMPLICIT NONE
131   INTEGER, INTENT(OUT) :: iwordsz
132   iwordsz = IWORDSIZE
133 END SUBROUTINE inquire_of_wrf_iwordsize
134
135 SUBROUTINE inquire_of_wrf_rwordsize( rwordsz )
136   IMPLICIT NONE
137   INTEGER, INTENT(OUT) :: rwordsz
138   rwordsz = RWORDSIZE
139 END SUBROUTINE inquire_of_wrf_rwordsize
140
Note: See TracBrowser for help on using the repository browser.