<div dir="ltr">Hi All,<div><br></div><div>May be this is an easy issue for you but i have some errors when i try to plot Pmsl variable using gsn_contour_map .</div><div><br></div><div>When using the ncl script below i get this error : </div>
<div><br></div><div><div>fatal:ContourPlotDraw: coordinates are out of range for drawing over a map: standard line or line label rendering method will not work;</div><div> consider setting the resource trGridType to "TriangularMesh" if coordinates contain missing values</div>
<div><br></div><div><div>;************************************************</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" </div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" </div>
<div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" </div><div>;************************************************</div><div>begin</div><div><br></div><div>;************************************************</div>
<div>; read in GRIB2 file</div><div>;************************************************</div><div><br></div><div><br></div><div> a = addfile("gfs_data/gfs.t00z.pgrb2f12.grib2","r")</div><div><br></div>
<div> lon = a->lon_0</div><div> lat = a->lat_0</div><div> slp = short2flt(a->PRMSL_P0_L101_GLL0(:,:))</div><div> slp = (/ slp/100 /) ; convert to hpa</div><div><br></div><div>;************************************************</div>
<div><br></div><div>printMinMax(slp, True)</div><div>;********************************************************</div><div>; Display parameters</div><div>;***************************************</div><div><br></div><div>pixel=2048</div>
<div>;***************************************************</div><div><br></div><div>wks_type="png"</div><div><br></div><div> wks_type@wkWidth = pixel</div><div> wks_type@wkHeight = pixel</div><div> wks_type@wkBackgroundOpacityF = 1.0</div>
<div>wks = gsn_open_wks(wks_type,"slp_test")</div><div><br></div><div><br></div><div>res = True</div><div><br></div><div>res = True</div><div> res@mpProjection = "Mercator" ; choose projection</div>
<div> res@mpGridAndLimbOn = False ; turn on lat/lon lines</div><div> res@mpPerimOn = False ; turn off box around plot</div><div> res@mpFillOn = False</div><div> res@cnLinesOn = False </div>
<div> res@mpOutlineOn = True </div><div> res@cnLineLabelsOn = True ; turn off contour lines</div><div> res@mpLimitMode = "LatLon"</div><div> res@mpMinLatF = -85.0</div><div>
res@mpMaxLatF = 85.0 </div><div> res@mpMinLonF = -180</div><div> res@mpMaxLonF = 180</div><div> res@vpXF = 0 ; make plot bigger</div><div> res@vpYF = 1 </div>
<div> res@vpWidthF = 1</div><div> res@vpHeightF = 1</div><div><br></div><div><span class="" style="white-space:pre">        </span></div><div> res@cnLevelSelectionMode <span class="" style="white-space:pre">        </span>= "ManualLevels" ; manually set cont levels</div>
<div><br></div><div> res@cnLevelSpacingF = 4 ; spacing in hpa</div><div> res@cnLineThicknessF = 1.10 ; change line thickness</div><div> res@cnLineColor = "Black"</div>
<div><span class="" style="white-space:pre">        </span></div><div> map = gsn_contour_map(wks,slp,res)</div><div> </div><div>end</div></div><div><br></div><div><br></div>-- <br><div dir="ltr"><div>------------------------------</div>
Cordialement,<br>Best regards,<br>Rabah Hachelaf <br></div>
</div></div>