1 MODULE module_domain_type
3 USE module_driver_constants
6 CHARACTER (LEN=80) program_name
8 ! An entire domain. This contains multiple meteorological fields by having
9 ! arrays (such as "data_3d") of pointers for each field. Also inside each
10 ! domain is a link to a couple of other domains, one is just the
11 ! "next" domain that is to be stored, the other is the next domain which
12 ! happens to also be on the "same_level".
15 TYPE(domain), POINTER :: ptr
18 INTEGER, PARAMETER :: HISTORY_ALARM=1, AUXHIST1_ALARM=2, AUXHIST2_ALARM=3, &
19 AUXHIST3_ALARM=4, AUXHIST4_ALARM=5, AUXHIST5_ALARM=6, &
20 AUXHIST6_ALARM=7, AUXHIST7_ALARM=8, AUXHIST8_ALARM=9, &
21 AUXHIST9_ALARM=10, AUXHIST10_ALARM=11, AUXHIST11_ALARM=12, &
22 AUXINPUT1_ALARM=13, AUXINPUT2_ALARM=14, AUXINPUT3_ALARM=15, &
23 AUXINPUT4_ALARM=16, AUXINPUT5_ALARM=17, &
24 AUXINPUT6_ALARM=18, AUXINPUT7_ALARM=19, AUXINPUT8_ALARM=20, &
25 AUXINPUT9_ALARM=21, AUXINPUT10_ALARM=22, AUXINPUT11_ALARM=23, &
26 RESTART_ALARM=24, BOUNDARY_ALARM=25, INPUTOUT_ALARM=26, & ! for outputing input (e.g. for 3dvar)
28 COMPUTE_VORTEX_CENTER_ALARM=28, &
29 MAX_WRF_ALARMS=28 ! WARNING: MAX_WRF_ALARMS must be
30 ! large enough to include all of
31 ! the alarms declared above.
33 #include <state_subtypes.inc>
37 ! SEE THE INCLUDE FILE FOR DEFINITIONS OF STATE FIELDS WITHIN THE DOMAIN DATA STRUCTURE
38 #include <state_struct.inc>
40 INTEGER :: comms( max_comms ), shift_x, shift_y
44 INTEGER :: communicator
45 INTEGER :: iocommunicator
46 INTEGER,POINTER :: mapping(:,:)
47 INTEGER,POINTER :: i_start(:),i_end(:)
48 INTEGER,POINTER :: j_start(:),j_end(:)
50 INTEGER :: num_tiles ! taken out of namelist 20000908
51 INTEGER :: num_tiles_x ! taken out of namelist 20000908
52 INTEGER :: num_tiles_y ! taken out of namelist 20000908
53 INTEGER :: num_tiles_spec ! place to store number of tiles computed from
54 ! externally specified params
56 TYPE(domain_ptr) , DIMENSION( : ) , POINTER :: parents
57 TYPE(domain_ptr) , DIMENSION( : ) , POINTER :: nests
58 TYPE(domain) , POINTER :: sibling ! overlapped domains at same lev
59 TYPE(domain) , POINTER :: intermediate_grid
60 INTEGER :: num_parents, num_nests, num_siblings
61 INTEGER , DIMENSION( max_parents ) :: child_of_parent
62 INTEGER , DIMENSION( max_nests ) :: active
64 INTEGER , DIMENSION(0:5) :: nframes ! frames per outfile for history
65 ! streams (0 is main history)
67 TYPE(domain) , POINTER :: next
68 TYPE(domain) , POINTER :: same_level
70 LOGICAL , DIMENSION ( 4 ) :: bdy_mask ! which boundaries are on processor
72 LOGICAL :: first_force
76 INTEGER :: sd31, ed31, sd32, ed32, sd33, ed33, &
77 sd21, ed21, sd22, ed22, &
80 INTEGER :: sp31, ep31, sp32, ep32, sp33, ep33, &
81 sp21, ep21, sp22, ep22, &
83 sm31, em31, sm32, em32, sm33, em33, &
84 sm21, em21, sm22, em22, &
86 sp31x, ep31x, sp32x, ep32x, sp33x, ep33x, &
87 sp21x, ep21x, sp22x, ep22x, &
88 sm31x, em31x, sm32x, em32x, sm33x, em33x, &
89 sm21x, em21x, sm22x, em22x, &
90 sp31y, ep31y, sp32y, ep32y, sp33y, ep33y, &
91 sp21y, ep21y, sp22y, ep22y, &
92 sm31y, em31y, sm32y, em32y, sm33y, em33y, &
93 sm21y, em21y, sm22y, em22y
94 Type(WRFU_Clock), POINTER :: domain_clock
95 Type(WRFU_Time) :: start_subtime, stop_subtime
96 Type(WRFU_Time) :: this_bdy_time, next_bdy_time
97 Type(WRFU_Time) :: this_emi_time, next_emi_time
98 Type(WRFU_TimeInterval), DIMENSION(MAX_WRF_ALARMS) :: io_intervals
99 Type(WRFU_Alarm), POINTER :: alarms(:)
100 ! This awful hackery accounts for the fact that ESMF2.2.0 objects cannot tell
101 ! us if they have ever been created or not. So, we have to keep track of this
102 ! ourselves to avoid destroying an object that has never been created! Rip
103 ! this out once ESMF has useful introspection for creation...
104 LOGICAL :: domain_clock_created
105 LOGICAL, POINTER :: alarms_created(:)
107 ! Have clocks and times been initialized yet?
110 ! The following are used by the adaptive time step
111 ! T. Hutchinson, WSI 1/11/07
114 REAL :: last_max_vert_cfl
116 REAL :: max_horiz_cfl
117 Type(WRFU_TimeInterval) :: last_dtInterval
119 ! Time series location information
120 INTEGER :: ntsloc, ntsloc_domain
121 INTEGER :: next_ts_time
122 INTEGER, POINTER, DIMENSION(:) :: itsloc, jtsloc, id_tsloc
123 REAL, POINTER, DIMENSION(:) :: lattsloc, lontsloc
124 CHARACTER (LEN=5), POINTER, DIMENSION(:) :: nametsloc
125 CHARACTER (LEN=25), POINTER, DIMENSION(:) :: desctsloc
126 CHARACTER (LEN=256), POINTER, DIMENSION(:) :: ts_filename
127 LOGICAL :: have_calculated_tslocs
130 END MODULE module_domain_type