Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
f679b06
Merge pull request #3 from viccollado/develop
viccollado Jul 10, 2025
2240700
[JTH] change paths to relative and working with stable version of tk
tausiaj Sep 3, 2025
cbed137
[JTH] add extra boundary conditions generation for Santona example wi…
tausiaj Sep 3, 2025
dfc2005
[JTH] add comment to run schism
tausiaj Sep 3, 2025
8b5a7b8
Merge pull request #5 from GeoOcean/main
viccollado Sep 16, 2025
475f757
[JTH] add first working version of mia notebooks in bluemath style
tausiaj Sep 30, 2025
c401c3c
[JTH] fully run notebook
tausiaj Sep 30, 2025
52997fe
[JTH] notebooks run with every tiodal gauge
tausiaj Oct 1, 2025
8ab4b45
[ARC] add working example notebook for sfincs compound floding
Oct 2, 2025
d922722
Merge pull request #39 from GeoOcean/feature/sfincs-example
tausiaj Oct 2, 2025
6258a76
create inputs folder
pupicvuriljm Oct 2, 2025
abd79dc
delete wrong upload
pupicvuriljm Oct 2, 2025
9ff5e51
add inputs folder and stations_info.csv
pupicvuriljm Oct 2, 2025
f6682a8
upload README.md
pupicvuriljm Oct 2, 2025
214aca1
[AA] working version of nonstat gev
Apolola Oct 2, 2025
df99c5f
Merge pull request #40 from CSAICC/develop
tausiaj Oct 2, 2025
56fdbb7
Merge branch 'develop' of https://github.com/viccollado/BlueMath into…
viccollado Oct 6, 2025
e52535c
[JTH] move dummy example to Dummy folder for the moment
tausiaj Oct 6, 2025
c6da7b7
[JTH] remove moved dummy example for wrappers
tausiaj Oct 6, 2025
b412ae5
[JTH] add working examples for easy swan and swash usage
tausiaj Oct 6, 2025
9a0cea2
climate_services/probabilistic/MUSCLE_Aveiro/inputs/codec_aveiro.nc: …
tausiaj Oct 6, 2025
0635b0e
[JTH] add island bathy for dummy example
tausiaj Oct 6, 2025
b127562
[AA] improved working nonstat gev
Apolola Oct 8, 2025
47db3c9
[JTH] working examples for SWAN and SWASH just dynamic simulations
tausiaj Oct 9, 2025
ed6c99b
[VCF] NonStationaryGEV example
viccollado Oct 10, 2025
f7af165
[AA] first working nonstat gev
Apolola Oct 10, 2025
4b542d1
[AA] Another working nonstat gev
Apolola Oct 10, 2025
2609b17
Merge pull request #44 from CSAICC/develop
tausiaj Oct 12, 2025
b2d2d37
Add notebook example of basic usage of POT
viccollado Oct 14, 2025
410e5d8
[VCF] Update POT notebook
viccollado Oct 14, 2025
2812e5e
[VCF] Add ExtremeCorrection notebook (basic example)
viccollado Oct 21, 2025
7e465f3
[VCF] Update ExtremeCorrection notebook
viccollado Oct 21, 2025
9adaaf9
[AAP] push working global surge seasons with call to R kernel
Apolola Oct 28, 2025
07cedf1
[AAP] Update the instructions
Apolola Oct 29, 2025
a33c656
[VCF] Updarte GEV and GPD notebooks
viccollado Nov 20, 2025
1ae279c
[VCF] Add example to how to use ExtremeCorrection by WT
viccollado Nov 25, 2025
33fb0b9
Merge pull request #48 from CSAICC/feature/seasonalsurge
tausiaj Nov 27, 2025
9510e88
Merge pull request #47 from viccollado/feature/extremes
tausiaj Nov 27, 2025
2809bf5
[JTH] merge last pymesh2d changes
tausiaj Dec 15, 2025
93e825a
[EJP] example xyz mesh generation santander
FaugereE Dec 15, 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
Binary file modified climate_services/probabilistic/MUSCLE_Aveiro/inputs/codec_aveiro.nc
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "97b930aa",
"metadata": {},
"outputs": [],
"source": [
"import geopandas as gpd\n",
"import numpy as np\n",
"import pandas as pd\n",
"import xarray as xr"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "0e0f6af4",
"metadata": {},
"outputs": [],
"source": [
"# Define grid resolution\n",
"resolution = 50\n",
"\n",
"# Setup grid parameters with spatial origin and grid size\n",
"x0, y0 = 585000, 2350004\n",
"x1, y1 = 632500, 2397504\n",
"\n",
"# Boundary point where ocean-driver forcing is setup\n",
"x, y = 601900.8911782742, 2356315.456879479\n",
"gdf_boundary_points = gpd.GeoDataFrame(geometry=gpd.points_from_xy([x], [y]), crs=6634)\n",
"\n",
"# Grid configuration dictionary\n",
"fixed_parameters = {\n",
" \"path_to_dem_tif\": \"inputs/dem.tif\",\n",
" \"dem_tif_var_name\": \"elevtn\",\n",
" \"path_to_rgh_tif\": \"inputs/sfincs.man\",\n",
" \"path_to_outflow_shp\": \"inputs/outflow_boundaries.shp\",\n",
" \"path_to_waterlevel_shp\": \"inputs/inflow_boundaries.shp\",\n",
" \"x0\": x0, # Origin location of the cell edge (x0)\n",
" \"y0\": y0, # Origin location of the cell edge (y0)\n",
" \"dx\": resolution, # Grid size in x-direction\n",
" \"dy\": resolution, # Grid size in y-direction\n",
" \"mmax\": (x1 - x0) // resolution, # Number of grid cells in x-direction\n",
" \"nmax\": (y1 - y0) // resolution, # Number of grid cells in y-direction\n",
" \"rotation\": 0, # Rotation angle in degrees (anti-clockwise from east)\n",
" \"epsg\": 6634, # Coordinate reference system (CRS) EPSG code\n",
" \"path_to_mask\": \"inputs/mask.shp\",\n",
" \"nr_subgrid_pixels\": 1,\n",
" \"gdf_boundary_points\": gdf_boundary_points,\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "4c323def",
"metadata": {},
"outputs": [],
"source": [
"# Creating time chunks as individual cases\n",
"K = 5"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d5523cb9",
"metadata": {},
"outputs": [],
"source": [
"# Waterlevels\n",
"waterlevels_forcing = pd.read_pickle(\"inputs/waterlevels.pkl\")\n",
"\n",
"time_chunks = np.array_split(waterlevels_forcing.index.sort_values().unique(), K)\n",
"time_bounds = [(edge[0], edge[-1]) for edge in time_chunks]\n",
"\n",
"waterlevels_forcing = np.array_split(waterlevels_forcing, K)\n",
"\n",
"slowly_waterlevel = [\n",
" pd.DataFrame(i[\"Msetup\"]).set_axis([0], axis=1) for i in waterlevels_forcing\n",
"]\n",
"quickly_waterlevel = [\n",
" pd.DataFrame(i[\"Hig\"]).set_axis([0], axis=1) for i in waterlevels_forcing\n",
"]"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "592f477d",
"metadata": {},
"outputs": [],
"source": [
"# Precipitation\n",
"precipitation_forcing = xr.open_dataset(\"inputs/precipitation.nc\")\n",
"precipitation_forcing = precipitation_forcing.rio.write_crs(\"epsg:4326\")\n",
"precipitation_forcing = precipitation_forcing.sortby(\"time\")\n",
"\n",
"precipitation_forcing = [\n",
" precipitation_forcing.sel(time=slice(str(start), str(end)))\n",
" for start, end in time_bounds\n",
"]"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0855f806",
"metadata": {},
"outputs": [],
"source": [
"metamodel_parameters = {\n",
" \"precipitation_forcing\": precipitation_forcing,\n",
" \"slowly_waterlevel_forcing\": slowly_waterlevel,\n",
" \"quickly_waterlevel_forcing\": quickly_waterlevel,\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "12c34008",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-10-02 03:40:51,291 - SfincsAlbaModelWrapper - WARNING - Parameter precipitation_forcing is not in the default_parameters\n",
"2025-10-02 03:40:51,293 - SfincsAlbaModelWrapper - WARNING - Parameter slowly_waterlevel_forcing is not in the default_parameters\n",
"2025-10-02 03:40:51,339 - SfincsAlbaModelWrapper - WARNING - Parameter quickly_waterlevel_forcing is not in the default_parameters\n"
]
}
],
"source": [
"from bluemath_tk.wrappers.sfincs.sfincs_wrapper import SfincsModelWrapper\n",
"\n",
"sfincs_model = SfincsModelWrapper(\n",
" templates_dir=\"templates\",\n",
" metamodel_parameters=metamodel_parameters,\n",
" fixed_parameters=fixed_parameters,\n",
" output_dir=\"CASES\",\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "b83fb3a2",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Model dir already exists and files might be overwritten: /home/ibbisin0/globus/ricondal/Bluemath_Github/BlueMath/methods/dynamical_downscaling/SfincsExample/Alba_CASES/0000/gis.\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Model dir already exists and files might be overwritten: /home/ibbisin0/globus/ricondal/Bluemath_Github/BlueMath/methods/dynamical_downscaling/SfincsExample/Alba_CASES/0001/gis.\n",
"Model dir already exists and files might be overwritten: /home/ibbisin0/globus/ricondal/Bluemath_Github/BlueMath/methods/dynamical_downscaling/SfincsExample/Alba_CASES/0002/gis.\n",
"Model dir already exists and files might be overwritten: /home/ibbisin0/globus/ricondal/Bluemath_Github/BlueMath/methods/dynamical_downscaling/SfincsExample/Alba_CASES/0003/gis.\n",
"Model dir already exists and files might be overwritten: /home/ibbisin0/globus/ricondal/Bluemath_Github/BlueMath/methods/dynamical_downscaling/SfincsExample/Alba_CASES/0004/gis.\n"
]
}
],
"source": [
"sfincs_model.build_cases()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f08271ab",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-10-02 03:18:10,417 - SfincsAlbaModelWrapper - ERROR - Error running command: docker run --rm -v .:/case_dir -w /case_dir deltares/sfincs-cpu\n",
"2025-10-02 03:18:10,418 - SfincsAlbaModelWrapper - ERROR - Error: Command 'docker run --rm -v .:/case_dir -w /case_dir deltares/sfincs-cpu' returned non-zero exit status 2.\n",
"2025-10-02 03:18:13,839 - SfincsAlbaModelWrapper - ERROR - Error running command: docker run --rm -v .:/case_dir -w /case_dir deltares/sfincs-cpu\n",
"2025-10-02 03:18:13,840 - SfincsAlbaModelWrapper - ERROR - Error: Command 'docker run --rm -v .:/case_dir -w /case_dir deltares/sfincs-cpu' returned non-zero exit status 2.\n",
"2025-10-02 03:18:16,976 - SfincsAlbaModelWrapper - ERROR - Error running command: docker run --rm -v .:/case_dir -w /case_dir deltares/sfincs-cpu\n",
"2025-10-02 03:18:16,976 - SfincsAlbaModelWrapper - ERROR - Error: Command 'docker run --rm -v .:/case_dir -w /case_dir deltares/sfincs-cpu' returned non-zero exit status 2.\n",
"2025-10-02 03:18:20,365 - SfincsAlbaModelWrapper - ERROR - Error running command: docker run --rm -v .:/case_dir -w /case_dir deltares/sfincs-cpu\n",
"2025-10-02 03:18:20,365 - SfincsAlbaModelWrapper - ERROR - Error: Command 'docker run --rm -v .:/case_dir -w /case_dir deltares/sfincs-cpu' returned non-zero exit status 2.\n",
"2025-10-02 03:18:23,651 - SfincsAlbaModelWrapper - ERROR - Error running command: docker run --rm -v .:/case_dir -w /case_dir deltares/sfincs-cpu\n",
"2025-10-02 03:18:23,651 - SfincsAlbaModelWrapper - ERROR - Error: Command 'docker run --rm -v .:/case_dir -w /case_dir deltares/sfincs-cpu' returned non-zero exit status 2.\n"
]
}
],
"source": [
"sfincs_model.run_cases(launcher=\"docker\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "bluemath-dev",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.11"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Empty file.
Loading