[Dart-dev] DART/branches Revision: 11101
dart at ucar.edu
dart at ucar.edu
Mon Feb 13 11:40:49 MST 2017
nancy at ucar.edu
2017-02-13 11:40:49 -0700 (Mon, 13 Feb 2017)
17
convert to RMA.
Modified: DART/branches/rma_single_file/models/lorenz_04/model_mod.f90
===================================================================
--- DART/branches/rma_single_file/models/lorenz_04/model_mod.f90 2017-02-13 18:29:58 UTC (rev 11100)
+++ DART/branches/rma_single_file/models/lorenz_04/model_mod.f90 2017-02-13 18:40:49 UTC (rev 11101)
@@ -6,16 +6,30 @@
module model_mod
-use types_mod, only : r8
-use time_manager_mod, only : time_type, set_time, get_time
-use location_mod, only : location_type, set_location, get_location, &
- LocationDims, LocationName, LocationLName, &
- get_close_maxdist_init, get_close_obs_init, get_close_obs
+use types_mod, only : r8, i8, i4
-use utilities_mod, only : register_module, error_handler, E_ERR, E_MSG, nmlfileunit, &
- do_output, find_namelist_in_file, check_namelist_read, &
- do_nml_file, do_nml_term
+use time_manager_mod, only : time_type, set_time
+use location_mod, only : location_type, set_location, get_location, &
+ LocationDims, LocationName, LocationLName, &
+ get_close_maxdist_init, get_close_obs_init, &
+ loc_get_close_obs => get_close_obs, get_close_type
+
+use utilities_mod, only : register_module, error_handler, E_ERR, E_MSG, nmlfileunit, &
+ do_output, find_namelist_in_file, check_namelist_read, &
+ do_nml_file, do_nml_term, nc_check
+
+use obs_kind_mod, only : RAW_STATE_VARIABLE
+
+use ensemble_manager_mod, only : ensemble_type
+
+use distributed_state_mod, only : get_state
+
+use state_structure_mod, only : add_domain
+
+use dart_time_io_mod, only : read_model_time, write_model_time
+
+
implicit none
private
@@ -31,7 +45,11 @@
nc_write_model_atts, &
nc_write_model_vars, &
nc_read_model_vars, &
- pert_model_state, &
+ pert_model_copies, &
+ read_model_time, &
+ write_model_time, &
+ query_vert_localization_coord, &
+ vert_convert, &
get_close_maxdist_init, get_close_obs_init, get_close_obs, ens_mean_for_model
! version controlled file description for error handling, do not edit
@@ -430,30 +448,28 @@
-subroutine model_interpolate(x, location, itype, obs_val, istatus)
+subroutine model_interpolate(state_handle, ens_size, location, itype, expected_val, istatus)
!------------------------------------------------------------------
!
-! Interpolates from state vector x to the location. It's not particularly
-! happy dumping all of this straight into the model. Eventually some
-! concept of a grid underlying models but above locations is going to
-! be more general. May want to wait on external infrastructure projects
-! for this?
+! Interpolates from state vector to the location.
! Argument itype is not used here because there is only one type of variable.
! Type is needed to allow swap consistency with more complex models.
-real(r8), intent(in) :: x(:)
+type(ensemble_type), intent(in) :: state_handle
+integer, intent(in) :: ens_size
type(location_type), intent(in) :: location
integer, intent(in) :: itype
-real(r8), intent(out) :: obs_val
-integer, intent(out) :: istatus
+real(r8), intent(out) :: expected_val(ens_size)
+integer, intent(out) :: istatus(ens_size)
-integer :: lower_index, upper_index, i
+integer(i8) :: lower_index, upper_index
+integer :: i
real(r8) :: lctn, lctnfrac
! All forward operators supported
-istatus = 0
+istatus(:) = 0
! Convert location to real
lctn = get_location(location)
@@ -466,12 +482,13 @@
if(upper_index > model_size) upper_index = upper_index - model_size
lctnfrac = lctn - int(lctn)
-obs_val = (1.0_r8 - lctnfrac) * x(lower_index) + lctnfrac * x(upper_index)
More information about the Dart-dev
mailing list