ParNCLDeveloperInfo/SimpleParNCLScripts: minmax.ncl

File minmax.ncl, 527 bytes (added by jayesh, 7 years ago)

Calculating min, max of temp

Line 
1begin
2fili = systemfunc("ls eul26x48x96.t[0-2].nc")  ; 3 files     
3
4setfileoption("nc","SuppressClose",False)   ; alter default mode
5
6f = addfiles(fili, "r") ; add the files
7
8t = f[:]->T ; read temp
9
10; Calculating max temp
11t_max = max(t)
12
13; Calculating max temp on lev at all other dimensions
14t_max_on_lev = dim_max_n(t, 1)
15
16; Calculating min temp
17t_min = min(t)
18
19; Calculating min temp on time at all other dimensions
20t_min_on_time = dim_min_n(t, 0)
21
22print(t_max)
23print(t_max_on_lev)
24print(t_min)
25print(t_min_on_time)
26
27end
28