Commit d00b0ff0 authored by Sævik Pål Næverlid's avatar Sævik Pål Næverlid
Browse files

Add stubs files for salmon lice module

parent ac7199b4
# Salmon lice
The module represents salmon lice having a vertical swimming behaviour, and
matures at individual rates due to ambient temperature conditions.
The model is based on a number of scientific works on salmon lice behaviour.
Vertical migration is based on [Myksvoll et al. (2011)](http://dx.doi.org/10.1080/19425120.2011.595258).
Maturation is based on [Myksvoll et al. (2011)](http://dx.doi.org/10.1080/19425120.2011.595258).
## Usage
Modify `ladim.yaml` and `particles.rls` to suit your needs.
Common changes applied to `ladim.yaml`:
- Start date of simulation (`time_control.start_time`)
- Stop date of simulation (`time_control.stop_time`)
- Forcing input file (`gridforce.input_file`)
- Vertical diffusion parameter (`ibm.vertical_mixing`)
- Horizontal diffusion parameter (`numerics.diffusion`)
- Egg diameter (`ibm.egg_diam`)
- Time step length (`numerics.dt`)
- Output frequency (`output_variables.outper`)
The file `particles.rls` is a tab-delimited text file containing particle
release time and location, as well as particle attributes at the release time.
The order of the columns is given by the entry `particle_release.variables`
within `ladim.yaml`.
Finally, copy `ladim.yaml` and `particles.rls` to a separate directory and
run `ladim` here.
## Output
The simulation result is stored in a file specified by the `files.output_file`
entry in `ladim.yaml`. The output variables are specified by the
`output_variables` entries.
## SVIM example
An example of configuration file and release file used in a real scenario is
provided by `svim_ladim.yaml` and `svim_particles.rls`. The code used to make
the release file is provided by `svim_make_release.m`.
class IBM:
def __init__(self, config):
pass
def update_ibm(self, grid, state, forcing):
pass
time_control:
# Start and stop of simulation
start_time : 2015-09-07 01:00:00
stop_time : 2015-09-07 01:05:00
files:
particle_release_file : particles.rls
output_file : out.nc
gridforce:
module: ladim.gridforce.ROMS
input_file: forcing.nc # Use wildcards (*) to select a range of files
ibm:
ibm_module: ladim_ibm.salmon_lice
state:
# pid, X, Y, Z are mandatory and should not be given
ibm_variables:
- age # Age of particle [degree-days]
particle_release:
release_type: discrete
variables:
- mult # Number of particles released
- release_time # Time of release, formatted as yyyy-mm-ddThh:mm:ss
- X # X coordinate of release location
- Y # Y coordinate of release location
- Z # Depth of release location
- group_id # Custom id used to group particles in post processing
- super # Number of actual eggs per simulation particle
# Converters (if not float)
mult: int
release_time: time
group_id: int
particle_variables: [release_time, group_id]
output_variables:
# Output period, format [value, unit], unit = s, m, h, or d
outper: [60, s]
# Variable names
particle: [release_time, group_id]
instance: [pid, X, Y, Z, age, super]
# --- Output format for standard variables ---
# Output format for the particle release time
release_time:
ncformat: f8
long_name: particle release time
units: seconds since reference_time
# Output format for the particle identifier
pid:
ncformat: i4
long_name: particle identifier
# Output format for the X coordinate
X:
ncformat: f4
long_name: particle X-coordinate
# Output format for the Y coordinate
Y:
ncformat: f4
long_name: particle Y-coordinate
# Output format for the particle depth
Z:
ncformat: f4
long_name: particle depth
standard_name: depth_below_surface
units: m
positive: down
# --- Output format for IBM-specific variables ---
# Output format for the temperature
temp:
ncformat: f4
long_name: temperature
group_id: {ncformat: i4, long_name: particle group id}
age:
ncformat: f4
long_name: particle age in degree-days
units: Celcius days
standard_name: integral_of_sea_water_temperature_wrt_time
super: {ncformat: f4, long_name: number of individuals in instance}
numerics:
# Model time step, [value, unit]
dt: [60, s] # usually 120 on 160m NorFjords, 600 NorKyst, 1800 SVIM
advection: RK4 # either EF, RK2 or RK4 (recommended)
diffusion: 0 # [m*2/s]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment