[Thread Prev][Thread Next][Index]

Re: [ferret_users] Regriding issue



Hi Muyin,
 
This may with the original grid of the variable xin, and what the RESHAPE is doing.  Does xin it have Z and T axes?  Are they the same length as the new ones you've defined?
 
Also if xin has a z grid, then the global setting SET REGION/Z=4:5 applies to its original grid as well.  You probably want to do the reshape on whatever the original grid is, and then only use the result for z=4:5.  So, remove the SET REGION, and use
 
 
list/clob/file="Test1_4and5.txt" xnew[z=4:5]
 
 
On 4/5/2018 12:12 PM, Muyin Wang - NOAA Affiliate wrote:
Hi All:
I have a data set for about 35 years. Now I need to extract part of the domain, and for specific months only.
I used the following commands to regrid the data like
 
def axis/z=1:12:1 zmon
def axis/t=1980:2005:1 tyr
let outgrd = x[gx=xin]+y[gy=xin]+T[gt=tyr]+Z[gz=zmon]
 
let xnew = reshape(xin,outgrd)
 
Then I try to list the data out in ASCII format as
 
set region/z=4:5
list/clob/file="Test1_4and5.txt" xnew
 
But when I checked the file Test1_4and5.txt the output data include ALL months, not only April and May as I requested.
 
What went wrong?
Thank you!
Muyin
 
 
 
 

[Thread Prev][Thread Next][Index]