Exemple #1
0
# 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 = ['h']
#sim.plot_vars = ['vort','div']
#sim.clims = [[-0.015, 0.015],[-0.001, 0.001]]
                         
# 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]

# Gaussian initial conditions
W  = 200.e3                # Width
amp = 1.                  # Amplitude
sim.soln.h[:,:,0] += amp*np.exp(-(sim.X/W)**2 - (sim.Y/W)**2)
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]

# Gaussian initial conditions
x0 = 1.*sim.Lx/2.      # Centre
W  = 200.e3                # Width
amp = 1.                  # Amplitude
Exemple #3
0
sim.end_time = 20 * 24. * hour  # End Time                    (sec)

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

# Plotting parameters
sim.plott = 12. * hour  # Period of plots
sim.animate = 'Save'  # 'Save' to create video frames,
# 'Anim' to animate,
# 'None' otherwise
sim.plot_vars = ['vort', 'v', 'u', 'h']
sim.clims = [[-0.8, 0.8], [-0.5, 0.5], [], []]

# Output parameters
sim.output = True  # True or False
sim.savet = 10. * day  # 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]

# Bickley Jet initial conditions
# First we define the jet
Ljet = 10e3  # Jet width
amp = 0.1  # Elevation of free-surface in basic state
sim.end_time = 20*24.*hour   # End Time                    (sec)

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

# Plotting parameters
sim.plott   = 1.*hour  # Period of plots
sim.animate = 'Save'      # 'Save' to create video frames,
                          # 'Anim' to animate,
                          # 'None' otherwise
sim.plot_vars = ['vort', 'v', 'u', 'h']
sim.clims = [ [-0.8, 0.8], [-0.5,0.5], [], []]                         

# Output parameters
sim.output = True        # True or False
sim.savet  = 10.*day      # 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]

# Bickley Jet initial conditions
# First we define the jet
Ljet = 10e3            # Jet width
amp  = 0.1             # Elevation of free-surface in basic state