爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 5777|回复: 4

[作图] 数据画出的图与地图无法重合

[复制链接]

新浪微博达人勋

发表于 2020-4-26 13:40:50 | 显示全部楼层 |阅读模式

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

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

x
求问,画出来的图的经纬度信息与地图不一致怎么办。。。
OARCP_oceantemp.png
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2020-4-26 13:43:28 | 显示全部楼层
begin

y=addfile("/Users/ms/Documents/albedo8/tavg.02025.01.01.nc","r")

O_temp=y->O_temp
time1=y->time
latitude1=y->latitude
longitude1=y->longitude
temp1=O_temp(15,0,:,:) ;2100年,试验组的0层海洋温度,0至-50m
temp2=O_temp(15,4,:,:) ;2100年,试验组的4层海洋温度,-380至-550m
temp3=O_temp(15,7,:,:) ;2100年,试验组的7层海洋温度,-980至-1240m

yy=addfile("/Users/ms/Documents/albedo8/rcp85_emi/tavg.01805.01.01.nc", "r")
O_temp1=yy->O_temp
time2=yy->time
latitude2=yy->latitude
longitude2=yy->longitude
temp11=O_temp1(59,0,:,:) ; 2100年,对照组的0层海洋温度
temp12=O_temp1(59,4,:,:)
temp13=O_temp1(59,7,:,:)

temp21=O_temp(15,0,:,:)-O_temp1(59,0,:,:)
temp22=O_temp(15,4,:,:)-O_temp1(15,4,:,:)
temp23=O_temp(15,7,:,:)-O_temp1(15,7,:,:)

wks=gsn_open_wks("png", "OARCP_oceantemp")
gsn_define_colormap(wks, "NCV_blue_red")

res=True
  res@gsnDraw = False
  res@gsnFrame = False

  res@gsnLeftString=" "
  res@gsnRightString=" "

  res@cnFillOn      = True
  res@cnLinesOn     = False         ;等值线不显示
  res@cnLineLabelsOn = False      ;

  res@lbLabelBarOn=False
  res@cnLevelSelectionMode="AutomaticLevels"
  res@cnSmoothingOn = True
  res@cnSmoothingTensionF = 0
  res@cnSmoothingDistanceF=0.0000000000000000000000000000000000000000000000000000000000000000000000000001

res@lbTitleString="~R~[~S~o~N~C~R~]"
res@lbTitleFontHeightF=0.02
res@pmLabelBarOrthogonalPosF=0.15
res@cnFillDrawOrder =  "PreDraw"

pres=True
  pres@gsnMaximize      = True         ; Maximize plots in panel.
  pres@gsnPanelLabelBar = True         ; Turn on panel labelbar.
  pres@pmLabelBarWidthF = 0.8          ; Change labelbar width.
pres@lbTitleString="~R~[~S~o~N~C~R~]"
pres@lbTitleFontHeightF=0.01
pres@pmLabelBarOrthogonalPosF=0.00000000001
  pres@gsnPanelYWhiteSpacePercent=2

plot=new(3,graphic)
plot(0)=gsn_csm_contour_map(wks, temp21, res)
plot(1)=gsn_csm_contour_map(wks, temp22, res)
plot(2)=gsn_csm_contour_map(wks, temp23, res)
gsn_panel(wks,plot, (/1,3/), pres)
end
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2020-4-26 13:45:49 | 显示全部楼层
以上是我的代码,求大神指导!
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2020-4-26 19:44:35 | 显示全部楼层
计算后变量的坐标单位这些属性会消失掉好像,
temp21=O_temp(15,0,:,:)
temp21=O_temp(15,0,:,:)-O_temp1(59,0,:,:)
temp22=O_temp(15,4,:,:)
temp22=O_temp(15,4,:,:)-O_temp1(15,4,:,:)
temp23=O_temp(15,7,:,:)
temp23=O_temp(15,7,:,:)-O_temp1(15,7,:,:)
你这样试试看
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2020-4-27 13:40:33 | 显示全部楼层
问题已解决,非常感谢大神指导!相减老是会用到的{:eb502:}{:eb502:}
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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