Skip to content

Numpy upgrade in PySnobal and Python to 3.14 - #44

Open
jomey wants to merge 5 commits into
mainfrom
numpy_update
Open

jomey wants to merge 5 commits into
mainfrom
numpy_update

Conversation

@jomey

@jomey jomey commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Changes due to Python upgrade

The gold files for RME needed recreation with mostly floating point differences.

Gold file changes

cold_content_hist cold_content_xy latent_heat_hist latent_heat_xy net_rad_hist net_rad_xy precip_advected_hist precip_advected_xy sensible_heat_hist sensible_heat_xy snow_soil_hist snow_soil_xy sum_EB_hist sum_EB_xy

Changes due to PySnobal numpy upgrade

Only the lidar update logic needed a change when manipulating the snow states.

This is corresponding to the changes in PySnobal PR#23 and the gold files updates are below.

Once the PR is merged, the tests for AWSM need to be re-run and should be passing.

Gold file changes

All but the cold content are in the floating point noise range. The cold content is still < 1 J, which is the accumulated effect.

Snow

snow_density_hist snow_density_xy specific_mass_hist specific_mass_xy temp_lower_hist temp_lower_xy temp_snowcover_hist temp_snowcover_xy temp_surf_hist temp_surf_xy thickness_hist thickness_lower_hist thickness_lower_xy thickness_xy

Energy & Mass

cold_content_hist cold_content_xy snow_soil_hist snow_soil_xy sum_EB_hist sum_EB_xy

@jomey
jomey requested a review from a team October 21, 2026 22:26
@jomey jomey added the maintenance Technical updates to code base, dependent libraries, package install, or software architecture label Oct 21, 2026
@jomey jomey changed the title Numpy upgrade in PySnobal Numpy upgrade in PySnobal and Python to 3.14 Oct 22, 2026

@Hedrick-ARS Hedrick-ARS left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Syntax cleanup and elimination of spatialnc dependency.

Looks like a winner.

@jomey

jomey commented Oct 25, 2026

Copy link
Copy Markdown
Member Author

To get the tests passing we first must work on an updated conda environment.
This is started here:
iSnobal/model_setup#40

jomey added 4 commits October 28, 2026 16:34
When manually updating the snow depth for the time step, we need to
ensure that the data type for snow depth matches the expected type for
PySnobal. This means all arrays need to be of type float64.
The dedicated libray was removed as a dependency.
All differences where < 1e-5 with the execption of cold content of < 1. No update to snow.nc needed.
Was still pointing to the UofU Cryosphere
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Technical updates to code base, dependent libraries, package install, or software architecture

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants