[Dart-dev] DART/branches Revision: 11987
dart at ucar.edu
dart at ucar.edu
Mon Oct 16 15:21:16 MDT 2017
nancy at ucar.edu
2017-10-16 15:21:12 -0600 (Mon, 16 Oct 2017)
61
bring the local particle filter code up to date.
sorry jon!
Modified: DART/branches/rma_trunk/assimilation_code/modules/assimilation/assim_tools_mod.pf.f90
===================================================================
--- DART/branches/rma_trunk/assimilation_code/modules/assimilation/assim_tools_mod.pf.f90 2017-10-16 15:47:53 UTC (rev 11986)
+++ DART/branches/rma_trunk/assimilation_code/modules/assimilation/assim_tools_mod.pf.f90 2017-10-16 21:21:12 UTC (rev 11987)
@@ -43,10 +43,12 @@
use sampling_error_correction_mod, only : get_sampling_error_table_size, &
read_sampling_error_correction
-use location_mod, only : location_type, get_close_type, get_close_obs_destroy, &
+use location_mod, only : location_type, get_close_type, query_location, &
operator(==), set_location_missing, write_location, &
- LocationDims, vert_is_surface, has_vertical_localization,&
- get_vert, set_vert, set_which_vert
+ LocationDims, is_vertical, vertical_localization_on, &
+ set_vertical, has_vertical_choice, get_close_init, &
+ get_vertical_localization_coord, get_close_destroy, &
+ set_vertical_localization_coord
use ensemble_manager_mod, only : ensemble_type, get_my_num_vars, get_my_vars, &
compute_copy_mean_var, get_var_owner_index, &
@@ -64,14 +66,10 @@
use time_manager_mod, only : time_type, get_time
-use assim_model_mod, only : get_state_meta_data, get_close_maxdist_init, &
- get_close_obs_init, get_close_state_init, &
- get_close_obs, get_close_state, &
- query_vert_localization_coord, vert_convert
+use assim_model_mod, only : get_state_meta_data, &
+ get_close_obs, get_close_state, &
+ convert_vertical_obs, convert_vertical_state
-!>@todo FIXME would like to separate vert_convert into these:
-! convert_vert_obs, convert_vert_state
-
use distributed_state_mod, only : create_mean_window, free_mean_window
use quality_control_mod, only : good_dart_qc, DARTQC_FAILED_VERT_CONVERT
@@ -100,6 +98,10 @@
logical :: close_obs_caching = .true.
real(r8), parameter :: small = epsilon(1.0_r8) ! threshold for avoiding NaNs/Inf
+! true if we have multiple vert choices and we're doing vertical localization
+! (make it a local variable so we don't keep making subroutine calls)
+logical :: is_doing_vertical_conversion = .false.
+
character(len = 255) :: msgstring, msgstring2, msgstring3
! Need to read in table for off-line based sampling correction and store it
@@ -165,6 +167,24 @@
character(len=256) :: obs_impact_filename = ''
logical :: allow_any_impact_values = .false.
+! These next two only affect models with multiple options
+! for vertical localization:
+!
+! "convert_state" is false by default; it depends on the model
+! what is faster - do the entire state up front and possibly
+! do unneeded work, or do the conversion during the assimilation
+! loop. we think this depends heavily on how much of the state
+! is going to be adjusted by the obs. for a global model
+! we think false may be better; for a regional model with
+! a lot of obs and full coverage true may be better.
+!
+! "convert_obs" is true by default; in general it seems to
+! be better for each task to convert the obs vertical before
+! going into the loop but again this depends on how many
+! obs per task and whether the mean is distributed or
+! replicated on each task.
+logical :: convert_all_state_verticals_first = .false.
+logical :: convert_all_obs_verticals_first = .true.
! Not in the namelist; this var disables the experimental
! linear and spherical case code in the adaptive localization
@@ -191,9 +211,10 @@
pf_kddm, frac_neff, pf_alpha, &
output_localization_diagnostics, localization_diagnostics_file, &
special_localization_obs_types, special_localization_cutoffs, &
- distribute_mean, close_obs_caching, &
- adjust_obs_impact, obs_impact_filename, &
- allow_any_impact_values, lanai_bitwise ! don't document these last two for now
+ distribute_mean, close_obs_caching, &
+ adjust_obs_impact, obs_impact_filename, allow_any_impact_values, &
+ convert_all_state_verticals_first, convert_all_obs_verticals_first, &
+ lanai_bitwise ! don't document this one -- only used for regression tests
!============================================================================
@@ -291,101 +312,11 @@
! we can't read the table here because we don't have access to the ens_size
endif
-! log what the user has selected via the namelist choices
-! E_MSG only prints from PE0 by default, but go ahead and only
-! construct the messages on PE0 as well.
-if (do_output()) then
+is_doing_vertical_conversion = (has_vertical_choice() .and. vertical_localization_on() .and. &
+ .not. lanai_bitwise)
- select case (filter_kind)
- case (1)
More information about the Dart-dev
mailing list