⼀|NCL中最常⽤的六种属性: 1、xy(xy plot)2、cn(contour plot)3、vc(vector plot)4、ti(title)5、tm(tickmark)6、lb(labelbar)⼆|含义: 1、gsn(getting started using ncl)2、csm(climate system model)3、res(resources)=True:Indicate you want to set some resources.4、xwks=gsn_open_...
绘制线性图gsn_csm_xy呢还是地图gsn_csm_contour_map呢? 熟悉数据属性 什么叫熟悉数据属性?比如你手中有一组降水数据,那么你首先要了解它是站点数据还是再分析数据?是nc文件还是grib文件又或者是txt文件? 然后根据属性进行读取 nc文件:f=addfile(path,"r") txt文件: f= asciiread(filename,-1,"string") 了...
根据你想绘制图形选择合适的绘图函数,一般都选择gsn_csm_xxx的绘图接口函数,因为它们会比一般的gsn_xxx绘图接口函数多更多的默认设置,我们可以少设置很多属性,能更快完成我们想要的“标准”图形。如: xy = gsn_csm_xy(wks,x,y,res) plot = gsn_csm_contour(wks,data,res) plot = gsn_csm_contour_map(wks...
res@gsnYRefLine = (/-2, 0, 1.5/) res@gsnYRefLineColor = (/"red", "blue", "red"/ plot = gsn_csm_xy(wks, x, y, res) ;;; ; 添加marker mkres = True mkres@gsMarkerColor = "red" mkres@gs
data = (/1, 2, 3, 4, 5/) ; 创建绘图窗口 wks = gsn_open_wks(“x11”, “plot”) ; 创建折线图 plot = gsn_csm_xy(wks, data, True) ; 显示图形 draw(plot) ; 保存图像 frame(wks) end “` 3. 运行NCL+脚本:使用终端或命令行界面进入到存储NCL+脚本的目录中,然后使用以下命令运行NCL+...
plot = gsn_csm_contour_map(wks, temp, res) end 转换为Python代码: import Nio import Ngl import numpy as np 打开NetCDF文件 file = Nio.open_file("data.nc", "r") temperature = file.variables["temperature"][:] 创建绘图环境 wks = Ngl.open_wks("png", "contour_plot") ...
plot = gsn_csm_contour(wks,data,res) plot2 = gsn_xy(wks,data,res) 5.3 一些常用的resources 附录A包含了常用的resource的完整的描述 5.4 画图和gsnDrawresource –默认情况下,当你调用高水平图形接口时,图形会被自动创建,除非你设定:gsnDraw=False. ...
1.编写F77程序调用商业库 13 23 14 24 2.用WRAPIT编译F77文件并指定商业函数库位置(假定为IMSL的子程序) 14 24 3.NCL命名和调用(同F77) 14 24 25-29 15-19 12 25-25 15-15 0 NCL提供了两套基于对象的高质量图形接口——GSN通用接口(须加载gsn_code.ncl脚本)和GSN_CSM接口(须加载gsn_csm.ncl脚本...
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" begin x=(/0,1,2,3,4,5,6,7,8,9/) y=x^2 wks = gsn_open_wks("png", "line_plot") res = True plot = gsn_csm_xy(wks, x, y, res) gsn_panel(wks, plot) gsn_frame(wks) end ``` 上面的代码首先加载了NCL的一些常...
gsn_csm_xy 创建并绘制一个XY坐 function 标图 gsn_csm_xy ( wks [1] : graphic, x : numeric, y : numeric, res [1] : logical ) return_val [1] : graphic 7 gsn_xy 创建并绘制一个在给 function gsn_xy ( 定的工作站XY坐标图 wks [1] : graphic, x : numeric, y : numeric, res [...