Releases: finam-ufz/finam
Release list
FINAM v1.1
FINAM is an open-source component-based model coupling framework for environmental models.
It aims at enabling bi-directional online couplings of models for different compartments like geo-, hydro-, pedo- and biosphere.
The framework is built in Python, with well-defined interfaces for data exchange.
This approach allows for coupling of models irrespective of their internal structure, architecture or programming language.
Resources
- FINAM homepage
- FINAM documentation
- FINAM source code
- FINAM GitLab group, containing further related projects
Changelog
Features
- Adds
Masking,UnMaskingandClipadapters for explicit mask handling and grid clipping (!294) - Adds
ToCRSandToUnstructuredadapters for CRS conversion and conversion to unstructured grids (!294) - Adds
equal_crshelper to the data submodule and automatic axis attributes from CRS information (!294) - Adds unit handling to
CallbackandScaleadapters (!294) - Adds mask support for
WeightedSumcomponent (!296)
Bugfixes
- Fixes mask propagation through regridding adapters and through input/output info exchange (!293, !295)
- Fixes
GridToValueandValueToGridmetadata handling for masks (!294) - Fixes CRS transformations in regridding adapters to keep axis order stable (!294)
- Fixes regridding error types and wrong error messages from regrid adapters (!294, !300)
- Fixes compatibility with NumPy's changed
reshapeparameter name (!297) - Fixes transformation between compatible grids (!303, !305)
- Fixes generation order of CRS-derived axis attributes (!301)
Documentation
- Adds blog posts for the FINAM v1.0 release and model-code changes for coupling with FINAM (!288, !292)
- Fixes minor spelling, example and link issues in documentation (!294, !298)
FINAM v1.0.1
A minor bugfix release.
FINAM is an open-source component-based model coupling framework for environmental models.
It aims at enabling bi-directional online couplings of models for different compartments like geo-, hydro-, pedo- and biosphere.
The framework is built in Python, with well-defined interfaces for data exchange.
This approach allows for coupling of models irrespective of their internal structure, architecture or programming language.
Resources
- FINAM homepage
- FINAM documentation
- FINAM source code
- FINAM GitLab group, containing further related projects
Changelog
Bug fixes
- make
GridToValueandValueToGridcompatible with masked data (!291)
FINAM v1.0
The first stable release of FINAM: Version 1.0 🎉
FINAM is an open-source component-based model coupling framework for environmental models.
It aims at enabling bi-directional online couplings of models for different compartments like geo-, hydro-, pedo- and biosphere.
The framework is built in Python, with well-defined interfaces for data exchange.
This approach allows for coupling of models irrespective of their internal structure, architecture or programming language.
Resources
- FINAM homepage
- FINAM documentation
- FINAM source code
- FINAM GitLab group, containing further related projects
Changelog
Breaking changes
- submodule
modulesrenamed tocomponentsfor consistency (!289) - argument
modulesrenamed tocomponentsinCompositionfor consistency (!289) - Components now implement
_next_timeinstead of the propertynext_timefor consistency (!283) - All fields of
Compositionare now private (!273) Input.sourceis private,Input.get_source()becomes propertyInput.source,Input.set_sourcebecomes a getter (!273)Output.targetsis private,Output.get_targets()becomes propertyOutput.targets(!273)- Composition metadata was restructured to hold components and adapters in separate sub-dictionaries (!274)
- Time components implement method
_next_timeinstead of propertynext_time(!283) Infonow has properties forgrid,timeandmask(!286)- all init-args of
Infoare now optional (!286) Info.acceptshas changed signature: renamedignore_nonetoincoming_donwstream(!286)Info.acceptsnow only checks:grid,maskandunits(other meta data can differ) (!286)Grid.to_/from_canonicalnow allows additional dimensions (!286)data_shapenow a property ofGridBase(!286)NoGridcan be initialized withdimordata_shapenowNoGrid.data_shapecan have-1entries for variable size dimensions- if only
dimgiven toNoGrid, all entries indata_shapewill be-1
Features
- Components and adapters automatically provide default metadata that can be extended by implementations (!274, !276)
- Grid class now have attributes providing connectivity information for the contained cells (!275)
cells_connectivity: connectivity array as used by ESMF and VTKcells_definition: cell definition as used by PyVista and legacy VTKcells_offset: location of the start of each cell incells_connectivity
- added convenience functions and constants to
grid_tools(!275)get_cells_matrix: convertcells_connectivityorcells_definitionback to the default cells matrix used in the Grid class (can be used to convert VTK-grids into FINAM-grids)INV_VTK_TYPE_MAP: inverse mapping toVTK_TYPE_MAP- FINAM cell type to VTK cell typeVTK_CELL_DIM: parametric dimension for each VTK cell type
- Grid class now reusable when having different data locations and better grid type casting (!278)
- added
copymethod to grids with optional argumentdeep(Falseby default) to create a copy of a grid - added setter for
data_locationin order to set a new data location (e.g. after copying a grid) - added class attribute
valid_locationsin order to check the set data location (esri-grid only supports cells, unstructured-points only support points) - added missing casting methods to convert esri to uniform and uniform to rectilinear (when you want to use point data on an esri-grid, you can cast it to uniform first)
- added
axes_attributesalso to unstructured grids
- added
- Grid method
compatible_withnow has acheck_locationargument to optionally check data location (!280) - added
Maskenum with two options: (!286)Mask.FLEXfor flexible maskingMask.NONEto explicitly use plain numpy arrays
- added
maskattribute and init-arg toInfo: can be aMaskvalue or a valid mask fornumpy.ma.MaskedArray(!286) data.tools.preparenow applies masks to data if set inInfoobject (!286)ARegriddingnow has aout_maskarg (!286)RegridNearestandRegridLinearnow support explicitly masked data (input doesn't haveMask.FLEX) (!286)- adapters now have an
in_infoproperty (!286)
Bug fixes
- cells for structured grids in 3D are now created correctly (no negative Volume in VTK/ESMF) (!286)
- cf_units.py was broken for pint>=0.24 (!282)
Documentation
- Minor fixes in documentation examples and links (!272)
- Adds a book section on composition, component and adapter metadata (!274)
FINAM v0.5.1
FINAM is an open-source component-based model coupling framework for environmental models.
It aims at enabling bi-directional online couplings of models for different compartments like geo-, hydro-, pedo- and biosphere.
The framework is built in Python, with well-defined interfaces for data exchange.
This approach allows for coupling of models irrespective of their internal structure, architecture or programming language.
Changelog
Bug fixes
- Fix unquantified masked arrays loosing mask in
fm.data.prepare()(#115, !270)
FINAM v0.5.0
FINAM is an open-source component-based model coupling framework for environmental models.
It aims at enabling bi-directional online couplings of models for different compartments like geo-, hydro-, pedo- and biosphere.
The framework is built in Python, with well-defined interfaces for data exchange.
This approach allows for coupling of models irrespective of their internal structure, architecture or programming language.
Resources
- FINAM homepage
- FINAM documentation
- FINAM source code
- FINAM GitLab group, containing further related projects
Changelog
Features
- Components and adapters can provide a dictionary of meta data (!259)
- Class
Compositionhat a propertymetadatathat collects and returns the meta data from all components and adapters (!259) - Automatic conversion between compatible grids (!255)
- Adds methods
to_canonical,from_canonicalandget_transform_toto grid classes (!255) - Adds support for masked grids using
numpy.ma.MaskedArray(!258, !260) - Adds convenience functions for dealing with masked arrays in
data.tools(!260):
is_masked_array,has_masked_values,filled,to_compressed,from_compressed,check_data_covers_domain
Documentation
- Adds a book chapter on wrapping existing models for FINAM (!256)
- Adds a book section on masked data (!262)
Bug fixes
- No more logging of expected
FinamNoDataErrorin inputs during the connect phase (!257)
Other
- FINAM is now available on Conda via conda-forge
FINAM v0.4.0
FINAM is an open-source component-based model coupling framework for environmental models.
It aims at enabling bi-directional online couplings of models for different compartments like geo-, hydro-, pedo- and biosphere.
The framework is built in Python, with well-defined interfaces for data exchange.
This approach allows for coupling of models irrespective of their internal structure, architecture or programming language.
Resources
- FINAM homepage
- FINAM documentation
- FINAM source code
- FINAM GitLab group, containing further related projects
Changelog
New scheduling algorithm
- FINAM uses a new scheduling algorithm that allows components to use future data instead of only past/current (!157, !159)
- New adapters to resolve circular coupling through the use of delayed data (!187)
- It is now possible to set up static couplings that run only once and have no explicit time or stepping (!166)
- FINAM can handle different starting times of components by pushing initial data twice (!206):
Once for the common starting time, and once for the actual component time - Components are no longer required to push all outputs on every step (!208)
Data and metadata rework
- Outputs check compatibility between metadata of inputs if there is more than one target input (!104)
- Add data tools function
compatible_unitsto check for convertibility (!105) - Components can exchange their starting time through the
Infoobject (!111) - Info exchange is automated by the
ConnectHelperby specifying transfer rules at initialization (!154) Infonow requires time in constructor (can beNone) (!111)- Scheduler checks for dead links that don't work in terms of push/pull combination (!112)
IInput,IOutputandIAdapterhave new internally used propertiesneeds_pushandneeds_pull(!112)to_xarraynow checks the data shape if the data is not flat (!130)- Outputs can be flagged
staticfor data that is only used during initialization, or that is constant (!166) - Inputs can be flagged
staticfor constant data (!171) - Outputs accept and convert compatible units, not only exactly equal units (!215)
- Outputs check that subsequent data pushes don't share memory (!217)
- Exchanged
xarraydata has no time coordinate anymore, only a dimension without values (for performance and usability) (!223) - Remove the
xarraywrapping completely. Use numpy arrays in pintQuantity(!235) - Outputs and adapters can have a
memory_limitand write data to disk if the limit is exceeded (!238)
Components
- Add
modules.WeightedSumfor aggregation of multiple inputs (!105) - Add
modules.SimplexNoisefor generating spatio-temporal noise (!131) - Add
modules.TimeTriggerto forward data from pull-based to push-based components (!131) - Add
modules.ScheduleLoggerto visualize scheduling/module updates through ASCII charts (!160) - Add
modules.DebugPushConsumeras a push-based variant of the debug consumer (!165) - Add
modules.UserControlthat lets users control FINAM runs from the terminal (!184) modules.DebugConsumerandmodules.DebugPushConsumercan use optional callbacks for better debugging (!176)- Components can be renamed using the method
with_name()(!243)
Adapters
- Add
adapters.Histogramto extract a histogram from grid values (!182) - Add
adapters.DelayFixed,adapters.DelayToPullandadapters.DelayToPushto resolve circular coupling through the use of delayed data (!187) - Add
adapters.StepTimefor step-wise interpolation (!194) - Restructuring of time integration adapters (!194)
adapters.IntegrateTimerenamed toadapters.AvgOverTime- Add
adapters.SumOverTimefor sum/Area under Curve integration
- Adapters have a method
finalize()for cleanup (!226). - Adapters can be renamed using the method
with_name()(!243)
Other
- Remove module
core, subpackages now underfinam(!106) - Rename
IOutput.source_changed()tosource_updated(!107) - Rename
LogErrortoErrorLogger(!107) - Rename abstract SDK classes: (!107)
AAdapteris nowAdapterAComponentis nowComponentATimeComponentis nowTimeComponent
- Changed arguments for
create_connector()(!111)- Removed
required_out_infos - Renamed
required_in_datatopull_data - Added arguments to specify info exchange rules
- Removed
- All error types are in module
errorsnow, and re-exported at top level (!116) - Overwriting
_validate()and_finalize()in components is now mandatory (!156) - Input and output slots can be accessed from components directly, e.g.
comp["A"]instead ofcomp.inputs["A"](!147) - Inputs and outputs can be marked as
staticfor constant data without time information (!166, !171) - New helper function
tools.inspect()to inspect components, adapters and I/O slots (!197) - Publish on PyPI, starting with the next release (!198, !200, !201)
- Added benchmarks for the most important FINAM functions
(see the benchmarks README) - Added profiling for full runs to the CI (!221)
- Optimization of data tool functions, with approx. 20-fold speedup of basic push+pull
(!222, !223, !224, !228, !229, !237). - Add two more log levels:
TRACE(most verbose) andPROFILE(betweenDEBUGandINFO) (!240)