Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with wind interpolation/rotation around 0° #45

Open
efvik opened this issue Feb 25, 2025 · 1 comment
Open

Problem with wind interpolation/rotation around 0° #45

efvik opened this issue Feb 25, 2025 · 1 comment

Comments

@efvik
Copy link

efvik commented Feb 25, 2025

I am getting some strange/artificial wind around 0 degrees, which I guess is introduced at some point during interpolation and rotation (pyfimex?). Below I have compared the data from different sources. What could be the issue here?

Image
For the wind direction, I have changed the range from [0,360) to [-180,180) for visualization purposes (to see that it is mostly continuous).

Script used:

import dnora as dn
from dnora.grid.mask import Edges
import numpy as np

# Bathymetry
grid = dn.grid.GEBCO(lon=(11.331293, 15.7666452),
                       lat=(77.295424, 78.3997957),
                       name="Svalbard")

# Set spacing and boundary points
grid.set_spacing(dm=250)

grid.import_topo()    
grid.mesh_grid()

# Set the boundaries
grid.set_boundary_points(dn.grid.mask.Edges(edges=["W", "N", "S"], step=10))

# Model
model = dn.modelrun.NORA3(grid, start_time="2019-01-01T01:00", end_time="2019-01-05T01:00")

# Boundary Spectra
model.import_spectra(dn.read.spectra.metno.NORA3(),dn.pick.NearestGridPoint())

# Import Forcing
model.import_wind()
model.import_ice()

exporter = dn.export.SWAN(model)
exporter.export_grid()
exporter.export_spectra()
exporter.export_wind()
exporter.export_ice()
executer = dn.executer.SWAN(model)
executer.write_input_file()
executer.run_model(nproc=8)
@bjorkqvi
Copy link
Member

When using the branch v2_prerelase the fimex files seems ok. Also the ascii files that are provided to SWAN seems to have no issues with the magnitude and direction.

We are still trying to figure out if something is happening in the SWAN interpolation or what is going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants