Skip to content

Commit f498f3f

Browse files
authored
Delete obsolete module_initialize_*.F files and modify z_scale (#526)
TYPE: enhancement KEYWORDS: ideal initialization z_scale calculation added SOURCE: internal DESCRIPTION OF CHANGES: The parameter z_scale was originally hardwired in each of the ideal initialization modules. This switch was used to stretch the vertical grid levels approximately with pressure when stretch_grid=.true. (internal switch). New code now replaces the hardwired value with a calculation so that stretching stays reasonable when ztop is changed. The calculation for zscale: z_scale = 8000/ztop where 8000 is a pressure scale height. To document these changes, modifications are made to both run/README.namelist and test/em_real/examples.namelist. This modification will alter results for some of the idealized cases (hill2d, grav2d, convrad) that use the original hardwired values associated with stretched_grid=.true. Old z_scale values are left in and commented out. LIST OF MODIFIED FILES: D dyn_em/module_initialize_b_wave.F D dyn_em/module_initialize_convrad.F D dyn_em/module_initialize_grav2d_x.F D dyn_em/module_initialize_hill2d_x.F M dyn_em/module_initialize_ideal.F D dyn_em/module_initialize_les.F D dyn_em/module_initialize_quarter_ss.F D dyn_em/module_initialize_seabreeze2d_x.F D dyn_em/module_initialize_squall2d_x.F D dyn_em/module_initialize_squall2d_y.F M run/README.namelist M test/em_real/examples.namelist M test/em_seabreeze2d_x/README.seabreeze TESTS CONDUCTED: WTF OK Ideal cases not run with new levels.
1 parent c64594e commit f498f3f

13 files changed

+29
-7846
lines changed

Diff for: dyn_em/module_initialize_b_wave.F

-962
This file was deleted.

Diff for: dyn_em/module_initialize_convrad.F

-827
This file was deleted.

Diff for: dyn_em/module_initialize_grav2d_x.F

-851
This file was deleted.

Diff for: dyn_em/module_initialize_hill2d_x.F

-896
This file was deleted.

Diff for: dyn_em/module_initialize_ideal.F

+16-14
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ SUBROUTINE init_domain_rk ( grid &
176176

177177
END SELECT
178178

179+
CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags )
180+
179181
ideal_constants: SELECT CASE ( model_config_rec%ideal_case )
180182
CASE ( hill2d_x )
181183
hm = 100.
@@ -193,8 +195,8 @@ SUBROUTINE init_domain_rk ( grid &
193195

194196
stretch_grid = .true.
195197
delt = 0.
196-
! z_scale = .50
197-
z_scale = .40
198+
! z_scale = .40
199+
z_scale = 8000./config_flags%ztop
198200
pi = 2.*asin(1.0)
199201
write(6,*) ' pi is ',pi
200202
nxc = (ide-ids)/2
@@ -204,8 +206,8 @@ SUBROUTINE init_domain_rk ( grid &
204206

205207
stretch_grid = .true.
206208
delt = 3.
207-
! z_scale = .50
208-
z_scale = .40
209+
! z_scale = .40
210+
z_scale = 8000./config_flags%ztop
209211
pi = 2.*asin(1.0)
210212
write(6,*) ' pi is ',pi
211213
nxc = (ide-ids)/2
@@ -214,8 +216,8 @@ SUBROUTINE init_domain_rk ( grid &
214216
CASE (grav2d_x)
215217

216218
stretch_grid = .true.
217-
! z_scale = .50
218-
z_scale = 1.675
219+
! z_scale = 1.675
220+
z_scale = 8000./config_flags%ztop
219221
pi = 2.*asin(1.0)
220222
write(6,*) ' pi is ',pi
221223
nxc = (ide-ids)/2
@@ -224,8 +226,8 @@ SUBROUTINE init_domain_rk ( grid &
224226
CASE (convrad)
225227
stretch_grid = .true.
226228
delt = 1.
227-
! z_scale = .50
228-
z_scale = .32
229+
! z_scale = .32
230+
z_scale = 8000./config_flags%ztop
229231
pi = 2.*asin(1.0)
230232
write(6,*) ' pi is ',pi
231233
nxc = (ide-ids)/2
@@ -245,7 +247,8 @@ SUBROUTINE init_domain_rk ( grid &
245247

246248
stretch_grid = .true.
247249
delt = 0.
248-
z_scale = .50
250+
! z_scale = .50
251+
z_scale = 8000./config_flags%ztop
249252
pi = 2.*asin(1.0)
250253
write(6,*) ' pi is ',pi
251254
nxc = (ide-ids)/4
@@ -255,8 +258,8 @@ SUBROUTINE init_domain_rk ( grid &
255258

256259
stretch_grid = .true.
257260
delt = 6.
258-
! z_scale = .50
259-
z_scale = .40
261+
! z_scale = .40
262+
z_scale = 8000./config_flags%ztop
260263
pi = 2.*asin(1.0)
261264
write(6,*) ' pi is ',pi
262265
nxc = (ide-ids)/2
@@ -270,8 +273,8 @@ SUBROUTINE init_domain_rk ( grid &
270273
! FOR LES, set stretch to false
271274
stretch_grid = .false.
272275
delt = 3.
273-
! z_scale = .50
274-
z_scale = .40
276+
! z_scale = .40
277+
z_scale = 8000./config_flags%ztop ! not used if stretch_grid = .false.
275278
pi = 2.*asin(1.0)
276279
write(6,*) ' pi is ',pi
277280
nxc = (ide-ids)/2
@@ -287,7 +290,6 @@ SUBROUTINE init_domain_rk ( grid &
287290

288291

289292

290-
CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags )
291293

292294
! here we check to see if the boundary conditions are set properly
293295

0 commit comments

Comments
 (0)