Hi all,
This is my first time trying to regrid my data and I am having problems
using one of the example scripts (regrid_1.ncl). I am just trying to use
the script to learn how regridding works and I get an error early on
saying- fatal:(lat) is not a named dimension in variable (sst). I have
put a copy of my script below, if anyone has any advice or help I would
greatly appreciate it. Thanks
Mike Brown
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"
begin
;in =
addfile("/data/brownmc/sresa1b/atm/mo/tas/ncar_ccsm3_0/run1/sresa1b_ncar_ccsm3_0_run1_200001_209912.nc","r")
;in =
addfile("/data/brownmc/sresa1b/working/sresa1b_ncar_ccsm3_0_run1_200001_200912_clm.nc","r")
in =
addfile("/data/brownmc/sresa1b/working/sresa1b_ncar_ccsm3_0_run1_209001_209912_200001_200912_diff.nc","r")
sst = in->tas(0,0,:)
lon = in->lon({0.:360.})
newlat = fspan(-60.,60.,24)
newlon = fspan(0.,355.,72)
newsst = linint2(lon,sst&lat,sst,True,newlon,newlat,0) ;FAILS HERE
newsst!0 ="lat"
newsst!1 = "lon"
newsst&lat = newlat
newsst&lon = newlon
wks = gsn_open_wks("X11","regrid") ; open a ps file
gsn_define_colormap(wks,"gui_default") ; choose colormap
res = True ; plot mods desired
res_at_cnFillOn = True ; turn on color
res_at_gsnSpreadColors = True ; use full color map
res_at_cnLinesOn = False ; no contour lines
res_at_cnLineLabelsOn = False ; no line labels
res_at_mpMaxLatF = 60 ; choose map range
res_at_mpMinLatF = -60
res_at_gsnDraw = False ; don't draw yet
res_at_gsnFrame = False ; don't advance frame yet
res_at_cnLevelSelectionMode = "ManualLevels" ; manual levels
res_at_cnMinLevelValF = 4 ; min level
res_at_cnMaxLevelValF = 32 ; max level
res_at_cnLevelSpacingF = 2 ; interval
res_at_tmXBLabelFontHeightF = 0.014 ; adjust some font heights
res_at_tmYLLabelFontHeightF = 0.014
res_at_tiMainFontHeightF = 0.022
res_at_txFontHeightF = 0.017
res_at_lbLabelBarOn = False ; turn off label bar
plot = new(2,graphic)
res_at_tiMainString = "Original Grid"
plot(0) = gsn_csm_contour_map_ce(wks,sst,res) ; create the plot
res_at_tiMainString = "Grid after linint2"
plot(1) = gsn_csm_contour_map_ce(wks,newsst,res) ; create the plot
pres = True
pres_at_gsnPanelLabelBar = True ; common label bar
gsn_panel(wks,plot,(/2,1/),pres)
end
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Feb 17 2006 - 13:30:24 MST
This archive was generated by hypermail 2.2.0 : Fri Feb 17 2006 - 14:55:53 MST