[gradsusr] Problem with multiple surface data calculation. It becomes Entire Grid Undefined.
Muhammad Yunus Ahmad Mazuki
ukm.yunus at gmail.com
Tue Feb 20 02:36:52 EST 2018
A brief description of the problem
Hello. I'm having problem in calculating the average from multiple
surface data. The data is "NOAA Climate Data Record of Daily Mean
Upward Longwave Flux at Top of the Atmosphere". I do not plan to use
the Template capability because of 'packing issue'. While the data
mentioned before does not have packing, other data particularly ECMWF
does. The packing issue is that GrADS would only use the packing
parameter from the first file and apply it to the rest of the files in
the Template, but the packing parameters are different in each file.
Therefore leads to mistaken calculation.
The script snippet below demonstrate what I'm trying to achieve. Open
1 data file, create an empty grid, the close it. Then open each year
data file, calculate a grid value and add it to the empty grid. Then
find the average of the cumulated empty grid. Then display it. That's
when it fails, GrADS says "Cannot contour grid - all undefined
values". I can display an empty grid (it fills the display with one
colour) and each individual yearly grid if I labelled them. But
somehow when I add the yearly grid to the empty grid, I cannot display
it (the display will put up a line saying "Entire Grid Undefine").
I'm asking this here, because the same script when used with data that
contain multiple levels, it works as it intended to. It even works
with multiple level vector data. But the script doesn't work with
multiple surface data.
The simplest possible script that illustrates the problem
*This to make empty grid.
'sdfopen olr-daily_v01r02_19810101_19811231.nc'
'set lev 0'
'pentadave=olr-olr'
'close 1'
*This is to calculate sum
year.i=1
year=1981
while(year.i<=34)
'sdfopen olr-daily_v01r02_'year'0101_'year'1231.nc'
'set lev 0'
'pentad=ave(olr,time=14aug,time=18aug)'
'pentadave=pentadave+pentad'
'close 1'
year.i=year.i+1
year=year+1
endwhile
*This is to calculate the average
'sdfopen olr-daily_v01r02_19810101_19811231.nc'
'set lev 0'
'pentadave=pentadave/34'
'close 1'
*This is to display. The previous close is because there are other
data source usually.
'sdfopen olr-daily_v01r02_19810101_19811231.nc'
'd pentadave'
The error messages from GrADS
Cannot contour grid - all undefined values
I really don't know what's the problem here.
I tried this with two version of grads, the opengrads 2.1.a2.oga.1 and
grads 2.2.0 (with -d X11 -h gxdummy)
Config: v2.1.a2.oga.1 little-endian readline grib2 netcdf hdf4-sds
hdf5 opendap-grids,stn athena geotiff shapefile cairo
Grid Analysis and Display System (GrADS) Version 2.1.a2.oga.1
Copyright (c) 1988-2013 by the Institute for Global Environment and
Society (IGES)
This program is distributed WITHOUT ANY WARRANTY
See file COPYRIGHT for more information.
Built Wed Jun 4 10:00:51 EDT 2014 for x86_64-unknown-linux-gnu
This version of GrADS has been configured with the following options:
o Built on a LITTLE ENDIAN machine
o Athena Widget GUI ENABLED
o Command line editing ENABLED
http://tiswww.case.edu/php/chet/readline/rltop.html
o GRIB2 interface ENABLED
http://www.ijg.org
http://www.ece.uvic.ca/~mdadams/jasper
http://www.nco.ncep.noaa.gov/pmb/codes/GRIB2
g2clib-1.4.0
o NetCDF interface ENABLED
http://www.unidata.ucar.edu/software/netcdf
netcdf 4.3.2 of May 1 2014 23:24:51 $
o OPeNDAP gridded data interface ENABLED
o OPeNDAP station data interface ENABLED
http://iges.org/grads/gadoc/supplibs.html
libgadap 2.0.oga.1
o HDF4 and HDF5 interfaces ENABLED
http://hdfgroup.org
HDF 4.2r5
HDF5 1.8.12
o GeoTIFF and KML/TIFF output ENABLED
http://www.libtiff.org
http://geotiff.osgeo.org
o KML contour output ENABLED
o Shapefile interface ENABLED
http://shapelib.maptools.org
o Cairo graphics interface ENABLED
http://cairographics.org
http://cgit.freedesktop.org/pixman
http://www.freetype.org/index2.html
http://www.freedesktop.org/wiki/Software/fontconfig
Cairo 1.12.16
Pixman 0.28.0
Freetype 2.3.8
ga-> q config
Config: v2.2.0 little-endian readline grib2 netcdf hdf4-sds hdf5
opendap-grids,stn geotiff shapefile
Grid Analysis and Display System (GrADS) Version 2.2.0
Copyright (C) 1988-2017 by George Mason University
GrADS comes with ABSOLUTELY NO WARRANTY
See file COPYRIGHT for more information
Configured on 11/30/17 for i686-pc-linux-gnu
This build of GrADS has the following features:
-+- Byte order is LITTLE ENDIAN
-+- Athena Widget GUI DISABLED
-+- Command line editing ENABLED
-+- GRIB2 interface ENABLED g2clib-1.6.0
-+- NetCDF interface ENABLED netcdf-4.3.3
-+- OPeNDAP gridded data interface ENABLED
-+- OPeNDAP station data interface ENABLED gadap 2.1
-+- HDF4 interface ENABLED hdf-4.2r3
-+- HDF5 interface ENABLED hdf5-1.8.11
-+- KML contour output ENABLED
-+- GeoTIFF and KML/TIFF output ENABLED
-+- Shapefile interface ENABLED
The 'q gxconfig' command returns Graphics configuration information
Platform: Both on Ubuntu 16.04 64 bit
The output from running "ncdump -c" on your NetCDF file
ncdump -c olr-daily_v01r02_19810101_19811231.nc
netcdf olr-daily_v01r02_19810101_19811231 {
dimensions:
time = 365 ;
lat = 180 ;
lon = 360 ;
bnds = 2 ;
variables:
float olr(time, lat, lon) ;
olr:long_name = "NOAA Climate Data Record of Daily Mean Upward
Longwave Flux at Top of the Atmosphere" ;
olr:standard_name = "toa_outgoing_longwave_flux" ;
olr:units = "W m-2" ;
olr:_FillValue = 0.f ;
olr:missing_value = 0.f ;
olr:coordinates = "time lat lon" ;
olr:cell_methods = "time: mean area: mean" ;
olr:valid_min = 50.f ;
olr:valid_max = 500.f ;
float lon(lon) ;
lon:long_name = "longitude" ;
lon:standard_name = "longitude" ;
lon:units = "degrees_east" ;
lon:axis = "X" ;
lon:bounds = "lon_bounds" ;
float lat(lat) ;
lat:long_name = "latitude" ;
lat:standard_name = "latitude" ;
lat:units = "degrees_north" ;
lat:axis = "Y" ;
lat:bounds = "lat_bounds" ;
float time(time) ;
time:long_name = "reference time" ;
time:standard_name = "time" ;
time:units = "days since 1970-01-01 00:00:00" ;
time:axis = "T" ;
time:bounds = "time_bounds" ;
time:calendar = "standard" ;
float lon_bounds(lon, bnds) ;
lon_bounds:valid_min = 0.f ;
lon_bounds:valid_max = 360.f ;
float lat_bounds(lat, bnds) ;
lat_bounds:valid_min = -90.f ;
lat_bounds:valid_max = 90.f ;
float time_bounds(time, bnds) ;
time_bounds:valid_min = 0.f ;
time_bounds:valid_max = 32768.f ;
// global attributes:
:conventions = "CF-1.6" ;
:title = "Daily OLR CDR Product Ver01Rev02" ;
:source = "NOAA Archive of HIRS L1B data from TIROS-N Series
and MetOp-A/B, Gridsat CDR" ;
:reference = "doi:10.1175/2007JTECHA989.1
doi:10.1175/1520-0426(1989)006<0706:ATFEOL>2.0.CO;2
doi:10.1175/1520-0426(1994)011<0357:VOATFE>2.0.CO;2" ;
:history = "2014-06-13T12:13:58Z - generated by software
package Ver01Rev02." ;
:comment = "Final TCDR" ;
:Metadata_Conventions = "Unidata Dataset Discovery v1.0, CF-1.6" ;
:standard_name_vocabulary = "CF Standard Name Table (v26, 26
November 2013)" ;
:id = "olr-daily_v01r02_19810101_19811231.nc" ;
:naming_authority = "gov.noaa.ncdc" ;
:date_created = "2014-06-13T12:13:58Z" ;
:date_modified = "2014-06-13T12:13:58Z" ;
:license = "Users must cite this dataset when used as a
source. No other constraints on data access or use." ;
:summary = "The product contains the 1-degree by 1-degree
daily mean outgoing longwave radiation flux at the top of the
atmosphere derived from HIRS radiance observations onboard NOAA
TIROS-N series and MetOp satellites. The OLR retrieval uses
multispectral regression models (Ellingson et al., 1989, Lee, 2014).
The CDR processing includes HIRS radiance calibration, inter-satellite
HIRS OLR calibration, normalization of geostationary-based OLR
retrieval to HIRS, and grid-based 7-day boxcar temporal integration
assisted with Imager-based OLR derived from Gridsat CDR data (Lee,
2014)." ;
:keywords = "Earth Science > Atmosphere > Atmospheric
Radiation > Outgoing Longwave Radiation" ;
:keywords_vocabulary = "NASA Global Change Master Directory
(GCMD) Earth Science Keywords, Version 8.0.0.0" ;
:cdm_data_type = "Grid" ;
:project = "NOAA Daily OLR TCDR" ;
:processing_level = "NOAA Level 3" ;
:creator_name = "Hai-Tien Lee" ;
:creator_URL = "http://cicsmd.umd.edu/" ;
:creator_email = "lee at umd.edu" ;
:institution = "UMD/ESSIC > Earth System Science
Interdisciplinary Center, University of Maryland" ;
:geospatial_lat_min = "-90.0" ;
:geospatial_lat_max = "90.0" ;
:geospatial_lon_min = "0.0" ;
:geospatial_lon_max = "360.0" ;
:geospatial_lat_units = "degree" ;
:geospatial_lat_resolution = "1.0" ;
:geospatial_lon_units = "degree" ;
:geospatial_lon_resolution = "1.0" ;
:time_coverage_start = "1981-01-01T00:00:00.00Z" ;
:time_coverage_end = "1981-12-31T23:59:59.99Z" ;
:time_coverage_duration = "P365D" ;
:time_coverage_resolution = "P1D" ;
:contributor_name = "Hai-Tien Lee" ;
:contributor_role = "principalinvestigator" ;
:acknowledgment = "This project was supported in part by a
grant from the NOAA Climate Data Record (CDR) Program for Satellites"
;
:cdr_program = "NOAA Climate Data Record Program for satellites" ;
:cdr_variable = "olr" ;
:software_version_id = "Ver01Rev02" ;
:Metadata_Link = "gov.noaa.ncdc:C00875" ;
:product_version = "Ver01Rev02" ;
:platform = "TIROS-N > Television Infrared Observation
Satellite - N, NOAA-6 > National Oceanic Atmospheric Administration -
6, NOAA-7 > National Oceanic Atmospheric Administration - 7, NOAA-8 >
National Oceanic Atmospheric Administration - 8, NOAA-9 > National
Oceanic Atmospheric Administration - 9, NOAA-10 > National Oceanic
Atmospheric Administration - 10, NOAA-11 > National Oceanic
Atmospheric Administration - 11, NOAA-12 > National Oceanic
Atmospheric Administration - 12, NOAA-14 > National Oceanic
Atmospheric Administration - 14, NOAA-15 > National Oceanic
Atmospheric Administration - 15, NOAA-16 > National Oceanic
Atmospheric Administration - 16, NOAA-17 > National Oceanic
Atmospheric Administration - 17, NOAA-18 > National Oceanic
Atmospheric Administration - 18, NOAA-19 > National Oceanic
Atmospheric Administration - 19, MetOp-A > Meteorological Operational
Polar Satellite - A, MetOp-B > Meteorological Operational Polar
Satellite - B" ;
:sensor = "HIRS-2 > High Resolution Infra-red Sounder/2,
HIRS-2I > High Resolution Infra-red Sounder/2I, HIRS-3 > High
Resolution Infra-red Sounder/3, HIRS-4 > High Resolution Infra-red
Sounder/4" ;
:spatial_resolution = "1.0 by 1.0 degree equal angle" ;
data:
lon = 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5,
13.5, 14.5, 15.5, 16.5, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5, 24.5,
25.5, 26.5, 27.5, 28.5, 29.5, 30.5, 31.5, 32.5, 33.5, 34.5, 35.5, 36.5,
37.5, 38.5, 39.5, 40.5, 41.5, 42.5, 43.5, 44.5, 45.5, 46.5, 47.5, 48.5,
49.5, 50.5, 51.5, 52.5, 53.5, 54.5, 55.5, 56.5, 57.5, 58.5, 59.5, 60.5,
61.5, 62.5, 63.5, 64.5, 65.5, 66.5, 67.5, 68.5, 69.5, 70.5, 71.5, 72.5,
73.5, 74.5, 75.5, 76.5, 77.5, 78.5, 79.5, 80.5, 81.5, 82.5, 83.5, 84.5,
85.5, 86.5, 87.5, 88.5, 89.5, 90.5, 91.5, 92.5, 93.5, 94.5, 95.5, 96.5,
97.5, 98.5, 99.5, 100.5, 101.5, 102.5, 103.5, 104.5, 105.5, 106.5, 107.5,
108.5, 109.5, 110.5, 111.5, 112.5, 113.5, 114.5, 115.5, 116.5, 117.5,
118.5, 119.5, 120.5, 121.5, 122.5, 123.5, 124.5, 125.5, 126.5, 127.5,
128.5, 129.5, 130.5, 131.5, 132.5, 133.5, 134.5, 135.5, 136.5, 137.5,
138.5, 139.5, 140.5, 141.5, 142.5, 143.5, 144.5, 145.5, 146.5, 147.5,
148.5, 149.5, 150.5, 151.5, 152.5, 153.5, 154.5, 155.5, 156.5, 157.5,
158.5, 159.5, 160.5, 161.5, 162.5, 163.5, 164.5, 165.5, 166.5, 167.5,
168.5, 169.5, 170.5, 171.5, 172.5, 173.5, 174.5, 175.5, 176.5, 177.5,
178.5, 179.5, 180.5, 181.5, 182.5, 183.5, 184.5, 185.5, 186.5, 187.5,
188.5, 189.5, 190.5, 191.5, 192.5, 193.5, 194.5, 195.5, 196.5, 197.5,
198.5, 199.5, 200.5, 201.5, 202.5, 203.5, 204.5, 205.5, 206.5, 207.5,
208.5, 209.5, 210.5, 211.5, 212.5, 213.5, 214.5, 215.5, 216.5, 217.5,
218.5, 219.5, 220.5, 221.5, 222.5, 223.5, 224.5, 225.5, 226.5, 227.5,
228.5, 229.5, 230.5, 231.5, 232.5, 233.5, 234.5, 235.5, 236.5, 237.5,
238.5, 239.5, 240.5, 241.5, 242.5, 243.5, 244.5, 245.5, 246.5, 247.5,
248.5, 249.5, 250.5, 251.5, 252.5, 253.5, 254.5, 255.5, 256.5, 257.5,
258.5, 259.5, 260.5, 261.5, 262.5, 263.5, 264.5, 265.5, 266.5, 267.5,
268.5, 269.5, 270.5, 271.5, 272.5, 273.5, 274.5, 275.5, 276.5, 277.5,
278.5, 279.5, 280.5, 281.5, 282.5, 283.5, 284.5, 285.5, 286.5, 287.5,
288.5, 289.5, 290.5, 291.5, 292.5, 293.5, 294.5, 295.5, 296.5, 297.5,
298.5, 299.5, 300.5, 301.5, 302.5, 303.5, 304.5, 305.5, 306.5, 307.5,
308.5, 309.5, 310.5, 311.5, 312.5, 313.5, 314.5, 315.5, 316.5, 317.5,
318.5, 319.5, 320.5, 321.5, 322.5, 323.5, 324.5, 325.5, 326.5, 327.5,
328.5, 329.5, 330.5, 331.5, 332.5, 333.5, 334.5, 335.5, 336.5, 337.5,
338.5, 339.5, 340.5, 341.5, 342.5, 343.5, 344.5, 345.5, 346.5, 347.5,
348.5, 349.5, 350.5, 351.5, 352.5, 353.5, 354.5, 355.5, 356.5, 357.5,
358.5, 359.5 ;
lat = -89.5, -88.5, -87.5, -86.5, -85.5, -84.5, -83.5, -82.5, -81.5, -80.5,
-79.5, -78.5, -77.5, -76.5, -75.5, -74.5, -73.5, -72.5, -71.5, -70.5,
-69.5, -68.5, -67.5, -66.5, -65.5, -64.5, -63.5, -62.5, -61.5, -60.5,
-59.5, -58.5, -57.5, -56.5, -55.5, -54.5, -53.5, -52.5, -51.5, -50.5,
-49.5, -48.5, -47.5, -46.5, -45.5, -44.5, -43.5, -42.5, -41.5, -40.5,
-39.5, -38.5, -37.5, -36.5, -35.5, -34.5, -33.5, -32.5, -31.5, -30.5,
-29.5, -28.5, -27.5, -26.5, -25.5, -24.5, -23.5, -22.5, -21.5, -20.5,
-19.5, -18.5, -17.5, -16.5, -15.5, -14.5, -13.5, -12.5, -11.5, -10.5,
-9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5,
2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5,
15.5, 16.5, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5, 24.5, 25.5, 26.5,
27.5, 28.5, 29.5, 30.5, 31.5, 32.5, 33.5, 34.5, 35.5, 36.5, 37.5, 38.5,
39.5, 40.5, 41.5, 42.5, 43.5, 44.5, 45.5, 46.5, 47.5, 48.5, 49.5, 50.5,
51.5, 52.5, 53.5, 54.5, 55.5, 56.5, 57.5, 58.5, 59.5, 60.5, 61.5, 62.5,
63.5, 64.5, 65.5, 66.5, 67.5, 68.5, 69.5, 70.5, 71.5, 72.5, 73.5, 74.5,
75.5, 76.5, 77.5, 78.5, 79.5, 80.5, 81.5, 82.5, 83.5, 84.5, 85.5, 86.5,
87.5, 88.5, 89.5 ;
time = 4018.5, 4019.5, 4020.5, 4021.5, 4022.5, 4023.5, 4024.5, 4025.5,
4026.5, 4027.5, 4028.5, 4029.5, 4030.5, 4031.5, 4032.5, 4033.5, 4034.5,
4035.5, 4036.5, 4037.5, 4038.5, 4039.5, 4040.5, 4041.5, 4042.5, 4043.5,
4044.5, 4045.5, 4046.5, 4047.5, 4048.5, 4049.5, 4050.5, 4051.5, 4052.5,
4053.5, 4054.5, 4055.5, 4056.5, 4057.5, 4058.5, 4059.5, 4060.5, 4061.5,
4062.5, 4063.5, 4064.5, 4065.5, 4066.5, 4067.5, 4068.5, 4069.5, 4070.5,
4071.5, 4072.5, 4073.5, 4074.5, 4075.5, 4076.5, 4077.5, 4078.5, 4079.5,
4080.5, 4081.5, 4082.5, 4083.5, 4084.5, 4085.5, 4086.5, 4087.5, 4088.5,
4089.5, 4090.5, 4091.5, 4092.5, 4093.5, 4094.5, 4095.5, 4096.5, 4097.5,
4098.5, 4099.5, 4100.5, 4101.5, 4102.5, 4103.5, 4104.5, 4105.5, 4106.5,
4107.5, 4108.5, 4109.5, 4110.5, 4111.5, 4112.5, 4113.5, 4114.5, 4115.5,
4116.5, 4117.5, 4118.5, 4119.5, 4120.5, 4121.5, 4122.5, 4123.5, 4124.5,
4125.5, 4126.5, 4127.5, 4128.5, 4129.5, 4130.5, 4131.5, 4132.5, 4133.5,
4134.5, 4135.5, 4136.5, 4137.5, 4138.5, 4139.5, 4140.5, 4141.5, 4142.5,
4143.5, 4144.5, 4145.5, 4146.5, 4147.5, 4148.5, 4149.5, 4150.5, 4151.5,
4152.5, 4153.5, 4154.5, 4155.5, 4156.5, 4157.5, 4158.5, 4159.5, 4160.5,
4161.5, 4162.5, 4163.5, 4164.5, 4165.5, 4166.5, 4167.5, 4168.5, 4169.5,
4170.5, 4171.5, 4172.5, 4173.5, 4174.5, 4175.5, 4176.5, 4177.5, 4178.5,
4179.5, 4180.5, 4181.5, 4182.5, 4183.5, 4184.5, 4185.5, 4186.5, 4187.5,
4188.5, 4189.5, 4190.5, 4191.5, 4192.5, 4193.5, 4194.5, 4195.5, 4196.5,
4197.5, 4198.5, 4199.5, 4200.5, 4201.5, 4202.5, 4203.5, 4204.5, 4205.5,
4206.5, 4207.5, 4208.5, 4209.5, 4210.5, 4211.5, 4212.5, 4213.5, 4214.5,
4215.5, 4216.5, 4217.5, 4218.5, 4219.5, 4220.5, 4221.5, 4222.5, 4223.5,
4224.5, 4225.5, 4226.5, 4227.5, 4228.5, 4229.5, 4230.5, 4231.5, 4232.5,
4233.5, 4234.5, 4235.5, 4236.5, 4237.5, 4238.5, 4239.5, 4240.5, 4241.5,
4242.5, 4243.5, 4244.5, 4245.5, 4246.5, 4247.5, 4248.5, 4249.5, 4250.5,
4251.5, 4252.5, 4253.5, 4254.5, 4255.5, 4256.5, 4257.5, 4258.5, 4259.5,
4260.5, 4261.5, 4262.5, 4263.5, 4264.5, 4265.5, 4266.5, 4267.5, 4268.5,
4269.5, 4270.5, 4271.5, 4272.5, 4273.5, 4274.5, 4275.5, 4276.5, 4277.5,
4278.5, 4279.5, 4280.5, 4281.5, 4282.5, 4283.5, 4284.5, 4285.5, 4286.5,
4287.5, 4288.5, 4289.5, 4290.5, 4291.5, 4292.5, 4293.5, 4294.5, 4295.5,
4296.5, 4297.5, 4298.5, 4299.5, 4300.5, 4301.5, 4302.5, 4303.5, 4304.5,
4305.5, 4306.5, 4307.5, 4308.5, 4309.5, 4310.5, 4311.5, 4312.5, 4313.5,
4314.5, 4315.5, 4316.5, 4317.5, 4318.5, 4319.5, 4320.5, 4321.5, 4322.5,
4323.5, 4324.5, 4325.5, 4326.5, 4327.5, 4328.5, 4329.5, 4330.5, 4331.5,
4332.5, 4333.5, 4334.5, 4335.5, 4336.5, 4337.5, 4338.5, 4339.5, 4340.5,
4341.5, 4342.5, 4343.5, 4344.5, 4345.5, 4346.5, 4347.5, 4348.5, 4349.5,
4350.5, 4351.5, 4352.5, 4353.5, 4354.5, 4355.5, 4356.5, 4357.5, 4358.5,
4359.5, 4360.5, 4361.5, 4362.5, 4363.5, 4364.5, 4365.5, 4366.5, 4367.5,
4368.5, 4369.5, 4370.5, 4371.5, 4372.5, 4373.5, 4374.5, 4375.5, 4376.5,
4377.5, 4378.5, 4379.5, 4380.5, 4381.5, 4382.5 ;
More information about the gradsusr
mailing list