[Thread Prev][Thread Next][Index]

Re: How to read netCDF files with ferret



Enils,

You are missing the point of DODS/OPeNDAP access to data. The files at the address you give can be read by Ferret directly. There is no need to download or translate. The following three Ferret commands give me a lovely plot of one particular time series:

yes? use "http://stellwagen.er.usgs.gov/cgi-bin/nph-nc/data/time_series/hourly/1012-A1H.cdf";
yes? show data
currently SET data sets:
1> http://stellwagen.er.usgs.gov/cgi-bin/nph-nc/data/time_series/hourly/1012-A1H.cdf (default)
name title I J K L
U_1205 Eastward Velocity 1:1 1:1 1:1 1:2784
V_1206 Northward Velocity 1:1 1:1 1:1 1:2784
CD_310 CURRENT DIRECTION (T) 1:1 1:1 1:1 1:2784
CS_300 CURRENT SPEED (CM/S) 1:1 1:1 1:1 1:2784
UPR_4001 UPPER ROTOR SPEED 1:1 1:1 1:1 1:2784
STEAD_4009
STEADINESS 1:1 1:1 1:1 1:2784
T_20 TEMPERATURE (C) 1:1 1:1 1:1 1:2784

yes? plot t_20

-- Jon


Enils Bashi wrote:

Hello,

I am new to ferret and I am having problems reading netcdf files. I got my
files from
http://stellwagen.er.usgs.gov/cgi-bin/nph-nc/data/time_series/hourly/ . I
got them in an ascii format and saved them as netCDF. Are netcdf files text
files or are they binary?
Here is what I did:

yes? file/variable=v1 1022-A_cdf_ascii.cdf
yes? plot v1
**TMAP ERR: error 0
Last or next-to-last record read:
u_1205.u_1205[u_1205.time=2442673][u_1205.depth=43.5][u_1205.lat=40.8678],
7.927

Data set: .\1022-A_cdf_ascii.cdf
Data file: .\1022-A_cdf_ascii.cdf
yes?

It was not clear to me from the Ferret online documentation how to read a
file in. The example there was very vague. I would greatly appreciate any help with this problem. A small sample netcdf
file would be helpful, along with the proper commands to open the file and
plot some variables.

Thank you in advance,

Enils Bashi
Programmer
Veridyne Incorporated
Annapolis: (410) 267-9833
ebashi@chesapeakebay.net <mailto:'ebashi@chesapeakebay.net'>



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement