好看的地形與不好看的地形
1寒锚、不好看但精準(zhǔn)的地形
利用地形數(shù)據(jù)蔫劣,低于地形的地方填色
優(yōu)點(diǎn):精確
缺點(diǎn):使用不同分辨率數(shù)據(jù)時诡必,需要進(jìn)行調(diào)整
function read_height_data(topo_file)
local nlat,nlon,topo_file,lat,lon
begin
??nlat = 2160
??nlon = 4320
?setfileoption("bin","ReadByteOrder","BigEndian")
??elev = tofloat(cbinread(topo_file,(/nlat,nlon/),"short"))
??lat = fspan(90,-90,nlat)
??lon = fspan(0,360,nlon)
??lat!0 = "lat"
??lon!0 = "lon"
??lat@units = "degrees_north"
??lon@units = "degrees_east"
??lat&lat = lat
??lon&lon = lon
??elev!0 = "lat"
??elev!1 = "lon"
??elev&lat = lat
??elev&lon = lon
??return(elev)
end
;; Read terrain data from a C binary file
??elev = read_height_data("ETOPO5.DAT")
;; Convert terrain data from units "m" to "hPa", it is described as a high pressure formula
??elev = 1013.25*(1-elev*0.0065/288.15)^5.25145
;; The purpose of the interpolation is to make terrain data and variable data have the same resolution
??lat?= fspan(-90,90,73)
??lon?= fspan(lon_1,lon_2,toint((lon_2-lon_1)/2.5+1))
??geog = area_hi2lores_Wrap(elev&lon,elev&lat,elev,True,1,lon,lat,False)
??geogsection = geog({stdlat},:)
;??geogsection = geog(:,{stdlon})
;; Determine the terrain
??topo2d = conform(temp,geogsection,1)
??high2d = conform(temp,temp&lev,0)
??tMask= temp
;?tMask@_FillValue = 99999
??tMask = (/mask(temp,topo2d.lt.high2d,False)/)
??plot?= gsn_csm_pres_hgt(wks, tMask, res )
2脊框、好看的地形
利用地形數(shù)據(jù)畫出地形后直接overlay在原圖上涤妒。
優(yōu)點(diǎn):簡單易操作单雾,不受數(shù)據(jù)分辨率影響
缺點(diǎn):
?dixing = gsn_csm_pres_hgt(wks,dx({levb:levt},{lat_3},{lon_1:lon_2}),resa)
?plot?= gsn_csm_pres_hgt(wks, temp({levb:levt},:), res)
overlay(plot,dixing)