NCL_scripting_language_reference_card_A4.zip

  • 略木槿
    了解作者
  • Halcon
    开发工具
  • 487KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 1
    下载次数
  • 2017-09-29 10:44
    上传日期
NCL快速查找表,A4纸大小,打印出来使用方便
NCL_scripting_language_reference_card_A4.zip
  • NCL_scripting_language_reference_card_A4.pdf
    516.1KB
内容介绍
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <meta name="generator" content="pdf2htmlEX"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css"> <link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css"> <link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/625dd575131e9f3c1e035216/raw.css"> <script src="https://static.pudn.com/base/js/compatibility.min.js"></script> <script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script> <script> try{ pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({}); }catch(e){} </script> <title></title> </head> <body> <div id="sidebar" style="display: none"> <div id="outline"> </div> </div> <div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/625dd575131e9f3c1e035216/bg1.jpg"><div class="c x1 y1 w2 h2"><div class="t m0 x2 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0"> <span class="fc3 sc0"> </span><span class="fc1 ls1"><span class="fc3 sc0"> </span><span class="ls2"><span class="fc3 sc0">NCL</span><span class="fc3 sc0"> </span><span class="ls3"><span class="fc3 sc0">qui</span><span class="fc3 sc0">c</span><span class="fc3 sc0">k</span></span></span><span class="fc3 sc0"> </span><span class="ls4"><span class="fc3 sc0">re</span><span class="fc3 sc0">f</span><span class="fc3 sc0">e</span><span class="fc3 sc0">re</span><span class="fc3 sc0">n</span><span class="fc3 sc0">c</span><span class="fc3 sc0">e</span><span class="fc3 sc0"> </span><span class="fc3 sc0">c</span><span class="fc3 sc0">a</span><span class="fc3 sc0">rd</span></span><span class="fc3 sc0"> </span></span></div><div class="t m0 x2 h4 y3 ff2 fs1 fc1 sc0 ls5 ws0"> <span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="ls6"><span class="fc3 sc0">NCL </span><span class="fc3 sc0">version </span><span class="fc3 sc0">6.4.0</span></span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="ls1"><span class="fc3 sc0"> </span><span class="_ _0"> </span></span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="ls7"><span class="fc3 sc0">Karin </span><span class="fc3 sc0">Meier</span><span class="ls1"><span class="fc3 sc0">-</span><span class="_ _0"> </span></span></span><span class="fc3 sc0">Fleischer</span><span class="fc3 sc0">, </span><span class="fc3 sc0">DKRZ</span><span class="ls1"><span class="fc3 sc0"> </span></span></div><div class="t m0 x2 h4 y4 ff2 fs1 fc1 sc0 ls5 ws0"> <span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0">February </span><span class="fc3 sc0">27, </span><span class="fc3 sc0">2017</span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="fc3 sc0"> </span><span class="ls7"><span class="fc3 sc0">Mary </span><span class="fc3 sc0">Haley, </span><span class="fc3 sc0">NCAR</span><span class="ls1"><span class="fc3 sc0"> </span></span></span></div><div class="t m0 x2 h5 y5 ff1 fs2 fc2 sc0 ls1 ws0"> </div><div class="t m0 x2 h5 y6 ff1 fs2 fc2 sc0 ls8 ws0">Syntax characters<span class="ls1"> </span></div><div class="t m0 x2 h6 y7 ff1 fs3 fc2 sc0 ls1 ws0"> </div></div><div class="c x3 y8 w3 h7"><div class="t m0 x4 h5 y9 ff1 fs2 fc2 sc0 ls1 ws0">= </div></div><div class="c x5 y8 w4 h7"><div class="t m0 x4 h8 y9 ff3 fs2 fc2 sc0 ls9 ws0">assignment syntax<span class="ls1"> </span></div></div><div class="c x3 ya w3 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 lsa ws0">:=<span class="ls1"> </span></div></div><div class="c x5 ya w4 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 lsa ws0">reassignment operator<span class="ls1"> </span></div></div><div class="c x3 yc w3 h7"><div class="t m0 x4 h5 y9 ff1 fs2 fc2 sc0 ls1 ws0">; </div></div><div class="c x5 yc w4 h7"><div class="t m0 x4 h8 y9 ff3 fs2 fc2 sc0 lsb ws0">starts <span class="ls9">a comment<span class="ls1"> </span></span></div></div><div class="c x3 yd w3 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 lsc ws0">/;&#8230;;/<span class="ls1"> </span></div></div><div class="c x5 yd w4 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 lsb ws0">starts a <span class="ls9">block comment<span class="ls1"> </span></span></div></div><div class="c x3 ye w3 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 ls1 ws0">@ </div></div><div class="c x5 ye w4 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 lsb ws0">create or reference <span class="ls9">an attribute<span class="_ _1"></span><span class="ls1"> </span></span></div></div><div class="c x3 yf w3 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 ls1 ws0">! </div></div><div class="c x5 yf w4 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 lsb ws0">create or reference <span class="ls9">a named dimension<span class="ls1"> </span></span></div></div><div class="c x3 y10 w3 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 ls1 ws0">&amp; </div></div><div class="c x5 y10 w4 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 lsb ws0">create or reference a coordinate variable<span class="ls1"> </span></div></div><div class="c x3 y11 w3 ha"><div class="t m0 x4 h5 y12 ff1 fs2 fc2 sc0 ls1 ws0">$<span class="lsc">...$</span> </div></div><div class="c x5 y11 w4 ha"><div class="t m0 x4 h8 y12 ff3 fs2 fc2 sc0 ls9 ws0">enclose strings when importing <span class="_ _1"></span>or exporting </div><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 lsb ws0">variables via <span class="ff2 ls9">addfile</span><span class="ls1"> </span></div></div><div class="c x3 y13 w3 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 lsd ws0">{&#8230;}<span class="ls1"> </span></div></div><div class="c x5 y13 w4 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 lsb ws0">subscript arrays using<span class="ls1"> </span>coordinate<span class="ls1"> </span>values<span class="ls1"> </span></div></div><div class="c x3 y14 w3 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 lsa ws0">[&#8230;]<span class="ls1"> </span></div></div><div class="c x5 y14 w4 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 lsb ws0">subscripts variables of type <span class="ff2 lse">list</span><span class="ls1"> </span></div></div><div class="c x3 y15 w3 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 lsa ws0">(/&#8230;/)<span class="ls1"> </span></div></div><div class="c x5 y15 w4 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 ls9 ws0">array<span class="ls1"> <span class="lsb">constructor</span> </span></div></div><div class="c x3 y16 w3 h7"><div class="t m0 x4 h5 y9 ff1 fs2 fc2 sc0 lsa ws0">[/&#8230;/]<span class="ls1"> </span></div></div><div class="c x5 y16 w4 h7"><div class="t m0 x4 h8 y9 ff3 fs2 fc2 sc0 lse ws0">list <span class="lsb">constructor<span class="ls1"> </span></span></div></div><div class="c x3 y17 w3 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 ls1 ws0">: </div></div><div class="c x5 y17 w4 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 ls9 ws0">array syntax<span class="ls1"> </span>delimiter<span class="ls1"> </span></div></div><div class="c x3 y18 w3 h7"><div class="t m0 x4 h5 y9 ff1 fs2 fc2 sc0 ls1 ws0">| </div></div><div class="c x5 y18 w4 h7"><div class="t m0 x4 h8 y9 ff3 fs2 fc2 sc0 lsb ws0">separator for named dimensions <span class="ls1"> </span></div></div><div class="c x3 y19 w3 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 ls1 ws0">\ </div></div><div class="c x5 y19 w4 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 lsb ws0">continuation character <span class="lsc">for <span class="lsf">wrapping <span class="_ _1"></span>long <span class="lse">lines<span class="ls1"> </span></span></span></span></div></div><div class="c x3 y1a w3 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 lsa ws0">::<span class="ls1"> </span></div></div><div class="c x5 y1a w4 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 lsb ws0">separator when calling external codes<span class="ls1"> </span></div></div><div class="c x3 y1b w3 ha"><div class="t m0 x4 h5 y12 ff1 fs2 fc2 sc0 ls1 ws0">-&gt; </div></div><div class="c x5 y1b w4 ha"><div class="t m0 x4 h8 y12 ff3 fs2 fc2 sc0 ls9 ws0">used <span class="lsc">to <span class="lse">im/export variable<span class="_ _2"></span>s from/to<span class="ls1"> <span class="lsb">supported </span></span></span>file </span></div><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 lsc ws0">formats<span class="ls1"> </span></div></div><div class="c x1 y1 w2 h2"><div class="t m0 x2 hb y1c ff3 fs4 fc2 sc0 ls1 ws0"> </div><div class="t m0 x2 h5 y1d ff1 fs2 fc2 sc0 ls8 ws0">Expressions<span class="ls1"> </span></div><div class="t m0 x2 h8 y1e ff3 fs2 fc2 sc0 ls8 ws0">Algebraic operat<span class="_ _1"></span>ors <span class="ls1"> </span></div><div class="t m0 x2 h8 y1f ff3 fs2 fc2 sc0 ls1 ws0"> </div><div class="t m0 x2 h8 y20 ff3 fs2 fc2 sc0 ls1 ws0"> </div><div class="t m0 x2 h8 y21 ff3 fs2 fc2 sc0 ls1 ws0"> </div><div class="t m0 x2 hb y22 ff3 fs4 fc2 sc0 ls1 ws0"> </div><div class="t m0 x2 h8 y23 ff3 fs2 fc2 sc0 ls9 ws0">Logical operators<span class="ls1"> </span></div><div class="t m0 x2 h8 y24 ff3 fs2 fc2 sc0 ls1 ws0"> </div><div class="t m0 x2 h8 y25 ff3 fs2 fc2 sc0 ls1 ws0"> </div><div class="t m0 x2 hc y26 ff3 fs5 fc2 sc0 ls1 ws0"> </div><div class="t m0 x2 h8 y27 ff3 fs2 fc2 sc0 ls1 ws0"> </div><div class="t m0 x2 h5 y28 ff1 fs2 fc2 sc0 lsf ws0">Data types<span class="ls1"> </span></div><div class="t m0 x2 h8 y29 ff3 fs2 fc2 sc0 lsf ws0">Numeric<span class="ls1"> </span></div><div class="t m0 x2 h8 y2a ff3 fs2 fc2 sc0 ls1 ws0"> </div><div class="t m0 x6 h8 y2b ff3 fs2 fc2 sc0 ls1 ws0">E<span class="ls9">numeric</span> </div><div class="t m0 x6 hd y2c ff3 fs6 fc2 sc0 ls1 ws0"> </div><div class="t m0 x6 h8 y2d ff3 fs2 fc2 sc0 ls1 ws0"> </div><div class="t m0 x6 h8 y2e ff3 fs2 fc2 sc0 ls1 ws0"> </div><div class="t m0 x6 h8 y2f ff3 fs2 fc2 sc0 lsf ws0">Non<span class="ls1">-<span class="ls9">numeric</span> </span></div><div class="t m0 x6 hd y30 ff3 fs6 fc2 sc0 ls1 ws0"> </div><div class="t m0 x6 h5 y31 ff1 fs2 fc2 sc0 ls1 ws0"> <span class="_ _3"> </span> </div><div class="t m0 x6 h5 y32 ff1 fs2 fc2 sc0 ls1 ws0"> <span class="_ _3"> </span> </div><div class="t m0 x6 h5 y33 ff1 fs2 fc2 sc0 ls1 ws0">V<span class="ls9">ariables</span> </div><div class="t m0 x6 h8 y34 ff3 fs2 fc2 sc0 ls8 ws0">Assign a variabl<span class="_ _1"></span>e<span class="ls1"> </span></div><div class="t m0 x6 he y35 ff3 fs7 fc2 sc0 ls1 ws0"> </div><div class="t m0 x6 hf y36 ff4 fs2 fc2 sc0 ls10 ws0">x = 1 ; integer<span class="ls1"> </span></div><div class="t m0 x6 hf y15 ff4 fs2 fc2 sc0 ls10 ws0">y = 2.6 ; float<span class="ls1"> </span></div><div class="t m0 x6 hf y37 ff4 fs2 fc2 sc0 ls10 ws0">d = 20.<span class="ff5 ls1">d</span> ; double<span class="ls1"> </span></div><div class="t m0 x6 hf y38 ff4 fs2 fc2 sc0 ls10 ws0">str = <span class="ls1">"</span>This is a string<span class="ls1">"</span> ; string<span class="ls1"> </span></div><div class="t m0 x6 hf y39 ff4 fs2 fc2 sc0 ls10 ws0">res = True ; logical (True/False)<span class="ls1"> </span></div><div class="t m0 x6 hf y3a ff4 fs2 fc2 sc0 ls10 ws0">a = (/1,2,3,4/) <span class="ls1">; </span>integer array<span class="ls1"> </span></div><div class="t m0 x6 hf y3b ff4 fs2 fc2 sc0 ls10 ws0">b = (/2,7.0,4./) ; float array<span class="ls1"> </span></div><div class="t m0 x6 hf y3c ff4 fs2 fc2 sc0 ls10 ws0">c = (/1.,2,3.,4.0/) * 1<span class="ff5 ls1">d</span>5 <span class="ls1"> ; </span>double array<span class="ls1"> </span></div><div class="t m0 x6 hf y3d ff4 fs2 fc2 sc0 ls10 ws0">d = (/<span class="ls1">"</span>red<span class="ls1">","</span>green<span class="ls1">","<span class="_ _2"></span></span>blue<span class="ls1">"</span>/) <span class="ls1"> </span>; string array<span class="ls1"> </span></div><div class="t m0 x6 hf y3e ff4 fs2 fc2 sc0 ls10 ws0">e = (/True,False,False,True/)<span class="ls1"> </span>; logical array<span class="ls1"> </span></div><div class="t m0 x6 hf y3f ff4 fs2 fc2 sc0 ls10 ws0">f = (/(/1,2/),(/3,6/),(/4,2/)/)<span class="ls1"> </span>; 2D array<span class="ls1"> </span>(3<span class="ls1"> x 2)<span class="_ _2"></span><span class="ff6"> </span></span></div><div class="t m0 x6 h5 y40 ff1 fs2 fc2 sc0 lsf ws0">Arrays<span class="ls1"> </span></div><div class="t m0 x6 h8 y41 ff3 fs2 fc2 sc0 ls11 ws0">The leftmost dimension<span class="ls1"> <span class="lsa">(dim) of a multi</span>-<span class="ls9">dim</span> <span class="ls9">array varies</span> <span class="lsb">slowest </span></span></div><div class="t m0 x6 h8 y42 ff3 fs2 fc2 sc0 ls9 ws0">and the rightmost dim<span class="ls1"> <span class="lsb">varies faste</span>s<span class="lsc">t (row major).</span> </span></div><div class="t m0 x6 h10 y43 ff6 fs7 fc2 sc0 ls1 ws0"> </div><div class="t m0 x6 hf y44 ff4 fs2 fc2 sc0 ls10 ws0">a = (/<span class="ls1">4,2,1,<span class="_ _2"></span>3</span>/) ; 4 elements; index 0<span class="ls1">-3 </span></div><div class="t m0 x6 hf y45 ff4 fs2 fc2 sc0 ls10 ws0">b = (/0,1,1,0/) ; 4 elements; index 0<span class="ls1">-3 </span></div><div class="t m0 x6 hf y46 ff4 fs2 fc2 sc0 ls1 ws0"> </div><div class="t m0 x6 hf y47 ff4 fs2 fc2 sc0 ls10 ws0">c = a + b <span class="ff7 ls1">&#224;<span class="ff4"> </span></span> c = (/4,3,2,3/)<span class="ls1"> </span></div><div class="t m0 x6 hf y48 ff4 fs2 fc2 sc0 ls10 ws0">c = a <span class="ls1">&#8211; </span>b <span class="ls1"> <span class="ff7">&#224;</span> </span> c = (/4,1,0,3/)<span class="ls1"> </span></div><div class="t m0 x6 hf y49 ff4 fs2 fc2 sc0 ls10 ws0">c = a * b <span class="ls1"> <span class="ff7">&#224;</span> </span> c = (/0,2,1,0/)<span class="ls1"> </span></div><div class="t m0 x6 hf y4a ff4 fs2 fc2 sc0 ls10 ws0">c = a/(b+0.1) <span class="ls1"> <span class="ff7">&#224;</span> </span> c = (/40,1.8182,<span class="ff3 ls1"> </span>0.909090<span class="ls1">,</span>30/)<span class="ls1"> </span></div><div class="t m0 x6 h11 y4b ff6 fs2 fc2 sc0 ls1 ws0"> </div><div class="t m0 x6 h8 y4c ff3 fs2 fc2 sc0 ls11 ws0">To <span class="lsb">create<span class="ls1"> <span class="ls9">a new array</span> </span></span></div><div class="t m0 x6 hf y4d ff4 fs2 fc2 sc0 ls10 ws0">n = new(4,integer) <span class="ls1"> <span class="ff7">&#224;</span> </span>integer array of size 4<span class="ls1"> </span></div><div class="t m0 x6 hf y4e ff4 fs2 fc2 sc0 ls10 ws0">q = new((/2,3,5/),float)<span class="ls1"> <span class="ff7">&#224;</span> </span>float array<span class="ls1"> </span>of size 2x3x5<span class="ls1"> </span></div><div class="t m0 x6 hf y4f ff4 fs2 fc2 sc0 ls10 ws0">l = new(100,float,1e20)<span class="ls1"> <span class="ff7">&#224;</span> </span>float array with <span class="ls1"> </span></div><div class="t m0 x6 hf y50 ff4 fs2 fc2 sc0 ls10 ws0"> <span class="ls1"> </span>_FillValue=1e20<span class="ls1"> </span></div><div class="t m0 x6 hf y51 ff4 fs2 fc2 sc0 ls10 ws0">cities = new(20,string) <span class="ls1"> <span class="ff7">&#224;</span> </span>string array of size 20 <span class="ff6 ls12"> <span class="ff3 ls1"> </span></span></div><div class="t m0 x6 h5 y52 ff1 fs2 fc2 sc0 ls8 ws0">Standard subscripti<span class="_ _1"></span>ng of arrays<span class="ff3 ls1"> </span></div><div class="t m0 x6 h8 y53 ff3 fs2 fc2 sc0 ls11 ws0">The indices used in standar<span class="_ _1"></span>d subscripting are i<span class="_ _1"></span>ntegers and the </div><div class="t m0 x6 h8 y54 ff3 fs2 fc2 sc0 ls9 ws0">general form of a standard <span class="_ _1"></span>subscript is:<span class="ls1"> </span></div><div class="t m0 x6 h12 y55 ff3 fs8 fc2 sc0 ls1 ws0"> </div><div class="t m0 x6 hf y56 ff4 fs2 fc2 sc0 ls10 ws0"> <span class="ff5">m:n:i</span> <span class="ls1"> </span>; range <span class="ff5 ls1">m<span class="ff4"> </span></span>to <span class="ff5 ls1">n<span class="ff4"> </span></span>in strides of <span class="ff5 ls1">i </span></div><div class="t m0 x7 h13 y57 ff5 fs2 fc2 sc0 ls1 ws0"> </div><div class="t m0 x7 hf y58 ff4 fs2 fc2 sc0 ls10 ws0"> a = (/1,2,3,4,5,6/)<span class="ls1"> </span></div><div class="t m0 x7 hf y59 ff4 fs2 fc2 sc0 ls1 ws0"> <span class="ls10">a1 =</span> <span class="ls10">a(3) ; a1 is 4</span> </div><div class="t m0 x7 hf y5a ff4 fs2 fc2 sc0 ls1 ws0"> <span class="ls10">a2 = a(0:2) ; a2 contains 1,2,3</span> </div><div class="t m0 x7 hf y5b ff4 fs2 fc2 sc0 ls1 ws0"> <span class="ls10">a3 = a(0:4:2) ; a3 contains 1,3,5</span> </div><div class="t m0 x7 hf y5c ff4 fs2 fc2 sc0 ls1 ws0"> <span class="ls10">a4 = a(1:4:</span>-<span class="ls10">1) ; a4 contains 5,4,3,2</span> </div><div class="t m0 x7 hf y5d ff4 fs2 fc2 sc0 ls1 ws0"> <span class="ls10">a5 = a(:3) ; a5 contains 1,2,3,4</span> </div><div class="t m0 x7 hf y5e ff4 fs2 fc2 sc0 ls1 ws0"> <span class="ls10">a6 = a(5:3) ; a6 contains 6,5,4</span> </div><div class="t m0 x7 hf y5f ff4 fs2 fc2 sc0 ls1 ws0"> <span class="ls10">a7 = a(::</span>-<span class="ls10">1) ;</span> <span class="ls10">reverse a 6,5,4,3,2,1</span> </div><div class="t m0 x7 h5 y60 ff1 fs2 fc2 sc0 lsf ws0">Named <span class="ls11">dimensions<span class="ls1"> </span></span></div><div class="t m0 x7 h8 y61 ff3 fs2 fc2 sc0 ls11 ws0">The dimensions of an array <span class="_ _1"></span>are numbered from 0 to <span class="_ _1"></span><span class="ff2 ls1">n<span class="ff3">-<span class="ls9">1. To attach </span></span></span></div><div class="t m0 x7 h5 y62 ff3 fs2 fc2 sc0 ls9 ws0">a name to an array dimension<span class="ls1">, </span>use the <span class="_ _1"></span><span class="ff1 ls1">!<span class="ff3"> <span class="lsb">character.</span> </span></span></div><div class="t m0 x7 h14 y63 ff4 fs7 fc2 sc0 ls1 ws0"> </div><div class="t m0 x7 hf y64 ff4 fs2 fc2 sc0 ls10 ws0">varNew!0 = <span class="ls1">"</span>time<span class="ls1">" </span></div><div class="t m0 x7 hf y65 ff4 fs2 fc2 sc0 ls10 ws0">varNew!1 = <span class="ls1">"</span>lev<span class="ls1">" </span></div><div class="t m0 x7 hf y66 ff4 fs2 fc2 sc0 ls10 ws0">varNew!2 = <span class="ls1">"</span>lat<span class="ls1">" </span></div><div class="t m0 x7 hf y67 ff4 fs2 fc2 sc0 ls10 ws0">varNew!3 = <span class="ls1">"</span>lon<span class="ls1">" </span></div><div class="t m0 x7 h5 y68 ff1 fs2 fc2 sc0 lsf ws0">Named subscript<span class="_ _1"></span>ing<span class="ls1"> </span></div><div class="t m0 x7 h8 y69 ff3 fs2 fc2 sc0 lsf ws0">Named<span class="ls1"> <span class="ls9">dimensions</span> <span class="ls9">allow you</span> <span class="lsc">to reorder <span class="ls9">and subscript arrays.</span></span> </span></div><div class="t m0 x7 h12 y6a ff3 fs8 fc2 sc0 ls1 ws0"> </div><div class="t m0 x7 hf y6b ff4 fs2 fc2 sc0 ls10 ws0">pres(lat,lon) ; lat=21, lon=40<span class="ls1"> </span></div><div class="t m0 x7 h15 y6c ff4 fs8 fc2 sc0 ls1 ws0"> </div><div class="t m0 x7 hf y6d ff4 fs2 fc2 sc0 ls10 ws0">pres_new1 = pres(lon|:, lat|:) ; reorder<span class="ls1"> </span>(reshape)<span class="ls1"> </span></div><div class="t m0 x7 hf y6e ff4 fs2 fc2 sc0 ls10 ws0">pres_new2 = pres(lon|19:3<span class="ls1">8</span>, lat|0:9) <span class="ls1"> </span></div><div class="t m0 x7 hf y3e ff4 fs2 fc2 sc0 ls10 ws0"> ; define an new array pres_new2(20,10)<span class="ls1"> </span></div><div class="t m0 x7 hf y3f ff4 fs2 fc2 sc0 ls10 ws0"> ; with pres_new2(lon,lat)<span class="ls1"> </span></div><div class="t m0 x7 h5 y40 ff1 fs2 fc2 sc0 lsf ws0">Coordinate va<span class="_ _1"></span>riables<span class="ls1"> </span></div><div class="t m0 x7 h8 y41 ff3 fs2 fc2 sc0 ls8 ws0">A coordinate var<span class="_ _1"></span>iable is a o<span class="_ _1"></span>ne<span class="ls1">-<span class="ls9">dimensional variable with the <span class="_ _1"></span>same </span></span></div><div class="t m0 x7 h8 y42 ff3 fs2 fc2 sc0 ls9 ws0">name as a dimension, which provides<span class="_ _1"></span> <span class="lsb">coordinate values <span class="lsc">for that </span></span></div><div class="t m0 x7 h8 y6f ff3 fs2 fc2 sc0 ls9 ws0">dimension.<span class="ls1"> <span class="lsc">It must be strictly mono<span class="_ _2"></span>tonic (values increa<span class="_ _2"></span>sing or </span></span></div><div class="t m0 x7 h8 y70 ff3 fs2 fc2 sc0 ls9 ws0">decreasing, not <span class="ls13">mixe<span class="_ _1"></span>d).<span class="ls1"> </span></span></div><div class="t m0 x7 hf y71 ff4 fs2 fc2 sc0 ls10 ws0">lat_pts = (/30.,40.,50.,60.,/) ; size 4<span class="ls1"> </span></div><div class="t m0 x7 hf y72 ff4 fs2 fc2 sc0 ls10 ws0">lon_pts = (/ 0.,15, 30, 45, 60/) ; size 5<span class="ls1"> </span></div><div class="t m0 x7 hf y73 ff4 fs2 fc2 sc0 ls10 ws0">lat_pts@units = "degrees_north" ; set units attribute<span class="ls1"> </span></div><div class="t m0 x7 hf y74 ff4 fs2 fc2 sc0 ls10 ws0">lon_pts@units = "degrees_east" ; set units<span class="ls1"> </span>attribute<span class="ls1"> </span></div><div class="t m0 x7 hf y75 ff4 fs2 fc2 sc0 ls10 ws0">grid = new((/4,5/),float) <span class="ls1"> </span>; define 2D array<span class="ls1"> </span></div><div class="t m0 x7 hf y76 ff4 fs2 fc2 sc0 ls10 ws0">grid!0 <span class="ls1"> </span> <span class="ls1"> </span>= "<span class="ff5">lat</span>" ; name left dimension<span class="ls1"> </span></div><div class="t m0 x7 hf y77 ff4 fs2 fc2 sc0 ls10 ws0">grid!1 = "<span class="ff5">lon</span>" ; name right dimension<span class="ls1"> </span></div><div class="t m0 x7 hf y78 ff4 fs2 fc2 sc0 ls10 ws0">grid&amp;<span class="ff5">lat</span><span class="ls1"> </span> = lat_pts <span class="ls1"> </span>; assign values to named <span class="ls1"> </span></div><div class="t m0 x7 hf y79 ff4 fs2 fc2 sc0 ls10 ws0"> <span class="ls1"> </span> ; dimension <span class="ls1">"</span><span class="ff5">lat</span><span class="ls1">" </span></div><div class="t m0 x7 hf y7a ff4 fs2 fc2 sc0 ls10 ws0">grid&amp;<span class="ff5">lon</span><span class="ls1"> </span> = lon_pts ; assign values to named <span class="ls1"> </span></div><div class="t m0 x7 hf y7b ff4 fs2 fc2 sc0 ls10 ws0"> ; dimension <span class="ls1">"</span><span class="ff5">lon</span><span class="ls1">"<span class="ff3"> </span></span></div><div class="t m0 x7 h5 y7c ff1 fs2 fc2 sc0 lsf ws0">Coordinate su<span class="_ _1"></span>bscripting<span class="ls1"> </span></div><div class="t m0 x7 h8 y7d ff3 fs2 fc2 sc0 ls11 ws0">For coordinate subscript<span class="_ _1"></span>ing, all of the <span class="_ _1"></span>rules for standard <span class="_ _1"></span>subscripting </div><div class="t m0 x7 h8 y7e ff3 fs2 fc2 sc0 ls9 ws0">apply except for curly <span class="_ _1"></span>brackets { }, which ar<span class="_ _1"></span>e used to distinguish </div><div class="t m0 x7 h8 y7f ff3 fs2 fc2 sc0 lsb ws0">coordinate subsc<span class="lsa">ript</span>s from standard subscripts.<span class="ff4 fs8 ls1"> </span></div><div class="t m0 x7 h15 y80 ff4 fs8 fc2 sc0 ls1 ws0"> </div></div><div class="c x8 y81 w5 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 ls1 ws0">+ </div></div><div class="c x9 y81 w6 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 ls8 ws0">Addition, str<span class="_ _1"></span>ing concatenati<span class="_ _1"></span>on<span class="ls1"> </span></div></div><div class="c x8 y82 w5 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 ls1 ws0">- </div></div><div class="c x9 y82 w6 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 ls8 ws0">Subtraction / <span class="_ _1"></span>Negation<span class="ls1"> </span></div></div><div class="c x8 y83 w5 h7"><div class="t m0 x4 h5 y9 ff1 fs2 fc2 sc0 ls1 ws0">* </div></div><div class="c x9 y83 w6 h7"><div class="t m0 x4 h8 y9 ff3 fs2 fc2 sc0 ls13 ws0">Multipli<span class="_ _1"></span>cation<span class="ls1"> </span></div></div><div class="c x8 y84 w5 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 ls1 ws0">/ </div></div><div class="c x9 y84 w6 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 lsf ws0">Division<span class="ls1"> </span></div></div><div class="c x8 y85 w5 h7"><div class="t m0 x4 h5 y9 ff1 fs2 fc2 sc0 ls1 ws0">% </div></div><div class="c x9 y85 w6 h7"><div class="t m0 x4 h8 y9 ff3 fs2 fc2 sc0 ls13 ws0">Modulus (<span class="_ _1"></span>integers<span class="_ _1"></span> only)<span class="ls1"> </span></div></div><div class="c x8 y86 w5 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 ls1 ws0">&gt; </div></div><div class="c x9 y86 w6 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 ls14 ws0">Greater tha<span class="_ _1"></span>n<span class="ls1"> </span></div></div><div class="c x8 y87 w5 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 ls1 ws0">&lt; </div></div><div class="c x9 y87 w6 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 ls9 ws0">Less than<span class="ls1"> </span></div></div><div class="c x8 y88 w5 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 ls1 ws0">^ </div></div><div class="c x9 y88 w6 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 ls8 ws0">Exponentiation<span class="ls1"> </span></div></div><div class="c x8 y89 w5 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 ls1 ws0"># </div></div><div class="c x9 y89 w6 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 ls13 ws0">Matrix mu<span class="_ _1"></span>ltipli<span class="_ _1"></span>cation<span class="ls1"> </span></div></div><div class="c x8 y8a w5 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 lsc ws0">.lt.<span class="ls1"> </span></div></div><div class="c x9 y8a w6 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 ls9 ws0">Less than<span class="ls1"> </span></div></div><div class="c x8 y8b w5 h7"><div class="t m0 x4 h5 y9 ff1 fs2 fc2 sc0 lsc ws0">.le.<span class="ls1"> </span></div></div><div class="c x9 y8b w6 h7"><div class="t m0 x4 h8 y9 ff3 fs2 fc2 sc0 ls9 ws0">Less than or equal<span class="ls1"> </span></div></div><div class="c x8 y8c w5 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 lsc ws0">.eq.<span class="ls1"> </span></div></div><div class="c x9 y8c w6 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 ls8 ws0">Equal<span class="ls1"> </span></div></div><div class="c x8 y8d w5 h7"><div class="t m0 x4 h5 y9 ff1 fs2 fc2 sc0 lsc ws0">.ne.<span class="ls1"> </span></div></div><div class="c x9 y8d w6 h7"><div class="t m0 x4 h8 y9 ff3 fs2 fc2 sc0 lsf ws0">Not equal<span class="ls1"> </span></div></div><div class="c x8 y8e w5 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 lsc ws0">.ge.<span class="ls1"> </span></div></div><div class="c x9 y8e w6 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 ls14 ws0">Greater tha<span class="_ _1"></span>n or equal<span class="_ _1"></span><span class="ls1"> </span></div></div><div class="c x8 y8f w5 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 lsc ws0">.gt.<span class="ls1"> </span></div></div><div class="c x9 y8f w6 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 ls14 ws0">Greater tha<span class="_ _1"></span>n<span class="ls1"> </span></div></div><div class="c x8 y90 w5 h7"><div class="t m0 x4 h5 y9 ff1 fs2 fc2 sc0 lsc ws0">.and.<span class="ls1"> </span></div></div><div class="c x9 y90 w6 h7"><div class="t m0 x4 h8 y9 ff3 fs2 fc2 sc0 ls8 ws0">AND<span class="ls1"> </span></div></div><div class="c x8 y91 w5 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 lsc ws0">.or.<span class="ls1"> </span></div></div><div class="c x9 y91 w6 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 ls14 ws0">OR<span class="ls1"> </span></div></div><div class="c x8 y92 w5 h7"><div class="t m0 x4 h5 y9 ff1 fs2 fc2 sc0 lsc ws0">.xor.<span class="ls1"> </span></div></div><div class="c x9 y92 w6 h7"><div class="t m0 x4 h8 y9 ff3 fs2 fc2 sc0 ls8 ws0">Exclusive OR<span class="ls1"> </span></div></div><div class="c x8 y93 w5 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 lsc ws0">.not.<span class="ls1"> </span></div></div><div class="c x9 y93 w6 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 lsf ws0">NOT<span class="ls1"> </span></div></div><div class="c x8 y94 w7 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 ls11 ws0">double<span class="ls1"> </span></div></div><div class="c xa y94 w8 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 ls9 ws0">64 bit<span class="ls1"> </span></div></div><div class="c x8 y28 w7 h7"><div class="t m0 x4 h5 y9 ff1 fs2 fc2 sc0 lsa ws0">float<span class="ls1"> </span></div></div><div class="c xa y28 w8 h7"><div class="t m0 x4 h8 y9 ff3 fs2 fc2 sc0 ls9 ws0">32 bit<span class="ls1"> </span></div></div><div class="c x8 y95 w7 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 lsc ws0">long<span class="ls1"> </span></div></div><div class="c xa y95 w8 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 ls9 ws0">32 bit or 64 bit; <span class="_ _1"></span>signed +/<span class="ls1">- </span></div></div><div class="c x8 y96 w7 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 lsc ws0">integer<span class="ls1"> </span></div></div><div class="c xa y96 w8 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 ls9 ws0">32 bit; signed +/<span class="ls1">- </span></div></div><div class="c x8 y97 w7 h7"><div class="t m0 x4 h5 y9 ff1 fs2 fc2 sc0 ls9 ws0">short<span class="ls1"> </span></div></div><div class="c xa y97 w8 h7"><div class="t m0 x4 h8 y9 ff3 fs2 fc2 sc0 ls9 ws0">16 bit; signed +/<span class="ls1">- </span></div></div><div class="c x8 y98 w7 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 ls11 ws0">byte<span class="ls1"> </span></div></div><div class="c xa y98 w8 h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 ls9 ws0">8 bit; signed +/<span class="ls1">- </span></div></div><div class="c x8 y99 w7 h7"><div class="t m0 x4 h5 y9 ff1 fs2 fc2 sc0 ls9 ws0">complex<span class="ls1"> </span></div></div><div class="c xa y99 w8 h7"><div class="t m0 x4 h8 y9 ff3 fs2 fc2 sc0 lsf ws0">NOT supported<span class="ls1"> </span></div></div><div class="c xb y9a w9 h7"><div class="t m0 x4 h5 y9 ff1 fs2 fc2 sc0 lsc ws0">int64<span class="ls1"> </span></div></div><div class="c xc y9a wa h7"><div class="t m0 x4 h8 y9 ff3 fs2 fc2 sc0 ls9 ws0">64 bit; signed +/<span class="ls1">- </span></div></div><div class="c xb y9b w9 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 ls11 ws0">uint64<span class="ls1"> </span></div></div><div class="c xc y9b wa h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 ls9 ws0">64 bit; unsigned<span class="ls1"> </span></div></div><div class="c xb y9c w9 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 ls11 ws0">uint<span class="ls1"> </span></div></div><div class="c xc y9c wa h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 ls9 ws0">32 bit; unsigned<span class="ls1"> </span></div></div><div class="c xb y9d w9 h7"><div class="t m0 x4 h5 y9 ff1 fs2 fc2 sc0 ls11 ws0">ulong<span class="ls1"> </span></div></div><div class="c xc y9d wa h7"><div class="t m0 x4 h8 y9 ff3 fs2 fc2 sc0 ls9 ws0">32 bit or 64 bit; <span class="_ _1"></span>unsigned<span class="ls1"> </span></div></div><div class="c xb y9e w9 h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 ls11 ws0">ushort<span class="ls1"> </span></div></div><div class="c xc y9e wa h9"><div class="t m0 x4 h8 yb ff3 fs2 fc2 sc0 ls9 ws0">16 bit; unsigned<span class="ls1"> </span></div></div><div class="c xb y9f w9 h7"><div class="t m0 x4 h5 y9 ff1 fs2 fc2 sc0 ls11 ws0">ubyte<span class="ls1"> </span></div></div><div class="c xc y9f wa h7"><div class="t m0 x4 h8 y9 ff3 fs2 fc2 sc0 ls9 ws0">8 bit; unsigned<span class="ls1"> </span></div></div><div class="c xb ya0 wb h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 ls9 ws0">string<span class="ls1"> </span></div></div><div class="c xb ya1 wb h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 ls9 ws0">character<span class="ls1"> </span></div></div><div class="c xb ya2 wb h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 ls11 ws0">graphic<span class="ls1"> </span></div></div><div class="c xb ya3 wb h7"><div class="t m0 x4 h5 y9 ff1 fs2 fc2 sc0 lsa ws0">file<span class="ls1"> </span></div></div><div class="c xb ya4 wb h9"><div class="t m0 x4 h5 yb ff1 fs2 fc2 sc0 lsc ws0">logical<span class="ls1"> </span></div></div><div class="c xb ya5 wb h7"><div class="t m0 x4 h5 y9 ff1 fs2 fc2 sc0 lsc ws0">list<span class="ls1"> </span></div></div></div><div class="pi" data-data='{"ctm":[1.140143,0.000000,0.000000,1.140143,0.000000,0.000000]}'></div></div> </body> </html>
评论
    相关推荐
    • NCL.rar
      利用ncl软件绘画位涡剖面图、读取数据绘画图形,各个程序用途在单个程序所见及数据来源已作出说明。
    • 读取NCL丰富的colormap给matlab画图用
      matlab自带的colormap真的是太少了,而NCL的color tables选择特别多!于是我就把NCL的color tables搬过来给matlab画图用。NCL的color tables看这里...
    • ncl.zip
      ncl对于多维(时间、level、纬度、经度)的数据进行功率谱分析以及基于FFT的带通滤波
    • ncl2grads.sh
      ncl2grads.sh 一个简单的bash shell脚本,用于转换预制的NCL颜色表,以用于Grid Analysis and Display System(GrADS)。 在Linux,Mac和MobaXTerm上进行了测试(适用于Windows用户) 希望该脚本对希望在GrADS中...
    • NCL-ipython-notebooks:NCL Jupyter笔记本示例。 您需要先安装suvarchal的IPyNCL I
      NCL-ipython-笔记本 使用Jupyter笔记本(以前的ipython笔记本)的NCL内核IPyNCL的NCL笔记本示例。 由于在GitHub中没有安装NCL内核和ImageMagick,因此您必须下载笔记本,安装NCL内核(和ImageMagicks)并在本地...
    • language-ncl:Atom 的 NCL 语言支持
      language-ncl 包 这是 (NCAR 命令语言)的包。 它包含语法和一些有用的片段。 它基于 Li Dong 的 Sublime Text。 用法 要安装,请执行以下任一操作: 在命令行中输入apm install language-ncl 。 或者 使用 Atom ...
    • NCL报错处理.rar
      在从网页上拷贝NCL代码到Ubuntu下的NCL运行文件中运行的时候,报错,经过调试解决问题,上传的是两张介绍处理NCL脚本运行错误的经验图片,供有需要的网友参考。
    • GrADS-NCL.rar
      python可以方便调用这个NCL color table matlab可以方便调用这个NCL color table r可以方便调用这个NCL color table
    • NCL-Language-chs.zip
      NCL使用手册中文手册,读取NC格式绘图
    • codesforimageprocessing.rar
      实现简单图像处理,包括256色转灰度图、Hough变换、Walsh变换、中值滤波、二值化变换、亮度增减、傅立叶变换、反色、取对数、取指数、图像平移、图像旋转、图像细化、图像缩放、图像镜像、均值滤波、对比度拉伸、拉普拉斯锐化(边缘检测)、方块编码、梯度锐化、灰度均衡、直方图均衡、离散余弦变换、维纳滤波处理、逆滤波处理、阈值变换、高斯平滑。