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 modelbuilder notebook #515

Open
35 of 75 tasks
veenstrajelmer opened this issue Sep 15, 2023 · 0 comments
Open
35 of 75 tasks

Improve modelbuilder notebook #515

veenstrajelmer opened this issue Sep 15, 2023 · 0 comments

Comments

@veenstrajelmer
Copy link
Collaborator

veenstrajelmer commented Sep 15, 2023

Short term (EDITO/Malta):

  • auto download monthly phyc (include dataset_id in copernicus_get_datasetid())
  • prevent daily files for monthly dataset
  • add phyc, nitrate and phosphate, chlorofyl
  • update waq settings to enable waq processes
  • waq: HYDROLIB-core: support iniwaq* in ext file? >> ini files for waq parameters (include extrapolation?)
  • add solarradiation/heatflux
  • EDITO: Improve Delft3dfm modelbuilder workflow Deltares-research/EditoServices#1

Discuss waq processes:

  • bloom requires different solarradiation aggregation? (LS/LV)
  • Support D-Water Quality input in ExtOldModel HYDROLIB-core#551
  • waq: write timfiles for source/sinks (for river discharges in large scale models and WAQ sources), e.g. p:\11209231-003-bes-modellering\hydrodynamica-waq\preprocessing\hydrology_runoff\hydrology_nutrient_to_tim_waq.py (by YC) >> bc files will be implemented in delft3dfm. sourcesinks are also used for river discharges.
  • waq: HYDROLIB-core: Reader of substance file, including comparison to timfile columns. Example model in p:\11209251-sito-veerse-meer\model\runs_2019-2020\Veerse_meer_Model_to_subversion\dflowfm3d_dwaq-veerse_meer-j19_6-v1a_LH. Related issue: If old external forcing file references a pli file, the accompanying .tim/.cmp should also be read and stored HYDROLIB-core#501 (also contains column order of timfiles, so not super important if sourcesinks are forced via bc)
  • waq: HYDROLIB-core: ignore or support waq statistics file (is defined in the substance file). statistics file often makes the model crash, so maybe find alternative.
  • also wastewater: p:\11209231-003-bes-modellering\hydrodynamica-waq\preprocessing\wastewater_20231129\scripts\ (by LB) (is also sourcesinks)
  • more WAQ things necessary: contact MW, FD, AM, LvdH, LV, LS

Discuss general:

  • easier interaction with hydrolib-core (Sonia): "make keywords in ext/mdu files easier to access with dfm_tools. Flexibility"
  • nans in ini sal/tem are filled per 1d dim (first lat, then lon), consider 2d interpolation/extrapolation: Extrapolation of CMEMS initial field #1021 (and consider filling source netcdfs for bc files first over lat/lon, instead of only filling bc over depth)
  • if a polyline does not result in any plipoints, consider not writing it in extfile (FM raises an error in case of an ext entry for which the polygon does not have any forcing/bc blocks associated, happened in DSO project)
  • make conversion_dict a global setting, so a custom conversion dict is automatically used everywhere in the modelbuilding process
  • add GTSMip C3S obspoint locations #1121
  • add ssc stations to map instead of arbitrary obspoints (coverage is not super good, but at least it makes sense) >> or more like add beaches, places, ports as observation points #748
  • snap observation points to nearest cell #898
  • adding river discharges (preferrably from a global public datasource) as source/sinks: GRDC has no API and no coastal points. Swedish SMHI EHYPE dataset?
  • Fixes related to hydrolib-core issues #214

Further improvements:

Add sources for e.g. tide models, CMEMS and ERA5:

Add obspoints (or along coastline with #575):

obsfile = os.path.join(dir_output, f"{model_name}_obs.xyn")
obs_x = [-68.2240067, -68.2283020, -68.3852158, -68.1552582]
obs_y = [12.5409269, 12.2554617, 12.0076866, 12.0341187]
obs_n = ['Bonaire01', 'Bonaire02', 'Bonaire03', 'Bonaire04']
xynpoints = [hcdfm.XYNPoint(x=x,y=y,n=n) for x,y,n in zip(obs_x, obs_y, obs_n)]
xynmodel = hcdfm.XYNModel(points=xynpoints)
xynmodel.save(obsfile)

Running the model:

Interactive jupyter slurm:

#!/bin/bash
#SBATCH -t 1:00:00
#SBATCH -N 1

# Make sure the jupyter command is available, either by loading the appropriate modules, sourcing your own virtual environment, etc.
module load 2021
source /home/muiss/miniconda3/etc/profile.d/conda.sh
conda activate /home/muiss/miniconda3/envs/era5-e

# Choose random port and print instructions to connect
PORT=`shuf -i 5000-5999 -n 1`
LOGIN_HOST=${SLURM_SUBMIT_HOST}-pub.snellius.surf.nl
BATCH_HOST=$(hostname)

echo "To connect to the notebook type the following command from your local terminal:"
echo "ssh -J ${USER}@${LOGIN_HOST} ${USER}@${BATCH_HOST} -L ${PORT}:localhost:${PORT}"
echo
echo "After connection is established in your local browser go to the address:"
echo "http://localhost:${PORT}"

jupyter lab --no-browser --port ${PORT}
@veenstrajelmer veenstrajelmer changed the title Improve and run modelbuilder notebook Improve modelbuilder notebook Sep 18, 2023
This was referenced Oct 18, 2023
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