[Thread Prev][Thread Next][Index]

Re: how to create netcdf from ascii files



Hi Enils,
Please see"delimited data files, reading" in the index to the Ferret
Users Guide, which will point you to Ch2, Sec5.2.  You can read
your data with this command, define a grid for the data, and then
write the variables to a NetCDF file.

Your SET DATA command would be something like this
(the command is one long line, which will wrap in this message)

yes? SET DATA/FORM=DELIM/DELIM=" "/VAR="temp, salinity, dop, doc, ph, turbidity, chlorophyll"  ascii_filename.dat

You will need to define axes with DEFINE AXIS commands,
and put your data onto that.  It is not clear to me how the input
data is arranged in latitude and longitude.  The explanations and
examples in Chapter 2, section 5.1 will help you there.  Once
you have your variables on a grid, you can do SHADE plots
to check that they are correct and then a SAVE command to
write to a NetCDF file.

Ansley Manke


Enils Bashi wrote:

> Dear Ferreters,
>
> I have an ascii file that contains the following data:
>
> 12.89       3.56        103.00  10.64   7.85        12.70             18.80
> 12.94       3.59        102.10  10.54   7.80        14.80             21.60
> 12.97       3.80        101.50  10.45   7.82        16.00             23.80
> 13.06       3.95        101.90  10.46   7.86        15.40             24.00
> 12.91       3.87        102.40  10.55   7.89        10.60             24.90
> 12.86       3.85        102.40  10.57   7.89         9.50             20.60
> 12.66       3.84        102.50  10.62   7.92         8.90             19.50
> .......         ......        ......      ......    ......         ......
> ......
> .......         ......        ......      ......    ......         ......
> ......
> .......         ......        ......      ......    ......         ......
> ......
>
> where the columns are:
>
> temp, salinity, dop, doc, ph, turbidity, chlorophyll
>
> I want to derive a netcdf defined on a grid with coordinates from 80w:72w
> and 36n:40n
> Any and all feedback would be greatly appreciated.
>
> Enils Bashi
> Programmer - Chesapeake Bay Program
> Veridyne Incorporated
> Annapolis, Maryland: (410) 267-9833
> www.chesapeakebay.net

--
Ansley Manke  Pacific Marine Environmental Laboratory  Seattle WA




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement