[ncl-talk] Error with irregular vertical levels

Prashanth Bhalachandran prashanth.bhalachandran at gmail.com
Sun Jan 6 10:33:12 MST 2019


Dear NCL experts, 
Can someone please help me with this? 

> I am writing to you because I have a problem regarding the depiction of my vertical levels in an R-Z plot. My height values are not uniformly distributed (35, 50, 100, 500, 1000, 2000, 5000 etc). And as a result of this, my R-Z plot shows up as:
>  <Msurfaces_twopanels.jpeg>
> 
> Now, I’d like to adjust my vertical levels such that they are evenly spaced. I tried to set the resource gsnYAxisIrregular2Linear to ‘True’, but I get the following error: 
> Assignment type mismatch, right hand side can't be coerced to type of left hand side
> 
> plot(0) = gsn_csm_contour(wks,Maz(time1,:,:),res)


I am having a problem with the gsnYAxisIrregular2Linear function. The code runs perfectly fine except for this one option. I have attached my code and the error message. 

Please advise. 
Error message: 
ncl -n -Q msurface.ncl 

Variable: Maz (subsection)
Type: float
Total Size: 46956 bytes
            11739 values
Number of Dimensions: 2
Dimensions and sizes:	[Level | 39] x [301]
Coordinates: 
            Level: [35..20000]
Number Of Attributes: 2
  average_op_ncl :	dim_avg_n function was applied
  _FillValue :	1e+25
fatal:["NclVar.c":1390]:Assignment type mismatch, right hand side can't be coerced to type of left hand side
fatal:["Execute.c":8640]:Execute: Error occurred at or near line 1066 in file /apps/cent7/ncl/6.4.0/lib/ncarg/nclscripts/csm/gsn_code.ncl

fatal:["Execute.c":8640]:Execute: Error occurred at or near line 9485 in file /apps/cent7/ncl/6.4.0/lib/ncarg/nclscripts/csm/gsn_code.ncl

fatal:["Execute.c":8640]:Execute: Error occurred at or near line 13393 in file /apps/cent7/ncl/6.4.0/lib/ncarg/nclscripts/csm/gsn_csm.ncl

fatal:["Execute.c":8640]:Execute: Error occurred at or near line 81 in file msurface.ncl


Sincerely, 
Prashanth


> On Dec 1, 2018, at 5:43 PM, Prashanth Bhalachandran <prashanth.bhalachandran at gmail.com> wrote:
> 
> Dear NCL experts, 
> I am writing to you because I have a problem regarding the depiction of my vertical levels in an R-Z plot. My height values are not uniformly distributed (35, 50, 100, 500, 1000, 2000, 5000 etc). And as a result of this, my R-Z plot shows up as:
>  <Msurfaces_twopanels.jpeg>
> 
> Now, I’d like to adjust my vertical levels such that they are evenly spaced. I tried to set the resource gsnYAxisIrregular2Linear to ‘True’, but I get the following error: 
> Assignment type mismatch, right hand side can't be coerced to type of left hand side
> 
> plot(0) = gsn_csm_contour(wks,Maz(time1,:,:),res)
> 
> Variable: Maz (subsection)
> Type: float
> Total Size: 46956 bytes
>             11739 values
> Number of Dimensions: 2
> Dimensions and sizes:	[Level | 39] x [301]
> Coordinates: 
>             Level: [35..20000]
> Number Of Attributes: 2
>   average_op_ncl :	dim_avg_n function was applied
>   _FillValue :	1e+25
> 
> Can you please tell me how to resolve this? 
> 
> Thank you, 
> Prashanth

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190106/4da41c28/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: msurface.ncl
Type: application/octet-stream
Size: 3642 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190106/4da41c28/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190106/4da41c28/attachment-0001.html>


More information about the ncl-talk mailing list