[Dart-dev] [5286] DART/trunk/location/threed_sphere/location_mod.f90: If the user has selected vertical localization but both the vertical

nancy at ucar.edu nancy at ucar.edu
Wed Sep 28 16:48:24 MDT 2011


Revision: 5286
Author:   nancy
Date:     2011-09-28 16:48:24 -0600 (Wed, 28 Sep 2011)
Log Message:
-----------
If the user has selected vertical localization but both the vertical
units are VERTISSURFACE, do only a horizontal distance computation
because there is no normalization factor for surfaces.  without this
extra line of code the computation was using -1 as an index into
the normalization factors and picking up who knows what as a value.

Modified Paths:
--------------
    DART/trunk/location/threed_sphere/location_mod.f90

-------------- next part --------------
Modified: DART/trunk/location/threed_sphere/location_mod.f90
===================================================================
--- DART/trunk/location/threed_sphere/location_mod.f90	2011-09-28 16:13:20 UTC (rev 5285)
+++ DART/trunk/location/threed_sphere/location_mod.f90	2011-09-28 22:48:24 UTC (rev 5286)
@@ -326,8 +326,11 @@
 else 
    comp_h_only = horiz_dist_only
 endif
-! Finally, if which_vert has no vertical definition for either location do only horizontal
+
+! If which_vert has no vertical definition for either location do only horizontal
 if(loc1%which_vert == VERTISUNDEF .or. loc2%which_vert == VERTISUNDEF) comp_h_only = .true.
+! If both verts are surface, do only horizontal
+if(loc1%which_vert == VERTISSURFACE .and. loc2%which_vert == VERTISSURFACE) comp_h_only = .true.
 
 ! Add in vertical component if required
 if(.not. comp_h_only) then


More information about the Dart-dev mailing list