25 #include <fms_platform.h> 26 use mpp_domains_mod
, only: domain2d
27 use fms_io_mod
, only: restart_file_type
28 use time_manager_mod
, only: time_type
29 use horiz_interp_type_mod
, only: horiz_interp_type
30 use mpp_domains_mod
, only: nest_domain_type
31 use mpp_mod
, only: mpp_broadcast
32 use platform_mod
, only: r8_kind
35 integer,
public,
parameter ::
r_grid = r8_kind
52 real,
parameter::
i4_in=-huge(1)
56 integer ::id_ps, id_slp, id_ua, id_va, id_pt, id_omga, id_vort, &
57 id_tm, id_pv, id_zsurf, id_oro, id_sgh, id_divg, id_w, &
58 id_ke, id_te, id_zs, id_ze, id_mq, id_vorts, id_us, id_vs, &
59 id_tq, id_rh, id_c15, id_c25, id_c35, id_c45, &
60 id_f15, id_f25, id_f35, id_f45, id_ctp, &
61 id_ppt, id_ts, id_tb, id_ctt, id_pmask, id_pmaskv2, &
62 id_delp, id_delz, id_zratio, id_ws, id_iw, id_lw, &
64 id_qn, id_qn200, id_qn500, id_qn850, id_qp, id_mdt, &
65 id_qdt, id_aam, id_amdt, &
66 id_acly, id_acl, id_acl2, &
67 id_dbz, id_maxdbz, id_basedbz, id_dbz4km, id_dbztop, id_dbz_m10c, &
68 id_ctz, id_w1km, id_wmaxup, id_wmaxdn, id_cape, id_cin, id_diss
71 integer :: id_vort200, id_vort500, id_w500, id_w700
72 integer :: id_vort850, id_w850, id_x850, id_srh25, &
73 id_uh03, id_uh25, id_theta_e, &
74 id_w200, id_s200, id_sl12, id_sl13, id_w5km, id_rain5km, id_w2500m
75 integer :: id_srh1, id_srh3, id_ustm, id_vstm
77 integer,
allocatable :: id_u(:), id_v(:), id_t(:), id_h(:), id_q(:), id_omg(:)
79 integer:: id_u_plev, id_v_plev, id_t_plev, id_h_plev, id_q_plev, id_omg_plev
81 integer :: id_rh10, id_rh50, id_rh100, id_rh200, id_rh250, id_rh300, &
82 id_rh500, id_rh700, id_rh850, id_rh925, id_rh1000
83 integer :: id_dp10, id_dp50, id_dp100, id_dp200, id_dp250, id_dp300, &
84 id_dp500, id_dp700, id_dp850, id_dp925, id_dp1000
86 integer :: id_rh1000_cmip, id_rh925_cmip, id_rh850_cmip, id_rh700_cmip, id_rh500_cmip, &
87 id_rh300_cmip, id_rh250_cmip, id_rh100_cmip, id_rh50_cmip, id_rh10_cmip
90 integer :: id_u100m, id_v100m, id_w100m
93 integer ic_ps, ic_ua, ic_va, ic_ppt
95 integer,
allocatable :: id_tracer(:)
97 integer,
allocatable :: id_tracer_dmmr(:)
98 integer,
allocatable :: id_tracer_dvmr(:)
99 real,
allocatable :: w_mr(:)
101 real,
allocatable :: phalf(:)
102 real,
allocatable :: zsurf(:,:)
103 real,
allocatable :: zxg(:,:)
104 real,
allocatable :: pt1(:)
107 logical :: initialized = .false.
108 real sphum, liq_wat, ice_wat
109 real rainwat, snowwat, graupel
121 real(kind=R_GRID),
allocatable,
dimension(:,:,:) :: grid_64, agrid_64
122 real(kind=R_GRID),
allocatable,
dimension(:,:) :: area_64, area_c_64
123 real(kind=R_GRID),
allocatable,
dimension(:,:) :: sina_64, cosa_64
124 real(kind=R_GRID),
allocatable,
dimension(:,:) :: dx_64, dy_64
125 real(kind=R_GRID),
allocatable,
dimension(:,:) :: dxc_64, dyc_64
126 real(kind=R_GRID),
allocatable,
dimension(:,:) :: dxa_64, dya_64
128 real,
allocatable,
dimension(:,:,:) :: grid, agrid
129 real,
allocatable,
dimension(:,:) :: area, area_c
130 real,
allocatable,
dimension(:,:) :: rarea, rarea_c
132 real,
allocatable,
dimension(:,:) :: sina, cosa
133 real,
allocatable,
dimension(:,:,:) :: e1,e2
134 real,
allocatable,
dimension(:,:) :: dx, dy
135 real,
allocatable,
dimension(:,:) :: dxc, dyc
136 real,
allocatable,
dimension(:,:) :: dxa, dya
137 real,
allocatable,
dimension(:,:) :: rdx, rdy
138 real,
allocatable,
dimension(:,:) :: rdxc, rdyc
139 real,
allocatable,
dimension(:,:) :: rdxa, rdya
142 real(kind=R_GRID),
allocatable :: edge_s(:)
143 real(kind=R_GRID),
allocatable :: edge_n(:)
144 real(kind=R_GRID),
allocatable :: edge_w(:)
145 real(kind=R_GRID),
allocatable :: edge_e(:)
147 real(kind=R_GRID),
allocatable :: edge_vect_s(:)
148 real(kind=R_GRID),
allocatable :: edge_vect_n(:)
149 real(kind=R_GRID),
allocatable :: edge_vect_w(:)
150 real(kind=R_GRID),
allocatable :: edge_vect_e(:)
152 real(kind=R_GRID),
allocatable :: ex_s(:)
153 real(kind=R_GRID),
allocatable :: ex_n(:)
154 real(kind=R_GRID),
allocatable :: ex_w(:)
155 real(kind=R_GRID),
allocatable :: ex_e(:)
157 real,
allocatable :: l2c_u(:,:), l2c_v(:,:)
159 real,
allocatable :: divg_u(:,:), divg_v(:,:)
161 real,
allocatable :: del6_u(:,:), del6_v(:,:)
163 real,
allocatable :: a11(:,:)
164 real,
allocatable :: a12(:,:)
165 real,
allocatable :: a21(:,:)
166 real,
allocatable :: a22(:,:)
168 real,
allocatable :: z11(:,:)
169 real,
allocatable :: z12(:,:)
170 real,
allocatable :: z21(:,:)
171 real,
allocatable :: z22(:,:)
175 real,
allocatable :: cosa_u(:,:)
176 real,
allocatable :: cosa_v(:,:)
177 real,
allocatable :: cosa_s(:,:)
178 real,
allocatable :: sina_u(:,:)
179 real,
allocatable :: sina_v(:,:)
180 real,
allocatable :: rsin_u(:,:)
181 real,
allocatable :: rsin_v(:,:)
182 real,
allocatable :: rsina(:,:)
183 real,
allocatable :: rsin2(:,:)
184 real(kind=R_GRID),
allocatable :: ee1(:,:,:)
185 real(kind=R_GRID),
allocatable :: ee2(:,:,:)
186 real(kind=R_GRID),
allocatable :: ec1(:,:,:)
187 real(kind=R_GRID),
allocatable :: ec2(:,:,:)
188 real(kind=R_GRID),
allocatable :: ew(:,:,:,:)
189 real(kind=R_GRID),
allocatable :: es(:,:,:,:)
194 real,
allocatable :: sin_sg(:,:,:)
195 real,
allocatable :: cos_sg(:,:,:)
199 real(kind=R_GRID),
allocatable :: en1(:,:,:)
200 real(kind=R_GRID),
allocatable :: en2(:,:,:)
203 real,
allocatable :: eww(:,:)
204 real,
allocatable :: ess(:,:)
207 real(kind=R_GRID),
allocatable :: vlon(:,:,:), vlat(:,:,:)
208 real,
allocatable :: fc(:,:), f0(:,:)
210 integer,
dimension(:,:,:),
allocatable :: iinta, jinta, iintb, jintb
214 integer :: npx_g, npy_g, ntiles_g
216 real(kind=R_GRID) :: global_area
217 logical :: g_sum_initialized = .false.
218 logical:: sw_corner, se_corner, ne_corner, nw_corner
220 real(kind=R_GRID) :: da_min, da_max, da_min_c, da_max_c
225 logical :: latlon = .false.
226 logical :: cubed_sphere = .false.
227 logical :: have_south_pole = .false.
228 logical :: have_north_pole = .false.
229 logical :: stretched_grid = .false.
231 logical :: square_domain = .false.
233 integer,
pointer :: grid_type
239 logical,
pointer :: nested
241 logical,
pointer :: regional
261 character(len=80) :: grid_name =
'Gnomonic' 262 character(len=120):: grid_file =
'Inline' 263 integer :: grid_type = 0
273 integer :: hord_mt = 9
290 integer :: kord_mt = 8
295 integer :: kord_wz = 8
300 integer :: hord_vt = 9
305 integer :: hord_tm = 9
308 integer :: hord_dp = 9
312 integer :: kord_tm = -8
317 integer :: hord_tr = 12
324 integer :: kord_tr = 8
331 real :: lim_fac = 1.0
339 integer :: nord_tr = 0
364 real :: d2_bg_k1 = 4.
373 real :: d2_bg_k2 = 2.
377 real :: d2_divg_max_k1 = 0.15
378 real :: d2_divg_max_k2 = 0.08
379 real :: damp_k_k1 = 0.2
380 real :: damp_k_k2 = 0.12
383 integer :: n_zs_filter = 0
391 integer :: nord_zs_filter = 4
399 logical :: full_zs_filter = .false.
409 logical :: rf_fast = .false.
416 logical :: consv_am = .false.
419 logical :: do_sat_adj= .false.
420 logical :: do_f3d = .false.
421 logical :: no_dycore = .false.
426 logical :: convert_ke = .false.
432 logical :: do_vort_damp = .false.
444 logical :: use_old_omega = .true.
460 integer :: n_sponge = 0
486 logical :: warm_start = .false.
490 logical :: inline_q = .true.
495 logical :: adiabatic = .true.
499 integer :: n_sponge = 1
523 logical :: warm_start = .true.
527 logical :: inline_q = .false.
531 logical :: adiabatic = .false.
536 real :: shift_fac = 18.
546 logical :: do_schmidt = .false.
549 real(kind=R_GRID) :: stretch_fac = 1.
558 real(kind=R_GRID) :: target_lat = -90.
565 real(kind=R_GRID) :: target_lon = 0.
578 logical :: reset_eta = .false.
600 integer :: n_split = 0
605 real :: fac_n_spl = 1.0
609 integer :: m_split = 0
610 integer :: k_split = 1
613 logical :: use_logp = .false.
633 integer :: q_split = 0
638 integer :: print_freq = 0
643 logical :: write_3d_diags = .true.
663 integer :: npz_rst = 0
683 integer :: ntiles = 1
689 integer :: nf_omega = 1
692 integer :: fv_sg_adj = -1
700 integer :: na_init = 0
707 logical :: nudge_dz = .false.
720 real :: dry_mass = 98290.
725 integer :: nt_prog = 0
726 integer :: nt_phys = 0
736 real :: delt_max = 1.
751 real :: consv_te = 0.
771 real :: rf_cutoff = 30.e2
773 logical :: filter_phys = .false.
774 logical :: dwind_2d = .false.
782 logical :: breed_vortex_inline = .false.
786 logical :: range_warn = .false.
792 logical :: fill = .false.
795 logical :: fill_dp = .false.
803 logical :: fill_wz = .false.
804 logical :: check_negative = .false.
805 logical :: non_ortho = .true.
806 logical :: moist_phys = .true.
807 logical :: do_held_suarez = .false.
810 logical :: do_reed_physics = .false.
811 logical :: reed_cond_only = .false.
812 logical :: reproduce_sum = .true.
819 logical :: adjust_dry_mass = .false.
827 logical :: fv_debug = .false.
829 logical :: srf_init = .false.
830 logical :: mountain = .true.
837 logical :: old_divg_damp = .false.
848 logical :: remap_t = .true.
856 logical :: z_tracer = .false.
861 logical :: fv_land = .false.
872 logical :: nudge = .false.
876 logical :: nudge_ic = .false.
880 logical :: ncep_ic = .false.
885 logical :: nggps_ic = .false.
889 logical :: ecmwf_ic = .false.
892 logical :: gfs_phil = .false.
894 logical :: agrid_vel_rst = .false.
899 logical :: use_new_ncep = .false.
900 logical :: use_ncep_phy = .false.
901 logical :: fv_diag_ic = .false.
903 logical :: external_ic = .false.
911 logical :: external_eta = .false.
916 logical :: read_increment = .false.
918 logical :: do_skeb = .false.
919 integer :: skeb_npass = 11
921 character(len=128) :: res_latlon_dynamics =
'INPUT/fv_rst.res.nc' 923 character(len=128) :: res_latlon_tracers =
'INPUT/atmos_tracers.res.nc' 933 logical :: hydrostatic = .true.
936 logical :: phys_hydrostatic = .true.
942 logical :: use_hydro_pressure = .false.
946 logical :: do_uni_zfull = .false.
953 logical :: hybrid_z = .false.
957 logical :: make_nh = .false.
961 logical :: make_hybrid_z = .false.
965 logical :: nudge_qv = .false.
973 real :: add_noise = -1.
977 integer :: a2b_ord = 4
982 integer :: c2l_ord = 4
989 real(kind=R_GRID) :: dx_const = 1000.
993 real(kind=R_GRID) :: dy_const = 1000.
997 real(kind=R_GRID) :: deglat = 15.
1002 real(kind=R_GRID) :: deglon_start = -30., deglon_stop = 30., &
1003 deglat_start = -30., deglat_stop = 30.
1005 logical :: regional = .false.
1007 integer :: bc_update_interval = 3
1010 integer,
pointer :: grid_number
1013 logical :: adj_mass_vmr = .false.
1025 real,
allocatable,
dimension(:,:,:) :: west_t1, east_t1, south_t1, north_t1
1026 real,
allocatable,
dimension(:,:,:) :: west_t0, east_t0, south_t0, north_t0
1028 integer :: istag, jstag
1030 logical :: allocated = .false.
1031 logical :: initialized = .false.
1037 real,
allocatable,
dimension(:,:,:,:) :: west_t1, east_t1, south_t1, north_t1
1038 real,
allocatable,
dimension(:,:,:,:) :: west_t0, east_t0, south_t0, north_t0
1040 integer :: istag, jstag
1042 logical :: allocated = .false.
1043 logical :: initialized = .false.
1051 integer :: refinement = 3
1059 integer :: parent_tile = 1
1066 logical :: nested = .false.
1068 integer :: nestbctype = 1
1069 integer :: nsponge = 0
1070 integer :: nestupdate = 0
1073 logical :: twowaynest = .false.
1076 integer :: ioffset, joffset
1078 integer :: nest_timestep = 0
1079 integer :: tracer_nest_timestep = 0
1080 real :: s_weight = 1.e-6
1081 logical :: first_step = .true.
1082 integer :: refinement_of_global = 1
1083 integer :: npx_global
1084 integer :: upoff = 1
1085 integer :: isu = -999, ieu = -1000, jsu = -999, jeu = -1000
1087 type(nest_domain_type) :: nest_domain
1088 type(nest_domain_type),
allocatable :: nest_domain_all(:)
1091 integer,
allocatable,
dimension(:,:,:) :: ind_h, ind_u, ind_v, ind_b
1092 real,
allocatable,
dimension(:,:,:) :: wt_h, wt_u, wt_v, wt_b
1093 integer,
allocatable,
dimension(:,:,:) :: ind_update_h
1098 logical,
allocatable,
dimension(:) :: child_grids
1100 logical :: parent_proc, child_proc
1101 logical :: parent_of_twoway = .false.
1117 logical :: do_flux_bcs, do_2way_flux_bcs
1118 type(restart_file_type) :: bcfile_ne, bcfile_sw
1139 integer :: is, ie, js, je
1140 integer :: isd, ied, jsd, jed
1141 integer :: isc, iec, jsc, jec
1149 integer :: is_north ,ie_north ,js_north ,je_north &
1150 ,is_south ,ie_south ,js_south ,je_south &
1151 ,is_east ,ie_east ,js_east ,je_east &
1152 ,is_west ,ie_west ,js_west ,je_west
1154 integer :: is_north_uvs ,ie_north_uvs ,js_north_uvs ,je_north_uvs &
1155 ,is_south_uvs ,ie_south_uvs ,js_south_uvs ,je_south_uvs &
1156 ,is_east_uvs ,ie_east_uvs ,js_east_uvs ,je_east_uvs &
1157 ,is_west_uvs ,ie_west_uvs ,js_west_uvs ,je_west_uvs
1159 integer :: is_north_uvw ,ie_north_uvw ,js_north_uvw ,je_north_uvw &
1160 ,is_south_uvw ,ie_south_uvw ,js_south_uvw ,je_south_uvw &
1161 ,is_east_uvw ,ie_east_uvw ,js_east_uvw ,je_east_uvw &
1162 ,is_west_uvw ,ie_west_uvw ,js_west_uvw ,je_west_uvw
1168 logical :: allocated = .false.
1169 logical :: dummy = .false.
1170 integer :: grid_number = 1
1174 type(time_type) :: time_init, time, run_length, time_end, time_step_atmos
1176 logical :: grid_active = .true.
1197 real, _allocatable :: u(:,:,:) _null
1198 real, _allocatable :: v(:,:,:) _null
1199 real, _allocatable :: pt(:,:,:) _null
1200 real, _allocatable :: delp(:,:,:) _null
1201 real, _allocatable :: q(:,:,:,:) _null
1202 real, _allocatable :: qdiag(:,:,:,:) _null
1207 real, _allocatable :: w(:,:,:) _null
1208 real, _allocatable :: delz(:,:,:) _null
1209 real, _allocatable :: ze0(:,:,:) _null
1210 real, _allocatable :: q_con(:,:,:) _null
1217 real, _allocatable :: ps (:,:) _null
1218 real, _allocatable :: pe (:,:,: ) _null
1219 real, _allocatable :: pk (:,:,:) _null
1220 real, _allocatable :: peln(:,:,:) _null
1221 real, _allocatable :: pkz (:,:,:) _null
1224 real, _allocatable :: u_srf(:,:) _null
1225 real, _allocatable :: v_srf(:,:) _null
1226 real, _allocatable :: sgh(:,:) _null
1227 real, _allocatable :: oro(:,:) _null
1228 real, _allocatable :: ts(:,:) _null
1230 real, _allocatable :: diss_est(:,:,:) _null
1235 real, _allocatable :: phis(:,:) _null
1236 real, _allocatable :: omga(:,:,:) _null
1237 real, _allocatable :: ua(:,:,:) _null
1238 real, _allocatable :: va(:,:,:) _null
1239 real, _allocatable :: uc(:,:,:) _null
1240 real, _allocatable :: vc(:,:,:) _null
1242 real, _allocatable :: ak(:) _null
1243 real, _allocatable :: bk(:) _null
1248 real, _allocatable :: mfx(:,:,:) _null
1249 real, _allocatable :: mfy(:,:,:) _null
1251 real, _allocatable :: cx(:,:,:) _null
1252 real, _allocatable :: cy(:,:,:) _null
1257 integer,
pointer :: npx, npy, npz, ncnst, ng
1259 integer,
allocatable,
dimension(:) :: pelist
1265 type(domain2d) :: domain
1268 type(domain2d) :: domain_for_coupler
1270 integer :: num_contact, npes_per_tile, tile, npes_this_grid
1271 integer :: layout(2), io_layout(2) = (/ 1,1 /)
1305 type(restart_file_type) :: fv_restart, sst_restart, fv_tile_restart, &
1306 rsf_restart, mg_restart, lnd_restart, tra_restart
1311 real(kind=R_GRID),
allocatable,
dimension(:,:,:,:) :: grid_global
1313 integer :: atmos_axes(4)
1323 npx_in, npy_in, npz_in, ndims_in, ncnst_in, nq_in, ng_in, dummy, alloc_2d, ngrids_in)
1331 integer,
intent(IN) :: isd_in, ied_in, jsd_in, jed_in, is_in, ie_in, js_in, je_in
1332 integer,
intent(IN) :: npx_in, npy_in, npz_in, ndims_in, ncnst_in, nq_in, ng_in
1333 logical,
intent(IN) :: dummy, alloc_2d
1334 integer,
intent(IN) :: ngrids_in
1335 integer:: isd, ied, jsd, jed, is, ie, js, je
1336 integer:: npx, npy, npz, ndims, ncnst, nq, ng
1339 integer:: isd_2d, ied_2d, jsd_2d, jed_2d, is_2d, ie_2d, js_2d, je_2d
1340 integer:: npx_2d, npy_2d, npz_2d, ndims_2d, ncnst_2d, nq_2d, ng_2d
1342 integer :: i,j,k, ns, n
1344 if (atm%allocated)
return 1380 if ((.not. dummy) .or. alloc_2d)
then 1433 atm%npx => atm%flagstruct%npx
1434 atm%npy => atm%flagstruct%npy
1435 atm%npz => atm%flagstruct%npz
1436 atm%ncnst => atm%flagstruct%ncnst
1443 atm%flagstruct%ndims = ndims_in
1445 allocate ( atm%u(isd:ied ,jsd:jed+1,npz) ) ; atm%u=
real_snan 1446 allocate ( atm%v(isd:ied+1,jsd:jed ,npz) ) ; atm%v=
real_snan 1448 allocate ( atm%pt(isd:ied ,jsd:jed ,npz) ) ; atm%pt=
real_snan 1449 allocate ( atm%delp(isd:ied ,jsd:jed ,npz) ) ; atm%delp=
real_snan 1450 allocate ( atm%q(isd:ied ,jsd:jed ,npz, nq) ) ; atm%q=
real_snan 1451 allocate (atm%qdiag(isd:ied ,jsd:jed ,npz, nq+1:ncnst) ) ; atm%qdiag=
real_snan 1454 allocate ( atm%ps(isd:ied ,jsd:jed) ) ; atm%ps=
real_snan 1455 allocate ( atm%pe(is-1:ie+1, npz+1,js-1:je+1) ) ; atm%pe=
real_snan 1456 allocate ( atm%pk(is:ie ,js:je , npz+1) ) ; atm%pk=
real_snan 1458 allocate ( atm%peln(is:ie,npz+1,js:je) ) ; atm%peln=
real_snan 1459 allocate ( atm%pkz(is:ie,js:je,npz) ) ; atm%pkz=
real_snan 1461 allocate ( atm%u_srf(is:ie,js:je) ) ; atm%u_srf=
real_snan 1462 allocate ( atm%v_srf(is:ie,js:je) ) ; atm%v_srf=
real_snan 1464 if ( atm%flagstruct%fv_land )
then 1465 allocate ( atm%sgh(is:ie,js:je) ) ; atm%sgh=
real_snan 1466 allocate ( atm%oro(is:ie,js:je) ) ; atm%oro=
real_snan 1468 allocate ( atm%oro(1,1) ) ; atm%oro=
real_snan 1472 allocate ( atm%diss_est(isd:ied ,jsd:jed ,npz) ) ; atm%diss_est=
real_snan 1473 allocate ( atm%ts(is:ie,js:je) ) ; atm%ts=
real_snan 1474 allocate ( atm%phis(isd:ied ,jsd:jed ) ) ; atm%phis=
real_snan 1475 allocate ( atm%omga(isd:ied ,jsd:jed ,npz) ); atm%omga=0.
1476 allocate ( atm%ua(isd:ied ,jsd:jed ,npz) ) ; atm%ua=
real_snan 1477 allocate ( atm%va(isd:ied ,jsd:jed ,npz) ) ; atm%va=
real_snan 1478 allocate ( atm%uc(isd:ied+1,jsd:jed ,npz) ) ; atm%uc=
real_snan 1479 allocate ( atm%vc(isd:ied ,jsd:jed+1,npz) ) ; atm%vc=
real_snan 1481 allocate ( atm%mfx(is:ie+1, js:je, npz) ) ; atm%mfx=
real_snan 1482 allocate ( atm%mfy(is:ie , js:je+1,npz) ) ; atm%mfy=
real_snan 1483 allocate ( atm%cx(is:ie+1, jsd:jed, npz) ) ; atm%cx=
real_snan 1484 allocate ( atm%cy(isd:ied ,js:je+1, npz) ) ; atm%cy=
real_snan 1486 allocate ( atm%ak(npz_2d+1) ) ; atm%ak=
real_snan 1487 allocate ( atm%bk(npz_2d+1) ) ; atm%bk=
real_snan 1492 if ( atm%flagstruct%hydrostatic )
then 1494 allocate ( atm%w(isd:isd, jsd:jsd ,1) ) ; atm%w=
real_snan 1495 allocate ( atm%delz(isd:isd, jsd:jsd ,1) ) ; atm%delz=
real_snan 1496 allocate ( atm%ze0(is:is, js:js ,1) ) ; atm%ze0=
real_snan 1498 allocate ( atm%w(isd:ied, jsd:jed ,npz ) ) ; atm%w=
real_snan 1499 allocate ( atm%delz(isd:ied, jsd:jed ,npz) ) ; atm%delz=
real_snan 1500 if( atm%flagstruct%hybrid_z )
then 1501 allocate ( atm%ze0(is:ie, js:je ,npz+1) ) ; atm%ze0=
real_snan 1503 allocate ( atm%ze0(is:is, js:js ,1) ) ; atm%ze0=
real_snan 1509 allocate ( atm%q_con(isd:ied,jsd:jed,1:npz) ) ; atm%q_con=
real_snan; atm%q_con=0.0
1511 allocate ( atm%q_con(isd:isd,jsd:jsd,1) ) ; atm%q_con=
real_snan; atm%q_con=0.0
1514 #ifndef NO_TOUCH_MEM 1540 if ( .not. atm%flagstruct%hydrostatic )
then 1565 allocate ( atm%gridstruct% area(isd_2d:ied_2d ,jsd_2d:jed_2d ) ) ; atm%gridstruct% area=
real_snan 1566 allocate ( atm%gridstruct% area_64(isd_2d:ied_2d ,jsd_2d:jed_2d ) ) ; atm%gridstruct% area_64=
real_snan 1567 allocate ( atm%gridstruct%rarea(isd_2d:ied_2d ,jsd_2d:jed_2d ) ) ; atm%gridstruct%rarea=
real_snan 1569 allocate ( atm%gridstruct% area_c(isd_2d:ied_2d+1,jsd_2d:jed_2d+1) ) ; atm%gridstruct% area_c=
real_snan 1570 allocate ( atm%gridstruct% area_c_64(isd_2d:ied_2d+1,jsd_2d:jed_2d+1) ) ; atm%gridstruct% area_c_64=
real_snan 1571 allocate ( atm%gridstruct%rarea_c(isd_2d:ied_2d+1,jsd_2d:jed_2d+1) ) ; atm%gridstruct%rarea_c=
real_snan 1573 allocate ( atm%gridstruct% dx(isd_2d:ied_2d ,jsd_2d:jed_2d+1) ) ; atm%gridstruct% dx=
real_snan 1574 allocate ( atm%gridstruct% dx_64(isd_2d:ied_2d ,jsd_2d:jed_2d+1) ) ; atm%gridstruct% dx_64=
real_snan 1575 allocate ( atm%gridstruct%rdx(isd_2d:ied_2d ,jsd_2d:jed_2d+1) ) ; atm%gridstruct%rdx=
real_snan 1576 allocate ( atm%gridstruct% dy(isd_2d:ied_2d+1,jsd_2d:jed_2d ) ) ; atm%gridstruct% dy=
real_snan 1577 allocate ( atm%gridstruct% dy_64(isd_2d:ied_2d+1,jsd_2d:jed_2d ) ) ; atm%gridstruct% dy_64=
real_snan 1578 allocate ( atm%gridstruct%rdy(isd_2d:ied_2d+1,jsd_2d:jed_2d ) ) ; atm%gridstruct%rdy=
real_snan 1580 allocate ( atm%gridstruct% dxc(isd_2d:ied_2d+1,jsd_2d:jed_2d ) ) ; atm%gridstruct% dxc=
real_snan 1581 allocate ( atm%gridstruct% dxc_64(isd_2d:ied_2d+1,jsd_2d:jed_2d ) ) ; atm%gridstruct% dxc_64=
real_snan 1582 allocate ( atm%gridstruct%rdxc(isd_2d:ied_2d+1,jsd_2d:jed_2d ) ) ; atm%gridstruct%rdxc=
real_snan 1583 allocate ( atm%gridstruct% dyc(isd_2d:ied_2d ,jsd_2d:jed_2d+1) ) ; atm%gridstruct% dyc=
real_snan 1584 allocate ( atm%gridstruct% dyc_64(isd_2d:ied_2d ,jsd_2d:jed_2d+1) ) ; atm%gridstruct% dyc_64=
real_snan 1585 allocate ( atm%gridstruct%rdyc(isd_2d:ied_2d ,jsd_2d:jed_2d+1) ) ; atm%gridstruct%rdyc=
real_snan 1587 allocate ( atm%gridstruct% dxa(isd_2d:ied_2d ,jsd_2d:jed_2d ) ) ; atm%gridstruct% dxa=
real_snan 1588 allocate ( atm%gridstruct% dxa_64(isd_2d:ied_2d ,jsd_2d:jed_2d ) ) ; atm%gridstruct% dxa_64=
real_snan 1589 allocate ( atm%gridstruct%rdxa(isd_2d:ied_2d ,jsd_2d:jed_2d ) ) ; atm%gridstruct%rdxa=
real_snan 1590 allocate ( atm%gridstruct% dya(isd_2d:ied_2d ,jsd_2d:jed_2d ) ) ; atm%gridstruct% dya=
real_snan 1591 allocate ( atm%gridstruct% dya_64(isd_2d:ied_2d ,jsd_2d:jed_2d ) ) ; atm%gridstruct% dya_64=
real_snan 1592 allocate ( atm%gridstruct%rdya(isd_2d:ied_2d ,jsd_2d:jed_2d ) ) ; atm%gridstruct%rdya=
real_snan 1594 allocate ( atm%gridstruct%grid (isd_2d:ied_2d+1,jsd_2d:jed_2d+1,1:ndims_2d) ) ; atm%gridstruct%grid=
real_snan 1595 allocate ( atm%gridstruct%grid_64 (isd_2d:ied_2d+1,jsd_2d:jed_2d+1,1:ndims_2d) ) ; atm%gridstruct%grid_64=
real_snan 1596 allocate ( atm%gridstruct%agrid(isd_2d:ied_2d ,jsd_2d:jed_2d ,1:ndims_2d) ) ; atm%gridstruct%agrid=
real_snan 1597 allocate ( atm%gridstruct%agrid_64(isd_2d:ied_2d ,jsd_2d:jed_2d ,1:ndims_2d) ) ; atm%gridstruct%agrid_64=
real_snan 1598 allocate ( atm%gridstruct% sina(isd_2d:ied_2d+1,jsd_2d:jed_2d+1) ) ; atm%gridstruct% sina=
real_snan 1599 allocate ( atm%gridstruct% sina_64(isd_2d:ied_2d+1,jsd_2d:jed_2d+1) ) ; atm%gridstruct% sina_64=
real_snan 1600 allocate ( atm%gridstruct%rsina(is_2d:ie_2d+1,js_2d:je_2d+1) ) ; atm%gridstruct%rsina=
real_snan 1601 allocate ( atm%gridstruct% cosa(isd_2d:ied_2d+1,jsd_2d:jed_2d+1) ) ; atm%gridstruct% cosa=
real_snan 1602 allocate ( atm%gridstruct% cosa_64(isd_2d:ied_2d+1,jsd_2d:jed_2d+1) ) ; atm%gridstruct% cosa_64=
real_snan 1604 allocate ( atm%gridstruct% e1(3,isd_2d:ied_2d+1,jsd_2d:jed_2d+1) ) ; atm%gridstruct%e1=
real_snan 1605 allocate ( atm%gridstruct% e2(3,isd_2d:ied_2d+1,jsd_2d:jed_2d+1) ) ; atm%gridstruct%e2=
real_snan 1607 allocate (atm%gridstruct%iinta(4, isd_2d:ied_2d ,jsd_2d:jed_2d), &
1608 atm%gridstruct%jinta(4, isd_2d:ied_2d ,jsd_2d:jed_2d), &
1609 atm%gridstruct%iintb(4, is_2d:ie_2d+1 ,js_2d:je_2d+1), &
1610 atm%gridstruct%jintb(4, is_2d:ie_2d+1 ,js_2d:je_2d+1) )
1612 allocate ( atm%gridstruct%edge_s(npx_2d) ) ; atm%gridstruct%edge_s=
real_snan 1613 allocate ( atm%gridstruct%edge_n(npx_2d) ) ; atm%gridstruct%edge_n=
real_snan 1614 allocate ( atm%gridstruct%edge_w(npy_2d) ) ; atm%gridstruct%edge_w=
real_snan 1615 allocate ( atm%gridstruct%edge_e(npy_2d) ) ; atm%gridstruct%edge_e=
real_snan 1617 allocate ( atm%gridstruct%edge_vect_s(isd_2d:ied_2d) ) ; atm%gridstruct%edge_vect_s=
real_snan 1618 allocate ( atm%gridstruct%edge_vect_n(isd_2d:ied_2d) ) ; atm%gridstruct%edge_vect_n=
real_snan 1619 allocate ( atm%gridstruct%edge_vect_w(jsd_2d:jed_2d) ) ; atm%gridstruct%edge_vect_w=
real_snan 1620 allocate ( atm%gridstruct%edge_vect_e(jsd_2d:jed_2d) ) ; atm%gridstruct%edge_vect_e=
real_snan 1622 allocate ( atm%gridstruct%ex_s(npx_2d) ) ; atm%gridstruct%ex_s=
real_snan 1623 allocate ( atm%gridstruct%ex_n(npx_2d) ) ; atm%gridstruct%ex_n=
real_snan 1624 allocate ( atm%gridstruct%ex_w(npy_2d) ) ; atm%gridstruct%ex_w=
real_snan 1625 allocate ( atm%gridstruct%ex_e(npy_2d) ) ; atm%gridstruct%ex_e=
real_snan 1628 allocate ( atm%gridstruct%l2c_u(is_2d:ie_2d, js_2d:je_2d+1) ) ; atm%gridstruct%l2c_u=
real_snan 1629 allocate ( atm%gridstruct%l2c_v(is_2d:ie_2d+1,js_2d:je_2d) ) ; atm%gridstruct%l2c_v=
real_snan 1632 allocate ( atm%gridstruct%divg_u(isd_2d:ied_2d, jsd_2d:jed_2d+1) ) ; atm%gridstruct%divg_u=
real_snan 1633 allocate ( atm%gridstruct%divg_v(isd_2d:ied_2d+1,jsd_2d:jed_2d) ) ; atm%gridstruct%divg_v=
real_snan 1635 allocate ( atm%gridstruct%del6_u(isd_2d:ied_2d, jsd_2d:jed_2d+1) ) ; atm%gridstruct%del6_u=
real_snan 1636 allocate ( atm%gridstruct%del6_v(isd_2d:ied_2d+1,jsd_2d:jed_2d) ) ; atm%gridstruct%del6_v=
real_snan 1638 allocate ( atm%gridstruct%z11(is_2d-1:ie_2d+1,js_2d-1:je_2d+1) ) ; atm%gridstruct%z11=
real_snan 1639 allocate ( atm%gridstruct%z12(is_2d-1:ie_2d+1,js_2d-1:je_2d+1) ) ; atm%gridstruct%z12=
real_snan 1640 allocate ( atm%gridstruct%z21(is_2d-1:ie_2d+1,js_2d-1:je_2d+1) ) ; atm%gridstruct%z21=
real_snan 1641 allocate ( atm%gridstruct%z22(is_2d-1:ie_2d+1,js_2d-1:je_2d+1) ) ; atm%gridstruct%z22=
real_snan 1646 allocate ( atm%gridstruct%a11(is_2d-1:ie_2d+1,js_2d-1:je_2d+1) ) ; atm%gridstruct%a11=
real_snan 1647 allocate ( atm%gridstruct%a12(is_2d-1:ie_2d+1,js_2d-1:je_2d+1) ) ; atm%gridstruct%a12=
real_snan 1648 allocate ( atm%gridstruct%a21(is_2d-1:ie_2d+1,js_2d-1:je_2d+1) ) ; atm%gridstruct%a21=
real_snan 1649 allocate ( atm%gridstruct%a22(is_2d-1:ie_2d+1,js_2d-1:je_2d+1) ) ; atm%gridstruct%a22=
real_snan 1650 allocate ( atm%gridstruct%vlon(is_2d-2:ie_2d+2,js_2d-2:je_2d+2,3) ) ; atm%gridstruct%vlon=
real_snan 1651 allocate ( atm%gridstruct%vlat(is_2d-2:ie_2d+2,js_2d-2:je_2d+2,3) ) ; atm%gridstruct%vlat=
real_snan 1653 allocate ( atm%gridstruct%f0(isd_2d:ied_2d ,jsd_2d:jed_2d ) ) ; atm%gridstruct%f0=
real_snan 1654 allocate ( atm%gridstruct%fC(isd_2d:ied_2d+1,jsd_2d:jed_2d+1) ) ; atm%gridstruct%fc=
real_snan 1657 allocate( atm%gridstruct%ee1(3,isd_2d:ied_2d+1,jsd_2d:jed_2d+1) ) ; atm%gridstruct%ee1=
real_snan 1658 allocate( atm%gridstruct%ee2(3,isd_2d:ied_2d+1,jsd_2d:jed_2d+1) ) ; atm%gridstruct%ee2=
real_snan 1661 allocate( atm%gridstruct%ec1(3,isd_2d:ied_2d,jsd_2d:jed_2d) ) ; atm%gridstruct%ec1=
real_snan 1662 allocate( atm%gridstruct%ec2(3,isd_2d:ied_2d,jsd_2d:jed_2d) ) ; atm%gridstruct%ec2=
real_snan 1665 allocate( atm%gridstruct%ew(3,isd_2d:ied_2d+1,jsd_2d:jed_2d, 2) ) ; atm%gridstruct%ew=
real_snan 1666 allocate( atm%gridstruct%es(3,isd_2d:ied_2d ,jsd_2d:jed_2d+1,2) ) ; atm%gridstruct%es=
real_snan 1669 allocate( atm%gridstruct%en1(3,is_2d:ie_2d, js_2d:je_2d+1) ) ; atm%gridstruct%en1=
real_snan 1670 allocate( atm%gridstruct%en2(3,is_2d:ie_2d+1,js_2d:je_2d ) ) ; atm%gridstruct%en2=
real_snan 1672 allocate ( atm%gridstruct%cosa_u(isd_2d:ied_2d+1,jsd_2d:jed_2d) ) ; atm%gridstruct%cosa_u=
real_snan 1673 allocate ( atm%gridstruct%sina_u(isd_2d:ied_2d+1,jsd_2d:jed_2d) ) ; atm%gridstruct%sina_u=
real_snan 1674 allocate ( atm%gridstruct%rsin_u(isd_2d:ied_2d+1,jsd_2d:jed_2d) ) ; atm%gridstruct%rsin_u=
real_snan 1676 allocate ( atm%gridstruct%cosa_v(isd_2d:ied_2d,jsd_2d:jed_2d+1) ) ; atm%gridstruct%cosa_v=
real_snan 1677 allocate ( atm%gridstruct%sina_v(isd_2d:ied_2d,jsd_2d:jed_2d+1) ) ; atm%gridstruct%sina_v=
real_snan 1678 allocate ( atm%gridstruct%rsin_v(isd_2d:ied_2d,jsd_2d:jed_2d+1) ) ; atm%gridstruct%rsin_v=
real_snan 1680 allocate ( atm%gridstruct%cosa_s(isd_2d:ied_2d,jsd_2d:jed_2d) ) ; atm%gridstruct%rsin_v=
real_snan 1682 allocate ( atm%gridstruct%rsin2(isd_2d:ied_2d,jsd_2d:jed_2d) ) ; atm%gridstruct%rsin_v=
real_snan 1693 allocate ( atm%gridstruct%cos_sg(isd_2d:ied_2d,jsd_2d:jed_2d,9) ) ; atm%gridstruct%cos_sg=
real_snan 1694 allocate ( atm%gridstruct%sin_sg(isd_2d:ied_2d,jsd_2d:jed_2d,9) ) ; atm%gridstruct%sin_sg=
real_snan 1696 allocate( atm%gridstruct%eww(3,4) ) ; atm%gridstruct%eww=
real_snan 1697 allocate( atm%gridstruct%ess(3,4) ) ; atm%gridstruct%ess=
real_snan 1699 if (atm%neststruct%nested)
then 1701 allocate(atm%neststruct%ind_h(isd:ied,jsd:jed,4)) ; atm%neststruct%ind_h=
i4_in 1702 allocate(atm%neststruct%ind_u(isd:ied,jsd:jed+1,4)) ; atm%neststruct%ind_u=
i4_in 1703 allocate(atm%neststruct%ind_v(isd:ied+1,jsd:jed,4)) ; atm%neststruct%ind_v=
i4_in 1705 allocate(atm%neststruct%wt_h(isd:ied, jsd:jed, 4)) ; atm%neststruct%wt_h=
real_snan 1706 allocate(atm%neststruct%wt_u(isd:ied, jsd:jed+1,4)) ; atm%neststruct%wt_u=
real_snan 1707 allocate(atm%neststruct%wt_v(isd:ied+1, jsd:jed, 4)) ; atm%neststruct%wt_v=
real_snan 1708 allocate(atm%neststruct%ind_b(isd:ied+1,jsd:jed+1,4)) ; atm%neststruct%ind_b=
i4_in 1709 allocate(atm%neststruct%wt_b(isd:ied+1, jsd:jed+1,4)) ; atm%neststruct%wt_b=
real_snan 1711 ns = atm%neststruct%nsponge
1721 allocate(atm%neststruct%q_BC(ncnst))
1736 if (.not.atm%flagstruct%hydrostatic)
then 1743 if (atm%neststruct%twowaynest)
allocate(&
1744 atm%neststruct%ind_update_h( &
1745 atm%parent_grid%bd%isd:atm%parent_grid%bd%ied+1, &
1746 atm%parent_grid%bd%jsd:atm%parent_grid%bd%jed+1,2)); atm%neststruct%ind_update_h=
i4_in 1751 if( ngrids_in > 1 )
then 1752 if (atm%flagstruct%grid_type < 4)
then 1753 if (atm%neststruct%nested)
then 1754 allocate(atm%grid_global(1-ng_2d:npx_2d +ng_2d,1-ng_2d:npy_2d +ng_2d,2,1)); atm%grid_global=
real_snan 1756 allocate(atm%grid_global(1-ng_2d:npx_2d +ng_2d,1-ng_2d:npy_2d +ng_2d,2,1:6)); atm%grid_global=
real_snan 1763 atm%allocated = .true.
1764 if (dummy) atm%dummy = .true.
1776 if (.not.atm%allocated)
return 1778 deallocate ( atm%u )
1779 deallocate ( atm%v )
1780 deallocate ( atm%pt )
1781 deallocate ( atm%delp )
1782 deallocate ( atm%q )
1783 deallocate ( atm%qdiag )
1784 deallocate ( atm%ps )
1785 deallocate ( atm%pe )
1786 deallocate ( atm%pk )
1787 deallocate ( atm%peln )
1788 deallocate ( atm%pkz )
1789 deallocate ( atm%phis )
1790 deallocate ( atm%omga )
1791 deallocate ( atm%ua )
1792 deallocate ( atm%va )
1793 deallocate ( atm%uc )
1794 deallocate ( atm%vc )
1795 deallocate ( atm%mfx )
1796 deallocate ( atm%mfy )
1797 deallocate ( atm%cx )
1798 deallocate ( atm%cy )
1799 deallocate ( atm%ak )
1800 deallocate ( atm%bk )
1802 deallocate ( atm%u_srf )
1803 deallocate ( atm%v_srf )
1804 if( atm%flagstruct%fv_land )
deallocate ( atm%sgh )
1805 deallocate ( atm%oro )
1807 deallocate ( atm%w )
1808 deallocate ( atm%delz )
1809 deallocate ( atm%ze0 )
1810 deallocate ( atm%q_con )
1812 deallocate ( atm%gridstruct% area )
1813 deallocate ( atm%gridstruct%rarea )
1815 deallocate ( atm%gridstruct% area_c )
1816 deallocate ( atm%gridstruct%rarea_c )
1818 deallocate ( atm%gridstruct% dx )
1819 deallocate ( atm%gridstruct%rdx )
1820 deallocate ( atm%gridstruct% dy )
1821 deallocate ( atm%gridstruct%rdy )
1823 deallocate ( atm%gridstruct% dxc )
1824 deallocate ( atm%gridstruct%rdxc )
1825 deallocate ( atm%gridstruct% dyc )
1826 deallocate ( atm%gridstruct%rdyc )
1828 deallocate ( atm%gridstruct% dxa )
1829 deallocate ( atm%gridstruct%rdxa )
1830 deallocate ( atm%gridstruct% dya )
1831 deallocate ( atm%gridstruct%rdya )
1833 deallocate ( atm%gridstruct%grid )
1834 deallocate ( atm%gridstruct%agrid )
1835 deallocate ( atm%gridstruct%sina )
1836 deallocate ( atm%gridstruct%cosa )
1838 deallocate ( atm%gridstruct% e1 )
1839 deallocate ( atm%gridstruct% e2 )
1844 deallocate (atm%gridstruct%iinta, &
1845 atm%gridstruct%jinta, &
1846 atm%gridstruct%iintb, &
1847 atm%gridstruct%jintb )
1849 deallocate ( atm%gridstruct%edge_s )
1850 deallocate ( atm%gridstruct%edge_n )
1851 deallocate ( atm%gridstruct%edge_w )
1852 deallocate ( atm%gridstruct%edge_e )
1854 deallocate ( atm%gridstruct%edge_vect_s )
1855 deallocate ( atm%gridstruct%edge_vect_n )
1856 deallocate ( atm%gridstruct%edge_vect_w )
1857 deallocate ( atm%gridstruct%edge_vect_e )
1859 deallocate ( atm%gridstruct%ex_s )
1860 deallocate ( atm%gridstruct%ex_n )
1861 deallocate ( atm%gridstruct%ex_w )
1862 deallocate ( atm%gridstruct%ex_e )
1865 deallocate ( atm%gridstruct%l2c_u )
1866 deallocate ( atm%gridstruct%l2c_v )
1868 deallocate ( atm%gridstruct%divg_u )
1869 deallocate ( atm%gridstruct%divg_v )
1872 deallocate ( atm%gridstruct%z11 )
1873 deallocate ( atm%gridstruct%z12 )
1874 deallocate ( atm%gridstruct%z21 )
1875 deallocate ( atm%gridstruct%z22 )
1877 deallocate ( atm%gridstruct%a11 )
1878 deallocate ( atm%gridstruct%a12 )
1879 deallocate ( atm%gridstruct%a21 )
1880 deallocate ( atm%gridstruct%a22 )
1881 deallocate ( atm%gridstruct%vlon )
1882 deallocate ( atm%gridstruct%vlat )
1884 deallocate ( atm%gridstruct%f0 )
1885 deallocate ( atm%gridstruct%fC )
1888 deallocate( atm%gridstruct%ee1 )
1889 deallocate( atm%gridstruct%ee2 )
1892 deallocate( atm%gridstruct%ec1 )
1893 deallocate( atm%gridstruct%ec2 )
1896 deallocate( atm%gridstruct%ew )
1897 deallocate( atm%gridstruct%es )
1900 deallocate( atm%gridstruct%en1 )
1901 deallocate( atm%gridstruct%en2 )
1903 deallocate ( atm%gridstruct%cosa_u )
1904 deallocate ( atm%gridstruct%sina_u )
1905 deallocate ( atm%gridstruct%rsin_u )
1907 deallocate ( atm%gridstruct%cosa_v )
1908 deallocate ( atm%gridstruct%sina_v )
1909 deallocate ( atm%gridstruct%rsin_v )
1911 deallocate ( atm%gridstruct%cosa_s )
1913 deallocate ( atm%gridstruct%rsin2 )
1924 deallocate ( atm%gridstruct%cos_sg )
1925 deallocate ( atm%gridstruct%sin_sg )
1927 deallocate( atm%gridstruct%eww )
1928 deallocate( atm%gridstruct%ess )
1930 if (atm%neststruct%nested)
then 1931 deallocate(atm%neststruct%ind_h)
1932 deallocate(atm%neststruct%ind_u)
1933 deallocate(atm%neststruct%ind_v)
1935 deallocate(atm%neststruct%wt_h)
1936 deallocate(atm%neststruct%wt_u)
1937 deallocate(atm%neststruct%wt_v)
1939 deallocate(atm%neststruct%ind_b)
1940 deallocate(atm%neststruct%wt_b)
1949 if (
allocated(atm%neststruct%q_BC))
then 1950 do n=1,
size(atm%neststruct%q_BC)
1963 if (.not.atm%flagstruct%hydrostatic)
then 1970 if (atm%neststruct%twowaynest)
deallocate(atm%neststruct%ind_update_h)
1974 if (atm%flagstruct%grid_type < 4)
then 1975 if(
allocated(atm%grid_global))
deallocate(atm%grid_global)
1978 atm%allocated = .false.
1987 integer,
intent(IN) :: ns, istag, jstag
1988 logical,
intent(IN) :: dummy
1990 integer :: is, ie, js, je, isd, ied, jsd, jed, npx, npy, npz, ng
1992 if (bc%allocated)
return 2010 call allocate_fv_nest_bc_type_3d(bc,is,ie,js,je,isd,ied,jsd,jed,npx,npy,npz,ng,ns,istag,jstag,dummy)
2015 subroutine allocate_fv_nest_bc_type_3d(BC,is,ie,js,je,isd,ied,jsd,jed,npx,npy,npz,ng,ns,istag,jstag,dummy)
2018 integer,
intent(IN) :: ns, istag, jstag
2019 logical,
intent(IN) :: dummy
2021 integer,
intent(IN) :: is, ie, js, je, isd, ied, jsd, jed, npx, npy, npz, ng
2023 if (bc%allocated)
return 2026 if (ie == npx-1 .and. .not. dummy)
then 2027 allocate(bc%east_t1(ie+1-ns+istag:ied+istag,jsd:jed+jstag,npz))
2028 allocate(bc%east_t0(ie+1-ns+istag:ied+istag,jsd:jed+jstag,npz))
2031 do i=ie+1-ns+istag,ied+istag
2032 bc%east_t1(i,j,k) = 0.
2033 bc%east_t0(i,j,k) = 0.
2038 allocate(bc%east_t1(1,1,npz))
2039 allocate(bc%east_t0(1,1,npz))
2042 if (js == 1 .and. .not. dummy)
then 2043 allocate(bc%south_t1(isd:ied+istag,jsd:js-1+ns,npz))
2044 allocate(bc%south_t0(isd:ied+istag,jsd:js-1+ns,npz))
2048 bc%south_t1(i,j,k) = 0.
2049 bc%south_t0(i,j,k) = 0.
2054 allocate(bc%south_t1(1,1,npz))
2055 allocate(bc%south_t0(1,1,npz))
2058 if (is == 1 .and. .not. dummy)
then 2059 allocate(bc%west_t1(isd:is-1+ns,jsd:jed+jstag,npz))
2060 allocate(bc%west_t0(isd:is-1+ns,jsd:jed+jstag,npz))
2064 bc%west_t1(i,j,k) = 0.
2065 bc%west_t0(i,j,k) = 0.
2070 allocate(bc%west_t1(1,1,npz))
2071 allocate(bc%west_t0(1,1,npz))
2074 if (je == npy-1 .and. .not. dummy)
then 2075 allocate(bc%north_t1(isd:ied+istag,je+1-ns+jstag:jed+jstag,npz))
2076 allocate(bc%north_t0(isd:ied+istag,je+1-ns+jstag:jed+jstag,npz))
2078 do j=je+1-ns+jstag,jed+jstag
2080 bc%north_t1(i,j,k) = 0.
2081 bc%north_t0(i,j,k) = 0.
2086 allocate(bc%north_t1(1,1,npz))
2087 allocate(bc%north_t0(1,1,npz))
2090 bc%allocated = .true.
2098 if (.not. bc%allocated)
return 2100 deallocate(bc%north_t1)
2101 deallocate(bc%south_t1)
2102 deallocate(bc%west_t1)
2103 deallocate(bc%east_t1)
2105 if (
allocated(bc%north_t0))
then 2106 deallocate(bc%north_t0)
2107 deallocate(bc%south_t0)
2108 deallocate(bc%west_t0)
2109 deallocate(bc%east_t0)
2112 bc%allocated = .false.
subroutine allocate_fv_nest_bc_type_3d_atm(BC, Atm, ns, istag, jstag, dummy)
The type 'fv_grid_type' is made up of grid-dependent information from fv_grid_tools and fv_grid_utils...
real, parameter real_snan
integer, parameter max_step
integer, parameter, public r_grid
'allocate_fv_nest_BC_type' is an interface to subroutines that allocate the 'fv_nest_BC_type' structu...
'deallocate_fv_nest_BC_type' is an interface to a subroutine that deallocates the 'fv_nest_BC_type' s...
subroutine allocate_fv_nest_bc_type_3d(BC, is, ie, js, je, isd, ied, jsd, jed, npx, npy, npz, ng, ns, istag, jstag, dummy)
The module 'fv_arrays' contains the 'fv_atmos_type' and associated datatypes.
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 'allocate_fv_atmos_type' allocates the fv_atmos_type.
subroutine deallocate_fv_nest_bc_type_3d(BC)
subroutine deallocate_fv_atmos_type(Atm)
The subroutine 'deallocate_fv_atmos_type' deallocates the fv_atmos_type.