[Dart-dev] [3851] DART/trunk: Uses a common 'metadatalength' constant so the True_State and Prior/Posterior

nancy at ucar.edu nancy at ucar.edu
Wed May 6 10:11:44 MDT 2009


An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/dart-dev/attachments/20090506/27fd2a58/attachment-0001.html 
-------------- next part --------------
Modified: DART/trunk/common/types_mod.f90
===================================================================
--- DART/trunk/common/types_mod.f90	2009-05-06 15:59:22 UTC (rev 3850)
+++ DART/trunk/common/types_mod.f90	2009-05-06 16:11:44 UTC (rev 3851)
@@ -20,6 +20,7 @@
 public :: SECPERDAY
 public :: t_kelvin, es_alpha, es_beta, es_gamma, gas_constant_v, gas_constant
 public :: L_over_Rv, ps0, earth_radius, gravity
+public :: metadatalength
 
 ! version controlled file description for error handling, do not edit
 character(len=128), parameter :: &
@@ -30,6 +31,12 @@
 SAVE
 
 !----------------------------------------------------------------------------
+! constants that need to be shared - really has nothing to do with types ...
+!----------------------------------------------------------------------------
+
+integer, parameter :: metadatalength = 64 ! 75 is max w/out wrapping in ncdump
+
+!----------------------------------------------------------------------------
 ! Attributes for variable kinds -- no need to rely on -r8 switch in compiler
 ! all real variables are 64bit, ditto for all integer variables.
 !----------------------------------------------------------------------------

Modified: DART/trunk/filter/filter.f90
===================================================================
--- DART/trunk/filter/filter.f90	2009-05-06 15:59:22 UTC (rev 3850)
+++ DART/trunk/filter/filter.f90	2009-05-06 16:11:44 UTC (rev 3851)
@@ -12,7 +12,7 @@
 ! $Date$
 
 !------------------------------------------------------------------------------
-use types_mod,            only : r8, missing_r8
+use types_mod,            only : r8, missing_r8, metadatalength
 use obs_sequence_mod,     only : read_obs_seq, obs_type, obs_sequence_type,                  &
                                  get_obs_from_key, set_copy_meta_data, get_copy_meta_data,   &
                                  get_obs_def, get_time_range_keys, set_obs_values, set_obs,  &
@@ -775,7 +775,7 @@
 ! The 4 is for ensemble mean and spread plus inflation mean and spread
 ! The Prior file contains the prior inflation mean and spread only
 ! Posterior file contains the posterior inflation mean and spread only
-character(len=129) :: state_meta(num_output_state_members + 4)
+character(len=metadatalength) :: state_meta(num_output_state_members + 4)
 integer :: i, ensemble_offset, num_state_copies, num_obs_copies
 
 

Modified: DART/trunk/perfect_model_obs/perfect_model_obs.f90
===================================================================
--- DART/trunk/perfect_model_obs/perfect_model_obs.f90	2009-05-06 15:59:22 UTC (rev 3850)
+++ DART/trunk/perfect_model_obs/perfect_model_obs.f90	2009-05-06 16:11:44 UTC (rev 3851)
@@ -13,7 +13,7 @@
 
 ! Program to build an obs_sequence file from simulated observations.
 
-use        types_mod,     only : r8
+use        types_mod,     only : r8, metadatalength
 use    utilities_mod,     only : initialize_utilities, register_module, error_handler, &
                                  find_namelist_in_file, check_namelist_read,           &
                                  E_ERR, E_MSG, E_DBG, nmlfileunit, timestamp
@@ -115,6 +115,7 @@
 real(r8)                :: true_obs(1), obs_value(1), qc(1)
 
 character(len=129)      :: copy_meta_data(2), qc_meta_data, obs_seq_read_format
+character(len=metadatalength) :: state_meta(1)
 
 logical                 :: assimilate_this_ob, evaluate_this_ob, pre_I_format
 logical                 :: all_gone
@@ -181,8 +182,9 @@
 ! Set up the ensemble storage and read in the restart file
 call perfect_read_restart(ens_handle, model_size)
 
+state_meta(1) = 'true state'
 ! Set up output of truth for state
-StateUnit = init_diag_output('True_State', 'true state from control', 1, (/'true state'/))
+StateUnit = init_diag_output('True_State', 'true state from control', 1, state_meta)
 
 ! Initialize a repeatable random sequence for perturbations
 call init_random_seq(random_seq)


More information about the Dart-dev mailing list