problem with unstructured/conserve regrid

From: Richard G French <rfrench_at_nyahnyahspammersnyahnyah>
Date: Tue Jun 04 2013 - 08:19:16 MDT

Hi, everyone -

I'm having a problem getting an unstructured grid of lat/lon corners to
regrid properly using the "conserve" option.

I can get bilinear and patch regridding to work, but when I try "conserve",
I find that my regridded data array seems to have just one element in it.
The "conserve" option is essential to my application, since I need to
preserve the integrated data value over the area of the regridded array.

I've attached:

1) the ncl script (based on ESMF_all_conserve_12.ncl):

rgf_regrid_test_v3_conserve.ncl

2) the output from running the script, with debugging turned on can be used
to produce an output file, as follows; I have not attached it because it is
rather large.

ncl rgf_regrid_test_v3_conserve.ncl>ncl_script_output.txt

3) the input datafile containing the data array and the unstructured grid:

rgf_regrid_test_v3small.nc

4) the ncl_filedump of this file, listing all of the variables:

ncl_filedump -v flux,lon_centers,lat_centers,lon_corners,lat_corners \

rgf_regrid_test_v3small.nc>ncl_filedump_output.txt

5) a PDF plot of the original data and the unsuccessful regridded version,
which gives "NO CONTOUR DATA" as an error message.

The script output file [2), above] shows the error messages and the problem
with the regridded data array:

(0) --------------------------------------------------

(0) ESMF_regrid_gen_weights: 'ESMF_RegridWeightGen' was successful.

(0) ESMF_regrid_with_weights: regridding using interpolation weights ...

(0) ESMF_regrid_with_weights: warning: destination grid is not

(0) completely covered by the source grid. This is not an error.

(0) It just means your destination grid covers a larger area

(0) than your source grid.

(0) ESMF_regrid_with_weights: Source Grid:

(0) rank: 1

(0) dimensions: 15791

(0) original source rank: 2

(0) latitude min/max: 9.81775/79.5803

(0) longitude min/max:-75.1696/9.90834

(0) ESMF_regrid_with_weights: Destination Grid:

(0) dimensions: 719 1440

(0) latitude min/max: -89.75/89.75

(0) longitude min/max:0/359.75

(0) ESMF_regrid_with_weights: retrieving interpolation weights ...

(0) ESMF_regrid_with_weights: error: source data on the description

(0) file does not have proper dimensions.

and then

Variable: flux

Type: double

Total Size: 64000 bytes

            8000 values

Number of Dimensions: 2

Dimensions and sizes: [ysize | 100] x [xsize | 80]

Coordinates:

Number Of Attributes: 1

  comment : Sky plane flux for occultation

Variable: flux_regrid

Type: float

Total Size: 4 bytes

            1 values

Number of Dimensions: 1

Dimensions and sizes: [1]

I don't know why flux_regrid is a float instead of a double, or why it has
only one value.

I suspect that the problem comes from the way I have specified the grid
corners - I created the netCDF file using IDL, and tried to make sure that
the array elements are in the appropriate order, as shown in the
ncl_filedump output file:

  variables:

      double flux ( ysize, xsize )

         comment : Sky plane flux for occultation

      double lon_centers ( ysize, xsize )

         comment : Center longitude (deg)

      double lat_centers ( ysize, xsize )

         comment : Center latitude (deg)

      double lon_corners ( ysize, xsize, ncorners )

         comment : Corner longitudes (deg)

      double lat_corners ( ysize, xsize, ncorners )

         comment : Corner latitudes (deg)

but clearly there is something that I'm missing. I'd be grateful for any
suggestions, and my apologies for naive questions. This is my first attempt
at using ncl, which appears to be very powerful and which I hope will be
useful for my application, which involves tests of atmospheric tidal models
for Pluto's tenuous atmosphere.

Thanks for any help anyone can provide.

Dick French

-- 
Richard G. French
Dean of Academic Affairs
McDowell and Whiting Professor of Astrophysics
Cassini Radio Science Team Leader
341A Green Hall, Wellesley College
Wellesley, MA 02481-8203
(781) 283-3583





_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Tue Jun 4 08:19:33 2013

This archive was generated by hypermail 2.1.8 : Tue Jun 04 2013 - 09:50:17 MDT