[Dart-dev] DART/branches Revision: 11206

dart at ucar.edu dart at ucar.edu
Tue Mar 7 08:42:59 MST 2017


mizzi at ucar.edu
2017-03-07 08:42:56 -0700 (Tue, 07 Mar 2017)
118
Updates related to the add_emiss switch.  The model_mod modifications were problematic but now appear to be working.




Modified: DART/branches/mizzi/models/wrf_chem/WRF_DART_utilities/dart_to_wrf.f90
===================================================================
--- DART/branches/mizzi/models/wrf_chem/WRF_DART_utilities/dart_to_wrf.f90	2017-03-07 03:05:35 UTC (rev 11205)
+++ DART/branches/mizzi/models/wrf_chem/WRF_DART_utilities/dart_to_wrf.f90	2017-03-07 15:42:56 UTC (rev 11206)
@@ -42,7 +42,7 @@
 character(len=72)  :: adv_mod_command   = './wrf.exe'
 !
 ! LXL/APM +++
-logical            :: add_emiss = .true.
+logical            :: add_emiss = .false.
 
 namelist /dart_to_wrf_nml/ model_advance_file, dart_restart_name, &
                            adv_mod_command, print_data_ranges, debug, add_emiss
@@ -62,7 +62,7 @@
 type(time_type)   :: dart_time(2)
 integer           :: number_dart_values, num_domains, ndays, &
                      year, month, day, hour, minute, second
-integer           :: ind, dart_ind, my_index, io
+integer           :: ind, ind_lim, dart_ind, my_index, io
 ! APM: +++
 integer            :: ii,jj,kk
 ! APM: ---
@@ -202,9 +202,18 @@
                      'dart_to_wrf', 'open wrffirechemi_d' // idom )
    endif
 ! LXL/APM ---
-!  
-   do ind = 1,wrf%number_of_wrf_variables
+!
+! APM: +++
+   if(add_emiss) then
+      ind_lim = wrf%number_of_conv_variables + wrf%number_of_emiss_chemi_variables + &
+      wrf%number_of_emiss_firechemi_variables 
+   else  
+      ind_lim = wrf%number_of_conv_variables
+   endif
 
+   do ind = 1, ind_lim
+! APM: ---
+!
       if (debug) print*, ' ' 
 
       ! actual location in state variable table
@@ -221,14 +230,14 @@
 !
 ! LXL/APM +++
       ! read wrfinput or wrfchemi
-      if ( ind .le. wrf%number_of_conc_variables ) then
+      if ( ind .le. wrf%number_of_conv_variables ) then
          ncid_f = ncid
          if (debug) print*, ' read from wrfinput: ncid_f = ncid'
-      else if ( add_emiss .and.  ind .gt. wrf%number_of_conc_variables .and. ind .le. &
-      wrf%number_of_conc_variables + wrf%number_of_emiss_chemi_variables ) then
+      else if ( add_emiss .and.  ind .gt. wrf%number_of_conv_variables .and. ind .le. &
+      wrf%number_of_conv_variables + wrf%number_of_emiss_chemi_variables ) then
          ncid_f = ncid_emiss_chemi
          if (debug) print*, ' read from wrfchemi: ncid_f = ncid_emiss_chemi'
-      else if ( add_emiss .and.  ind .gt. wrf%number_of_conc_variables + &
+      else if ( add_emiss .and.  ind .gt. wrf%number_of_conv_variables + &
          wrf%number_of_emiss_chemi_variables ) then
          ncid_f = ncid_emiss_firechemi
          if (debug) print*, ' read from wrffirechemi: ncid_f = ncid_emiss_firechemi'
@@ -240,7 +249,6 @@
                      'inq_var_id ' // wrf_state_variables(1,my_index))
 ! LXL/APM ---
 !
-
       if (  wrf%var_size(3,ind) == 1 ) then
 
          if ( debug ) then

Modified: DART/branches/mizzi/models/wrf_chem/WRF_DART_utilities/wrf_to_dart.f90
===================================================================
--- DART/branches/mizzi/models/wrf_chem/WRF_DART_utilities/wrf_to_dart.f90	2017-03-07 03:05:35 UTC (rev 11205)
+++ DART/branches/mizzi/models/wrf_chem/WRF_DART_utilities/wrf_to_dart.f90	2017-03-07 15:42:56 UTC (rev 11206)
@@ -49,7 +49,7 @@
 ! APM: +++
 integer            :: ii,jj,kk
 ! APM: ---
-integer            :: i, ivtype, ind, dart_ind, my_index, io
+integer            :: i, ivtype, ind, ind_lim, dart_ind, my_index, io
 character(len=80)  :: varname
 character(len=19)  :: timestring
 character(len=2)   :: idom
@@ -76,7 +76,7 @@
 
 !
 ! LXL/APM +++
-logical :: add_emiss = .true.
+logical :: add_emiss = .false.
 
 namelist /wrf_to_dart_nml/  &
     dart_restart_name, print_data_ranges, debug, add_emiss
@@ -158,10 +158,17 @@
       call nc_check( nf90_open('wrffirechemi_d' // idom, NF90_NOWRITE, ncid_emiss_firechemi(id)), &
                      'wrf_to_dart', 'open wrffirechemi_d' // idom )
    endif
+!
+   if(add_emiss) then
+      ind_lim = wrf%number_of_conv_variables + wrf%number_of_emiss_chemi_variables + &
+      wrf%number_of_emiss_firechemi_variables 


More information about the Dart-dev mailing list