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
18 of 45 tasks
veenstrajelmer opened this issue Sep 15, 2023 · 0 comments
Open
18 of 45 tasks

Improve modelbuilder notebook #515

veenstrajelmer opened this issue Sep 15, 2023 · 0 comments

Comments

@veenstrajelmer
Copy link
Collaborator

veenstrajelmer commented Sep 15, 2023

Notebook was improved in #463

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