Re: question about satellite data

From: Will Hobbs <Will.Hobbs_at_nyahnyahspammersnyahnyah>
Date: Tue Jul 22 2014 - 18:00:59 MDT

Firstly, pay attention to what the metadata is telling you; -500 to 4000 degrees is NOT a valid range for SST! (at least, not on this planet). Your SST variable is stored as a 'short' data type (hence the 's' after the actual ranges), and you need to convert it to type 'float' before you plot (see that 'f' after the valid_range....?) You can use the function short2flt() to do this.


That said, if you want to plot data within a specific range of values, a number of possible options spring to mind:

1. if you're making a contour plot, just set the following resources
res@cnLevelSelectionMode="ManualLevels"
res@cnMinLevelValF = <minimum number>
res@cnMaxLevelValF = <max level>

2. use the where() function to mask unwanted values from the data, i.e.
> sst = where(sst.lt.1.8.or.sst.gt.35.3, sst@_FillValue, sst)


Hope that helps

Will


From: Vanúcia Schumacher <vanucia-schumacher@hotmail.com<mailto:vanucia-schumacher@hotmail.com>>
Date: Wednesday, 23 July 2014 9:50 AM
To: "ncl-talk@ucar.edu<mailto:ncl-talk@ucar.edu>" <ncl-talk@ucar.edu<mailto:ncl-talk@ucar.edu>>
Subject: [ncl-talk] question about satellite data

I would like to plot the values ​​corresponding to these data (sst:actual_range = -1.8f, 35.31f ;), but when I plot the variable sst, plotting the range (sst:valid_range = -500s, 4000s ;
), why?
How can I plot the range I need? -1.8 to 35.31


netcdf sst.mnmean {
dimensions:
lat = 180 ;
lon = 360 ;
time = UNLIMITED ; // (391 currently)
nbnds = 2 ;
variables:
float lat(lat) ;
lat:units = "degrees_north" ;
lat:long_name = "Latitude" ;
lat:actual_range = 89.5f, -89.5f ;
lat:standard_name = "latitude" ;
lat:axis = "Y" ;
lat:coordinate_defines = "center" ;
float lon(lon) ;
lon:units = "degrees_east" ;
lon:long_name = "Longitude" ;
lon:actual_range = 0.5f, 359.5f ;
lon:standard_name = "longitude" ;
lon:axis = "X" ;
lon:coordinate_defines = "center" ;
short sst(time, lat, lon) ;
sst:long_name = "Monthly Mean of Sea Surface Temperature" ;
sst:unpacked_valid_range = -5.f, 40.f ;
sst:actual_range = -1.8f, 35.31f ;
sst:units = "degC" ;
sst:add_offset = 0.f ;
sst:scale_factor = 0.01f ;
sst:missing_value = 32767s ;
sst:precision = 2s ;
sst:least_significant_digit = 2s ;
sst:var_desc = "Sea Surface Temperature" ;
sst:dataset = "NOAA Optimum Interpolation (OI) SST V2" ;
sst:level_desc = "Surface" ;
sst:statistic = "Mean" ;
sst:parent_stat = "Weekly Mean" ;
sst:standard_name = "sea_surface_temperature" ;
sst:cell_methods = "time: mean (monthly from weekly values interpolated to daily)" ;
sst:valid_range = -500s, 4000s ;
double time(time) ;
time:units = "days since 1800-1-1 00:00:00" ;
time:long_name = "Time" ;
time:actual_range = 66443., 78313. ;
time:delta_t = "0000-01-00 00:00:00" ;
time:avg_period = "0000-01-00 00:00:00" ;
time:prev_avg_period = "0000-00-07 00:00:00" ;
time:standard_name = "time" ;
time:axis = "T" ;
time:bounds = "time_bnds" ;
double time_bnds(time, nbnds) ;
time_bnds:long_name = "Time Boundaries" ;

// global attributes:
:title = "NOAA Optimum Interpolation (OI) SST V2" ;
:Conventions = "CF-1.0" ;
:history = "Wed Apr 6 13:47:45 2005: ncks -d time,0,278 SAVEs/sst.mnmean.nc sst.mnmean.nc\n",
"Created 10/2002 by RHS" ;
:comments = "Data described in Reynolds, R.W., N.A. Rayner, T.M.\n",
"Smith, D.C. Stokes, and W. Wang, 2002: An Improved In Situ and Satellite\n",
"SST Analysis for Climate, J. Climate" ;
:platform = "Model" ;
:source = "NCEP Climate Modeling Branch" ;
:institution = "National Centers for Environmental Prediction" ;
:references = "http://www.esrl.noaa.gov/psd/data/gridded/data.noaa.oisst.v2.html\n",
"http://www.emc.ncep.noaa.gov/research/cmb/sst_analysis/" ;
}



---
Vanúcia Schumacher
Mestranda em Meteorologia - UFV
Meteorologista -UFPel
Departamento de Meteorologia Agrícola - DEA
Cel: (31) 9978 2522
DEA: (31) 3899 1890

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk


Received on Wed Jul 23 12:01:11 2014

This archive was generated by hypermail 2.1.8 : Fri Aug 01 2014 - 15:10:55 MDT