[Thread Prev][Thread Next][Index]

Re: Regridding/interpolation



Amazing! It works. Thanks Mark. I tried the example with ZAXREPLACE in the
FAQ before I sent the message but it didn't work. I was messing about with
PPL commands at the same time (trying to get a log axis) which may have
been responsible.

What's more, the /DEPTH qualifier also makes it much easier to get 1000mb
at the origin of the top and 0mb at the top. I'd missed that (probably
because I'm not in the oceans).

As an aside, top of my wish list right now is a much easier way of getting
a log z axis with the correct labelling.. (I've seen the faq, but it would
be nice to simply be able to do something like shade/ylog to enable log y
axis with labelling).

Thanks again Mark.

        Glenn



At 6:04 pm +0100 20/6/00, Mark Verschell wrote:
>Glenn,
>
>	I haven't worked this out in any way, but it occurs to me that you
>could do something very similar to how ferret handles sigma-coordinate
>date.
>
>	In sigma coordinate data, you have data in levels, and you have
>the thickness of each level. You define a depth function that is the sum
>of these thicknesses and then I define a new axis that has the resolution
>I want and regrid using zaxreplace. So maybe something like:
>
>let depth=h[k=@rsum]-0.5*h
>define axis/z=0:200:10/depth/unit=meters zdepth
>let varD=ZAXREPLACE(var,depth,z[gz=zdepth]
>
>Could be adapted, where depth would be replaced by pressure. You already
>have a pressure variable, so if you define a "regular" pressure z-axis:
>
>define axis/z=0:1000:10/depth/unit=decibars zpres
>let trd=ZAXREPLACE(tr,pressure,z[gz=zpres])
>
>Give it a try, this method is likely to require modification for your
>case.
>
>	Mark
>
>
>On Tue, 20 Jun 2000, Glenn Carver wrote:
>
>> I have a variables, say tr,  on a regular lat/long/theta grid (theta is
>> potential temperature). I also have pressure, p, on this same grid. I need
>> to regrid the variables onto a new grid which has the vertical coordinate
>> replaced by pressure. To be able to do this requires a linear vertical
>> interpolation using the values of pressure in p. However, since p for each
>> lat/lon is different I cannot figure out a way of getting ferret to do this.
>>
>> e.g.
>> define/axis/z=500:0:-10 paxis   ! defines the regular pressure axis I want
>> define grid/like=tr/z=paxis newgrid  ! sets up the grid I eventually
>>want tr on
>>
>> I can't use the normal regridding as this uses the variable's underlying
>> grid whereas I need a lookup to the pressure variable to find the z
>> coordinate value. I can't use an objective analysis ext. fn. because that's
>> going to do a 2D interpolation and I only need a 1d (vertical in this case)
>> interpolation.
>>
>>   Thanks,
>>
>>           Glenn
>>
>>
>> --
>> Dr. Glenn Carver, Senior Research Associate,
>> Centre for Atmospheric Science, Chemistry Dept., Cambridge University, UK
>> mailto:Glenn.Carver@atm.ch.cam.ac.uk   http://www.atm.ch.cam.ac.uk/~glenn/
>>
>>               "I never think of the future, it comes soon enough"
>>                    - Albert Einstein
>>
>>



--
Dr. Glenn Carver, Senior Research Associate,
Centre for Atmospheric Science, Chemistry Dept., Cambridge University, UK
mailto:Glenn.Carver@atm.ch.cam.ac.uk   http://www.atm.ch.cam.ac.uk/~glenn/

              "I never think of the future, it comes soon enough"
                   - Albert Einstein




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement