[Thread Prev][Thread Next][Index]
Problem in reading ascii files
Hi Ferreters,
I am currently dealing with read of ascii files with Ferret
The goal is to create a proper netcdf file with a right spatial
position for a variable running on time.
more example.dat gives:
--------------------------------------
Year C14
1950.0 -54.0
1952.0 -66.0
1955.0 -54.0
1957.0 -40.0
1958.0 -44.5
1959.0 -20.0
1960.0 -18.0
1961.0 -12.0
--------------------------------------
more example.pos gives:
--------------------------------------
Latitude Longitude
16.83 -86.20
--------------------------------------
and here is my ferret script (read.jnl) to read them and
save into a netcdf file:
--------------------------------------
file/col=2/var=ypos,xpos/skip=1 "$1.pos"
def axis/x/from_data/name=myxaxis/units=degrees_east xpos
def axis/y/from_data/name=myyaxis/units=degrees_north ypos
file/col=2/var=year,c14/skip=1 "$1.dat"
def axis/t/from_data/name=mytaxis/units=years year
def grid/x=myxaxis/y=myyaxis/t=mytaxis mygrid
file/col=2/var=year,c14/grid=mygrid/skip=1 "$1.dat"
save/clobber/file="$1.nc" c14
--------------------------------------
Try:
go read example
and please tell me what is wrong in this script
Thanks in advance
Regards
Estelle Laurendeau
Laboratoire des Sciences du Climat et de l'Environnement
Unite mixte de recherche CNRS-CEA
L'Orme des Merisiers - Bat.701 - CEA/Saclay
91191 GIF sur YVETTE cedex - FRANCE
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement