Click here to load reader

GrADS 画图入门

  • View
    413

  • Download
    0

Embed Size (px)

DESCRIPTION

GrADS 画图入门. Grid Analysis and Display System. 高拴柱 [email protected] 国家气象中心 2008 年 12 月 7 日. Outline. 1 、 grads 功能概述 ( 不讲 ) 2 、 Grads 数据准备: ( 1 ) ncep 资料的直接读取 ( 2 ) mm5out_to_Grads,wrfoutput_to_grads ( 3 ) 二进制格点数据 dat 的生成和 数据描述文件 ctl 作用 ( 4 ) 站点数据 的准备以及站点图形的绘制 3 、图形显示类型及绘图设置: - PowerPoint PPT Presentation

Text of GrADS 画图入门

  • GrADS [email protected]

    Grid Analysis and Display System

  • Outline1grads()2Grads 1ncep 2mm5out_to_Grads,wrfoutput_to_grads 3datctl 43 1.... 2 34grads 1 2 35grads6

  • real ps(72,46,5), z(72,46,7,5),u(72,46,7,5),v(72,46,7,5),q(72,46,5,5).......read(***)ps,z,u,v,q......open (8,file=example.dat,form=unformatted,access=direct,recl=72*46*4)irec = 0do it=1,5 irec=irec+1 write(8,rec=irec) ((ps(j,i,it),j=1,72),i=1,46) do k=1,7 irec=irec+1 write(8,rec=irec+1) ((z(j,i,k,it),j=1,72),i=1,46) enddo .u,v,q.enddo2Grads 1ncep 2mm5_to_Grads,wrf_to_grads 3datctl open (9,file=example.ctl)write(9, (a)) dset ^example.datwrite(9, (a)) title 5 days of model outputwrite(9, (a)) undef -2.56e33'write(9, (a)) xdef 72 linear 100.0 1.0'write(9, (a)) ydef 46 linear 10.0 1.0'write(9, (a)) zdef 7 levels 1000,850,700,500,300,200,100'write(9, (a)) tdef 5 linear 02jan2008 1dywrite(9, (a)) vars 5'write(9, (a)) ps 0 99 Surface Pressurewrite(9, (a)) z 7 99 Geopotential Heightswrite(9, (a)) u 7 99 U windswrite(9, (a)) v 7 99 V windswrite(9, (a)) q 5 99 Specific Humiditywrite(9, (a)) endvars'close(9)

  • 2Grads 1ncep 2mm5_to_Grads,wrf_to_grads 3datctl 4

    data zlev/1000,925,850,700,500,400,300,250,200,150,100/tim=0.0ilev=11nflag=0open(2,file=filename.dat,form='unformatted',access='direct',recl=73*4)irecord=0do j=1,irecirecord=irecord+1write(2,rec=irecord)'abc'//sta(j)(1:5),lat(j),lon(j),tim,ilev,nflag,+ (zlev(i),z(j,i),t(j,i),td(j,i),d(j,i),f(j,i),i=1,11)enddoilev=0irecord=irecord+1write(2,rec=irecord)'abcdefgh',lat(1),lon(1),tim,ilev,nflag,+ (zlev(i),i=1,11),(z(1,i),i=1,11),(t(1,i),i=1,11),+ (td(1,i),i=1,11),(d(1,i),i=1,11),(f(1,i),i=1,11)close(2) open(3,file=filename.ctl,form='formatted',status='unknown') write(3,'(a)')'dset ^'//filename.dat write(3,'(a)')'dtype station' write(3,'(a)')'stnmap ^sounding.map' write(3,'(a)')'undef -999.0' write(3,'(a)')'title sounding' write(3,'(a)')'tdef 1 linear 02JAN1987 1DY ' write(3,'(a)')'vars 5' write(3,'(a)')'zz 11 99 '//staa//' height1' write(3,'(a)')'tt 11 99 '//staa//' temper1' write(3,'(a)')'t_td 11 99 '//staa//' t_td1' write(3,'(a)')'uu 11 99 '//staa//' u wind1' write(3,'(a)')'vv 11 99 '//staa//' v wind1' write(3,'(a)')'endvarsclose(3)

  • ga>ctlopen filename1.ctlga-> open strike024_041714Scanning description file: strike024_041714Data file strike024_041714.dat is open as file 1LON set to 100 150LAT set to 0 40LEV set to 1000 1000Time values set: 2005:4:17:0 2005:4:17:0 open filename2.ctlga-> open strike024_041720Scanning description file: strike024_041720Data file strike024_041720.dat is open as file 2

    ga-> close 1Close Error: Only last file may be closedga-> close 2File 2 has been closed

  • query filesga-> q filesFile 1 : TC0801-StrkPro024 2008041714 Descriptor: strike024_041714.ctl Binary: strike024_041714.datFile 2 : TC0801-StrkPro024 2008041720 Descriptor: strike024_041720.ctl Binary: strike024_041720.datquery file nga-> q file 2File 2 : TC0801-StrkPro024 2008041720 Descriptor: strike024_041720.ctl Binary: strike024_041720.dat Type = Gridded Xsize = 101 Ysize = 81 Zsize = 2 Tsize = 1 Number of Variables = 2 strp 0 0 strike probability strn 0 0 strike number

  • query ctlinfoga-> q ctlinfodset strike024_041714.dattitle TC0801-StrkPro024 2008041714undef 9999xdef 101 linear 100 0.5ydef 81 linear 0 0.5zdef 2 levels 1000 500tdef 1 linear 00Z19JUL2005 60mnvars 2strp 0 0 strike probabilitystrn 0 0 strike numberquery dimsga-> q dimsDefault file number is: 1X is varying Lon = 100 to 150 X = 1 to 101Y is varying Lat = 0 to 40 Y = 1 to 81Z is fixed Lev = 1000 Z = 1T is fixed Time = 00Z19JUL2005 T = 1

  • 3 1....excel 2003 2 3 draw line/string/title/mark

  • display expressga-> d strpContouring: 0 to 100 interval 10 1. set gxout contour 2. set gxout shaded set *** ###

  • Set lon 100 120 Set lat 10 25Set lev 1000Set t 1set cint 15 set ccolor 3 0 12345678 9101112131415set cstyle 2 1234 567 set cthick 10 (1-10)set cmin 10 10 set cmax 90 90 set clevs 495 523 534 556 560 564 572 584 588set ccols 1 2 3 4 5

  • set clab %.1f set clab on/off/forded/%gKK/%g%%%/%.2f(2)/ %03.1f330set clskip 2 set clopts 3 0.1 0.2

  • display expressga-> cga-> set gxout shadedga-> d strpContouring: 0 to 100 interval 10ga-> cbarn 1 0ga-> cbarn 1 1 1. set gxout contour 2. set gxout shaded

  • 3 1....excel 2003 2 3 draw line/string/title/mark/

  • display u;v set gxout barb set gxout vector set gxout stream

  • set gxout vector set arrlab on|off set arrowhead size set arrscl set gxout barb set gxout stream set strmden value [1-10],5

  • 3 1....excel 2003 2 3draw line/string/title/mark/

  • draw title 2008.09.26.08 TC0815

  • set string 1 c 2 45 set strsiz 0.3 0.6 draw string 8 3 first group 8,3first group

  • set line 3 4 6 draw line 3 4 5 7 3,45,7draw rec 3 4 5 6 (3,4),(5,6)draw recf 2 1 3 3 draw mark 10 6 7 0.3 6,70.3draw polyf 5 1 6 2 6 4 draw wxsym 2 7 7 0.5 -1 8 7,70.5-18=2

  • 4grads1 23

    display heightdisplay hcurl(u,v)display sqrt(u*u+v*v)

    display u;vdisplay qx;qy

  • 5grads

    gs

    6

Search related