爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 6404|回复: 2

[脚本编辑] grads中调用tcorr报错:Data Request Error: Invalid grid coordinates

[复制链接]

新浪微博达人勋

发表于 2022-1-22 23:22:52 | 显示全部楼层 |阅读模式

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

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

x
  • 调用tcorr求中亚地区夏季降水指数与前期4-5月土壤湿度的关系时出现下图错误

  •                                
    登录/注册后可看大图
  • 脚本如下

'reinit'
'open d:/rain_cenasia_index_cmap_annual_summer_1979_2021.ctl'
'sdfopen d:/soilw_annual_ERA5_4a5_1979_2021.nc'
'open d:/topo_0.5_resolution.ctl'
'set parea 1 6 3 6'
'set map 1 1 0.6'
'set rgb 101 70 130 180'
'set rgb 102 135 206 250'
'set rgb 103 255 228 196'
'set rgb 104 255 99 71'
'set dfile 1'
'set t 1 43'
'set x 1'
'set y 1'
'define apo1=index.1'
'set dfile 2'
'set lon 0 360'
'set y 1 90'
'set z 1'
'set t 1'
'define airave=ave(soilw.2,t=1,t=43)'
'set t 1 43'
'define air2=soilw.2-airave'
'set grid off'
'set grads off'
'set dfile 2'
'set dfile 3'
'set xlopts 1 4 0.11'
'set ylopts 1 4 0.11'
'set t 1'
'set lat 10 60'
'set lon 45 150'
'set dfile 1'
'set gxout shaded'
'set clevs -0.430 -0.334  0 0.334 0.430'
'set rbcols 101 102 0 103 104'
'set cterp on'
'set csmooth on'
'set cthick 2'
'd tcorr(apo1,air2,t=1,t=43)'
'set dfile 3'
'set dfile 1'
'set dfile 2'
'set gxout contour'
'set cterp on'
'set csmooth on'
'set black -0.19 0.19'
'set cint 0.1'
'set clab off'
'set clopts 1 2 0.10'
'set ccolor 1'
'set cthick 2'
'set mpdset cnriver'
'set map 3 1 0.6'
*'draw map'
'set dfile 3'
'set gxout contour'
'set lat 10 60'
'set lon 45 150'
'set clevs 3000'
'set cthick 8'
'set cstyle 1'
'set ccolor 1'
'set clab off'
'd topo.3'
'set mpdset cnriver'
'run 'dir'/D/BaiduNetdiskDownload/OpenGrADS2.1.a2/opengrads/Classic/scripts/cbarn.gs'
'gxprint d:\fig\tcorr_div_southwest_index_rain_cmap_field.png'
  • 不明白Data Request Error: Invalid grid coordinates
      World coordinates convert to non-integer  grid coordinates是什么问题
  • 本人grads新手小白一枚,希望各位大神帮我看一下出现图中错误的原因,感激不尽!!


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

新浪微博达人勋

发表于 2022-1-23 18:46:00 | 显示全部楼层
看一下官方用法吧
tcorr()
tcorr (expr1, expr2, tdim1, tdim2)

This function produces a spatial map of temporal correlation coefficients.

expr1   - a valid GrADS expression that varies in time
expr2   - a valid GrADS expression that varies in time and may also vary in X and Y
tdim1   - starting time dimension expression
tdim2   - ending time dimension expression
The expr1 time series is correlated to the time series at each grid point in expr2. The result is a grid of correlation coefficients that matches the X and Y dimensions of expr2.

Usage Notes
If both expr1 and expr2 vary only in time, the output is a single value.
Use the scorr function to do correlation over the spatial domain.
Example
This example calculates the temporal correlation between sea level pressure and the defined variable elnino, an areal average of surface temperature in the equatorial Pacific.
set x 1
set y 1
set z 1
set t 1 100
define elnino = aave(ts,lon=-160,lon=-80,lat=-10,lat=10)
set lon -180 180
set lat -90 90
set z 1
set t 1
d tcorr(elnino, slp, t=1, t=100)
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2023-11-20 16:31:50 | 显示全部楼层
66666666666666
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

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