ParNCLDeveloperInfo/SimpleParNCLScripts: data_slice_03.ncl

File data_slice_03.ncl, 433 bytes (added by jayesh, 5 years ago)

Scaling of sliced temp data

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, 0th time step of T
13t_slice = t(0,10:20:2,0:10:4,:)
14
15; double t_slice
16t_slice = t_slice * 2.0
17
18; Print the val to output
19print(t_slice)
20
21end