GRADS中文说明

更新时间:2024-03-03 05:10:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

目 录

前 言 ..................................................................................................................5 第一章 启动GrADS 及打开文件 ................................................................................5

一.启动GrADS..................................................................................................5 二.打开文件 ......................................................................................................6 第 二 章 维 数 环 境.....................................................................................6

set lat|lon|lev|time val1 ............................................................................6 set x|y|z|t vall .......................................................................................6 第 三 章 显示命令及动画...........................................................................................7

一、显示命令....................................................................................................7 二、动画...........................................................................................................7 set loopdim x︱y|z|t............................................................................................7 set looping on|off ...............................................................................................7 第 四 章 图形输出类型 ............................................................................................8

对格点数据:....................................................................................................8 bar: 直方图 ........................................................................................................8 barb:风向杆形式绘二维风场 ..............................................................................8 contour:二维等值现图 ........................................................................................8 errbar:单线图及误差分布 ...................................................................................8 frgid:用指定颜色填充二维格点场 .......................................................................8 fwrite:图形不在屏幕上显示,而是将输出结果存入一个由“set fwrite 文件名”所指定的文件中。 ................................................................................................8 gid:以网格形式在各网点中央标出该点数值........................................................8 line:单线图 ........................................................................................................8 linefill:两单曲线之间填色 ..................................................................................8 scatter:散点图 ....................................................................................................8 shaded:二维填色图 ............................................................................................8 stat:输出有关的统计量 .......................................................................................8 stream:流线形式绘二维风场 ...............................................................................8 vector:向量间箭头形式绘二维风场 .....................................................................8 对站点数据:....................................................................................................8 barb:在各站点绘风向标 .....................................................................................8 findstn:搜索最近的站点(详见描述语言部分) ..................................................8 model:以天气图形式将天气观测各分量填放在站点四周 .....................................8 value:在各站点标值 ...........................................................................................8 wxsym:绘wx天气符号 ......................................................................................8 Draw wxsym symbol x y size> .....................................................9 对于model,命令为set gxout model ,然后再添图,形式为display

u;v;t;d;slp;delta;cld;wx;vis ................................................................................9 第五章 GrADS资料格式 ............................................................................................9

格点资料资料描述文件......................................................................................9 以下是一个资料描述文件的例子: ....................................................................9 1、DSET data-set-name .................................................................................. 11 2、TITLE string ............................................................................................. 11 3、UNDEF value........................................................................................... 11 4、OPTIONS ................................................................................ 12 5、XDEF number或XDEF number ................................................................................................................ 12 6、YDEF number mapping start或YDEF number....................................................................................................................... 13 7、ZDEF number mapping 或ZDEF number........... 13

1

8、TDEF number LINEAR start-time increment .............................................. 14 9、VARS number........................................................................................... 14 二. 台站资料资料描述文件 .............................................................................. 15 第六章 变量名和表达式 ........................................................................................... 15

一、变量名和表达式 ....................................................................................... 15 二、表达式 ..................................................................................................... 16 第七章 函 数 ..................................................................................................... 16

一. aave函数 ................................................................................................... 16 二.abs函数 ................................................................................................... 16 三.acos函数.................................................................................................. 17 四、asin函数 .................................................................................................. 17 五、atan2函数 ................................................................................................ 17 六、ave函数 ................................................................................................... 17 七、cdiff函数 ................................................................................................. 17 八、const函数................................................................................................. 18 九、cos函数 ................................................................................................... 18 十、exp函数 ................................................................................................... 18 十一、gr2stn函数............................................................................................ 19 十二、hcurl函数 ............................................................................................. 19 十三、hdivg函数 ............................................................................................ 19 十四、log函数 ................................................................................................ 19 十五、log10函数 ............................................................................................ 19 十六、mag函数 .............................................................................................. 19 十七、maskout函数......................................................................................... 20 十八、oacres函数 ........................................................................................... 20 十九、pow函数 .............................................................................................. 20 二十、sin函数 ................................................................................................ 20 二十一、skip函数 ........................................................................................... 20 二十二、smth9函数 ........................................................................................ 21 二十三、sqrt函数............................................................................................ 21 二十四、stnave函数 ........................................................................................ 21 二十五、stnmin函数 ....................................................................................... 21 二十六、stnmax函数 ....................................................................................... 21 二十七、tan函数............................................................................................. 22 二十八、tloop函数.......................................................................................... 22 二十九、tvrh2q函数 ........................................................................................ 22 三十、tvrh2t函数 ............................................................................................ 22 三十一、vint函数 ........................................................................................... 23 第 八 章 图形要素设置 .......................................................................................... 23

对于图形类型为contour起作用的设置 ............................................................ 23 set ccolor color——设置等值线颜色 ................................................................ 23 set ccolor rainbow——设定等值线颜色用彩虹表示............................................ 23 set cstyle style——设定等值线线型................................................................... 23 Set cthick thckns——设定等值线线宽hckns(取值范围1~20) ............................ 23 Set cterp on|off——设置样条差值光滑开关 .................................................... 23 Set clab on|off|forced|string|auto——控制等值线的标记方式。................ 24 set clab % gK 将在等值线标记数值的最后标记上‘K’;................................. 24 set clab %.2f 以小数点后保留2位的格式标记等直线数值;.............................. 24 set clab Foo 用Foo标记所有等值线; ........................................................... 24 set clopts color >——设置等值线标记的颜色。......................... 24 set cint value——设置等值线间隔,clear或display后即重新设置。 .................. 24

2

set clevs lev1 lev2——设置特定的等值线值 ...................................................... 24 set ccols col1 col2——设置对应于set clev 命令设定的特定等值线的颜色 .......... 24 set csmooth on|off——如取on,在绘等值线图前用三次插值将现网格值插到更精细网格上......................................................................................................... 24 Set cmin value ——不画低于此value值的等值线 .............................................. 25 Set cmax value ——不画高于此value的等值线................................................. 25 Set black val1 val2——不化介于val1和val2子之间的等值线............................ 25 对于图形类型为contour,shaded,vector,stream起作用的设置 ........................... 25 set strmden value——设置流线密度 .................................................................. 25 set rbcols color1 color2…——设置新的彩虹颜色序列 ........................... 25 Set rbcols auto——起用内定的彩虹颜色。 ........................................................ 25 Set rbrange low high——设置彩虹颜色序列对应的等值线的取值范围, ............ 25 一.对于图形流线为line起作用的设置.............................................................. 25 set ccolor color——设置线条的颜色号clear或display后即重新设置。 .............. 25 set cstyle style——设置线条类型 ...................................................................... 25 set cmark marker——设置线条上的标记符号marker。 ...................................... 26 set vrange vlo vhi——设置坐标轴(通常指y轴)标尺的取值范围,clear即重新设置................................................................................................................ 26 set missconn on|off——省缺时,线条在缺测资料点断开,set missconn on将连接缺测资料点。.................................................................................................. 26 二.对于图形类型为bar起作用的设置 .............................................................. 26 set bargap val——百分比值设定直方条之间的间隔 ........................................... 26 Set barbase val |bottom |top ......................................................................... 26 三.对于图形类型为grid起作用的设置.............................................................. 26 set dignum number——设置小数点后的为数维number ...................................... 26 set digsize size——设置数字的字符大小size ..................................................... 26 四.对于图形类型为vector其作用的设置 .......................................................... 26 set arrscl size——设置向量箭头的长度为size英寸(虚页英寸) .... 26 set arrowhead size——设置箭头大小为size值 ................................ 27 五.对于图形类型为fgrid其作用的设置............................................................ 27 set fgvals value color….——对取值为value的网格点用颜色为color的色块标记该网格 ....................................................................... 27 六.坐标要素控制 ............................................................................................. 27 set zlog on|off——对z维数方向取对数尺度的开关 ........................................ 27 Set xaxis|yaxis start end——设置坐标轴(x轴或y轴)的坐标从起始值start到结束值end ............................................................................................ 27 Set grid on|off|linestyle|horizontal|vertical|color——控制是否绘网格线 .. 27 Set xlopts color > ..................................................................... 27 Set ylopts color > ..................................................................... 27 Set ylevs lab1 lab2?——设置坐标轴的标记间隔............................................... 28 七、图注设置.................................................................................................. 28 draw title string——在图形顶部写一字符串string作为图的标题,字符串中反斜杆表示齐新行。 .............................................................................................. 28 Set xlab on|off|auto|string .......................................................................... 28 Set annot color ——设置以上3个绘图命令所用的颜色color和线宽thickness.......................................................................................................... 28 Set xyrev on——交换水平和垂直坐标轴所代表的维数方向 ............................... 28 Set xflip on——水平坐标轴的维数方向取反向 .................................................. 28 Set yflip on——垂直坐标轴的维数方向取反向 .................................................. 28 set mproj proj——设置当前地图投影方式。.................................................... 29 latlon——省缺设置,用固定的投影角进行Lat/lon投影; ................................... 29

3

scaled——用不固定的投影角进行latlon投影,地图比例失效; ....................... 29 nps——北半球极地投影;............................................................................... 29 sps——南半球极地投影: ............................................................................... 29 off——同scaled但不画出地图,坐标轴也不代表lat/lon; ............................... 29 robinson——robinson投影; ............................................................................ 29 lambert——lambert投影; ............................................................................... 29 set mpvals lonmin lonmax latmin latmax——设置极地投影时经度和纬度值的取值范围................................................................................................................ 29 Set mpdset——设置地图资料集。 ............................... 29 Set poli on|off——在mres或地图集中开关选择是否使用行政边界.................... 29 Set map color style thickness——设置地图北京的颜色color ............................... 29 Set mpdraw on|off——选off则不绘地图北京 .................................................... 30 九、屏幕显示设置........................................................................................... 30 set display grey |greyscale|color——设置显示模式 .......................... 30 set frame on|off |circle——设置绘图边框 ........................................................... 30 第八章 定义变量 ...................................................................................................... 30

modify varname ................................................................. 32 第九章 页面控制 ............................................................................................... 33

set vpage xmin xmax ymin ymax ........................................................................ 33 set vpage off..................................................................................................... 33 set parea xmin xmax ymin ymax ......................................................................... 33 第十一章 基础绘图指令 ....................................................................................... 34

一.基础绘图指令 ............................................................................................. 34 draw string x y string——在x、y点位置上写字符串string................................. 34 draw line x1 y1 x2 y2——从坐标点x1,y1到x2,y2画一条直线 ........................... 34 draw rec xlo ylo xhi yhi—— .............................................................................. 34 draw mark marktype x y size——在(x,y)点画一个类型为marktype大小为size的符号 ................................................................................................................... 34 set line color