Hi,
I want to read out a slice of netcdf data in multi daily files in the Netcdf format.However, it seems the the Leap Year with 366 days are skipped and the slice of the daily date is also can not be read out.
So, my questions in details are:
1) Can NCL read multi daily NC formate data?
2) Can NCL read out a slice of multi daily NC formate datas?
The following is my code & the error message (any help is appreciated):
;----------------------------------------------------------------------------
$>ncl +x t.ncl
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.
Loading file "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
+
Loading file "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
+
Loading file "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
+
Loading file "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
+
+ begin
+ diri = "/media/DATA/NCEP/ncep.reanalysis.dailyavgs/pressure/" ; input directory
+ fils = systemfunc ("ls "+diri+"hgt.196?.nc") ; file paths
+ print(fils)
+ f = addfiles (fils, "r")
+
+ ListSetType (f, "join") ; join
+ print(f)
+
+ h = f[:]->hgt ; in this step, it seems the the Leap Year with 366 days are skipped
+ printVarSummary (h)
+ h2 = f[:]->hgt(:,{500},{0:90},:) ; This is line 16 and shows :"fatal:Execute: Error occurred at or near line 16 in file t.ncl "
+ printVarSummary(h2)
+
+ end
Variable: fils
Type: string
Total Size: 80 bytes
10 values
Number of Dimensions: 1
Dimensions and sizes: [10]
Coordinates:
(0) /media/DATA/NCEP/ncep.reanalysis.dailyavgs/pressure/hgt.1960.nc
(1) /media/DATA/NCEP/ncep.reanalysis.dailyavgs/pressure/hgt.1961.nc
(2) /media/DATA/NCEP/ncep.reanalysis.dailyavgs/pressure/hgt.1962.nc
(3) /media/DATA/NCEP/ncep.reanalysis.dailyavgs/pressure/hgt.1963.nc
(4) /media/DATA/NCEP/ncep.reanalysis.dailyavgs/pressure/hgt.1964.nc
(5) /media/DATA/NCEP/ncep.reanalysis.dailyavgs/pressure/hgt.1965.nc
(6) /media/DATA/NCEP/ncep.reanalysis.dailyavgs/pressure/hgt.1966.nc
(7) /media/DATA/NCEP/ncep.reanalysis.dailyavgs/pressure/hgt.1967.nc
(8) /media/DATA/NCEP/ncep.reanalysis.dailyavgs/pressure/hgt.1968.nc
(9) /media/DATA/NCEP/ncep.reanalysis.dailyavgs/pressure/hgt.1969.nc
Variable: f
Type: list
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
warning:File /media/DATA/NCEP/ncep.reanalysis.dailyavgs/pressure/hgt.1968.nc dimension sizes do not conform to others in list; skipping file
warning:File /media/DATA/NCEP/ncep.reanalysis.dailyavgs/pressure/hgt.1964.nc dimension sizes do not conform to others in list; skipping file
warning:File /media/DATA/NCEP/ncep.reanalysis.dailyavgs/pressure/hgt.1960.nc dimension sizes do not conform to others in list; skipping file
Variable: h
Type: short
Total Size: 913177440 bytes
456588720 values
Number of Dimensions: 5
Dimensions and sizes: [ncl_join | 7] x [time | 365] x [level | 17] x [lat | 73] x [lon | 144]
Coordinates:
time: [17181048..17189784]
level: [1000..10]
lat: [90..-90]
lon: [ 0..357.5]
Number Of Attributes: 17
long_name : mean Daily Geopotential height
actual_range : ( -438, 32316 )
valid_range : ( -700, 35000 )
units : m
add_offset : 32066
scale_factor : 1
missing_value : 32766
precision : 0
least_significant_digit : 0
GRIB_id : 7
GRIB_name : HGT
var_desc : Geopotential height
H
dataset : NCEP Reanalysis Daily Averages
AJ
level_desc : Multiple levels
F
statistic : Mean
M
parent_stat : Individual Obs
I
_FillValue : 32766
warning:File /media/DATA/NCEP/ncep.reanalysis.dailyavgs/pressure/hgt.1968.nc dimension sizes do not conform to others in list; skipping file
warning:File /media/DATA/NCEP/ncep.reanalysis.dailyavgs/pressure/hgt.1964.nc dimension sizes do not conform to others in list; skipping file
warning:File /media/DATA/NCEP/ncep.reanalysis.dailyavgs/pressure/hgt.1960.nc dimension sizes do not conform to others in list; skipping file
fatal:Number of subscripts on rhs do not match number of dimensions of aggregated join type variable, (4) Subscripts used, (5) Subscripts expected
fatal:Execute: Error occurred at or near line 16 in file t.ncl
;----------------------------------------------------------------------------
Yours,
Li
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jan 5 05:52:18 2010
This archive was generated by hypermail 2.1.8 : Wed Jan 06 2010 - 17:07:10 MST