爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 5331|回复: 0

求助,请大家帮我看看这个程序是不是有什么问题,谢谢各位了

[复制链接]

新浪微博达人勋

发表于 2017-9-26 10:04:36 | 显示全部楼层 |阅读模式

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

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

x
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"   
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"

begin
f = addfile("/home/Dell/sh/2016.8.125.nc","r")
sshf1 = short2flt(f->sshf)
sshf2 = sshf1/(-10800)
;copy_VarMeta(sshf1,sshf2)
;copy_VarCoords(sshf1,sshf2)
printVarSummary(sshf2)
sshfAvgTime = dim_avg_n(sshf2,0)
;printVarSummary(sshfAvgTime)




wks = gsn_open_wks("png" ,"2016.8.125")      ; send graphics to PNG file
;
;*************************************************************************


  res1                       = True     ; plot mods desired

  res1@gsnDraw               = False
  res1@gsnFrame              = False

  res1@gsnMaximize           = True     ; Make plot fit the frame
  res1@cnFillOn              = True     ; turn on color fill
  res1@cnLinesOn             = False    ; turn of contour lines
; res@cnLevelSpacingF       = 0.5      ; contour spacing
; res1@mpOutlineBoundarySets = "National"
; res1@mpNationalLineColor = "black"
; res1@mpNationalLineThicknessF = 2
  res1@cnFillPalette         = "BlRe"
  res1@lbOrientation         = "Vertical"
  res1@gsnLeftString         ="SH"
  res1@gsnRightString        ="w/m*2"
  res1@gsnAddCyclic          = False    ; data already has cyclic point
                       ; this must also be set for any zoom

  res1@cnLevelSelectionMode = "ExplicitLevels"   ; set explicit contour levels
  res1@cnLevels    = (/ -40,-35., -30.,-25.,-20.,-15.,-10.,-5.,0.,5.,10.,15.,20.,25.,30.,35.,40.,45.,50.,55.,60./)   ; set levels
  ;res1@cnLevels = fspan(-40, 100, 5)
  ;res1@cnMinLevelValF = -40
  ;res1@cnMaxLevelValF = 100
  ;res1@cnLevelSpacingF = 5



  res1@mpMinLatF            =  25      ; range to zoom in on
  res1@mpMaxLatF            =  45.
  res1@mpMinLonF            =  70.
  res1@mpMaxLonF            =  110.

  res1@tiMainString = "sensible heat"

  plot1 = gsn_csm_contour_map(wks,sshfAvgTime(:,:), res1)

  ;
  filename = "/home/Dell/Basins_copy/TP_Boundary.shp"

;--- Open workstation.
  ; wks = gsn_open_wks("png","shapefiles")

;---Create the map
  ; map = create_map(wks,"Places of interest")

;---Attach the polylines
  pres             = True
  pres@gsLineColor = "black"
  pres@gsLineThicknessF = 2
  dum = gsn_add_shapefile_polylines(wks,plot1,filename,pres)

;---Drawing the map will also draw the attached polylines.
  draw(plot1)
  frame(wks)


;*************************************************************************


;Draw(plot)
;Frame(wks)
end
本人下载了ERA Interium的surface sensible heat flux数据打算计算下他的月平均并画图,结果发现画出来的高原东部的感热大于西部的感热,与平时文章中的实际情况不符。我想请大家帮忙看看到底哪里出现了问题。麻烦大家了。



2016.8.125.png
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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