The function
vrt = uv2vr_cfd (U,V,lat,lon, 3)
has the lat and lon arguments. You have not
read them into memory so they can be passed to the routine.
Also, your script says "650 mb".
There is no 650mb level in the file. NCL does not
perform automatic interpolation. You must interpolate.
The file has 500 and 600mb so, in this case you can average
Also, you are using a plot function that is set up for CE.
Do not use map corners. See: Example 3
http://www.ncl.ucar.edu/Applications/cylineq.shtml
Good luck
patton wrote:
> Dennis Shea wrote:
>> patton wrote:
>>> Hello list,
>>>
>>> I'm using :
>>>
>>> plot = gsn_csm_contour_map_overlay(wks,vrt,Hgeo,res,resh)
>>>
>>> to ploting a overlay between "Relative Vorticity and Geopotential
>>> Height"
>>>
>>> I have:
>>> .
>>> .
>>> .
>>> tf = addfile("CANUHELPME?.grib2","r")
>>> U = tf->U_GRD_GDS0_ISBL_10({650},:,:) V =
>>> tf->V_GRD_GDS0_ISBL_10({650},:,:)
>>> Hgeo = tf->HGT_GDS0_ISBL_10({650},:,:)
>>>
>>> wks = gsn_open_wks("x11","HELPMEXD") ;
>>> gsn_define_colormap(wks,"BlWhRe") scale =
>>> 1.e05 vrt =
>>> U vrt = uv2vrG_Wrap(U,V)
>>> .
>>> .
>>> .
>>> and is perfect, but is not what i want.
>>>
>>> uv2vrG_Wrap(U,V) Computes the vorticity via spherical harmonics and
>>> i need
>>> Compute it using centered finite differences.
>>>
>>> For that i founded :
>>>
>>> uv2vr_cfd() cool!! =D:::....
>>>
>>> but i tried writting:
>>> .
>>> .
>>> .
>>> scale = 1.e05 vrt =
>>> U vrt = uv2vr_cfd(U,V,:,:,3)
>>> .
>>> .
>>> .
>>> and simply i can't plot it.
>>>
>>> I have been looking for examples and more documentation about that
>>> function
>>> but... i'm lost =D.
>>>
>> ====================================
>>
>> I speculate that the coordinate variables have not been associated with
>> the vr variable as coordinate variables. Try
>> vr = *uv2vr_cfd* (u,v,lat,lon, 3)
>> printVarSummary(vr)
>> vr_at_long_name = "vorticity"
>> vr_at_units = "1/s"
>> copy_VarCoords(u,vr(
>> printVarSummary(vr)
>
> Thanks Dennis,
>
> But nothing, simply is not ploted.
>
> i dunno what i must to put like lat and lon
>
> i attach my grib and may ncl file, please look it.
>
> Regards,
>
> --
>
> Tomás Hernández C.
> ------------------------------------------------------------------------
>
> 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/shea_util.ncl" ;carga funciones extras
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>
> begin
> tf = addfile("000la.grib2","r")
> Vort = tf->ABS_V_GDS0_ISBL_10(:,:) ; 650 mb
> U = tf->U_GRD_GDS0_ISBL_10(7,:,:) ;650 MB :D!
> V = tf->V_GRD_GDS0_ISBL_10(7,:,:)
> wks = gsn_open_wks("x11","vort") ;
> gsn_define_colormap(wks,"BlWhRe") ; Change color map
>
> scale = 1.e05
>
> ; vrt = U
> ; vrt = uv2vrG (U,V)
> ;-----------
> vrt = uv2vr_cfd (U,V,lat,lon, 3)
> printVarSummary(vrt)
> vrt_at_long_name = "vorticity"
> vrt_at_units = "1/s"
> copy_VarCoords(u,vrt)
> printVarSummary(vrt)
> ;-----------
> res = True ; Set plot options
> ;------------;
> ;Plot Manager;
> res_at_pmTickMarkDisplayMode = "Always" ; Enable Map Tickmarks
> res_at_pmLabelBarWidthF = 0.1 ; Change labelbar width
> res_at_pmLegendDisplayMode = "Always" ; Turn legends on
> ;--------------;
> ;Grafical Style n;
> res_at_gsnMaximize = True ; Maximize plot in frame
> res_at_gsnSpreadColors = True ; Span full color map
> res_at_gsnSpreadColorStart = 16 ; Start at color index 14
> res_at_gsnSpreadColorEnd = -3 ; Stop at 3rd color from end
> res_at_gsnAddCyclic = False ; hace que no estire el coloreo xD
> res_at_gsnStringFontHeightF = 0.02 ; Change subtitles size
> res_at_gsnRightStringOrthogonalPosF = 0.02 ; and position
> res_at_gsnLeftStringOrthogonalPosF = 0.02
> ;-------;
> ;Contour:
> res_at_cnLevelSelectionMode = "ManualLevels" ; /"ExplicitLevels"
> res_at_cnMinLevelValF = -0.0001 ; Minimum contour level
> res_at_cnMaxLevelValF = 0.0001 ; Maximum contour level
> res_at_cnLevelSpacingF = 0.00002 ; Contour level spacing
> res_at_cnFillOn = True ; Turn on contour fill
> res_at_cnLinesOn = True ; Turn off contour lines
> res_at_cnHighLabelsOn = True ;Pone 1 etiqueta rara xD
> ;--------;
> ;Labelbar;
>
> res_at_lbBoxLinesOn = False ; Turn off labelbar box lines
> res_at_lbLabelAutoStride = True ; Control labelbar labels.
> res_at_lbOrientation = "Vertical" ; Move labelbar to sides
> res_at_lbLabelFontHeightF = 0.013 ; change labelbar height.
> res_at_lbBoxLinesOn = True ; Turn off labelbar box lines.
>
> ;----;
> ;Maps;
> res_at_mpGridAndLimbOn = True ; Turn on lat/lon grid lines
> res_at_mpGridLineDashPattern = 30 ; Lat/lon lines as dashed
> res_at_mpGridSpacingF = 5
> res_at_mpLimitMode = "Corners" ; Elige el rango del mapa a mostrar
> res_at_mpGridLineColor ="grey"
> ;CHILE
> res_at_mpLeftCornerLatF = -70
> res_at_mpLeftCornerLonF = -120
> res_at_mpRightCornerLatF = -10
> res_at_mpRightCornerLonF = -60
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> plot = gsn_csm_contour_map_ce(wks,vrt,res) ; Call the gsn_csm function for
> ; drawing contours over a map.
> end
-- ====================================================== Dennis J. Shea tel: 303-497-1361 | P.O. Box 3000 fax: 303-497-1333 | Climate Analysis Section | Climate & Global Dynamics Div. | National Center for Atmospheric Research | Boulder, CO 80307 | USA email: shea 'at' ucar.edu | ====================================================== _______________________________________________ ncl-talk mailing list ncl-talk_at_ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Thu Jan 17 2008 - 15:42:19 MST
This archive was generated by hypermail 2.2.0 : Wed Jan 23 2008 - 14:19:33 MST