Hi -
There was a typo in my previous message. There should not be an
equals sign after the file in the third line.
yes? define axis/x=1:90000:1 xindex
yes? define grid/x=xindex xinput
yes? file/skip=10000/FORM=free/grid=xinput/var="lon, lat, ..."
Then make the SCAT2GRIDGAUSS_XY calls with arguments (lon, lat,
var, x[gx=xlon], y[gy=ylat], ...)
On 3/21/2011 12:07 PM, Ansley Manke wrote:
Hi
Leandro
So, the input data don't include each and every longitude and
latitude on the grid you have defined with xlon and ylat. This
means that you need to read the data on a single, long axis, and
then call the regridding function as you have done. The FILE
command you used with /grid=mygrid assumes that all the locations
are represented in your input file.
So, just define a long axis. If there were fewer than the default
abstract-axis length of 20480 points, you could do this without
defining an axis at all (you'd just skip the /grid= qualifier),
but you need a longer axis. Use the length of the dataset, or some
number longer than its length.
yes? define axis/x=1:90000:1 xindex
yes? define grid/x=xindex xinput
yes? file=/skip=10000/FORM=free/grid=xinput/var="lon, lat, ..."
Then make the SCAT2GRIDGAUSS_XY calls with arguments (lon, lat,
var, x[gx=xlon], y[gy=ylat], ...)
On 3/21/2011 11:06 AM, Otacilio Leandro wrote:
Hi Ansley,
The data that i'm using is at a grid of 0.5 degree only over
continental areas. Because of that i'm using the scat2gridgauss
function.
The data also is organized with lon and lat at the first and
second
columns and the months january until december at the columns
3-15. The
last column is the anual average for the year.
I'm seeding you the year of 1900 as exemple. My goal with this
data is
to create only one cdf file with all monthly means of surface
temperature since 1900 until 2008. At this jnl script i'm trying
to
create one cdf file per month and then concatenet them all using
NCO.
If there's a simple way to this using ferret i'll apreciate if
you
enlighten me.
Thank you again and continue the great job you are doing!
2011/3/21 Ansley Manke<Ansley.B.Manke@xxxxxxxx>:
hi-
I think that we need to find out how to read the data first.
Could you
send me a few lines from the start of your ascii file?
After you run the commands
define axis/x=-179.8:179.8:0.5/units=degrees xlon
define axis/y=-89.75:89.75:0.5/units=degrees ylat
define axis/t=1:1:1 axist
define grid/x=xlon/y=ylat/t=axist mygrid
file=/g=mygrid/skip=10000/FORM=free/var="lon, lat, var01,
var02, var03,
var04, var05, var06, var07, var08, var09, var10, var11, var12,
anual"
"air_temp2009/air_temp.$1"
This sequence would indicate that your data is already on an
XY grid, at one
value of time. How do these plots look?
yes? shade/L=1 lon
yes? shade/L=1 lat
yes? shade var01
If the data are are not already on a on the grid defined by
xlon and ylat,
then the above FILE command is not the correct one to use. If
the data is
on a grid, then you don't need to call the scat2gridgauss
function.
On 3/21/2011 4:36 AM, Otacilio Leandro wrote:
Ansley,
I've corrected the file line but still the problem continue.
I'm
atacching the jnl script so you can verify any others erros.
Thank you very much.
2011/3/18 Ansley Manke<Ansley.B.Manke@xxxxxxxx>:
Hi -
In your FILE command, do you have quotes around the list
of variable
names?
It should look like,
file=/g=mygrid/var="lon, lat, value01, value02, ..."
ascii_file.txt
On 3/18/2011 8:29 AM, Otacilio Leandro wrote:
Hello,
I've got a data with 2D (x and y) climatological monthly
temperature
over continental areas and i got some trouble at using
it on ferret.
The data are separated by one file per year and i used
the function
scat2gridgauss_xy to correctly read the data over the
continent.
My goal with this data is create a cdf file varing at
time (each
"timestep" is one month of the data).
I defined the axis this way:
define axis/x=-179.8:179.8:0.5/units=degrees xlon
define axis/y=-89.75:89.75:0.5/units=degrees ylat
define axis/t=1:1:1 axist
define grid/x=xlon/y=ylat/t=axist mygrid
But when i used
file=/g=mygrid/var= lon, lat, value01, value02 ... etc ,
ascii-file.txt
all values of the orignal data are exchanged for 12.8 as
you can see
below.
Here is the stat of my variable:
temp-1900-02
LONGITUDE: 179.9E(-180.1) to 179.9E(179.9)
LATITUDE: 90S to 90N
Z: N/A
T: 1
DATA SET: air_temp2009/air_temp.1900
Total # of data points: 259200 (720*360*1*1)
# flagged as bad data: 259194
Minimum value: 12.8
Maximum value: 12.8
Mean value: 12.8 (unweighted average)
Standard deviation: 7.178999E-07
I also tryed to regrid the variable using
let temp = tmp[g=mygrid]
but it also showed problems because the time axis is
missing at temp
variable.
The way i defined the t axis is correct? The reason that
i want a time
axis on my variable is to use NCO to concatened all cdfs
that im going
to create. I tested using file without time axis and got
an error from
NCO.
I'm using:
FERRET v6.64
Linux rh5 (gfortran) 2.6.18-164.11.1.el5 -
09/20/10
Thanks for the help.
|