[Dart-dev] DART/branches Revision: 11190

dart at ucar.edu dart at ucar.edu
Fri Mar 3 16:09:31 MST 2017


thoar at ucar.edu
2017-03-03 16:09:31 -0700 (Fri, 03 Mar 2017)
140
Now consolidates the three namelist variables specifying variables to include in state
into the one traditional wrf_state_variables table.




Modified: DART/branches/mizzi/models/wrf_chem/model_mod.f90
===================================================================
--- DART/branches/mizzi/models/wrf_chem/model_mod.f90	2017-03-03 22:46:45 UTC (rev 11189)
+++ DART/branches/mizzi/models/wrf_chem/model_mod.f90	2017-03-03 23:09:31 UTC (rev 11190)
@@ -441,12 +441,18 @@
                   'Using predefined wrf variable list for dart state vector.', &
                    text2=msgstring2, text3=msgstring3)
 
+else
+  ! Consolidate all the input variable tables into one 'wrf_state_variables' table.
+  ! Since all the variables of interest are scoped module global, no arguments are needed.
+  call concatenate_variable_tables()
 endif
 
 if ( debug ) then
   print*,'WRF state vector table'
   print*,'default_state_variables = ',default_state_variables
-  print*,wrf_state_variables
+  do i = 1,size(wrf_state_variables,2)
+     print*,'variable ',i,' ',trim(wrf_state_variables(1,i)),' ',trim(wrf_state_variables(2,i))
+  enddo
 endif
 
 !---------------------------
@@ -8588,6 +8594,39 @@
 !--------------------------------------------
 !--------------------------------------------
 
+subroutine concatenate_variable_tables( )
+
+integer :: iline,irow
+
+irow = 0
+
+CONV_LOOP : do iline = 1,max_state_variables
+   if (conv_state_variables(iline,1) == 'NULL') exit CONV_LOOP
+   irow = irow+1
+   wrf_state_variables(irow,:) = conv_state_variables(iline,:)    
+enddo CONV_LOOP
+
+if ( add_emiss ) then
+   CHEMI_LOOP : do iline = 1,max_state_variables
+      if (emiss_chemi_variables(iline,1) == 'NULL') exit CHEMI_LOOP
+      irow = irow+1
+      wrf_state_variables(irow,:) = emiss_chemi_variables(iline,:)    
+   enddo CHEMI_LOOP
+   
+   FIRE_LOOP : do iline = 1,max_state_variables
+      if (emiss_firechemi_variables(iline,1) == 'NULL') exit FIRE_LOOP
+      irow = irow+1
+      wrf_state_variables(irow,:) = emiss_firechemi_variables(iline,:)    
+   enddo FIRE_LOOP
+endif
+
+return
+
+end subroutine concatenate_variable_tables
+
+!--------------------------------------------
+!--------------------------------------------
+
 subroutine fill_dart_kinds_table(wrf_state_variables, in_state_vector)
 
 ! for each row in the kinds table, tick them off in an array


More information about the Dart-dev mailing list