This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PUZ 000 dt=0.02 | |
| 8410 2.00000e-02 0 0 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 | |
| -4.84283e-14 -4.83667e-14 -4.83051e-14 -4.82436e-14 -4.81821e-14 -4.81207e-14 | |
| -4.80594e-14 -4.79981e-14 -4.79368e-14 -4.78756e-14 -4.78145e-14 -4.77533e-14 | |
| -4.76923e-14 -4.76313e-14 -4.75703e-14 -4.75094e-14 -4.74486e-14 -4.73877e-14 | |
| -4.73270e-14 -4.72663e-14 -4.72056e-14 -4.71450e-14 -4.70844e-14 -4.70239e-14 | |
| -4.69635e-14 -4.69031e-14 -4.68427e-14 -4.67824e-14 -4.67221e-14 -4.66619e-14 | |
| -4.66017e-14 -4.65416e-14 -4.64815e-14 -4.64215e-14 -4.63615e-14 -4.63016e-14 | |
| -4.62417e-14 -4.61819e-14 -4.61221e-14 -4.60624e-14 -4.60027e-14 -4.59431e-14 | |
| -4.58835e-14 -4.58240e-14 -4.57645e-14 -4.57051e-14 -4.56457e-14 -4.55864e-14 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| # Parameters | |
| def von_karman_transfer(field, L, dx, H=0.75): | |
| # Get field dimensions | |
| ny, nx = field.shape | |
| kx = np.fft.fftfreq(nx, d=dx) * 2 * np.pi # Wavenumbers in x | |
| ky = np.fft.fftfreq(ny, d=dx) * 2 * np.pi # Wavenumbers in y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import typer | |
| from pathlib import Path | |
| from typing import NamedTuple | |
| import numpy as np | |
| # NOTE: You need both! of these packages | |
| # pip install typer pygmt "git+https://github.com/ucgmsim/pygmt_helper.git" (or conda, mamba, whatever) | |
| import pygmt |
OlderNewer