ParNCLDeveloperInfo/SimpleParNCLScripts: data_slice_02.ncl

File data_slice_02.ncl, 414 bytes (added by jayesh, 7 years ago)

Range with strides and vector subscript selection of temp

Line 
1begin
2fili = systemfunc("ls eul26x48x96.t[0-2].nc")  ; 1 files     
3
4setfileoption("nc","SuppressClose",False)   ; user can tell NCL to alter default mode
5
6; Add the files
7f = addfiles(fili, "r")
8
9; Read the variable T
10t = f[:]->T
11
12; levels 10 to 20 with stride 2, lat 0 to 10 with stride 4, lon 2 and 5
13; 1st time step of T
14t_slice = t(1,10:20:2,0:10:4,(/ 2,5 /) )
15
16; Print the val to output
17print(t_slice)
18
19end