[Thread Prev][Thread Next][Index]

Re: Extracting monthly means and anomalies



Hi Steve,

	This is a common and very simple thing to do with ferret. Let me use
your situation and give an explicit example. You should be able to cut these
lines out and paste them into your ferret window and they should work for you.
If you have any questions, please feel free to ask.

yes? use gisst.nc
yes? def axis/t="16-jan-0001:12":"16-dec-0001:12"/np=12/mod/t0="01-jan-0000"
tcl
yes? define grid/t=tcl/like=sst[d=gisst.nc] gcl
yes? GO make_monthly_climatology sst sstm gcl 1452 new gisst_m.nc
yes? use gisst_m.nc
yes? let ssta=sst[d=gisst.nc]-sstm
yes? set variable/title="SST Anomaly" ssta
yes? save/file="gisst_a.nc" ssta

Explanation:
1) access the dataset (need .nc since ferret defaults to .cdf)
2) define a monthly climatalogical time axis
3) define a new grid like your original but with new axis
4) create the new monthly climatology:
	sst is the original variable
	sstm is the name of the new variable
	gcl is the grid with the new climatological axis
	1452 is the total number of months of data
	new means create a new data file (as opposed to append for multi-vars)
	gisst_m.nc is the new climatological file name
5) access this new data set
6) define the anomaly variable (since climatology is on modulo axis, januarys
in
	the time series data will always be paired with climatological january)
7) give the anomaly variable a name
8) save the new anomaly variable to the new data file.

	That's it! Good Luck, Mark

On Nov 1, 11:58am, WILSON Steve wrote:
> Subject: Extracting monthly means and anomalies
>
> I have a gisst.nc file with array "sst" monthly from 1871 - 1991.  It's a
> 4D file:  longitudes(i), latitudes(j), level(k=1), year(l) so it already
> has a time axis with values like 1950 , 1950.083 , (for jan, feb 1950) to
> 1991.833 , 1991.916 , 1992.
>
> I would like to extract (and later use for plotting):
>
> (a) a mean climatology, say sstm (containing 12 monthly mean values) to
> gisst_m.nc, over say years 1950-1991.  This means averaging every 12th
> value from the gisst.nc file.
>
> (b) monthly anomalies: i.e., using both "sst" from gisst.nc and "sstm"
> from gisst_m.nc, to calculate monthly anomalies over the same period
> 1950-1991 and write them out, say to "ssta" in a file gisst_a.nc.
>
> Can you suggest a way to do this?
>
>
> =====================================================================
> ***** Steve WILSON
> ***** Phone : 9239 4559            ***** Switchboard : 9239 4400
> ***** Fax   : 9239 4688            ***** Home        : 9583 4189
> ***** E-mail: sgw@dar.csiro.au     ***** WWW : http://www.dar.csiro.au
> ***** Address: CSIRO Division of Atmospheric Research
>                PBN 1, ASPENDALE, Australia  3195
> =====================================================================
>-- End of excerpt from WILSON Steve



-- 
-------------------------------------------------------------------------------

	      Mark Verschell (verschell@coaps.fsu.edu)
	      Center for Ocean and Atmospheric Prediction Studies
	      Florida State University
              2035 E. Paul Dirac Drive
              R.M. Johnson Bldg. - Suite 200
	      Tallahassee, FL  32310
	      (904) 644-6532              (904) 644-4841 (fax)


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / ERL / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement