[Thread Prev][Thread Next][Index]

Re: [ferret_users] Relatively Simple Questions



Hi Waylon,
Welcome! I'll give you some Ferret commands below to get you going, but first to point to how you might get started with the documentation. One good place to start is the Ferret demo script which will introduce you to the plotting commands in particular

yes? go tutorial

Also look at what's in the on-line demos in http://www.ferret.noaa.gov/Ferret/on_line_demonstrations.html. These are html versions of scripts that are included with Ferret.

Work through Chapters 1-4 and 6 of the Users Guide, which will show you how to do calculations with your data, and make plots.

Recognizing that it's a lot to absorb for a new user, here is how to do some of the things you're asking. Ferret recognizes the missing_value attribute in Netcdf files, so there is no need to do anything to take it into account.

> ferret
yes? use LST_Night_1km.ncatted2.nc
yes? show data

yes? shade LST_NIGHT_1KM ! this makes a raster plot
yes? contour LST_NIGHT_1KM ! this makes a contour plot
yes? fill LST_NIGHT_1KM ! this makes a filled contour plot

! this captures the current plot on your screen as a gif image. See "hardcopy" in the Users Guide for other options
yes? frame/file=outfile.gif


! now look up "transformations". For example, averaging, max, the
! forward difference in the X direction, and number of good data:

yes? list LST_NIGHT_1KM[x=@ave,y=@ave]

yes? list LST_NIGHT_1KM[x=@max,y=@max]

yes? let forwrd = LST_NIGHT_1KM[x=@ddf]
yes? list forwrd[x=@max,y=@max]

yes? list LST_NIGHT_1KM[x=@ngd,y=@ngd]

You can see the standard deviation as part of the output of the STAT command

yes? stat LST_NIGHT_1KM

The location of the minimum and maximum values can be found with the @LOC transformation.


yes? list LST_NIGHT_1KM[X=@LOC:281.26]
VARIABLE : X of 281.3 in
FILENAME : LST_NIGHT_1KM.ncatted2.nc
SUBSET : 20 points (Y)
X : 0.5 to 20.5 (location of 281.3)
1 / 1: ....
2 / 2: ....
3 / 3: ....
4 / 4: ....
5 / 5: ....
6 / 6: ....
7 / 7: ....
8 / 8: ....
9 / 9: ....
10 / 10: ....
11 / 11: 3.000
12 / 12: 4.000
13 / 13: ....
14 / 14: ....
15 / 15: ....
16 / 16: ....
17 / 17: ....
18 / 18: ....
19 / 19: ....
20 / 20: ....

shows that the function hits its minimum value for x=3,x=4 and y=11,y=12. Checking this:

yes? list/i=3:4/j=11:12/prec=5 LST_NIGHT_1KM
VARIABLE :
FILENAME : LST_NIGHT_1KM.ncatted2.nc
SUBSET : 2 by 2 points (X-Y)
3 4 3 4
11 / 11: 281.26 281.26
12 / 12: 281.94 281.26

Similarly, using @LOC:286.74 will show you the location(s) where the function hits its maximum.


Waylon.Collins wrote:

Dear Members,

This is my first official message to the ferret user list. I recently installed ferret on my computer (X86_64 running Redhat Enterprise Linux WS3). The following two questions are probably fairly trivial, but I need assistance ASAP.

Question #1
The attached netcdf file contains data for a particular variable written to a 2-D grid (geographic projection). Does anyone have a ferret script that will input this netcdf file and (1) create contours of this data and/or (2) plot the values in 2-D space? It would be helpful if the output can be both displayed on the computer screen, and stored in a format wherein a hardcopy can be created.

Question #2
Does anyone have a ferret script that will input the foregoing netcdf file and output (to a textfile or to standard output) as many of the following values as possible?
1. Arithmetic Mean
2. Minimum value
3. Maximum value
4. Maximum finite difference value in each direction
5. Maximum horizontal gradient value in each direction
6. N (number of data values other than missing values)
7. Standard Deviation
8. Distance between the minimum and maximum values

The script would need to ignore all values designated in the netcdf file as "missing".

Any help would be greatly appreciated.

Waylon


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement