opendrift.models.radionuclides

Attributes

logger

Classes

Radionuclide

Extending Lagrangian3DArray with specific properties for radionuclides

RadionuclideDrift

Radionuclide particle trajectory model based on the OpenDrift framework.

Module Contents

opendrift.models.radionuclides.logger
class opendrift.models.radionuclides.Radionuclide(**kwargs)[source]

Bases: opendrift.models.oceandrift.Lagrangian3DArray

Extending Lagrangian3DArray with specific properties for radionuclides

Initialises a LagrangianArray with given properties.

Args:

Keyword arguments (kwargs) with names corresponding to the OrderedDict ‘variables’ of the class, and corresponding values. The values must be ndarrays of equal length, or scalars. All (or none) variables must be given, unless a default value is specified in the OrderedDict ‘variables’ An empty object may be created by giving no input.

variables
class opendrift.models.radionuclides.RadionuclideDrift(*args, **kwargs)[source]

Bases: opendrift.models.oceandrift.OceanDrift

Radionuclide particle trajectory model based on the OpenDrift framework.

Developed at MET Norway

Generic module for particles that are subject to vertical turbulent mixing with the possibility for positive or negative buoyancy

Particles could be e.g. oil droplets, plankton, or sediments

Radionuclide functionality include interactions with solid matter (particles and sediments) through transformation processes, implemented with stochastic approach for speciation.

Under construction.

Initialise OpenDriftSimulation

Args:
seed: integer or None. A given integer will yield identical

random numbers drawn each simulation. Random numbers are e.g. used to distribute particles spatially when seeding, and may be used by modules (subclasses) for e.g. diffusion. Specifying a fixed value (default: 0) is useful for sensitivity tests. With seed = None, different random numbers will be drawn for subsequent runs, even with identical configuration/input.

iomodule: name of module used to export data

default: netcdf, see opendrift.io for more alternatives. iomodule is module/filename without preceeding io_

loglevel: set to 0 (default) to retrieve all debug information.

Provide a higher value (e.g. 20) to receive less output. Use the string ‘custom’ to configure logging from outside.

logtime: if True, a time stamp is given for each logging line.

logtime can also be given as a python time specifier (e.g. ‘%H:%M:%S’)

ElementType

Any trajectory model implementation must define an ElementType.

required_variables

Any trajectory model implementation must list needed variables.

specie_num2name(num)[source]
specie_name2num(name)[source]
prepare_run()[source]
init_species()[source]
set_init_diameter(num, idxs, diam)[source]

Initialize diameter for particles, according to size distribution

check_speciation()[source]
seed_elements(*args, **kwargs)[source]

Seed elements with given position(s), time and properties.

Arguments:
lon: scalar or array

central longitude(s).

lat: scalar or array

central latitude(s).

radius: scalar or array

radius in meters around each lon-lat pair, within which particles will be randomly seeded.

number: integer, total number of particles to be seeded

If number is None, the number of elements is the length of lon/lat or time if these are arrays. Otherwise the number of elements are obtained from the config-default.

time: datenum or list

The time at which particles are seeded/released. If time is a list with two elements, elements are seeded continously from start/first to end/last time. If time is a list with more than two elements, the number of elements is equal to len(time) and are seeded as a time series.

radius_type: string

If ‘gaussian’ (default), the radius is the standard deviation in x-y-directions. If ‘uniform’, elements are spread evenly and always inside a circle with the given radius.

kwargs:

keyword arguments containing properties/attributes and values corresponding to the actual particle type (ElementType). These are forwarded to the ElementType class. All properties for which there are no default value must be specified.

init_kd()[source]

Initialization of Kd value, dependent on simulated radionuclide

init_transfer_rates()[source]

Initialization of background values in the transfer rates 2D array.

update_terminal_velocity(Tprofiles=None, Sprofiles=None, z_index=None)[source]

Calculate terminal velocity for Pelagic Egg

according to S. Sundby (1983): A one-dimensional model for the vertical distribution of pelagic fish eggs in the mixed layer Deep Sea Research (30) pp. 645-661

Method copied from ibm.f90 module of LADIM: Vikebo, F., S. Sundby, B. Aadlandsvik and O. Otteraa (2007), Fish. Oceanogr. (16) pp. 216-228

update_transfer_rates()[source]

Pick out the correct row from transfer_rates for each element. Modify the transfer rates according to local environmental conditions

update_speciation()[source]

Check if transformation processes shall occur Do transformation (change value of self.elements.specie) Update element properties for the transformed elements

sorption_to_sediments(sp_in=None, sp_out=None)[source]

Update radionuclide properties when sorption to sediments occurs

desorption_from_sediments(sp_in=None, sp_out=None)[source]

Update radionuclide properties when desorption from sediments occurs

update_radionuclide_diameter(sp_in=None, sp_out=None)[source]

Update the diameter of the radionuclides when specie is changed

bottom_interaction(Zmin=None)[source]

Change speciation of radionuclides that reach bottom due to settling. particle specie -> sediment specie

resuspension()[source]

Simple method to estimate the resuspension of sedimented particles, checking whether the current speed near the bottom is above a critical velocity Sediment species -> Particle specie

update()[source]

Update positions and properties of radionuclide particles.

write_netcdf_radionuclide_density_map(filename, pixelsize_m='auto', zlevels=None, deltat=None, density_proj=None, llcrnrlon=None, llcrnrlat=None, urcrnrlon=None, urcrnrlat=None, activity_unit=None, time_avg_conc=False, horizontal_smoothing=False, smoothing_cells=0, reader_sea_depth=None)[source]

Write netCDF file with map of radionuclide species densities and concentrations

get_radionuclide_density_array(pixelsize_m, z_array, density_proj=None, llcrnrlon=None, llcrnrlat=None, urcrnrlon=None, urcrnrlat=None, weight=None)[source]

compute a particle concentration map from particle positions Use user defined projection (density_proj=<proj4_string>) or create a lon/lat grid (density_proj=None)

get_pixel_mean_depth(lons, lats)[source]
horizontal_smooth(a, n=0)[source]
gui_postproc()[source]

To be overloaded by subclasses

guipp_saveconcfile(filename='none', pixelsize_m=200.0, reader_sea_depth=None)[source]
guipp_showanimationprofile()[source]
guipp_plotandsaveconc(filename=None, outfilename=None, zlayers=None, time=None, specie=None)[source]