Problem with assigning units to a variable

From: Soumik Basu <sbasu_at_nyahnyahspammersnyahnyah>
Date: Thu Jul 19 2012 - 19:00:41 MDT

Hi,

I am trying to plot a vertical cross section but I am having a problem
with assigning the units of "mb" to the pressure levels.
This is the variable to which I am trying assign the unit and the error
message I am receiving.

Variable: uz_diff
Type: float
Total Size: 2800 bytes
             700 values
Number of Dimensions: 2
Dimensions and sizes: [lev | 14] x [lat | 50]
Coordinates:
Number Of Attributes: 3
   units :
   long_name :
   _FillValue : -999
fatal:No coordinate variable exists for dimension (lev) in variable
(uz_diff)
fatal:(lev) is not coordinate variable in variable(uz_diff).
fatal:Execute: Error occurred at or near line 159 in file
uz_diff_x1.ncl

Here is the part of the code doing that:

;***********************************************************
; Calculate uz difference for winter
;***********************************************************

   uz_diff = uz_var_ens - uz_var
   uz_diff@long_name = ""
   uz_diff@units = ""
   uz_diff!0 = "lev"
   uz_diff!1 = "lat"

   printVarSummary(uz_diff)
   uz_diff&lev@units = "mb"
   printVarSummary(uz_diff&lev)
   printVarSummary(uz_diff)
   printMinMax(uz_diff, True)

Can anybody please suggest me what I am doing wrong here.

Thanks,
Soumik

-- 
"Numbing the pain for a while will make it worse when you finally feel 
it.
  ~J.K. Rowling"
*****************************************
Soumik Basu
Graduate Student, Research Assistant
International Arctic Research Center
University of Alaska Fairbanks
Fairbanks,Alaska,USA
*****************************************
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jul 19 19:01:06 2012

This archive was generated by hypermail 2.1.8 : Tue Jul 24 2012 - 09:48:26 MDT