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 postprocessing for 4D variables (lat, lon, time, pressure level) #1094

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ph-kev
Copy link
Member

@ph-kev ph-kev commented Nov 21, 2024

Purpose

closes #1093 - This PR adds postprocessing for 4D variables (lat, lon, time, pressure level). See plots below.

To-do

  • Make new release of ClimaAnalysis and update here in ClimaCoupler

Content

  • Add bias plots after taking time average and slicing at specific pressure levels (850, 500, 250 hPA)

  • Add bias plots over latitude and pressure level after taking average over time and longitude

  • I have read and checked the items on the review checklist.
    bias_vars_in_pfull
    lat_pfull_heatmaps

Copy link
Member

@Sbozzolo Sbozzolo 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 to me, thank you!

Copy link
Member

@juliasloan25 juliasloan25 left a comment

Choose a reason for hiding this comment

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

This looks great! Thank you Kevin

@@ -48,3 +48,6 @@ must be initialized for each variable of interest. The CliMA model is added with
the `RMSEVariable`. It is assumed that the `RMSEVariable` contains only the columns "DJF",
"MAM", "JJA", "SON", and "ANN" in that order. The file `leaderboard.jl` will load the
appropriate data into the `RMSEVariable`.

### Add a new variable to compare against observations in pressure coordinates
Copy link
Member

Choose a reason for hiding this comment

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

It would be good to also add a description of the new feature in NEWS.md

@@ -153,11 +160,151 @@ function compute_leaderboard(leaderboard_base_path, diagnostics_folder_path)
CairoMakie.save(joinpath(leaderboard_base_path, "bias_leaderboard.png"), fig_leaderboard)
end

"""
compute_pfull_leaderboard(leaderboard_base_path, diagnostics_folder_path)
Copy link
Member

Choose a reason for hiding this comment

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

What does pfull refer to here? If it's referring to the space the data is on, 4d might be more clear unless you want to distinguish between using P or z as the 4th dimension

Copy link
Member Author

Choose a reason for hiding this comment

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

I am using pfull to refer to full pressure levels since the variables have the dimensions longitude, latitude, time, and pressure levels. I am going to add it to the docstring, so it is more clear what the function needs.

function that returns a `OutputVar`. The function must takes in a start date
which is used to align the times in the observational data to match the
simulation data. The short name must be the same as in `sim_var_dict` in the
function `sim_var_dict`. Any preprocessing is done in the function which
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
function `sim_var_dict`. Any preprocessing is done in the function which
function `get_sim_var_dict`. Any preprocessing is done in the function which

Copy link
Member

Choose a reason for hiding this comment

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

Which function does the preprocessing + unit conversion + date shifting? It's not totally clear to me here

Copy link
Member Author

Choose a reason for hiding this comment

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

I am going to rewrite this, but the function that does the post processing is the anonymous function defined in the dictionaries. For example, get_sim_var_dict returns a dictionary that map short names to functions and those functions are the one that do the preprocessing (unit conversion and data shifting).

experiments/ClimaEarth/leaderboard/leaderboard.jl Outdated Show resolved Hide resolved
@ph-kev ph-kev force-pushed the kp/pressure-postprocessing branch 2 times, most recently from 20d997a to 4f11200 Compare November 25, 2024 19:11
The plots added are bias plots at 850 hPa, 500 hPa, and 250 hPa and
lat - pressure plots.
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.

Add postprocessing for variables in pressure coordinates
3 participants