[98] Unmapped points because of masking

From: Robert Oehmke <robert.oehmke_at_nyahnyahspammersnyahnyah>
Date: Thu Jul 11 2013 - 16:47:50 MDT

Hi Jiaxin,

  I just saw your conversation with NCL today (I was on vacation and will be gone on and off over the next few weeks). I believe that Mary is correct and the reason that those points along the coast are not being mapped is that they don't have the full set of points needed to interpolate. We actually have a feature request open to allow unmapped points like these to be handled, but it hasn't been prioritized yet.

I think that you might be able to do this now with a few step approach. Part of this depends on the ability to not zero the entire field when regridding, so that you can interpolate twice to the same field. The ESMF library has the ability to do this when applying regrid weights to a field, but I'm not sure how to do it in NCL, so Mary will have to chime in about that part.

You have a couple of options for what values to set the coast line values. You could set them manually to some sensible value. You could also use our nearest-source-to-destination regridding. For each destination
point this choses the closest source point to supply the value. The below assumes that you're using the nearest-source-to-destination interpolation. If you want to set your own values then you can just set them after interpolation and skip the appropriate steps below.

I think that you could do something like the following:

1. Interpolate using bilinear or patch using the original mask.

2. Generate a mask for just the non-coast values
     i. interpolate a constant field of 1.0 using the original mask and bilinear regridding yielding field A
     ii. interpolate a constant field of 1.0 using the inverse of the original mask and bilinear regridding yielding field B
     iii. For the non-coast value mask mask everything where either field A or field B is greater than 0.0. These are the places either totally on the land or totally on the sea.

3. Interpolate using nearest-source-to-destination with the non-coast mask without zeroing the entire field first.

This should interpolate everything with 4 corners using the bilinear/patch and then the rest of the coast using the nearest-source-to-destination.

Another option is if you have corners for the cells around your data points you could also use conservative interpolation. This can be somewhat less accurate than the bilinear/patch, but it should give you values for any destination cells which overlap a source cell. Although the less it overlaps a source cell, the less information it will have and the less accurate it might be.

I'm going to be off again after today until late next week, but if you have questions during that period one of my fellow team members can help.

Let me know if you have any questions.

Thanks!

- Bob

On Jul 11, 2013, at 8:36 AM, Jiaxin Zhang wrote:

> Dear ESMF users,
>
> I am an NCL user that is also using ESMF (http://www.ncl.ucar.edu/Applications/ESMF.shtml).
>
> My original netcdf file is temperature values for land grids at 0.5x0.5 (360x720) and I want to regrid to 1x1 (180x360).
>
> After using the function ESMF_regrid in NCL, the main problem that I have is that I do not get interpolated temperature values for land-water boundaries grids (as you can see in the e-mail that Mary Haley from NCL help list cc-ed you yesterday).
>
> Attached are my original netcdf file and the NCL code that I used to regrid (ESMF_regrid), because it may be easier for you to solve this problem with these files. As you can see, the plot of the regridded file has the main problem that the land grids located in land-water boundaries have no temperature values.
>
> How can we solve this problem? I guess that ESMF has some options that allow to deal with these situations.
>
> I really need to have interpolated temperature values at 1x1 for all land grids (including the grids located at land-water boundaries).
> Your help and suggestions on how to succeed in this will be very appreciated.
>
> Thank you!
>
> Jiaxin
> <tair_2010_initial_1time.nc><test_regrid.ncl>_______________________________________________
> esmf_support mailing list
> esmf_support@list.woc.noaa.gov
> https://list.woc.noaa.gov/cgi-bin/mailman/listinfo/esmf_support
Received on Thu Jul 11 16:47:37 2013

This archive was generated by hypermail 2.1.8 : Tue Jul 16 2013 - 13:21:17 MDT