[Thread Prev][Thread Next][Index]

Re: Problem in reading ascii files



Estelle,

Steve Hankin, the master ferreter, is on vacation for a week and will be
able to give a more thorough answer.  I see nothing wrong with your
script and it does fail for me.  But you can get it to work by
specifying an index value on the X axis.

save/clobber/i=1/file="$1.nc" c14


Once it is saved as a NetCDF file it can be read in and is understood by
Ferret.


Bonne chance!

-- Jonathan Callahan


Estelle Laurendeau wrote:
> 
> 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