コード例 #1
0
sim.rho = [1025.]         # Vector of layer densities   (kg/m^3)
sim.end_time = 2*24.*hour   # End Time                    (sec)

# Parallel: Only applies to the FFTWs
sim.num_threads = 4

# Plotting parameters
sim.plott   = 15.*minute  # Period of plots
sim.animate = 'Anim'      # 'Save' to create video frames,
                          # 'Anim' to animate,
                          # 'None' otherwise

sim.plot_vars = ['u','v','h']   # Specify which variables to plot
                                # Specify manual ylimits if desired
                                # An empty list uses default limits
sim.ylims=[[-0.18,0.18],[-0.18,0.18],[-0.5,1.0]] 

# Output parameters
sim.output = False        # True or False
sim.savet  = 1.*hour      # Time between saves

# Diagnostics parameters
sim.diagt    = 2.*minute  # Time for output
sim.diagnose = False      # True or False

# Initialize the grid and zero solutions
sim.initialize()

for ii in range(sim.Nz):  # Set mean depths
    sim.soln.h[:,:,ii] = sim.Hs[ii]
コード例 #2
0
ファイル: example_1D_geoadjust2.py プロジェクト: PyRsw/PyRsw
sim.end_time = 6.0 * 24.0 * hour  # End Time                    (sec)

# Parallel? Only applies to the FFTWs
sim.num_threads = 4

# Plotting parameters
sim.plott = 20.0 * minute  # Period of plots
sim.animate = "Anim"  # 'Save' to create video frames,
# 'Anim' to animate,
# 'None' otherwise

sim.plot_vars = ["vort", "div", "h"]  # Specify which variables to plot
# sim.plot_vars = ['u','v','h']   # Specify which variables to plot
# Specify manual ylimits if desired
# An empty list uses default limits
sim.ylims = [[-0.01, 0.01], [-2.0, 2.0], [-1.0, 1.0]]
# sim.ylims=[[-0.3,0.3],[-0.2,0.2],[-1.0,1.0]]

# Output parameters
sim.output = False  # True or False
sim.savet = 1.0 * hour  # Time between saves

# Diagnostics parameters
sim.diagt = 2.0 * minute  # Time for output
sim.diagnose = False  # True or False

# Initialize the grid and zero solutions
sim.initialize()

for ii in range(sim.Nz):  # Set mean depths
    sim.soln.h[:, :, ii] = sim.Hs[ii]
コード例 #3
0
ファイル: example_1D_BickleyJet.py プロジェクト: PyRsw/PyRsw
sim.beta = 0e-10          # Coriolis beta               (1/m/sec)
sim.cfl = 0.1             # CFL coefficient             (m)
sim.Hs  = [100.]          # Vector of mean layer depths (m)
sim.rho = [1025.]         # Vector of layer densities   (kg/m^3)
sim.end_time = 14*24.*hour   # End Time                    (sec)

# Parallel? Only applies to the FFTWs
sim.num_threads = 4

# Plotting parameters
sim.plott   = 30.*minute  # Period of plots
sim.animate = 'Save'      # 'Save' to create video frames,
                          # 'Anim' to animate,
                          # 'None' otherwise
sim.plot_vars = ['h']
sim.ylims=[[-0.1,0.1]] 
#sim.plot_vars = ['vort','div']
#sim.clims = [ [-0.8, 0.8],[-0.1, 0.1]]                         

# Output parameters
sim.output = False        # True or False
sim.savet  = 1.*hour      # Time between saves

# Diagnostics parameters
sim.diagt    = 2.*minute  # Time for output
sim.diagnose = False      # True or False

# Initialize the grid and zero solutions
sim.initialize()

for ii in range(sim.Nz):  # Set mean depths
コード例 #4
0
sim.beta = 0e-10  # Coriolis beta               (1/m/sec)
sim.cfl = 0.1  # CFL coefficient             (m)
sim.Hs = [100.]  # Vector of mean layer depths (m)
sim.rho = [1025.]  # Vector of layer densities   (kg/m^3)
sim.end_time = 14 * 24. * hour  # End Time                    (sec)

# Parallel? Only applies to the FFTWs
sim.num_threads = 4

# Plotting parameters
sim.plott = 30. * minute  # Period of plots
sim.animate = 'Save'  # 'Save' to create video frames,
# 'Anim' to animate,
# 'None' otherwise
sim.plot_vars = ['h']
sim.ylims = [[-0.1, 0.1]]
#sim.plot_vars = ['vort','div']
#sim.clims = [ [-0.8, 0.8],[-0.1, 0.1]]

# Output parameters
sim.output = False  # True or False
sim.savet = 1. * hour  # Time between saves

# Diagnostics parameters
sim.diagt = 2. * minute  # Time for output
sim.diagnose = False  # True or False

# Initialize the grid and zero solutions
sim.initialize()

for ii in range(sim.Nz):  # Set mean depths
コード例 #5
0
sim.end_time = 6. * 24. * hour  # End Time                    (sec)

# Parallel? Only applies to the FFTWs
sim.num_threads = 4

# Plotting parameters
sim.plott = 20. * minute  # Period of plots
sim.animate = 'Anim'  # 'Save' to create video frames,
# 'Anim' to animate,
# 'None' otherwise

sim.plot_vars = ['vort', 'div', 'h']  # Specify which variables to plot
#sim.plot_vars = ['u','v','h']   # Specify which variables to plot
# Specify manual ylimits if desired
# An empty list uses default limits
sim.ylims = [[-0.01, 0.01], [-2.0, 2.0], [-1.0, 1.0]]
#sim.ylims=[[-0.3,0.3],[-0.2,0.2],[-1.0,1.0]]

# Output parameters
sim.output = False  # True or False
sim.savet = 1. * hour  # Time between saves

# Diagnostics parameters
sim.diagt = 2. * minute  # Time for output
sim.diagnose = False  # True or False

# Initialize the grid and zero solutions
sim.initialize()

for ii in range(sim.Nz):  # Set mean depths
    sim.soln.h[:, :, ii] = sim.Hs[ii]