Remap Resolution

How do I...?
Post Reply
User avatar
carlospsneto
Posts: 68
Joined: Thu Mar 14, 2013 1:38 pm

Remap Resolution

Post by carlospsneto »

Hello,

I would like to know how to remap a NWP field to the resolution and projection
of the corresponding satellite imagery using McIDAS V.

Thank you.
User avatar
tomw
Posts: 296
Joined: Tue Dec 23, 2008 3:40 pm

Re: Remap Resolution

Post by tomw »

Although simply changing the projection of the display to the satellite image will cause the displayed grid data to be re-projected, I will assume that you actually want to work with the numeric values. Using Jython there are two ways to accomplish this, but you must be careful about the structures of the Data -- whether one or both contains a "time" dimension, etc.:

1) the quickest way makes use of the underlying resampling that is done when numerically combining two fields -- although it looks like a "hack".

Code: Select all

a=add(s*0, g)

This will effectively resample the values in "g" to the coordinates of "s".

2) The second method uses direct method (function) calls but requires a bit more knowledge of the structure of your data fields. The first call is to "make2D()" and is used if you have a 3D parameter (even if you have chosen one level -- it is still a 3D object and needs to be converted):

Code: Select all

g2 = make2D(g[0]);  // we assume "g" has a time dimension, so we use g[0] to get a grid.
a = resample(g2, geDomainSet(s[0]));  // unfortunately, this gives "nearest neighbor" sampling

or...use the foollowing form for more options:

a = g2.resample(getDomainSet(s[0]), Data.WEIGHTED_AVERAGE, 0) // this gives "weighted average" sampling


I have attached screenshots of the results of "nearest neighbor" and "weighted average" using a 4km image and an 80km model grid of 500hPa temperatures.

Hope this gets you started...
Attachments
wa.jpg
nn.jpg
User avatar
carlospsneto
Posts: 68
Joined: Thu Mar 14, 2013 1:38 pm

Re: Remap Resolution

Post by carlospsneto »

Thank you very much for your guidance. Everything worked it well.
Post Reply