<div dir="ltr"><div><div><div>Hi <span lang="EN-US">Gerardo,<br><br></span></div><span lang="EN-US">Not sure which hemisphere you are going for, but your data is from the eastern hemisphere (60 .. 100) and your map specification is from the western (-100 ... -60) The elevation data in you plot does indeed resemble the south china sea area, whereas the country outlines are clearly parts of south, central, and north america.<br><br></span></div><span lang="EN-US">hope that helps...<br></span></div><span lang="EN-US">Rick<br><br></span></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 7, 2016 at 12:00 PM, Gerardo Montoya <span dir="ltr"><<a href="mailto:gemonga@gmail.com" target="_blank">gemonga@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"><p class="MsoNormal"><span lang="EN-US">Dear users, I introduced some
changes in the script. </span><span style="font-family:'courier new'" lang="EN-US">topo_1.ncl</span><span lang="EN-US">, in order to run it for high resolution elevation data (GTOPO30,
tile </span><span style="font-size:10pt;font-family:'courier new'" lang="EN-US">E100N40.DEM</span><span lang="EN-US">). However, some
things I'm doing wrong or I'm missing, because the displayed topography is not
so good (see attached image). Also, the maximum height in the domain appears to
be </span><span lang="EN-US">7213</span><span lang="EN-US">, i.e., about 273m higher than the maximum peak in the Americas ( </span><span style="font-family:helvetica,sans-serif;color:rgb(25,25,25);background-image:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial" lang="EN-US">6960m</span><span lang="EN-US">
the Aconcagua´s peak in Argentina). I´m using NCL version 6.3.0<b> </b>and I´m running this program in a LENOVO
Z580 laptop with a i7 3520M processor.</span><span style="font-size:10pt;font-family:'courier new'" lang="EN-US"><span></span></span></p>
<p class="MsoNormal" style="text-align:justify"><span lang="EN-US"> </span></p>
<p class="MsoNormal" style="text-align:justify"><span lang="EN-US">I guess that the problem may be in the type of the variable “elev”,
however still now I don´t know how to solve it. Any help for correcting the script is greatly
appreciated. The script is:</span></p><p class="MsoNormal" style="text-align:justify"><span lang="EN-US"><br></span></p><p class="MsoNormal" style="text-align:justify">;=============================<wbr>===================</p><p class="MsoNormal" style="text-align:justify">; 2016-11-7 topo1km2V_0.ncl. It is a modified version of topo_1.ncl</p><p class="MsoNormal" style="text-align:justify">;=============================<wbr>===================</p><p class="MsoNormal" style="text-align:justify">undef("read_elev_data")</p><p class="MsoNormal" style="text-align:justify">function read_elev_data(topo_file)</p><p class="MsoNormal" style="text-align:justify">local nlat, nlon, topo_file, lat, lon</p><p class="MsoNormal" style="text-align:justify">begin</p><p class="MsoNormal" style="text-align:justify">;---Read data as a straight binary file</p><p class="MsoNormal" style="text-align:justify"> nlat =6000</p><p class="MsoNormal" style="text-align:justify"> nlon = 4800</p><p class="MsoNormal" style="text-align:justify"> setfileoption("bin","<wbr>ReadByteOrder","BigEndian")</p><p class="MsoNormal" style="text-align:justify"> elev = cbinread(topo_file,(/nlat,<wbr>nlon/),"short")</p><p class="MsoNormal" style="text-align:justify">;*******begin changes***********************<wbr>*****************</p><p class="MsoNormal" style="text-align:justify">;---Create 1D coordinate arrays</p><p class="MsoNormal" style="text-align:justify">; lat = fspan(90,-90,nlat)</p><p class="MsoNormal" style="text-align:justify">; lon = fspan(0,360,nlon)</p><p class="MsoNormal" style="text-align:justify">res=0.00833333333333 ; this is the resolution of the GTOPO30 data.</p><p class="MsoNormal" style="text-align:justify">ulat=39.99583333333333</p><p class="MsoNormal" style="text-align:justify">ulon=-99.99583333333333</p><p class="MsoNormal" style="text-align:justify">lat = ulat - ispan(0,(nlat-1),1)*res ;from 39.99583333333333 to -9.99583333331 </p><p class="MsoNormal" style="text-align:justify">lon = ulon+ispan(0,(nlon-1),1)*res ;from -99.99583333333333 to -60.00416666668</p><p class="MsoNormal" style="text-align:justify"> lat@_FillValue=999.99</p><p class="MsoNormal" style="text-align:justify"> lon@_FillValue=999.99</p><p class="MsoNormal" style="text-align:justify">;*****end changues**********************<wbr>******************************<wbr>*************</p><p class="MsoNormal" style="text-align:justify"> lat!0 = "lat"</p><p class="MsoNormal" style="text-align:justify"> lon!0 = "lon"</p><p class="MsoNormal" style="text-align:justify"> lat@units = "degrees_north"</p><p class="MsoNormal" style="text-align:justify"> lon@units = "degrees_east"</p><p class="MsoNormal" style="text-align:justify"> lat&lat = lat</p><p class="MsoNormal" style="text-align:justify"> lon&lon = lon</p><p class="MsoNormal" style="text-align:justify"><br></p><p class="MsoNormal" style="text-align:justify">;---Attach the coordinate arrays</p><p class="MsoNormal" style="text-align:justify"> elev!0 = "lat"</p><p class="MsoNormal" style="text-align:justify"> elev!1 = "lon"</p><p class="MsoNormal" style="text-align:justify"> elev&lat = lat</p><p class="MsoNormal" style="text-align:justify"> elev&lon = lon</p><p class="MsoNormal" style="text-align:justify"> </p><p class="MsoNormal" style="text-align:justify"> return(elev)</p><p class="MsoNormal" style="text-align:justify">end</p><p class="MsoNormal" style="text-align:justify"><br></p><p class="MsoNormal" style="text-align:justify">;-----------------------------<wbr>------------------------------<wbr>-----------</p><p class="MsoNormal" style="text-align:justify">; Main code</p><p class="MsoNormal" style="text-align:justify">;-----------------------------<wbr>------------------------------<wbr>-----------</p><p class="MsoNormal" style="text-align:justify">begin</p><p class="MsoNormal" style="text-align:justify"> wks = gsn_open_wks("png","topo1km2V_<wbr>0") ; send graphics to PNG file</p><p class="MsoNormal" style="text-align:justify">;**************begin changues**********************<wbr>**** </p><p class="MsoNormal" style="text-align:justify">setvalues NhlGetWorkspaceObjectId()</p><p class="MsoNormal" style="text-align:justify"> "wsMaximumSize" : 300000000</p><p class="MsoNormal" style="text-align:justify"> end setvalues</p><p class="MsoNormal" style="text-align:justify">; the tile, E100N40.DEM was downloaded from:</p><p class="MsoNormal" style="text-align:justify">; <a href="https://dds.cr.usgs.gov/srtm/version2_1/SRTM30/e100n40/" target="_blank">https://dds.cr.usgs.gov/srtm/<wbr>version2_1/SRTM30/e100n40/</a></p><p class="MsoNormal" style="text-align:justify"> elev = read_elev_data("/usr/local/<wbr>Topog/E100N40.DEM")</p><p class="MsoNormal" style="text-align:justify"> printVarSummary(elev)</p><p class="MsoNormal" style="text-align:justify"> printMinMax (elev, False)</p><p class="MsoNormal" style="text-align:justify">;*************************end changues*****************</p><p class="MsoNormal" style="text-align:justify">;---Set some plot options</p><p class="MsoNormal" style="text-align:justify"> res = True</p><p class="MsoNormal" style="text-align:justify"> res@gsnMaximize = True ; maximize plot in frame</p><p class="MsoNormal" style="text-align:justify"> res@cnFillOn = True ; turn on contour fill</p><p class="MsoNormal" style="text-align:justify"> res@cnLevelSpacingF = 125 ; NCL picks 2000</p><p class="MsoNormal" style="text-align:justify"> res@cnFillMode = "RasterFill" ; much faster than AreaFill</p><p class="MsoNormal" style="text-align:justify"> res@cnLinesOn = False ; turn off contour lines</p><p class="MsoNormal" style="text-align:justify"> res@cnLineLabelsOn = False ; turn off line labels</p><p class="MsoNormal" style="text-align:justify"> res@cnInfoLabelOn = False ; turn off info label</p><p class="MsoNormal" style="text-align:justify"> res@lbBoxLinesOn = False ; turn off labelbar box lines</p><p class="MsoNormal" style="text-align:justify"> res@gsnAddCyclic = False ; don't add longitude cyclic point</p><p class="MsoNormal" style="text-align:justify"> res@mpFillOn = False ; turn off map fill</p><p class="MsoNormal" style="text-align:justify"> res@tiMainString = "topo1km2V_0" ; main title</p><p class="MsoNormal" style="text-align:justify"> res@pmLabelBarWidthF = 0.8 ; default is too short</p><p class="MsoNormal" style="text-align:justify">;*************begin changues**********************<wbr>***</p><p class="MsoNormal" style="text-align:justify">; set plot domain for the tile, E100N40.DEM </p><p class="MsoNormal" style="text-align:justify">res@mpMinLatF = -10.0</p><p class="MsoNormal" style="text-align:justify">res@mpMaxLatF = 40.0</p><p class="MsoNormal" style="text-align:justify">res@mpMinLonF = -100.0</p><p class="MsoNormal" style="text-align:justify">res@mpMaxLonF = -60.0</p><p class="MsoNormal" style="text-align:justify">;************end changues**********************<wbr>*****</p><p class="MsoNormal" style="text-align:justify"> plot = gsn_csm_contour_map(wks,elev,<wbr>res)</p><p class="MsoNormal" style="text-align:justify"><span lang="EN-US"></span></p><p class="MsoNormal" style="text-align:justify">end</p><div style="text-align:justify"><br></div><div style="text-align:justify">Thanks,</div><p class="MsoNormal" style="text-align:justify"><span lang="EN-US">Gerardo Montoya</span></p><p class="MsoNormal" style="text-align:justify"><span lang="EN-US">full professor (retired), Universidad Nacional de Colombia</span></p></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>