[Dart-dev] DART/branches Revision: 12278

dart at ucar.edu dart at ucar.edu
Thu Jan 4 10:44:22 MST 2018


nancy at ucar.edu
2018-01-04 10:44:21 -0700 (Thu, 04 Jan 2018)
188
commit these to the recam branch for now.  if we migrate
them or some version of them to the rma_trunk, i'm sure
they will be modified.  but at least they're in subversion
somewhere now.




Added: DART/branches/recam/assimilation_code/programs/obs_assim_count/obs_assim_count.f90
===================================================================
--- DART/branches/recam/assimilation_code/programs/obs_assim_count/obs_assim_count.f90	                        (rev 0)
+++ DART/branches/recam/assimilation_code/programs/obs_assim_count/obs_assim_count.f90	2018-01-04 17:44:21 UTC (rev 12278)
@@ -0,0 +1,549 @@
+! DART software - Copyright 2004 - 2011 UCAR. This open source software is
+! provided by UCAR, "as is", without charge, subject to all terms of use at
+! http://www.image.ucar.edu/DAReS/DART/DART_download
+
+program obs_assim_count
+
+! you can get more info by running the obs_diag program, but this
+! prints out a quick table of obs types and counts, overall start and
+! stop times, and metadata strings and counts.
+
+! right now this program counts up the number of obs for each
+! possible 'DART quality control' value (0-7).  (it could also
+! check for a 'posterior ensemble mean' copy and count how
+! many are missing_r8 and how many are not.)   it does the
+! former right now.
+
+
+use        types_mod, only : r8, missing_r8, metadatalength, obstypelength
+use    utilities_mod, only : register_module, initialize_utilities,            &
+                             find_namelist_in_file, check_namelist_read,       &
+                             error_handler, E_ERR, E_MSG, nmlfileunit,         &
+                             do_nml_file, do_nml_term, get_next_filename,      &
+                             open_file, close_file, finalize_utilities,        &
+                             file_exist
+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,&
+                             get_obs_def_location, read_obs_def,               &
+                             set_obs_def_time
+use     obs_kind_mod, only : max_defined_types_of_obs, get_name_for_type_of_obs, &
+                             get_index_for_type_of_obs, read_type_of_obs_table
+use time_manager_mod, only : time_type, operator(>), print_time, set_time,     &
+                             print_date, set_calendar_type,                    &
+                             operator(/=), get_calendar_type, NO_CALENDAR,     &
+                             operator(-)
+use obs_sequence_mod, only : obs_sequence_type, obs_type, write_obs_seq,       &
+                             init_obs, assignment(=), get_obs_def,             &
+                             init_obs_sequence, static_init_obs_sequence,      &
+                             read_obs_seq_header, read_obs_seq, get_num_obs,   &
+                             get_first_obs, get_last_obs, get_next_obs,        &
+                             insert_obs_in_seq, get_num_copies, get_num_qc,    &
+                             get_copy_meta_data, get_qc_meta_data,             &
+                             set_copy_meta_data, set_qc_meta_data,             &
+                             destroy_obs, destroy_obs_sequence,                &
+                             delete_seq_head, delete_seq_tail,                 &
+                             get_num_key_range, get_obs_key, get_qc,           &
+                             copy_partial_obs, get_next_obs_from_key,          &
+                             get_obs_def, set_obs_def
+
+implicit none
+
+! version controlled file description for error handling, do not edit
+character(len=128), parameter :: &
+   source   = "$URL$", &
+   revision = "$Revision$", &
+   revdate  = "$Date$"
+
+type(obs_sequence_type) :: seq_in
+integer                 :: size_seq_in
+integer                 :: num_copies_in, num_qc_in
+integer                 :: iunit, io, ifile
+integer                 :: max_num_obs, file_id
+character(len = 129)    :: read_format, filename_in
+logical                 :: pre_I_format, cal
+character(len = 256)    :: msgstring, msgstring1, msgstring2
+
+! could go into namelist if you wanted more control
+integer, parameter      :: print_every = 5000
+
+! lazy, pick big number.  make it bigger if too small.
+integer, parameter :: max_obs_input_types = 500
+
+
+!----------------------------------------------------------------
+! Namelist input with default values
+
+
+character(len = 160) :: obs_sequence_name = ''
+character(len = 160) :: obs_sequence_list = ''
+
+character(len=32)    :: calendar    = 'Gregorian'
+
+
+namelist /obs_assim_count_nml/ &
+         obs_sequence_name, obs_sequence_list, calendar
+
+!----------------------------------------------------------------
+! Start of the program:
+!
+! Process each input observation sequence file in turn, optionally
+! selecting observations to insert into the output sequence file.
+!----------------------------------------------------------------
+
+call setup()
+


More information about the Dart-dev mailing list