[Dart-dev] [10379] DART/trunk/models/wrf/model_mod.f90: wrf structure variables should be accessed by the local

nancy at ucar.edu nancy at ucar.edu
Wed Jun 15 10:22:33 MDT 2016


Revision: 10379
Author:   hendric
Date:     2016-06-15 10:22:33 -0600 (Wed, 15 Jun 2016)
Log Message:
-----------
wrf structure variables should be accessed by the local
index not my_index which only has relavance for the
wrf_state_variables table.

Modified Paths:
--------------
    DART/trunk/models/wrf/model_mod.f90

-------------- next part --------------
Modified: DART/trunk/models/wrf/model_mod.f90
===================================================================
--- DART/trunk/models/wrf/model_mod.f90	2016-06-15 16:15:29 UTC (rev 10378)
+++ DART/trunk/models/wrf/model_mod.f90	2016-06-15 16:22:33 UTC (rev 10379)
@@ -4633,11 +4633,11 @@
          ! vertical dimension can be stag, unstag, or staggered soil
          ! need to use if/then/else instead of select because testing
          ! is against variables
-         if ( wrf%dom(id)%var_size(3,my_index) == wrf%dom(id)%bts ) then
+         if ( wrf%dom(id)%var_size(3,ind) == wrf%dom(id)%bts ) then
            dimids_3D(3)=btStagDimID(id)
-         elseif ( wrf%dom(id)%var_size(3,my_index) == wrf%dom(id)%bt ) then
+         elseif ( wrf%dom(id)%var_size(3,ind) == wrf%dom(id)%bt ) then
            dimids_3D(3)=btDimID(id)
-         elseif ( wrf%dom(id)%var_size(3,my_index) == wrf%dom(id)%sls ) then
+         elseif ( wrf%dom(id)%var_size(3,ind) == wrf%dom(id)%sls ) then
            dimids_3D(3)=slSDimID(id)
          else
            write(errstring,*)'Could not determine dim_id for vertical dimension to output variable '//varname
@@ -4673,22 +4673,22 @@
 
       endif ! 3D or 2D
 
-      unitsval = trim(wrf%dom(id)%units(my_index))
+      unitsval = trim(wrf%dom(id)%units(ind))
 
       call nc_check(nf90_put_att(ncFileID, var_id, "units", trim(unitsval)), &
                  'nc_write_model_atts','put_att '//varname//' units')
 
-      descriptionval = trim(wrf%dom(id)%description(my_index))
+      descriptionval = trim(wrf%dom(id)%description(ind))
 
       call nc_check(nf90_put_att(ncFileID, var_id, "description", trim(descriptionval)), &
                  'nc_write_model_atts','put_att '//varname//' description')
 
-      long_nameval = trim(wrf%dom(id)%description(my_index))
+      long_nameval = trim(wrf%dom(id)%description(ind))
 
       call nc_check(nf90_put_att(ncFileID, var_id, "long_name", trim(long_nameval)), &
                  'nc_write_model_atts','put_att '//varname//' long_name')
 
-      coordinatesval = trim(wrf%dom(id)%coordinates(my_index))
+      coordinatesval = trim(wrf%dom(id)%coordinates(ind))
       if (coordinatesval(1:7) .eq. 'XLONG_U') then
         coordinate_char = "XLONG_U_d0"//idom//" XLAT_U_d0"//idom
       else if (coordinatesval(1:7) .eq. 'XLONG_V') then


More information about the Dart-dev mailing list