Re: areahi2lores and plotting

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Mon May 10 2010 - 14:53:46 MDT

Hi Erik,
Whenever you see that type of plotting effect after regridding you
should immediately take a good look at the input/output
latitudes/longitudes and data arrays in your regridding call to make
sure that they span the same longitude range and are in the same direction.

In your case:
WRF_prate_day = model->rain
WRF_lat = model->south_north
WRF_lon = model->west_east
WRF_prate_day = lonFlip(WRF_prate_day)
WRF_lat=WRF_lat(::-1)

(snip)

latGRID = fspan(-90, 90, 73)
latGRID!0 = "latGRID"
latGRID@units = "degrees_north"
latGRID&latGRID = latGRID
NLAT = dimsizes(latGRID)

lonGRID = fspan( 0, 357.5, 144)
lonGRID!0 = "lonGRID"
lonGRID@units = "degrees_east"
lonGRID&lonGRID = lonGRID
MLON = dimsizes(lonGRID)

(snip)

newWRF_prate_day = area_hi2lores_Wrap (WRF_lon,WRF_lat, WRF_prate_day,
False, 1, lonGRID, latGRID, opt)

The WRF_lon array, which was never lonFlip'd, is input as the 1st
argument. WRF_prate_day, input as the 3rd argument, was lonFlip'd. I
think this discrepancy is the cause of your plot cutting off at the
prime meridian.

Also, you flip the latitudes of WRF_lat, but you don't flip the
latitudes of the WRF_prate_day array. (Unless I am missing something.)
You should either flip both of those or flip neither of them, as WRF_lat
is input as the 2nd argument in your call to area_hi2lores_Wrap.

My advice: Do not use lonFlip or flip the latitudes, alter latGRID to go
from 90:-90, and lonGRID to go from -180 to 180, and regrid. After
regridding, lonFlip and flip the latitudes to match your NCPR2 data and
to perform the difference.

Good luck,
Adam

On 05/10/2010 09:41 AM, Erik Noble wrote:
>Dear NCL,
I am using the areahi2lores function to plot hi-res & lo-res
precipitation data onto the same grid. Then I create a panel plot of
each data set (2 time vs. longitude plots along with a difference
plot).

My plots will not "plot" past the prime meridian (see picture).
Both of my datasets "should" be plotting past this point since they
contain data at all of these points.
I am using the lonFlip command in my script so I don't think this is
my problem. Could there be something else causing this?
(I'm not trying to ask others to debug my program; helpful suggestions
would be nice.)
Thank you in advance.
Sincerely,
Erik Noble

__________________________________________________
Adam Phillips
asphilli@ucar.edu
National Center for Atmospheric Research tel: (303) 497-1726
Climate and Global Dynamics Division fax: (303) 497-1333
P.O. Box 3000
Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon May 10 14:53:51 2010

This archive was generated by hypermail 2.1.8 : Thu May 13 2010 - 10:03:00 MDT