1 !WRF:DRIVER_LAYER:CONSTANTS
3 ! This MODULE contains all of the constants used in the model. These
4 ! are separated by usage within the code.
6 MODULE module_driver_constants
8 ! 0. The following tells the rest of the model what data ordering we are
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
21 #include "model_data_order.inc"
23 ! 1. Following are constants for use in defining maximal values for array
27 ! The maximum number of levels in the model is how deeply the domains may
30 INTEGER , PARAMETER :: max_levels = 20
32 ! The maximum number of nests that can depend on a single parent and other way round
34 INTEGER , PARAMETER :: max_nests = 20
36 ! The maximum number of parents that a nest can have (simplified assumption -> one only)
38 INTEGER , PARAMETER :: max_parents = 1
40 ! The maximum number of domains is how many grids the model will be running.
42 INTEGER , PARAMETER :: max_domains = ( MAX_DOMAINS_F - 1 ) / 2 + 1
44 ! The maximum number of nest move specifications allowed in a namelist
46 INTEGER , PARAMETER :: max_moves = 50
48 ! The maximum number of eta levels. With vertical refinement defining
49 ! each domain separately, the aggregated number of levels could be large.
51 INTEGER , PARAMETER :: max_eta = 10001
53 ! The maximum number of ocean levels in the 3d U Miami ocean.
55 INTEGER , PARAMETER :: max_ocean = 501
57 ! The maximum number of pressure levels to interpolate to, for diagnostics
59 INTEGER , PARAMETER :: max_plevs = 100
61 ! The maximum number of height levels to interpolate to, for diagnostics
63 INTEGER , PARAMETER :: max_zlevs = 100
65 ! The maximum number of trackchem
67 INTEGER , PARAMETER :: max_trackchem = 100
69 ! The maximum number of megan species in chem mech
71 INTEGER , PARAMETER :: max_mgnspc = 100
73 ! The maximum number of outer iterations (for DA minimisation)
75 INTEGER , PARAMETER :: max_outer_iterations = 100
77 ! The maximum number of cost functions to find sensitivity w.r.t (for custom sensitivity)
79 INTEGER , PARAMETER :: max_sens = 100
81 ! The maximum number of instruments (for radiance DA)
83 INTEGER , PARAMETER :: max_instruments = 30
85 ! The maximum number of obs indexes (for conventional DA obs)
88 INTEGER , PARAMETER :: num_ob_indexes = 31
90 INTEGER , PARAMETER :: num_ob_indexes = 30
94 ! The maximum number of bogus storms
96 INTEGER , PARAMETER :: max_bogus = 5
98 ! The maximum number of fields that can be sent or received in coupled mode
100 INTEGER , PARAMETER :: max_cplfld = 20
102 ! The maximum number of domains used by the external model with which wrf is communicating in coupled mode
104 INTEGER , PARAMETER :: max_extdomains = 5
106 ! 2. Following related to driver level data structures for DM_PARALLEL communications
109 INTEGER , PARAMETER :: max_comms = 1024
111 INTEGER , PARAMETER :: max_comms = 1
114 ! 3. Following is information related to the file I/O.
116 ! These are the bounds of the available FORTRAN logical unit numbers for the file I/O.
117 ! Only logical unit numbers within these bounds will be chosen for I/O unit numbers.
119 INTEGER , PARAMETER :: min_file_unit = 10
120 INTEGER , PARAMETER :: max_file_unit = 99
122 ! 4. Unfortunately, the following definition is needed here (rather
123 ! than the more logical place in share/module_model_constants.F)
124 ! for the namelist reads in frame/module_configure.F, and for some
125 ! conversions in share/set_timekeeping.F
126 ! Actually, using it here will mean that we don't need to set it
127 ! in share/module_model_constants.F, since this file will be
128 ! included (USEd) in:
129 ! frame/module_configure.F
130 ! which will be USEd in:
132 ! which will be USEd in:
133 ! phys/module_radiation_driver.F
134 ! which is the other important place for it to be, and where
135 ! it is passed as a subroutine parameter to any physics subroutine.
137 ! P2SI is the number of SI seconds in an planetary solar day
138 ! divided by the number of SI seconds in an earth solar day
140 ! For Mars, P2SI = 88775.2/86400.
141 REAL , PARAMETER :: P2SI = 1.0274907
143 ! For Titan, P2SI = 1378080.0/86400.
144 REAL , PARAMETER :: P2SI = 15.95
147 REAL , PARAMETER :: P2SI = 1.0
150 SUBROUTINE init_module_driver_constants
151 END SUBROUTINE init_module_driver_constants
152 END MODULE module_driver_constants
154 ! routines that external packages can call to get at WRF stuff that isn't available
155 ! through argument lists; since they are external we don't want them using WRF
156 ! modules unnecessarily (complicates the build even more)
157 SUBROUTINE inquire_of_wrf_data_order_xyz( data_order )
158 USE module_driver_constants, ONLY : DATA_ORDER_XYZ
160 INTEGER, INTENT(OUT) :: data_order
161 data_order = DATA_ORDER_XYZ
162 END SUBROUTINE inquire_of_wrf_data_order_xyz
164 SUBROUTINE inquire_of_wrf_data_order_xzy( data_order )
165 USE module_driver_constants, ONLY : DATA_ORDER_XZY
167 INTEGER, INTENT(OUT) :: data_order
168 data_order = DATA_ORDER_XZY
169 END SUBROUTINE inquire_of_wrf_data_order_xzy
171 SUBROUTINE inquire_of_wrf_iwordsize( iwordsz )
173 INTEGER, INTENT(OUT) :: iwordsz
175 END SUBROUTINE inquire_of_wrf_iwordsize
177 SUBROUTINE inquire_of_wrf_rwordsize( rwordsz )
179 INTEGER, INTENT(OUT) :: rwordsz
181 END SUBROUTINE inquire_of_wrf_rwordsize