Skip to content

WIP - Pylibs integration #155

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

Open
wants to merge 63 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
ba44d11
Added vgrid supplied by Vanessa
tomdurrant Feb 12, 2025
a1e5766
Set z and s coords to None by default
tomdurrant Feb 14, 2025
f3171c9
Import sort
tomdurrant Feb 14, 2025
77861a1
WIP 3d boundary data implementation
tomdurrant Feb 14, 2025
bcb5c4a
Merged pyschism removal
tomdurrant Feb 21, 2025
de228ba
Merge branch 'main' into schism-3d
tomdurrant Feb 21, 2025
800aa5d
Fixed 2d tests
tomdurrant Feb 25, 2025
7afe223
FIxed grid 3d test
tomdurrant Feb 25, 2025
6dc6fca
Added 3d temperature boundary test
tomdurrant Feb 25, 2025
c67e909
Added 3d check on grid to activate 3d boundary
tomdurrant Feb 26, 2025
0cc61d1
Added 3d boundary implementation. Should be considered WIP, not fully…
tomdurrant Mar 11, 2025
a5563e6
WIP Replacing all pyschism functionality with pylibs. Most of the imp…
tomdurrant Apr 3, 2025
af9576b
Updated tests
tomdurrant Apr 3, 2025
39d03b6
Removed pylibs_adapter level and change to using pylibs directly in c…
tomdurrant Apr 7, 2025
65be3ca
Improved tests
tomdurrant Apr 7, 2025
9b3e318
Fixed legacy imports in schism tests
tomdurrant Apr 7, 2025
c17ca97
Cleaned up grid and vgrid implemntation
tomdurrant Apr 10, 2025
97d689c
pydantic v2 updates
tomdurrant Apr 10, 2025
7fc63eb
Black
tomdurrant Apr 10, 2025
66450b4
Fixed duplication of tidaldataset args
tomdurrant Apr 10, 2025
ba7ed96
Grid plotting improvements
tomdurrant Apr 10, 2025
6692be8
Adde coastlines to utils plotting
tomdurrant Apr 10, 2025
c59209b
Added get alias to vgrid
tomdurrant Apr 10, 2025
a032b5b
Black
tomdurrant Apr 10, 2025
731a1b7
Removed reduntand fill_tails methods
tomdurrant Apr 10, 2025
e158d51
Delete legacy pyschism code
tomdurrant Apr 10, 2025
7c9605c
Delete intermediate pylibs adaptor code
tomdurrant Apr 10, 2025
544c55e
Attach plotting methods. These are WIP
tomdurrant Apr 10, 2025
6418653
Pydantic v2
tomdurrant Apr 10, 2025
656ce96
Pydantic v2
tomdurrant Apr 10, 2025
760d9c3
Removed fill_tails function
tomdurrant Apr 10, 2025
67ba760
Fixed boundary tests
tomdurrant Apr 11, 2025
8b1b895
Remove unncessary fallback code
tomdurrant Apr 11, 2025
77d284a
Proxy some pylibs properties to schismgrid
tomdurrant Apr 11, 2025
ef731db
Add WIP plotting code
tomdurrant Apr 11, 2025
6fee78f
Merged main
tomdurrant Apr 11, 2025
17f6e86
Fixed tests from merge
tomdurrant Apr 11, 2025
2aa4450
Merged main
tomdurrant Apr 11, 2025
b50701f
Black
tomdurrant Apr 11, 2025
07f5d59
Black
tomdurrant Apr 11, 2025
f216cdd
Fixed serialisation issue with vgrid
tomdurrant Apr 11, 2025
3722e68
Simplified vgrid generation logic
tomdurrant Apr 11, 2025
d36c01d
Remove legacy warning options
tomdurrant Apr 11, 2025
dd1a6b9
Cleaned up call
tomdurrant Apr 11, 2025
6ae6fce
Refined data call
tomdurrant Apr 11, 2025
fe26dbb
Black
tomdurrant Apr 11, 2025
4650aba
Added namelist demo configs
tomdurrant Apr 11, 2025
366f6d5
Added hotart generation
tomdurrant May 7, 2025
0d63494
Added mising module from last commit
tomdurrant May 7, 2025
8223414
Black
tomdurrant May 7, 2025
e7770b9
Added the ability to create a hotfile from 3d input data. Added to the
tomdurrant May 8, 2025
c223024
Added hotfile config to 3d examples
tomdurrant May 8, 2025
a57b53c
Removed unncessary additional lines from bctides
tomdurrant May 8, 2025
2ea907d
Merge branch 'main' into pylibs
tomdurrant May 12, 2025
9d42fd5
Moved SchismCSIROConfig and SchismCSIROMigrationConfig to legacy config
tomdurrant May 13, 2025
96bdbbe
Added test run script
tomdurrant May 13, 2025
1cc85f4
Added WIP plotting tests
tomdurrant May 15, 2025
f80149d
More targetted logging
tomdurrant May 15, 2025
432a850
Fixed bug in tidel velocity dimensions
tomdurrant May 15, 2025
7542b61
Fixed serialisation warnings
tomdurrant May 15, 2025
7b3f257
Removed fluff from run script
tomdurrant May 21, 2025
d0d56aa
Merge branch 'main' into pylibs
tomdurrant May 21, 2025
7a09d99
Merge branch 'main' into pylibs
tomdurrant May 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions notebooks/schism/demo_nml.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
output_dir: schism_declaritive
period:
start: 20230101T00
end: 20230101T12
interval: 3600
run_id: test_schism_nml
delete_existing: True
config:
model_type: schism
grid:
grid_type: schism
hgrid:
id: hgrid
model_type: data_blob
#source: ../../tests/schism/test_data/hgrid.gr3
source: ../../tests/schism/test_data/hgrid_20kmto60km_rompyschism_testing.gr3
# vgrid:
# model_type: vgrid2D_generator
drag: 1
data:
data_type: schism
atmos:
air_1:
data_type: sflux_air
source:
model_type: file
uri: "../../tests/schism/test_data/era5.nc"
uwind_name: u10
vwind_name: v10
prmsl_name: msl
filter:
sort: {coords: [latitude]}
buffer: 5
ocean:
elev2D:
buffer: 0.0
coords:
t: time
x: xlon
y: ylat
source:
uri: ../../tests/schism/test_data/hycom.nc
model_type: file
variables:
- surf_el
tides:
data_type: tides
constituents: [M2, S2, N2]
flags: [[5, 3, 0, 0]]
tidal_database: "tpxo"
ntip: 0
cutoff_depth: 50.0
tidal_data:
data_type: tidal_dataset
elevations: ../../tests/schism/test_data/tpxo9-neaus/h_m2s2n2.nc
velocities: ../../tests/schism/test_data/tpxo9-neaus/u_m2s2n2.nc
wave:
buffer: 0.0
coords:
t: time
x: lon
y: lat
z: depth
id: wavedata
source:
catalog_uri: ../../tests/data/catalog.yaml
dataset_id: ausspec
model_type: intake
nml:
param:
schout:
iof_hydro__1: 1 # elevation
iof_hydro__2: 1 # mslp
iof_hydro__14: 1 # wind speed
iof_hydro__16: 1 # surface velocities
iof_wwm__18: 1 # peak wave direction
iof_wwm__1: 1 # significant wave height
iof_wwm__9: 1 # peak period
wwminput:
proc:
deltc: 100
134 changes: 134 additions & 0 deletions notebooks/schism/demo_nml_3d_nontidal_velocities.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
output_dir: schism_declaritive
period:
start: 20230101T00
end: 20230101T12
interval: 3600
run_id: test_schism_nml_3d_nontidal_velocities
delete_existing: True
config:
model_type: schism
grid:
grid_type: schism
hgrid:
id: hgrid
model_type: data_blob
source: ../../tests/schism/test_data/hgrid_20kmto60km_rompyschism_testing.gr3
drag: 1
vgrid:
source: ../../tests/schism/test_data/vgrid.in
data:
data_type: schism
atmos:
air_1:
data_type: sflux_air
source:
model_type: file
uri: "../../tests/schism/test_data/era5.nc"
uwind_name: u10
vwind_name: v10
prmsl_name: msl
filter:
sort: {coords: [latitude]}
buffer: 5
ocean:
elev2D:
buffer: 0.0
coords:
t: time
x: xlon
y: ylat
source:
model_type: file
uri: "../../tests/schism/test_data/hycom.nc"
variables:
- surf_el
SAL_3D:
buffer: 0.0
coords:
t: time
x: xlon
y: ylat
z: depth
source:
model_type: file
uri: "../../tests/schism/test_data/hycom.nc"
variables:
- salinity
uv3D:
buffer: 0.0
coords:
t: time
x: xlon
y: ylat
z: depth
source:
model_type: file
uri: ../../tests/schism/test_data/hycom.nc
variables:
- water_u
- water_v
TEM_3D:
buffer: 0.0
coords:
t: time
x: xlon
y: ylat
z: depth
source:
model_type: file
uri: "../../tests/schism/test_data/hycom.nc"
variables:
- temperature
hotstart:
source:
model_type: file
uri: "../../tests/schism/test_data/hycom.nc"
temp_var: temperature
salt_var: salinity
coords:
t: time
x: xlon
y: ylat
z: depth
tides:
constituents:
- M2
- S2
- N2
cutoff_depth: 50.0
flags:
- [5, 3, 4, 4]
tidal_data:
data_type: tidal_dataset
elevations: ../../tests/schism/test_data/tpxo9-neaus/h_m2s2n2.nc
velocities: ../../tests/schism/test_data/tpxo9-neaus/u_m2s2n2.nc
wave:
buffer: 0.0
coords:
t: time
x: lon
y: lat
z: depth
id: wavedata
source:
catalog_uri: ../../tests/data/catalog.yaml
dataset_id: ausspec
model_type: intake
nml:
param:
core:
ibc: 0
ibtp: 1
schout:
iof_hydro__1: 1 # elevation
iof_hydro__2: 1 # mslp
iof_hydro__14: 1 # wind speed
iof_hydro__16: 1 # surface velocities
iof_hydro__18: 1 # water temperature
iof_hydro__19: 1 # salinity
iof_wwm__18: 1 # peak wave direction
iof_wwm__1: 1 # significant wave height
iof_wwm__9: 1 # peak period
wwminput:
proc:
deltc: 100
132 changes: 132 additions & 0 deletions notebooks/schism/demo_nml_3d_tidal_velocities.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
output_dir: schism_declaritive
period:
start: 20230101T00
end: 20230101T12
interval: 3600
run_id: test_schism_nml_3d_tidal_velocities
delete_existing: True
config:
model_type: schism
grid:
grid_type: schism
hgrid:
id: hgrid
model_type: data_blob
source: ../../tests/schism/test_data/hgrid_20kmto60km_rompyschism_testing.gr3
drag: 1
vgrid:
source: ../../tests/schism/test_data/vgrid.in
data:
data_type: schism
atmos:
air_1:
data_type: sflux_air
source:
model_type: file
uri: "../../tests/schism/test_data/era5.nc"
uwind_name: u10
vwind_name: v10
prmsl_name: msl
filter:
sort: {coords: [latitude]}
buffer: 5
ocean:
elev2D:
buffer: 0.0
coords:
t: time
x: xlon
y: ylat
source:
model_type: file
uri: "../../tests/schism/test_data/hycom.nc"
variables:
- surf_el
SAL_3D:
buffer: 0.0
coords:
t: time
x: xlon
y: ylat
z: depth
source:
model_type: file
uri: "../../tests/schism/test_data/hycom.nc"
variables:
- salinity
hotstart:
temp_var: water_temp
salt_var: salinity
coords:
t: time
x: xlon
y: ylat
z: depth

# uv3d:
# buffer: 0.0
# coords:
# t: time
# x: xlon
# y: ylat
# z: depth
# source:
# model_type: file
# uri: ../../tests/schism/test_data/hycom.nc
# variables:
# - water_u
# - water_v
TEM_3D:
buffer: 0.0
coords:
t: time
x: xlon
y: ylat
z: depth
source:
model_type: file
uri: "../../tests/schism/test_data/hycom.nc"
variables:
- temperature
tides:
constituents:
- M2
- S2
- N2
cutoff_depth: 50.0
flags:
- [5, 3, 4, 4]
tidal_data:
data_type: tidal_dataset
elevations: ../../tests/schism/test_data/tpxo9-neaus/h_m2s2n2.nc
velocities: ../../tests/schism/test_data/tpxo9-neaus/u_m2s2n2.nc
wave:
buffer: 0.0
coords:
t: time
x: lon
y: lat
z: depth
id: wavedata
source:
catalog_uri: ../../tests/data/catalog.yaml
dataset_id: ausspec
model_type: intake
nml:
param:
core:
ibc: 0
ibtp: 1
schout:
iof_hydro__1: 1 # elevation
iof_hydro__2: 1 # mslp
iof_hydro__14: 1 # wind speed
iof_hydro__16: 1 # surface velocities
iof_hydro__18: 1 # water temperature
iof_hydro__19: 1 # salinity
iof_wwm__18: 1 # peak wave direction
iof_wwm__1: 1 # significant wave height
iof_wwm__9: 1 # peak period
wwminput:
proc:
deltc: 100
Loading