模版网站建设企业,衡水wap网站建设价格,厦门公司注册代理,网站功能设计怎么写begin ncol 6 ;台风参数 nrow 31 ;时次总数 nbin 6 ;已知该该气旋共经历了6个等级的演变 ;读入台风资料 data asciiread(NEPARTAK.txt,(/nrow,ncol/),integer) ;/31,6/ 31行6列#xff0c;integer整数类型 ;;数据读取函数总结 6 ;台风参数 nrow 31 ;时次总数 nbin 6 ;已知该该气旋共经历了6个等级的演变 ;读入台风资料 data asciiread(NEPARTAK.txt,(/nrow,ncol/),integer) ;/31,6/ 31行6列integer整数类型 ;;数据读取函数总结asciiread读取cav、txt文件addfile读取nc、hdf、grib、shp文件fbindrread读取bin、ctl、dat文件 amp data(:,1) ; 强度 lat data(:,2)/10. ; 纬度 lon data(:,3)/10. ; 经度 wks gsn_open_wks(pdf,plot-typhoon) gsn_define_colormap(wks, rainbow) cmap read_colormap_file(rainbow) ;读取色板中的颜色 ncol dimsizes(cmap(:,0)) ;色板的颜色总数 res True resgsnFrame False resgsnDraw False resmpMinLatF 5 resmpMaxLatF 35 resmpMinLonF 105 resmpMaxLonF 150 resmpOutlineOn True respmTickMarkDisplayMode Always ;坐标轴上添加度符号 map gsn_csm_map(wks,res) ;绘制出地图底图 ;--添加任意折线表示出台风路径 lnres True lnresgsLineColor black lnresgsLineThicknessF 1.5 lnresgsLineDashPattern 0 str unique_string(string) map$str$ gsn_add_polyline(wks,map,lon,lat,lnres) ;绘制Nepartak txres True txrestxFontHeightF 0.01 str unique_string(string) ;字符串形式 map$str$ gsn_add_text(wks,map,1601Nepartak,135,22,txres) ;添加标识表示出每个时次的台风中心位置 mkres True mkresgsMarkerSizeF 0.01 ;标识大小在0~1范围内设置 mkresgsMarkerIndex 3 ;标识形状 mkresgsMarkerThicknessF 1.5 do i 0, nrow-1 mkresgsMarkerColor toint(floor(ncol/nbin*amp(i)-1)) ;在整个色板中准等距离的挑选颜色 str unique_string(string) ;字符串形式 map$str$ gsn_add_polymarker(wks,map,lon(i),lat(i),mkres);绘制台风中心位置标识 end do ;在图形正下方添加等级图例 x_ndc (/0.25,0.35,0.45,0.55,0.65,0.75/) ;相对坐标x方向的位置 y_ndc (/0.14,0.14,0.14,0.14,0.14,0.14/) ;相对坐标y方向的位置 t_ndc tostring(ispan(1,6,1)) ;假定已知等级为1-6 labels (/10.8-17.1m/s,17.2-24.4m/s,24.5-32.6m/s,32.7-41.4m/s,41.5-50.9m/s,51.0m/s/) mkresgsMarkerSizeF 0.01 ;标识的大小在 0~1范围内设置。同上 mkresgsMarkerThicknessF 1.5 ;标识的粗细。同上 do i 0,5 ; 绘制每个等级的图例,它由标识和文本构成 mkresgsMarkerColor toint(floor(ncol/nbin*(i1)-1)) gsn_polymarker_ndc(wks,x_ndc(i),y_ndc(i),mkres) gsn_text_ndc(wks,t_ndc(i),x_ndc(i)0.02,y_ndc(i),txres) ;将文本向右边移动0.02 gsn_text_ndc(wks,labels(i),x_ndc(i),y_ndc(i)-0.02,txres);将文本向下边移动0.02 end do ;根据经纬度位置绘制多边形 x_lonlat 117 ;中心位置 y_lonlat 25 box_lon (/x_lonlat-6,x_lonlat6,x_lonlat6,x_lonlat-6,x_lonlat-6/) box_lat (/y_lonlat5,y_lonlat5,y_lonlat-5,y_lonlat-5,y_lonlat5/) gonres True gonresgsFillIndex 3 ;用形状填充默认值是0表示颜色填充3是阴影 gonresgsFillColor red dum gsn_add_polygon(wks,map,box_lon,box_lat,gonres) ;以下绘制第23时次(二次登陆前)的大致风圈范围以其中心为圆心以0.05长度为半径的圆形区域 xout_ndc lon yout_ndc lat datatondc(map,lon,lat,xout_ndc,yout_ndc) ;将经纬度数值转换威单位坐标系中的坐标值 degrad 0.017453292519943 ;Π/1803.1415926/180 degrees ispan(0,360,1) ;创建361点 xcos cos(degrad*degrees) ;各个角度的余弦值 xsin sin(degrad*degrees) ;各个角度的正弦值 ;圆心点位置及半径 xcenter xout_ndc(22) ;第22时次中心所在x位置 ycenter yout_ndc(22) ;第22时次中心所在y位置 radius 0.05 ;计算出各个点在单位坐标系中的坐标位置 xc xcenter (radius * xcos) yc ycenter (radius * xsin) ;设置多边形的绘图参数根据单位坐标系中的位置绘制多边形 lnres True lnresgsFillColor 46 lnresgsFillOpacityF 0.5 ;50%透明 lnresgsFillLineThicknessF 2. ;多边形边框粗细 gsn_polygon_ndc(wks,xc,yc,lnres) ;;添加汕头位置 lon_st 116.7 lat_st 23.5 mres True mresgsMarkerColor black mresgsMarkerSizeF 0.02 mresgsMarkerIndex 3 dum1 gsn_add_polymarker(wks,map,lon_st,lat_st,mres) ;添加SWATOW txtres True txtrestxFontHeightF 0.005 txtrestxFontColor black dum2 gsn_add_text(wks,map,SWATOW,lon_st,lat_st1.5,txtres) ngezlogo(wks) draw(map) frame(wks)end附数据文件可以直接复制保存为NEPARTAK.txt2016070212 1 82 1453 1000 152016070218 1 85 1452 1000 152016070300 2 88 1450 998 182016070306 2 92 1448 998 182016070312 2 99 1442 995 202016070318 2 109 1435 995 202016070400 2 118 1423 995 202016070406 2 128 1410 992 232016070412 3 135 1396 990 252016070418 3 145 1383 985 282016070500 4 153 1366 975 332016070506 4 163 1351 960 402016070512 6 171 1336 940 522016070518 6 180 1319 915 622016070600 6 187 1302 905 682016070606 6 195 1285 895 722016070612 6 201 1270 895 722016070618 6 207 1256 895 722016070700 6 213 1244 895 722016070706 6 216 1234 895 722016070712 6 219 1227 895 722016070718 6 224 1218 915 622016070800 5 226 1207 950 452016070806 4 232 1201 965 382016070812 4 231 1198 975 332016070818 3 233 1196 985 252016070900 2 243 1191 990 232016070906 2 247 1187 992 202016070912 2 251 1181 995 182016070918 1 258 1169 996 152016071000 1 264 1165 998 13