爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 6057|回复: 1

[作图] 叠加画图时总有张图无法显示指定区域的问题

[复制链接]

新浪微博达人勋

发表于 2020-5-4 14:43:13 | 显示全部楼层 |阅读模式

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

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

x
初学ncl画图 想画形势图 问题是等温线和等高线合在一起时候
指定经纬度的那四个res是只有在gsn_csm_contour_map有map的情况下才能生效吗?
我的程序里plot_ov等温线后面没有跟map 画等高线的plot有map
所以就会出现出图时等高线显示正常但等温线不是显示的指定经纬度区域而出现叠加错位的问题
请问各位大神 怎么解决这个问题 另外我出图时总会多有一张全白的图是怎么回事?
谢谢各位!以下是我的程序

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
  lat_tulufan = 42.0  
  lon_tulufan = 88.0

f    = addfile("hgt.2013.nc","r")
t    = addfile("air.2013.nc","r")

  u = f->hgt(784,{500},:,:)  
  v = t->air(784,{500},:,:)

  hgt1 = u/10            
  temp  = v-273

  wks = gsn_open_wks("png","2013-07-16-00-Cirsituation.500hpa")

  res = True
  res@gsnDraw   = False
  res@gsnFrame  = False
  res@mpMinLatF   = 20     
  res@mpMaxLatF   = 70
  res@mpMinLonF   = 30
  res@mpMaxLonF   = 120
  res@mpOutlineOn  = True

  res@tiMainString = "2013-07-16-00-Cirsituation.500hpa"  


  res@cnLevelSelectionMode = "ManualLevels"
  res@cnLevelSpacingF = 4



  sres = True
  sres@gsnDraw = False
  res@gsnFrame  = False
  sres@cnMonoLineColor = True

  sres@cnLineColor = "red"

  plot = gsn_csm_contour_map(wks,hgt1,res)
  plot_ov = gsn_csm_contour(wks,temp,sres)   

   overlay(plot,plot_ov)

   mkres               = True   
   mkres@gsMarkerColor = "black"
   mkres@gsMarkerSizeF = 0.02
   mkres@gsMarkerIndex = 1

   dum1  = gsn_add_polymarker(wks,plot,lon_tulufan,lat_tulufan,mkres)


  txres                 = True
  txres@txFontHeightF   = 0.015
  txres@txFontColor     = "black"
  dum2 = gsn_add_text(wks,plot,"Tulufan",lon_tulufan,lat_tulufan+3.0,txres)



  draw(plot)
  frame(wks)

  end

密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2020-5-4 16:44:41 | 显示全部楼层
(0)     check_for_y_lat_coord: Warning: Data either does not contain
(0)     a valid latitude coordinate array or doesn't contain one at all.
(0)     A valid latitude coordinate array should have a 'units'
(0)     attribute equal to one of the following values:
(0)         'degrees_north' 'degrees-north' 'degree_north' 'degrees north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'
(0)     check_for_lon_coord: Warning: Data either does not contain
(0)     a valid longitude coordinate array or doesn't contain one at all.
(0)     A valid longitude coordinate array should have a 'units'
(0)     attribute equal to one of the following values:
(0)         'degrees_east' 'degrees-east' 'degree_east' 'degrees east' 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'
自己试了一下午 总是报经纬度单位的错 可是我查过明明经纬度都是有单位的
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

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