FV3DYCORE  Version1.0.0
fv_control.F90
Go to the documentation of this file.
1 
2 !***********************************************************************
3 !* GNU Lesser General Public License
4 !*
5 !* This file is part of the FV3 dynamical core.
6 !*
7 !* The FV3 dynamical core is free software: you can redistribute it
8 !* and/or modify it under the terms of the
9 !* GNU Lesser General Public License as published by the
10 !* Free Software Foundation, either version 3 of the License, or
11 !* (at your option) any later version.
12 !*
13 !* The FV3 dynamical core is distributed in the hope that it will be
14 !* useful, but WITHOUT ANYWARRANTY; without even the implied warranty
15 !* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 !* See the GNU General Public License for more details.
17 !*
18 !* You should have received a copy of the GNU Lesser General Public
19 !* License along with the FV3 dynamical core.
20 !* If not, see <http://www.gnu.org/licenses/>.
21 !***********************************************************************
22 
25 !----------------
26 ! FV control panel
27 !----------------
28 
29 
30 
32 ! Modules Included:
33 ! <table>
34 ! <tr>
35 ! <th>Module Name</th>
36 ! <th>Functions Included</th>
37 ! </tr>
38 ! <table>
39 ! <tr>
40 ! <td>constants_mod</td>
41 ! <td>pi=>pi_8, kappa, radius, grav, rdgas</td>
42 ! </tr>
43 ! <tr>
44 ! <td>field_manager_mod</td>
45 ! <td>MODEL_ATMOS</td>
46 ! </tr>
47 ! <tr>
48 ! <td>fms_mod</td>
49 ! <td>write_version_number, open_namelist_file,
50 ! check_nml_error, close_file, file_exist</td>
51 ! </tr>
52 ! <tr>
53 ! <td>fv_arrays_mod</td>
54 ! <td>fv_atmos_type, allocate_fv_atmos_type, deallocate_fv_atmos_type,
55 ! R_GRID</td>
56 ! </tr>
57 ! <tr>
58 ! <td>fv_diagnostics_mod</td>
59 ! <td>fv_diag_init_gn</td>
60 ! </tr>
61 ! <tr>
62 ! <td>fv_eta_mod</td>
63 ! <td>set_eta</td>
64 ! </tr>
65 ! <tr>
66 ! <td>fv_grid_tools_mod</td>
67 ! <td>init_grid</td>
68 ! </tr>
69 ! <tr>
70 ! <td>fv_grid_utils_mod</td>
71 ! <td>grid_utils_init, grid_utils_end, ptop_min</td>
72 ! </tr>
73 ! <tr>
74 ! <td>fv_mp_mod</td>
75 ! <td>mp_start, mp_assign_gid, domain_decomp,ng, switch_current_Atm,
76 ! broadcast_domains, mp_barrier, is_master, setup_master </td>
77 ! </tr>
78 ! <tr>
79 ! <td>fv_io_mod</td>
80 ! <td>fv_io_exit</td>
81 ! </tr>
82 ! <tr>
83 ! <td>fv_restart_mod</td>
84 ! <td>fv_restart_init, fv_restart_end</td>
85 ! </tr>
86 ! <tr>
87 ! <td>fv_timing_mod</td>
88 ! <td>timing_on, timing_off, timing_init, timing_prt</td>
89 ! </tr>
90 ! <tr>
91 ! <td>mpp_mod</td>
92 ! <td>mpp_send, mpp_sync, mpp_transmit, mpp_set_current_pelist, mpp_declare_pelist,
93 ! mpp_root_pe, mpp_recv, mpp_sync_self, mpp_broadcast, read_input_nml,
94 ! FATAL, mpp_error, mpp_pe, stdlog, mpp_npes, mpp_get_current_pelist,
95 ! input_nml_file, get_unit, WARNING, read_ascii_file, INPUT_STR_LENGTH</td>
96 ! </tr>
97 ! <tr>
98 ! <td>mpp_domains_mod</td>
99 ! <td>mpp_get_data_domain, mpp_get_compute_domain, domain2D, mpp_define_nest_domains,
100 ! nest_domain_type, mpp_get_global_domain, mpp_get_C2F_index, mpp_get_F2C_index,
101 ! mpp_broadcast_domain, CENTER, CORNER, NORTH, EAST, WEST, SOUTH</td>
102 ! </tr>
103 ! <tr>
104 ! <td>mpp_parameter_mod</td>
105 ! <td>AGRID_PARAM=>AGRID</td>
106 ! </tr>
107 ! <tr>
108 ! <td>test_cases_mod</td>
109 ! <td>test_case, bubble_do, alpha, nsolitons, soliton_Umax, soliton_size</td>
110 ! </tr>
111 ! <tr>
112 ! <td>tracer_manager_mod</td>
113 ! <td>tm_get_number_tracers => get_number_tracers,tm_get_tracer_index => get_tracer_index,
114 ! tm_get_tracer_indices => get_tracer_indices, tm_set_tracer_profile => set_tracer_profile,
115 ! tm_get_tracer_names => get_tracer_names,tm_check_if_prognostic=> check_if_prognostic,
116 ! tm_register_tracers => register_tracers</td>
117 ! </tr>
118 ! </table>
119 
120  use constants_mod, only: pi=>pi_8, kappa, radius, grav, rdgas
121  use field_manager_mod, only: model_atmos
122  use fms_mod, only: write_version_number, open_namelist_file, &
123  check_nml_error, close_file, file_exist
124  use mpp_mod, only: fatal, mpp_error, mpp_pe, stdlog, &
125  mpp_npes, mpp_get_current_pelist, &
126  input_nml_file, get_unit, warning, &
127  read_ascii_file, input_str_length
128  use mpp_domains_mod, only: mpp_get_data_domain, mpp_get_compute_domain
129  use tracer_manager_mod, only: tm_get_number_tracers => get_number_tracers, &
130  tm_get_tracer_index => get_tracer_index, &
131  tm_get_tracer_indices => get_tracer_indices, &
132  tm_set_tracer_profile => set_tracer_profile, &
133  tm_get_tracer_names => get_tracer_names, &
134  tm_check_if_prognostic=> check_if_prognostic,&
135  tm_register_tracers => register_tracers
136 
137  use fv_io_mod, only: fv_io_exit
140  r_grid
142  use fv_eta_mod, only: set_eta
143  use fv_grid_tools_mod, only: init_grid
144  use fv_mp_mod, only: mp_start, mp_assign_gid, domain_decomp
145  use fv_mp_mod, only: ng, switch_current_atm
146  use fv_mp_mod, only: broadcast_domains, mp_barrier, is_master, setup_master
147 !!! CLEANUP: should be replaced by a getter function?
150  use mpp_domains_mod, only: domain2d
151  use mpp_domains_mod, only: mpp_define_nest_domains, nest_domain_type, mpp_get_global_domain
152  use mpp_domains_mod, only: mpp_get_c2f_index, mpp_get_f2c_index, mpp_broadcast_domain
153  use mpp_domains_mod, only: center, corner, north, east, west, south
154  use mpp_mod, only: mpp_send, mpp_sync, mpp_transmit, mpp_set_current_pelist, mpp_declare_pelist, mpp_root_pe, mpp_recv, mpp_sync_self, mpp_broadcast, read_input_nml
156 
157 #ifdef MULTI_GASES
158  use constants_mod, only: rvgas, cp_air
159  use multi_gases_mod, only: multi_gases_init, &
160  rilist => ri, &
161  cpilist => cpi
162 #endif
163 
164  implicit none
165  private
166 
167 !-----------------------------------------------------------------------
168 ! Grid descriptor file setup
169 !-----------------------------------------------------------------------
170 !------------------------------------------
171 ! Model Domain parameters
172 ! See fv_arrays.F90 for descriptions
173 !------------------------------------------
174 !CLEANUP module pointers
175  character(len=80) , pointer :: grid_name
176  character(len=120), pointer :: grid_file
177  integer, pointer :: grid_type
178  integer , pointer :: hord_mt
179  integer , pointer :: kord_mt
180  integer , pointer :: kord_wz
181  integer , pointer :: hord_vt
182  integer , pointer :: hord_tm
183  integer , pointer :: hord_dp
184  integer , pointer :: kord_tm
185  integer , pointer :: hord_tr
186  integer , pointer :: kord_tr
187  real , pointer :: scale_z
188  real , pointer :: w_max
189  real , pointer :: z_min
190  real , pointer :: lim_fac
191 
192  integer , pointer :: nord
193  integer , pointer :: nord_tr
194  real , pointer :: dddmp
195  real , pointer :: d2_bg
196  real , pointer :: d4_bg
197  real , pointer :: vtdm4
198  real , pointer :: trdm2
199  real , pointer :: d2_bg_k1
200  real , pointer :: d2_bg_k2
201  real , pointer :: d2_divg_max_k1
202  real , pointer :: d2_divg_max_k2
203  real , pointer :: damp_k_k1
204  real , pointer :: damp_k_k2
205  integer , pointer :: n_zs_filter
206  integer , pointer :: nord_zs_filter
207  logical , pointer :: full_zs_filter
208 
209  logical , pointer :: rf_fast
210  logical , pointer :: consv_am
211  logical , pointer :: do_sat_adj
212  logical , pointer :: do_f3d
213  logical , pointer :: no_dycore
214  logical , pointer :: convert_ke
215  logical , pointer :: do_vort_damp
216  logical , pointer :: use_old_omega
217 ! PG off centering:
218  real , pointer :: beta
219  integer , pointer :: n_sponge
220  real , pointer :: d_ext
221  integer , pointer :: nwat
222  logical , pointer :: warm_start
223  logical , pointer :: inline_q
224  real , pointer :: shift_fac
225  logical , pointer :: do_schmidt
226  real(kind=R_GRID) , pointer :: stretch_fac
227  real(kind=R_GRID) , pointer :: target_lat
228  real(kind=R_GRID) , pointer :: target_lon
229 
230  logical , pointer :: reset_eta
231  real , pointer :: p_fac
232  real , pointer :: a_imp
233  integer , pointer :: n_split
234 
235  real , pointer :: fac_n_spl
236  real , pointer :: fhouri
237  ! Default
238  integer , pointer :: m_split
239  integer , pointer :: k_split
240  logical , pointer :: use_logp
241 
242  integer , pointer :: q_split
243  integer , pointer :: print_freq
244  logical , pointer :: write_3d_diags
245 
246  integer , pointer :: npx
247  integer , pointer :: npy
248  integer , pointer :: npz
249  integer , pointer :: npz_rst
250 
251  integer , pointer :: ncnst
252  integer , pointer :: pnats
253  integer , pointer :: dnats
254  integer , pointer :: ntiles
255  integer , pointer :: nf_omega
256  integer , pointer :: fv_sg_adj
257 
258  integer , pointer :: na_init
259  logical , pointer :: nudge_dz
260  real , pointer :: p_ref
261  real , pointer :: dry_mass
262  integer , pointer :: nt_prog
263  integer , pointer :: nt_phys
264  real , pointer :: tau_h2o
265 
266  real , pointer :: delt_max
267  real , pointer :: d_con
268  real , pointer :: ke_bg
269  real , pointer :: consv_te
270  real , pointer :: tau
271  real , pointer :: rf_cutoff
272  logical , pointer :: filter_phys
273  logical , pointer :: dwind_2d
274  logical , pointer :: breed_vortex_inline
275  logical , pointer :: range_warn
276  logical , pointer :: fill
277  logical , pointer :: fill_dp
278  logical , pointer :: fill_wz
279  logical , pointer :: check_negative
280  logical , pointer :: non_ortho
281  logical , pointer :: adiabatic
282  logical , pointer :: moist_phys
283  logical , pointer :: do_held_suarez
284  logical , pointer :: do_reed_physics
285  logical , pointer :: reed_cond_only
286  logical , pointer :: reproduce_sum
287  logical , pointer :: adjust_dry_mass
288  logical , pointer :: fv_debug
289  logical , pointer :: srf_init
290  logical , pointer :: mountain
291  logical , pointer :: remap_t
292  logical , pointer :: z_tracer
293 
294  logical , pointer :: old_divg_damp
295  logical , pointer :: fv_land
296  logical , pointer :: nudge
297  logical , pointer :: nudge_ic
298  logical , pointer :: ncep_ic
299  logical , pointer :: nggps_ic
300  logical , pointer :: ecmwf_ic
301  logical , pointer :: gfs_phil
302  logical , pointer :: agrid_vel_rst
303  logical , pointer :: use_new_ncep
304  logical , pointer :: use_ncep_phy
305  logical , pointer :: fv_diag_ic
306  logical , pointer :: external_ic
307  logical , pointer :: external_eta
308  logical , pointer :: read_increment
309  character(len=128) , pointer :: res_latlon_dynamics
310  character(len=128) , pointer :: res_latlon_tracers
311  logical , pointer :: hydrostatic
312  logical , pointer :: phys_hydrostatic
313  logical , pointer :: use_hydro_pressure
314  logical , pointer :: do_uni_zfull !miz
315  logical , pointer :: adj_mass_vmr ! f1p
316  logical , pointer :: hybrid_z
317  logical , pointer :: make_nh
318  logical , pointer :: make_hybrid_z
319  logical , pointer :: nudge_qv
320  real, pointer :: add_noise
321 
322  integer , pointer :: a2b_ord
323  integer , pointer :: c2l_ord
324 
325  integer, pointer :: ndims
326 
327  real(kind=R_GRID), pointer :: dx_const
328  real(kind=R_GRID), pointer :: dy_const
329  real(kind=R_GRID), pointer :: deglon_start, deglon_stop, & ! boundaries of latlon patch
331  real(kind=R_GRID), pointer :: deglat
332 
333  logical, pointer :: nested, twowaynest
334  logical, pointer :: regional
335  integer, pointer :: bc_update_interval
337  real, pointer :: s_weight, update_blend
338 
339  integer, pointer :: layout(:), io_layout(:)
340 
341  integer :: ntilesme ! Number of tiles on this process =1 for now
342 
343 #ifdef OVERLOAD_R4
344  real :: too_big = 1.e8
345 #else
346  real :: too_big = 1.e35
347 #endif
348  public :: fv_init, fv_end
349 
350  integer, public :: ngrids = 1
351  integer, public, allocatable :: pelist_all(:)
353  integer :: gid
354 
355  real :: umax = 350.
356  integer :: parent_grid_num = -1
357 
358  integer :: halo_update_type = 1
361 
362 
363 
364 ! version number of this module
365 ! Include variable "version" to be written to log file.
366 #include<file_version.h>
367 
368  contains
369 
370 !-------------------------------------------------------------------------------
374  subroutine fv_init(Atm, dt_atmos, grids_on_this_pe, p_split)
376  type(fv_atmos_type), allocatable, intent(inout), target :: atm(:)
377  real, intent(in) :: dt_atmos
378  logical, allocatable, intent(INOUT) :: grids_on_this_pe(:)
379  integer, intent(INOUT) :: p_split
380 
381  integer :: i, j, k, n, p
382  real :: sdt
383 
384 ! tracers
385  integer :: num_family
386 
387  integer :: isc_p, iec_p, jsc_p, jec_p, isg, ieg, jsg, jeg, upoff, jind
388  integer :: ic, jc
389 
390  gid = mpp_pe()
391  call init_nesting(atm, grids_on_this_pe, p_split)
392 
393  !This call is needed to set up the pointers for fv_current_grid, even for a single-grid run
394  !call switch_current_Atm(Atm(1), .false.)
395  call setup_pointers(atm(1))
396 
397 ! Start up MPI
398 
399  !call mp_assign_gid
400 
401  ! Initialize timing routines
402  call timing_init
403  call timing_on('TOTAL')
404 
405  ! Setup the run from namelist
406  ntilesme = size(atm(:)) !Full number of Atm arrays; one less than number of grids, if multiple grids
407 
408  call run_setup(atm,dt_atmos, grids_on_this_pe, p_split) ! initializes domain_decomp
409 
410  do n=1,ntilesme
411 
412  !In a single-grid run this will still be needed to correctly set the domain
413  call switch_current_atm(atm(n))
414  call setup_pointers(atm(n))
415 
416  target_lon = target_lon * pi/180.
417  target_lat = target_lat * pi/180.
418 
419 !--------------------------------------------------
420 ! override number of tracers by reading field_table
421 !--------------------------------------------------
422 
423  !not sure if this works with multiple grids
424  call tm_register_tracers (model_atmos, ncnst, nt_prog, pnats, num_family)
425  if(is_master()) then
426  write(*,*) 'ncnst=', ncnst,' num_prog=',nt_prog,' pnats=',pnats,' dnats=',dnats,' num_family=',num_family
427  print*, ''
428  endif
429 
430  if (grids_on_this_pe(n)) then
431  call allocate_fv_atmos_type(atm(n), atm(n)%bd%isd, atm(n)%bd%ied, atm(n)%bd%jsd, atm(n)%bd%jed, &
432  atm(n)%bd%isc, atm(n)%bd%iec, atm(n)%bd%jsc, atm(n)%bd%jec, &
433  npx, npy, npz, ndims, ncnst, ncnst-pnats, ng, .false., grids_on_this_pe(n), ngrids)
434 
435  if (grids_on_this_pe(n)) then
436 
437  call switch_current_atm(atm(n))
438  call setup_pointers(atm(n))
439 
440  if ( (atm(n)%bd%iec-atm(n)%bd%isc+1).lt.4 .or. (atm(n)%bd%jec-atm(n)%bd%jsc+1).lt.4 ) then
441  if (is_master()) write(*,'(6I6)') atm(n)%bd%isc, atm(n)%bd%iec, atm(n)%bd%jsc, atm(n)%bd%jec, n
442  call mpp_error(fatal,'Domain Decomposition: Cubed Sphere compute domain has a &
443  &minium requirement of 4 points in X and Y, respectively')
444  end if
445 
446  endif
447 
448  !!CLEANUP: Convenience pointers
449  atm(n)%gridstruct%nested => atm(n)%neststruct%nested
450  atm(n)%gridstruct%grid_type => atm(n)%flagstruct%grid_type
451  atm(n)%flagstruct%grid_number => atm(n)%grid_number
452  atm(n)%gridstruct%regional => atm(n)%flagstruct%regional
453 
454  call init_grid(atm(n), grid_name, grid_file, npx, npy, npz, ndims, ntiles, ng)
455 
456  ! Initialize the SW (2D) part of the model
457  !!!CLEANUP: this call could definitely use some cleaning up
459 
460  !!!CLEANUP: Are these correctly writing out on all pes?
461  if ( is_master() ) then
462  sdt = dt_atmos/real(n_split*k_split*abs(p_split))
463  write(*,*) ' '
464  write(*,*) 'Divergence damping Coefficients'
465  write(*,*) 'For small dt=', sdt
466  write(*,*) 'External mode del-2 (m**2/s)=', d_ext*atm(n)%gridstruct%da_min_c/sdt
467  write(*,*) 'Internal mode del-2 SMAG dimensionless coeff=', dddmp
468  write(*,*) 'Internal mode del-2 background diff=', d2_bg*atm(n)%gridstruct%da_min_c/sdt
469 
470  if (nord==1) then
471  write(*,*) 'Internal mode del-4 background diff=', d4_bg
472  write(*,*) 'Vorticity del-4 (m**4/s)=', (vtdm4*atm(n)%gridstruct%da_min)**2/sdt*1.e-6
473  endif
474  if (nord==2) write(*,*) 'Internal mode del-6 background diff=', d4_bg
475  if (nord==3) write(*,*) 'Internal mode del-8 background diff=', d4_bg
476  write(*,*) 'tracer del-2 diff=', trdm2
477 
478  write(*,*) 'Vorticity del-4 (m**4/s)=', (vtdm4*atm(n)%gridstruct%da_min)**2/sdt*1.e-6
479  write(*,*) 'beta=', beta
480  write(*,*) ' '
481  endif
482 
483 
484  atm(n)%ts = 300.
485  atm(n)%phis = too_big
486  ! The following statements are to prevent the phatom corner regions from
487  ! growing instability
488  atm(n)%u = 0.
489  atm(n)%v = 0.
490  atm(n)%ua = too_big
491  atm(n)%va = too_big
492 
493  else !this grid is NOT defined on this pe
494 
495  !Allocate dummy arrays
496  call allocate_fv_atmos_type(atm(n), atm(n)%bd%isd, atm(n)%bd%ied, atm(n)%bd%jsd, atm(n)%bd%jed, &
497  atm(n)%bd%isc, atm(n)%bd%iec, atm(n)%bd%jsc, atm(n)%bd%jec, &
498  npx, npy, npz, ndims, ncnst, ncnst-pnats, ng, .true., .false., ngrids)
499 
500  !Need to SEND grid_global to any child grids; this is received in setup_aligned_nest in fv_grid_tools
501  if (atm(n)%neststruct%nested) then
502 
503  call mpp_get_global_domain( atm(n)%parent_grid%domain, &
504  isg, ieg, jsg, jeg)
505 
506  !FIXME: Should replace this by generating the global grid (or at least one face thereof) on the
507  ! nested PEs instead of sending it around.
508  if (gid == atm(n)%parent_grid%pelist(1)) then
509  call mpp_send(atm(n)%parent_grid%grid_global(isg-ng:ieg+1+ng,jsg-ng:jeg+1+ng,1:2,parent_tile), &
510  size(atm(n)%parent_grid%grid_global(isg-ng:ieg+1+ng,jsg-ng:jeg+1+ng,1:2,parent_tile)), &
511  atm(n)%pelist(1)) !send to p_ind in setup_aligned_nest
512  call mpp_sync_self()
513  endif
514 
515  if (atm(n)%neststruct%twowaynest) then
516 
517  !This in reality should be very simple. With the
518  ! restriction that only the compute domain data is
519  ! sent from the coarse grid, we can compute
520  ! exactly which coarse grid cells should use
521  ! which nested-grid data. We then don't need to send around p_ind.
522 
523  atm(n)%neststruct%ind_update_h = -99999
524 
525  if (atm(n)%parent_grid%tile == atm(n)%neststruct%parent_tile) then
526 
527  isc_p = atm(n)%parent_grid%bd%isc
528  iec_p = atm(n)%parent_grid%bd%iec
529  jsc_p = atm(n)%parent_grid%bd%jsc
530  jec_p = atm(n)%parent_grid%bd%jec
531  upoff = atm(n)%neststruct%upoff
532 
533  atm(n)%neststruct%jsu = jsc_p
534  atm(n)%neststruct%jeu = jsc_p-1
535  do j=jsc_p,jec_p+1
536  if (j < joffset+upoff) then
537  do i=isc_p,iec_p+1
538  atm(n)%neststruct%ind_update_h(i,j,2) = -9999
539  enddo
540  atm(n)%neststruct%jsu = atm(n)%neststruct%jsu + 1
541  elseif (j > joffset + (npy-1)/refinement - upoff) then
542  do i=isc_p,iec_p+1
543  atm(n)%neststruct%ind_update_h(i,j,2) = -9999
544  enddo
545  else
546  jind = (j - joffset)*refinement + 1
547  do i=isc_p,iec_p+1
548  atm(n)%neststruct%ind_update_h(i,j,2) = jind
549  enddo
550  if ( (j < joffset + (npy-1)/refinement - upoff) .and. j <= jec_p) atm(n)%neststruct%jeu = j
551  endif
552  !write(mpp_pe()+4000,*) j, joffset, upoff, Atm(n)%neststruct%ind_update_h(isc_p,j,2)
553  enddo
554 
555  atm(n)%neststruct%isu = isc_p
556  atm(n)%neststruct%ieu = isc_p-1
557  do i=isc_p,iec_p+1
558  if (i < ioffset+upoff) then
559  atm(n)%neststruct%ind_update_h(i,:,1) = -9999
560  atm(n)%neststruct%isu = atm(n)%neststruct%isu + 1
561  elseif (i > ioffset + (npx-1)/refinement - upoff) then
562  atm(n)%neststruct%ind_update_h(i,:,1) = -9999
563  else
564  atm(n)%neststruct%ind_update_h(i,:,1) = (i-ioffset)*refinement + 1
565  if ( (i < ioffset + (npx-1)/refinement - upoff) .and. i <= iec_p) atm(n)%neststruct%ieu = i
566  end if
567  !write(mpp_pe()+5000,*) i, ioffset, upoff, Atm(n)%neststruct%ind_update_h(i,jsc_p,1)
568  enddo
569 
570  end if
571 
572 
573  end if
574 
575  endif
576  endif
577  end do
578 
579  ! Initialize restart functions
580  call fv_restart_init()
581 
582 ! if ( reset_eta ) then
583 ! do n=1, ntilesMe
584 ! call set_eta(npz, Atm(n)%ks, ptop, Atm(n)%ak, Atm(n)%bk)
585 ! enddo
586 ! if(is_master()) write(*,*) "Hybrid sigma-p coordinate has been reset"
587 ! endif
588 
589  if (ntilesme > 1) call switch_current_atm(atm(1))
590  if (ntilesme > 1) call setup_pointers(atm(1))
591 
592  end subroutine fv_init
593 !-------------------------------------------------------------------------------
594 
597  subroutine fv_end(Atm, grids_on_this_pe)
599  type(fv_atmos_type), intent(inout) :: atm(:)
600  logical, intent(INOUT) :: grids_on_this_pe(:)
601 
602  integer :: n
603 
604  call timing_off('TOTAL')
605  call timing_prt( gid )
606 
607  call fv_restart_end(atm, grids_on_this_pe)
608  call fv_io_exit()
609 
610  ! Free temporary memory from sw_core routines
611 
612  ! Deallocate
613  call grid_utils_end
614 
615  do n = 1, ntilesme
616  call deallocate_fv_atmos_type(atm(n))
617  end do
618 
619 
620  end subroutine fv_end
621 !-------------------------------------------------------------------------------
622 
624  subroutine run_setup(Atm, dt_atmos, grids_on_this_pe, p_split)
625  type(fv_atmos_type), intent(inout), target :: atm(:)
626  real, intent(in) :: dt_atmos
627  logical, intent(INOUT) :: grids_on_this_pe(:)
628  integer, intent(INOUT) :: p_split
629  !--- local variables ---
630  character(len=80) :: tracername, errstring
631  character(len=32) :: nested_grid_filename
632  integer :: ios, ierr, f_unit, unit
633  logical :: exists
634 
635  real :: dim0 = 180.
636  real :: dt0 = 1800.
637  real :: ns0 = 5.
639  !real :: umax = 350. ! max wave speed for grid_type>3 ! Now defined above
640  real :: dimx, dl, dp, dxmin, dymin, d_fac
641 
642  integer :: n0split
643  integer :: n, nn, i
644 
645  integer :: pe_counter
646 
647 ! local version of these variables to allow PGI compiler to compile
648  character(len=128) :: res_latlon_dynamics = ''
649  character(len=128) :: res_latlon_tracers = ''
650  character(len=80) :: grid_name = ''
651  character(len=120) :: grid_file = ''
652 
670 
766 
1018  namelist /fv_grid_nml/ grid_name, grid_file
1019  namelist /fv_core_nml/npx, npy, ntiles, npz, npz_rst, layout, io_layout, ncnst, nwat, &
1040 
1041  namelist /test_case_nml/test_case, bubble_do, alpha, nsolitons, soliton_umax, soliton_size
1042 #ifdef MULTI_GASES
1043  namelist /multi_gases_nml/ rilist,cpilist
1044 #endif
1045 
1046 
1047  pe_counter = mpp_root_pe()
1048 
1049 ! Make alpha = 0 the default:
1050  alpha = 0.
1051  bubble_do = .false.
1052  test_case = 11 ! (USGS terrain)
1053 
1054 #ifdef INTERNAL_FILE_NML
1055 ! Read Main namelist
1056  read (input_nml_file,fv_grid_nml,iostat=ios)
1057  ierr = check_nml_error(ios,'fv_grid_nml')
1058 #else
1059  f_unit=open_namelist_file()
1060  rewind(f_unit)
1061 ! Read Main namelist
1062  read (f_unit,fv_grid_nml,iostat=ios)
1063  ierr = check_nml_error(ios,'fv_grid_nml')
1064  call close_file(f_unit)
1065 #endif
1066 
1067  call write_version_number ( 'FV_CONTROL_MOD', version )
1068  unit = stdlog()
1069  write(unit, nml=fv_grid_nml)
1070 
1071  do n=1,size(atm)
1072 
1073  call switch_current_atm(atm(n), .false.)
1074  call setup_pointers(atm(n))
1075  atm(n)%grid_number = n
1076  if (grids_on_this_pe(n)) then
1077  call fv_diag_init_gn(atm(n))
1078  endif
1079 
1080 #ifdef INTERNAL_FILE_NML
1081  ! Set input_file_nml for correct parent/nest initialization
1082  if (n > 1) then
1083  write(nested_grid_filename,'(A4, I2.2)') 'nest', n
1084  call read_input_nml(nested_grid_filename)
1085  endif
1086  ! Read FVCORE namelist
1087  read (input_nml_file,fv_core_nml,iostat=ios)
1088  ierr = check_nml_error(ios,'fv_core_nml')
1089 #ifdef MULTI_GASES
1090  if( is_master() ) print *,' enter multi_gases: ncnst = ',ncnst
1091  allocate (rilist(0:ncnst))
1092  allocate (cpilist(0:ncnst))
1093  rilist = 0.0
1094  cpilist = 0.0
1095  rilist(0) = rdgas
1096  rilist(1) = rvgas
1097  cpilist(0) = cp_air
1098  cpilist(1) = 4*cp_air
1099  ! Read multi_gases namelist
1100  read (input_nml_file,multi_gases_nml,iostat=ios)
1101  ierr = check_nml_error(ios,'multi_gases_nml')
1102 #endif
1103  ! Read Test_Case namelist
1104  read (input_nml_file,test_case_nml,iostat=ios)
1105  ierr = check_nml_error(ios,'test_case_nml')
1106 
1107  ! Reset input_file_nml to default behavior
1108  call read_input_nml
1109 #else
1110  if (size(atm) == 1) then
1111  f_unit = open_namelist_file()
1112  else if (n == 1) then
1113  f_unit = open_namelist_file('input.nml')
1114  else
1115  write(nested_grid_filename,'(A10, I2.2, A4)') 'input_nest', n, '.nml'
1116  f_unit = open_namelist_file(nested_grid_filename)
1117  endif
1118 
1119  ! Read FVCORE namelist
1120  read (f_unit,fv_core_nml,iostat=ios)
1121  ierr = check_nml_error(ios,'fv_core_nml')
1122 
1123 #ifdef MULTI_GASES
1124  if( is_master() ) print *,' enter multi_gases: ncnst = ',ncnst
1125  allocate (rilist(0:ncnst))
1126  allocate (cpilist(0:ncnst))
1127  rilist = 0.0
1128  cpilist = 0.0
1129  rilist(0) = rdgas
1130  rilist(1) = rvgas
1131  cpilist(0) = cp_air
1132  cpilist(1) = 4*cp_air
1133  ! Read multi_gases namelist
1134  rewind(f_unit)
1135  read (f_unit,multi_gases_nml,iostat=ios)
1136  ierr = check_nml_error(ios,'multi_gases_nml')
1137 #endif
1138  ! Read Test_Case namelist
1139  rewind(f_unit)
1140  read (f_unit,test_case_nml,iostat=ios)
1141  ierr = check_nml_error(ios,'test_case_nml')
1142  call close_file(f_unit)
1143 #endif
1144  write(unit, nml=fv_core_nml)
1145  write(unit, nml=test_case_nml)
1146 #ifdef MULTI_GASES
1147  write(unit, nml=multi_gases_nml)
1149 #endif
1150 
1151  if (len_trim(grid_file) /= 0) atm(n)%flagstruct%grid_file = grid_file
1152  if (len_trim(grid_name) /= 0) atm(n)%flagstruct%grid_name = grid_name
1153  if (len_trim(res_latlon_dynamics) /= 0) atm(n)%flagstruct%res_latlon_dynamics = res_latlon_dynamics
1154  if (len_trim(res_latlon_tracers) /= 0) atm(n)%flagstruct%res_latlon_tracers = res_latlon_tracers
1155 
1156  !*** single tile for Cartesian grids
1157  if (grid_type>3) then
1158  ntiles=1
1159  non_ortho = .false.
1160  nf_omega = 0
1161  endif
1162 
1163  if (.not. (nested .or. regional)) atm(n)%neststruct%npx_global = npx
1164 
1165  ! Define n_split if not in namelist
1166  if (ntiles == 6) then
1167  dimx = 4.0*(npx-1)
1168  if ( hydrostatic ) then
1169  if ( npx >= 120 ) ns0 = 6
1170  else
1171  if ( npx <= 45 ) then
1172  ns0 = 6
1173  elseif ( npx <= 90 ) then
1174  ns0 = 7
1175  else
1176  ns0 = 8
1177  endif
1178  endif
1179  else
1180  dimx = max( npx, 2*(npy-1) )
1181  endif
1182 
1183  if (grid_type < 4) then
1184  n0split = nint( ns0*abs(dt_atmos)*dimx/(dt0*dim0) + 0.49 )
1185  elseif (grid_type == 4 .or. grid_type == 7) then
1186  n0split = nint( 2.*umax*dt_atmos/sqrt(dx_const**2 + dy_const**2) + 0.49 )
1187  elseif (grid_type == 5 .or. grid_type == 6) then
1188  if (grid_type == 6) then
1189  deglon_start = 0.; deglon_stop = 360.
1190  endif
1191  dl = (deglon_stop-deglon_start)*pi/(180.*(npx-1))
1192  dp = (deglat_stop-deglat_start)*pi/(180.*(npy-1))
1193 
1194  dxmin=dl*radius*min(cos(deglat_start*pi/180.-ng*dp), &
1195  cos(deglat_stop *pi/180.+ng*dp))
1196  dymin=dp*radius
1197  n0split = nint( 2.*umax*dt_atmos/sqrt(dxmin**2 + dymin**2) + 0.49 )
1198  endif
1199  n0split = max( 1, n0split )
1200 
1201  if ( n_split == 0 ) then
1202  n_split = nint( real(n0split)/real(k_split*abs(p_split)) * stretch_fac + 0.5 )
1203  if(is_master()) write(*,*) 'For k_split (remapping)=', k_split
1204  if(is_master()) write(*,198) 'n_split is set to ', n_split, ' for resolution-dt=',npx,npy,ntiles,dt_atmos
1205  else
1206  if(is_master()) write(*,199) 'Using n_split from the namelist: ', n_split
1207  endif
1208  if (is_master() .and. n == 1 .and. abs(p_split) > 1) then
1209  write(*,199) 'Using p_split = ', p_split
1210  endif
1211 
1212  if (atm(n)%neststruct%nested) then
1213  do i=1,n-1
1214  if (atm(i)%grid_number == parent_grid_num) then
1215  atm(n)%parent_grid => atm(i)
1216  exit
1217  end if
1218  end do
1219  if (.not. associated(atm(n)%parent_grid)) then
1220  write(errstring,'(2(A,I3))') "Could not find parent grid #", parent_grid_num, ' for grid #', n
1221  call mpp_error(fatal, errstring)
1222  end if
1223 
1224  !Note that if a gnomonic grid has a parent it is a NESTED gnomonic grid and therefore only has one tile
1225  if ( atm(n)%parent_grid%flagstruct%grid_type < 3 .and. &
1226  .not. associated(atm(n)%parent_grid%parent_grid)) then
1227  if (parent_tile > 6 .or. parent_tile < 1) then
1228  call mpp_error(fatal, 'parent tile must be between 1 and 6 if the parent is a cubed-sphere grid')
1229  end if
1230  else
1231  if (parent_tile /= 1) then
1232  call mpp_error(fatal, 'parent tile must be 1 if the parent is not a cubed-sphere grid')
1233  end if
1234  end if
1235 
1236  if ( refinement < 1 ) call mpp_error(fatal, 'grid refinement must be positive')
1237 
1238  if (nestupdate == 1 .or. nestupdate == 2) then
1239 
1240  if (mod(npx-1,refinement) /= 0 .or. mod(npy-1,refinement) /= 0) then
1241  call mpp_error(warning, 'npx-1 or npy-1 is not evenly divisible by the refinement ratio; averaging update cannot be mass-conservative.')
1242  end if
1243 
1244  end if
1245 
1246  if ( consv_te > 0.) then
1247  call mpp_error(fatal, 'The global energy fixer cannot be used on a nested grid. consv_te must be set to 0.')
1248  end if
1249 
1250  atm(n)%neststruct%refinement_of_global = atm(n)%neststruct%refinement * atm(n)%parent_grid%neststruct%refinement_of_global
1251  max_refinement_of_global = max(atm(n)%neststruct%refinement_of_global,max_refinement_of_global)
1252  atm(n)%neststruct%npx_global = atm(n)%neststruct%refinement * atm(n)%parent_grid%neststruct%npx_global
1253 
1254  else
1255  atm(n)%neststruct%ioffset = -999
1256  atm(n)%neststruct%joffset = -999
1257  atm(n)%neststruct%parent_tile = -1
1258  atm(n)%neststruct%refinement = -1
1259  end if
1260 
1261  if (atm(n)%neststruct%nested) then
1262  if (atm(n)%flagstruct%grid_type >= 4 .and. atm(n)%parent_grid%flagstruct%grid_type >= 4) then
1263  atm(n)%flagstruct%dx_const = atm(n)%parent_grid%flagstruct%dx_const / real(atm(n)%neststruct%refinement)
1264  atm(n)%flagstruct%dy_const = atm(n)%parent_grid%flagstruct%dy_const / real(atm(n)%neststruct%refinement)
1265  end if
1266  end if
1267 
1268 
1269 !----------------------------------------
1270 ! Adjust divergence damping coefficients:
1271 !----------------------------------------
1272 ! d_fac = real(n0split)/real(n_split)
1273 ! dddmp = dddmp * d_fac
1274 ! d2_bg = d2_bg * d_fac
1275 ! d4_bg = d4_bg * d_fac
1276 ! d_ext = d_ext * d_fac
1277 ! vtdm4 = vtdm4 * d_fac
1278  if (old_divg_damp) then
1279  if (is_master()) write(*,*) " fv_control: using original values for divergence damping "
1280  d2_bg_k1 = 6. ! factor for d2_bg (k=1) - default(4.)
1281  d2_bg_k2 = 4. ! factor for d2_bg (k=2) - default(2.)
1282  d2_divg_max_k1 = 0.02 ! d2_divg max value (k=1) - default(0.05)
1283  d2_divg_max_k2 = 0.01 ! d2_divg max value (k=2) - default(0.02)
1284  damp_k_k1 = 0. ! damp_k value (k=1) - default(0.05)
1285  damp_k_k2 = 0. ! damp_k value (k=2) - default(0.025)
1286  elseif (n_sponge == 0 ) then
1287  if ( d2_bg_k1 > 1. ) d2_bg_k1 = 0.20
1288  if ( d2_bg_k2 > 1. ) d2_bg_k2 = 0.015
1289  endif
1290 
1291 ! if ( beta < 1.e-5 ) beta = 0. ! beta < 0 is used for non-hydrostatic "one_grad_p"
1292 
1293  if ( .not.hydrostatic ) then
1294  if ( m_split==0 ) then
1295  m_split = 1. + abs(dt_atmos)/real(k_split*n_split*abs(p_split))
1296  if (abs(a_imp) < 0.5) then
1297  if(is_master()) write(*,199) 'm_split is set to ', m_split
1298  endif
1299  endif
1300  if(is_master()) then
1301  write(*,*) 'Off center implicit scheme param=', a_imp
1302  write(*,*) ' p_fac=', p_fac
1303  endif
1304  endif
1305 
1306  if(is_master()) then
1307  if (n_sponge >= 0) write(*,199) 'Using n_sponge : ', n_sponge
1308  write(*,197) 'Using non_ortho : ', non_ortho
1309  endif
1310 
1311  197 format(a,l7)
1312  198 format(a,i2.2,a,i4.4,'x',i4.4,'x',i1.1,'-',f9.3)
1313  199 format(a,i3.3)
1314 
1315  if (.not. (nested .or. regional)) alpha = alpha*pi
1316 
1317 
1318  allocate(atm(n)%neststruct%child_grids(size(atm)))
1319  atm(n)%neststruct%child_grids = .false.
1320 
1321  !Broadcast data
1322 
1323  !Check layout
1324 
1325  enddo
1326 
1327  !Set pelists
1328  do n=1,size(atm)
1329  if (any(atm(n)%pelist == gid)) then
1330  call mpp_set_current_pelist(atm(n)%pelist)
1331  call mpp_get_current_pelist(atm(n)%pelist, commid=commid)
1332  call mp_start(commid,halo_update_type)
1333  endif
1334 
1335  if (atm(n)%neststruct%nested) then
1336  atm(n)%neststruct%parent_proc = any(atm(n)%parent_grid%pelist == gid)
1337  atm(n)%neststruct%child_proc = any(atm(n)%pelist == gid)
1338  endif
1339  enddo
1340 
1341  do n=1,size(atm)
1342 
1343  call switch_current_atm(atm(n),.false.)
1344  call setup_pointers(atm(n))
1345  !! CLEANUP: WARNING not sure what changes to domain_decomp may cause
1346  call domain_decomp(npx,npy,ntiles,grid_type,nested,atm(n),layout,io_layout)
1347  enddo
1348 
1349  !!! CLEANUP: This sets the pelist to ALL, which is also
1350  !!! required for the define_nest_domains step in the next loop.
1351  !!! Later the pelist must be reset to the 'local' pelist.
1352  call broadcast_domains(atm)
1353 
1354  do n=1,size(atm)
1355  call switch_current_atm(atm(n))
1356  call setup_pointers(atm(n))
1357 
1358  if (nested) then
1359  if (mod(npx-1 , refinement) /= 0 .or. mod(npy-1, refinement) /= 0) &
1360  call mpp_error(fatal, 'npx or npy not an even refinement of its coarse grid.')
1361 
1362  !Pelist needs to be set to ALL (which should have been done
1363  !in broadcast_domains) to get this to work
1364  call mpp_define_nest_domains(atm(n)%neststruct%nest_domain, atm(n)%domain, atm(parent_grid_num)%domain, &
1365  7, parent_tile, &
1366  1, npx-1, 1, npy-1, & !Grid cells, not points
1367  ioffset, ioffset + (npx-1)/refinement - 1, &
1368  joffset, joffset + (npy-1)/refinement - 1, &
1369  (/ (i,i=0,mpp_npes()-1) /), extra_halo = 0, name="nest_domain") !What pelist to use?
1370  call mpp_define_nest_domains(atm(n)%neststruct%nest_domain, atm(n)%domain, atm(parent_grid_num)%domain, &
1371  7, parent_tile, &
1372  1, npx-1, 1, npy-1, & !Grid cells, not points
1373  ioffset, ioffset + (npx-1)/refinement - 1, &
1374  joffset, joffset + (npy-1)/refinement - 1, &
1375  (/ (i,i=0,mpp_npes()-1) /), extra_halo = 0, name="nest_domain") !What pelist to use?
1376 ! (/ (i,i=0,mpp_npes()-1) /), extra_halo = 2, name="nest_domain_for_BC") !What pelist to use?
1377 
1378  atm(parent_grid_num)%neststruct%child_grids(n) = .true.
1379 
1380  if (atm(n)%neststruct%nestbctype > 1) then
1381 
1382  call mpp_error(fatal, 'nestbctype > 1 not yet implemented')
1383 
1384  !This check is due to a bug which has not yet been identified. Beware.
1385 ! if (Atm(n)%parent_grid%flagstruct%hord_tr == 7) &
1386 ! call mpp_error(FATAL, "Flux-form nested BCs (nestbctype > 1) should not use hord_tr == 7 (on parent grid), since there is no guarantee of tracer mass conservation with this option.")
1387 
1388 !!$ if (Atm(n)%flagstruct%q_split > 0 .and. Atm(n)%parent_grid%flagstruct%q_split > 0) then
1389 !!$ if (mod(Atm(n)%flagstruct%q_split,Atm(n)%parent_grid%flagstruct%q_split) /= 0) call mpp_error(FATAL, &
1390 !!$ "Flux-form nested BCs (nestbctype > 1) require q_split on the nested grid to be evenly divisible by that on the coarse grid.")
1391 !!$ endif
1392 !!$ if (mod((Atm(n)%npx-1),Atm(n)%neststruct%refinement) /= 0 .or. mod((Atm(n)%npy-1),Atm(n)%neststruct%refinement) /= 0) call mpp_error(FATAL, &
1393 !!$ "Flux-form nested BCs (nestbctype > 1) requires npx and npy to be one more than a multiple of the refinement ratio.")
1394 !!$ Atm(n)%parent_grid%neststruct%do_flux_BCs = .true.
1395 !!$ if (Atm(n)%neststruct%nestbctype == 3 .or. Atm(n)%neststruct%nestbctype == 4) Atm(n)%parent_grid%neststruct%do_2way_flux_BCs = .true.
1396  atm(n)%neststruct%upoff = 0
1397  endif
1398 
1399  end if
1400 
1401  do nn=1,size(atm)
1402  if (n == 1) allocate(atm(nn)%neststruct%nest_domain_all(size(atm)))
1403  atm(nn)%neststruct%nest_domain_all(n) = atm(n)%neststruct%nest_domain
1404  enddo
1405 
1406  end do
1407 
1408  do n=1,size(atm)
1409  if (any(atm(n)%pelist == gid)) then
1410  call mpp_set_current_pelist(atm(n)%pelist)
1411  endif
1412  enddo
1413 
1414  end subroutine run_setup
1415  subroutine init_nesting(Atm, grids_on_this_pe, p_split)
1417  type(fv_atmos_type), intent(inout), allocatable :: Atm(:)
1418  logical, allocatable, intent(INOUT) :: grids_on_this_pe(:)
1419  integer, intent(INOUT) :: p_split
1420  character(100) :: pe_list_name
1421  integer :: nest_pes(100)
1422  integer :: n, npes, ntiles, pecounter, i
1423  integer, allocatable :: pelist(:)
1424  integer :: f_unit, ios, ierr
1425 
1426  !This is an OPTIONAL namelist, that needs to be read before everything else
1427  namelist /nest_nml/ ngrids, ntiles, nest_pes, p_split
1428 
1429  call mp_assign_gid
1430 
1431  nest_pes = 0
1432  ntiles = -999
1433 
1434 #ifdef INTERNAL_FILE_NML
1435  read (input_nml_file,nest_nml,iostat=ios)
1436  ierr = check_nml_error(ios,'nest_nml')
1437 #else
1438  f_unit=open_namelist_file()
1439  rewind(f_unit)
1440  read (f_unit,nest_nml,iostat=ios)
1441  ierr = check_nml_error(ios,'nest_nml')
1442  call close_file(f_unit)
1443 #endif
1444 
1445  if (ntiles /= -999) ngrids = ntiles
1446  if (ngrids > 10) call mpp_error(fatal, "More than 10 nested grids not supported")
1447 
1448  allocate(atm(ngrids))
1449 
1450  allocate(grids_on_this_pe(ngrids))
1451  grids_on_this_pe = .false. !initialization
1452 
1453  npes = mpp_npes()
1454 
1455  ! Need to get a global pelist to send data around later?
1456  allocate( pelist_all(npes) )
1457  pelist_all = (/ (i,i=0,npes-1) /)
1458  pelist_all = pelist_all + mpp_root_pe()
1459 
1460  if (ngrids == 1) then
1461 
1462  !Set up the single pelist
1463  allocate(atm(1)%pelist(npes))
1464  atm(1)%pelist = (/(i, i=0, npes-1)/)
1465  atm(1)%pelist = atm(1)%pelist + mpp_root_pe()
1466  call mpp_declare_pelist(atm(1)%pelist)
1467  call mpp_set_current_pelist(atm(1)%pelist)
1468  !Now set in domain_decomp
1469  !masterproc = Atm(1)%pelist(1)
1470  call setup_master(atm(1)%pelist)
1471  grids_on_this_pe(1) = .true.
1472  atm(1)%npes_this_grid = npes
1473 
1474  else
1475 
1476  pecounter = mpp_root_pe()
1477  do n=1,ngrids
1478  if (n == 1) then
1479  pe_list_name = ''
1480  else
1481  write(pe_list_name,'(A4, I2.2)') 'nest', n
1482  endif
1483 
1484  if (nest_pes(n) == 0) then
1485  if (n < ngrids) call mpp_error(fatal, 'Only nest_pes(ngrids) in nest_nml can be zero; preceeding values must be nonzero.')
1486  allocate(atm(n)%pelist(npes-pecounter))
1487  atm(n)%pelist = (/(i, i=pecounter, npes-1)/)
1488  if (n > 1) then
1489  call mpp_declare_pelist(atm(n)%pelist, trim(pe_list_name))
1490  !Make sure nested-grid input file exists
1491  if (.not. file_exist('input_'//trim(pe_list_name)//'.nml')) then
1492  call mpp_error(fatal, "Could not find nested grid namelist input_"//trim(pe_list_name)//".nml")
1493  endif
1494  endif
1495  exit
1496  else
1497  allocate(atm(n)%pelist(nest_pes(n)))
1498  atm(n)%pelist = (/ (i, i=pecounter, pecounter+nest_pes(n)-1) /)
1499  if (atm(n)%pelist(nest_pes(n)) >= npes) then
1500  call mpp_error(fatal, 'PEs assigned by nest_pes in nest_nml exceeds number of available PEs.')
1501  endif
1502 
1503  call mpp_declare_pelist(atm(n)%pelist, trim(pe_list_name))
1504  !Make sure nested-grid input file exists
1505  if (n > 1) then
1506  if (.not. file_exist('input_'//trim(pe_list_name)//'.nml')) then
1507  call mpp_error(fatal, "Could not find nested grid namelist input_"//trim(pe_list_name)//".nml")
1508  endif
1509  endif
1510  pecounter = pecounter+nest_pes(n)
1511  endif
1512  enddo
1513 
1514  !Set pelists
1515  do n=1,ngrids
1516  atm(n)%npes_this_grid = size(atm(n)%pelist)
1517  if (any(gid == atm(n)%pelist)) then
1518  call mpp_set_current_pelist(atm(n)%pelist)
1519  !now set in domain_decomp
1520  !masterproc = Atm(n)%pelist(1)
1521  call setup_master(atm(n)%pelist)
1522  grids_on_this_pe(n) = .true.
1523  exit
1524  endif
1525  enddo
1526 
1527  if (pecounter /= npes) then
1528  call mpp_error(fatal, 'nest_pes in nest_nml does not assign all of the available PEs.')
1529  endif
1530  endif
1531 
1532  !Layout is checked later, in fv_control
1533 
1534  end subroutine init_nesting
1535 
1539  subroutine setup_pointers(Atm)
1541  type(fv_atmos_type), intent(INOUT), target :: Atm
1542 
1543  !This routine associates the MODULE flag pointers with the ARRAY flag variables for the grid active on THIS pe so the flags can be read in from the namelist.
1544 
1545  res_latlon_dynamics => atm%flagstruct%res_latlon_dynamics
1546  res_latlon_tracers => atm%flagstruct%res_latlon_tracers
1547 
1548  grid_type => atm%flagstruct%grid_type
1549  grid_name => atm%flagstruct%grid_name
1550  grid_file => atm%flagstruct%grid_file
1551  hord_mt => atm%flagstruct%hord_mt
1552  kord_mt => atm%flagstruct%kord_mt
1553  kord_wz => atm%flagstruct%kord_wz
1554  hord_vt => atm%flagstruct%hord_vt
1555  hord_tm => atm%flagstruct%hord_tm
1556  hord_dp => atm%flagstruct%hord_dp
1557  kord_tm => atm%flagstruct%kord_tm
1558  hord_tr => atm%flagstruct%hord_tr
1559  kord_tr => atm%flagstruct%kord_tr
1560  scale_z => atm%flagstruct%scale_z
1561  w_max => atm%flagstruct%w_max
1562  z_min => atm%flagstruct%z_min
1563  lim_fac => atm%flagstruct%lim_fac
1564  nord => atm%flagstruct%nord
1565  nord_tr => atm%flagstruct%nord_tr
1566  dddmp => atm%flagstruct%dddmp
1567  d2_bg => atm%flagstruct%d2_bg
1568  d4_bg => atm%flagstruct%d4_bg
1569  vtdm4 => atm%flagstruct%vtdm4
1570  trdm2 => atm%flagstruct%trdm2
1571  d2_bg_k1 => atm%flagstruct%d2_bg_k1
1572  d2_bg_k2 => atm%flagstruct%d2_bg_k2
1573  d2_divg_max_k1 => atm%flagstruct%d2_divg_max_k1
1574  d2_divg_max_k2 => atm%flagstruct%d2_divg_max_k2
1575  damp_k_k1 => atm%flagstruct%damp_k_k1
1576  damp_k_k2 => atm%flagstruct%damp_k_k2
1577  n_zs_filter => atm%flagstruct%n_zs_filter
1578  nord_zs_filter => atm%flagstruct%nord_zs_filter
1579  full_zs_filter => atm%flagstruct%full_zs_filter
1580  rf_fast => atm%flagstruct%RF_fast
1581  consv_am => atm%flagstruct%consv_am
1582  do_sat_adj => atm%flagstruct%do_sat_adj
1583  do_f3d => atm%flagstruct%do_f3d
1584  no_dycore => atm%flagstruct%no_dycore
1585  convert_ke => atm%flagstruct%convert_ke
1586  do_vort_damp => atm%flagstruct%do_vort_damp
1587  use_old_omega => atm%flagstruct%use_old_omega
1588  beta => atm%flagstruct%beta
1589  n_sponge => atm%flagstruct%n_sponge
1590  d_ext => atm%flagstruct%d_ext
1591  nwat => atm%flagstruct%nwat
1592  use_logp => atm%flagstruct%use_logp
1593  warm_start => atm%flagstruct%warm_start
1594  inline_q => atm%flagstruct%inline_q
1595  shift_fac => atm%flagstruct%shift_fac
1596  do_schmidt => atm%flagstruct%do_schmidt
1597  stretch_fac => atm%flagstruct%stretch_fac
1598  target_lat => atm%flagstruct%target_lat
1599  target_lon => atm%flagstruct%target_lon
1600  regional => atm%flagstruct%regional
1601  bc_update_interval => atm%flagstruct%bc_update_interval
1602  reset_eta => atm%flagstruct%reset_eta
1603  p_fac => atm%flagstruct%p_fac
1604  a_imp => atm%flagstruct%a_imp
1605  n_split => atm%flagstruct%n_split
1606  fac_n_spl => atm%flagstruct%fac_n_spl
1607  fhouri => atm%flagstruct%fhouri
1608  m_split => atm%flagstruct%m_split
1609  k_split => atm%flagstruct%k_split
1610  use_logp => atm%flagstruct%use_logp
1611  q_split => atm%flagstruct%q_split
1612  print_freq => atm%flagstruct%print_freq
1613  write_3d_diags => atm%flagstruct%write_3d_diags
1614  npx => atm%flagstruct%npx
1615  npy => atm%flagstruct%npy
1616  npz => atm%flagstruct%npz
1617  npz_rst => atm%flagstruct%npz_rst
1618  ncnst => atm%flagstruct%ncnst
1619  pnats => atm%flagstruct%pnats
1620  dnats => atm%flagstruct%dnats
1621  ntiles => atm%flagstruct%ntiles
1622  nf_omega => atm%flagstruct%nf_omega
1623  fv_sg_adj => atm%flagstruct%fv_sg_adj
1624  na_init => atm%flagstruct%na_init
1625  nudge_dz => atm%flagstruct%nudge_dz
1626  p_ref => atm%flagstruct%p_ref
1627  dry_mass => atm%flagstruct%dry_mass
1628  nt_prog => atm%flagstruct%nt_prog
1629  nt_phys => atm%flagstruct%nt_phys
1630  tau_h2o => atm%flagstruct%tau_h2o
1631  delt_max => atm%flagstruct%delt_max
1632  d_con => atm%flagstruct%d_con
1633  ke_bg => atm%flagstruct%ke_bg
1634  consv_te => atm%flagstruct%consv_te
1635  tau => atm%flagstruct%tau
1636  rf_cutoff => atm%flagstruct%rf_cutoff
1637  filter_phys => atm%flagstruct%filter_phys
1638  dwind_2d => atm%flagstruct%dwind_2d
1639  breed_vortex_inline => atm%flagstruct%breed_vortex_inline
1640  range_warn => atm%flagstruct%range_warn
1641  fill => atm%flagstruct%fill
1642  fill_dp => atm%flagstruct%fill_dp
1643  fill_wz => atm%flagstruct%fill_wz
1644  check_negative => atm%flagstruct%check_negative
1645  non_ortho => atm%flagstruct%non_ortho
1646  adiabatic => atm%flagstruct%adiabatic
1647  moist_phys => atm%flagstruct%moist_phys
1648  do_held_suarez => atm%flagstruct%do_Held_Suarez
1649  do_reed_physics => atm%flagstruct%do_reed_physics
1650  reed_cond_only => atm%flagstruct%reed_cond_only
1651  reproduce_sum => atm%flagstruct%reproduce_sum
1652  adjust_dry_mass => atm%flagstruct%adjust_dry_mass
1653  fv_debug => atm%flagstruct%fv_debug
1654  srf_init => atm%flagstruct%srf_init
1655  mountain => atm%flagstruct%mountain
1656  remap_t => atm%flagstruct%remap_t
1657  z_tracer => atm%flagstruct%z_tracer
1658  old_divg_damp => atm%flagstruct%old_divg_damp
1659  fv_land => atm%flagstruct%fv_land
1660  nudge => atm%flagstruct%nudge
1661  nudge_ic => atm%flagstruct%nudge_ic
1662  ncep_ic => atm%flagstruct%ncep_ic
1663  nggps_ic => atm%flagstruct%nggps_ic
1664  ecmwf_ic => atm%flagstruct%ecmwf_ic
1665  gfs_phil => atm%flagstruct%gfs_phil
1666  agrid_vel_rst => atm%flagstruct%agrid_vel_rst
1667  use_new_ncep => atm%flagstruct%use_new_ncep
1668  use_ncep_phy => atm%flagstruct%use_ncep_phy
1669  fv_diag_ic => atm%flagstruct%fv_diag_ic
1670  external_ic => atm%flagstruct%external_ic
1671  external_eta => atm%flagstruct%external_eta
1672  read_increment => atm%flagstruct%read_increment
1673 
1674  hydrostatic => atm%flagstruct%hydrostatic
1675  phys_hydrostatic => atm%flagstruct%phys_hydrostatic
1676  use_hydro_pressure => atm%flagstruct%use_hydro_pressure
1677  do_uni_zfull => atm%flagstruct%do_uni_zfull !miz
1678  adj_mass_vmr => atm%flagstruct%adj_mass_vmr !f1p
1679  hybrid_z => atm%flagstruct%hybrid_z
1680  make_nh => atm%flagstruct%Make_NH
1681  make_hybrid_z => atm%flagstruct%make_hybrid_z
1682  nudge_qv => atm%flagstruct%nudge_qv
1683  add_noise => atm%flagstruct%add_noise
1684  a2b_ord => atm%flagstruct%a2b_ord
1685  c2l_ord => atm%flagstruct%c2l_ord
1686  ndims => atm%flagstruct%ndims
1687 
1688  dx_const => atm%flagstruct%dx_const
1689  dy_const => atm%flagstruct%dy_const
1690  deglon_start => atm%flagstruct%deglon_start
1691  deglon_stop => atm%flagstruct%deglon_stop
1692  deglat_start => atm%flagstruct%deglat_start
1693  deglat_stop => atm%flagstruct%deglat_stop
1694 
1695  deglat => atm%flagstruct%deglat
1696 
1697  nested => atm%neststruct%nested
1698  twowaynest => atm%neststruct%twowaynest
1699  parent_tile => atm%neststruct%parent_tile
1700  refinement => atm%neststruct%refinement
1701  nestbctype => atm%neststruct%nestbctype
1702  nestupdate => atm%neststruct%nestupdate
1703  nsponge => atm%neststruct%nsponge
1704  s_weight => atm%neststruct%s_weight
1705  ioffset => atm%neststruct%ioffset
1706  joffset => atm%neststruct%joffset
1707 
1708  layout => atm%layout
1709  io_layout => atm%io_layout
1710  end subroutine setup_pointers
1711 
1712 
1713 end module fv_control_mod
logical, pointer check_negative
Definition: fv_control.F90:279
logical, pointer reset_eta
Definition: fv_control.F90:230
real, pointer s_weight
Definition: fv_control.F90:337
logical, pointer do_schmidt
Definition: fv_control.F90:225
logical, pointer nggps_ic
Definition: fv_control.F90:299
real, pointer fhouri
Definition: fv_control.F90:236
logical, pointer warm_start
Definition: fv_control.F90:222
logical, public bubble_do
Definition: test_cases.F90:174
logical, pointer non_ortho
Definition: fv_control.F90:280
real, pointer shift_fac
Definition: fv_control.F90:224
real(kind=r_grid), pointer deglat
Definition: fv_control.F90:331
integer, dimension(:), pointer io_layout
Definition: fv_control.F90:339
logical, pointer make_nh
Definition: fv_control.F90:317
integer ntilesme
Definition: fv_control.F90:341
integer, pointer bc_update_interval
Definition: fv_control.F90:335
The module &#39;fv_mp_mod&#39; is a single program multiple data (SPMD) parallel decompostion/communication m...
Definition: fv_mp_mod.F90:24
subroutine timing_off(blk_name)
The subroutine &#39;timing_off&#39; stops a timer.
Definition: fv_timing.F90:180
logical, pointer adj_mass_vmr
Definition: fv_control.F90:315
integer, dimension(:), pointer layout
Definition: fv_control.F90:339
integer, pointer hord_tm
Definition: fv_control.F90:182
subroutine, public fv_init(Atm, dt_atmos, grids_on_this_pe, p_split)
The subroutine &#39;fv_init&#39; initializes FV3.
Definition: fv_control.F90:375
subroutine, public fv_restart_end(Atm, grids_on_this_pe)
The subroutine &#39;fv_restart_end&#39; writes ending restart files, terminates I/O, and prints out diagnosti...
integer, pointer nt_phys
Definition: fv_control.F90:263
logical, pointer dwind_2d
Definition: fv_control.F90:273
real umax
max wave speed for grid_type>3
Definition: fv_control.F90:355
logical, pointer write_3d_diags
Definition: fv_control.F90:244
integer parent_grid_num
Definition: fv_control.F90:356
integer, pointer grid_type
Definition: fv_control.F90:177
integer, dimension(:), allocatable, public pelist_all
Definition: fv_control.F90:351
logical, pointer ecmwf_ic
Definition: fv_control.F90:300
subroutine, public set_eta(km, ks, ptop, ak, bk)
This is the version of set_eta used in fvGFS and AM4.
Definition: fv_eta.F90:420
real, pointer consv_te
Definition: fv_control.F90:269
The module &#39;multi_gases&#39; peforms multi constitutents computations.
Definition: multi_gases.F90:25
real, pointer beta
Definition: fv_control.F90:218
real, pointer trdm2
Definition: fv_control.F90:198
logical, pointer ncep_ic
Definition: fv_control.F90:298
integer, pointer q_split
Definition: fv_control.F90:242
logical, pointer adiabatic
Definition: fv_control.F90:281
logical, pointer agrid_vel_rst
Definition: fv_control.F90:302
integer, pointer kord_tm
Definition: fv_control.F90:184
integer, pointer npz
Definition: fv_control.F90:248
integer, pointer fv_sg_adj
Definition: fv_control.F90:256
real, pointer lim_fac
Definition: fv_control.F90:190
real, pointer d4_bg
Definition: fv_control.F90:196
integer, public test_case
Definition: test_cases.F90:173
integer max_refinement_of_global
Definition: fv_control.F90:352
integer, public ngrids
Definition: fv_control.F90:350
integer, pointer npx
Definition: fv_control.F90:246
logical, pointer nudge_ic
Definition: fv_control.F90:297
logical, pointer fv_land
Definition: fv_control.F90:295
real, pointer p_ref
Definition: fv_control.F90:260
The module &#39;fv_io&#39; contains restart facilities for FV core.
Definition: fv_io.F90:30
real(kind=r_grid), pointer deglon_start
Definition: fv_control.F90:329
logical, pointer nudge_dz
Definition: fv_control.F90:259
logical, pointer use_logp
Definition: fv_control.F90:240
integer, parameter, public r_grid
Definition: fv_arrays.F90:35
integer, pointer pnats
Definition: fv_control.F90:252
real, dimension(:), allocatable ri
Definition: multi_gases.F90:48
logical, pointer fill_wz
Definition: fv_control.F90:278
subroutine, public fv_diag_init_gn(Atm)
integer, pointer nwat
Definition: fv_control.F90:221
real(kind=r_grid), pointer target_lat
Definition: fv_control.F90:227
subroutine init_nesting(Atm, grids_on_this_pe, p_split)
integer, pointer parent_tile
Definition: fv_control.F90:336
integer, pointer ntiles
Definition: fv_control.F90:254
logical, pointer external_ic
Definition: fv_control.F90:306
subroutine setup_pointers(Atm)
The subroutine &#39;setup_pointers&#39; associates the MODULE flag pointers with the ARRAY flag variables for...
logical, pointer do_vort_damp
Definition: fv_control.F90:215
logical, pointer mountain
Definition: fv_control.F90:290
real, pointer rf_cutoff
Definition: fv_control.F90:271
logical, pointer no_dycore
Definition: fv_control.F90:213
integer, pointer nestupdate
Definition: fv_control.F90:336
integer, pointer npz_rst
Definition: fv_control.F90:249
The module &#39;fv_timing&#39; contains FV3 timers.
Definition: fv_timing.F90:24
real, pointer damp_k_k1
Definition: fv_control.F90:203
integer, pointer ioffset
Definition: fv_control.F90:336
subroutine, public fv_restart_init()
Definition: fv_restart.F90:186
integer, pointer kord_wz
Definition: fv_control.F90:180
integer, pointer nord_tr
Definition: fv_control.F90:193
real(kind=r_grid), pointer deglon_stop
Definition: fv_control.F90:329
integer, pointer kord_tr
Definition: fv_control.F90:186
real, public alpha
Definition: test_cases.F90:175
real, pointer fac_n_spl
Definition: fv_control.F90:235
real, pointer d2_bg_k2
Definition: fv_control.F90:200
character(len=128), pointer res_latlon_tracers
Definition: fv_control.F90:310
real, pointer d2_divg_max_k2
Definition: fv_control.F90:202
logical, pointer moist_phys
Definition: fv_control.F90:282
real, parameter, public ptop_min
real, pointer p_fac
Definition: fv_control.F90:231
real, pointer ke_bg
Definition: fv_control.F90:268
logical, pointer remap_t
Definition: fv_control.F90:291
real, pointer vtdm4
Definition: fv_control.F90:197
integer, pointer nf_omega
Definition: fv_control.F90:255
subroutine, public init_grid(Atm, grid_name, grid_file, npx, npy, npz, ndims, nregions, ng)
The subroutine &#39;init_grid&#39; reads the grid from the input file and sets up grid descriptors.
real(kind=r_grid), pointer dx_const
Definition: fv_control.F90:327
logical, pointer twowaynest
Definition: fv_control.F90:333
logical, pointer filter_phys
Definition: fv_control.F90:272
logical, pointer hydrostatic
Definition: fv_control.F90:311
real, pointer d2_bg
Definition: fv_control.F90:195
logical, pointer convert_ke
Definition: fv_control.F90:214
logical, pointer make_hybrid_z
Definition: fv_control.F90:318
logical, pointer read_increment
Definition: fv_control.F90:308
logical, pointer use_old_omega
Definition: fv_control.F90:216
The module &#39;fv_arrays&#39; contains the &#39;fv_atmos_type&#39; and associated datatypes.
Definition: fv_arrays.F90:24
logical, pointer use_new_ncep
Definition: fv_control.F90:303
logical, pointer do_reed_physics
Definition: fv_control.F90:284
integer, pointer print_freq
Definition: fv_control.F90:243
real, pointer a_imp
Definition: fv_control.F90:232
real, public soliton_umax
Definition: test_cases.F90:177
integer, pointer nsponge
Definition: fv_control.F90:336
logical, pointer external_eta
Definition: fv_control.F90:307
The module &#39;fv_eta&#39; contains routine to set up the reference (Eulerian) pressure coordinate.
Definition: fv_eta.F90:25
integer, pointer nord_zs_filter
Definition: fv_control.F90:206
logical, pointer fv_debug
Definition: fv_control.F90:288
logical, pointer rf_fast
Definition: fv_control.F90:209
logical, pointer fill_dp
Definition: fv_control.F90:277
logical, pointer phys_hydrostatic
Definition: fv_control.F90:312
integer, pointer npy
Definition: fv_control.F90:247
integer, pointer n_zs_filter
Definition: fv_control.F90:205
logical, pointer breed_vortex_inline
Definition: fv_control.F90:274
subroutine, public fv_io_exit
Close the fv core restart facilities.
Definition: fv_io.F90:138
real, public soliton_size
Definition: test_cases.F90:177
integer, pointer k_split
Definition: fv_control.F90:239
real, pointer z_min
Definition: fv_control.F90:189
integer, public nsolitons
Definition: test_cases.F90:176
integer, pointer n_sponge
Definition: fv_control.F90:219
subroutine, public multi_gases_init(ngas, nwat)
Definition: multi_gases.F90:70
integer, pointer nt_prog
Definition: fv_control.F90:262
integer, pointer nord
Definition: fv_control.F90:192
real, pointer dry_mass
Definition: fv_control.F90:261
logical, pointer do_uni_zfull
Definition: fv_control.F90:314
subroutine, public grid_utils_init(Atm, npx, npy, npz, non_ortho, grid_type, c2l_order)
real, dimension(:), allocatable cpi
Definition: multi_gases.F90:49
logical, pointer fv_diag_ic
Definition: fv_control.F90:305
integer, pointer ncnst
Definition: fv_control.F90:251
character(len=120), pointer grid_file
Definition: fv_control.F90:176
character(len=128), pointer res_latlon_dynamics
Definition: fv_control.F90:309
real(kind=r_grid), pointer deglat_start
Definition: fv_control.F90:329
logical, pointer reed_cond_only
Definition: fv_control.F90:285
subroutine timing_on(blk_name)
The subroutine &#39;timing_on&#39; starts a timer.
Definition: fv_timing.F90:116
logical, pointer hybrid_z
Definition: fv_control.F90:316
logical, pointer regional
Definition: fv_control.F90:334
real, pointer d_ext
Definition: fv_control.F90:220
integer, parameter, public ng
Definition: fv_mp_mod.F90:2716
integer, pointer joffset
Definition: fv_control.F90:336
integer, pointer hord_vt
Definition: fv_control.F90:181
subroutine timing_prt(gid)
The subroutine &#39;timing_prt&#39; prints all timers.
Definition: fv_timing.F90:249
real, pointer d_con
Definition: fv_control.F90:267
logical, pointer adjust_dry_mass
Definition: fv_control.F90:287
logical, pointer inline_q
Definition: fv_control.F90:223
logical, pointer nested
Definition: fv_control.F90:333
@ The module &#39;fv_diagnostics&#39; contains routines to compute diagnosic fields.
logical, pointer gfs_phil
Definition: fv_control.F90:301
The module &#39;fv_grid_utils&#39; contains routines for setting up and computing grid-related quantities...
logical, pointer range_warn
Definition: fv_control.F90:275
real, pointer update_blend
Definition: fv_control.F90:337
real, pointer w_max
Definition: fv_control.F90:188
real, pointer d2_bg_k1
Definition: fv_control.F90:199
real(kind=r_grid), pointer target_lon
Definition: fv_control.F90:228
logical, pointer do_sat_adj
Definition: fv_control.F90:211
character(len=80), pointer grid_name
Definition: fv_control.F90:175
real(kind=r_grid), pointer deglat_stop
Definition: fv_control.F90:329
integer, pointer na_init
Definition: fv_control.F90:258
logical, pointer nudge_qv
Definition: fv_control.F90:319
real, pointer add_noise
Definition: fv_control.F90:320
real, pointer scale_z
Definition: fv_control.F90:187
integer, pointer refinement
Definition: fv_control.F90:336
real(kind=r_grid), pointer dy_const
Definition: fv_control.F90:328
real, pointer dddmp
Definition: fv_control.F90:194
logical, pointer fill
Definition: fv_control.F90:276
real, pointer damp_k_k2
Definition: fv_control.F90:204
integer, pointer hord_mt
Definition: fv_control.F90:178
real(kind=r_grid), pointer stretch_fac
Definition: fv_control.F90:226
integer, pointer a2b_ord
Definition: fv_control.F90:322
logical, pointer reproduce_sum
Definition: fv_control.F90:286
integer, pointer hord_tr
Definition: fv_control.F90:185
logical, pointer old_divg_damp
Definition: fv_control.F90:294
integer, pointer n_split
Definition: fv_control.F90:233
logical, pointer consv_am
Definition: fv_control.F90:210
logical, pointer do_f3d
Definition: fv_control.F90:212
subroutine timing_init
The subroutine &#39;timing_init&#39; initializes timers.
Definition: fv_timing.F90:79
subroutine allocate_fv_atmos_type(Atm, isd_in, ied_in, jsd_in, jed_in, is_in, ie_in, js_in, je_in, npx_in, npy_in, npz_in, ndims_in, ncnst_in, nq_in, ng_in, dummy, alloc_2d, ngrids_in)
The subroutine &#39;allocate_fv_atmos_type&#39; allocates the fv_atmos_type.
Definition: fv_arrays.F90:1324
logical, pointer use_ncep_phy
Definition: fv_control.F90:304
logical, pointer srf_init
Definition: fv_control.F90:289
integer, pointer kord_mt
Definition: fv_control.F90:179
subroutine, public grid_utils_end
logical, pointer use_hydro_pressure
Definition: fv_control.F90:313
real, pointer tau_h2o
Definition: fv_control.F90:264
real, pointer delt_max
Definition: fv_control.F90:266
integer, pointer hord_dp
Definition: fv_control.F90:183
logical, pointer nudge
Definition: fv_control.F90:296
The module &#39;FV3_control&#39; is for initialization and termination of the model, and controls namelist pa...
Definition: fv_control.F90:31
logical, pointer full_zs_filter
Definition: fv_control.F90:207
integer, pointer dnats
Definition: fv_control.F90:253
logical, pointer z_tracer
Definition: fv_control.F90:292
real, pointer d2_divg_max_k1
Definition: fv_control.F90:201
integer halo_update_type
1 for two-interfaces non-block 2 for block 3 for four-interfaces non-block
Definition: fv_control.F90:358
integer, pointer c2l_ord
Definition: fv_control.F90:323
subroutine, public fv_end(Atm, grids_on_this_pe)
The subroutine &#39;fv_end&#39; terminates FV3, deallocates memory, saves restart files, and stops I/O...
Definition: fv_control.F90:598
integer, pointer nestbctype
Definition: fv_control.F90:336
real, pointer tau
Definition: fv_control.F90:270
integer, pointer m_split
Definition: fv_control.F90:238
subroutine deallocate_fv_atmos_type(Atm)
The subroutine &#39;deallocate_fv_atmos_type&#39; deallocates the fv_atmos_type.
Definition: fv_arrays.F90:1770
logical, pointer do_held_suarez
Definition: fv_control.F90:283
integer, pointer ndims
Definition: fv_control.F90:325