[Dart-dev] DART/branches Revision: 11320

dart at ucar.edu dart at ucar.edu
Tue Mar 14 16:21:52 MDT 2017


nancy at ucar.edu
2017-03-14 16:21:51 -0600 (Tue, 14 Mar 2017)
907
for the io modules, set the calendar type back
to 'no_calendar' instead of 'none'.  ncview complains
about 'none' as the calendar type, even though it is
documented on the CF conventions page and looks like
the closest to what we need to use.

put the obs_impact code into assim_tools_mod and
add calls to the timing routines using the code in
mpi_utilities instead of calling MPI_WTIME() directly.
there is a null_mpi_utilities version which will use
the system clock if not compiling with mpi.  the controls
for the timing routines are local variables in the routine.

call get_close_state_init() and get_close_state() from
assim_tools.  there are bypass routines in assim_model
so for today we don't have to put them into every model_mod.
we need to sort out the model_mod interfaces asap so people
don't have to convert their code more than once.

but this compiles, and runs the 2 domain wrf test ok.




Modified: DART/branches/rma_trunk/assimilation_code/modules/assimilation/assim_model_mod.f90
===================================================================
--- DART/branches/rma_trunk/assimilation_code/modules/assimilation/assim_model_mod.f90	2017-03-14 22:14:48 UTC (rev 11319)
+++ DART/branches/rma_trunk/assimilation_code/modules/assimilation/assim_model_mod.f90	2017-03-14 22:21:51 UTC (rev 11320)
@@ -20,11 +20,14 @@
 use     model_mod, only : get_model_size, static_init_model, get_state_meta_data,  &
                           get_model_time_step, init_conditions,                    &
                           init_time, adv_1step, end_model,                         &
-                          nc_write_model_vars,                                     &
-                          get_close_maxdist_init, get_close_obs_init,              &
-                          model_interpolate,                                       &
-                          get_close_obs, pert_model_copies
+                          nc_write_model_vars, pert_model_copies,                  &
+                          get_close_maxdist_init, model_interpolate,               &
+                          get_close_obs_init, get_close_obs,                       &
+                          get_close_state_init => get_close_obs_init,              &
+                          get_close_state => get_close_obs,                        &
+                          query_vert_localization_coord, vert_convert
 
+
 use ensemble_manager_mod, only : ensemble_type
 
 implicit none
@@ -38,16 +41,31 @@
           get_model_time, copy_assim_model, &
           end_assim_model, &
           assim_model_type, &
-          init_assim_model, &
           aget_closest_state_time_to,&
           get_model_time_step, &
           adv_1step, &
           aget_initial_condition, &
+          interpolate, &
           get_close_maxdist_init, &
-          get_close_obs_init, interpolate, &
+          get_close_obs_init, &
           get_close_obs, &
-          pert_model_copies
+          get_close_state_init, &
+          get_close_state, &
+          pert_model_copies, &
+          query_vert_localization_coord, &
+          vert_convert 
 
+!>@todo FIXME
+!> eventually i think we need two convert routines - one for state
+!> and one for obs.  they can default to the same routine, but many
+!> model_mods could do the conversions much more efficiently if they
+!> know they don't have to interpolate for state (e.g. they could use
+!> get_state_meta_data-like code.  we could also pass the state vector
+!> index as an argument, which could help speed things up.)
+!          convert_vert_obs, &
+!          convert_vert_state
+
+
 ! version controlled file description for error handling, do not edit
 character(len=256), parameter :: source   = &
    "$URL$"
@@ -79,6 +97,10 @@
 !======================================================================
 
 
+!>@todo FIXME i believe this routine is NOT being called anymore,
+!> because it would be allocating an entire state vector on each
+!> task, which large models cannot do anymore.  remove this routine?
+
 subroutine init_assim_model(state)
 !----------------------------------------------------------------------
 !
@@ -92,7 +114,9 @@
 ! Get the model_size from the model
 model_size = get_model_size()
 
-allocate(state%state_vector(model_size))
+!>@todo FIXME isn't this allocating a full state-vector size array
+!> on all tasks?  this can't work for the large models. 
+!allocate(state%state_vector(model_size))
 state%model_size = model_size
 
 end subroutine init_assim_model
@@ -296,6 +320,9 @@
 
 implicit none
 
+!>@todo FIXME if we allocate state, we have to free it here,
+!> which means this routine needs a state argument.
+!if (allocated(state%state_vector)) deallocate(state%state_vector)
 call end_model()
 
 end subroutine end_assim_model

Modified: DART/branches/rma_trunk/assimilation_code/modules/assimilation/assim_tools_mod.f90
===================================================================
--- DART/branches/rma_trunk/assimilation_code/modules/assimilation/assim_tools_mod.f90	2017-03-14 22:14:48 UTC (rev 11319)
+++ DART/branches/rma_trunk/assimilation_code/modules/assimilation/assim_tools_mod.f90	2017-03-14 22:21:51 UTC (rev 11320)
@@ -33,6 +33,8 @@
 
 use       reg_factor_mod, only : comp_reg_factor
 
+use       obs_impact_mod, only : allocate_impact_table, read_impact_table, free_impact_table
+


More information about the Dart-dev mailing list