<div dir="ltr"><p class="MsoNormal"><span lang="EN-US">Dear users, I introduced some
changes in the script. </span><span lang="EN-US" style="font-family:'courier new'">topo_1.ncl</span><span lang="EN-US">, in order to run it for high resolution elevation data (GTOPO30,
tile </span><span lang="EN-US" style="font-size:10pt;font-family:'courier new'">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 lang="EN-US" 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">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 lang="EN-US" style="font-size:10pt;font-family:'courier new'"><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">;================================================</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">;================================================</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","ReadByteOrder","BigEndian")</p><p class="MsoNormal" style="text-align:justify"> elev = cbinread(topo_file,(/nlat,nlon/),"short")</p><p class="MsoNormal" style="text-align:justify">;*******begin changes****************************************</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*****************************************************************</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">;----------------------------------------------------------------------</p><p class="MsoNormal" style="text-align:justify">; Main code</p><p class="MsoNormal" style="text-align:justify">;----------------------------------------------------------------------</p><p class="MsoNormal" style="text-align:justify">begin</p><p class="MsoNormal" style="text-align:justify"> wks = gsn_open_wks("png","topo1km2V_0") ; send graphics to PNG file</p><p class="MsoNormal" style="text-align:justify">;**************begin changues************************** </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/">https://dds.cr.usgs.gov/srtm/version2_1/SRTM30/e100n40/</a></p><p class="MsoNormal" style="text-align:justify"> elev = read_elev_data("/usr/local/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*************************</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***************************</p><p class="MsoNormal" style="text-align:justify"> plot = gsn_csm_contour_map(wks,elev,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>