<div dir="ltr"><div><div><div>Hi ,<br></div>Yes. Mask specifier works for me. Please ignore my previous email.<br><br></div>Thank you<br></div>Adv<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 9, 2016 at 5:10 PM, Adv <span dir="ltr"><<a href="mailto:advita6@gmail.com" target="_blank">advita6@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Adam,<br></div>Mask area specifier is not recognized and the specified regions are not masked. Could you please help me in this? <br><br></div>Thank you<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888">Adv<br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 9, 2016 at 3:53 PM, Adam Phillips <span dir="ltr"><<a href="mailto:asphilli@ucar.edu" target="_blank">asphilli@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Adv,<div>Add the following to your script:</div><div>res@mpDataBaseVersion = "Ncarg4_1"</div><div>That should allow you to specify the states in mpMaskAreaSpecifiers. </div><div><br></div><div>Also, the valid settings of mpAreaMaskingOn are True or False. In your case I believe you want to set it to True.</div><div><br></div><div>Hope that helps!</div><div>Adam</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-6226447900339269308h5">On Fri, Dec 9, 2016 at 12:57 PM, Adv <span dir="ltr"><<a href="mailto:advita6@gmail.com" target="_blank">advita6@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-6226447900339269308h5"><div dir="ltr"><div><div><div>Hi,<br><br></div>could someone help me to fix this error?<br><br></div>Thank you,<br></div>Adv<br><div><div><div><br><br>warning:MapV40DHUpdateDrawList<wbr>: invalid boundary specification string: "iowa"<br>warning:MapV40DHUpdateDrawList<wbr>: invalid boundary specification string: "wyoming"<br>warning:MapV40DHUpdateDrawList<wbr>: invalid boundary specification string: "idaho"<br>warning:MapV40DHUpdateDrawList<wbr>: invalid boundary specification string: "utah"<br>warning:MapV40DHUpdateDrawList<wbr>: invalid boundary specification string: "wisconsin"<br>warning:MapV40DHUpdateDrawList<wbr>: invalid boundary specification string: "iowa"<br>warning:MapV40DHUpdateDrawList<wbr>: invalid boundary specification string: "iowa"<br>warning:MapV40DHUpdateDrawList<wbr>: invalid boundary specification string: "wyoming"<br>warning:MapV40DHUpdateDrawList<wbr>: invalid boundary specification string: "idaho"<br>warning:MapV40DHUpdateDrawList<wbr>: invalid boundary specification string: "utah"<br>warning:MapV40DHUpdateDrawList<wbr>: invalid boundary specification string: "wisconsin"<br>warning:MapV40DHUpdateDrawList<wbr>: invalid boundary specification string: "iowa"<br>warning:MapV40DHUpdateDrawList<wbr>: invalid boundary specification string: "iowa"<br>warning:MapV40DHUpdateDrawList<wbr>: invalid boundary specification string: "wyoming"<br>warning:MapV40DHUpdateDrawList<wbr>: invalid boundary specification string: "idaho"<br>warning:MapV40DHUpdateDrawList<wbr>: invalid boundary specification string: "utah"<br>warning:MapV40DHUpdateDrawList<wbr>: invalid boundary specification string: "wisconsin"<br>warning:MapV40DHUpdateDrawList<wbr>: invalid boundary specification string: "iowa"<br>warning:MapV40DHUpdateDrawList<wbr>: invalid boundary specification string: "iowa"<br>warning:MapV40DHUpdateDrawList<wbr>: invalid boundary specification string: "wyoming"<br>warning:MapV40DHUpdateDrawList<wbr>: invalid boundary specification string: "idaho"<br>warning:MapV40DHUpdateDrawList<wbr>: invalid boundary specification string: "utah"<br>warning:MapV40DHUpdateDrawList<wbr>: invalid boundary specification string: "wisconsin"<br>warning:MapV40DHUpdateDrawList<wbr>: invalid boundary specification string: "iowa"<br><br><br><br>load "./contributed.ncl_beta_640"<br><br>begin<br>;*****************************<wbr>**********************<br>strll = asciiread("stationmac.txt", -1, "string") ;<br> print(strll) ; STATION","STATION_NAME", "LAT", "LON"<br> print("=====")<br><br>sloc = str_get_field(strll , 2, ",")<br> lat = tofloat( str_get_field(strll , 3, ",") )<br> lon = tofloat( str_get_field(strll , 4, ",") )<br> print(sloc +" : "+lat+" "+lon)<br>mnlat=(min(lat))<br>mxlat=(max(lat))<br>mnlon=(min(lon))<br>mxlon=(max(lon))<br>;print(lon)<br>print(mnlon)<br>print(mxlon)<br>print(mnlat)<br>print(mxlat)<br>;iiiiiiiiiiiiiiiiiiiiiiiiiiiii<wbr>iiiiii<br>mlon = 360<br>dlon = -90.35 / mlon<br>lonn = fspan (-116, (mlon - 1) * dlon, mlon)<br>print(lonn)<br>mlat = 90<br>dlat = 49.0 / mlat<br>latt = fspan (40.01, (mlat - 1) * dlat, mlat)<br>print(latt)<br>diri="./"<br>z1 = asciiread(diri+"Temp_Mean1965-<wbr>2005",-1,"float")<br>print(z1)<br>printVarSummary(z1)<br>opt = True<br>rscan = (/8,5,1 /)<br>grid = obj_anal_ic_deprecated(lon, lat, z1, lonn, latt, rscan, True)<br>printVarSummary(grid)<br>;print(grid)<br>print(min(grid))<br>print(max(grid))<br>;*****************************<wbr>*******************<br>; Specify geographical region and time span (year-month start and end<br>;*****************************<wbr>*******************<br>;latS=-90<br>;latN = 90<br>;lonL = 0;360-116.5 <br>;lonR = 358;360-90<br>; latS = 40 <br>; latS = 0 <br> ; latN = 49<br> ; lonL = 244;360-116.5 <br> ; lonR = 270;360-90<br><br> ymStrt = 196501 <br> ymLast = 200512<br> <br> pltType = "x11" <br> pltName = "regress"<br> pltTitle = "Globe: "+(ymStrt/100)+"-"+(ymLast/100<wbr>)<br><br>;*****************************<wbr>*******************<br>; Read from netCDF file: variable is type short...unpack<br>;*****************************<wbr>*******************<br> version= "v2" ; "v2", "v2c"<br><br> diri = "./"<br>; fili = "air.sig995.mon.mean."+version<wbr>+".nc"<br> fili1 = "Netcdfmean.nc"<br> fili = "<a href="http://air.mon.mean.nc" target="_blank">air.mon.mean.nc</a>"<br> ff = addfile(diri+fili1,"r") <br> t = ff->mean(:,:)<br> printVarSummary(t) <wbr> ; [time| 720]x[lat| 91]x[lon| 180]<br>printMinMax(t,0)<br> f = addfile(diri+fili,"r") <br>f1 = addfile("tas_Amon_CCSM4_histor<wbr>ical_r3i1p1_185001-<a href="http://200512.nc" target="_blank">200512.nc</a>", "r") ; note the "s" of addfile<br>f2 = addfile("Ecearth_tas_<a href="http://320x160x1961-2005.nc" target="_blank">320x160x1<wbr>961-2005.nc</a>", "r") ; note the "s" of addfile<br>f3 = addfile("CanCM4_Temp_<a href="http://320x160x1961-2005.nc" target="_blank">320x160x1<wbr>961-2005.nc</a>", "r") ; note the "s" of addfile<br><br> YYYYMM = cd_calendar( f->time, -1)<br> YYYYMMa = cd_calendar( f1->time, -1)<br> YYYYMMb = cd_calendar( f2->time, -1)<br> YYYYMMc = cd_calendar( f3->time, -1)<br><br> iStrt = ind(YYYYMM.eq.ymStrt)<br> iStrta = ind(YYYYMMa.eq.ymStrt)<br> iStrtb = ind(YYYYMMb.eq.ymStrt)<br> iStrtc = ind(YYYYMMc.eq.ymStrt)<br> iLast = ind(YYYYMM.eq.ymLast)<br> iLasta = ind(YYYYMMa.eq.ymLast)<br> iLastb = ind(YYYYMMb.eq.ymLast)<br> iLastc = ind(YYYYMMc.eq.ymLast)<br> ; <wbr> ; monthly data<br> xt = f->air(:,::-1,:)<br> printVarSummary(xt) <wbr> ; [time| 720]x[lat| 91]x[lon| 180]<br> xt1 = f1->tas(:,:,:)<br> printVarSummary(xt1) <wbr> <br> xt2 = f2->t2(:,:,:)<br> printVarSummary(xt2) <wbr> <br> xt3 = f3->t2(:,:,:)<br> printVarSummary(xt3) <wbr> <br>; x = xt(iStrt:iLast,{latN:latS},{lo<wbr>nL:lonR})<br> x = xt(iStrt:iLast,:,:)<br> x1 = xt1(iStrta:iLasta,:,:)<br> x2 = xt2(iStrtb:iLastb,:,:)<br> x3 = xt3(iStrtc:iLastc,:,:)<br> delete(xt)<br> delete(xt1)<br> delete(xt2)<br> delete(xt3)<br> x1 = x1-273.15<br> x2 = x2-273.15<br> x3 = x3-273.15<br> x1@units= "degC"<br> x2@units= "degC"<br> x3@units= "degC"<br> printVarSummary(x) <wbr> ; [time| 720]x[lat| 91]x[lon| 180]<br> printVarSummary(x1) <wbr> ; [time| 720]x[lat| 91]x[lon| 180]<br> printVarSummary(x2) <wbr> ; [time| 720]x[lat| 91]x[lon| 180]<br> printVarSummary(x3) <wbr> ; [time| 720]x[lat| 91]x[lon| 180]<br>;*****************************<wbr>*******************<br>; Calculate the Annual Mean (slopes) <br>;*****************************<wbr>*******************<br>rc= dim_avg_n(x,0)<br>rc1= dim_avg_n(x1,0)<br>rc2= dim_avg_n(x2,0)<br>rc3= dim_avg_n(x3,0)<br> printVarSummary(rc)<br> printVarSummary(rc)<br> printVarSummary(rc1)<br> printVarSummary(rc2)<br> printVarSummary(rc3)<br>copy_VarCoords(x(0,:,:),rc) <br>copy_VarCoords(x1(0,:,:),rc1) <br>copy_VarCoords(x2(0,:,:),rc2) <br>copy_VarCoords(x3(0,:,:),rc3) <br> printMinMax(rc,0)<br> printMinMax(rc1,0)<br> printMinMax(rc2,0)<br> printMinMax(rc3,0)<br>;=============================<wbr>=O===========;<br>; interpolate to new grid<br>;=============================<wbr>============;<br> newgrid = f2fsh_Wrap(grid(:,:),(/73,144/<wbr>))<br> newgrid1 = f2fsh_Wrap(grid(:,:),(/192,288<wbr>/))<br> newgrid2 = f2fsh_Wrap(grid(:,:),(/160,320<wbr>/))<br> newgrid3 = f2fsh_Wrap(grid(:,:),(/64,128/<wbr>))<br>y= newgrid-rc<br>y1= newgrid1-rc1<br>y2= newgrid2-rc2<br>y3= newgrid3-rc3<br>copy_VarCoords(rc,y)<br>copy_VarCoords(rc1,y1)<br>copy_VarCoords(rc2,y2)<br>copy_VarCoords(rc3,y3)<br> mask_specs = (/"Iowa","Wyoming","Idaho","Ut<wbr>ah","Wisconsin","Iowa"/)<br><br>;*****************************<wbr>*******************<br>; plotting parameters <br>;*****************************<wbr>*******************<br> wks = gsn_open_wks("x11","Tempdiffer<wbr>ence_Mean_"+ymStrt+"-"+ymLast)<wbr> ; specifies a ps plot<br>gsn_define_colormap(wks,"matla<wbr>b_jet")<br> plot = new(4,graphic) <br> res = True <br> res@gsnMaximize = True ; make large<br> res@cnFillOn = True ; turn on color<br> res@cnLinesOn = False ; turn off contour lines<br> res@cnLineLabelsOn = False ; turn off contour line labels<br> res@cnInfoLabelOn = False <br>res@lbLabelBarOn = False ; turn off individual cb's<br><br>res@gsnTickMarksOn = False<br>res@mpGridAndLimbOn = False<br><br> res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels<br> res@cnMinLevelValF = -5 ; set min contour level<br> res@cnMaxLevelValF = 5.0 ; set max contour level<br> res@cnLevelSpacingF = 0.5 ; set contour interval<br> res@gsnAddCyclic = False<br> res@mpFillOn = False ; turn off default background gray<br> res@mpCenterLonF = 180<br> res@mpMinLatF = 40.<br> res@mpMaxLatF = 49.<br> res@mpMinLonF = -116 <br> res@mpMaxLonF = -90<br>res@gsnStringFont = "helvetica-bold" ; instead of using txFontHeightF or gsnStringFontHeightF <br><br>res@mpGeophysicalLineThickness<wbr>F = 3.0<br>res@mpGeophysicalLineColor = "Black"; (/22/)<br>;res@mpNationalLineThicknessF = 3.0<br>res@mpOutlineBoundarySets = "GeophysicalAndUSStates" ; add state boundaries<br>res@mpNationalLineColor = res@mpGeophysicalLineColor<br>res@mpUSStateLineThicknessF = 3.0<br>res@mpUSStateLineColor = res@mpGeophysicalLineColor<br>; res@gsnCenterString = year(0)+"-"+year(nyrs-1) <br> res@gsnLeftString = "" ; add the gsn titles<br> res@gsnRightString = "" <br>; res@tiMainString = "Trend, Reanalysis-2m Temperature(~S~o~N~C)" ; fili<br>;res@tiMainFontHeightF = 0.02<br>;*****************************<wbr>*******************<br>; Turn on masking, and set resource indicating<br>; areas to mask.<br>;*****************************<wbr>*******************<br> res@mpAreaMaskingOn = 1<br> res@mpMaskAreaSpecifiers = mask_specs<br><br>;:::::::::::::::::::::::::::;;<wbr>;;;:::::::::::<br>res@gsnCenterStringFontHeightF<wbr> = 0.035<br>res@gsnCenterString = "Obs-Reanal"<br> plot(0) = gsn_csm_contour_map_ce(wks,y,r<wbr>es) <br>res@gsnCenterString = "Obs-CCSM4"<br> plot(1) = gsn_csm_contour_map_ce(wks,y1,<wbr>res) <br>res@gsnCenterString = "Obs-EC-Earth"<br> plot(2) = gsn_csm_contour_map_ce(wks,y2,<wbr>res) <br>res@gsnCenterString = "Obs-CanCM4"<br> plot(3) = gsn_csm_contour_map_ce(wks,y3,<wbr>res) <br>;*****************************<wbr>*******************<br>; create panel<br>;*****************************<wbr>*******************<br> resP = True ; modify the panel plot<br> resP@gsnFrame = False ; don't advance the frame, so we can use gsn_text_ndc<br> resP@gsnPanelLabelBar = True ; add common colorbar<br> resP@lbLabelFontHeightF = 0.015 ; set font height of Label Bar labels<br>resP@gsnPanelBottom = 0.2 ; shrink panel plot by setting bottom edge of plot<br> resP@gsnPanelTop = 0.9 ; shrink panel plot by setting top edge of plot<br> resP@pmLabelBarWidthF = 0.3 ; make thinner<br> resP@pmLabelBarHeightF = 0.05<br> resP@gsnPanelYWhiteSpacePercen<wbr>t = 5. ; increase spacing along Y-axis between panel plots<br> resP@cnLinesOn = False ; turn off contour lines<br>; resP@cnFillOn = True ; color plot desired<br>; resP@lbTitleOn = True ; turn on title<br>resP@lbTitleFont = "helvetica-bold"<br> resP@lbLabelFontQuality = "high" ; label bar font<br> resP@lbLabelFont = "helvetica-bold" ; label bar font<br><br> resP@lbTitleFontHeightF= .013 ;<br> resP@lbTitleString = "~S~o~N~C"<br> resP@cnLineLabelsOn = False<br><br> resP@txString = "Mean_Temp_"+ymStrt+"-"+ymLast<wbr>+""<br> gsn_panel(wks,plot,(/4,1/),res<wbr>P) ; now draw as one plot<br> frame(wks)<br> end<br><br></div></div></div></div>
<br></div></div>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><span class="m_-6226447900339269308HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_-6226447900339269308m_-5320772367224290015gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist, </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphill<wbr>i/</a> </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
</font></span></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>