[Thread Prev][Thread Next][Index]
Re: [ferret_users] How to plot Monthly Global dataset of singlevariable?
Hi Ashley,
Your dataset appears to be 3 dimensional. You tried to read
the data on to a 2D grid (X & T) first and then RESHAPE'd it on
to a 3D grid. If you know the exact lat/lon/time coordinates of
the dataset, you can directly read data onto the destination grid
consisting of these coordinate axes. Proceed as shown below. It is
a better to name the axes beginning with the letter representing that
dimension (ie. x_binary is a better axis name than binary_x).
While defining time axis, it is always better to use "DAYS" as
time units (if possible). For a monthly time axis, you can set the
time increment as `365.2425/12`. This will get rid of the warning
message.
Let me know if you face any problems. Sometimes you have to flip
the Y-axis. First you proceed as shown below. Get the plot and
see whether it is OK.
Regards,
Jaison
!------------------------------------------------------------------------------
cancel reg/all ; cancel data/all
set memory/size=80
define axis/x=0.5:359.5:1/units=longitudes xlon ! MODULO stuff will be
! taken careoff
define axis/y=-89.5:89.5:1/units=latitudes ylat
define axis/t=15-DEC-1981:14-FEB-2003:`365.2425/12`/\
units=days/T0=31-DEC-1980 time
! suppose you want to check howmany points are there along
! each axes then
SAY " X-Axis xlon have `x[gx=xlon],r=iend` points"
SAY " Y-Axis ylat have `y[gy=ylat],r=jend` points"
SAY " T-Axis time have `t[gt=time],r=lend` points"
! Now define a grid using these axes
define grid/x=xlon/y=ylat/t=time gbin
! Open/Read the binary file and set the missing value
FILE/FORMAT=stream/grid=gbin/var=sst/title="OI SST" OISST_198112_200302
set var/bad=-999.99 ! give proper missing value here
set reg/t=15-JAN-1982
FILL/lev=(-5,30,1) sst
go land
!----------------------------------------------------------------------------
On Thu, 6 Jul 2006, Ashley Watson wrote:
Hi all,
I have monthly global dataset of 255 months from 198112 to 200302
. ( file size 66096000 bytes ). I read the data with the following commands.
I think there is no problem in reading the data.
Set memory/size=80
DEFINE AXIS/X=1:`360*180`:1 binary_x
DEFINE AXIS/T=1:255:1 binary_t
DEFINE GRID/X=binary_x/T=binary_t binary_g
FILE/FORMAT=stream/G=binary_g/VAR=sst OISST_198112_200302
Then I worked to define the grid for data according to section 4.1.3 of
Chapter 2.
DEFINE AXIS/MODULO/X=0.5:359.5:1 onedeg_x
DEFINE AXIS/Y=-89.5:89.5:1 onedeg_y
DEFINE AXIS/T=15-Dec-1981:15-Feb-2003:1/UNITS=month month_t
DEFINE GRID/X=onedeg_x/Y=onedeg_y/T=month_t onedeg_g
LET dummy = x[GX=onedeg_g] + y[GY=onedeg_g] + t[GT=onedeg_g]
LET field = RESHAPE(sst[i=1:`360*180`],dummy)
I got following message while defining time axis,
*** NOTE: /UNIT=MONTHS is ambiguous ... using 1/12 of 365.2425 days
I tried "shade sst[l=1] " but got the error
**ERROR: dimensions improperly specified: must be a 2D region
I dont understand how to view my data with shade/fill commnad after these
steps.
Looking forward for help.
Ashley
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement