[Dart-dev] DART/branches Revision: 12995

dart at ucar.edu dart at ucar.edu
Mon Mar 4 10:56:23 MST 2019


nancy at ucar.edu
2019-03-04 10:56:23 -0700 (Mon, 04 Mar 2019)
44
add additional comments.  no code changes.




Modified: DART/branches/recam/assimilation_code/programs/obs_utils/obs_remove_dups.f90
===================================================================
--- DART/branches/recam/assimilation_code/programs/obs_utils/obs_remove_dups.f90	2019-03-01 22:54:48 UTC (rev 12994)
+++ DART/branches/recam/assimilation_code/programs/obs_utils/obs_remove_dups.f90	2019-03-04 17:56:23 UTC (rev 12995)
@@ -4,17 +4,25 @@
 !
 ! $Id$
 
-!> Utility to try to sort observations at the same time into a
-!> consistent order.  Obs sequence files are guarenteed to be
-!> traversed in time order, so running them through the standard
-!> obs_sequence_tool will physically order them in the file in
-!> the same way a linked-list traversal would.  But for multiple
-!> obs at the same time, there is no way to indicate how to order
-!> them relative to each other.  This tool tries to sort same-time
-!> obs based on location, then kind, then variance.  If there are
-!> duplicate obs in the same file, this might be a way to get them
-!> together, and possibly add code to remove them.
+!> This file contains 1 module and 1 program.  the module code has
+!> to come first, so page down for the main program. 
+!> The module is a custom sort routine needed to compare 2 observations, 
+!> and then the program uses the sort to match duplicate observations 
+!> in an obs_seq file.
 
+
+!> Module:
+!> Routine to sort observations at the same time into a consistent order.  
+!> Obs sequence files are guarenteed to be traversed in time order; 
+!> running them through the standard obs_sequence_tool will physically 
+!> order them in the file in the same way a linked-list traversal would.  
+!>
+!> But for multiple obs at the same time there is no way to indicate or
+!> control how to order them relative to each other.  This tool sorts 
+!> same-time obs based on location, then kind, then variance.  If there 
+!> are duplicate obs in the same file this helps get them together and
+!> pass through only one copy of the observation.
+
 module special_sort
 
 use        types_mod, only : r8
@@ -23,7 +31,7 @@
                              LocationName, read_location, operator(/=),        &
                              write_location, LocationDims
 use      obs_def_mod, only : obs_def_type, get_obs_def_time, get_obs_def_type_of_obs,     &
-                             get_obs_def_location, get_obs_def_error_variance
+                             get_obs_def_location, get_obs_def_error_variance, operator(==)
 use time_manager_mod, only : time_type, operator(/=), print_time
 use obs_sequence_mod, only : get_obs_def, obs_type
 
@@ -152,12 +160,13 @@
 
 !---------------------------------------------------------------------
 
+!> Program:
+!> simple program that opens an obs_seq file and loops over the obs
+!> and copies them to a new output file.   this is intended to be a
+!> template for programs that want to alter existing obs in some simple way.
+
 program obs_remove_dups
 
-! simple program that opens an obs_seq file and loops over the obs
-! and copies them to a new output file.   this is intended to be a
-! template for programs that want to alter existing obs in some simple way.
-
 use        types_mod, only : r8, missing_r8, metadatalength, obstypelength
 use    utilities_mod, only : register_module, initialize_utilities,            &
                              find_namelist_in_file, check_namelist_read,       &
@@ -168,8 +177,8 @@
 use     location_mod, only : location_type, get_location, set_location,        &
                              LocationName, read_location, operator(/=),        &
                              write_location
-use      obs_def_mod, only : obs_def_type, get_obs_def_time, get_obs_def_type_of_obs
-                             ! print_obs_def
+use      obs_def_mod, only : obs_def_type, get_obs_def_time, get_obs_def_type_of_obs, &
+                             operator(==) !, print_obs_def
 use     obs_kind_mod, only : max_defined_types_of_obs, get_name_for_type_of_obs
 use time_manager_mod, only : time_type, operator(>), print_time, set_time,     &
                              print_date, set_calendar_type, operator(==),      &
@@ -186,8 +195,7 @@
                              destroy_obs, destroy_obs_sequence,                &
                              get_num_key_range, get_obs_key, get_qc,           &
                              copy_partial_obs, get_next_obs_from_key,          &
-                             get_obs_def, set_obs_def, operator(==), operator(/=), &
-                             print_obs
+                             get_obs_def, set_obs_def, operator(==), operator(/=)
 
 use special_sort
 
@@ -209,8 +217,6 @@
 integer                 :: num_copies_in, num_qc_in
 integer                 :: num_inserted, iunit, io, i, j
 integer                 :: max_num_obs, file_id, sort_count, last_in
-integer                 :: num_rejected_badqc, num_rejected_diffqc
-integer                 :: num_rejected_other
 integer, allocatable    :: index(:)
 character(len = 129)    :: read_format
 logical                 :: pre_I_format, cal
@@ -339,9 +345,6 @@
 !       Must pass a copy of incoming obs to insert_obs_in_seq.
 !--------------------------------------------------------------
 num_inserted = 0


More information about the Dart-dev mailing list