AquaticEcoDynamics / glm-py

Python tools for running General Lake Model (GLM) simulations.
https://aquaticecodynamics.github.io/glm-py/
GNU General Public License v3.0
4 stars 1 forks source link

Syntax formatting for the wq_init_vals parameter #1

Closed gilesknight closed 8 months ago

gilesknight commented 8 months ago

The wq_init_vals parameter of the &init_profiles accepts an "array of WQ variable initial data" where "rows = vars; cols = depths".

wq_init_vals =  1.1, 1.2, 1.3, 1.2, 1.3,
            2.1, 2.2, 2.3, 1.2, 1.3,
            3.1, 3.2, 3.3, 1.2, 1.3,
            4.1, 4.2, 4.3, 1.2, 1.3,
            5.1, 5.2, 5.3, 1.2, 1.3,
            6.1, 6.2, 6.3, 1.2, 1.3

This appears to be the only parameter in GLM that expects an array. The current conversion to a .nml-friendly comma-separated list syntax might not work here. Currently the nml.NMLInitProfiles class expects a list of floats. A better approach would be to provide a list of lists (of floats) where the number of lists equals vars and the length of the each list equals depths.

gilesknight commented 8 months ago

Fixed with https://github.com/AquaticEcoDynamics/glm-py/pull/2.