Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add infrastructure to compute errors against observations #625

Merged
merged 4 commits into from
Mar 7, 2024

Conversation

Sbozzolo
Copy link
Member

@Sbozzolo Sbozzolo commented Feb 14, 2024

This PR introduces a new module, Leaderboard, currently living in the AMIP experiment.

Leaderboard uses NCDatasets and ClimaAnalysis to compute error maps between observations and simulations.

Leaderboard defines two new structs ObsDataSource and SimDataSource.
ObsDataSource describes some observational data (contained a NetCDF file) by specifying the name of the variable and other attributes. SimDataSource does the same for simulated (atmos) data.

The rmse error takes these two data structures and a target date, resamples the observational data to the simulated output grid (with a 0th order interpolation scheme, ie nearest neighbors). Then, it computes

bias = (sim_data - obs_data)

This variable is neatly packaged in a ClimaAnalysis.OutputVar so that it can be directly plotted.

Leaderboard also provides an numerical integration routine on the sphere. With integrate_on_sphere the RMSE can be integrated over the sphere to condense it to a single number (a 1/4pi might be needed to normalize the integration volume). These values are saved in the attributes of the OutputVar produced by bias.

Closes #407

@Sbozzolo Sbozzolo changed the title Add infrastructure to compute errors against obs Add infrastructure to compute errors against observations Feb 14, 2024
@Sbozzolo
Copy link
Member Author

image

Copy link
Member

@szy21 szy21 left a comment

Choose a reason for hiding this comment

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

Thanks Gabriele! Here are a few minor comments. I need to spend more time understanding how sampling over time works, but other than that it looks good. Also If I understand correctly it is now plotting the rmse map, not the bias map you showed in the comment?

experiments/AMIP/user_io/leaderboard.jl Outdated Show resolved Hide resolved
experiments/AMIP/user_io/leaderboard/compare_with_obs.jl Outdated Show resolved Hide resolved
experiments/AMIP/user_io/leaderboard/compare_with_obs.jl Outdated Show resolved Hide resolved
A struct to describe some observation data that we want to compare against.

"""
struct ObsDataSource
Copy link
Member

Choose a reason for hiding this comment

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

Just note that we will compare with data that has a z dimension as well, but we can add that when we are actually doing it.

A struct to describe some simulation data.

"""
struct SimDataSource
Copy link
Member

Choose a reason for hiding this comment

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

Same here, we will need the height information in the future.

experiments/AMIP/user_io/leaderboard/data_sources.jl Outdated Show resolved Hide resolved
experiments/AMIP/user_io/leaderboard/utils.jl Outdated Show resolved Hide resolved
experiments/AMIP/user_io/leaderboard/utils.jl Outdated Show resolved Hide resolved
@Sbozzolo Sbozzolo force-pushed the gb/leaderboard branch 3 times, most recently from ca0935c to 39a6a6c Compare March 4, 2024 20:33
@Sbozzolo Sbozzolo requested a review from szy21 March 4, 2024 20:33
@Sbozzolo Sbozzolo force-pushed the gb/leaderboard branch 8 times, most recently from 1e536e8 to ae00d5b Compare March 4, 2024 21:30
Copy link
Member

@szy21 szy21 left a comment

Choose a reason for hiding this comment

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

Thank you!

experiments/AMIP/user_io/leaderboard.jl Outdated Show resolved Hide resolved
experiments/AMIP/user_io/leaderboard/utils.jl Outdated Show resolved Hide resolved
@Sbozzolo Sbozzolo force-pushed the gb/leaderboard branch 3 times, most recently from 6d24cde to 9c832eb Compare March 5, 2024 15:44
@Sbozzolo Sbozzolo marked this pull request as ready for review March 5, 2024 22:54
@Sbozzolo Sbozzolo enabled auto-merge March 5, 2024 22:55
@Sbozzolo Sbozzolo merged commit 38865d9 into main Mar 7, 2024
6 of 7 checks passed
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.

O1.5.3e (coupler) Leaderboard for AMIP
2 participants