爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 5720|回复: 3

请教FY2E TBB数据处理问题

[复制链接]
发表于 2016-12-16 15:14:44 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
画出来的图如附件图形所示。请问各位大神什么问题啊。
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin
  nlat = 1201
  nlon = 1201
  ntime = 144
  lat       = fspan(45,165,nlat)
  lon       = fspan(-60,60,nlon)
  time      = fspan(1,ntime,ntime)
  lat!0     = "lat"
  lon!0     = "lon"
  time!0    = "time"
  lat@units = "degrees_north"
  lon@units = "degrees_east"
  time@units= "hour"
  lat&lat   = lat
  lon&lon   = lon
  time&time = time

  file_path = "FY2E_TBB_IR1_OTG_20141026_0000.AWX"
  argu = fbindirread(file_path,0,(/nlat,nlon/),"byte")
  printMinMax(argu,False)
  tbb = byte2flt(argu)

  printMinMax(tbb,False)

  tbb!0 = "lat"
  tbb!1 = "lon"
  tbb&lat = lat
  tbb&lon = lon

  printVarSummary(tbb)
  ;print(tbb(0,:))
  printMinMax(tbb,False)

  res                         = True            
  ;res@gsnMaximize             = True
  ;res@gsnDraw                 = False
  ;res@gsnFrame                = False

;>--------------------------------------------<
;            set for the map
;>--------------------------------------------<
  res@mpMinLatF               = -60                     
  res@mpMaxLatF               = 60
  res@mpMinLonF               = 45
  res@mpMaxLonF               = 165  
  res@mpFillOn                = True
  res@mpOutlineOn             = True  ; Use outlines from shapefile  
  res@mpDataBaseVersion       = "MediumRes"
  res@mpDataSetName           = "Earth..4"
  res@mpOutlineSpecifiers     = (/"China:states"/)       ;China:states
  res@mpLandFillColor         = "white"
  res@mpInlandWaterFillColor  = "white"
  res@mpOceanFillColor        = "white"
  res@mpOutlineBoundarySets   = "Geophysical"
  res@mpMaskAreaSpecifiers    = (/"China","Taiwan"/)
  res@trGridType              = "TriangularMesh"
  ;res@trGridType              = "LogLin"

;>--------------------------------------------<
; set for the plot
;>--------------------------------------------<                       
  res@gsnSpreadColors         = True         
  res@lbLabelAutoStride       = True
  res@gsnAddCyclic            = False                        ;important
  res@cnSmoothingOn           = False
  res@lbLabelBarOn            = True
  res@pmLabelBarWidthF        = 0.4        
  res@pmLabelBarHeightF       = 0.06  
  res@lbTopMarginF            = 0.20
  res@pmLabelBarHeightF       = 0.10
  res@tmXBLabelsOn            = True            
  res@tmXBOn                  = True         
  res@tmYRLabelsOn            = False            
  res@tmYROn                  = False         
  res@tmYLLabelsOn            = True            
  res@tmYLOn                  = True            
  res@tmXTLabelsOn            = False            
  res@tmXTOn                  = False            
  res@tmXBLabelFontHeightF    = 0.017
  res@tmYLLabelFontHeightF    = 0.017
  res@tiMainFontHeightF       = 0.015
  ;res@tiMainString            = "European Center for Medium-Range Weather Forecasts (RSMC)"
  res@tiUseMainAttributes     = True
  ;res@vpWidthF                = 0.2  ; So they can all fit on same page.
  ;res@vpHeightF               = 0.2

;自定义X坐标轴的标签和小标签刻度  
;  res@tmXBMode                = "Explicit"   
;  res@tmXBValues              = (/75,85,95,105/)  
;  res@tmXBLabels              = (/"75~S~o~N~E","85~S~o~N~E","95~S~o~N~E","105~S~o~N~E"/)   
;  res@tmXBMinorValues         = fspan(70,110,21)  
;  res@tmXBMinorOn             = True  

;自定义Y坐标轴的标签和小标签刻度  
;  res@tmYLMode                = "Explicit"   
;  res@tmYLValues              = (/22,27,32,37/)  
;  res@tmYLLabels              = (/"22~S~o~N~N","27~S~o~N~N","32~S~o~N~N","37~S~o~N~N"/)   
;  res@tmYLMinorValues         = fspan(20,40,11)  
;  res@tmYLMinorOn             = True
;>============================================================<
  ;set for rain
  rescnr                      =res
  ;rescnr@cnFillDrawOrder      = "PreDraw"
  rescnr@cnLevelSelectionMode = "ExplicitLevels"
  rescnr@cnFillOn             = True
  rescnr@cnFillMode           = "RasterFill"  
  rescnr@cnLinesOn            = False  
  rescnr@cnLineLabelsOn       = False
  rescnr@gsnPaperOrientation  = "portrait"
  ;rescnr@cnLevels             = (/0.1,0.5,1,2,3,4,5,6,8,10,20,40/)
  ;rescnr@gsnRightString       = "mm/d"
  ;rescnr@gsnLeftString        = "JJA"



  wks = gsn_open_wks("pdf","TBB")
  gsn_define_colormap(wks,"ncl_default")
  plot = gsn_csm_contour_map(wks,tbb,rescnr)
end

QQ截图20161216151715.png
密码修改失败请联系微信:mofangbao
发表于 2016-12-16 19:16:42 | 显示全部楼层
NCL在画图TBB的时候有bug,你去官网看看打补丁。或者等6.4版本发布。不过记得本论坛有人修改过,你找找
密码修改失败请联系微信:mofangbao
发表于 2016-12-16 23:09:56 | 显示全部楼层
密码修改失败请联系微信:mofangbao
发表于 2023-6-27 21:07:09 | 显示全部楼层
楼主的lat和lon写反了,研究了一晚上发现是这种小错误!!!!!
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表