Skip to content

Conversation

@xylar
Copy link
Collaborator

@xylar xylar commented Mar 12, 2025

We can't pass vmin and vmax along with norm that also tried to define the min and max:

ValueError: Passing a Normalize instance simultaneously with vmin/vmax is not supported.  Please pass vmin/vmax directly to the norm when creating it.

This merge also drops an attempt to keep vmin positive for log norm, instead requiring the calling code to set reasonable bounds for log plots.

Checklist

  • Testing comment in the PR documents testing used to verify the changes

@xylar xylar added bug Something isn't working framework Changes relating to the polaris framework as opposed to individual tests or analysis labels Mar 12, 2025
@xylar xylar requested a review from andrewdnolan March 12, 2025 10:12
@xylar xylar self-assigned this Mar 12, 2025
@xylar
Copy link
Collaborator Author

xylar commented Mar 12, 2025

Testing

I was able to run the init step for ISOMIP+ added in #151 on Chrysalis with this change, whereas I got the error reported above without it.

@xylar
Copy link
Collaborator Author

xylar commented Mar 12, 2025

@andrewdnolan, could you take a quick look at this? A review by code inspection should be sufficient.

We can't pass `vmin` and `vmax` along with `norm` that also
tried to define the min and max:
```
ValueError: Passing a Normalize instance simultaneously with vmin/vmax is not supported.  Please pass vmin/vmax directly to the norm when creating it.
```

This merge also drops an attempt to keep `vmin` positive for log
norm, instead requiring the calling code to set reasonable bounds
for log plots.
@xylar
Copy link
Collaborator Author

xylar commented Mar 12, 2025

@andrewdnolan, could you have another look?

Copy link
Collaborator

@andrewdnolan andrewdnolan left a comment

Choose a reason for hiding this comment

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

Looks good. This seems like the cleanest solution.

Thanks for catching this!

@xylar
Copy link
Collaborator Author

xylar commented Mar 12, 2025

I verified that vmin is being supplied in all plots in #151, so the bounds check was not needed so far. I think it's fine to remove it.

@xylar xylar merged commit 4cc984b into E3SM-Project:main Mar 12, 2025
5 checks passed
@xylar xylar deleted the fix-log-norm branch March 12, 2025 16:18
@xylar
Copy link
Collaborator Author

xylar commented Mar 12, 2025

Thanks @andrewdnolan!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working framework Changes relating to the polaris framework as opposed to individual tests or analysis

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants