Re: question to "ESMF_curv_to_1deg.ncl"

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu May 23 2013 - 09:54:26 MDT

Hi Jingmin,

ESMF regridding works with 2D variables, but these scripts are just templates, and mainly for 2D variables. You'll have to modify them if you have > 2D variables.

SrcMask2D must be 2D. If your data has different locations for missing values for each 2D subset, then you will have to loop across each 2D subset of your array, and generate a weights file for each subset.

If your data is always missing in the same locations, then doing this:

   Opt@SrcMask2D = where(.not.ismissing(var(0,:,:),1,0)

should be fine.

See the "special note about weights files and missing values" section:

for more information.


On May 23, 2013, at 6:32 AM, jingmin li wrote:

> Hello,
> I have questions regarding to "ESMF_curv_to_1deg.ncl" on
> Does it only work for
> 2D variables? How to modify the code to be able to do interpolation for
> variables which have more than 2 dimensions.
> I used it for a 3D variable, but get error "Number of subscripts do not
> match number of dimensions of variables...". Then I specified the
> variable var to var(0,:,:), it worked.
> I have used "ESMF_WRF_to_rect.ncl" before, it did not have this problem.
> I compared the 2 codes, and found the only difference is at the line
> "Opt@SrcMask2D = where(.not.ismissing(var,1,0)".
> With regards,
> Jingmin
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Thu May 23 09:54:38 2013

This archive was generated by hypermail 2.1.8 : Thu May 30 2013 - 11:38:10 MDT