Re: gsn_csm_contour_map and WRF

From: Rick Brownrigg <brownrig_at_nyahnyahspammersnyahnyah>
Date: Mon Jan 30 2012 - 13:21:49 MST

Good deal. That's most likely a bug…I'll file a ticket as such. Thanks for the reply!

RB
On Jan 30, 2012, at 1:21 PM, Nick Silverman wrote:

> Wow...you nailed it first try. I guess it needs a float...thanks so much for the help.
>
> Nick
>
> ________________________________________________________________________
> Nick Silverman
> Watershed Hydrology Lab
> University of Montana
> 406-233-9321
>
>
> On 01/30/2012 01:07 PM, Rick Brownrigg wrote:
>> Hi Nick,
>>
>> I don't know for certain, but you might try to place a decimal point after "1" on the line
>>
>> res@gsnPaperMargin = 1
>>
>> (i.e., res@gsnPaperMargin = 1.0 )
>>
>> I'll be curious to know the result…
>> Rick
>>
>>
>> On Jan 30, 2012, at 12:58 PM, Nick Silverman wrote:
>>
>>> I am unable to plot to anything but x11 or png when I use the
>>>
>>> gsn_csm_contour_map for WRF output data. Has anybody had similar
>>> problems? Here are the fatal errors I get:
>>>
>>> fatal:["NclVar.c":1376]:Assignment type mismatch, right hand side can't
>>> be coerced to type of left hand side
>>>
>>> fatal:Execute: Error occurred at or near line 2830 in file
>>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl
>>>
>>> fatal:Execute: Error occurred at or near line 3058 in file
>>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl
>>>
>>> fatal:Execute: Error occurred at or near line 6867 in file
>>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl
>>>
>>> fatal:Execute: Error occurred at or near line 9995 in file
>>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl
>>>
>>> fatal:Execute: Error occurred at or near line 66 in file dem_bug.ncl
>>>
>>>
>>> And the code is:
>>> ; ------------------------------------------
>>> ; Script : dem.ncl
>>> ; Created on : Nov 16, 2011 12:12:20 PM
>>> ; Author : Nick Silverman, UM Watershed Hydrology Lab
>>> ; ------------------------------------------
>>> ; Description:
>>> ; Purpose of the script is to produce a DEM of WRF domain.
>>>
>>> ; ------------------------------------------
>>>
>>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>>>
>>> begin
>>>
>>> ;------------------------set wrf data paths and
>>> files---------------------------
>>>
>>> wrf_out = "$WRF_DATA_EXT/2000/wrfout_d03_2000-01-01_04.nc"
>>>
>>> ;---------------------------read in wrf
>>> variables-------------------------------
>>>
>>> ; read in variables
>>> wrf = addfile(wrf_out, "r")
>>>
>>> ; import values from WRF
>>> Z = wrf->HGT(0,:,:)
>>> lat_wrf = wrf->XLAT(0,:,:)
>>> lon_wrf = wrf->XLONG(0,:,:)
>>>
>>> ;-----------------------------------plot----------------------------------------
>>> ; for some reason this script does not plot ps...only x11 and png
>>> wks = gsn_open_wks("ps", "dem")
>>> gsn_define_colormap(wks, "OceanLakeLandSnow")
>>>
>>> res = True
>>> res@cnFillOn = True
>>> res@cnLinesOn = True
>>> res@gsnSpreadColors = True
>>> res@gsnPaperMargin = 1
>>> res@gsnMaximize = True
>>> res@pmTickMarkDisplayMode = "Always"
>>> res@gsnAddCyclic = False
>>> res@sfXArray = lon_wrf
>>> res@sfYArray = lat_wrf
>>> res@mpLimitMode = "LatLon"
>>> res@cnLevelSelectionMode = "AutomaticLevels"
>>> res@cnLevelSpacingF = 10
>>> res@mpMinLatF = 44.65
>>> res@mpMaxLatF = 48.9
>>> res@mpMinLonF = -115.8
>>> res@mpMaxLonF = -111
>>> res@tiMainString = "Digital Elevation Model"
>>>
>>> plot = gsn_csm_contour_map(wks, Z, res)
>>>
>>> end
>>>
>>> Thanks for any help on this one.
>>>
>>> Nick
>>>
>>> --
>>> ________________________________________________________________________
>>> Nick Silverman
>>> Watershed Hydrology Lab
>>> University of Montana
>>> 406-233-9321
>>>
>>>
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jan 31 01:21:59 2012

This archive was generated by hypermail 2.1.8 : Thu Feb 02 2012 - 03:10:31 MST