- 积分
- 1062
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-7-5
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 novelbean 于 2016-8-17 19:34 编辑
从ftp://disc2.nascom.nasa.gov/data/TRMM/Gridded/下载的3B40RT.2001.01.22.12z.bin,其ctl脚本如下:
dset ^3B40RT.2001.01.22.12z.bin
options template byteswapped
title Three Hourly TRMM and Other Satellite Rainfall (3B40RT)
undef -99999.0
xdef 1440 linear 0.12500000 0.25000000
ydef 720 linear -89.8750000 0.25000000
zdef 1 levels 1000
tdef 500000 linear 12:00Z22jan2001 3hr
vars 1
r 0 99 Hourly Rain Rate (mm/hr)
endvars
画出来的图如下:
ncl脚本如下:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
; Longitude co-ordinate
; ................
nlon=1440
lon=fspan(0.125,359.875,1440)
lon!0="lon"
lon&lon=lon
lon@units="degrees_east"
lon@long_name="Longitude"
printVarSummary(lon)
; Latitude co-ordinate
; ................
nlat=720
lat=fspan(-89.875,89.875,720)
lat!0="lat"
lat&lat=lat
lat@units="degrees_north"
lat@long_name="Latitude"
printVarSummary(lat)
path="3B40RT.2001.01.22.12z.bin"
rec_dims=(/nlat,nlon/)
rec_type="float"
setfileoption("bin","ReadByteOrder","BigEndian")
r=new( (/nlat,nlon/), rec_type )
r=fbindirread(path,0,rec_dims,rec_type )
r@units="(mm/hr)"
r@long_name="Hourly Rain Rate"
r!0="lat"
r!1="lon"
r&lon=lon
r&lat=lat
r@_FillValue=-99999
colors = (/"white","black", "Snow" \
,"PaleTurquoise","PaleGreen","SeaGreen3" ,"Yellow" \
,"Orange","HotPink","Red","Violet", "Purple", "Brown","red"/)
wks = gsn_open_wks("png", "test1")
gsn_define_colormap(wks, colors) ; generate new color map
res = True ; plot mods desired
res@cnFillOn = True ; turn on color fill
res@cnLinesOn = False ; turn of contour lines
res@cnFillMode = "RasterFill" ; Raster Mode
res@cnLinesOn = False ; Turn off contour lines
res@cnLineLabelsOn = False ; Turn off contour lines
res@cnMissingValFillColor = "transparent" ; ""black" ; "transparent"
res@cnLevelSelectionMode = "ExplicitLevels"
res@cnLevels = (/0.1,1,2,5,10,15,20,25,30,40,45/) ; "mm/3hr"
printMinMax(r, 0)
;res@mpFillOn = True
res@mpLandFillColor = "white"
plot = gsn_csm_contour_map_ce(wks,r, res)
end
而从ftp://trmmopen.gsfc.nasa.gov/pub/merged/下载的同天的数据3B40RT.2001012212.7R2.bin,用ncl画出来的图如下:
ncl
ctl的纬度描述是(-89.875,89.875),而根据http://www.ncl.ucar.edu/Applications/HiResPrc.shtml网站上的trmm_3B40RT_1.ncl程序画出来的图中的纬度范围是(-59.875,59.875),这两幅图偏差很明显。
应该相信哪个网站的数据,还没有别的数据来区分这个数据的对与错。
请指教,谢谢!!
|
|