nc文件:f=addfile(path,"r") txt文件: f= asciiread(filename,-1,"string") 了解数据变量信息 了解变量信息的方式很多,比如nc文件你可以直接利用三方软件panoply panoply (软件需要搭建Java环境)读取打开,可以看到变量的维度、属性等。其次,利用nc_filedump查看nc文件。 nc_filedump 当然也可以直接编写ncl代码pri...
例:files_names = systemfunc(cd /my/data ; ls *.nc)此命令将先转到/my/data目录下,然后得到此目录下所有的.nc文件,并将其列表赋予files_names变量。x = stringtofloat(systemfunc(cut –c14-19 sample.txt))此命令将从”sample.txt”中截取第14到19列,然后返回一个一维字符串类型的数组给x。system与...
(0,11:18)) time_num@units = "hours since "+str1+" "+str2 utc_date = cd_calendar(time_num,0) utc_str = tostring(tointeger(utc_date)) month_abbr = (/" ","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"/) do i=0,85-1 if(strlen(utc...
1.知道了ncl软件的脚本后缀为.ncl,运行该.ncl脚本的命令为:ncl xxx.ncl 2.当然在这之前需先进入要使用的数据所在的目录下:cd /wk3/zhang/MITAG ;然后再进入远程机上的ncl软件,即输入ncl就进入了该软件!(与grads类似) 3.将.grb2文件转化为.nc格式的文件:先建立一个脚本 ...
11.stringtoxxx——字符串型转换成其他数据类型 39 49 12.ushorttoint——无符号短整型 13.totype——数字或字符串转换成指定格式 39 49 14.tostring_with_format——转换为格式字符串 39 49 40 50 15.tosigned和tounsigned——将8/16/32/64位整型转换为有符号/无符号整型 16.cshstringtolist——将形如...
YYYY = cd_calendar(TIME,-1)/100 ; entire file iYYYY = ind(YYYY.ge.yrStrt .and. YYYY.le.yrLast) xtime = ispan(yrStrt, yrLast, 1) ; 横坐标范围 season = "JJA" ; choose June-July-August seasonal mean 第二步数据处理,这里只是取了一个范围的平均量。
ncl操作手册 NCARCommandLanguage(NCL)一、简介 二、语法 •2.2数据类型 数值型:double(64位)、float(32位)、long(32或64位),integer(32位),short(16位)、byte(8位)。非数值型:string、character、graphic、file、logical、list。•2.3运算符 •代数运算符 –+ 加 –- 减 –* 乘 –^ 指数 –...
例: files_names = systemfunc("cd /my/data ; ls *.nc") 此命令将先转到/my/data目录下,然后得到此目录下所有的.nc文件,并将其列表赋予files_names变量。 x = stringtofloat(systemfunc("cut –c14-19 sample.txt")) 此命令将从”sample.txt”中截取第14到19列,然后返回一个一维字符串类型的数组给x...
files_full_path = systemfunc (ls /my/data/*.nc) files_names = systemfunc (cd /my/data ; ls *.nc) date = systemfunc (date) 运用Unix的“cut ”命令提取ASCII文件的14-19列,返回值是一个字符串型的一维数组,然后转换成浮 点型。 x = stringtofloat (systemfunc (cut –c14-19 sample.txt))...
http://ngwww.ucar.edu/ncl/download ReadandagreetoGPLlicenseFilloutshortregistrationformDownloadbinaries –Precompiledversionsexistfor:IBMRS6000,DECAlpha,SunSolaris,RedHatLinuxandSGIIRIX InstallingNCL Uncompresstarfileininstallationdirectory:––cd/usr/localgunzipncl-4.2.0.Solaris2.7_sun4.tar.gztar–xvf...