Skip to content

Commit 528d000

Browse files
committed
changes folder in example back to original
1 parent e50d1ae commit 528d000

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

examples/example_mdl_swan.py

+16-16
Original file line numberDiff line numberDiff line change
@@ -2,53 +2,52 @@
22
# IMPORT dnora
33
# =============================================================================
44
from dnora import grd, mdl, wnd, bnd, inp, wlv, ocr, run
5+
56
# =============================================================================
67
# DEFINE GRID OBJECT
78
# =============================================================================
89
# Set grid definitions
9-
grid = grd.Grid(lon=(5.35, 5.6), lat=(59.00, 59.17), name='Boknafjorden')
10+
grid = grd.Grid(lon=(5.35, 5.6), lat=(59.00, 59.17), name="Boknafjorden")
1011

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

1415
# Import topography and mesh it down to the grid definitions
1516
# Options for grd.readers: EMODNET2020, KartverketNo50m, GEBCO2021
16-
topo_reader = grd.read.EMODNET2020(
17-
tile='*5', folder='/home/janvb/Documents/bathy/EMODNET2020')
17+
topo_reader = grd.read.EMODNET2020(tile="*5", folder="/home/konstac/bathy")
1818
grid.import_topo(topo_reader=topo_reader)
1919

2020
# This can be used to get an empty topography for testing
21-
#grid.import_topo(topo_reader=grd.read.EmptyTopo(grid=grid))
21+
# grid.import_topo(topo_reader=grd.read.EmptyTopo(grid=grid))
2222
#
2323
grid.mesh_grid()
2424
#
2525
# Set the boundaries
26-
bnd_set = grd.boundary.EdgesAsBoundary(edges=[ 'W', 'S'], step = 10)
26+
bnd_set = grd.boundary.EdgesAsBoundary(edges=["W", "S"], step=10)
2727
grid.set_boundary(boundary_setter=bnd_set)
2828
#
2929
#
3030
# =============================================================================
3131
# DEFINE MODEL OBJECT (mdl.)
3232
# =============================================================================
3333
# Options for mdl: SWAN_NORA3, SWAN_ERA5, SWAN_WW3_4km, SWAN_WAM4km
34-
model = mdl.SWAN_NORA3(grid, start_time='2020-12-17T12:00',
35-
end_time='2020-12-17T18:00')
34+
model = mdl.SWAN_NORA3(grid, start_time="2020-12-17T12:00", end_time="2020-12-17T18:00")
3635
# =============================================================================
3736
# IMPORT BOUNDARIES AND FORCING
3837
# =============================================================================
3938
# Boundary Spectra
4039
model.import_boundary(write_cache=True, read_cache=False)
41-
#model.import_boundary(bnd.read_metno.NORA3(source='lustre'),write_cache=True, read_cache=False) # for internal
40+
# model.import_boundary(bnd.read_metno.NORA3(source='lustre'),write_cache=True, read_cache=False) # for internal
4241

4342
# Wind Forcing
4443
model.import_forcing(write_cache=True, read_cache=False)
45-
#model.import_forcing(wnd.read_metno.NORA3(source='lustre'),write_cache=True, read_cache=False) # for internal
44+
# model.import_forcing(wnd.read_metno.NORA3(source='lustre'),write_cache=True, read_cache=False) # for internal
4645

4746
# Ocean Current
48-
#model.import_oceancurrent(ocr.read_metno.NorKyst800())
47+
# model.import_oceancurrent(ocr.read_metno.NorKyst800())
4948

5049
# Water Level
51-
#model.import_waterlevel(wlv.read_ec.GTSM_ERA5())
50+
# model.import_waterlevel(wlv.read_ec.GTSM_ERA5())
5251
# =============================================================================
5352
# PLOT GRID, FORCING AND BOUNDARIES
5453
# =============================================================================
@@ -59,11 +58,12 @@
5958
model.export_grid()
6059
model.export_boundary()
6160
model.export_forcing()
62-
#model.export_oceancurrent()
63-
#model.export_waterlevel()
64-
model.write_input_file(input_file_writer=inp.SWAN(
65-
spec_points=[(5.50, 59.16), (5.55, 59.15)]))
61+
# model.export_oceancurrent()
62+
# model.export_waterlevel()
63+
model.write_input_file(
64+
input_file_writer=inp.SWAN(spec_points=[(5.50, 59.16), (5.55, 59.15)])
65+
)
6666
# =============================================================================
6767
# SWAN RUN
6868
# =============================================================================
69-
model.run_model(model_executer = run.SWAN(nproc=15))
69+
model.run_model(model_executer=run.SWAN(nproc=15))

0 commit comments

Comments
 (0)