Skip to content

factory

DataLoaderFactory

Produces initialised DataLoader objects that can be used by the mesh to quickly retrieve values within a boundary.

get_dataloader(name, bounds, params, min_dp=5) staticmethod

Creates appropriate dataloader object based on name

Parameters:

Name Type Description Default
name str

Name of data source/type. Must be one of following - 'scalar_csv', 'scalar_grf', 'binary_grf', 'amsr', 'bsose_sic', 'bsose_depth', 'baltic_sic', 'gebco', 'icenet', 'modis', 'thickness', 'density', 'circle', 'square', 'gradient', 'checkerboard', 'vector_csv', 'vector_grf', 'baltic_currents', 'era5_wind', 'northsea_currents', 'oras5_currents', 'sose', 'duacs_currents', 'era5_wave_height', 'era5_wave_direction'

required
bounds Boundary

Boundary object with initial mesh space&time limits

required
params dict

Dictionary of parameters required by each dataloader

required
min_dp int

Minimum datapoints required to get homogeneity condition

5

Returns:

Type Description
Scalar/Vector/LUT DataLoader

DataLoader object of correct type, with required params set

translate_file_input(params) staticmethod

Allows flexible file specification in params. Translates 'file' or 'folder' into 'files'

Parameters:

Name Type Description Default
params dict

Dictionary of parameters written in config

required