Hi Mir,
Dear Ferret User,
I am very new user in pyferret. I would run to netcdf (nc) file by pyferret. I don't know how to run?
I would know the command of....
a. how to see data of nc?b. how to plot nc file?c. how to convert nc to csv?d. how to run nc file?
Please advise me as soon as possible.....Thank you.
Welcome to PyFerret!
NetCDF is the preferred file type for PyFerret and it reads the coordinate information and attributes to automatically make use of them in plots and analysis. Here is a very short demo - I will include more information below about resources for you.
Open one of the exampe datasets that is part of the pyferret
installation. Look at the variables, make a plot, and write out a
subset to a netCDF file,
yes? use coads_climatology
! list the variables in the file and show the shape of
their grids,
yes? show data
currently SET data sets:
1>
/home/users/tmap/ferret/linux/fer_dsets/data/coads_climatology.cdf
(default)
name title I
J K L
SST SEA SURFACE TEMPERATURE 1:180
1:90 ... 1:12
AIRT AIR TEMPERATURE 1:180
1:90 ... 1:12
SPEH SPECIFIC HUMIDITY 1:180
1:90 ... 1:12
WSPD WIND SPEED 1:180
1:90 ... 1:12
UWND ZONAL WIND 1:180
1:90 ... 1:12
VWND MERIDIONAL WIND 1:180
1:90 ... 1:12
SLP SEA LEVEL PRESSURE 1:180
1:90 ... 1:12
! see the coordinate variables
yes? show grid sst
GRID GSQ1
name axis # pts
start end subset
COADSX LONGITUDE 180mr
21E 19E(379) full
COADSY LATITUDE 90 r
89S 89N full
normal Z
TIME TIME 12mr 16-JAN
06:00 16-DEC 01:20 full
yes? fill/x=100:260/y=0:50/L=1 sst
yes? save/clobber/file="my_subset.nc"
/x=100:260/y=0:50/L=1 sst
LISTing to file my_subset.nc
The command LIST/FORMAT=comma/file="filename.dat" will write a
comma-separated file. It doesn't convert gridded data to csv. A
first step making 1-dimensional variables from the data and
coordinates would be needed.
Here is more general information that we have sent out about
getting started:
To get started with PyFerret, please look at the documentation
on the website a including the FAQ's,
and try the tutorial
scripts and demos. There is a single set of
documentation for PyFerret and Ferret, as the older Ferret program
and the newer Python-enabled PyFerret verion use almost entirely
the same commands and syntax. PyFerret can go beyond Ferret to
make use of Python capabilities, but it sounds as if you want to
use the Ferret command line. Please know that every time the
documentation says Ferret, the commands will also work with
pyferret.
A good place to start in the documentation is the section, "Getting
Started", and the sections that follow that,
particularly "Thinking
like a Ferret".
Many of the tutorials are available both as web pages and scripts
which you have as part of your PyFerret installation and which you
can run from the PyFerret command line.
The Ferret Users List is made up of knowledgeable and experienced
users. They are busy scientists and students, and so we find that
they are most willing to answer specific questions. You will want
to get started with some experiments of your own before you write
to the list. Having said that, please do ask your questions. Here
are a few
words about getting help - part 4 of this page talks
about asking a good question.
Ansley Manke
Kind regards,Mir