Oslofjord simulation with FjordSim
In the preprocess folder there are Python Jupyter notebooks to make:
- A grid file;
- A forcing file for boundary conditions, rivers, etc.;
- An atmospheric forcing file can be prepared using https://github.com/limash/atm-forcing.git.
Python:
- Install conda https://conda-forge.org/download/.
- Create a conda environment
conda create --name oslofjord python=3.12 - Activate the envoronment
conda activate oslofjord - Navigate to the oslofjord directory
- Install the dependencies
pip install -e . - Xesmf is required, see https://xesmf.readthedocs.io/en/stable/installation.html;
install with
conda install -c conda-forge xesmf.
Julia:
- Install julia https://julialang.org/downloads/.
- Clone the repository:
git clone https://github.com/NIVANorge/oslofjord-sim.git - Run Julia REPL from the directory with
Project.tomland activate the environment:julia --project. - Enter the Pkg REPL by pressing
]from Julia REPL. - Type
instantiateto 'resolve' aManifest.tomlfrom aProject.tomlto install and precompile dependency packages. (you may need toadd https://github.com/NIVANorge/FjordSim.jl.gitfrom Pkg REPL to install the latest FjordSim).
there are 2 options:
- Download the prepared in advance files (
bathymetry_105to232.nc, forcing_105to232.nc, JRA55 files or NORA3.nc) from here to run a simulation. - Use scripts in the preprocess folder to download and prepare the bathymetry and forcing files. In this case you can add rivers, other sinks and sources, change other forcing for any variable.
Run simulation julia --project simulation.jl