Non-divergent vorticity model (BAROVOR)

This program simulates any vortex behaviors in a two-dimensional, non-divergent fluid.

See the detail including the formulation in the manual documentation.

To evaluate the spacial derivation, a full spectral method by FFT is used.

Time integration is only performed for vorticity, and horizontal wind velocities are diagnosed throughout a stream function which is given by a non-divergent relation.

Files

fft_solver.f90 -> main program.

Running the program

Depend

  • STPK library (math library for time integration)
  • NetCDF library (data format library for output data)
  • gtool5 library (wrapper library for NetCDF library)

In order to draw the result, you can use any drawing tools supporing the NetCDF format.

Edit Mkinclude

  • Edit Mkinclude file in the parent directory, depending your system environment.

Make the executable program

$ make      # FFT_BAROVOR (main program) and make_init (program to produce an initial condition) are made.

Edit namelist file

make_init.nml : a configuration file to make a initial data. it is used in make_init program.

&initial
 nx = 601
 ny = 601
 xmin = 0.0d0
 ymin = 0.0d0
 dx = 5.0d2
 dy = 5.0d2
 fname = 'initial.nc'
 tcx = 150.0d3
 tcy = 150.0d3
/

&vprof
 zcore = 2.4d-2
 R1 = 10.0d3
 alpha = 1.0d0
 ri = 0.65d0
 ro = 0.81d0
/

&dipole
 nnum = 1
 xdip = 180.0d3
 ydip = 150.0d3
 zdip = 3.0d-3
 adip = 5.0d3
 ndip = 6
 R2 = 20.0d3
/

namelist.nml : a configuration file to integrate. it is used in FFT_BAROVOR program.

&input
nxi = 601              ! X-coordinate grid number of initial data
nyi = 601              ! Y-coordinate grid number of initial data
hxnt = 261             ! X-coordinate grid number
hynt = 261             ! Y-coordinate grid number
nt = 57600             ! calculating time step
Lx = 300.0d3           ! X-coordinate grid interval [m]
Ly = 300.0d3           ! Y-coordinate grid interval [m]
dt = 3.0d0             ! time interval [s]
dmpstp = 40            ! dumping time step
                       ! dumping time interval is equal to "dmpstp * dt"
ininame = "initial.nc" ! initial data file name.
                       ! if there is no, automatically,
                       ! being made by the program.
inix = 'x'             ! X-coordinate name
iniy = 'y'             ! Y-coordinate name
iniz = 'zeta'          ! vorticity name
inixd = 'xd'           ! X-coordinate name for double
iniyd = 'yd'           ! Y-coordinate name for double
foname = "result.nc"   ! result data
time_flag = 'RK4'      ! time scheme
nu = 6.5d0             ! diffusion coefficient
/

&restart
resopt = 1             ! restart option
                       ! 0 = first start, 1 = restart
resfname = 'restart.nc'! restart file name
restp = 120            ! making time step of restart file
/

Running

$ ./make_init < make_init.nml      # producing the initial data.
$ export OMP_NUM_THREADS=[number]  # (if any,) you can use OpenMP.
$ ./FFT_BAROVOR < namelist.nml     # starting time integration.

The result of time integration is output in a file which is set in "foname" variable in namelist.nml

  • demo animation
    • Shade denotes relative vorticity.
    • The configuration shown in the above is used in this calculation..


Return