[ncl-talk] Problem with Pressure/Height vs latitude Plots
Soumik Basu
sbasu at alaska.edu
Mon Aug 22 13:20:40 MDT 2016
Hello,
I am still having problem with getting the plots properly. My original data
was a model output and hence on sigma level so I extrapolated the data to
pressure levels. Could that be a problem?
I am still getting the following error messages.:
warning:_NhlCreateSplineCoordApprox: Attempt to create spline approximation
for Y axis failed: consider adjusting trYTensionF value
warning:IrTransInitialize: error creating spline approximation for
trYCoordPoints; defaulting to linear
warning:LlSetValues: invalid range for Y Axis log mode; setting trYLog off
Here are the resources I am using after looking at the example script for
OZONE, Sparc
:
;************************************************************************
; Resources
;***********************************************************************
res = True
res at gsnDraw = False ; don't draw individual plots
res at gsnFrame = False ; don't advance frame
res at trYReverse = True ; reverse Y axis
;---Customize contours
res at cnFillOn = True ; turn on contour fill
res at cnLineLabelsOn = False ; turn off line labels
res at cnInfoLabelOn = False ; turn off info label
res at cnFillPalette = "BlAqGrYeOrReVi200"; change the color map
res at lbLabelBarOn = False ; will add labelbar in panel
res at cnLevelSelectionMode = "ManualLevels"
;---Various titles
res at gsnRightString = ""
res at gsnLeftString = ""
;---Customize tickmarks
res at tmXTOn = False ; turn off top tickmarks
res at tmYROn = False ; turn off right tickmarks
res at tmYLMode = "Explicit" ; will explicitly label left axis
(later)
;---Now create individual resource lists for each variable
tres = res
;---Set explicit labels on left Y axis
tres at tmYLValues = (/0.005,0.01,0.03,0.05,0.1,0.3,0.5,0.7,1,5,10,\
25,50,75,100,200,500,700,850,900,1000/)
tres at tmYLLabels = "" + tres at tmYLValues
;---Fix the contour levels for both plots
temp_mnmxint = nice_mnmxintvl( min(sat_clim), max(sat_clim), 10, False)
;*********************************************
; Plot the mean of first term
;*********************************************
do ii = 0,11
plot(ii) = gsn_csm_pres_hgt(wks,sat_clim(ii,:,:),tres)
end do
;********************************************
;Panel the first two plots
;********************************************
resPanel = True
resPanel at gsnFrame = True
resPanel at gsnMaximize = True
resPanel at gsnSpreadColors = True
resPanel at gsnPanelLabelBar = True ; add color bar
resPanel at gsnPanelTop = 0.95 ; draw up to
the bdry of upper plot
resPanel at gsnPanelBottom = 0.05 ; move bottom
up so size is 0.3
resPanel at gsnPanelFigureStrings = (/"Jan","Feb","Mar","Apr",
"May","June", "July", "Aug","Sep", "Oct","Nov","Dec"/)
resPanel at gsnPanelFigureStringsFontHeightF = 0.015
resPanel at gsnPanelFigureStringsPerimOn = True
resPanel at gsnPanelFigureStringsBackgroundFillColor = -1
resPanel at lbLabelBarOn = True
resPanel at lbOrientation = "vertical"
resPanel at lbLabelAutoStride = False
resPanel at lbLabelStride = 5
resPanel at lbBoxLineThicknessF = 0.1
resPanel at lbLabelFontThicknessF = 1.75
resPanel at lbLabelFontHeightF = 0.015
resPanel at lbBoxLinesOn = False
resPanel at amJust = "TopLeft"
gsn_panel (wks,plot,(/4,3/),resPanel)
Thanks,
Soumik
On Sat, Aug 20, 2016 at 3:55 PM, Dennis Shea <shea at ucar.edu> wrote:
> Try now ... just look at the graphics code. D
>
> On Sat, Aug 20, 2016 at 2:58 PM, Soumik Basu <sbasu at alaska.edu> wrote:
>
>> Thank you Dennis.
>>
>> If I click on sparc_2.ncl it is giving an error message.
>>
>> The requested URL /Applications/Scripts/sparc_2.ncl was not found on
>> this server.
>>
>> Thanks,
>> Soumik
>>
>> On Sat, Aug 20, 2016 at 6:27 AM, Dennis Shea <shea at ucar.edu> wrote:
>>
>>> Please look at the Applications
>>>
>>> http://www.ncl.ucar.edu/Applications/
>>>
>>> Under 'Datasets' , click 'SPARC, OZONE'
>>>
>>> Look at the figures. The pressure axis extends higher than 0.01. Code is
>>> at: sparc_2.ncl
>>>
>>>
>>>
>>> On Fri, Aug 19, 2016 at 7:03 PM, Soumik Basu <sbasu at alaska.edu> wrote:
>>>
>>>> Hello ncl-users,
>>>>
>>>> I am trying to plot a pressure vs latitude plot where the pressure goes
>>>> 1000 hPa to 0.01 hPa. But if I try to plot anything above 1 hPa I am
>>>> getting a set of following errors.
>>>>
>>>> warning:_NhlCreateSplineCoordApprox: Attempt to create spline
>>>> approximation for Y axis failed: consider adjusting trYTensionF value
>>>> warning:IrTransInitialize: error creating spline approximation for
>>>> trYCoordPoints; defaulting to linear
>>>> warning:LlSetValues: invalid range for Y Axis log mode; setting trYLog
>>>> off
>>>>
>>>> Here is the resource part of my plot:
>>>>
>>>> ;***********************************************************
>>>> *************
>>>> ; Resources for the plot
>>>> ;***********************************************************
>>>> ************
>>>>
>>>> res = True
>>>>
>>>> res at gsnDraw = False
>>>> res at gsnFrame = False
>>>> res at gsnMaximize = False
>>>> res at gsnSpreadColors = True
>>>> res at gsnSpreadColors = True ; use full
>>>> colormap
>>>>
>>>> res at cnFillOn = True
>>>> res at cnLinesOn = False
>>>> res at cnLevelSelectionMode = "ManualLevels"
>>>> res at cnMinLevelValF = 180
>>>> res at cnMaxLevelValF = 300
>>>> res at cnLevelSpacingF = 2
>>>> res at cnInfoLabelOn = False ; turn
>>>> off cn info label
>>>> res at cnLineLabelsOn = False
>>>> res at cnLineLabelFontHeightF = 0.015
>>>>
>>>> res at tmLabelAutoStride = True
>>>> res at tmXTOn = False
>>>> res at tmYROn = True
>>>> res at tmXBLabelFontHeightF = 0.030
>>>> res at tmYLLabelFontHeightF = 0.030
>>>>
>>>> res at trYTensionF = 0.5
>>>> res at trYLog = True
>>>>
>>>> res at lbOrientation = "horizontal" ;vertical label bar
>>>> res at lbLabelBarOn = False
>>>> res at lbLabelAutoStride = True
>>>>
>>>>
>>>> I guess it is due to the irregular pressure axis but is there any way
>>>> to solve it and make a plot properly? Thank you for any suggestions.
>>>>
>>>> Thanks,
>>>> Soumik
>>>> --
>>>> --
>>>> "Learn from yesterday, live for today, hope for tomorrow. The important
>>>> thing is not to stop questioning." - Albert Einstein
>>>>
>>>> ************************************************************
>>>> **************************************
>>>> Dr. Soumik Basu
>>>> Post Doctoral Fellow, International Arctic Research Center, UAF,
>>>> Fairbanks, AK, USA
>>>> Nanjing University of Information Science and Technology, Nanjing, China
>>>> PhD in Atmospheric Sciences
>>>> M.Sc. in Atmospheric Sciences
>>>> Email: suvro05 at gmail.com
>>>> website: http://soumikbasu.weebly.com/
>>>>
>>>> ************************************************************
>>>> ***************************************
>>>>
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> ncl-talk at ucar.edu
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>
>>>>
>>>
>>
>>
>> --
>> --
>> "Learn from yesterday, live for today, hope for tomorrow. The important
>> thing is not to stop questioning." - Albert Einstein
>>
>> ************************************************************
>> **************************************
>> Dr. Soumik Basu
>> Post Doctoral Fellow, International Arctic Research Center, UAF,
>> Fairbanks, AK, USA
>> Nanjing University of Information Science and Technology, Nanjing, China
>> PhD in Atmospheric Sciences
>> M.Sc. in Atmospheric Sciences
>> Email: suvro05 at gmail.com
>> website: http://soumikbasu.weebly.com/
>>
>> ************************************************************
>> ***************************************
>>
>
>
--
--
"Learn from yesterday, live for today, hope for tomorrow. The important
thing is not to stop questioning." - Albert Einstein
**************************************************************************************************
Dr. Soumik Basu
Post Doctoral Fellow, International Arctic Research Center, UAF, Fairbanks,
AK, USA
Nanjing University of Information Science and Technology, Nanjing, China
PhD in Atmospheric Sciences
M.Sc. in Atmospheric Sciences
Email: suvro05 at gmail.com
website: http://soumikbasu.weebly.com/
***************************************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160822/352b98f9/attachment.html
More information about the ncl-talk
mailing list