Hi!
I want to use NCL to determine EOF's of CCSM surface pressure.
Before the EOF analysis I want to multiply the data with the
appropriate gaussian weights. But NCL is not content with the
dimensions of my arrays.
I would be most grateful if someone has an idea of what is wrong!
The data file contains PS from a run with CCSM3 and is available
here:
http://www.misu.su.se/~jenny/ps.b30.031.6.cam2.h0.0501-01.nc
Thanks,
Jenny Brandefelt
Output when trying to run my script:
>ncl weight.ps.ncl
Copyright (C) 1995-2004 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 4.2.0.a032
The use of this software is governed by a License Agreement.
See http://ngwww.ucar.edu/ncl/ for more details.
(0) 1
(1) 48
(2) 96
(0) 1
(1) 48
(2) 96
fatal:Assignment type mismatch, right hand side can't be coerced to type
of left hand side
fatal:Execute: Error occurred at or near line 28 in file weight.ps.ncl
The script weight.ps.ncl:
; ==============================================================
; Calculate EOFs of the Sea Level Pressure over the North Atlantic.
; ==============================================================
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"
begin
; ==============================================================
; Open the file: PS data span (year-month) 501-01 -- 501-12
; ==============================================================
f = addfile ("./ps.b30.031.6.cam2.h0.0501-01.nc", "r")
slp = f->PS
; -----------------------------------------------------------------
; create weights: sqrt(cos(lat)) [or sqrt(gw) ]
; -----------------------------------------------------------------
rad = 4.*atan(1.)/180.
clat = f->lat
clat = sqrt( cos(rad*clat) ) ; gw for gaussian grid
; -----------------------------------------------------------------
; weight all observations
; -----------------------------------------------------------------
wslp = slp ; copy meta data
tmp = slp*conform(slp, sqrt(clat), 1)
print(dimsizes(slp))
print(dimsizes(tmp))
wslp = tmp
end
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Apr 28 2006 - 08:32:09 MDT
This archive was generated by hypermail 2.2.0 : Fri Apr 28 2006 - 08:53:54 MDT