NCL users -
I have been attempting to read in and plot 4x daily NCEP/NCAR
reanalysis precipitable water data. I found a previous message in this
list from 2 years ago concerning temperature data, and it was helpful
in including the add_offset and scale_factor attributes, but the
numbers still don't make sense. I assume it has something to do with
the way I am calculating PW using the offset and scale factor, but none
of my other results make sense either. The values would ideally range
from ~10 - 60 mm (kg/m2). I've included my script and the output
below.
Thank you for your help!
********************************************
Andrew Snyder
Graduate Student
Dept. of Earth and Atmospheric Sciences
Purdue University
begin
diri = "./"
fili = "pr_wtr.eatm.2002.nc"
f = addfile (diri+fili, "r")
vnam = getfilevarnames (f) ; list of variables that are in file
print (vnam)
p_wat = (f->pr_wtr)
p_wat@long_name = "Total Precipitable Water"
p_wat@units = "mm"
p_wat@scale_factor = 0.01
p_wat@add_offset = 277.65
pwat = new ((/dimsizes(p_wat)/),float,1.e+20)
; pwat = (p_wat*p_wat@scale_factor) + p_wat@add_offset
pwat = (p_wat@scale_factor * (p_wat@add_offset + p_wat))
copy_VarMeta (p_wat,pwat)
delete (p_wat)
lat2d = f->lat ; read 2d latitude grid from file
lon2d = f->lon ; read 2d longitude grid from file
pwat@lat2d = lat2d
pwat@lon2d = lon2d
min_pwat = min( pwat )
max_pwat = max( pwat )
printVarSummary(pwat)
print ("Minimum PWV = "+min_pwat+" Maximum PWV = "+max_pwat)
print (pwat(1:4,12:14,121:124))
nvars = dimsizes (pwat)
print (nvars)
end
And the important part of the output is as follows:
Variable: pwat
Type: float
Total Size: 61390080 bytes
15347520 values
Number of Dimensions: 3
Dimensions and sizes: [time | 1460] x [lat | 73] x [lon | 144]
Coordinates:
time: [17540448.. 0]
lat: [90..-90]
lon: [ 0..357.5]
Number Of Attributes: 3
lon2d : <ARRAY>
lat2d : <ARRAY>
_FillValue : 1e+20
(0) Minimum PWV = -6.60001 Maximum PWV = 277.65
Variable: pwat (subsection)
Type: float
Total Size: 192 bytes
48 values
Number of Dimensions: 3
Dimensions and sizes: [time | 4] x [lat | 3] x [lon | 4]
Coordinates:
time: [17540454..17540472]
lat: [60..55]
lon: [302.5..310]
Number Of Attributes: 3
_FillValue : 1e+20
lat2d : <ARRAY>
lon2d : <ARRAY>
(0,0,0) 8.5
(0,0,1) 8
(0,0,2) 7.399994
(0,0,3) 7.100006
(0,1,0) 7.799988
(0,1,1) 6.600006
(0,1,2) 5.899994
(0,1,3) 6.200012
(0,2,0) 5.5
(0,2,1) 4.700012
(0,2,2) 4.600006
(0,2,3) 5.399994
(1,0,0) 8.899994
(1,0,1) 8.899994
(1,0,2) 8.100006
(1,0,3) 7
(1,1,0) 7.600006
(1,1,1) 6.700012
(1,1,2) 5.899994
(1,1,3) 6
(1,2,0) 5.700012
(1,2,1) 4.899994
(1,2,2) 4.399994
(1,2,3) 4.799988
(2,0,0) 7.899994
(2,0,1) 7.700012
(2,0,2) 7.200012
(2,0,3) 6.399994
(2,1,0) 7.200012
(2,1,1) 6
(2,1,2) 5.200012
(2,1,3) 5.299988
(2,2,0) 6.399994
(2,2,1) 5.200012
(2,2,2) 4.200012
(2,2,3) 4.100006
(3,0,0) 7.600006
(3,0,1) 7.799988
(3,0,2) 7.200012
(3,0,3) 6.200012
(3,1,0) 7.200012
(3,1,1) 6.600006
(3,1,2) 5.899994
(3,1,3) 5.600006
(3,2,0) 6.399994
(3,2,1) 5.899994
(3,2,2) 5.200012
(3,2,3) 4.799988
_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2b29 : Tue Nov 09 2004 - 14:31:52 MST