Hello,
For the first time, I'm reading in gridded (instead of station) data
that's in netCDF (instead of ascii) format, and it's not going smoothly.
The files I'm trying to work with hold daily data from the OAFlux
dataset, downloaded directly from WHOI. ncdump shows the following:
netcdf qnet_1985 {
dimensions:
time = UNLIMITED ; // (365 currently)
lat = 180 ;
lon = 360 ;
variables:
float lon(lon) ;
lon:long_name = "longitude" ;
lon:units = "degrees" ;
lon:range = "0.5 to 359.5" ;
float lat(lat) ;
lat:long_name = "latitude" ;
lat:units = "degrees" ;
lat:range = "89.5S to 89.5N" ;
int time(time) ;
time:units = "day" ;
time:comment = "Year 1985" ;
short qnet(time, lat, lon) ;
qnet:comments = "daily mean net surface heat flux,
positive downward" ;
qnet:units = "W/m^2" ;
qnet:scale_factor = 0.1 ;
qnet:missing_value = 32766. ;
netcdf ts_oaflux_1985 {
dimensions:
time = UNLIMITED ; // (365 currently)
lat = 180 ;
lon = 360 ;
variables:
float lon(lon) ;
lon:long_name = "longitude" ;
lon:units = "degrees" ;
lon:range = "0.5 to 359.5" ;
float lat(lat) ;
lat:long_name = "latitude" ;
lat:units = "degrees" ;
lat:range = "89.5S to 89.5N" ;
int time(time) ;
time:units = "day" ;
time:comment = "Year 1985" ;
short tmpsf(time, lat, lon) ;
tmpsf:comments = "daily mean sea surface temperature" ;
tmpsf:units = "degree C" ;
tmpsf:scale_factor = 0.01 ;
tmpsf:missing_value = 32766. ;
short err(time, lat, lon) ;
err:comments = "estimated error of analysed sea surface
temperature" ;
err:units = "degree C" ;
err:scale_factor = 0.01 ;
err:missing_value = 32766. ;
-----
My NCL code (derived loosely from godas_3.ncl, since I can't get the
multi-year part to work) is as follows:
----- -----
netheat_fils =
"/Volumes/Disk/papeeha/database/OAFlux/dailyWHOI/netheat_1985-2004/qnet_1985.nc"
sst_fils =
"/Volumes/Disk/papeeha/database/OAFlux/dailyWHOI/turbulence_1985-2006/ts_oaflux_1985.nc"
f1 = addfiles (netheat_fils, "r")
print(netheat_fils)
f2 = addfiles (sst_fils, "r")
print(sst_fils)
; read/unpack Qnet & SST from all yearly files
qnet = short2flt( f1[:]->qnet(:,{-40:40},{235:335}) )
printVarSummary (qnet)
sst = short2flt( f2[:]->tmpsf(:,{-40:40},{235:335}) )
printVarSummary (sst)
----- -----
I'm running version = ncl.ppc.5.1.1. A full trace of the output is
appended at the end of this email, but the key problem is the
"warning:NetOpenFile" messages and the fact that missing_value is being
reset:
----- ----- -----
warning:NetOpenFile: MissingToFillValue option set True, but
missing_value attribute and data variable (qnet) types differ: not
adding virtual _FillValue attribute
warning:NetOpenFile: MissingToFillValue option set True, but
missing_value attribute and data variable (tmpsf) types differ: not
adding virtual _FillValue attribute
warning:NetOpenFile: MissingToFillValue option set True, but
missing_value attribute and data variable (err) types differ: not adding
virtual _FillValue attribute
----- ----- -----
Why am I getting that NetOpenFile warning and missing values set to
1e+20 (see full trace for details)?
Cheers,
Leslie
----- ----- ----- -----
Full trace of NCL job:
version = ncl.ppc.5.1.1
Copyright (C) 1995-2009 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 5.1.1
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
warning:NetOpenFile: MissingToFillValue option set True, but
missing_value attribute and data variable (qnet) types differ: not
adding virtual _FillValue attribute
Variable: netheat_fils
Type: string
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
(0)
/Volumes/Disk/papeeha/database/OAFlux/dailyWHOI/netheat_1985-2004/qnet_1985.nc
warning:NetOpenFile: MissingToFillValue option set True, but
missing_value attribute and data variable (tmpsf) types differ: not
adding virtual _FillValue attribute
warning:NetOpenFile: MissingToFillValue option set True, but
missing_value attribute and data variable (err) types differ: not adding
virtual _FillValue attribute
Variable: sst_fils
Type: string
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
(0)
/Volumes/Disk/papeeha/database/OAFlux/dailyWHOI/turbulence_1985-2006/ts_oaflux_1985.nc
Variable: qnet
Type: float
Total Size: 11680000 bytes
2920000 values
Number of Dimensions: 3
Dimensions and sizes: [time | 365] x [lat | 80] x [lon | 100]
Coordinates:
time: [1..365]
lat: [-39.5..39.5]
lon: [235.5..334.5]
Number Of Attributes: 4
_FillValue : 1e+20
comments : daily mean net surface heat flux, positive downward
units : W/m^2
missing_value : 1e+20
Variable: sst
Type: float
Total Size: 11680000 bytes
2920000 values
Number of Dimensions: 3
Dimensions and sizes: [time | 365] x [lat | 80] x [lon | 100]
Coordinates:
time: [1..365]
lat: [-39.5..39.5]
lon: [235.5..334.5]
Number Of Attributes: 4
_FillValue : 1e+20
comments : daily mean sea surface temperature
units : degree C
missing_value : 1e+20
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Aug 28 2009 - 10:15:08 MDT
This archive was generated by hypermail 2.2.0 : Wed Sep 02 2009 - 12:24:39 MDT