Hello All,
I am new to learning NCL and am having some trouble producing a plot
from a netCDF file. When I run a script based on a contour example
I get a map and a color bar, but no field contours. I suspect that
the problem is with the coordinates: the longitude runs from
-180 to 180, vs. 0 to 360.
Would this longitude description cause a problem?
Any suggestions on which method to use to re-grid?
Thank you, Matt
I included the script used below.
-------------------------------------------------------------------------------------------
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/contributed.ncl"
begin
in = addfile("./AGCM_RESTART39.nc","r")
lon = in->longitude
lat = in->latitude
sigma = in->sigma
time = in->agcm_time
theta = in->theta_agcm
theta!0 = "time"
theta!1 = "sigma"
theta!2 = "lat"
theta!3 = "lon"
theta&lat@units="degrees_north"
theta&lon@units="degrees_east"
wks = gsn_open_wks("x11","contour_plot")
res = True
res@cnFillOn = True
res@gsnSpreadColors = True
res@gsnAddCyclic = False
plot = gsn_csm_contour_map(wks,theta(0,0,:,:),res)
end
----------------------------------------------------------------------------------------------------
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Sep 19 15:27:15 2012
This archive was generated by hypermail 2.1.8 : Fri Sep 21 2012 - 16:22:29 MDT