[ncl-talk] unable to plot scalar and vector quantities.
Geeta Geeta
geetag54 at yahoo.com
Wed May 27 13:26:17 MDT 2015
I have to plot the GPM height, vector wind at 850 hpa. for this i am using the
plot = gsn_csm_vector_scalar_map_ce(wks,Uwnd850,Vwnd850,GPM850,res) ; create a default plot
Following is the error. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
aditya at agniilap:~/geeta/ncl/myscripts_ncl$ ncl test.ncl
Copyright (C) 1995-2014 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.2.1
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
Variable: a
Type: file
File path: $NCARG_ROOT/lib/ncarg/data/cdf/test.nc
Number of global attributes: 6
Number of dimensions: 13
Number of variables: 107
Variable: GPM850
Type: float
Total Size: 260640 bytes
65160 values
Number of Dimensions: 2
Dimensions and sizes: [lat_0 | 181] x [lon_0 | 360]
Coordinates:
lat_0: [90..-90]
lon_0: [ 0..359]
Number Of Attributes: 13
lv_ISBL0 : 85000
initial_time : 04/23/2015 (12:00)
forecast_time_units : hours
forecast_time : 0
level_type : Isobaric surface (Pa)
parameter_template_discipline_category_number : ( 0, 0, 3, 5 )
parameter_discipline_and_category : Meteorological products, Mass
grid_type : Latitude/longitude
_FillValue : 1e+20
units : gpm
long_name : Geopotential height
production_status : Operational products
center : US National Weather Service - NCEP (WMC)
Variable: Uwnd850
Type: float
Total Size: 260640 bytes
65160 values
Number of Dimensions: 2
Dimensions and sizes: [lat_0 | 181] x [lon_0 | 360]
Coordinates:
lat_0: [90..-90]
lon_0: [ 0..359]
Number Of Attributes: 13
lv_ISBL0 : 85000
initial_time : 04/23/2015 (12:00)
forecast_time_units : hours
forecast_time : 0
level_type : Isobaric surface (Pa)
parameter_template_discipline_category_number : ( 0, 0, 2, 2 )
parameter_discipline_and_category : Meteorological products, Momentum
grid_type : Latitude/longitude
_FillValue : 1e+20
units : m s-1
long_name : U-component of wind
production_status : Operational products
center : US National Weather Service - NCEP (WMC)
Variable: Vwnd850
Type: float
Total Size: 260640 bytes
65160 values
Number of Dimensions: 2
Dimensions and sizes: [lat_0 | 181] x [lon_0 | 360]
Coordinates:
lat_0: [90..-90]
lon_0: [ 0..359]
Number Of Attributes: 13
lv_ISBL0 : 85000
initial_time : 04/23/2015 (12:00)
forecast_time_units : hours
forecast_time : 0
level_type : Isobaric surface (Pa)
parameter_template_discipline_category_number : ( 0, 0, 2, 3 )
parameter_discipline_and_category : Meteorological products, Momentum
grid_type : Latitude/longitude
_FillValue : 1e+20
units : m s-1
long_name : V-component of wind
production_status : Operational products
center : US National Weather Service - NCEP (WMC)
warning:cnFillOn is not a valid resource in ce_vector at this time
warning:cnLevelSelectionMode is not a valid resource in ce_vector at this time
warning:cnMinLevelValF is not a valid resource in ce_vector at this time
warning:cnMaxLevelValF is not a valid resource in ce_vector at this time
warning:cnLevelSpacingF is not a valid resource in ce_vector at this time
warning:cnLinesOn is not a valid resource in ce_vector at this time
I m a beginner with NCL.
Pls answer to my query.
I am attaching my script. ;************************************************
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin
a=addfile("$NCARG_ROOT/lib/ncarg/data/cdf/test.nc","r")
GPM850=a->HGT_P0_L100_GLL0(20,:,:)
Uwnd850=a->UGRD_P0_L100_GLL0(20,:,:)
Vwnd850=a->VGRD_P0_L100_GLL0(20,:,:)
printVarSummary(a)
printVarSummary(GPM850)
printVarSummary(Uwnd850)
printVarSummary(Vwnd850)
; create workstation;;;;
;
wks = gsn_open_wks("png","ce") ; open a ps file
gsn_define_colormap(wks,"BlAqGrYeOrRe") ; will open a coloured wks
res = True
;;; Contour resouces;;;;
res at cnFillOn = True ; turn on color fill
res at cnLinesOn = False ; turn of contour lines
; res at cnLevelSpacingF = 20 ; contour spacing
res at cnLevelSelectionMode = "ManualLevels" ;manually set contour levels with following 3 resources
res at cnMinLevelValF = 1400 ; set the minimum contour level
res at cnMaxLevelValF = 1600 ; set the maximum contour level
res at cnLevelSpacingF = 20
; Plotting data for a domain
res at mpMinLatF = 5.0 ; range to zoom in on
res at mpMaxLatF = 30.
res at mpMinLonF = 60.
res at mpMaxLonF = 120.
res at cnLevelSelectionMode = "ManualLevels" ; manually set the contour levels with the following 3 resources
;
; VECTOR RESOURCES
res at vcRefMagnitudeF = 4.0 ; define vector ref mag
res at vcRefLengthF = 0.045 ; define length of vec ref
res at vcRefAnnoOrthogonalPosF = -1.0 ; move ref vector
res at vcRefAnnoArrowLineColor = "black" ; change ref vector color
res at vcRefAnnoArrowUseVecColor = False ; don't use vec color for ref
plot = gsn_csm_vector_scalar_map_ce(wks,Uwnd850,Vwnd850,GPM850,res) ; create a default plot
end
Geeta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150527/a0e6615d/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.ncl
Type: application/octet-stream
Size: 2001 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150527/a0e6615d/attachment.obj
More information about the ncl-talk
mailing list