Plugins for LADiM
Project description
Plugins for LADiM
This repository contains plugins for the Lagrangian Advection and Diffusion Model (LADiM), which is the particle tracking software used at the Institute of Marine Research (IMR). (https://github.com/bjornaa/ladim)
Documentation and examples are provided for each model.
List of available plugins
Name | Description |
---|---|
chemicals | Passive tracer |
egg | Buoyant fish eggs |
lunar_eel | Glass eels with lunar compass |
nk800met | Module for utilizing forcing data from the met.no thredds server |
release | General module for creating release files |
salmon_lice | Salmon lice larvae |
sandeel | Sand eel larvae |
sedimentation | Sinking particles |
utils | General utility functions for IBMs |
Installation
Install using the following commands (the first command can be skipped if LADiM is already present on your system):
pip install git+https://github.com/pnsaevik/ladim.git
pip install git+https://github.com/pnsaevik/ladim_plugins.git
The installation can be tested with the command
pytest -Wignore --pyargs ladim_plugins
This command will run ladim on each of the plugins, using the sample ladim.yaml
and particle.rls
files found in the subpackage folders. The tests succeed if
ladim
is present on the system, ladim_plugins
is installed correctly, and the
output from the ladim runs matches exactly with the out.nc
files found in the
subpackage folders.
Usage
- Copy
ladim.yaml
andparticle.rls
from the IBM subpackage of interest into the working directory. - Make desired changes to the
yaml
andrls
files. More detailed instructions are found in theREADME.md
file within the subpackage. - Run
ladim
and the output is written toout.nc
.
Contribute
To add new plugins, contact the maintainer of the ladim_plugins
repository. A
properly structured IBM subpackage has the following ingredients:
- A file
__init__.py
containing the statementfrom .ibm import IBM
- The IBM module itself, named
ibm.py
- A
README.md
file containing instructions for use - A simple test example. This includes a
ladim.yaml
configuration file, aparticles.rls
release file, aforcing.nc
forcing file (may be copied from another subpackage), and a ladim output file namedout.nc
. - Optionally a test example for generating release files. This includes a
release.yaml
configuration file and an output release file namedout.rls
. - Optionally additional automated test modules, named
test_*.py
An ideal test example should be quick to run and easy to analyze, but still be complicated enough to demonstrate most capabilities of the IBM model. To achieve this, it may be a good idea to use only a few time steps and a few particles at selected positions. In some cases it may also be necessary to specify somewhat unrealistic particle parameters to demonstrate certain features.
The test is run using the command pytest -Wignore --pyargs ladim_plugins
. The
test succeeds if ladim is able to run the examples, and the output matches the
contents of out.nc
/ out.rls
.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ladim_plugins-2.1.0.tar.gz
.
File metadata
- Download URL: ladim_plugins-2.1.0.tar.gz
- Upload date:
- Size: 22.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10bf21c8571b43b83aaf7c5573c565578563bc0f48a1a9c9d2ec672fde8ea541 |
|
MD5 | abcc2663d0a5a252150ee3e3f41de7cb |
|
BLAKE2b-256 | 9aa8fd7220b48bc1a2519eb8daf62989d19c70b5c80f2f136cffa29a4f6ddb4e |
File details
Details for the file ladim_plugins-2.1.0-py3-none-any.whl
.
File metadata
- Download URL: ladim_plugins-2.1.0-py3-none-any.whl
- Upload date:
- Size: 22.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | adbfa7cc55ddeb419cf3e0c047a971e9af307b200a8b09ba342b1210c703b9c5 |
|
MD5 | c2ef3639770129a00f572e58a4072665 |
|
BLAKE2b-256 | b99421d51b9d29d46b90469357970fcc615e29760ad8704d6f371e2dcd7e77f6 |