SDK: LeafLux solar irradiance grids (create_irradiance_grid_from_leaflux) - #205
Merged
Conversation
…grids Wrap the generated create_leaflux_irradiance_grid endpoint as a new solar/irradiance grid family. The function derives a 3D irradiance grid from a source 3D grid carrying a leaf_area_density band, at a UTC date_time, with an optional 2D terrain grid for surface irradiance, LeafluxBand output selection (defaulting to irradiance.surface.relative), and a Beer-Lambert extinction coefficient. Source grids are accepted as Grid objects or ids. Built against the current generated client, which serializes source_grid_id. The deployed API renamed this to source_lad_grid_id (86a5a67); the live create test is marked xfail until the client is regenerated.
The deployed API has adopted the source_grid_id -> source_lad_grid_id rename (API commit 86a5a67); regenerate the client (only the leaflux request model changed) and switch the wrapper to source_lad_grid_id. Drop the xfail on the leaflux live create test now that the field name matches the deployed API; the test passes end to end.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
create_irradiance_grid_from_leaflux(...)tofastfuels_sdk/v2/grids.py— the newsolar/irradiancegrid family. Derives a 3D LeafLux irradiance grid from a source 3D grid with aleaf_area_densityband, takingdate_time(UTC), optionalsource_terrain_grid,bands(LeafluxBand, defaultirradiance.surface.relative), andextinction_coefficient=0.5. Source grids accepted asGridobjects or ids (aGridtriggers completion + band validation and domain inference; an id requiresdomain=).source_lad_grid_idrename — resolved in this PRThe deployed API has adopted API commit
86a5a67(source_grid_id→source_lad_grid_id). This PR regenerates the client (only the leaflux request model changed) and points the wrapper atsource_lad_grid_id. The live create test is no longer xfail — it passes end to end against the deployed API (verified, 45.8s).Tests
black/flake8clean (pre-commit enforced).Closes #198