Problem reading a Netcdf file

From: Michel <mme085_at_nyahnyahspammersnyahnyah>
Date: Fri, 7 Jul 2006 12:55:20 +0200

Hi all,
I have had some problems while trying to read a Netcdf file. The problem
1) First, I created a file to read NCEP dataset (windspeed:, calculate the monthly mean and create a Netcdf file
with these results. I have done that to prepare the file to another
person who is going to use it later. This worked perfectly! However,
when I write "print(variable)", I get values such as : -19892.56, for
example. But, when I open the output netcdf file, the values are ok,
that is, for example, 5.2 m/s.
2) I have now used the same file to calculate the 97.5% percentile of
the dataset. This time, both the print() command and the netcdf output
file give me values like -19892.56.
Perhaps there is some kind of scaling factor that is not
'activated/used' when I try to read the dataset. Even if I just try to
read the data without any calculation, I get the same numbers. It is the
first time this has happened. For example, my files start like this:
; This file is for making NetCDF files
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" ; for the
; read in netCDF file
  a = addfile("","r")
; read the data
  wind = a->wspd(:,:,:)
The print command is just to check that it is reading properly, but it
gives me the wrong value, in this case: -19676. Why is that?
Michel dos Santos Mesquita
MSc. in Geophysics - Climatology
University of Bergen - Norway
URL: <> (Check out the Blog link!)
 "If nature were not beautiful, it would not be worth studying it.
And life would not be worth living." - Henry Poincare

ncl-talk mailing list
Received on Fri Jul 07 2006 - 04:55:20 MDT

This archive was generated by hypermail 2.2.0 : Mon Jul 10 2006 - 09:18:19 MDT