[ncl-talk] Problem with wkSpaceTime_3.ncl - Dimension size mismatch in diagnosctics_cam.ncl
Thomas Schwitalla
thomas.schwitalla at uni-hohenheim.de
Thu Apr 5 05:30:34 MDT 2018
Hello,
I try to run the wkSpaceTime_3.ncl script with NCL 6.4 with OLR from WRF
output files. I have a time series of 141 days with 12h intervals.
When running the script, the output is the following:
Variable: x (parameter)
Type: float
Total Size: 59483952 bytes
14870988 values
Number of Dimensions: 3
Dimensions and sizes: [Time | 282] x [lat | 66] x [lon | 799]
Coordinates:
lat: [-14.675..14.575]
lon: [-179.55..179.55]
Number Of Attributes: 6
coordinates : XLONG XLAT XTIME
stagger :
units : W m-2
description : TOA OUTGOING LONG WAVE
MemoryOrder : XY
FieldType : 104
(0)
(0) TOA OUTGOING LONG WAVE (W m-2) : min=66.8377 max=392.351
(0) ===> Post removal of trend and signal <===
Variable: x (parameter)
Type: float
Total Size: 59483952 bytes
14870988 values
Number of Dimensions: 3
Dimensions and sizes: [Time | 282] x [lat | 66] x [lon | 799]
Coordinates:
lat: [-14.675..14.575]
lon: [-179.55..179.55]
Number Of Attributes: 6
coordinates : XLONG XLAT XTIME
stagger :
units : W m-2
description : TOA OUTGOING LONG WAVE
MemoryOrder : XY
FieldType : 104
(0)
(0) TOA OUTGOING LONG WAVE (W m-2) : min=14.4336 max=390.484
Variable: xAS
Type: float
Total Size: 59483952 bytes
14870988 values
Number of Dimensions: 3
Dimensions and sizes: [lat | 66] x [lon | 799] x [Time | 282]
Coordinates:
lat: [-14.675..14.575]
lon: [-179.55..179.55]
Number Of Attributes: 2
long_name : antisymmetric & symmetric (separate hemispheres)
units : W m-2
(0)
(0) antisymmetric & symmetric (separate hemispheres) (W m-2) :
min=-139.037 max=366.622
(0) ==============> nl=0 <==============
(0) nw=0 ntStrt=0 ntLast=191
fatal:Dimension size mismatch, dimension (1) of left hand side reference
does not have the same size as the right hand side reference after
subscripting.
fatal:["Execute.c":8640]:Execute: Error occurred at or near line 240 in
file $NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl
fatal:["Execute.c":8640]:Execute: Error occurred at or near line 738 in
file $NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl
fatal:["Execute.c":8640]:Execute: Error occurred at or near line 54 in
file wk_space_time3.ncl
My script is the following:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl"
case = "TEST"
diro = "./" ; output dir: location of plots
latN = 15
latS = -latN ; symmetric about the equator
nDayWin = 96 ; Wheeler-Kiladis [WK] temporal window length (days)
nDaySkip = -10 ; time (days) between temporal windows [segments]
; negative means there will be overlapping
; temporal segments
opt = True
opt at debug= True
opt at pltType = "eps"
opt at cnLinesOn = False ; turn off contour lines
; specify the plot intervals
spd = 2 ; samples per day (12 hour sampling rate for testing)
var = "OLR" ; user specified
all_files = systemfunc ("ls surface_d01_2015-02-[12]?_0[0]_00_00
surface_d01_2015-02-[12]?_1[2]_00_00
surface_d01_2015-0[3456]-??_0[0]_00_00
surface_d01_2015-0[3456]-??_1[2]_00_00")
;---Open files using addfiles
file_list = addfiles (all_files, "r")
;---Read "pottmp" in "join" mode and print a summary of the variable
ListSetType (file_list, "cat")
olr2 = file_list[:]->OLR(:,:,:)
single_file = systemfunc ("ls LAT_LON_50km.nc")
coordinates_file = addfile(single_file,"r")
longitude = coordinates_file->XLONG(0,0,:)
latitude= coordinates_file->XLAT(0,:,0)
olr2!1 = "lat"
olr2!2 = "lon"
olr2&lat = latitude
olr2&lon = longitude
olr = olr2(:,{latS:latN},:) ; (time,lat,lon)
delete(olr2)
; calculation and create plots
wkSpaceTime (olr, diro, case, var \
,latN, spd, nDayWin, nDaySkip, opt )
The dimension numbering in the "resolveWavesHayashi" part of
diagnostics_cam.ncl confuses me a little bit.
Regards,
Thomas
--
Dr. Thomas Schwitalla
Institute of Physics and Meteorology
University of Hohenheim
Garbenstrasse 30
70599 Stuttgart
Germany
Tel.: +49 711 459 22145
More information about the ncl-talk
mailing list