ParNCLDeveloperInfo/SimpleParNCLScripts: vort_write_nc.ncl

File vort_write_nc.ncl, 564 bytes (added by jayesh, 5 years ago)

Calculate vorticity from wind components and write the result to a netcdf file

Line 
1begin
2fili = systemfunc("ls eul26x48x96.t.3.nc")
3
4; Add input files
5f = addfiles(fili, "r")
6
7; Reading wind components U and V from input files to the mesh
8U = f[:]->U
9V = f[:]->V
10
11; Calculate voriticity from the wind components
12; The result, vort, is located in the parallel mesh
13vort = uv2vrA(U, V)
14
15; Scaling the vorticity
16scale = 1.e05
17vort = vort * scale
18
19; Creating an output file to store the results
20filo = "vort_out.nc"
21fo = addfile(filo, "cw")
22fo@desc = "Vorticity was calculated using ParGAL and ParNCL"
23
24; Writing out vorticity
25fo->vort = vort
26
27end
28