[Dart-dev] DART/branches Revision: 11895
dart at ucar.edu
dart at ucar.edu
Wed Aug 9 15:13:31 MDT 2017
thoar at ucar.edu
2017-08-09 15:13:28 -0600 (Wed, 09 Aug 2017)
59
Correct logic for the test if wrapping across longitudes.
Modified: DART/branches/quad_interp/models/utilities/quad_utils_mod.f90
===================================================================
--- DART/branches/quad_interp/models/utilities/quad_utils_mod.f90 2017-08-09 20:55:47 UTC (rev 11894)
+++ DART/branches/quad_interp/models/utilities/quad_utils_mod.f90 2017-08-09 21:13:28 UTC (rev 11895)
@@ -585,11 +585,14 @@
h%ii%min_lon = minval(h%ii%lons_2d)
h%ii%max_lon = maxval(h%ii%lons_2d)
h%ii%lon_width = h%ii%max_lon - h%ii%min_lon ! FIXME: wrap?
- if (h%ii%lon_width < 0 .and. h%opt%spans_lon_zero) then
- h%ii%lon_width = h%ii%lon_width + 360.0_r8
- else
- ! FIXME: error
- call error_handler(E_ERR,'init_irreg_interp','regional grid with bad longitudes', source, revision, revdate)
+
+ if (h%ii%lon_width < 0) then
+ if(h%opt%spans_lon_zero) then
+ h%ii%lon_width = h%ii%lon_width + 360.0_r8
+ else
+ write(*,*)'TJH lon check ',h%ii%min_lon, h%ii%max_lon, h%ii%lon_width, h%opt%spans_lon_zero
+ call error_handler(E_ERR,'init_irreg_interp','regional grid with bad longitudes', source, revision, revdate)
+ endif
endif
h%ii%min_lat = minval(h%ii%lats_2d)
More information about the Dart-dev
mailing list