[Thread Prev][Thread Next][Index]

Re: [ferret_users] Question on Regridding



A clarification/correction on Billy's comment about "subspan modulo
axes".  After discussing this offline with Billy, it seems that the
"cross-gap smoothing" issue was fixed a while ago, in Ferret v5.5.
For more on this topic, see:

http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/Grids-Regions/REGIONS#_VPINDEXENTRY_726

For limited-area data, Ferret now inserts a special "ghost" missing
cell, spanning the modulo gap.  This way, smoothers will treat the
data edges like a boundary, and will not smooth across the gap.  For
example:

        NOAA/PMEL TMAP
        FERRET v6.83 (beta)
        Linux 2.6.32-279.5.1.el6.x86_64 64-bit - 08/22/12
         4-Oct-12 15:45

yes? use coads_climatology
yes? save/clob/file=a.nc/x=120e:80w/y=20s:20n/l=1 sst
yes? use a.nc
yes? show ax coadsx51_130
 name       axis              # pts   start                end
 COADSX51_130 LONGITUDE        80mr   121E                 81W
   Axis span (to cell edges) = 160 (modulo length = 360)

Here Ferret assumes that since the x-axis has units of degrees_east,
it is a longitude axis and has a modulo length of 360.

yes? can v; set v ul; shade/x=0:720 sst
yes? set v ur; shade/x=0:720 sst[x=@sbx:20]
yes? set v ll; shade/x=0:720 sst[x=@fnr]
yes? set v lr; shade/x=0:720 sst[x=@cda]

There things behave as we'd hope, with no filling or smoothing across the gap.

Now if we forcibly override the modulo length, to make it span just
the valid-data region,

yes? set ax/modulo=160 coadsx51_130
yes? show ax coadsx51_130
 name       axis              # pts   start                end
 COADSX51_130 LONGITUDE        80mr   121E                 81W
   Axis span (to cell edges) = 160 (modulo length = axis span)

then we would get the pre-v5.5 behavior that Billy had described.

Andrew


On Thu, Oct 4, 2012 at 2:06 PM, William S. Kessler
<william.s.kessler@xxxxxxxx> wrote:
> And the opposite is also something to pay attention to: if an x-axis is marker "modulo" when you don't want it to be.
>
> If you give Ferret data on a partial longitude axis (say just the Pacific), it will still be modulo in x. That means that operations across all gridpoints (for example smoothing) will wrap across the break. That will often not be what is intended (and you might not be aware of it).
>
> The solution is:
>
> CAN AXIS/MODULO axis_name
>
> I do this every time I'm working with a non-global longitude axis to avoid unintended results.
>
> BK
>
> On Oct 4, 2012, at 10:31 AM, Ansley Manke wrote:
>
>> Hi Paul,
>> It's hard to say based on this, but one thing to check is whether the longitude axes are being treated as modulo axes, and if both have units of degrees_east, so that Ferret can reconcile the range of longitudes on the two grids.
>>
>> yes? show grid slr[d=1]
>>
>> yes? show grid slr[d=2]
>>
>> The #pts column for the x axes should contain an "m" for modulo.  That is, the "180mr" in the listing below is saying that the x axis has 180 points, is modulo, and is regularly spaced.
>>
>> yes? use coads_climatology
>> yes? sho grid sst
>>     GRID GSQ1
>>  name       axis              # pts   start                end
>>  COADSX    LONGITUDE          180mr   21E                  19E(379)
>>  COADSY    LATITUDE            90 r   89S                  89N
>>  normal    Z
>>  TIME      TIME                12mr   16-JAN 06:00         16-DEC 01:20
>>  normal    E
>>  normal    F
>> If one of the axes is not marked as being modulo, then you could get what you are seeing.  You can fix these properties on an axis with  the SET AXIS command,
>>
>>    SET AXIS/MODULO/UNITS="degrees_east" `slr,return=xaxis`
>>
>> Ansley
>>
>> On 10/3/2012 7:28 AM, Paul Goddard wrote:
>>> Hi, I am attempting to regrid a variable SLR gridded on ACCESS1.0 (x=-0.5:359.5, y=-0.5:299.5   i=1:360, j=1:300) to the grid provided by the variable SLR gridded on GFDL-CM3 (x=80E (-280) :80E, y=82S:90N    i=360, j=200).
>>>
>>> I ran the following script:
>>>
>>> yes? USE GFDL-CM3_SLR.nc
>>>
>>> yes? USE ACCESS1.0_SLR.nc
>>>
>>> yes? let ACCESS10_SLR = SLR[g=SLR[d=1]]
>>>
>>> yes? save/file=ACCESS10_SLR_REGRID.nc ACCESS10_SLR
>>>
>>>
>>> But when I attempt to shade ACCESS10_SLR I only get a plot with a region around austrailia in the upper right corner and the rest of the plotting space is white.  Any ideas?
>>>
>>> Thanks,
>>>  Paul
>>>
>>
>
>



[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement