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

Improve Delft3dfm modelbuilder workflow #1

Open
20 of 31 tasks
veenstrajelmer opened this issue Jan 10, 2024 · 0 comments
Open
20 of 31 tasks

Improve Delft3dfm modelbuilder workflow #1

veenstrajelmer opened this issue Jan 10, 2024 · 0 comments

Comments

@veenstrajelmer
Copy link
Collaborator

veenstrajelmer commented Jan 10, 2024

Initialize service:

  • Login to EDITO datalab: https://datalab.dive.edito.eu/
  • Service Catalog >> Ocean modelling >> Delft3dfm-modelbuilder >> Launch
  • Launch
  • this will initialize a Python environment with the JupyterLab IDE and dfm_tools installed
  • the environment will also include an extended copy of the dfm_tools modelbuilder notebook

Run the modelbuilder:

  • Open modelbuilder_example_edito.ipynb
  • optionally, update spatial/temporal extent in block [2]
  • optionally, adjust the min/max grid resolution with dxy in block [2] and min_edge_size in block [5].
  • optionally adjust anything else in the notebook
  • restart kernel and run all cells by clicking image
  • generates a folder with Delft3D FM model input files for the requested spatial and temporal extent
  • the last cell of the notebook uploads the model to your S3 bucket, resulting in a folder called DFM_INPUT

run the D-FlowFM model with another service:

  • make sure you have the "DFM_INPUT" folder in your s3 bucket (including a run_docker.sh)
  • Process Catalog >> Ocean modelling >> Delft3dfm-run-docker >> Launch
  • Launch
  • After approximately 3-6 minutes, this results in a DFM_OUTPUT folder in your s3 bucket

Remaining issues (helm chart):

Remaining issues (init.sh and extend_modelbuilder_notebook.py)

  • in init.sh: after copying ipynb, add cell that calls a to be created upload_model_to_s3(dir_model) function and supplying the correct foldername/dir_model to that function
  • ipynb/py files are downloaded twice. Seems like init script is executed twice, which might be a bug in edito
  • clear notebook output with jupyter nbconvert --clear-output --inplace my_notebook.ipynb
  • stretchtype is manually to zero in extra notebook cell until mdu stretchtype should be -1 or 0 instead of 1 Deltares/HYDROLIB-core#691 is fixed >> is now -1 in general notebook already and this works properly on EDITO also
  • move to 3D by changing flag in start of notebook instead of enabling sal/tem afterwards (model now takes 6 minutes to run but it works)
  • install from pypi instead of main branch (do this when the modelbuilder is complete)

Remaining issues (modelbuilder, notebook and run_docker.sh):

Remaining issues (s3 upload):

  • flexible (or generic) model input folder name
  • convert to function so we can call it from the ipynb notebook directly
  • prevent the need for adding run_docker.sh in this script, first solve dimr_config for parallel run is incorrect Deltares/HYDROLIB-core#562
  • simplify the s3 upload commands by avoiding the need for a temp directory
  • s3 token is not permanently valid, even not two days, increase this to much more

Remaining issues (running delft3dfm):

  • no access rights for JV
  • currently fails since job.yaml expects the folder Vietnam_model to exist. upload_model.py now always renames this to DFM_model, which might not be the best name (delft3dfm_model would be a better alternative).
  • https://gitlab.mercator-ocean.fr/pub/edito-infra/process-helm-charts/-/merge_requests/10 fixes this, and it also renames the output folder from something like DFM_OUTPUT_Vietnam to DFM_OUTPUT.
  • run with new docker image from containers.deltares.nl: https://issuetracker.deltares.nl/browse/PWES-265
  • service crashes also if model run is succesful. This happens for both 2D as 3D. Furthermore, the mapfile is missing from the s3 bucket, might be the cause of the failed process.
  • crash/message if crash, instead of just running service and no output (add process text to screen like dfm-modelbuilder)
  • add post-processing notebook/service?
lorincmeszaros pushed a commit that referenced this issue Dec 2, 2024
@veenstrajelmer veenstrajelmer changed the title Improve dfm modelbuilder workflow Improve Delft3dfm modelbuilder workflow Feb 6, 2025
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

1 participant