[Dart-dev] [5825] DART/branches/development/obs_def/obs_def_tower_mod.f90: Should also handle regions that wrap the prime meridian.

nancy at ucar.edu nancy at ucar.edu
Tue Jul 31 11:39:52 MDT 2012


Revision: 5825
Author:   thoar
Date:     2012-07-31 11:39:51 -0600 (Tue, 31 Jul 2012)
Log Message:
-----------
Should also handle regions that wrap the prime meridian.
By handle, I mean geographically reject correctly.

Modified Paths:
--------------
    DART/branches/development/obs_def/obs_def_tower_mod.f90

-------------- next part --------------
Modified: DART/branches/development/obs_def/obs_def_tower_mod.f90
===================================================================
--- DART/branches/development/obs_def/obs_def_tower_mod.f90	2012-07-31 17:08:32 UTC (rev 5824)
+++ DART/branches/development/obs_def/obs_def_tower_mod.f90	2012-07-31 17:39:51 UTC (rev 5825)
@@ -78,7 +78,7 @@
 use    utilities_mod, only : register_module, E_ERR, E_MSG, error_handler, &
                              check_namelist_read, find_namelist_in_file,   &
                              nmlfileunit, do_output, do_nml_file, do_nml_term, &
-                             nc_check, file_exist
+                             nc_check, file_exist, is_longitude_between
 
 use typesizes
 use netcdf
@@ -365,7 +365,7 @@
 loc_lon  = loc(1)
 loc_lat  = loc(2)
 
-if ((loc_lon < edgeWest ) .or. (loc_lon > edgeEast )) return
+if ( .not. is_longitude_between(loc_lon, edgeWest, edgeEast, doradians=.FALSE.)) return
 if ((loc_lat < edgeSouth) .or. (loc_lat > edgeNorth)) return
 
 ! Now that we know the observation operator is possible, continue ...


More information about the Dart-dev mailing list