[Dart-dev] DART/branches Revision: 11756

dart at ucar.edu dart at ucar.edu
Wed Jun 21 17:54:20 MDT 2017


thoar at ucar.edu
2017-06-21 17:54:17 -0600 (Wed, 21 Jun 2017)
340
Getting closer to matching the hdf5 variable names to the state vector construction.
Still a mismatch between the state.vars info, the variable names, and the stuff needed for add_domain().

The coamps_statevec_mod.f90 has a todo to this effect.

If you run this with perfect_model_obs, it will dump a table that illustrates the problem.





Modified: DART/branches/coamps/models/coamps_nest/coamps_statevar_mod.f90
===================================================================
--- DART/branches/coamps/models/coamps_nest/coamps_statevar_mod.f90	2017-06-21 20:58:42 UTC (rev 11755)
+++ DART/branches/coamps/models/coamps_nest/coamps_statevar_mod.f90	2017-06-21 23:54:17 UTC (rev 11756)
@@ -986,21 +986,26 @@
     subroutine dump_state_variable(var)
         type(state_variable), intent(in) :: var
 
-        write (*, '(A12,T15,A10)')   "VAR NAME:", trim(var%var_name)
-        write (*, '(A12,T15,I9.9,1x,I9.9)')   "STATE BNDRY:", var%state_begin, var%state_end
-        !write (*, '(A12,T15I8.8)') "DIM TYPE:", var%dim_type
-        !write (*, '(A12,T15I8.8)') "VAR RCRD:", var%var_record
-        write (*, '(A12,T15,I8.8)') "SGM RCRD:", var%sigma_record
-        write (*, '(A12,T15,F8.6)') "PTRB PCT:", var%pert_mag
-        write (*, '(A12,T15,I8.8)') "PTB TYPE:", var%pert_type
-        write (*, '(A12,T15,L1)')   "UPDATE??:", var%update_field
-        write (*, '(A12,T15,A32)')  "VAR TYPE:", get_name_for_quantity(var%var_kind)
-        write (*, '(A12,T15,I8.8)') "VAR NMBR:", var%var_kind
-        write (*, '(A12,T15,L1)')   "MASSLVL?:", var%mass_level
-        write (*, '(A12,T15,L1)')   "MEANFLD?:", var%mean_field
-        write (*, '(A12,T15,L1)')   "IS_2D_VAR?:", var%is_2d_variable
-        write (*, '(A12,T15,L1)')   "IO_FLAG?:", var%io_flag
-        !write (*, '(A12,T15,A1)')   "STAGGERING:", var%var_stagger
+        write (*, *) "VAR NAME    : ", trim(var%var_name)
+        write (*, *) "STATE BNDRY : ", var%state_begin, var%state_end
+        !write (*, *) "DIM TYPE    : ", var%dim_type
+        !write (*, *) "VAR RCRD    : ", var%var_record
+        write (*, *) "SGM RCRD    : ", var%sigma_record
+        write (*, *) "PTRB PCT    : ", var%pert_mag
+        write (*, *) "PTB TYPE    : ", var%pert_type
+        write (*, *) "UPDATE??    : ", var%update_field
+        write (*, *) "VAR TYPE    : ", get_name_for_quantity(var%var_kind)
+        write (*, *) "VAR NMBR    : ", var%var_kind
+        write (*, *) "MASSLVL?    : ", var%mass_level
+        write (*, *) "MEANFLD?    : ", var%mean_field
+        write (*, *) "IS_2D_VAR?  : ", var%is_2d_variable
+        write (*, *) "IO_FLAG?    : ", var%io_flag
+        !write (*, *) "STAGGERING  : ", var%var_stagger
+        write (*, *) "POS DEF?    : ", var%positive_definite
+        write (*, *) "nc_varid    : ", var%nc_varid
+        write (*, *) "vert_type   : ", var%vert_type
+        write (*, *) "vert_value  : ", var%vert_value
+        write (*, *) "nest_number : ", var%nest_number
         write (*, *) "-----------------------------------------"
 
     end subroutine dump_state_variable

Modified: DART/branches/coamps/models/coamps_nest/coamps_statevec_mod.f90
===================================================================
--- DART/branches/coamps/models/coamps_nest/coamps_statevec_mod.f90	2017-06-21 20:58:42 UTC (rev 11755)
+++ DART/branches/coamps/models/coamps_nest/coamps_statevec_mod.f90	2017-06-21 23:54:17 UTC (rev 11756)
@@ -361,7 +361,7 @@
     ! -----------------
     subroutine construct_domain_info(state, varnames, kindlist, clampvals, updatelist, nvars)
         type(state_vector), intent(in)  :: state
-        character(len=*),   intent(out) :: varnames(:)
+        character(len=*),   intent(in)  :: varnames(:)
         integer,            intent(out) :: kindlist(:)
         real(r8),           intent(out) :: clampvals(:,:)
         logical,            intent(out) :: updatelist(:)
@@ -373,40 +373,33 @@
 
         clampvals(:,:) = MISSING_R8
 
-        nvars = 1
+        nvars = 0
         iterator = get_iterator(state)    
         do while (has_next(iterator))
 
+            nvars = nvars + 1
             var = get_next(iterator)
 
-!>@todo generate_flat_file_name() has format to generate full variable name
-!>@todo generate_all_flat_file_name() has format to generate full variable name
-!>@todo coamps_statevar_mod.f90 set_var_stagger() has accessor use
-
-            varnames(  nvars) = get_var_name(var)
+!           varnames(  nvars) = get_var_name(var)
             kindlist(  nvars) = get_var_kind(var)
             updatelist(nvars) = gets_update( var)
             if (is_nonnegative(var)) clampvals(nvars,1) = 0.0_r8
 
-            nvars = nvars + 1
+    write(*,*)'construct_domain_info: ',nvars,'"'//trim(get_var_name(var))//'"'
 
         enddo
 
-!>@todo  dummy block to move past this ...
-        varnames(1) =  'uuwind_sig_028030_000010_1a0201x0201_2013011000_00000000_fcstfld'
-        varnames(2) =  'vvwind_sig_028030_000010_1a0201x0201_2013011000_00000000_fcstfld'
-        varnames(3) =  'slpres_msl_000000_000000_1a0201x0201_2013011000_00000000_analfld'
-        
-        kindlist(1) =  QTY_U_WIND_COMPONENT
-        kindlist(2) =  QTY_V_WIND_COMPONENT
-        kindlist(3) =  QTY_SURFACE_PRESSURE
+!>@todo somehow the THBM,EXBM,EXBW are part of the domain (they have iterators)
+! but they do not have 'filenames' aka variable names - generate_coamps_filenames()
+! does not create them.  Should they be part of the state?  The nvars here is 24,
+! the number of variable names is 18 ... matching up the variable name list and the
+! kind etc. from the get_*(var)  routines is now the problem.
+!>@todo the kindlist is not matching the variable list, for example


More information about the Dart-dev mailing list