@@ -165,13 +165,8 @@ module model_mod
165
165
cell_next_to_boundary_edge
166
166
167
167
public :: update_u_from_reconstruct, &
168
- set_lbc_variables, &
169
- force_u_into_state, &
170
168
use_increments_for_u_update, &
171
- anl_domid, lbc_domid ! HK todo accessor functions?
172
-
173
- ! set_lbc_variables sets the lbc_variables string array
174
- ! force_u_into_state sets a logical add_u_to_state_list that forces u to be in state
169
+ anl_domid ! HK todo accessor functions?
175
170
176
171
character (len=* ), parameter :: source = ' models/mpas_atm/model_mod.f90'
177
172
@@ -231,7 +226,6 @@ module model_mod
231
226
logical :: search_initialized = .false.
232
227
233
228
integer :: anl_domid = - 1
234
- integer :: lbc_domid = - 1
235
229
236
230
!- -----------------------------------------------------------------------
237
231
! variables which are in the model_nml namelist
@@ -265,11 +259,6 @@ module model_mod
265
259
! assimilation, and use only the increments to update the edge winds
266
260
logical :: use_increments_for_u_update = .true.
267
261
268
- ! if set by: call force_u_into_state() *BEFORE* calling static_init_model(),
269
- ! the code will add U (edge normal winds) to the mpas state vector even if it
270
- ! isn't in the namelist.
271
- logical :: add_u_to_state_list = .false.
272
-
273
262
! if > 0, amount of distance in fractional model levels that a vertical
274
263
! point can be above or below the top or bottom of the grid and still be
275
264
! evaluated without error.
@@ -323,27 +312,9 @@ module model_mod
323
312
!- -----------------------------------------------------------------------
324
313
! for regional MPAS
325
314
real (r8 ) :: dxmax ! max distance between two adjacent cell centers in the mesh (in meters)
326
-
327
- ! when updating boundary files for regional mpas, note whether the boundary
328
- ! file has the reconstructed winds (lbc_ur, lbc_vr) or not. (this is set by
329
- ! looking at the bdy template file and seeing if those variables are there.)
330
- ! if not, the other two options are ignored.
331
- ! if they are in the lbc file, then the other logicals control whether to use
332
- ! them instead of updating the U edge winds directly, and whether to use the
333
- ! reconstructed increments or not.
334
- ! the latter two options could be added to the namelist if someone wanted to
335
- ! explore the options for how the edge winds are updated in the boundary file.
336
- ! for now they're not - they're hardcoded true.
337
- ! note that these are for the boundary file update only - there are separate
338
- ! options for how to update the U winds in the main assimilation state.
339
-
340
- logical :: lbc_file_has_reconstructed_winds = .false.
341
-
342
- ! this is special and not in the namelist. boundary files have a fixed
343
- ! set of variables with fixed names.
344
- character (len= vtablenamelength) :: lbc_variables(MAX_STATE_VARIABLES) = ' '
345
315
!- -----------------------------------------------------------------------
346
316
317
+
347
318
! Grid parameters - the values will be read from an mpas analysis file.
348
319
integer :: nCells = - 1 ! Total number of cells making up the grid
349
320
integer :: nVertices = - 1 ! Unique points in grid that are corners of cells
@@ -432,7 +403,7 @@ subroutine static_init_model()
432
403
integer :: iunit, io, ivar, i
433
404
integer :: ss, dd, z1, m1
434
405
integer :: nDimensions, nVariables, nAttributes, unlimitedDimID, TimeDimID
435
- integer :: nfields, lbc_nfields
406
+ integer :: nfields
436
407
logical :: both
437
408
real (r8 ) :: variable_bounds(MAX_STATE_VARIABLES, 2 )
438
409
integer :: variable_qtys(MAX_STATE_VARIABLES)
@@ -479,25 +450,6 @@ subroutine static_init_model()
479
450
480
451
model_size = get_domain_size(anl_domid)
481
452
482
- lbc_nfields = 0
483
-
484
- ! if we have a lateral boundary file, add it to the domain
485
- ! so we have access to the corresponding lbc_xxx fields.
486
- if (.not. global_grid .and. lbc_variables(1 ) /= ' ' ) then
487
- ! regional: count number of lbc fields to read in
488
- COUNTUP: do i= 1 , MAX_STATE_VARIABLES
489
- if (lbc_variables(i) /= ' ' ) then
490
- lbc_nfields = lbc_nfields + 1
491
- else
492
- exit COUNTUP
493
- endif
494
- enddo COUNTUP
495
- lbc_domid = add_domain(bdy_template_filename, lbc_nfields, &
496
- var_names = lbc_variables)
497
- ! FIXME clamp_vals = variable_bounds(1:nfields,:) )
498
- model_size = model_size + get_domain_size(lbc_domid)
499
- endif
500
-
501
453
! if you have at least one of these wind components in the state vector,
502
454
! you have to have them both. the subroutine will error out if only one
503
455
! is found and not both.
@@ -1402,57 +1354,6 @@ end subroutine get_close_state
1402
1354
! (these are not required by dart but are used by other programs)
1403
1355
! ==================================================================
1404
1356
1405
-
1406
- !- ------------------------------------------------------------------
1407
- ! modify what static_init_model does. this *must* be called before !HK Nope this is not good.
1408
- ! calling static_init_model().
1409
- ! the boundary file variables are fixed by the model and so we
1410
- ! don't allow the user to set them via namelist
1411
-
1412
- subroutine set_lbc_variables (template_filename )
1413
-
1414
- character (len=* ), intent (in ) :: template_filename
1415
-
1416
- integer :: ncid
1417
-
1418
- bdy_template_filename = template_filename
1419
-
1420
- ! this initial list always exists. hardcode them for now,
1421
- ! and query to see if the reconstructed winds are there or not.
1422
-
1423
- lbc_variables(1 ) = ' lbc_qc'
1424
- lbc_variables(2 ) = ' lbc_qr'
1425
- lbc_variables(3 ) = ' lbc_qv'
1426
- lbc_variables(4 ) = ' lbc_rho'
1427
- lbc_variables(5 ) = ' lbc_theta'
1428
- lbc_variables(6 ) = ' lbc_u'
1429
- lbc_variables(7 ) = ' lbc_w'
1430
-
1431
- ncid = nc_open_file_readonly(template_filename, ' set_lbc_variables' )
1432
- if (nc_variable_exists(ncid, ' lbc_ur' )) then
1433
- lbc_variables(8 ) = ' lbc_ur'
1434
- lbc_variables(9 ) = ' lbc_vr'
1435
- lbc_file_has_reconstructed_winds = .true.
1436
- endif
1437
- call nc_close_file(ncid)
1438
-
1439
- end subroutine set_lbc_variables
1440
-
1441
-
1442
- !- ------------------------------------------------------------------
1443
- ! modify what static_init_model does. this *must* be called before
1444
- ! calling static_init_model().
1445
- ! set a logical add_u_to_state_list that forces u to be in state
1446
-
1447
- subroutine force_u_into_state ()
1448
-
1449
- add_u_to_state_list = .true.
1450
-
1451
- end subroutine force_u_into_state
1452
-
1453
-
1454
- !- -----------------------------------------------------------------
1455
-
1456
1357
function get_analysis_time_ncid ( ncid , filename )
1457
1358
1458
1359
! The analysis netcdf files have the start time of the experiment.
@@ -1904,14 +1805,6 @@ subroutine verify_state_variables(ncid, filename, ngood, qty_list, variable_boun
1904
1805
call error_handler(E_MSG,' verify_state_variables' ,string1,source,text2= string2)
1905
1806
endif
1906
1807
1907
- ! if this flag is true and the user hasn't said U should be in the state,
1908
- ! add it to the list.
1909
- if (add_u_to_state_list .and. .not. u_already_in_list) then
1910
- ngood = ngood + 1
1911
- variable_table(ngood,1 ) = " u"
1912
- variable_table(ngood,2 ) = " QTY_EDGE_NORMAL_SPEED"
1913
- endif
1914
-
1915
1808
end subroutine verify_state_variables
1916
1809
1917
1810
0 commit comments