Re: ESMF regridding issue

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Jan 02 2013 - 16:05:28 MST

Hi Kevin,

Thanks for your clear description of the issue, and I'm well aware
of it.

This is an unfortunate part of trying to determine whether you
truly have unstructured data or rectilinear data. As far as I know,
the NetCDF file containing the weights does not provide this
information, so it's a guessing game at best.

I assume you are using ESMF_regrid_with_weights and not
the all-in-one ESMF_regrid?

If so, one thing you can try is setting:

   opt@DstGridType = "Unstructured"

Can you let me know if this works?

It looks like the ESMF_regrid_with_weights documentation doesn't mention this,
which is an oversight on my part. If you verify this works, then I'll be sure to
add this and highlight it.


On Jan 2, 2013, at 1:07 PM, Kevin Vermeesch wrote:

> Hi,
> I've found an issue in the
> $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl script that
> comes with NCL 6.1.0 and resolved it (at least for my use so far), so
> I'm e-mailing to make you aware of it.
> I was trying to regrid from a curvilinear to a rectilinear grid and kept
> getting the error:
> "write_grid_description: DstGridType and/or DstGridLat/DstGridLon were
> not set. Cannot determine the destination grid type."
> when I had the options attributes DstGridLat and DstGridLon set with
> values assigned to them. I found in the ESMF_regridding.ncl script where
> the error message was getting printed at and figured out why the code
> was getting there. It is near line 2904 where the script is trying to
> figure out the type of destination grid. In that section of code
> (testing for a rectilinear destination grid), the last condition of the
> "else if" statement tests I was using 1D lat/lon
> arrays that happened to be the same length (my destination lat/lon
> arrays are dynamically generated in my script I use to call the ESMF
> functions), so the test for a destination rectilinear grid was false and
> the script was not able to determine the grid type.
> I'm not sure of the significance of lat_dims not being equal to
> lon_dims, but I commented-out that last condition in the else if
> statement ( on line 2906 and the program worked
> fine after that.
> Kevin
> --
> * * * * * * * * * * * *
> Kevin Vermeesch
> Science Systems and Applications, Inc.
> NASA/GSFC Code 612
> Building 33, Room C422
> e-mail:
> phone: (301) 614-6224
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Wed Jan 2 16:07:11 2013

This archive was generated by hypermail 2.1.8 : Fri Jan 04 2013 - 15:34:10 MST