[Dart-dev] DART/branches Revision: 12427
dart at ucar.edu
dart at ucar.edu
Tue Mar 6 15:32:47 MST 2018
nancy at ucar.edu
2018-03-06 15:32:47 -0700 (Tue, 06 Mar 2018)
153
change 'time_step' to 'assimilation_time_step' to be clearer
and add some more comments about what you might want to add
to a namelist for a model_mod.
Modified: DART/branches/rma_netcdf_utils/models/template/model_mod.f90
===================================================================
--- DART/branches/rma_netcdf_utils/models/template/model_mod.f90 2018-03-06 22:17:08 UTC (rev 12426)
+++ DART/branches/rma_netcdf_utils/models/template/model_mod.f90 2018-03-06 22:32:47 UTC (rev 12427)
@@ -65,16 +65,23 @@
character(len=32 ), parameter :: revision = "$Revision$"
character(len=128), parameter :: revdate = "$Date$"
-! EXAMPLE: define model parameters here
-integer, parameter :: model_size = 3
-type(time_type) :: time_step
-type(location_type), allocatable :: state_loc(:)
-! EXAMPLE: perhaps a namelist here
-integer :: time_step_days = 0
-integer :: time_step_seconds = 3600
-namelist /model_nml/ time_step_days, time_step_seconds
+type(location_type), allocatable :: state_loc(:) ! state locations, compute once and store for speed
+type(time_type) :: assimilation_time_step
+
+
+! EXAMPLE: perhaps a namelist here for anything you want to/can set at runtime.
+! this is optional! only add things which can be changed at runtime.
+integer :: model_size = 3
+integer :: assimilation_time_step_days = 0
+integer :: assimilation_time_step_seconds = 3600
+
+! uncomment this, the namelist related items in the 'use utilities' section above,
+! and the namelist related items below in static_init_model() to enable the
+! run-time namelist settings.
+!namelist /model_nml/ model_size, assimilation_time_step_days, assimilation_time_step_seconds
+
contains
!------------------------------------------------------------------
@@ -117,8 +124,13 @@
!state_loc(i) = set_location(x_loc,y_loc,v_loc,v_type)
end do
-! The time_step in terms of a time type must also be initialized.
-time_step = set_time(time_step_seconds, time_step_days)
+! This time is both the minimum time you can ask the model to advance
+! (for models that can be advanced by filter) and it sets the assimilation
+! window. All observations within +/- 1/2 this interval from the current
+! model time will be assimilated. If this isn't settable at runtime
+! feel free to hardcode it and not add it to a namelist.
+assimilation_time_step = set_time(assimilation_time_step_seconds, &
+ assimilation_time_step_days)
! tell dart the size of the model
dom_id = add_domain(int(model_size,i8))
@@ -253,7 +265,7 @@
type(time_type) :: shortest_time_between_assimilations
-shortest_time_between_assimilations = time_step
+shortest_time_between_assimilations = assimilation_time_step
end function shortest_time_between_assimilations
More information about the Dart-dev
mailing list