1 | ! Create an initial data set for the WRF model based on real data. This |
---|
2 | ! program is specifically set up for the Eulerian, mass-based coordinate. |
---|
3 | PROGRAM real_data |
---|
4 | |
---|
5 | USE module_machine |
---|
6 | USE module_domain |
---|
7 | USE module_initialize |
---|
8 | USE module_io_domain |
---|
9 | USE module_driver_constants |
---|
10 | USE module_configure |
---|
11 | USE module_timing |
---|
12 | #ifdef WRF_CHEM |
---|
13 | USE module_input_chem_data |
---|
14 | USE module_input_chem_bioemiss |
---|
15 | #endif |
---|
16 | USE module_utility |
---|
17 | #ifdef DM_PARALLEL |
---|
18 | USE module_dm |
---|
19 | #endif |
---|
20 | |
---|
21 | IMPLICIT NONE |
---|
22 | |
---|
23 | #ifdef WRF_CHEM |
---|
24 | ! interface |
---|
25 | INTERFACE |
---|
26 | ! mediation-supplied |
---|
27 | SUBROUTINE med_read_wrf_chem_bioemiss ( grid , config_flags) |
---|
28 | USE module_domain |
---|
29 | TYPE (domain) grid |
---|
30 | TYPE (grid_config_rec_type) config_flags |
---|
31 | END SUBROUTINE med_read_wrf_chem_bioemiss |
---|
32 | END INTERFACE |
---|
33 | #endif |
---|
34 | |
---|
35 | REAL :: time , bdyfrq |
---|
36 | |
---|
37 | INTEGER :: loop , levels_to_process , debug_level |
---|
38 | |
---|
39 | |
---|
40 | TYPE(domain) , POINTER :: null_domain |
---|
41 | TYPE(domain) , POINTER :: grid , another_grid |
---|
42 | TYPE(domain) , POINTER :: grid_ptr , grid_ptr2 |
---|
43 | TYPE (grid_config_rec_type) :: config_flags |
---|
44 | INTEGER :: number_at_same_level |
---|
45 | |
---|
46 | INTEGER :: max_dom, domain_id , grid_id , parent_id , parent_id1 , id |
---|
47 | INTEGER :: e_we , e_sn , i_parent_start , j_parent_start |
---|
48 | INTEGER :: idum1, idum2 |
---|
49 | #ifdef DM_PARALLEL |
---|
50 | INTEGER :: nbytes |
---|
51 | INTEGER, PARAMETER :: configbuflen = 4* CONFIG_BUF_LEN |
---|
52 | INTEGER :: configbuf( configbuflen ) |
---|
53 | LOGICAL , EXTERNAL :: wrf_dm_on_monitor |
---|
54 | #endif |
---|
55 | LOGICAL found_the_id |
---|
56 | |
---|
57 | INTEGER :: ids , ide , jds , jde , kds , kde |
---|
58 | INTEGER :: ims , ime , jms , jme , kms , kme |
---|
59 | INTEGER :: ips , ipe , jps , jpe , kps , kpe |
---|
60 | INTEGER :: ijds , ijde , spec_bdy_width |
---|
61 | INTEGER :: i , j , k , idts, rc |
---|
62 | INTEGER :: sibling_count , parent_id_hold , dom_loop |
---|
63 | |
---|
64 | CHARACTER (LEN=80) :: message |
---|
65 | |
---|
66 | INTEGER :: start_year , start_month , start_day , start_hour , start_minute , start_second |
---|
67 | INTEGER :: end_year , end_month , end_day , end_hour , end_minute , end_second |
---|
68 | INTEGER :: interval_seconds , real_data_init_type |
---|
69 | INTEGER :: time_loop_max , time_loop |
---|
70 | real::t1,t2 |
---|
71 | INTERFACE |
---|
72 | SUBROUTINE Setup_Timekeeping( grid ) |
---|
73 | USE module_domain |
---|
74 | TYPE(domain), POINTER :: grid |
---|
75 | END SUBROUTINE Setup_Timekeeping |
---|
76 | END INTERFACE |
---|
77 | |
---|
78 | #include "version_decl" |
---|
79 | |
---|
80 | ! Define the name of this program (program_name defined in module_domain) |
---|
81 | |
---|
82 | ! NOTE: share/input_wrf.F tests first 7 chars of this name to decide |
---|
83 | ! whether to read P_TOP as metadata from the SI (yes, if .eq. REAL_EM) |
---|
84 | |
---|
85 | program_name = "REAL_EM " // TRIM(release_version) // " PREPROCESSOR" |
---|
86 | |
---|
87 | #ifdef DM_PARALLEL |
---|
88 | CALL disable_quilting |
---|
89 | #endif |
---|
90 | |
---|
91 | ! Initialize the modules used by the WRF system. Many of the CALLs made from the |
---|
92 | ! init_modules routine are NO-OPs. Typical initializations are: the size of a |
---|
93 | ! REAL, setting the file handles to a pre-use value, defining moisture and |
---|
94 | ! chemistry indices, etc. |
---|
95 | |
---|
96 | CALL wrf_debug ( 100 , 'real_em: calling init_modules ' ) |
---|
97 | CALL init_modules(1) ! Phase 1 returns after MPI_INIT() (if it is called) |
---|
98 | CALL WRFU_Initialize( defaultCalendar=WRFU_CAL_GREGORIAN, rc=rc ) |
---|
99 | CALL init_modules(2) ! Phase 2 resumes after MPI_INIT() (if it is called) |
---|
100 | |
---|
101 | ! The configuration switches mostly come from the NAMELIST input. |
---|
102 | |
---|
103 | #ifdef DM_PARALLEL |
---|
104 | IF ( wrf_dm_on_monitor() ) THEN |
---|
105 | CALL initial_config |
---|
106 | ENDIF |
---|
107 | CALL get_config_as_buffer( configbuf, configbuflen, nbytes ) |
---|
108 | CALL wrf_dm_bcast_bytes( configbuf, nbytes ) |
---|
109 | CALL set_config_as_buffer( configbuf, configbuflen ) |
---|
110 | CALL wrf_dm_initialize |
---|
111 | #else |
---|
112 | CALL initial_config |
---|
113 | #endif |
---|
114 | |
---|
115 | CALL nl_get_debug_level ( 1, debug_level ) |
---|
116 | CALL set_wrf_debug_level ( debug_level ) |
---|
117 | |
---|
118 | CALL wrf_message ( program_name ) |
---|
119 | |
---|
120 | ! Allocate the space for the mother of all domains. |
---|
121 | |
---|
122 | NULLIFY( null_domain ) |
---|
123 | CALL wrf_debug ( 100 , 'real_em: calling alloc_and_configure_domain ' ) |
---|
124 | CALL alloc_and_configure_domain ( domain_id = 1 , & |
---|
125 | grid = head_grid , & |
---|
126 | parent = null_domain , & |
---|
127 | kid = -1 ) |
---|
128 | |
---|
129 | grid => head_grid |
---|
130 | CALL nl_get_max_dom ( 1 , max_dom ) |
---|
131 | |
---|
132 | IF ( model_config_rec%interval_seconds .LE. 0 ) THEN |
---|
133 | CALL wrf_error_fatal( 'namelist value for interval_seconds must be > 0') |
---|
134 | ENDIF |
---|
135 | |
---|
136 | all_domains : DO domain_id = 1 , max_dom |
---|
137 | |
---|
138 | IF ( ( model_config_rec%input_from_file(domain_id) ) .OR. & |
---|
139 | ( domain_id .EQ. 1 ) ) THEN |
---|
140 | |
---|
141 | IF ( domain_id .GT. 1 ) THEN |
---|
142 | |
---|
143 | CALL nl_get_grid_id ( domain_id, grid_id ) |
---|
144 | CALL nl_get_parent_id ( domain_id, parent_id ) |
---|
145 | CALL nl_get_e_we ( domain_id, e_we ) |
---|
146 | CALL nl_get_e_sn ( domain_id, e_sn ) |
---|
147 | CALL nl_get_i_parent_start ( domain_id, i_parent_start ) |
---|
148 | CALL nl_get_j_parent_start ( domain_id, j_parent_start ) |
---|
149 | WRITE (message,FMT='(A,2I3,2I4,2I3)') & |
---|
150 | 'new allocated domain: id, par id, dims i/j, start i/j =', & |
---|
151 | grid_id, parent_id, e_we, e_sn, i_parent_start, j_parent_start |
---|
152 | |
---|
153 | CALL wrf_debug ( 100 , message ) |
---|
154 | CALL nl_get_grid_id ( parent_id, grid_id ) |
---|
155 | CALL nl_get_parent_id ( parent_id, parent_id1 ) |
---|
156 | CALL nl_get_e_we ( parent_id, e_we ) |
---|
157 | CALL nl_get_e_sn ( parent_id, e_sn ) |
---|
158 | CALL nl_get_i_parent_start ( parent_id, i_parent_start ) |
---|
159 | CALL nl_get_j_parent_start ( parent_id, j_parent_start ) |
---|
160 | WRITE (message,FMT='(A,2I3,2I4,2I3)') & |
---|
161 | 'parent domain: id, par id, dims i/j, start i/j =', & |
---|
162 | grid_id, parent_id1, e_we, e_sn, i_parent_start, j_parent_start |
---|
163 | CALL wrf_debug ( 100 , message ) |
---|
164 | |
---|
165 | CALL nl_get_grid_id ( domain_id, grid_id ) |
---|
166 | CALL nl_get_parent_id ( domain_id, parent_id ) |
---|
167 | CALL nl_get_e_we ( domain_id, e_we ) |
---|
168 | CALL nl_get_e_sn ( domain_id, e_sn ) |
---|
169 | CALL nl_get_i_parent_start ( domain_id, i_parent_start ) |
---|
170 | CALL nl_get_j_parent_start ( domain_id, j_parent_start ) |
---|
171 | grid_ptr2 => head_grid |
---|
172 | found_the_id = .FALSE. |
---|
173 | CALL find_my_parent ( grid_ptr2 , grid_ptr , domain_id , parent_id , found_the_id ) |
---|
174 | IF ( found_the_id ) THEN |
---|
175 | |
---|
176 | sibling_count = 0 |
---|
177 | DO dom_loop = 2 , domain_id |
---|
178 | CALL nl_get_parent_id ( dom_loop, parent_id_hold ) |
---|
179 | IF ( parent_id_hold .EQ. parent_id ) THEN |
---|
180 | sibling_count = sibling_count + 1 |
---|
181 | END IF |
---|
182 | END DO |
---|
183 | CALL alloc_and_configure_domain ( domain_id = domain_id , & |
---|
184 | grid = another_grid , & |
---|
185 | parent = grid_ptr , & |
---|
186 | kid = sibling_count ) |
---|
187 | grid => another_grid |
---|
188 | ELSE |
---|
189 | CALL wrf_error_fatal( 'real_em.F: Could not find the parent domain') |
---|
190 | END IF |
---|
191 | END IF |
---|
192 | |
---|
193 | CALL Setup_Timekeeping ( grid ) |
---|
194 | CALL set_current_grid_ptr( grid ) |
---|
195 | CALL domain_clockprint ( 150, grid, & |
---|
196 | 'DEBUG real: clock after Setup_Timekeeping,' ) |
---|
197 | CALL domain_clock_set( grid, & |
---|
198 | time_step_seconds=model_config_rec%interval_seconds ) |
---|
199 | CALL domain_clockprint ( 150, grid, & |
---|
200 | 'DEBUG real: clock after timeStep set,' ) |
---|
201 | |
---|
202 | |
---|
203 | CALL wrf_debug ( 100 , 'real_em: calling set_scalar_indices_from_config ' ) |
---|
204 | CALL set_scalar_indices_from_config ( grid%id , idum1, idum2 ) |
---|
205 | |
---|
206 | CALL wrf_debug ( 100 , 'real_em: calling model_to_grid_config_rec ' ) |
---|
207 | CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags ) |
---|
208 | |
---|
209 | ! Initialize the WRF IO: open files, init file handles, etc. |
---|
210 | |
---|
211 | CALL wrf_debug ( 100 , 'real_em: calling init_wrfio' ) |
---|
212 | CALL init_wrfio |
---|
213 | |
---|
214 | |
---|
215 | ! Some of the configuration values may have been modified from the initial READ |
---|
216 | ! of the NAMELIST, so we re-broadcast the configuration records. |
---|
217 | |
---|
218 | #ifdef DM_PARALLEL |
---|
219 | CALL wrf_debug ( 100 , 'real_em: re-broadcast the configuration records' ) |
---|
220 | CALL get_config_as_buffer( configbuf, configbuflen, nbytes ) |
---|
221 | CALL wrf_dm_bcast_bytes( configbuf, nbytes ) |
---|
222 | CALL set_config_as_buffer( configbuf, configbuflen ) |
---|
223 | #endif |
---|
224 | |
---|
225 | ! No looping in this layer. |
---|
226 | |
---|
227 | CALL wrf_debug ( 100 , 'calling med_sidata_input' ) |
---|
228 | CALL med_sidata_input ( grid , config_flags ) |
---|
229 | CALL wrf_debug ( 100 , 'backfrom med_sidata_input' ) |
---|
230 | |
---|
231 | ELSE |
---|
232 | CYCLE all_domains |
---|
233 | END IF |
---|
234 | |
---|
235 | END DO all_domains |
---|
236 | |
---|
237 | CALL set_current_grid_ptr( head_grid ) |
---|
238 | |
---|
239 | ! We are done. |
---|
240 | |
---|
241 | CALL wrf_debug ( 0 , 'real_em: SUCCESS COMPLETE REAL_EM INIT' ) |
---|
242 | |
---|
243 | CALL wrf_shutdown |
---|
244 | |
---|
245 | CALL WRFU_Finalize( rc=rc ) |
---|
246 | |
---|
247 | END PROGRAM real_data |
---|
248 | |
---|
249 | SUBROUTINE med_sidata_input ( grid , config_flags ) |
---|
250 | ! Driver layer |
---|
251 | USE module_domain |
---|
252 | USE module_io_domain |
---|
253 | ! Model layer |
---|
254 | USE module_configure |
---|
255 | USE module_bc_time_utilities |
---|
256 | USE module_initialize |
---|
257 | USE module_optional_si_input |
---|
258 | #ifdef WRF_CHEM |
---|
259 | USE module_input_chem_data |
---|
260 | USE module_input_chem_bioemiss |
---|
261 | #endif |
---|
262 | |
---|
263 | USE module_date_time |
---|
264 | USE module_utility |
---|
265 | |
---|
266 | IMPLICIT NONE |
---|
267 | |
---|
268 | |
---|
269 | ! Interface |
---|
270 | INTERFACE |
---|
271 | SUBROUTINE start_domain ( grid , allowed_to_read ) ! comes from module_start in appropriate dyn_ directory |
---|
272 | USE module_domain |
---|
273 | TYPE (domain) grid |
---|
274 | LOGICAL, INTENT(IN) :: allowed_to_read |
---|
275 | END SUBROUTINE start_domain |
---|
276 | END INTERFACE |
---|
277 | |
---|
278 | ! Arguments |
---|
279 | TYPE(domain) :: grid |
---|
280 | TYPE (grid_config_rec_type) :: config_flags |
---|
281 | ! Local |
---|
282 | INTEGER :: time_step_begin_restart |
---|
283 | INTEGER :: idsi , ierr , myproc |
---|
284 | CHARACTER (LEN=80) :: si_inpname |
---|
285 | CHARACTER (LEN=80) :: message |
---|
286 | |
---|
287 | CHARACTER(LEN=19) :: start_date_char , end_date_char , current_date_char , next_date_char |
---|
288 | |
---|
289 | INTEGER :: time_loop_max , loop, rc |
---|
290 | INTEGER :: julyr , julday |
---|
291 | REAL :: gmt |
---|
292 | real::t1,t2,t3,t4 |
---|
293 | |
---|
294 | grid%input_from_file = .true. |
---|
295 | grid%input_from_file = .false. |
---|
296 | |
---|
297 | CALL compute_si_start_and_end ( model_config_rec%start_year (grid%id) , & |
---|
298 | model_config_rec%start_month (grid%id) , & |
---|
299 | model_config_rec%start_day (grid%id) , & |
---|
300 | model_config_rec%start_hour (grid%id) , & |
---|
301 | model_config_rec%start_minute(grid%id) , & |
---|
302 | model_config_rec%start_second(grid%id) , & |
---|
303 | model_config_rec% end_year (grid%id) , & |
---|
304 | model_config_rec% end_month (grid%id) , & |
---|
305 | model_config_rec% end_day (grid%id) , & |
---|
306 | model_config_rec% end_hour (grid%id) , & |
---|
307 | model_config_rec% end_minute(grid%id) , & |
---|
308 | model_config_rec% end_second(grid%id) , & |
---|
309 | model_config_rec%interval_seconds , & |
---|
310 | model_config_rec%real_data_init_type , & |
---|
311 | start_date_char , end_date_char , time_loop_max ) |
---|
312 | |
---|
313 | ! Override stop time with value computed above. |
---|
314 | CALL domain_clock_set( grid, stop_timestr=end_date_char ) |
---|
315 | |
---|
316 | ! TBH: for now, turn off stop time and let it run data-driven |
---|
317 | CALL WRFU_ClockStopTimeDisable( grid%domain_clock, rc=rc ) |
---|
318 | CALL wrf_check_error( WRFU_SUCCESS, rc, & |
---|
319 | 'WRFU_ClockStopTimeDisable(grid%domain_clock) FAILED', & |
---|
320 | __FILE__ , & |
---|
321 | __LINE__ ) |
---|
322 | CALL domain_clockprint ( 150, grid, & |
---|
323 | 'DEBUG med_sidata_input: clock after stopTime set,' ) |
---|
324 | |
---|
325 | ! Here we define the initial time to process, for later use by the code. |
---|
326 | |
---|
327 | current_date_char = start_date_char |
---|
328 | start_date = start_date_char // '.0000' |
---|
329 | current_date = start_date |
---|
330 | |
---|
331 | CALL nl_set_bdyfrq ( grid%id , REAL(model_config_rec%interval_seconds) ) |
---|
332 | |
---|
333 | !!!!!!! Loop over each time period to process. |
---|
334 | |
---|
335 | CALL cpu_time ( t1 ) |
---|
336 | DO loop = 1 , time_loop_max |
---|
337 | |
---|
338 | internal_time_loop = loop |
---|
339 | IF ( ( grid%id .GT. 1 ) .AND. ( loop .GT. 1 ) .AND. (model_config_rec%grid_fdda(grid%id) .EQ. 0) ) EXIT |
---|
340 | |
---|
341 | print *,' ' |
---|
342 | print *,'-----------------------------------------------------------------------------' |
---|
343 | print *,' ' |
---|
344 | print '(A,I2,A,A,A,I2,A,I2)' , & |
---|
345 | ' Domain ',grid%id,': Current date being processed: ',current_date, ', which is loop #',loop,' out of ',time_loop_max |
---|
346 | |
---|
347 | ! After current_date has been set, fill in the julgmt stuff. |
---|
348 | |
---|
349 | CALL geth_julgmt ( config_flags%julyr , config_flags%julday , config_flags%gmt ) |
---|
350 | |
---|
351 | print *,'configflags%julyr, %julday, %gmt:',config_flags%julyr, config_flags%julday, config_flags%gmt |
---|
352 | ! Now that the specific Julian info is available, save these in the model config record. |
---|
353 | |
---|
354 | CALL nl_set_gmt (grid%id, config_flags%gmt) |
---|
355 | CALL nl_set_julyr (grid%id, config_flags%julyr) |
---|
356 | CALL nl_set_julday (grid%id, config_flags%julday) |
---|
357 | |
---|
358 | ! Open the input file for real. This is either the "new" one or the "old" one. The "new" one could have |
---|
359 | ! a suffix for the type of the data format. Check to see if either is around. |
---|
360 | |
---|
361 | CALL cpu_time ( t3 ) |
---|
362 | IF ( grid%dyn_opt .EQ. dyn_em ) THEN |
---|
363 | WRITE ( wrf_err_message , FMT='(A,A)' )'med_sidata_input: calling open_r_dataset for ', & |
---|
364 | TRIM(config_flags%auxinput1_inname) |
---|
365 | CALL wrf_debug ( 100 , wrf_err_message ) |
---|
366 | CALL construct_filename4a( si_inpname , config_flags%auxinput1_inname , grid%id , 2 , & |
---|
367 | current_date_char , config_flags%io_form_auxinput1 ) |
---|
368 | CALL open_r_dataset ( idsi, TRIM(si_inpname) , grid , config_flags , "DATASET=AUXINPUT1", ierr ) |
---|
369 | IF ( ierr .NE. 0 ) THEN |
---|
370 | CALL wrf_debug( 1 , 'error opening ' // TRIM(si_inpname) // & |
---|
371 | ' for input; bad date in namelist or file not in directory' ) |
---|
372 | CALL wrf_debug( 1 , 'will try again without the extension' ) |
---|
373 | CALL construct_filename2a( si_inpname , config_flags%auxinput1_inname , grid%id , 2 , current_date_char ) |
---|
374 | CALL open_r_dataset ( idsi, TRIM(si_inpname) , grid , config_flags , "DATASET=AUXINPUT1", ierr ) |
---|
375 | IF ( ierr .NE. 0 ) THEN |
---|
376 | CALL wrf_error_fatal( 'error opening ' // TRIM(si_inpname) // & |
---|
377 | ' for input; bad date in namelist or file not in directory' ) |
---|
378 | ENDIF |
---|
379 | ENDIF |
---|
380 | END IF |
---|
381 | |
---|
382 | ! Input data. |
---|
383 | |
---|
384 | CALL wrf_debug ( 100 , 'med_sidata_input: calling input_aux_model_input1' ) |
---|
385 | CALL input_aux_model_input1 ( idsi , grid , config_flags , ierr ) |
---|
386 | CALL cpu_time ( t4 ) |
---|
387 | WRITE ( wrf_err_message , FMT='(A,I10,A)' ) 'Timing for input ',NINT(t4-t3) ,' s.' |
---|
388 | CALL wrf_debug( 0, wrf_err_message ) |
---|
389 | |
---|
390 | ! Possible optional SI input. This sets flags used by init_domain. |
---|
391 | |
---|
392 | CALL cpu_time ( t3 ) |
---|
393 | IF ( loop .EQ. 1 ) THEN |
---|
394 | already_been_here = .FALSE. |
---|
395 | CALL wrf_debug ( 100 , 'med_sidata_input: calling init_module_optional_si_input' ) |
---|
396 | CALL init_module_optional_si_input ( grid , config_flags ) |
---|
397 | END IF |
---|
398 | CALL wrf_debug ( 100 , 'med_sidata_input: calling optional_si_input' ) |
---|
399 | CALL optional_si_input ( grid , idsi ) |
---|
400 | |
---|
401 | ! Initialize the mother domain for this time period with input data. |
---|
402 | |
---|
403 | CALL wrf_debug ( 100 , 'med_sidata_input: calling init_domain' ) |
---|
404 | grid%input_from_file = .true. |
---|
405 | CALL init_domain ( grid ) |
---|
406 | CALL cpu_time ( t4 ) |
---|
407 | WRITE ( wrf_err_message , FMT='(A,I10,A)' ) 'Timing for processing ',NINT(t4-t3) ,' s.' |
---|
408 | CALL wrf_debug( 0, wrf_err_message ) |
---|
409 | CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags ) |
---|
410 | |
---|
411 | ! Close this file that is output from the SI and input to this pre-proc. |
---|
412 | |
---|
413 | CALL wrf_debug ( 100 , 'med_sidata_input: back from init_domain' ) |
---|
414 | CALL close_dataset ( idsi , config_flags , "DATASET=INPUT" ) |
---|
415 | |
---|
416 | ! CALL start_domain ( grid , .TRUE. ) |
---|
417 | |
---|
418 | #ifdef WRF_CHEM |
---|
419 | IF ( loop == 1 ) THEN |
---|
420 | IF( grid%chem_opt > 0 ) then |
---|
421 | ! Read the chemistry data from a previous wrf forecast (wrfout file) |
---|
422 | IF(grid%chem_in_opt == 1 ) THEN |
---|
423 | message = 'INITIALIZING CHEMISTRY WITH OLD SIMULATION' |
---|
424 | CALL wrf_message ( message ) |
---|
425 | |
---|
426 | CALL input_ext_chem_file( grid ) |
---|
427 | |
---|
428 | IF(grid%bio_emiss_opt == BEIS311 ) THEN |
---|
429 | message = 'READING BEIS3.11 EMISSIONS DATA' |
---|
430 | CALL wrf_message ( message ) |
---|
431 | CALL med_read_wrf_chem_bioemiss ( grid , config_flags) |
---|
432 | END IF |
---|
433 | |
---|
434 | ELSEIF(grid%chem_in_opt == 0)then |
---|
435 | ! Generate chemistry data from a idealized vertical profile |
---|
436 | message = 'STARTING WITH BACKGROUND CHEMISTRY ' |
---|
437 | CALL wrf_message ( message ) |
---|
438 | |
---|
439 | CALL input_chem_profile ( grid ) |
---|
440 | |
---|
441 | IF(grid%bio_emiss_opt == BEIS311 ) THEN |
---|
442 | message = 'READING BEIS3.11 EMISSIONS DATA' |
---|
443 | CALL wrf_message ( message ) |
---|
444 | CALL med_read_wrf_chem_bioemiss ( grid , config_flags) |
---|
445 | END IF |
---|
446 | |
---|
447 | ELSE |
---|
448 | message = 'RUNNING WITHOUT CHEMISTRY INITIALIZATION' |
---|
449 | CALL wrf_message ( message ) |
---|
450 | ENDIF |
---|
451 | ENDIF |
---|
452 | ENDIF |
---|
453 | #endif |
---|
454 | |
---|
455 | CALL cpu_time ( t3 ) |
---|
456 | CALL assemble_output ( grid , config_flags , loop , time_loop_max ) |
---|
457 | CALL cpu_time ( t4 ) |
---|
458 | WRITE ( wrf_err_message , FMT='(A,I10,A)' ) 'Timing for output ',NINT(t4-t3) ,' s.' |
---|
459 | CALL wrf_debug( 0, wrf_err_message ) |
---|
460 | CALL cpu_time ( t2 ) |
---|
461 | WRITE ( wrf_err_message , FMT='(A,I4,A,I10,A)' ) 'Timing for loop # ',loop,' = ',NINT(t2-t1) ,' s.' |
---|
462 | CALL wrf_debug( 0, wrf_err_message ) |
---|
463 | |
---|
464 | ! If this is not the last time, we define the next time that we are going to process. |
---|
465 | |
---|
466 | IF ( loop .NE. time_loop_max ) THEN |
---|
467 | CALL geth_newdate ( current_date_char , start_date_char , loop * model_config_rec%interval_seconds ) |
---|
468 | current_date = current_date_char // '.0000' |
---|
469 | CALL domain_clockprint ( 150, grid, & |
---|
470 | 'DEBUG med_sidata_input: clock before current_date set,' ) |
---|
471 | WRITE (wrf_err_message,*) & |
---|
472 | 'DEBUG med_sidata_input: before currTime set, current_date = ',TRIM(current_date) |
---|
473 | CALL wrf_debug ( 150 , wrf_err_message ) |
---|
474 | CALL domain_clock_set( grid, current_date(1:19) ) |
---|
475 | CALL domain_clockprint ( 150, grid, & |
---|
476 | 'DEBUG med_sidata_input: clock after current_date set,' ) |
---|
477 | END IF |
---|
478 | CALL cpu_time ( t1 ) |
---|
479 | END DO |
---|
480 | |
---|
481 | END SUBROUTINE med_sidata_input |
---|
482 | |
---|
483 | SUBROUTINE compute_si_start_and_end ( & |
---|
484 | start_year , start_month , start_day , start_hour , start_minute , start_second , & |
---|
485 | end_year , end_month , end_day , end_hour , end_minute , end_second , & |
---|
486 | interval_seconds , real_data_init_type , & |
---|
487 | start_date_char , end_date_char , time_loop_max ) |
---|
488 | |
---|
489 | USE module_date_time |
---|
490 | |
---|
491 | IMPLICIT NONE |
---|
492 | |
---|
493 | INTEGER :: start_year , start_month , start_day , start_hour , start_minute , start_second |
---|
494 | INTEGER :: end_year , end_month , end_day , end_hour , end_minute , end_second |
---|
495 | INTEGER :: interval_seconds , real_data_init_type |
---|
496 | INTEGER :: time_loop_max , time_loop |
---|
497 | |
---|
498 | CHARACTER(LEN=19) :: current_date_char , start_date_char , end_date_char , next_date_char |
---|
499 | |
---|
500 | WRITE ( start_date_char , FMT = '(I4.4,"-",I2.2,"-",I2.2,"_",I2.2,":",I2.2,":",I2.2)' ) & |
---|
501 | start_year,start_month,start_day,start_hour,start_minute,start_second |
---|
502 | WRITE ( end_date_char , FMT = '(I4.4,"-",I2.2,"-",I2.2,"_",I2.2,":",I2.2,":",I2.2)' ) & |
---|
503 | end_year, end_month, end_day, end_hour, end_minute, end_second |
---|
504 | |
---|
505 | IF ( end_date_char .LT. start_date_char ) THEN |
---|
506 | CALL wrf_error_fatal( 'Ending date in namelist ' // end_date_char // ' prior to beginning date ' // start_date_char ) |
---|
507 | END IF |
---|
508 | |
---|
509 | ! start_date = start_date_char // '.0000' |
---|
510 | |
---|
511 | ! Figure out our loop count for the processing times. |
---|
512 | |
---|
513 | time_loop = 1 |
---|
514 | PRINT '(A,I4,A,A,A)','Time period #',time_loop,' to process = ',start_date_char,'.' |
---|
515 | current_date_char = start_date_char |
---|
516 | loop_count : DO |
---|
517 | CALL geth_newdate ( next_date_char , current_date_char , interval_seconds ) |
---|
518 | IF ( next_date_char .LT. end_date_char ) THEN |
---|
519 | time_loop = time_loop + 1 |
---|
520 | PRINT '(A,I4,A,A,A)','Time period #',time_loop,' to process = ',next_date_char,'.' |
---|
521 | current_date_char = next_date_char |
---|
522 | ELSE IF ( next_date_char .EQ. end_date_char ) THEN |
---|
523 | time_loop = time_loop + 1 |
---|
524 | PRINT '(A,I4,A,A,A)','Time period #',time_loop,' to process = ',next_date_char,'.' |
---|
525 | PRINT '(A,I4,A)','Total analysis times to input = ',time_loop,'.' |
---|
526 | time_loop_max = time_loop |
---|
527 | EXIT loop_count |
---|
528 | ELSE IF ( next_date_char .GT. end_date_char ) THEN |
---|
529 | PRINT '(A,I4,A)','Total analysis times to input = ',time_loop,'.' |
---|
530 | time_loop_max = time_loop |
---|
531 | EXIT loop_count |
---|
532 | END IF |
---|
533 | END DO loop_count |
---|
534 | END SUBROUTINE compute_si_start_and_end |
---|
535 | |
---|
536 | SUBROUTINE assemble_output ( grid , config_flags , loop , time_loop_max ) |
---|
537 | |
---|
538 | USE module_big_step_utilities_em |
---|
539 | USE module_domain |
---|
540 | USE module_io_domain |
---|
541 | USE module_configure |
---|
542 | USE module_date_time |
---|
543 | USE module_bc |
---|
544 | IMPLICIT NONE |
---|
545 | |
---|
546 | TYPE(domain) :: grid |
---|
547 | TYPE (grid_config_rec_type) :: config_flags |
---|
548 | INTEGER , INTENT(IN) :: loop , time_loop_max |
---|
549 | |
---|
550 | INTEGER :: ids , ide , jds , jde , kds , kde |
---|
551 | INTEGER :: ims , ime , jms , jme , kms , kme |
---|
552 | INTEGER :: ips , ipe , jps , jpe , kps , kpe |
---|
553 | INTEGER :: ijds , ijde , spec_bdy_width |
---|
554 | INTEGER :: i , j , k , idts |
---|
555 | |
---|
556 | INTEGER :: id1 , interval_seconds , ierr, rc, sst_update, grid_fdda |
---|
557 | INTEGER , SAVE :: id, id2, id5 |
---|
558 | CHARACTER (LEN=80) :: inpname , bdyname |
---|
559 | CHARACTER(LEN= 4) :: loop_char |
---|
560 | character *19 :: temp19 |
---|
561 | character *24 :: temp24 , temp24b |
---|
562 | |
---|
563 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: ubdy3dtemp1 , vbdy3dtemp1 , tbdy3dtemp1 , pbdy3dtemp1 , qbdy3dtemp1 |
---|
564 | !!!!***MARS >> |
---|
565 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q2bdy3dtemp1 |
---|
566 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q3bdy3dtemp1 |
---|
567 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q4bdy3dtemp1 |
---|
568 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q5bdy3dtemp1 |
---|
569 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q6bdy3dtemp1 |
---|
570 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q7bdy3dtemp1 |
---|
571 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q8bdy3dtemp1 |
---|
572 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q9bdy3dtemp1 |
---|
573 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q10bdy3dtemp1 |
---|
574 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q11bdy3dtemp1 |
---|
575 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q12bdy3dtemp1 |
---|
576 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q13bdy3dtemp1 |
---|
577 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q14bdy3dtemp1 |
---|
578 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q15bdy3dtemp1 |
---|
579 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q16bdy3dtemp1 |
---|
580 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q17bdy3dtemp1 |
---|
581 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q18bdy3dtemp1 |
---|
582 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q19bdy3dtemp1 |
---|
583 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q20bdy3dtemp1 |
---|
584 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q21bdy3dtemp1 |
---|
585 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q22bdy3dtemp1 |
---|
586 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q23bdy3dtemp1 |
---|
587 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q24bdy3dtemp1 |
---|
588 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q25bdy3dtemp1 |
---|
589 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q26bdy3dtemp1 |
---|
590 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q27bdy3dtemp1 |
---|
591 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q28bdy3dtemp1 |
---|
592 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q29bdy3dtemp1 |
---|
593 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q30bdy3dtemp1 |
---|
594 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q31bdy3dtemp1 |
---|
595 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q32bdy3dtemp1 |
---|
596 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q33bdy3dtemp1 |
---|
597 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q34bdy3dtemp1 |
---|
598 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q35bdy3dtemp1 |
---|
599 | !!!!***MARS << |
---|
600 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: mbdy2dtemp1 |
---|
601 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: ubdy3dtemp2 , vbdy3dtemp2 , tbdy3dtemp2 , pbdy3dtemp2 , qbdy3dtemp2 |
---|
602 | !!!!***MARS >> |
---|
603 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q2bdy3dtemp2 |
---|
604 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q3bdy3dtemp2 |
---|
605 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q4bdy3dtemp2 |
---|
606 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q5bdy3dtemp2 |
---|
607 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q6bdy3dtemp2 |
---|
608 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q7bdy3dtemp2 |
---|
609 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q8bdy3dtemp2 |
---|
610 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q9bdy3dtemp2 |
---|
611 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q10bdy3dtemp2 |
---|
612 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q11bdy3dtemp2 |
---|
613 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q12bdy3dtemp2 |
---|
614 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q13bdy3dtemp2 |
---|
615 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q14bdy3dtemp2 |
---|
616 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q15bdy3dtemp2 |
---|
617 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q16bdy3dtemp2 |
---|
618 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q17bdy3dtemp2 |
---|
619 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q18bdy3dtemp2 |
---|
620 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q19bdy3dtemp2 |
---|
621 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q20bdy3dtemp2 |
---|
622 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q21bdy3dtemp2 |
---|
623 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q22bdy3dtemp2 |
---|
624 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q23bdy3dtemp2 |
---|
625 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q24bdy3dtemp2 |
---|
626 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q25bdy3dtemp2 |
---|
627 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q26bdy3dtemp2 |
---|
628 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q27bdy3dtemp2 |
---|
629 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q28bdy3dtemp2 |
---|
630 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q29bdy3dtemp2 |
---|
631 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q30bdy3dtemp2 |
---|
632 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q31bdy3dtemp2 |
---|
633 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q32bdy3dtemp2 |
---|
634 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q33bdy3dtemp2 |
---|
635 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q34bdy3dtemp2 |
---|
636 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: q35bdy3dtemp2 |
---|
637 | !!!!***MARS << |
---|
638 | REAL , DIMENSION(:,:,:) , ALLOCATABLE , SAVE :: mbdy2dtemp2 |
---|
639 | real::t1,t2 |
---|
640 | |
---|
641 | ! Various sizes that we need to be concerned about. |
---|
642 | |
---|
643 | ids = grid%sd31 |
---|
644 | ide = grid%ed31 |
---|
645 | kds = grid%sd32 |
---|
646 | kde = grid%ed32 |
---|
647 | jds = grid%sd33 |
---|
648 | jde = grid%ed33 |
---|
649 | |
---|
650 | ims = grid%sm31 |
---|
651 | ime = grid%em31 |
---|
652 | kms = grid%sm32 |
---|
653 | kme = grid%em32 |
---|
654 | jms = grid%sm33 |
---|
655 | jme = grid%em33 |
---|
656 | |
---|
657 | ips = grid%sp31 |
---|
658 | ipe = grid%ep31 |
---|
659 | kps = grid%sp32 |
---|
660 | kpe = grid%ep32 |
---|
661 | jps = grid%sp33 |
---|
662 | jpe = grid%ep33 |
---|
663 | |
---|
664 | ijds = MIN ( ids , jds ) |
---|
665 | ijde = MAX ( ide , jde ) |
---|
666 | |
---|
667 | ! Boundary width, scalar value. |
---|
668 | |
---|
669 | spec_bdy_width = model_config_rec%spec_bdy_width |
---|
670 | interval_seconds = model_config_rec%interval_seconds |
---|
671 | sst_update = model_config_rec%sst_update |
---|
672 | grid_fdda = model_config_rec%grid_fdda(grid%id) |
---|
673 | |
---|
674 | |
---|
675 | IF ( loop .EQ. 1 ) THEN |
---|
676 | |
---|
677 | ! This is the space needed to save the current 3d data for use in computing |
---|
678 | ! the lateral boundary tendencies. |
---|
679 | |
---|
680 | IF ( ALLOCATED ( ubdy3dtemp1 ) ) DEALLOCATE ( ubdy3dtemp1 ) |
---|
681 | IF ( ALLOCATED ( vbdy3dtemp1 ) ) DEALLOCATE ( vbdy3dtemp1 ) |
---|
682 | IF ( ALLOCATED ( tbdy3dtemp1 ) ) DEALLOCATE ( tbdy3dtemp1 ) |
---|
683 | IF ( ALLOCATED ( pbdy3dtemp1 ) ) DEALLOCATE ( pbdy3dtemp1 ) |
---|
684 | IF ( ALLOCATED ( qbdy3dtemp1 ) ) DEALLOCATE ( qbdy3dtemp1 ) |
---|
685 | !!!!***MARS >> |
---|
686 | IF ( ALLOCATED ( q2bdy3dtemp1 ) ) DEALLOCATE ( q2bdy3dtemp1 ) |
---|
687 | IF ( ALLOCATED ( q3bdy3dtemp1 ) ) DEALLOCATE ( q3bdy3dtemp1 ) |
---|
688 | IF ( ALLOCATED ( q4bdy3dtemp1 ) ) DEALLOCATE ( q4bdy3dtemp1 ) |
---|
689 | IF ( ALLOCATED ( q5bdy3dtemp1 ) ) DEALLOCATE ( q5bdy3dtemp1 ) |
---|
690 | IF ( ALLOCATED ( q6bdy3dtemp1 ) ) DEALLOCATE ( q6bdy3dtemp1 ) |
---|
691 | IF ( ALLOCATED ( q7bdy3dtemp1 ) ) DEALLOCATE ( q7bdy3dtemp1 ) |
---|
692 | IF ( ALLOCATED ( q8bdy3dtemp1 ) ) DEALLOCATE ( q8bdy3dtemp1 ) |
---|
693 | IF ( ALLOCATED ( q9bdy3dtemp1 ) ) DEALLOCATE ( q9bdy3dtemp1 ) |
---|
694 | IF ( ALLOCATED ( q10bdy3dtemp1 ) ) DEALLOCATE ( q10bdy3dtemp1 ) |
---|
695 | IF ( ALLOCATED ( q11bdy3dtemp1 ) ) DEALLOCATE ( q11bdy3dtemp1 ) |
---|
696 | IF ( ALLOCATED ( q12bdy3dtemp1 ) ) DEALLOCATE ( q12bdy3dtemp1 ) |
---|
697 | IF ( ALLOCATED ( q13bdy3dtemp1 ) ) DEALLOCATE ( q13bdy3dtemp1 ) |
---|
698 | IF ( ALLOCATED ( q14bdy3dtemp1 ) ) DEALLOCATE ( q14bdy3dtemp1 ) |
---|
699 | IF ( ALLOCATED ( q15bdy3dtemp1 ) ) DEALLOCATE ( q15bdy3dtemp1 ) |
---|
700 | IF ( ALLOCATED ( q16bdy3dtemp1 ) ) DEALLOCATE ( q16bdy3dtemp1 ) |
---|
701 | IF ( ALLOCATED ( q17bdy3dtemp1 ) ) DEALLOCATE ( q17bdy3dtemp1 ) |
---|
702 | IF ( ALLOCATED ( q18bdy3dtemp1 ) ) DEALLOCATE ( q18bdy3dtemp1 ) |
---|
703 | IF ( ALLOCATED ( q19bdy3dtemp1 ) ) DEALLOCATE ( q19bdy3dtemp1 ) |
---|
704 | IF ( ALLOCATED ( q20bdy3dtemp1 ) ) DEALLOCATE ( q20bdy3dtemp1 ) |
---|
705 | IF ( ALLOCATED ( q21bdy3dtemp1 ) ) DEALLOCATE ( q21bdy3dtemp1 ) |
---|
706 | IF ( ALLOCATED ( q22bdy3dtemp1 ) ) DEALLOCATE ( q22bdy3dtemp1 ) |
---|
707 | IF ( ALLOCATED ( q23bdy3dtemp1 ) ) DEALLOCATE ( q23bdy3dtemp1 ) |
---|
708 | IF ( ALLOCATED ( q24bdy3dtemp1 ) ) DEALLOCATE ( q24bdy3dtemp1 ) |
---|
709 | IF ( ALLOCATED ( q25bdy3dtemp1 ) ) DEALLOCATE ( q25bdy3dtemp1 ) |
---|
710 | IF ( ALLOCATED ( q26bdy3dtemp1 ) ) DEALLOCATE ( q26bdy3dtemp1 ) |
---|
711 | IF ( ALLOCATED ( q27bdy3dtemp1 ) ) DEALLOCATE ( q27bdy3dtemp1 ) |
---|
712 | IF ( ALLOCATED ( q28bdy3dtemp1 ) ) DEALLOCATE ( q28bdy3dtemp1 ) |
---|
713 | IF ( ALLOCATED ( q29bdy3dtemp1 ) ) DEALLOCATE ( q29bdy3dtemp1 ) |
---|
714 | IF ( ALLOCATED ( q30bdy3dtemp1 ) ) DEALLOCATE ( q30bdy3dtemp1 ) |
---|
715 | IF ( ALLOCATED ( q31bdy3dtemp1 ) ) DEALLOCATE ( q31bdy3dtemp1 ) |
---|
716 | IF ( ALLOCATED ( q32bdy3dtemp1 ) ) DEALLOCATE ( q32bdy3dtemp1 ) |
---|
717 | IF ( ALLOCATED ( q33bdy3dtemp1 ) ) DEALLOCATE ( q33bdy3dtemp1 ) |
---|
718 | IF ( ALLOCATED ( q34bdy3dtemp1 ) ) DEALLOCATE ( q34bdy3dtemp1 ) |
---|
719 | IF ( ALLOCATED ( q35bdy3dtemp1 ) ) DEALLOCATE ( q35bdy3dtemp1 ) |
---|
720 | !!!!***MARS << |
---|
721 | IF ( ALLOCATED ( mbdy2dtemp1 ) ) DEALLOCATE ( mbdy2dtemp1 ) |
---|
722 | IF ( ALLOCATED ( ubdy3dtemp2 ) ) DEALLOCATE ( ubdy3dtemp2 ) |
---|
723 | IF ( ALLOCATED ( vbdy3dtemp2 ) ) DEALLOCATE ( vbdy3dtemp2 ) |
---|
724 | IF ( ALLOCATED ( tbdy3dtemp2 ) ) DEALLOCATE ( tbdy3dtemp2 ) |
---|
725 | IF ( ALLOCATED ( pbdy3dtemp2 ) ) DEALLOCATE ( pbdy3dtemp2 ) |
---|
726 | IF ( ALLOCATED ( qbdy3dtemp2 ) ) DEALLOCATE ( qbdy3dtemp2 ) |
---|
727 | !!!!***MARS >> |
---|
728 | IF ( ALLOCATED ( q2bdy3dtemp2 ) ) DEALLOCATE ( q2bdy3dtemp2 ) |
---|
729 | IF ( ALLOCATED ( q3bdy3dtemp2 ) ) DEALLOCATE ( q3bdy3dtemp2 ) |
---|
730 | IF ( ALLOCATED ( q4bdy3dtemp2 ) ) DEALLOCATE ( q4bdy3dtemp2 ) |
---|
731 | IF ( ALLOCATED ( q5bdy3dtemp2 ) ) DEALLOCATE ( q5bdy3dtemp2 ) |
---|
732 | IF ( ALLOCATED ( q6bdy3dtemp2 ) ) DEALLOCATE ( q6bdy3dtemp2 ) |
---|
733 | IF ( ALLOCATED ( q7bdy3dtemp2 ) ) DEALLOCATE ( q7bdy3dtemp2 ) |
---|
734 | IF ( ALLOCATED ( q8bdy3dtemp2 ) ) DEALLOCATE ( q8bdy3dtemp2 ) |
---|
735 | IF ( ALLOCATED ( q9bdy3dtemp2 ) ) DEALLOCATE ( q9bdy3dtemp2 ) |
---|
736 | IF ( ALLOCATED ( q10bdy3dtemp2 ) ) DEALLOCATE ( q10bdy3dtemp2 ) |
---|
737 | IF ( ALLOCATED ( q11bdy3dtemp2 ) ) DEALLOCATE ( q11bdy3dtemp2 ) |
---|
738 | IF ( ALLOCATED ( q12bdy3dtemp2 ) ) DEALLOCATE ( q12bdy3dtemp2 ) |
---|
739 | IF ( ALLOCATED ( q13bdy3dtemp2 ) ) DEALLOCATE ( q13bdy3dtemp2 ) |
---|
740 | IF ( ALLOCATED ( q14bdy3dtemp2 ) ) DEALLOCATE ( q14bdy3dtemp2 ) |
---|
741 | IF ( ALLOCATED ( q15bdy3dtemp2 ) ) DEALLOCATE ( q15bdy3dtemp2 ) |
---|
742 | IF ( ALLOCATED ( q16bdy3dtemp2 ) ) DEALLOCATE ( q16bdy3dtemp2 ) |
---|
743 | IF ( ALLOCATED ( q17bdy3dtemp2 ) ) DEALLOCATE ( q17bdy3dtemp2 ) |
---|
744 | IF ( ALLOCATED ( q18bdy3dtemp2 ) ) DEALLOCATE ( q18bdy3dtemp2 ) |
---|
745 | IF ( ALLOCATED ( q19bdy3dtemp2 ) ) DEALLOCATE ( q19bdy3dtemp2 ) |
---|
746 | IF ( ALLOCATED ( q20bdy3dtemp2 ) ) DEALLOCATE ( q20bdy3dtemp2 ) |
---|
747 | IF ( ALLOCATED ( q21bdy3dtemp2 ) ) DEALLOCATE ( q21bdy3dtemp2 ) |
---|
748 | IF ( ALLOCATED ( q22bdy3dtemp2 ) ) DEALLOCATE ( q22bdy3dtemp2 ) |
---|
749 | IF ( ALLOCATED ( q23bdy3dtemp2 ) ) DEALLOCATE ( q23bdy3dtemp2 ) |
---|
750 | IF ( ALLOCATED ( q24bdy3dtemp2 ) ) DEALLOCATE ( q24bdy3dtemp2 ) |
---|
751 | IF ( ALLOCATED ( q25bdy3dtemp2 ) ) DEALLOCATE ( q25bdy3dtemp2 ) |
---|
752 | IF ( ALLOCATED ( q26bdy3dtemp2 ) ) DEALLOCATE ( q26bdy3dtemp2 ) |
---|
753 | IF ( ALLOCATED ( q27bdy3dtemp2 ) ) DEALLOCATE ( q27bdy3dtemp2 ) |
---|
754 | IF ( ALLOCATED ( q28bdy3dtemp2 ) ) DEALLOCATE ( q28bdy3dtemp2 ) |
---|
755 | IF ( ALLOCATED ( q29bdy3dtemp2 ) ) DEALLOCATE ( q29bdy3dtemp2 ) |
---|
756 | IF ( ALLOCATED ( q30bdy3dtemp2 ) ) DEALLOCATE ( q30bdy3dtemp2 ) |
---|
757 | IF ( ALLOCATED ( q31bdy3dtemp2 ) ) DEALLOCATE ( q31bdy3dtemp2 ) |
---|
758 | IF ( ALLOCATED ( q32bdy3dtemp2 ) ) DEALLOCATE ( q32bdy3dtemp2 ) |
---|
759 | IF ( ALLOCATED ( q33bdy3dtemp2 ) ) DEALLOCATE ( q33bdy3dtemp2 ) |
---|
760 | IF ( ALLOCATED ( q34bdy3dtemp2 ) ) DEALLOCATE ( q34bdy3dtemp2 ) |
---|
761 | IF ( ALLOCATED ( q35bdy3dtemp2 ) ) DEALLOCATE ( q35bdy3dtemp2 ) |
---|
762 | !!!!***MARS << |
---|
763 | IF ( ALLOCATED ( mbdy2dtemp2 ) ) DEALLOCATE ( mbdy2dtemp2 ) |
---|
764 | |
---|
765 | ALLOCATE ( ubdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
766 | ALLOCATE ( vbdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
767 | ALLOCATE ( tbdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
768 | ALLOCATE ( pbdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
769 | ALLOCATE ( qbdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
770 | !!!!***MARS >> |
---|
771 | ALLOCATE ( q2bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
772 | ALLOCATE ( q3bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
773 | ALLOCATE ( q4bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
774 | ALLOCATE ( q5bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
775 | ALLOCATE ( q6bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
776 | ALLOCATE ( q7bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
777 | ALLOCATE ( q8bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
778 | ALLOCATE ( q9bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
779 | ALLOCATE ( q10bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
780 | ALLOCATE ( q11bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
781 | ALLOCATE ( q12bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
782 | ALLOCATE ( q13bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
783 | ALLOCATE ( q14bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
784 | ALLOCATE ( q15bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
785 | ALLOCATE ( q16bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
786 | ALLOCATE ( q17bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
787 | ALLOCATE ( q18bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
788 | ALLOCATE ( q19bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
789 | ALLOCATE ( q20bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
790 | ALLOCATE ( q21bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
791 | ALLOCATE ( q22bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
792 | ALLOCATE ( q23bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
793 | ALLOCATE ( q24bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
794 | ALLOCATE ( q25bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
795 | ALLOCATE ( q26bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
796 | ALLOCATE ( q27bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
797 | ALLOCATE ( q28bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
798 | ALLOCATE ( q29bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
799 | ALLOCATE ( q30bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
800 | ALLOCATE ( q31bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
801 | ALLOCATE ( q32bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
802 | ALLOCATE ( q33bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
803 | ALLOCATE ( q34bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
804 | ALLOCATE ( q35bdy3dtemp1(ims:ime,kms:kme,jms:jme) ) |
---|
805 | !!!!***MARS << |
---|
806 | ALLOCATE ( mbdy2dtemp1(ims:ime,1:1, jms:jme) ) |
---|
807 | ALLOCATE ( ubdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
808 | ALLOCATE ( vbdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
809 | ALLOCATE ( tbdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
810 | ALLOCATE ( pbdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
811 | ALLOCATE ( qbdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
812 | !!!!***MARS >> |
---|
813 | ALLOCATE ( q2bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
814 | ALLOCATE ( q3bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
815 | ALLOCATE ( q4bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
816 | ALLOCATE ( q5bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
817 | ALLOCATE ( q6bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
818 | ALLOCATE ( q7bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
819 | ALLOCATE ( q8bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
820 | ALLOCATE ( q9bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
821 | ALLOCATE ( q10bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
822 | ALLOCATE ( q11bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
823 | ALLOCATE ( q12bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
824 | ALLOCATE ( q13bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
825 | ALLOCATE ( q14bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
826 | ALLOCATE ( q15bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
827 | ALLOCATE ( q16bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
828 | ALLOCATE ( q17bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
829 | ALLOCATE ( q18bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
830 | ALLOCATE ( q19bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
831 | ALLOCATE ( q20bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
832 | ALLOCATE ( q21bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
833 | ALLOCATE ( q22bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
834 | ALLOCATE ( q23bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
835 | ALLOCATE ( q24bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
836 | ALLOCATE ( q25bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
837 | ALLOCATE ( q26bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
838 | ALLOCATE ( q27bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
839 | ALLOCATE ( q28bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
840 | ALLOCATE ( q29bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
841 | ALLOCATE ( q30bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
842 | ALLOCATE ( q31bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
843 | ALLOCATE ( q32bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
844 | ALLOCATE ( q33bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
845 | ALLOCATE ( q34bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
846 | ALLOCATE ( q35bdy3dtemp2(ims:ime,kms:kme,jms:jme) ) |
---|
847 | !!!!***MARS << |
---|
848 | ALLOCATE ( mbdy2dtemp2(ims:ime,1:1, jms:jme) ) |
---|
849 | |
---|
850 | ! Open the wrfinput file. From this program, this is an *output* file. |
---|
851 | |
---|
852 | CALL construct_filename1( inpname , 'wrfinput' , grid%id , 2 ) |
---|
853 | CALL open_w_dataset ( id1, TRIM(inpname) , grid , config_flags , output_model_input , "DATASET=INPUT", ierr ) |
---|
854 | IF ( ierr .NE. 0 ) THEN |
---|
855 | CALL wrf_error_fatal( 'real: error opening wrfinput for writing' ) |
---|
856 | ENDIF |
---|
857 | IF(sst_update .EQ. 1)THEN |
---|
858 | CALL construct_filename1( inpname , 'wrflowinp' , grid%id , 2 ) |
---|
859 | CALL open_w_dataset ( id5, TRIM(inpname) , grid , config_flags , output_aux_model_input5 , "DATASET=AUXINPUT5", ierr ) |
---|
860 | IF ( ierr .NE. 0 ) THEN |
---|
861 | CALL wrf_error_fatal( 'real: error opening wrflowinp for writing' ) |
---|
862 | ENDIF |
---|
863 | ENDIF |
---|
864 | ! CALL calc_current_date ( grid%id , 0. ) |
---|
865 | CALL output_model_input ( id1, grid , config_flags , ierr ) |
---|
866 | CALL close_dataset ( id1 , config_flags , "DATASET=INPUT" ) |
---|
867 | IF(sst_update .EQ. 1)THEN |
---|
868 | CALL output_aux_model_input5 ( id5, grid , config_flags , ierr ) |
---|
869 | ENDIF |
---|
870 | |
---|
871 | ! We need to save the 3d data to compute a difference during the next loop. Couple the |
---|
872 | ! 3d fields with total mu (mub + mu_2) and the stagger-specific map scale factor. |
---|
873 | |
---|
874 | CALL couple ( grid%em_mu_2 , grid%em_mub , ubdy3dtemp1 , grid%em_u_2 , 'u' , grid%msfu , & |
---|
875 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe ) |
---|
876 | CALL couple ( grid%em_mu_2 , grid%em_mub , vbdy3dtemp1 , grid%em_v_2 , 'v' , grid%msfv , & |
---|
877 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe ) |
---|
878 | CALL couple ( grid%em_mu_2 , grid%em_mub , tbdy3dtemp1 , grid%em_t_2 , 't' , grid%msft , & |
---|
879 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe ) |
---|
880 | CALL couple ( grid%em_mu_2 , grid%em_mub , pbdy3dtemp1 , grid%em_ph_2 , 'h' , grid%msft , & |
---|
881 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe ) |
---|
882 | ! CALL couple ( grid%em_mu_2 , grid%em_mub , qbdy3dtemp1 , grid%moist(:,:,:,P_QV) , 't' , grid%msft , & |
---|
883 | ! ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe ) |
---|
884 | |
---|
885 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
886 | !!!!!MARS: si config_flags%mars != 0 il y a au moins un autre traceur (indice 2 a cause du dummy tracer) |
---|
887 | !!!!!MARS: -- il faut donc definir ses conditions aux bornes |
---|
888 | !!!!!MARS: -- cas generique ici, les choix de flux ou non-flux sont dans solve_em |
---|
889 | !!!!!MARS: ensuite faire au cas par cas (ou un jour une boucle sur le nombre de traceurs ???) !!!q2bdy3dtemp1 |
---|
890 | !!!!!MARS: NB NB: si on ne veut pas passer un traceur aux bornes, tout ce qui suit n'est pas utile |
---|
891 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
892 | IF (config_flags%mars .gt. 0) THEN |
---|
893 | !! ceci suffit avec les modes 2 et 10 qui ne transportent qu'un seul traceur |
---|
894 | CALL couple ( grid%em_mu_2 , grid%em_mub , qbdy3dtemp1 , grid%scalar(:,:,:,2) , 't' , grid%msft , & |
---|
895 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe ) |
---|
896 | ENDIF |
---|
897 | !!!!!MARS: autres possibilites. pour le moment seuls 4 traceurs aux bornes sont supportes. |
---|
898 | !!!!!MARS: ... mais il est facile d'en ajouter... ajouter simplement des tableaux type q2bdy3dtemp1 |
---|
899 | IF ( (config_flags%mars .eq. 1) .OR. & |
---|
900 | (config_flags%mars .eq. 3) .OR. & |
---|
901 | (config_flags%mars .eq. 11) .OR. & |
---|
902 | (config_flags%mars .eq. 12) ) THEN |
---|
903 | CALL couple ( grid%em_mu_2 , grid%em_mub , q2bdy3dtemp1 , grid%scalar(:,:,:,3) , 't' , grid%msft , & |
---|
904 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe ) |
---|
905 | ENDIF |
---|
906 | IF ((config_flags%mars .eq. 11) .OR. (config_flags%mars .eq. 12)) THEN |
---|
907 | CALL couple ( grid%em_mu_2 , grid%em_mub , q3bdy3dtemp1 , grid%scalar(:,:,:,4) , 't' , grid%msft , & |
---|
908 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe ) |
---|
909 | CALL couple ( grid%em_mu_2 , grid%em_mub , q4bdy3dtemp1 , grid%scalar(:,:,:,5) , 't' , grid%msft , & |
---|
910 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe ) |
---|
911 | ENDIF |
---|
912 | IF ((config_flags%mars .eq. 12)) THEN |
---|
913 | CALL couple ( grid%em_mu_2 , grid%em_mub , q5bdy3dtemp1 , grid%scalar(:,:,:,6) , 't' , grid%msft , & |
---|
914 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe ) |
---|
915 | CALL couple ( grid%em_mu_2 , grid%em_mub , q6bdy3dtemp1 , grid%scalar(:,:,:,7) , 't' , grid%msft , & |
---|
916 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe ) |
---|
917 | ENDIF |
---|
918 | |
---|
919 | !VENUS |
---|
920 | IF (config_flags%mars .eq. 34) THEN |
---|
921 | CALL couple ( grid%em_mu_2 , grid%em_mub , qbdy3dtemp1 ,grid%scalar(:,:,:,2) , 't' , grid%msft , & |
---|
922 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
923 | CALL couple ( grid%em_mu_2 , grid%em_mub , q2bdy3dtemp1,grid%scalar(:,:,:,3) , 't' , grid%msft , & |
---|
924 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
925 | CALL couple ( grid%em_mu_2 , grid%em_mub , q3bdy3dtemp1,grid%scalar(:,:,:,4) , 't' , grid%msft , & |
---|
926 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
927 | CALL couple ( grid%em_mu_2 , grid%em_mub , q4bdy3dtemp1,grid%scalar(:,:,:,5) , 't' , grid%msft , & |
---|
928 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
929 | CALL couple ( grid%em_mu_2 , grid%em_mub , q5bdy3dtemp1,grid%scalar(:,:,:,6) , 't' , grid%msft , & |
---|
930 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
931 | CALL couple ( grid%em_mu_2 , grid%em_mub , q6bdy3dtemp1,grid%scalar(:,:,:,7) , 't' , grid%msft , & |
---|
932 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
933 | CALL couple ( grid%em_mu_2 , grid%em_mub , q7bdy3dtemp1,grid%scalar(:,:,:,8) , 't' , grid%msft , & |
---|
934 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
935 | CALL couple ( grid%em_mu_2 , grid%em_mub , q8bdy3dtemp1,grid%scalar(:,:,:,9) , 't' , grid%msft , & |
---|
936 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
937 | CALL couple ( grid%em_mu_2 , grid%em_mub , q9bdy3dtemp1,grid%scalar(:,:,:,10) , 't' , grid%msft , & |
---|
938 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
939 | CALL couple ( grid%em_mu_2 , grid%em_mub , q10bdy3dtemp1,grid%scalar(:,:,:,11) , 't' , grid%msft , & |
---|
940 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
941 | CALL couple ( grid%em_mu_2 , grid%em_mub , q11bdy3dtemp1,grid%scalar(:,:,:,12) , 't' , grid%msft , & |
---|
942 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
943 | CALL couple ( grid%em_mu_2 , grid%em_mub , q12bdy3dtemp1,grid%scalar(:,:,:,13) , 't' , grid%msft , & |
---|
944 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
945 | CALL couple ( grid%em_mu_2 , grid%em_mub , q13bdy3dtemp1,grid%scalar(:,:,:,14) , 't' , grid%msft , & |
---|
946 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
947 | CALL couple ( grid%em_mu_2 , grid%em_mub , q14bdy3dtemp1,grid%scalar(:,:,:,15) , 't' , grid%msft , & |
---|
948 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
949 | CALL couple ( grid%em_mu_2 , grid%em_mub , q15bdy3dtemp1,grid%scalar(:,:,:,16) , 't' , grid%msft , & |
---|
950 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
951 | CALL couple ( grid%em_mu_2 , grid%em_mub , q16bdy3dtemp1,grid%scalar(:,:,:,17) , 't' , grid%msft , & |
---|
952 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
953 | CALL couple ( grid%em_mu_2 , grid%em_mub , q17bdy3dtemp1,grid%scalar(:,:,:,18) , 't' , grid%msft , & |
---|
954 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
955 | CALL couple ( grid%em_mu_2 , grid%em_mub , q18bdy3dtemp1,grid%scalar(:,:,:,19) , 't' , grid%msft , & |
---|
956 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
957 | CALL couple ( grid%em_mu_2 , grid%em_mub , q19bdy3dtemp1,grid%scalar(:,:,:,20) , 't' , grid%msft , & |
---|
958 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
959 | CALL couple ( grid%em_mu_2 , grid%em_mub , q20bdy3dtemp1,grid%scalar(:,:,:,21) , 't' , grid%msft , & |
---|
960 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
961 | CALL couple ( grid%em_mu_2 , grid%em_mub , q21bdy3dtemp1,grid%scalar(:,:,:,22) , 't' , grid%msft , & |
---|
962 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
963 | CALL couple ( grid%em_mu_2 , grid%em_mub , q22bdy3dtemp1,grid%scalar(:,:,:,23) , 't' , grid%msft , & |
---|
964 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
965 | CALL couple ( grid%em_mu_2 , grid%em_mub , q23bdy3dtemp1,grid%scalar(:,:,:,24) , 't' , grid%msft , & |
---|
966 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
967 | CALL couple ( grid%em_mu_2 , grid%em_mub , q24bdy3dtemp1,grid%scalar(:,:,:,25) , 't' , grid%msft , & |
---|
968 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
969 | CALL couple ( grid%em_mu_2 , grid%em_mub , q25bdy3dtemp1,grid%scalar(:,:,:,26) , 't' , grid%msft , & |
---|
970 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
971 | CALL couple ( grid%em_mu_2 , grid%em_mub , q26bdy3dtemp1,grid%scalar(:,:,:,27) , 't' , grid%msft , & |
---|
972 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
973 | CALL couple ( grid%em_mu_2 , grid%em_mub , q27bdy3dtemp1,grid%scalar(:,:,:,28) , 't' , grid%msft , & |
---|
974 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
975 | CALL couple ( grid%em_mu_2 , grid%em_mub , q28bdy3dtemp1,grid%scalar(:,:,:,29) , 't' , grid%msft , & |
---|
976 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
977 | CALL couple ( grid%em_mu_2 , grid%em_mub , q29bdy3dtemp1,grid%scalar(:,:,:,30) , 't' , grid%msft , & |
---|
978 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
979 | CALL couple ( grid%em_mu_2 , grid%em_mub , q30bdy3dtemp1,grid%scalar(:,:,:,31) , 't' , grid%msft , & |
---|
980 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
981 | CALL couple ( grid%em_mu_2 , grid%em_mub , q31bdy3dtemp1,grid%scalar(:,:,:,32) , 't' , grid%msft , & |
---|
982 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
983 | CALL couple ( grid%em_mu_2 , grid%em_mub , q32bdy3dtemp1,grid%scalar(:,:,:,33) , 't' , grid%msft , & |
---|
984 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
985 | CALL couple ( grid%em_mu_2 , grid%em_mub , q33bdy3dtemp1,grid%scalar(:,:,:,34) , 't' , grid%msft , & |
---|
986 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
987 | CALL couple ( grid%em_mu_2 , grid%em_mub , q34bdy3dtemp1,grid%scalar(:,:,:,35) , 't' , grid%msft , & |
---|
988 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
989 | ENDIF |
---|
990 | !!!!!MARS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
991 | |
---|
992 | |
---|
993 | |
---|
994 | DO j = jps , MIN(jde-1,jpe) |
---|
995 | DO i = ips , MIN(ide-1,ipe) |
---|
996 | mbdy2dtemp1(i,1,j) = grid%em_mu_2(i,j) |
---|
997 | END DO |
---|
998 | END DO |
---|
999 | |
---|
1000 | IF(grid_fdda .EQ. 1)THEN |
---|
1001 | ! for fdda |
---|
1002 | DO j = jps , jpe |
---|
1003 | DO k = kps , kpe |
---|
1004 | DO i = ips , ipe |
---|
1005 | grid%fdda3d(i,k,j,p_u_ndg_old) = grid%em_u_2(i,k,j) |
---|
1006 | grid%fdda3d(i,k,j,p_v_ndg_old) = grid%em_v_2(i,k,j) |
---|
1007 | grid%fdda3d(i,k,j,p_t_ndg_old) = grid%em_t_2(i,k,j) |
---|
1008 | grid%fdda3d(i,k,j,p_q_ndg_old) = grid%moist(i,k,j,P_QV) |
---|
1009 | grid%fdda3d(i,k,j,p_ph_ndg_old) = grid%em_ph_2(i,k,j) |
---|
1010 | END DO |
---|
1011 | END DO |
---|
1012 | END DO |
---|
1013 | |
---|
1014 | DO j = jps , jpe |
---|
1015 | DO i = ips , ipe |
---|
1016 | grid%fdda2d(i,1,j,p_mu_ndg_old) = grid%em_mu_2(i,j) |
---|
1017 | END DO |
---|
1018 | END DO |
---|
1019 | ENDIF |
---|
1020 | |
---|
1021 | |
---|
1022 | ! There are 2 components to the lateral boundaries. First, there is the starting |
---|
1023 | ! point of this time period - just the outer few rows and columns. |
---|
1024 | |
---|
1025 | CALL stuff_bdy ( ubdy3dtemp1 , grid%em_u_b , 'U' , ijds , ijde , spec_bdy_width , & |
---|
1026 | ids , ide , jds , jde , kds , kde , & |
---|
1027 | ims , ime , jms , jme , kms , kme , & |
---|
1028 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1029 | CALL stuff_bdy ( vbdy3dtemp1 , grid%em_v_b , 'V' , ijds , ijde , spec_bdy_width , & |
---|
1030 | ids , ide , jds , jde , kds , kde , & |
---|
1031 | ims , ime , jms , jme , kms , kme , & |
---|
1032 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1033 | CALL stuff_bdy ( tbdy3dtemp1 , grid%em_t_b , 'T' , ijds , ijde , spec_bdy_width , & |
---|
1034 | ids , ide , jds , jde , kds , kde , & |
---|
1035 | ims , ime , jms , jme , kms , kme , & |
---|
1036 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1037 | CALL stuff_bdy ( pbdy3dtemp1 , grid%em_ph_b , 'W' , ijds , ijde , spec_bdy_width , & |
---|
1038 | ids , ide , jds , jde , kds , kde , & |
---|
1039 | ims , ime , jms , jme , kms , kme , & |
---|
1040 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1041 | ! CALL stuff_bdy ( qbdy3dtemp1 , grid%moist_b(:,:,:,:,P_QV) , 'T' , ijds , ijde , spec_bdy_width , & |
---|
1042 | ! ids , ide , jds , jde , kds , kde , & |
---|
1043 | ! ims , ime , jms , jme , kms , kme , & |
---|
1044 | ! ips , ipe , jps , jpe , kps , kpe ) |
---|
1045 | !!!!!MARS >> |
---|
1046 | IF (config_flags%mars .gt. 0) THEN |
---|
1047 | CALL stuff_bdy ( qbdy3dtemp1 , grid%scalar_b(:,:,:,:,2) , 'T' , ijds , ijde , spec_bdy_width , & |
---|
1048 | ids , ide , jds , jde , kds , kde , & |
---|
1049 | ims , ime , jms , jme , kms , kme , & |
---|
1050 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1051 | ENDIF |
---|
1052 | IF ( (config_flags%mars .eq. 1) .OR. & |
---|
1053 | (config_flags%mars .eq. 3) .OR. & |
---|
1054 | (config_flags%mars .eq. 11) .OR. & |
---|
1055 | (config_flags%mars .eq. 12) ) THEN |
---|
1056 | CALL stuff_bdy ( q2bdy3dtemp1 , grid%scalar_b(:,:,:,:,3) , 'T' , ijds , ijde , spec_bdy_width , & |
---|
1057 | ids , ide , jds , jde , kds , kde , & |
---|
1058 | ims , ime , jms , jme , kms , kme , & |
---|
1059 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1060 | ENDIF |
---|
1061 | IF ((config_flags%mars .eq. 11) .OR. (config_flags%mars .eq. 12)) THEN |
---|
1062 | CALL stuff_bdy ( q3bdy3dtemp1 , grid%scalar_b(:,:,:,:,4) , 'T' , ijds , ijde , spec_bdy_width , & |
---|
1063 | ids , ide , jds , jde , kds , kde , & |
---|
1064 | ims , ime , jms , jme , kms , kme , & |
---|
1065 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1066 | CALL stuff_bdy ( q4bdy3dtemp1 , grid%scalar_b(:,:,:,:,5) , 'T' , ijds , ijde , spec_bdy_width , & |
---|
1067 | ids , ide , jds , jde , kds , kde , & |
---|
1068 | ims , ime , jms , jme , kms , kme , & |
---|
1069 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1070 | ENDIF |
---|
1071 | IF ((config_flags%mars .eq. 12)) THEN |
---|
1072 | CALL stuff_bdy ( q5bdy3dtemp1 , grid%scalar_b(:,:,:,:,6) , 'T' , ijds , ijde , spec_bdy_width , & |
---|
1073 | ids , ide , jds , jde , kds , kde , & |
---|
1074 | ims , ime , jms , jme , kms , kme , & |
---|
1075 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1076 | CALL stuff_bdy ( q6bdy3dtemp1 , grid%scalar_b(:,:,:,:,7) , 'T' , ijds , ijde , spec_bdy_width , & |
---|
1077 | ids , ide , jds , jde , kds , kde , & |
---|
1078 | ims , ime , jms , jme , kms , kme , & |
---|
1079 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1080 | ENDIF |
---|
1081 | |
---|
1082 | !VENUS |
---|
1083 | IF (config_flags%mars .eq. 34) THEN |
---|
1084 | CALL stuff_bdy ( qbdy3dtemp1 , grid%scalar_b(:,:,:,:,2) , 'T' , ijds, ijde , spec_bdy_width , & |
---|
1085 | ids , ide , jds, jde , kds , kde , & |
---|
1086 | ims , ime , jms, jme , kms , kme , & |
---|
1087 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1088 | CALL stuff_bdy ( q2bdy3dtemp1 , grid%scalar_b(:,:,:,:,3) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1089 | ids , ide , jds, jde , kds , kde , & |
---|
1090 | ims , ime , jms, jme , kms , kme , & |
---|
1091 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1092 | CALL stuff_bdy ( q3bdy3dtemp1 , grid%scalar_b(:,:,:,:,4) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1093 | ids , ide , jds, jde , kds , kde , & |
---|
1094 | ims , ime , jms, jme , kms , kme , & |
---|
1095 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1096 | CALL stuff_bdy ( q4bdy3dtemp1 , grid%scalar_b(:,:,:,:,5) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1097 | ids , ide , jds, jde , kds , kde , & |
---|
1098 | ims , ime , jms, jme , kms , kme , & |
---|
1099 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1100 | CALL stuff_bdy ( q5bdy3dtemp1 , grid%scalar_b(:,:,:,:,6) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1101 | ids , ide , jds, jde , kds , kde , & |
---|
1102 | ims , ime , jms, jme , kms , kme , & |
---|
1103 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1104 | CALL stuff_bdy ( q6bdy3dtemp1 , grid%scalar_b(:,:,:,:,7) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1105 | ids , ide , jds, jde , kds , kde , & |
---|
1106 | ims , ime , jms, jme , kms , kme , & |
---|
1107 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1108 | CALL stuff_bdy ( q7bdy3dtemp1 , grid%scalar_b(:,:,:,:,8) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1109 | ids , ide , jds, jde , kds , kde , & |
---|
1110 | ims , ime , jms, jme , kms , kme , & |
---|
1111 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1112 | CALL stuff_bdy ( q8bdy3dtemp1 , grid%scalar_b(:,:,:,:,9) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1113 | ids , ide , jds, jde , kds , kde , & |
---|
1114 | ims , ime , jms, jme , kms , kme , & |
---|
1115 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1116 | CALL stuff_bdy ( q9bdy3dtemp1 , grid%scalar_b(:,:,:,:,10) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1117 | ids , ide , jds, jde , kds , kde , & |
---|
1118 | ims , ime , jms, jme , kms , kme , & |
---|
1119 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1120 | CALL stuff_bdy ( q10bdy3dtemp1 , grid%scalar_b(:,:,:,:,11) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1121 | ids , ide , jds, jde , kds , kde , & |
---|
1122 | ims , ime , jms, jme , kms , kme , & |
---|
1123 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1124 | CALL stuff_bdy ( q11bdy3dtemp1 , grid%scalar_b(:,:,:,:,12) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1125 | ids , ide , jds, jde , kds , kde , & |
---|
1126 | ims , ime , jms, jme , kms , kme , & |
---|
1127 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1128 | CALL stuff_bdy ( q12bdy3dtemp1 , grid%scalar_b(:,:,:,:,13) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1129 | ids , ide , jds, jde , kds , kde , & |
---|
1130 | ims , ime , jms, jme , kms , kme , & |
---|
1131 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1132 | CALL stuff_bdy ( q13bdy3dtemp1 , grid%scalar_b(:,:,:,:,14) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1133 | ids , ide , jds, jde , kds , kde , & |
---|
1134 | ims , ime , jms, jme , kms , kme , & |
---|
1135 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1136 | CALL stuff_bdy ( q14bdy3dtemp1 , grid%scalar_b(:,:,:,:,15) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1137 | ids , ide , jds, jde , kds , kde , & |
---|
1138 | ims , ime , jms, jme , kms , kme , & |
---|
1139 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1140 | CALL stuff_bdy ( q15bdy3dtemp1 , grid%scalar_b(:,:,:,:,16) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1141 | ids , ide , jds, jde , kds , kde , & |
---|
1142 | ims , ime , jms, jme , kms , kme , & |
---|
1143 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1144 | CALL stuff_bdy ( q16bdy3dtemp1 , grid%scalar_b(:,:,:,:,17) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1145 | ids , ide , jds, jde , kds , kde , & |
---|
1146 | ims , ime , jms, jme , kms , kme , & |
---|
1147 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1148 | CALL stuff_bdy ( q17bdy3dtemp1 , grid%scalar_b(:,:,:,:,18) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1149 | ids , ide , jds, jde , kds , kde , & |
---|
1150 | ims , ime , jms, jme , kms , kme , & |
---|
1151 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1152 | CALL stuff_bdy ( q18bdy3dtemp1 , grid%scalar_b(:,:,:,:,19) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1153 | ids , ide , jds, jde , kds , kde , & |
---|
1154 | ims , ime , jms, jme , kms , kme , & |
---|
1155 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1156 | CALL stuff_bdy ( q19bdy3dtemp1 , grid%scalar_b(:,:,:,:,20) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1157 | ids , ide , jds, jde , kds , kde , & |
---|
1158 | ims , ime , jms, jme , kms , kme , & |
---|
1159 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1160 | CALL stuff_bdy ( q20bdy3dtemp1 , grid%scalar_b(:,:,:,:,21) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1161 | ids , ide , jds, jde , kds , kde , & |
---|
1162 | ims , ime , jms, jme , kms , kme , & |
---|
1163 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1164 | CALL stuff_bdy ( q21bdy3dtemp1 , grid%scalar_b(:,:,:,:,22) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1165 | ids , ide , jds, jde , kds , kde , & |
---|
1166 | ims , ime , jms, jme , kms , kme , & |
---|
1167 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1168 | CALL stuff_bdy ( q22bdy3dtemp1 , grid%scalar_b(:,:,:,:,23) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1169 | ids , ide , jds, jde , kds , kde , & |
---|
1170 | ims , ime , jms, jme , kms , kme , & |
---|
1171 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1172 | CALL stuff_bdy ( q23bdy3dtemp1 , grid%scalar_b(:,:,:,:,24) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1173 | ids , ide , jds, jde , kds , kde , & |
---|
1174 | ims , ime , jms, jme , kms , kme , & |
---|
1175 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1176 | CALL stuff_bdy ( q24bdy3dtemp1 , grid%scalar_b(:,:,:,:,25) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1177 | ids , ide , jds, jde , kds , kde , & |
---|
1178 | ims , ime , jms, jme , kms , kme , & |
---|
1179 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1180 | CALL stuff_bdy ( q25bdy3dtemp1 , grid%scalar_b(:,:,:,:,26) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1181 | ids , ide , jds, jde , kds , kde , & |
---|
1182 | ims , ime , jms, jme , kms , kme , & |
---|
1183 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1184 | CALL stuff_bdy ( q26bdy3dtemp1 , grid%scalar_b(:,:,:,:,27) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1185 | ids , ide , jds, jde , kds , kde , & |
---|
1186 | ims , ime , jms, jme , kms , kme , & |
---|
1187 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1188 | CALL stuff_bdy ( q27bdy3dtemp1 , grid%scalar_b(:,:,:,:,28) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1189 | ids , ide , jds, jde , kds , kde , & |
---|
1190 | ims , ime , jms, jme , kms , kme , & |
---|
1191 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1192 | CALL stuff_bdy ( q28bdy3dtemp1 , grid%scalar_b(:,:,:,:,29) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1193 | ids , ide , jds, jde , kds , kde , & |
---|
1194 | ims , ime , jms, jme , kms , kme , & |
---|
1195 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1196 | CALL stuff_bdy ( q29bdy3dtemp1 , grid%scalar_b(:,:,:,:,30) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1197 | ids , ide , jds, jde , kds , kde , & |
---|
1198 | ims , ime , jms, jme , kms , kme , & |
---|
1199 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1200 | CALL stuff_bdy ( q30bdy3dtemp1 , grid%scalar_b(:,:,:,:,31) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1201 | ids , ide , jds, jde , kds , kde , & |
---|
1202 | ims , ime , jms, jme , kms , kme , & |
---|
1203 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1204 | CALL stuff_bdy ( q31bdy3dtemp1 , grid%scalar_b(:,:,:,:,33) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1205 | ids , ide , jds, jde , kds , kde , & |
---|
1206 | ims , ime , jms, jme , kms , kme , & |
---|
1207 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1208 | CALL stuff_bdy ( q32bdy3dtemp1 , grid%scalar_b(:,:,:,:,33) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1209 | ids , ide , jds, jde , kds , kde , & |
---|
1210 | ims , ime , jms, jme , kms , kme , & |
---|
1211 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1212 | CALL stuff_bdy ( q33bdy3dtemp1 , grid%scalar_b(:,:,:,:,34) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1213 | ids , ide , jds, jde , kds , kde , & |
---|
1214 | ims , ime , jms, jme , kms , kme , & |
---|
1215 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1216 | CALL stuff_bdy ( q34bdy3dtemp1 , grid%scalar_b(:,:,:,:,35) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1217 | ids , ide , jds, jde , kds , kde , & |
---|
1218 | ims , ime , jms, jme , kms , kme , & |
---|
1219 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1220 | ENDIF |
---|
1221 | !!!!MARS << |
---|
1222 | |
---|
1223 | CALL stuff_bdy ( mbdy2dtemp1 , grid%em_mu_b , 'M' , ijds , ijde , spec_bdy_width , & |
---|
1224 | ids , ide , jds , jde , 1 , 1 , & |
---|
1225 | ims , ime , jms , jme , 1 , 1 , & |
---|
1226 | ips , ipe , jps , jpe , 1 , 1 ) |
---|
1227 | |
---|
1228 | |
---|
1229 | ELSE IF ( loop .GT. 1 ) THEN |
---|
1230 | |
---|
1231 | IF(sst_update .EQ. 1)THEN |
---|
1232 | CALL output_aux_model_input5 ( id5, grid , config_flags , ierr ) |
---|
1233 | ENDIF |
---|
1234 | |
---|
1235 | ! Open the boundary file. |
---|
1236 | |
---|
1237 | |
---|
1238 | IF ( loop .eq. 2 ) THEN |
---|
1239 | IF(grid%id .eq. 1)THEN |
---|
1240 | CALL construct_filename1( bdyname , 'wrfbdy' , grid%id , 2 ) |
---|
1241 | CALL open_w_dataset ( id, TRIM(bdyname) , grid , config_flags , output_boundary , "DATASET=BOUNDARY", ierr ) |
---|
1242 | IF ( ierr .NE. 0 ) THEN |
---|
1243 | CALL wrf_error_fatal( 'real: error opening wrfbdy for writing' ) |
---|
1244 | ENDIF |
---|
1245 | ENDIF |
---|
1246 | IF(grid_fdda .EQ. 1)THEN |
---|
1247 | ! for fdda |
---|
1248 | CALL construct_filename1( inpname , 'wrffdda' , grid%id , 2 ) |
---|
1249 | CALL open_w_dataset ( id2, TRIM(inpname) , grid , config_flags , output_aux_model_input10 , "DATASET=AUXINPUT10", ierr ) |
---|
1250 | IF ( ierr .NE. 0 ) THEN |
---|
1251 | CALL wrf_error_fatal( 'real: error opening wrffdda for writing' ) |
---|
1252 | ENDIF |
---|
1253 | ENDIF |
---|
1254 | ELSE |
---|
1255 | IF ( .NOT. domain_clockisstoptime(grid) ) THEN |
---|
1256 | CALL domain_clockadvance( grid ) |
---|
1257 | CALL domain_clockprint ( 150, grid, & |
---|
1258 | 'DEBUG assemble_output: clock after ClockAdvance,' ) |
---|
1259 | ENDIF |
---|
1260 | END IF |
---|
1261 | |
---|
1262 | |
---|
1263 | ! Couple this time period's data with total mu, and save it in the *bdy3dtemp2 arrays. |
---|
1264 | |
---|
1265 | CALL couple ( grid%em_mu_2 , grid%em_mub , ubdy3dtemp2 , grid%em_u_2 , 'u' , grid%msfu , & |
---|
1266 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe ) |
---|
1267 | CALL couple ( grid%em_mu_2 , grid%em_mub , vbdy3dtemp2 , grid%em_v_2 , 'v' , grid%msfv , & |
---|
1268 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe ) |
---|
1269 | CALL couple ( grid%em_mu_2 , grid%em_mub , tbdy3dtemp2 , grid%em_t_2 , 't' , grid%msft , & |
---|
1270 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe ) |
---|
1271 | CALL couple ( grid%em_mu_2 , grid%em_mub , pbdy3dtemp2 , grid%em_ph_2 , 'h' , grid%msft , & |
---|
1272 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe ) |
---|
1273 | ! CALL couple ( grid%em_mu_2 , grid%em_mub , qbdy3dtemp2 , grid%moist(:,:,:,P_QV) , 't' , grid%msft , & |
---|
1274 | ! ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe ) |
---|
1275 | !!!!!MARS >> |
---|
1276 | IF (config_flags%mars .gt. 0) THEN |
---|
1277 | CALL couple ( grid%em_mu_2 , grid%em_mub , qbdy3dtemp2 , grid%scalar(:,:,:,2) , 't' , grid%msft , & |
---|
1278 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe ) |
---|
1279 | ENDIF |
---|
1280 | IF ( (config_flags%mars .eq. 1) .OR. & |
---|
1281 | (config_flags%mars .eq. 3) .OR. & |
---|
1282 | (config_flags%mars .eq. 11) .OR. & |
---|
1283 | (config_flags%mars .eq. 12) ) THEN |
---|
1284 | CALL couple ( grid%em_mu_2 , grid%em_mub , q2bdy3dtemp2 , grid%scalar(:,:,:,3) , 't' , grid%msft , & |
---|
1285 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe ) |
---|
1286 | ENDIF |
---|
1287 | IF ((config_flags%mars .eq. 11) .OR. (config_flags%mars .eq. 12)) THEN |
---|
1288 | CALL couple ( grid%em_mu_2 , grid%em_mub , q3bdy3dtemp2 , grid%scalar(:,:,:,4) , 't' , grid%msft , & |
---|
1289 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe ) |
---|
1290 | CALL couple ( grid%em_mu_2 , grid%em_mub , q4bdy3dtemp2 , grid%scalar(:,:,:,5) , 't' , grid%msft , & |
---|
1291 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe ) |
---|
1292 | ENDIF |
---|
1293 | IF ((config_flags%mars .eq. 12)) THEN |
---|
1294 | CALL couple ( grid%em_mu_2 , grid%em_mub , q5bdy3dtemp2 , grid%scalar(:,:,:,6) , 't' , grid%msft , & |
---|
1295 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe ) |
---|
1296 | CALL couple ( grid%em_mu_2 , grid%em_mub , q6bdy3dtemp2 , grid%scalar(:,:,:,7) , 't' , grid%msft , & |
---|
1297 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe ) |
---|
1298 | ENDIF |
---|
1299 | |
---|
1300 | !VENUS |
---|
1301 | IF (config_flags%mars .eq. 34) THEN |
---|
1302 | CALL couple ( grid%em_mu_2 , grid%em_mub , qbdy3dtemp2 ,grid%scalar(:,:,:,2) , 't' , grid%msft , & |
---|
1303 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1304 | CALL couple ( grid%em_mu_2 , grid%em_mub , q2bdy3dtemp2,grid%scalar(:,:,:,3) , 't' , grid%msft , & |
---|
1305 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1306 | CALL couple ( grid%em_mu_2 , grid%em_mub , q3bdy3dtemp2,grid%scalar(:,:,:,4) , 't' , grid%msft , & |
---|
1307 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1308 | CALL couple ( grid%em_mu_2 , grid%em_mub , q4bdy3dtemp2,grid%scalar(:,:,:,5) , 't' , grid%msft , & |
---|
1309 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1310 | CALL couple ( grid%em_mu_2 , grid%em_mub , q5bdy3dtemp2,grid%scalar(:,:,:,6) , 't' , grid%msft , & |
---|
1311 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1312 | CALL couple ( grid%em_mu_2 , grid%em_mub , q6bdy3dtemp2,grid%scalar(:,:,:,7) , 't' , grid%msft , & |
---|
1313 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1314 | CALL couple ( grid%em_mu_2 , grid%em_mub , q7bdy3dtemp2,grid%scalar(:,:,:,8) , 't' , grid%msft , & |
---|
1315 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1316 | CALL couple ( grid%em_mu_2 , grid%em_mub , q8bdy3dtemp2,grid%scalar(:,:,:,9) , 't' , grid%msft , & |
---|
1317 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1318 | CALL couple ( grid%em_mu_2 , grid%em_mub , q9bdy3dtemp2,grid%scalar(:,:,:,10) , 't' , grid%msft , & |
---|
1319 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1320 | CALL couple ( grid%em_mu_2 , grid%em_mub , q10bdy3dtemp2,grid%scalar(:,:,:,11) , 't' , grid%msft , & |
---|
1321 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1322 | CALL couple ( grid%em_mu_2 , grid%em_mub , q11bdy3dtemp2,grid%scalar(:,:,:,12) , 't' , grid%msft , & |
---|
1323 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1324 | CALL couple ( grid%em_mu_2 , grid%em_mub , q12bdy3dtemp2,grid%scalar(:,:,:,13) , 't' , grid%msft , & |
---|
1325 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1326 | CALL couple ( grid%em_mu_2 , grid%em_mub , q13bdy3dtemp2,grid%scalar(:,:,:,14) , 't' , grid%msft , & |
---|
1327 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1328 | CALL couple ( grid%em_mu_2 , grid%em_mub , q14bdy3dtemp2,grid%scalar(:,:,:,15) , 't' , grid%msft , & |
---|
1329 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1330 | CALL couple ( grid%em_mu_2 , grid%em_mub , q15bdy3dtemp2,grid%scalar(:,:,:,16) , 't' , grid%msft , & |
---|
1331 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1332 | CALL couple ( grid%em_mu_2 , grid%em_mub , q16bdy3dtemp2,grid%scalar(:,:,:,17) , 't' , grid%msft , & |
---|
1333 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1334 | CALL couple ( grid%em_mu_2 , grid%em_mub , q17bdy3dtemp2,grid%scalar(:,:,:,18) , 't' , grid%msft , & |
---|
1335 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1336 | CALL couple ( grid%em_mu_2 , grid%em_mub , q18bdy3dtemp2,grid%scalar(:,:,:,19) , 't' , grid%msft , & |
---|
1337 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1338 | CALL couple ( grid%em_mu_2 , grid%em_mub , q19bdy3dtemp2,grid%scalar(:,:,:,20) , 't' , grid%msft , & |
---|
1339 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1340 | CALL couple ( grid%em_mu_2 , grid%em_mub , q20bdy3dtemp2,grid%scalar(:,:,:,21) , 't' , grid%msft , & |
---|
1341 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1342 | CALL couple ( grid%em_mu_2 , grid%em_mub , q21bdy3dtemp2,grid%scalar(:,:,:,22) , 't' , grid%msft , & |
---|
1343 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1344 | CALL couple ( grid%em_mu_2 , grid%em_mub , q22bdy3dtemp2,grid%scalar(:,:,:,23) , 't' , grid%msft , & |
---|
1345 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1346 | CALL couple ( grid%em_mu_2 , grid%em_mub , q23bdy3dtemp2,grid%scalar(:,:,:,24) , 't' , grid%msft , & |
---|
1347 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1348 | CALL couple ( grid%em_mu_2 , grid%em_mub , q24bdy3dtemp2,grid%scalar(:,:,:,25) , 't' , grid%msft , & |
---|
1349 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1350 | CALL couple ( grid%em_mu_2 , grid%em_mub , q25bdy3dtemp2,grid%scalar(:,:,:,26) , 't' , grid%msft , & |
---|
1351 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1352 | CALL couple ( grid%em_mu_2 , grid%em_mub , q26bdy3dtemp2,grid%scalar(:,:,:,27) , 't' , grid%msft , & |
---|
1353 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1354 | CALL couple ( grid%em_mu_2 , grid%em_mub , q27bdy3dtemp2,grid%scalar(:,:,:,28) , 't' , grid%msft , & |
---|
1355 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1356 | CALL couple ( grid%em_mu_2 , grid%em_mub , q28bdy3dtemp2,grid%scalar(:,:,:,29) , 't' , grid%msft , & |
---|
1357 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1358 | CALL couple ( grid%em_mu_2 , grid%em_mub , q29bdy3dtemp2,grid%scalar(:,:,:,30) , 't' , grid%msft , & |
---|
1359 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1360 | CALL couple ( grid%em_mu_2 , grid%em_mub , q30bdy3dtemp2,grid%scalar(:,:,:,31) , 't' , grid%msft , & |
---|
1361 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1362 | CALL couple ( grid%em_mu_2 , grid%em_mub , q31bdy3dtemp2,grid%scalar(:,:,:,32) , 't' , grid%msft , & |
---|
1363 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1364 | CALL couple ( grid%em_mu_2 , grid%em_mub , q32bdy3dtemp2,grid%scalar(:,:,:,33) , 't' , grid%msft , & |
---|
1365 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1366 | CALL couple ( grid%em_mu_2 , grid%em_mub , q33bdy3dtemp2,grid%scalar(:,:,:,34) , 't' , grid%msft , & |
---|
1367 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1368 | CALL couple ( grid%em_mu_2 , grid%em_mub , q34bdy3dtemp2,grid%scalar(:,:,:,35) , 't' , grid%msft , & |
---|
1369 | ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms,kme,ips, ipe, jps, jpe, kps, kpe ) |
---|
1370 | ENDIF |
---|
1371 | !!!!!MARS << |
---|
1372 | |
---|
1373 | DO j = jps , jpe |
---|
1374 | DO i = ips , ipe |
---|
1375 | mbdy2dtemp2(i,1,j) = grid%em_mu_2(i,j) |
---|
1376 | END DO |
---|
1377 | END DO |
---|
1378 | |
---|
1379 | IF(grid_fdda .EQ. 1)THEN |
---|
1380 | ! for fdda |
---|
1381 | DO j = jps , jpe |
---|
1382 | DO k = kps , kpe |
---|
1383 | DO i = ips , ipe |
---|
1384 | grid%fdda3d(i,k,j,p_u_ndg_new) = grid%em_u_2(i,k,j) |
---|
1385 | grid%fdda3d(i,k,j,p_v_ndg_new) = grid%em_v_2(i,k,j) |
---|
1386 | grid%fdda3d(i,k,j,p_t_ndg_new) = grid%em_t_2(i,k,j) |
---|
1387 | grid%fdda3d(i,k,j,p_q_ndg_new) = grid%moist(i,k,j,P_QV) |
---|
1388 | grid%fdda3d(i,k,j,p_ph_ndg_new) = grid%em_ph_2(i,k,j) |
---|
1389 | END DO |
---|
1390 | END DO |
---|
1391 | END DO |
---|
1392 | |
---|
1393 | DO j = jps , jpe |
---|
1394 | DO i = ips , ipe |
---|
1395 | grid%fdda2d(i,1,j,p_mu_ndg_new) = grid%em_mu_2(i,j) |
---|
1396 | END DO |
---|
1397 | END DO |
---|
1398 | ENDIF |
---|
1399 | |
---|
1400 | ! During all of the loops after the first loop, we first compute the boundary |
---|
1401 | ! tendencies with the current data values (*bdy3dtemp2 arrays) and the previously |
---|
1402 | ! saved information stored in the *bdy3dtemp1 arrays. |
---|
1403 | |
---|
1404 | CALL stuff_bdytend ( ubdy3dtemp2 , ubdy3dtemp1 , REAL(interval_seconds) , grid%em_u_bt , 'U' , & |
---|
1405 | ijds , ijde , spec_bdy_width , & |
---|
1406 | ids , ide , jds , jde , kds , kde , & |
---|
1407 | ims , ime , jms , jme , kms , kme , & |
---|
1408 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1409 | CALL stuff_bdytend ( vbdy3dtemp2 , vbdy3dtemp1 , REAL(interval_seconds) , grid%em_v_bt , 'V' , & |
---|
1410 | ijds , ijde , spec_bdy_width , & |
---|
1411 | ids , ide , jds , jde , kds , kde , & |
---|
1412 | ims , ime , jms , jme , kms , kme , & |
---|
1413 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1414 | CALL stuff_bdytend ( tbdy3dtemp2 , tbdy3dtemp1 , REAL(interval_seconds) , grid%em_t_bt , 'T' , & |
---|
1415 | ijds , ijde , spec_bdy_width , & |
---|
1416 | ids , ide , jds , jde , kds , kde , & |
---|
1417 | ims , ime , jms , jme , kms , kme , & |
---|
1418 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1419 | CALL stuff_bdytend ( pbdy3dtemp2 , pbdy3dtemp1 , REAL(interval_seconds) , grid%em_ph_bt , 'W' , & |
---|
1420 | ijds , ijde , spec_bdy_width , & |
---|
1421 | ids , ide , jds , jde , kds , kde , & |
---|
1422 | ims , ime , jms , jme , kms , kme , & |
---|
1423 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1424 | ! CALL stuff_bdytend ( qbdy3dtemp2 , qbdy3dtemp1 , REAL(interval_seconds) , grid%moist_bt(:,:,:,:,P_QV) , 'T' , & |
---|
1425 | ! ijds , ijde , spec_bdy_width , & |
---|
1426 | ! ids , ide , jds , jde , kds , kde , & |
---|
1427 | ! ims , ime , jms , jme , kms , kme , & |
---|
1428 | ! ips , ipe , jps , jpe , kps , kpe ) |
---|
1429 | !!!!!MARS >> |
---|
1430 | IF (config_flags%mars .gt. 0) THEN |
---|
1431 | CALL stuff_bdytend ( qbdy3dtemp2 , qbdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,2) , 'T' , & |
---|
1432 | ijds , ijde , spec_bdy_width , & |
---|
1433 | ids , ide , jds , jde , kds , kde , & |
---|
1434 | ims , ime , jms , jme , kms , kme , & |
---|
1435 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1436 | ENDIF |
---|
1437 | IF ( (config_flags%mars .eq. 1) .OR. & |
---|
1438 | (config_flags%mars .eq. 3) .OR. & |
---|
1439 | (config_flags%mars .eq. 11) .OR. & |
---|
1440 | (config_flags%mars .eq. 12) ) THEN |
---|
1441 | CALL stuff_bdytend ( q2bdy3dtemp2 , q2bdy3dtemp1 , REAL(interval_seconds) ,grid%scalar_bt(:,:,:,:,3) , 'T' , & |
---|
1442 | ijds , ijde , spec_bdy_width , & |
---|
1443 | ids , ide , jds , jde , kds , kde , & |
---|
1444 | ims , ime , jms , jme , kms , kme , & |
---|
1445 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1446 | ENDIF |
---|
1447 | IF ((config_flags%mars .eq. 11) .OR. (config_flags%mars .eq. 12)) THEN |
---|
1448 | CALL stuff_bdytend ( q3bdy3dtemp2 , q3bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,4) , 'T' , & |
---|
1449 | ijds , ijde , spec_bdy_width , & |
---|
1450 | ids , ide , jds , jde , kds , kde , & |
---|
1451 | ims , ime , jms , jme , kms , kme , & |
---|
1452 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1453 | CALL stuff_bdytend ( q4bdy3dtemp2 , q4bdy3dtemp1 , REAL(interval_seconds) ,grid%scalar_bt(:,:,:,:,5) , 'T' , & |
---|
1454 | ijds , ijde , spec_bdy_width , & |
---|
1455 | ids , ide , jds , jde , kds , kde , & |
---|
1456 | ims , ime , jms , jme , kms , kme , & |
---|
1457 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1458 | ENDIF |
---|
1459 | IF ((config_flags%mars .eq. 12)) THEN |
---|
1460 | CALL stuff_bdytend ( q5bdy3dtemp2 , q5bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,6) , 'T' , & |
---|
1461 | ijds , ijde , spec_bdy_width , & |
---|
1462 | ids , ide , jds , jde , kds , kde , & |
---|
1463 | ims , ime , jms , jme , kms , kme , & |
---|
1464 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1465 | CALL stuff_bdytend ( q6bdy3dtemp2 , q6bdy3dtemp1 , REAL(interval_seconds) ,grid%scalar_bt(:,:,:,:,7) , 'T' , & |
---|
1466 | ijds , ijde , spec_bdy_width , & |
---|
1467 | ids , ide , jds , jde , kds , kde , & |
---|
1468 | ims , ime , jms , jme , kms , kme , & |
---|
1469 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1470 | ENDIF |
---|
1471 | |
---|
1472 | !VENUS |
---|
1473 | IF (config_flags%mars .eq. 34) THEN |
---|
1474 | CALL stuff_bdytend ( qbdy3dtemp2 , qbdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,2) , 'T' , & |
---|
1475 | ijds , ijde , spec_bdy_width , & |
---|
1476 | ids , ide , jds , jde , kds , kde , & |
---|
1477 | ims , ime , jms , jme , kms , kme , & |
---|
1478 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1479 | CALL stuff_bdytend ( q2bdy3dtemp2 , q2bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,3) , 'T' , & |
---|
1480 | ijds , ijde , spec_bdy_width , & |
---|
1481 | ids , ide , jds , jde , kds , kde , & |
---|
1482 | ims , ime , jms , jme , kms , kme , & |
---|
1483 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1484 | CALL stuff_bdytend ( q3bdy3dtemp2 , q3bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,4) , 'T' , & |
---|
1485 | ijds , ijde , spec_bdy_width , & |
---|
1486 | ids , ide , jds , jde , kds , kde , & |
---|
1487 | ims , ime , jms , jme , kms , kme , & |
---|
1488 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1489 | CALL stuff_bdytend ( q4bdy3dtemp2 , q4bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,5) , 'T' , & |
---|
1490 | ijds , ijde , spec_bdy_width , & |
---|
1491 | ids , ide , jds , jde , kds , kde , & |
---|
1492 | ims , ime , jms , jme , kms , kme , & |
---|
1493 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1494 | CALL stuff_bdytend ( q5bdy3dtemp2 , q5bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,6) , 'T' , & |
---|
1495 | ijds , ijde , spec_bdy_width , & |
---|
1496 | ids , ide , jds , jde , kds , kde , & |
---|
1497 | ims , ime , jms , jme , kms , kme , & |
---|
1498 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1499 | CALL stuff_bdytend ( q6bdy3dtemp2 , q6bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,7) , 'T' , & |
---|
1500 | ijds , ijde , spec_bdy_width , & |
---|
1501 | ids , ide , jds , jde , kds , kde , & |
---|
1502 | ims , ime , jms , jme , kms , kme , & |
---|
1503 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1504 | CALL stuff_bdytend ( q7bdy3dtemp2 , q7bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,8) , 'T' , & |
---|
1505 | ijds , ijde , spec_bdy_width , & |
---|
1506 | ids , ide , jds , jde , kds , kde , & |
---|
1507 | ims , ime , jms , jme , kms , kme , & |
---|
1508 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1509 | CALL stuff_bdytend ( q8bdy3dtemp2 , q8bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,9) , 'T' , & |
---|
1510 | ijds , ijde , spec_bdy_width , & |
---|
1511 | ids , ide , jds , jde , kds , kde , & |
---|
1512 | ims , ime , jms , jme , kms , kme , & |
---|
1513 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1514 | CALL stuff_bdytend ( q9bdy3dtemp2 , q9bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,10) , 'T' , & |
---|
1515 | ijds , ijde , spec_bdy_width , & |
---|
1516 | ids , ide , jds , jde , kds , kde , & |
---|
1517 | ims , ime , jms , jme , kms , kme , & |
---|
1518 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1519 | CALL stuff_bdytend ( q10bdy3dtemp2 , q10bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,11) , 'T' , & |
---|
1520 | ijds , ijde , spec_bdy_width , & |
---|
1521 | ids , ide , jds , jde , kds , kde , & |
---|
1522 | ims , ime , jms , jme , kms , kme , & |
---|
1523 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1524 | CALL stuff_bdytend ( q11bdy3dtemp2 , q11bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,12) , 'T' , & |
---|
1525 | ijds , ijde , spec_bdy_width , & |
---|
1526 | ids , ide , jds , jde , kds , kde , & |
---|
1527 | ims , ime , jms , jme , kms , kme , & |
---|
1528 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1529 | CALL stuff_bdytend ( q12bdy3dtemp2 , q12bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,13) , 'T' , & |
---|
1530 | ijds , ijde , spec_bdy_width , & |
---|
1531 | ids , ide , jds , jde , kds , kde , & |
---|
1532 | ims , ime , jms , jme , kms , kme , & |
---|
1533 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1534 | CALL stuff_bdytend ( q13bdy3dtemp2 , q13bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,14) , 'T' , & |
---|
1535 | ijds , ijde , spec_bdy_width , & |
---|
1536 | ids , ide , jds , jde , kds , kde , & |
---|
1537 | ims , ime , jms , jme , kms , kme , & |
---|
1538 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1539 | CALL stuff_bdytend ( q14bdy3dtemp2 , q14bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,15) , 'T' , & |
---|
1540 | ijds , ijde , spec_bdy_width , & |
---|
1541 | ids , ide , jds , jde , kds , kde , & |
---|
1542 | ims , ime , jms , jme , kms , kme , & |
---|
1543 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1544 | CALL stuff_bdytend ( q15bdy3dtemp2 , q15bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,16) , 'T' , & |
---|
1545 | ijds , ijde , spec_bdy_width , & |
---|
1546 | ids , ide , jds , jde , kds , kde , & |
---|
1547 | ims , ime , jms , jme , kms , kme , & |
---|
1548 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1549 | CALL stuff_bdytend ( q16bdy3dtemp2 , q16bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,17) , 'T' , & |
---|
1550 | ijds , ijde , spec_bdy_width , & |
---|
1551 | ids , ide , jds , jde , kds , kde , & |
---|
1552 | ims , ime , jms , jme , kms , kme , & |
---|
1553 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1554 | CALL stuff_bdytend ( q17bdy3dtemp2 , q17bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,18) , 'T' , & |
---|
1555 | ijds , ijde , spec_bdy_width , & |
---|
1556 | ids , ide , jds , jde , kds , kde , & |
---|
1557 | ims , ime , jms , jme , kms , kme , & |
---|
1558 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1559 | CALL stuff_bdytend ( q18bdy3dtemp2 , q18bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,19) , 'T' , & |
---|
1560 | ijds , ijde , spec_bdy_width , & |
---|
1561 | ids , ide , jds , jde , kds , kde , & |
---|
1562 | ims , ime , jms , jme , kms , kme , & |
---|
1563 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1564 | CALL stuff_bdytend ( q19bdy3dtemp2 , q19bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,20) , 'T' , & |
---|
1565 | ijds , ijde , spec_bdy_width , & |
---|
1566 | ids , ide , jds , jde , kds , kde , & |
---|
1567 | ims , ime , jms , jme , kms , kme , & |
---|
1568 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1569 | CALL stuff_bdytend ( q20bdy3dtemp2 , q20bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,21) , 'T' , & |
---|
1570 | ijds , ijde , spec_bdy_width , & |
---|
1571 | ids , ide , jds , jde , kds , kde , & |
---|
1572 | ims , ime , jms , jme , kms , kme , & |
---|
1573 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1574 | CALL stuff_bdytend ( q21bdy3dtemp2 , q21bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,22) , 'T' , & |
---|
1575 | ijds , ijde , spec_bdy_width , & |
---|
1576 | ids , ide , jds , jde , kds , kde , & |
---|
1577 | ims , ime , jms , jme , kms , kme , & |
---|
1578 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1579 | CALL stuff_bdytend ( q22bdy3dtemp2 , q22bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,23) , 'T' , & |
---|
1580 | ijds , ijde , spec_bdy_width , & |
---|
1581 | ids , ide , jds , jde , kds , kde , & |
---|
1582 | ims , ime , jms , jme , kms , kme , & |
---|
1583 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1584 | CALL stuff_bdytend ( q23bdy3dtemp2 , q23bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,24) , 'T' , & |
---|
1585 | ijds , ijde , spec_bdy_width , & |
---|
1586 | ids , ide , jds , jde , kds , kde , & |
---|
1587 | ims , ime , jms , jme , kms , kme , & |
---|
1588 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1589 | CALL stuff_bdytend ( q24bdy3dtemp2 , q24bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,25) , 'T' , & |
---|
1590 | ijds , ijde , spec_bdy_width , & |
---|
1591 | ids , ide , jds , jde , kds , kde , & |
---|
1592 | ims , ime , jms , jme , kms , kme , & |
---|
1593 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1594 | CALL stuff_bdytend ( q25bdy3dtemp2 , q25bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,26) , 'T' , & |
---|
1595 | ijds , ijde , spec_bdy_width , & |
---|
1596 | ids , ide , jds , jde , kds , kde , & |
---|
1597 | ims , ime , jms , jme , kms , kme , & |
---|
1598 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1599 | CALL stuff_bdytend ( q26bdy3dtemp2 , q26bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,27) , 'T' , & |
---|
1600 | ijds , ijde , spec_bdy_width , & |
---|
1601 | ids , ide , jds , jde , kds , kde , & |
---|
1602 | ims , ime , jms , jme , kms , kme , & |
---|
1603 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1604 | CALL stuff_bdytend ( q27bdy3dtemp2 , q27bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,28) , 'T' , & |
---|
1605 | ijds , ijde , spec_bdy_width , & |
---|
1606 | ids , ide , jds , jde , kds , kde , & |
---|
1607 | ims , ime , jms , jme , kms , kme , & |
---|
1608 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1609 | CALL stuff_bdytend ( q28bdy3dtemp2 , q28bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,29) , 'T' , & |
---|
1610 | ijds , ijde , spec_bdy_width , & |
---|
1611 | ids , ide , jds , jde , kds , kde , & |
---|
1612 | ims , ime , jms , jme , kms , kme , & |
---|
1613 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1614 | CALL stuff_bdytend ( q29bdy3dtemp2 , q29bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,30) , 'T' , & |
---|
1615 | ijds , ijde , spec_bdy_width , & |
---|
1616 | ids , ide , jds , jde , kds , kde , & |
---|
1617 | ims , ime , jms , jme , kms , kme , & |
---|
1618 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1619 | CALL stuff_bdytend ( q30bdy3dtemp2 , q30bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,31) , 'T' , & |
---|
1620 | ijds , ijde , spec_bdy_width , & |
---|
1621 | ids , ide , jds , jde , kds , kde , & |
---|
1622 | ims , ime , jms , jme , kms , kme , & |
---|
1623 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1624 | CALL stuff_bdytend ( q31bdy3dtemp2 , q31bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,32) , 'T' , & |
---|
1625 | ijds , ijde , spec_bdy_width , & |
---|
1626 | ids , ide , jds , jde , kds , kde , & |
---|
1627 | ims , ime , jms , jme , kms , kme , & |
---|
1628 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1629 | CALL stuff_bdytend ( q32bdy3dtemp2 , q32bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,33) , 'T' , & |
---|
1630 | ijds , ijde , spec_bdy_width , & |
---|
1631 | ids , ide , jds , jde , kds , kde , & |
---|
1632 | ims , ime , jms , jme , kms , kme , & |
---|
1633 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1634 | CALL stuff_bdytend ( q33bdy3dtemp2 , q33bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,34) , 'T' , & |
---|
1635 | ijds , ijde , spec_bdy_width , & |
---|
1636 | ids , ide , jds , jde , kds , kde , & |
---|
1637 | ims , ime , jms , jme , kms , kme , & |
---|
1638 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1639 | CALL stuff_bdytend ( q34bdy3dtemp2 , q34bdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,35) , 'T' , & |
---|
1640 | ijds , ijde , spec_bdy_width , & |
---|
1641 | ids , ide , jds , jde , kds , kde , & |
---|
1642 | ims , ime , jms , jme , kms , kme , & |
---|
1643 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1644 | |
---|
1645 | ENDIF |
---|
1646 | !!!!!MARS << |
---|
1647 | |
---|
1648 | CALL stuff_bdytend ( mbdy2dtemp2 , mbdy2dtemp1 , REAL(interval_seconds) , grid%em_mu_bt , 'M' , & |
---|
1649 | ijds , ijde , spec_bdy_width , & |
---|
1650 | ids , ide , jds , jde , 1 , 1 , & |
---|
1651 | ims , ime , jms , jme , 1 , 1 , & |
---|
1652 | ips , ipe , jps , jpe , 1 , 1 ) |
---|
1653 | |
---|
1654 | ! Both pieces of the boundary data are now available to be written (initial time and tendency). |
---|
1655 | ! This looks ugly, these date shifting things. What's it for? We want the "Times" variable |
---|
1656 | ! in the lateral BDY file to have the valid times of when the initial fields are written. |
---|
1657 | ! That's what the loop-2 thingy is for with the start date. We increment the start_date so |
---|
1658 | ! that the starting time in the attributes is the second time period. Why you may ask. I |
---|
1659 | ! agree, why indeed. |
---|
1660 | |
---|
1661 | CALL domain_clockprint ( 150, grid, & |
---|
1662 | 'DEBUG assemble_output: clock before 1st current_date set,' ) |
---|
1663 | WRITE (wrf_err_message,*) & |
---|
1664 | 'DEBUG assemble_output: before 1st currTime set, current_date = ',TRIM(current_date) |
---|
1665 | CALL wrf_debug ( 150 , wrf_err_message ) |
---|
1666 | CALL domain_clock_set( grid, current_date(1:19) ) |
---|
1667 | CALL domain_clockprint ( 150, grid, & |
---|
1668 | 'DEBUG assemble_output: clock after 1st current_date set,' ) |
---|
1669 | |
---|
1670 | temp24= current_date |
---|
1671 | temp24b=start_date |
---|
1672 | start_date = current_date |
---|
1673 | CALL geth_newdate ( temp19 , temp24b(1:19) , (loop-2) * model_config_rec%interval_seconds ) |
---|
1674 | current_date = temp19 // '.0000' |
---|
1675 | CALL domain_clockprint ( 150, grid, & |
---|
1676 | 'DEBUG assemble_output: clock before 2nd current_date set,' ) |
---|
1677 | WRITE (wrf_err_message,*) & |
---|
1678 | 'DEBUG assemble_output: before 2nd currTime set, current_date = ',TRIM(current_date) |
---|
1679 | CALL wrf_debug ( 150 , wrf_err_message ) |
---|
1680 | CALL domain_clock_set( grid, current_date(1:19) ) |
---|
1681 | CALL domain_clockprint ( 150, grid, & |
---|
1682 | 'DEBUG assemble_output: clock after 2nd current_date set,' ) |
---|
1683 | IF(grid%id .EQ. 1)THEN |
---|
1684 | print *,'LBC valid between these times ',current_date, ' ',start_date |
---|
1685 | CALL output_boundary ( id, grid , config_flags , ierr ) |
---|
1686 | ENDIF |
---|
1687 | ! for fdda |
---|
1688 | IF(grid_fdda .EQ. 1) THEN |
---|
1689 | CALL output_aux_model_input10 ( id2, grid , config_flags , ierr ) |
---|
1690 | END IF |
---|
1691 | current_date = temp24 |
---|
1692 | start_date = temp24b |
---|
1693 | CALL domain_clockprint ( 150, grid, & |
---|
1694 | 'DEBUG assemble_output: clock before 3rd current_date set,' ) |
---|
1695 | WRITE (wrf_err_message,*) & |
---|
1696 | 'DEBUG assemble_output: before 3rd currTime set, current_date = ',TRIM(current_date) |
---|
1697 | CALL wrf_debug ( 150 , wrf_err_message ) |
---|
1698 | CALL domain_clock_set( grid, current_date(1:19) ) |
---|
1699 | CALL domain_clockprint ( 150, grid, & |
---|
1700 | 'DEBUG assemble_output: clock after 3rd current_date set,' ) |
---|
1701 | |
---|
1702 | ! OK, for all of the loops, we output the initialzation data, which would allow us to |
---|
1703 | ! start the model at any of the available analysis time periods. |
---|
1704 | |
---|
1705 | ! WRITE ( loop_char , FMT = '(I4.4)' ) loop |
---|
1706 | ! CALL open_w_dataset ( id1, 'wrfinput'//loop_char , grid , config_flags , output_model_input , "DATASET=INPUT", ierr ) |
---|
1707 | ! IF ( ierr .NE. 0 ) THEN |
---|
1708 | ! CALL wrf_error_fatal( 'real: error opening wrfinput'//loop_char//' for writing' ) |
---|
1709 | ! ENDIF |
---|
1710 | |
---|
1711 | ! CALL calc_current_date ( grid%id , 0. ) |
---|
1712 | ! CALL output_model_input ( id1, grid , config_flags , ierr ) |
---|
1713 | ! CALL close_dataset ( id1 , config_flags , "DATASET=INPUT" ) |
---|
1714 | ! Is this or is this not the last time time? We can remove some unnecessary |
---|
1715 | ! stores if it is not. |
---|
1716 | IF ( loop .LT. time_loop_max ) THEN |
---|
1717 | |
---|
1718 | ! We need to save the 3d data to compute a difference during the next loop. Couple the |
---|
1719 | ! 3d fields with total mu (mub + mu_2) and the stagger-specific map scale factor. |
---|
1720 | ! We load up the boundary data again for use in the next loop. |
---|
1721 | |
---|
1722 | DO j = jps , jpe |
---|
1723 | DO k = kps , kpe |
---|
1724 | DO i = ips , ipe |
---|
1725 | ubdy3dtemp1(i,k,j) = ubdy3dtemp2(i,k,j) |
---|
1726 | vbdy3dtemp1(i,k,j) = vbdy3dtemp2(i,k,j) |
---|
1727 | tbdy3dtemp1(i,k,j) = tbdy3dtemp2(i,k,j) |
---|
1728 | pbdy3dtemp1(i,k,j) = pbdy3dtemp2(i,k,j) |
---|
1729 | qbdy3dtemp1(i,k,j) = qbdy3dtemp2(i,k,j) |
---|
1730 | !!!!MARS >> |
---|
1731 | q2bdy3dtemp1(i,k,j) = q2bdy3dtemp2(i,k,j) |
---|
1732 | q3bdy3dtemp1(i,k,j) = q3bdy3dtemp2(i,k,j) |
---|
1733 | q4bdy3dtemp1(i,k,j) = q4bdy3dtemp2(i,k,j) |
---|
1734 | q5bdy3dtemp1(i,k,j) = q5bdy3dtemp2(i,k,j) |
---|
1735 | q6bdy3dtemp1(i,k,j) = q6bdy3dtemp2(i,k,j) |
---|
1736 | q7bdy3dtemp1(i,k,j) = q7bdy3dtemp2(i,k,j) |
---|
1737 | q8bdy3dtemp1(i,k,j) = q8bdy3dtemp2(i,k,j) |
---|
1738 | q9bdy3dtemp1(i,k,j) = q9bdy3dtemp2(i,k,j) |
---|
1739 | q10bdy3dtemp1(i,k,j) = q10bdy3dtemp2(i,k,j) |
---|
1740 | q11bdy3dtemp1(i,k,j) = q11bdy3dtemp2(i,k,j) |
---|
1741 | q12bdy3dtemp1(i,k,j) = q12bdy3dtemp2(i,k,j) |
---|
1742 | q13bdy3dtemp1(i,k,j) = q13bdy3dtemp2(i,k,j) |
---|
1743 | q14bdy3dtemp1(i,k,j) = q14bdy3dtemp2(i,k,j) |
---|
1744 | q15bdy3dtemp1(i,k,j) = q15bdy3dtemp2(i,k,j) |
---|
1745 | q16bdy3dtemp1(i,k,j) = q16bdy3dtemp2(i,k,j) |
---|
1746 | q17bdy3dtemp1(i,k,j) = q17bdy3dtemp2(i,k,j) |
---|
1747 | q18bdy3dtemp1(i,k,j) = q18bdy3dtemp2(i,k,j) |
---|
1748 | q19bdy3dtemp1(i,k,j) = q19bdy3dtemp2(i,k,j) |
---|
1749 | q20bdy3dtemp1(i,k,j) = q20bdy3dtemp2(i,k,j) |
---|
1750 | q21bdy3dtemp1(i,k,j) = q21bdy3dtemp2(i,k,j) |
---|
1751 | q22bdy3dtemp1(i,k,j) = q22bdy3dtemp2(i,k,j) |
---|
1752 | q23bdy3dtemp1(i,k,j) = q23bdy3dtemp2(i,k,j) |
---|
1753 | q24bdy3dtemp1(i,k,j) = q24bdy3dtemp2(i,k,j) |
---|
1754 | q25bdy3dtemp1(i,k,j) = q25bdy3dtemp2(i,k,j) |
---|
1755 | q26bdy3dtemp1(i,k,j) = q26bdy3dtemp2(i,k,j) |
---|
1756 | q27bdy3dtemp1(i,k,j) = q27bdy3dtemp2(i,k,j) |
---|
1757 | q28bdy3dtemp1(i,k,j) = q28bdy3dtemp2(i,k,j) |
---|
1758 | q29bdy3dtemp1(i,k,j) = q29bdy3dtemp2(i,k,j) |
---|
1759 | q30bdy3dtemp1(i,k,j) = q30bdy3dtemp2(i,k,j) |
---|
1760 | q31bdy3dtemp1(i,k,j) = q31bdy3dtemp2(i,k,j) |
---|
1761 | q32bdy3dtemp1(i,k,j) = q32bdy3dtemp2(i,k,j) |
---|
1762 | q33bdy3dtemp1(i,k,j) = q33bdy3dtemp2(i,k,j) |
---|
1763 | q34bdy3dtemp1(i,k,j) = q34bdy3dtemp2(i,k,j) |
---|
1764 | q35bdy3dtemp1(i,k,j) = q35bdy3dtemp2(i,k,j) |
---|
1765 | !!!!MARS << |
---|
1766 | END DO |
---|
1767 | END DO |
---|
1768 | END DO |
---|
1769 | |
---|
1770 | DO j = jps , jpe |
---|
1771 | DO i = ips , ipe |
---|
1772 | mbdy2dtemp1(i,1,j) = mbdy2dtemp2(i,1,j) |
---|
1773 | END DO |
---|
1774 | END DO |
---|
1775 | |
---|
1776 | IF(grid_fdda .EQ. 1)THEN |
---|
1777 | ! for fdda |
---|
1778 | DO j = jps , jpe |
---|
1779 | DO k = kps , kpe |
---|
1780 | DO i = ips , ipe |
---|
1781 | grid%fdda3d(i,k,j,p_u_ndg_old) = grid%fdda3d(i,k,j,p_u_ndg_new) |
---|
1782 | grid%fdda3d(i,k,j,p_v_ndg_old) = grid%fdda3d(i,k,j,p_v_ndg_new) |
---|
1783 | grid%fdda3d(i,k,j,p_t_ndg_old) = grid%fdda3d(i,k,j,p_t_ndg_new) |
---|
1784 | grid%fdda3d(i,k,j,p_q_ndg_old) = grid%fdda3d(i,k,j,p_q_ndg_new) |
---|
1785 | grid%fdda3d(i,k,j,p_ph_ndg_old) = grid%fdda3d(i,k,j,p_ph_ndg_new) |
---|
1786 | END DO |
---|
1787 | END DO |
---|
1788 | END DO |
---|
1789 | |
---|
1790 | DO j = jps , jpe |
---|
1791 | DO i = ips , ipe |
---|
1792 | grid%fdda2d(i,1,j,p_mu_ndg_old) = grid%fdda2d(i,1,j,p_mu_ndg_new) |
---|
1793 | END DO |
---|
1794 | END DO |
---|
1795 | ENDIF |
---|
1796 | |
---|
1797 | ! There are 2 components to the lateral boundaries. First, there is the starting |
---|
1798 | ! point of this time period - just the outer few rows and columns. |
---|
1799 | |
---|
1800 | CALL stuff_bdy ( ubdy3dtemp1 , grid%em_u_b , 'U' , ijds , ijde , spec_bdy_width , & |
---|
1801 | ids , ide , jds , jde , kds , kde , & |
---|
1802 | ims , ime , jms , jme , kms , kme , & |
---|
1803 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1804 | CALL stuff_bdy ( vbdy3dtemp1 , grid%em_v_b , 'V' , ijds , ijde , spec_bdy_width , & |
---|
1805 | ids , ide , jds , jde , kds , kde , & |
---|
1806 | ims , ime , jms , jme , kms , kme , & |
---|
1807 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1808 | CALL stuff_bdy ( tbdy3dtemp1 , grid%em_t_b , 'T' , ijds , ijde , spec_bdy_width , & |
---|
1809 | ids , ide , jds , jde , kds , kde , & |
---|
1810 | ims , ime , jms , jme , kms , kme , & |
---|
1811 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1812 | CALL stuff_bdy ( pbdy3dtemp1 , grid%em_ph_b , 'W' , ijds , ijde , spec_bdy_width , & |
---|
1813 | ids , ide , jds , jde , kds , kde , & |
---|
1814 | ims , ime , jms , jme , kms , kme , & |
---|
1815 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1816 | ! CALL stuff_bdy ( qbdy3dtemp1 , grid%moist_b(:,:,:,:,P_QV) , 'T' , ijds , ijde , spec_bdy_width , & |
---|
1817 | ! ids , ide , jds , jde , kds , kde , & |
---|
1818 | ! ims , ime , jms , jme , kms , kme , & |
---|
1819 | ! ips , ipe , jps , jpe , kps , kpe ) |
---|
1820 | !!!!!MARS >> |
---|
1821 | IF (config_flags%mars .gt. 0) THEN |
---|
1822 | CALL stuff_bdy ( qbdy3dtemp1 , grid%scalar_b(:,:,:,:,2) , 'T', ijds , ijde , spec_bdy_width , & |
---|
1823 | ids , ide , jds , jde , kds , kde , & |
---|
1824 | ims , ime , jms , jme , kms , kme , & |
---|
1825 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1826 | ENDIF |
---|
1827 | IF ( (config_flags%mars .eq. 1) .OR. & |
---|
1828 | (config_flags%mars .eq. 3) .OR. & |
---|
1829 | (config_flags%mars .eq. 11) .OR. & |
---|
1830 | (config_flags%mars .eq. 12) ) THEN |
---|
1831 | CALL stuff_bdy ( q2bdy3dtemp1 , grid%scalar_b(:,:,:,:,3) , 'T', ijds , ijde , spec_bdy_width , & |
---|
1832 | ids , ide , jds , jde , kds , kde , & |
---|
1833 | ims , ime , jms , jme , kms , kme , & |
---|
1834 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1835 | ENDIF |
---|
1836 | IF ((config_flags%mars .eq. 11) .OR. (config_flags%mars .eq. 12)) THEN |
---|
1837 | CALL stuff_bdy ( q3bdy3dtemp1 , grid%scalar_b(:,:,:,:,4) , 'T', ijds , ijde , spec_bdy_width , & |
---|
1838 | ids , ide , jds , jde , kds , kde , & |
---|
1839 | ims , ime , jms , jme , kms , kme , & |
---|
1840 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1841 | CALL stuff_bdy ( q4bdy3dtemp1 , grid%scalar_b(:,:,:,:,5) , 'T', ijds , ijde , spec_bdy_width , & |
---|
1842 | ids , ide , jds , jde , kds , kde , & |
---|
1843 | ims , ime , jms , jme , kms , kme , & |
---|
1844 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1845 | ENDIF |
---|
1846 | IF ((config_flags%mars .eq. 12)) THEN |
---|
1847 | CALL stuff_bdy ( q5bdy3dtemp1 , grid%scalar_b(:,:,:,:,6) , 'T', ijds , ijde , spec_bdy_width , & |
---|
1848 | ids , ide , jds , jde , kds , kde , & |
---|
1849 | ims , ime , jms , jme , kms , kme , & |
---|
1850 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1851 | CALL stuff_bdy ( q6bdy3dtemp1 , grid%scalar_b(:,:,:,:,7) , 'T', ijds , ijde , spec_bdy_width , & |
---|
1852 | ids , ide , jds , jde , kds , kde , & |
---|
1853 | ims , ime , jms , jme , kms , kme , & |
---|
1854 | ips , ipe , jps , jpe , kps , kpe ) |
---|
1855 | ENDIF |
---|
1856 | |
---|
1857 | !VENUS |
---|
1858 | IF (config_flags%mars .eq. 34) THEN |
---|
1859 | CALL stuff_bdy ( qbdy3dtemp1 , grid%scalar_b(:,:,:,:,2) , 'T' , ijds, ijde , spec_bdy_width , & |
---|
1860 | ids , ide , jds, jde , kds , kde , & |
---|
1861 | ims , ime , jms, jme , kms , kme , & |
---|
1862 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1863 | CALL stuff_bdy ( q2bdy3dtemp1 , grid%scalar_b(:,:,:,:,3) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1864 | ids , ide , jds, jde , kds , kde , & |
---|
1865 | ims , ime , jms, jme , kms , kme , & |
---|
1866 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1867 | CALL stuff_bdy ( q3bdy3dtemp1 , grid%scalar_b(:,:,:,:,4) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1868 | ids , ide , jds, jde , kds , kde , & |
---|
1869 | ims , ime , jms, jme , kms , kme , & |
---|
1870 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1871 | CALL stuff_bdy ( q4bdy3dtemp1 , grid%scalar_b(:,:,:,:,5) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1872 | ids , ide , jds, jde , kds , kde , & |
---|
1873 | ims , ime , jms, jme , kms , kme , & |
---|
1874 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1875 | CALL stuff_bdy ( q5bdy3dtemp1 , grid%scalar_b(:,:,:,:,6) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1876 | ids , ide , jds, jde , kds , kde , & |
---|
1877 | ims , ime , jms, jme , kms , kme , & |
---|
1878 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1879 | CALL stuff_bdy ( q6bdy3dtemp1 , grid%scalar_b(:,:,:,:,7) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1880 | ids , ide , jds, jde , kds , kde , & |
---|
1881 | ims , ime , jms, jme , kms , kme , & |
---|
1882 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1883 | CALL stuff_bdy ( q7bdy3dtemp1 , grid%scalar_b(:,:,:,:,8) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1884 | ids , ide , jds, jde , kds , kde , & |
---|
1885 | ims , ime , jms, jme , kms , kme , & |
---|
1886 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1887 | CALL stuff_bdy ( q8bdy3dtemp1 , grid%scalar_b(:,:,:,:,9) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1888 | ids , ide , jds, jde , kds , kde , & |
---|
1889 | ims , ime , jms, jme , kms , kme , & |
---|
1890 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1891 | CALL stuff_bdy ( q9bdy3dtemp1 , grid%scalar_b(:,:,:,:,10) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1892 | ids , ide , jds, jde , kds , kde , & |
---|
1893 | ims , ime , jms, jme , kms , kme , & |
---|
1894 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1895 | CALL stuff_bdy ( q10bdy3dtemp1 , grid%scalar_b(:,:,:,:,11) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1896 | ids , ide , jds, jde , kds , kde , & |
---|
1897 | ims , ime , jms, jme , kms , kme , & |
---|
1898 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1899 | CALL stuff_bdy ( q11bdy3dtemp1 , grid%scalar_b(:,:,:,:,12) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1900 | ids , ide , jds, jde , kds , kde , & |
---|
1901 | ims , ime , jms, jme , kms , kme , & |
---|
1902 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1903 | CALL stuff_bdy ( q12bdy3dtemp1 , grid%scalar_b(:,:,:,:,13) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1904 | ids , ide , jds, jde , kds , kde , & |
---|
1905 | ims , ime , jms, jme , kms , kme , & |
---|
1906 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1907 | CALL stuff_bdy ( q13bdy3dtemp1 , grid%scalar_b(:,:,:,:,14) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1908 | ids , ide , jds, jde , kds , kde , & |
---|
1909 | ims , ime , jms, jme , kms , kme , & |
---|
1910 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1911 | CALL stuff_bdy ( q14bdy3dtemp1 , grid%scalar_b(:,:,:,:,15) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1912 | ids , ide , jds, jde , kds , kde , & |
---|
1913 | ims , ime , jms, jme , kms , kme , & |
---|
1914 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1915 | CALL stuff_bdy ( q15bdy3dtemp1 , grid%scalar_b(:,:,:,:,16) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1916 | ids , ide , jds, jde , kds , kde , & |
---|
1917 | ims , ime , jms, jme , kms , kme , & |
---|
1918 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1919 | CALL stuff_bdy ( q16bdy3dtemp1 , grid%scalar_b(:,:,:,:,17) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1920 | ids , ide , jds, jde , kds , kde , & |
---|
1921 | ims , ime , jms, jme , kms , kme , & |
---|
1922 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1923 | CALL stuff_bdy ( q17bdy3dtemp1 , grid%scalar_b(:,:,:,:,18) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1924 | ids , ide , jds, jde , kds , kde , & |
---|
1925 | ims , ime , jms, jme , kms , kme , & |
---|
1926 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1927 | CALL stuff_bdy ( q18bdy3dtemp1 , grid%scalar_b(:,:,:,:,19) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1928 | ids , ide , jds, jde , kds , kde , & |
---|
1929 | ims , ime , jms, jme , kms , kme , & |
---|
1930 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1931 | CALL stuff_bdy ( q19bdy3dtemp1 , grid%scalar_b(:,:,:,:,20) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1932 | ids , ide , jds, jde , kds , kde , & |
---|
1933 | ims , ime , jms, jme , kms , kme , & |
---|
1934 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1935 | CALL stuff_bdy ( q20bdy3dtemp1 , grid%scalar_b(:,:,:,:,21) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1936 | ids , ide , jds, jde , kds , kde , & |
---|
1937 | ims , ime , jms, jme , kms , kme , & |
---|
1938 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1939 | CALL stuff_bdy ( q21bdy3dtemp1 , grid%scalar_b(:,:,:,:,22) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1940 | ids , ide , jds, jde , kds , kde , & |
---|
1941 | ims , ime , jms, jme , kms , kme , & |
---|
1942 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1943 | CALL stuff_bdy ( q22bdy3dtemp1 , grid%scalar_b(:,:,:,:,23) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1944 | ids , ide , jds, jde , kds , kde , & |
---|
1945 | ims , ime , jms, jme , kms , kme , & |
---|
1946 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1947 | CALL stuff_bdy ( q23bdy3dtemp1 , grid%scalar_b(:,:,:,:,24) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1948 | ids , ide , jds, jde , kds , kde , & |
---|
1949 | ims , ime , jms, jme , kms , kme , & |
---|
1950 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1951 | CALL stuff_bdy ( q24bdy3dtemp1 , grid%scalar_b(:,:,:,:,25) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1952 | ids , ide , jds, jde , kds , kde , & |
---|
1953 | ims , ime , jms, jme , kms , kme , & |
---|
1954 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1955 | CALL stuff_bdy ( q25bdy3dtemp1 , grid%scalar_b(:,:,:,:,26) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1956 | ids , ide , jds, jde , kds , kde , & |
---|
1957 | ims , ime , jms, jme , kms , kme , & |
---|
1958 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1959 | CALL stuff_bdy ( q26bdy3dtemp1 , grid%scalar_b(:,:,:,:,27) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1960 | ids , ide , jds, jde , kds , kde , & |
---|
1961 | ims , ime , jms, jme , kms , kme , & |
---|
1962 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1963 | CALL stuff_bdy ( q27bdy3dtemp1 , grid%scalar_b(:,:,:,:,28) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1964 | ids , ide , jds, jde , kds , kde , & |
---|
1965 | ims , ime , jms, jme , kms , kme , & |
---|
1966 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1967 | CALL stuff_bdy ( q28bdy3dtemp1 , grid%scalar_b(:,:,:,:,29) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1968 | ids , ide , jds, jde , kds , kde , & |
---|
1969 | ims , ime , jms, jme , kms , kme , & |
---|
1970 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1971 | CALL stuff_bdy ( q29bdy3dtemp1 , grid%scalar_b(:,:,:,:,30) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1972 | ids , ide , jds, jde , kds , kde , & |
---|
1973 | ims , ime , jms, jme , kms , kme , & |
---|
1974 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1975 | CALL stuff_bdy ( q30bdy3dtemp1 , grid%scalar_b(:,:,:,:,31) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1976 | ids , ide , jds, jde , kds , kde , & |
---|
1977 | ims , ime , jms, jme , kms , kme , & |
---|
1978 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1979 | CALL stuff_bdy ( q31bdy3dtemp1 , grid%scalar_b(:,:,:,:,33) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1980 | ids , ide , jds, jde , kds , kde , & |
---|
1981 | ims , ime , jms, jme , kms , kme , & |
---|
1982 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1983 | CALL stuff_bdy ( q32bdy3dtemp1 , grid%scalar_b(:,:,:,:,33) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1984 | ids , ide , jds, jde , kds , kde , & |
---|
1985 | ims , ime , jms, jme , kms , kme , & |
---|
1986 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1987 | CALL stuff_bdy ( q33bdy3dtemp1 , grid%scalar_b(:,:,:,:,34) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1988 | ids , ide , jds, jde , kds , kde , & |
---|
1989 | ims , ime , jms, jme , kms , kme , & |
---|
1990 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1991 | CALL stuff_bdy ( q34bdy3dtemp1 , grid%scalar_b(:,:,:,:,35) , 'T' ,ijds , ijde , spec_bdy_width , & |
---|
1992 | ids , ide , jds, jde , kds , kde , & |
---|
1993 | ims , ime , jms, jme , kms , kme , & |
---|
1994 | ips , ipe , jps, jpe , kps , kpe ) |
---|
1995 | ENDIF |
---|
1996 | !!!!MARS << |
---|
1997 | CALL stuff_bdy ( mbdy2dtemp1 , grid%em_mu_b , 'M' , ijds , ijde , spec_bdy_width , & |
---|
1998 | ids , ide , jds , jde , 1 , 1 , & |
---|
1999 | ims , ime , jms , jme , 1 , 1 , & |
---|
2000 | ips , ipe , jps , jpe , 1 , 1 ) |
---|
2001 | |
---|
2002 | ELSE IF ( loop .EQ. time_loop_max ) THEN |
---|
2003 | |
---|
2004 | ! If this is the last time through here, we need to close the files. |
---|
2005 | |
---|
2006 | IF(grid%id .EQ. 1)CALL close_dataset ( id , config_flags , "DATASET=BOUNDARY" ) |
---|
2007 | IF(grid_fdda .EQ. 1)CALL close_dataset ( id2 , config_flags , "DATASET=AUXINPUT10" ) |
---|
2008 | IF(sst_update .EQ. 1)THEN |
---|
2009 | CALL close_dataset ( id5 , config_flags , "DATASET=AUXINPUT5" ) |
---|
2010 | ENDIF |
---|
2011 | |
---|
2012 | END IF |
---|
2013 | |
---|
2014 | END IF |
---|
2015 | |
---|
2016 | END SUBROUTINE assemble_output |
---|