[Dart-dev] DART/branches Revision: 12657

dart at ucar.edu dart at ucar.edu
Tue Jun 12 13:16:00 MDT 2018


thoar at ucar.edu
2018-06-12 13:16:00 -0600 (Tue, 12 Jun 2018)
65
After the umpteenth code review.
Ready to merge onto rma_trunk.




Modified: DART/branches/qc8/assimilation_code/programs/obs_diag/oned/obs_diag.f90
===================================================================
--- DART/branches/qc8/assimilation_code/programs/obs_diag/oned/obs_diag.f90	2018-06-12 19:10:29 UTC (rev 12656)
+++ DART/branches/qc8/assimilation_code/programs/obs_diag/oned/obs_diag.f90	2018-06-12 19:16:00 UTC (rev 12657)
@@ -21,7 +21,8 @@
 ! 'priorspred' should really be 'priorvar' since you have to accumulate variances
 ! the math is correct as it is, but the variable names don't make it easy ...
 
-use        types_mod, only : r4, r8, digits12, MISSING_R4, metadatalength
+use        types_mod, only : r4, r8, digits12, MISSING_R4, &
+                             metadatalength
 use obs_sequence_mod, only : read_obs_seq, obs_type, obs_sequence_type, get_first_obs, &
                              get_obs_from_key, get_obs_def, get_copy_meta_data, &
                              get_obs_time_range, get_time_range_keys, &
@@ -75,7 +76,7 @@
 type(obs_def_type)      :: obs_def
 type(location_type)     :: obs_loc
 
-character(len=stringlength), dimension(MaxTrusted) :: trusted_obsname = 'null'
+character(len=stringlength), dimension(MaxTrusted) :: trusted_list = 'null'
 
 ! Storage with fixed size for observation space diagnostics
 real(r8), dimension(1) :: prior_mean, posterior_mean, prior_spread, posterior_spread
@@ -82,7 +83,7 @@
 real(r8) :: pr_mean, po_mean ! same as above, without useless dimension
 real(r8) :: pr_sprd, po_sprd ! same as above, without useless dimension
 
-integer :: obs_copy_index, prior_mean_index, posterior_mean_index
+integer :: obs_index, prior_mean_index, posterior_mean_index
 integer :: prior_spread_index, posterior_spread_index
 integer :: flavor
 integer :: num_copies, num_qc, num_obs, max_num_obs, obs_seq_file_id
@@ -149,27 +150,18 @@
 integer, parameter, dimension(2) ::    good_poste_qcs = (/ 0, 1       /)
 integer :: numqcvals
 
-integer, parameter :: max_num_input_files = 50
+integer, parameter :: max_num_input_files = 100
 
-character(len=256) :: obs_filename
-
 !-----------------------------------------------------------------------
 ! Namelist with default values
 !
 character(len=256) :: obs_sequence_name(max_num_input_files) = ''
 character(len=256) :: obs_sequence_list = ''
-
-character(len=stringlength), dimension(MaxTrusted) :: trusted_obs = 'null'
-
-integer :: max_num_bins       = 9999 ! maximum number of temporal bins to consider
 integer :: bin_width_days     = -1   ! width of the assimilation bin - seconds
 integer :: bin_width_seconds  = -1   ! width of the assimilation bin - days
 integer :: init_skip_days     = 0
 integer :: init_skip_seconds  = 0
-logical :: verbose               = .false.
-logical :: outliers_in_histogram = .true.
-logical :: create_rank_histogram = .true.
-logical :: use_zero_error_obs    = .false.
+integer :: max_num_bins       = 9999 ! maximum number of temporal bins to consider
 
 ! index 1 == region 1 == [0.0, 1.0) i.e. Entire domain
 ! index 2 == region 2 == [0.0, 0.5)
@@ -178,10 +170,16 @@
 integer :: Nregions = MaxRegions
 real(r8), dimension(MaxRegions) :: lonlim1 = (/ 0.0_r8, 0.0_r8, 0.5_r8, -1.0_r8 /)
 real(r8), dimension(MaxRegions) :: lonlim2 = (/ 1.0_r8, 0.5_r8, 1.0_r8, -1.0_r8 /)
-
 character(len=6), dimension(MaxRegions) :: reg_names = &
                                    (/ 'whole ','yin   ','yang  ','bogus '/)
 
+character(len=stringlength), dimension(MaxTrusted) :: trusted_obs = 'null'
+
+logical :: verbose               = .false.
+logical :: outliers_in_histogram = .true.
+logical :: create_rank_histogram = .true.
+logical :: use_zero_error_obs    = .false.
+
 namelist /obs_diag_nml/ obs_sequence_name, obs_sequence_list,  &
                         bin_width_days, bin_width_seconds,     &
                         init_skip_days, init_skip_seconds, max_num_bins, &
@@ -193,6 +191,8 @@
 ! Variables used to accumulate the statistics.
 !-----------------------------------------------------------------------
 
+!>@todo must be a more clever way to relate the copy_names to the components
+
 integer, parameter :: Ncopies = 19
 character(len=stringlength), dimension(Ncopies) :: copy_names =                  &
    (/ 'Nposs      ', 'Nused      ',                                              &
@@ -259,12 +259,8 @@
 character(len=512) :: string1, string2, string3
 character(len=stringlength) :: obsname
 
-!-----------------------------------------------------------------------
-! Some variables to keep track of who's rejected why ...
-!-----------------------------------------------------------------------
+integer :: Nidentity = 0
 
-integer :: Nidentity  = 0   ! identity observations are not appropriate.
-
 !=======================================================================


More information about the Dart-dev mailing list