-
Notifications
You must be signed in to change notification settings - Fork 0
/
namelist_forecast64.py
43 lines (42 loc) · 1.35 KB
/
namelist_forecast64.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
""" This module contains the namelist variables for the barotropic vorticity model """
import numpy as np
# Set up time and space domain and other parameters
# -----------------------------------------------------------------------------------------
# number of grid points
nx = 64
ny = 64
# time step; case dependent
dt = 0.05
# domain size
lx = 2 * np.pi
ly = lx
# grid spacing
dx = lx / nx
dy = ly / ny
# hyper-diffusivity
nu = 0.0
# linear drag; needed for Komogorov flow; e.g. 0.1
mu = 0.0
# forcing rate (inverse of forcing time scale)
alpha = 0.5
# middle shear zone width as a fraction (e.g. 32 means a width of pi/32)
shearFrac = 32
# random seed for noise in initial condition
randSeed = 2021
# output file name
fileNameFormat = "BVE_Forecast64.nc"
# total integration time; useful for standalone mode only
t_max = 100.0
# is this a restart?
isRestart = False
# restart file name
restartFile = ""
# "sprint" time interval, i.e., save one slice every dtSprint time
dtSprint = 1.0
nSteps = np.around(dtSprint / dt).astype(int)
nSprints = 100
# batch size for 'race'; use smaller batch size when using high resolutions
raceBatch = 100
# nSprints = np.around(t_max/dtSprint).astype(int)
# can be any number of sprints you want to include for a relay, but be aware of memory use
# -----------------------------------------------------------------------------------------