Skip to content

Fixing lack of graphs#1276

Merged
jacobcook1995 merged 4 commits intodevelopfrom
fixing_lack_of_graphs
Jan 22, 2026
Merged

Fixing lack of graphs#1276
jacobcook1995 merged 4 commits intodevelopfrom
fixing_lack_of_graphs

Conversation

@jacobcook1995
Copy link
Copy Markdown
Collaborator

@jacobcook1995 jacobcook1995 commented Jan 22, 2026

Description

This PR saves a version of the virtual_ecosystem_in_use.ipynb that actually includes the graphs (something @vgro mentioned that I missed from the previous PR)

The graphs show 🥳

Type of change

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist

  • Make sure you've run the pre-commit checks: $ pre-commit run -a
  • All tests pass: $ poetry run pytest

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works
  • Relevant documentation reviewed and updated

@jacobcook1995 jacobcook1995 requested a review from vgro January 22, 2026 14:32
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.97%. Comparing base (bde5e9a) to head (4f7ad71).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1276   +/-   ##
========================================
  Coverage    94.97%   94.97%           
========================================
  Files           71       71           
  Lines         7344     7344           
========================================
  Hits          6975     6975           
  Misses         369      369           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@vgro vgro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

If you don't mind making one more small change, could you change the colors in the plots, something like this (not urgent)

var_name = "soil_moisture"
cell_to_plot = 25

soil_layers = ve_example.layers[-2:]
n_layers = len(soil_layers)

# Choose colormaps for each dataset
ve_cmap = cm.Blues(np.linspace(0.5, 1, n_layers))  # Blue shades for ve_example
hydro_cmap = cm.Reds(np.linspace(0.5, 1, n_layers))  # Red shades for hydrodefault

for i, layer in enumerate(soil_layers.values):
    plt.plot(
        ve_example["time_index"],
        ve_example[var_name].sel(cell_id=cell_to_plot, layers=layer),
        label=f"VE Example - Layer {layer}",
        linestyle="-",
        color=ve_cmap[i],
    )
    plt.plot(
        hydrodefault["time_index"],
        hydrodefault[var_name].sel(cell_id=cell_to_plot, layers=layer),
        label=f"HydroConst {layer}",
        linestyle="--",
        color=hydro_cmap[i],
    )

plt.xlabel("Time")
plt.ylabel(var_name)
plt.title(f"{var_name} for cell {cell_to_plot} (soil layers)")
plt.legend()
plt.show()

@jacobcook1995 jacobcook1995 merged commit be9821b into develop Jan 22, 2026
13 checks passed
@jacobcook1995 jacobcook1995 deleted the fixing_lack_of_graphs branch January 22, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants