[Dart-dev] DART/branches Revision: 11935

dart at ucar.edu dart at ucar.edu
Thu Sep 14 15:38:04 MDT 2017


thoar at ucar.edu
2017-09-14 15:38:01 -0600 (Thu, 14 Sep 2017)
497
Converts an HDF5 file to a netCDF file give the list of variables in state.vars
Creates a netCDF file called 'dart_vector.nc'
model_mod:static_init_model() uses the add_domain() routine with 
'dart_vector.nc' as the hardcoded filename to use as a template to get
the variable sizes, etc.
pmo is dying when trying to create perfect_output.nc from scratch:
 create_and_open_state_output:  Creating output file perfect_output.nc
  ERROR in new_dimension
  NetCDF: Operation not allowed in data mode




Modified: DART/branches/coamps/models/coamps_nest/README
===================================================================
--- DART/branches/coamps/models/coamps_nest/README	2017-09-14 18:59:39 UTC (rev 11934)
+++ DART/branches/coamps/models/coamps_nest/README	2017-09-14 21:38:01 UTC (rev 11935)
@@ -18,9 +18,8 @@
 
 June 2017 ... updating to the rma_trunk ... 
 
-When Tim H. (me) asked if the 
-
-Sasa: 
+When Tim H. (me) asked if the hdf5 files contain three nuisance variables :
+'THBM','EXBM', and 'EXBW'  Sasa replied: 
  
 They certainly do not contain EXBM and EXBW.
 Here is the way forward (assuming we have variables on sigma levels for DART to operate on):
@@ -43,6 +42,7 @@
  
 sa#a
 
+
 Sasa: Here's the scoop:
  
 1) A shell script (shell_scripts/populate_state_vars.sh) will write the file state.vars
@@ -49,8 +49,21 @@
 2) It needs a template to run (EXPERIMENTS_EXAMPLE/state.dat
 3) To run it, simply change directory to EXPERIMENTS_EXAMPLE, change the number of levels to reflect the actual number of levels (40->60 and 41->61, I believe), and run the script ../../shell_scripts/populate_state_vars.sh state.dat true
 4) You should end up with state.vars file
- 
+
+
+Thu Sep 14 15:31:00 MDT 2017 $Revision$:
+ The problem I (Tim H) was having was with the DART add_domain() call, 
+it expects the variables to exist in the source file. They do not. 
+I spent a lot of time trying to work around the problem to no avail. 
+I resurrected the trans_coamps_to_dart.f90 and modified it to read 
+an HDF file, calculate the nuisance variables and write them to 
+a netCDF file.  There are two instances of the state_vector structure 
+- one for the DART state, and one for the entire COAMPS state.  The 
+coamps structure does not actually allocate any space for the state, 
+but does have the variable names we want - except for the nuisance variables.
+
 # <next few lines under version control, do not edit>
 # $URL$
 # $Revision$
 # $Date$
+

Modified: DART/branches/coamps/models/coamps_nest/coamps_statevec_mod.f90
===================================================================
--- DART/branches/coamps/models/coamps_nest/coamps_statevec_mod.f90	2017-09-14 18:59:39 UTC (rev 11934)
+++ DART/branches/coamps/models/coamps_nest/coamps_statevec_mod.f90	2017-09-14 21:38:01 UTC (rev 11935)
@@ -16,16 +16,17 @@
 
 module coamps_statevec_mod
 
-    use coamps_statevar_mod, only : state_variable, new_state_variable,    &
-                                    read_state_variable, set_position,     &
-                                    set_2d_flag, dump_state_variable,      &
-                                    set_var_stagger, set_hdf_name,         &
-                                    get_mean_flag, define_mean_var,        &
-                                    get_sigma_record, set_sigma_record,    &
-                                    get_mass_level_flag,                   &
-                                    operator(==), &
-                                    get_var_name, get_var_kind, &
-                                    gets_update, is_nonnegative
+    use coamps_statevar_mod, only : state_variable, new_state_variable, &
+                                    read_state_variable, set_position,  &
+                                    set_2d_flag, dump_state_variable,   &
+                                    set_var_stagger, set_hdf_name,      &
+                                    get_mean_flag, define_mean_var,     &
+                                    get_sigma_record, set_sigma_record, &
+                                    get_mass_level_flag,                &
+                                    operator(==),                       &
+                                    get_var_name, get_var_kind,         &
+                                    gets_update, is_nonnegative,        &
+                                    get_hdf_name, get_nest_number
 
     use coamps_domain_mod,   only : coamps_domain, get_domain_num_levels, &
                                     get_nest_count
@@ -366,55 +367,59 @@
         get_var_by_index => state%vars(index_in)
     end function get_var_by_index
 
-    ! construct_domain_info
-    ! -----------------
-    subroutine construct_domain_info(state, varnames, kindlist, clampvals, updatelist, nvars)
-        type(state_vector), intent(in)  :: state
-        character(len=*),   intent(out) :: varnames(:)
-        integer,            intent(out) :: kindlist(:)
-        real(r8),           intent(out) :: clampvals(:,:)
-        logical,            intent(out) :: updatelist(:)
-        integer,            intent(out) :: nvars
+!-------------------------------------------------------------------------------
+!> generates the component arrays needed for the DART add_domain() routine
+subroutine construct_domain_info(state, varnames, kindlist, clampvals, updatelist, nvars)
 
-        type(state_iterator) :: iterator
-        type(state_variable) :: var
-        integer :: varindex, ivar
-        character(len=*), parameter :: routine = 'construct_domain_info'


More information about the Dart-dev mailing list