[Thread Prev][Thread Next][Index]

Re: [ferret_users] LEVITUS Ocean Data/FERRET shows differing results



Hi,
This is discussed in the documentation. All Ferret calculations take into account data marked as missing.

I think the differences you are seeing has to do with the order of operations, and the weighting that the average transformation does. Averages use cell size to compute a weighted average, and also apply a correction for the variation in the size of longitude/latitude grid boxes depending on the location in latitude on the Earth.  If it were an unweighted average then the order of operations would not matter.

You could do an integral as Olivier suggests, but I don't think that's necessary.  Do it like this, and Ferret will weight the calculation by the size of the grid boxes or parts of grid boxes in the region you have specified, where there is valid data:

     let redSea = t_an[k=1:16@ave,x=30E:45E@ave,y=10N:30N@ave]

Here are some of the relevant pieces of documentation:

http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/variables-xpressions/XPRESSIONS#_VPINDEXENTRY_439
@AVE—average

The transformation @AVE computes the average weighted by grid box size—a single number representing the average of the variable between two endpoints.

If @AVE is specified simultaneously on multiple axes the calculation will be performed as a multiple integration rather than as sequential single integrations. The output will document this fact by showing @AV4 or "XY ave" as the transformation.

See the General Information on transformations for important details about this transformation. In particular, note the discussion about specifying the averaging interval in world coordinates, e.g. longitude, meters, time as in var[x=3.4:4.6@AVE] versus specifying the interval using indices, as in var[I=4:12@AVE]. When the interval is expressed in world coordinates, the weighting is done using partial grid boxes at the edges of the interval. If the interval is expressed using indices, the entire grid cells contribute to the weights.

That link to the General Information about transformations also contains important information.

How does Ferret compute averages and integrals on the surface of the surface of the earth?



Ansley


On 3/25/2013 9:53 AM, Star Physicist wrote:
Do you think if my NETCDF file has missing value flag, FERRET considers it in calculation? Could you please slightly elaborat ewhy do we need RedSea_Mask and how it is working to compute volume? I am pasting some part of ncdump -h of my data as follows:

ncdump -h tanom_1955-2004_missing_value.ncA/TANOM/ftp.nodc.noaa.gov/pub/WOD/SELECT/CDOME
netcdf tanom_1955-2004_missing_value {
dimensions:
    gsize = 2 ;
    lon = 360 ;
    nb2 = 2 ;
    lat = 180 ;
    depth = 16 ;
    time = UNLIMITED ; // (200 currently)
variables:
    float lon(lon) ;
        lon:standard_name = "longitude" ;
        lon:long_name = "longitude" ;
        lon:units = "degrees_east" ;
        lon:axis = "X" ;
        lon:bounds = "lon_bnds" ;
    float lon_bnds(lon, nb2) ;
    float lat(lat) ;
        lat:standard_name = "latitude" ;
        lat:long_name = "latitude" ;
        lat:units = "degrees_north" ;
        lat:axis = "Y" ;
        lat:bounds = "lat_bnds" ;
    float lat_bnds(lat, nb2) ;
    float depth(depth) ;
        depth:units = "meters" ;
        depth:axis = "Z" ;
        depth:bounds = "depth_bnds" ;
    float depth_bnds(depth, nb2) ;
    double time(time) ;
        time:standard_name = "time" ;
        time:units = "months since 1955-01-01 00:00:00" ;
        time:calendar = "standard" ;
    float climatology_bounds(time, gsize) ;
        climatology_bounds:comment = "This variable defines the bounds of the climatological time period for each time" ;
    float t_an(time, depth, lat, lon) ;
        t_an:long_name = "Objectively Analyzed Mean" ;
        t_an:units = "degrees_celsius" ;
        t_an:comment = "Objectively analyzed climatologies are the objectively interpolated mean fields for an oceanographic variable at standard depth levels for the World Ocean." ;
        t_an:cell_methods = "area:mean depth:mean time:mean" ;
        t_an:missing_value = 9.96921e+36f ;

Thanks,

Mubashar


From: olivier.marti@xxxxxxxxxxxx
Subject: Re: [ferret_users] LEVITUS Ocean Data/FERRET shows differing results
Date: Sun, 24 Mar 2013 18:44:03 +0100
To: ferret_users@xxxxxxxx; couragetoknowgc@xxxxxxxxxxx


Le 24 mars 2013 à 18:24, Star Physicist a écrit :

Which way I should proceed then? How could I overcome this issue? Actually there is a function in CDO for vertical averaging over all grid points called "cdo vertmean ifile ofile" but I don't know whether it can handle bottom shallower sea level. Any suggestion?

You should compute a full 3D integral, not 1D/2D ou 2D/1D :


USE tanom_1955-2004_missing_value.nc

! Compute a Red Sea mask. Data dependant, what do you have for missing value ?
LET RedSea_mask = IF t_an GT -100 THEN 1 ! Use an ad hoc criterion, depending of your data

! Integrate temperature
LET RedSea_Temp = t_an[K=1:16@DIN,x=30E:45E@DIN,y=10N:30N@DIN]

! Integrate volume
LET RedSea_Vol = RedSea_mask[K=1:16@DIN,x=30E:45E@DIN,y=10N:30N@DIN]

LET anom = RedSea_Temp / RedSea_Vol 


-- 
Dr. Olivier Marti  - mailto:olivier.marti@xxxxxxxxxxxx
Laboratoire des Sciences du Climat et de l'Environnement
Institut Pierre Simon Laplace
Laboratoire CEA-CNRS-UVSQ  -  UMR 8212
Tel : +33 1 69 08 77 27 - Mob : +33 6 45 36 43 74
Fax : +33 1 69 08 30 73























[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement