- 积分
- 3665
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2015-3-10
- 最后登录
- 1970-1-1
![[橘子汽水Tangerine] 粉丝数:380 微博数:1739 新浪微博达人勋](source/plugin/sina_login/img/light.png)
|
数值模式
使用语言: |
NCL |
我看过提问的智慧: |
看过 |
自己思考时长(天): |
2 |
问题概况: |
MODIS三级产品为日平均数据,想利用它画年平均AOD分布 |
问题截图: |
- |
系统平台: |
NCL |
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 0727 于 2017-4-12 20:22 编辑
如题,我的MODIS数据为三级日平均格点资料,借鉴了 http://bbs.06climate.com/forum.p ... 15138&fromuid=49312用ncl对其中一天的AOD进行画图,如图所示
我想画年平均AOD的全球分布,请问可以简单地对格点进行平均然后作图么?或者说要进行其他操作?
小白一个,很多不懂的,恳请指教
现已解决,可以简单地对格点进行平均,另外此图纬度轴反了,之后改好了再更新。
分割线-------------------------------------------------------------
我对MODIS的日平均资料进行了年平均,并重新建了一个nc文件,之后用ncl对其进行画图
在这期间容易遇到坐标轴设置的问题,后来改了,成功出图,图和脚本如下:
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"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
begin
f1=addfile("/cygdrive/E/result/MODIS1.nc","r")
var=(/"aod"/)
y=f1->$var$(0,::-1,:)
lat=fspan(-89.5,89.5,180)
lon=fspan(-179.5,179.5,360)
lat@units="degrees_north"
lat@coordinates_defines ="point"
lon@units ="degrees_east"
lon@coordinates_defines="point"
y!0="lat"
y!1="lon"
y&lat=lat
y&lon=lon
;print(y)
y0 = where((y.le.0),-999,y)
y0@_FillValue = -999
printVarSummary(y0)
copy_VarCoords(y,y0)
;***************plot part***************************
wks=gsn_open_wks("pdf","modis3")
gsn_define_colormap(wks,"BkBlAqGrYeOrReViWh200")
res =True
res@cnFillOn = True ; turn on color fill
res@cnLinesOn = False ; True is default
res@gsnSpreadColors =True
res@cnLevelSelectionMode = "ExplicitLevels" ;
res@cnLevels =(/0.005,0.01,0.04,0.07,0.1,0.13,0.16,0.2,0.3,0.5/)
res@cnFillColors =(/38,42,46,58,66,113,126,136,145,160,182/)
; res@cnFillColors =(/"midnightblue","blue4","blue3","blue2","blue","royalblue","royalblue1","cornflowerblue","lightskyblue","white"/)
; res@cnMinLevelValF = 0
; res@cnMaxLevelValF = 0.5
; res@cnLevelSpacingF = 0.05
res@tiMainString ="iron hia hia"
;cmap = read_colormap_file("amwg256")
; res@cnFillPalette = cmap(2:100,:) ; subset color map
plot=gsn_csm_contour_map(wks,y0(:,:),res)
end
出图:
但还有不明白的,就是图中的空白缺测出,等弄明白为什么空白再更新吧^_^
|
|