respec / HSPsquared

Hydrologic Simulation Program Python (HSPsquared)
GNU Affero General Public License v3.0
43 stars 17 forks source link

Complete OXRX, NUTRX, PLANK PHCARB modules w/ class-based code #58

Closed aufdenkampe closed 2 years ago

aufdenkampe commented 3 years ago

Fully porting and testing these detailed WQ sections for the surface water module (RCHRES) would complete the port of surface water quality capabilities from HSPF.

These highly integrated modules for dissolved oxygen, nutrients, plankton, and the carbonate buffering system are challenging because of many interdependencies within a tilmestep.

To facilitate the passing of attributes and values among these modules, @PaulDudaRESPEC, @tredder75, @ptomasula, and I propose to migrate these code sections from functional-programming coding structures inherited from HSPF to object-oriented class structures used in modern programming, to enable inheritance of attributes and methods by objects and the passing of attributes among objects.

@tredder75 has begun this process with https://github.com/LimnoTech/HSPsquared/pull/38 and https://github.com/LimnoTech/HSPsquared/pull/39.

@tredder75 is also numba-fying these classes as he develops them, adding Numba just-in-time compiling to low level functions that operate many, many times during an HSP2 model run. This also helps toward our overall performance goals (#36).

We hope that the new class-based coding approach and specific WQ classes that we are implementing here will effectively serve as templates for converting the other modules to class-based code.

@jlkittle, this will get us moving toward the ability call attributes and methods using the Python "dot" syntax!

aufdenkampe commented 3 years ago

Merging PR #61 will close this issue.

aufdenkampe commented 2 years ago

Closed with #62 and release 0.9.3.