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

Adds ERA5 reanalysis driven forcing at cfsites #3519

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

Conversation

Julians42
Copy link
Member

Purpose

Adds ERA5 Driven reanalysis forcing. Forcing files are currently stored on HPC under /central/groups/esm/jschmitt/era5/forcing. Eventually these will be made into an artifact but leaving as files for now.

To-do

Content


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

@Julians42 Julians42 requested review from szy21 and costachris January 13, 2025 18:32

zc_gcm = Fields.coordinate_field(Y.c).z[colidx]

setvar!(ᶜdTdt_hadv, "tntha", colidx, zc_gcm, zc_forcing)
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
setvar!(ᶜdTdt_hadv, "tntha", colidx, zc_gcm, zc_forcing)
evaluate!(ᶜdTdt_hadv, dTdt_timevaryinginput, t)

@Julians42 Julians42 force-pushed the j/ERA5Driven2 branch 2 times, most recently from 1e32660 to cd74d00 Compare January 24, 2025 00:03
moist: "equil"
config: "column"
z_max: 70e3
truncation: 40000
Copy link
Member

Choose a reason for hiding this comment

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

Can you document the "truncation" option or remove it from the config if it isn't used.

cfsite_number::String
end

function (initial_condition::ERA5Driven)(params)
Copy link
Member

Choose a reason for hiding this comment

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

These seem similar to the GCMDriven initial condition functions - you can dispatch over functions that perform the same operations in both setups vs. dispatching just on ERA5.

set_insolation!(insolation)
set_cos_zenith!(cos_zenith)

@. ᶜinv_τ_wind[colidx] = 1 / (6 * 3600)
Copy link
Member

Choose a reason for hiding this comment

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

Note it's not essential for the relaxation timescales to be exactly the same as the LES setup. I would add a note about that somewhere (i.e. "these are taken from Shen et al., 2022, but may vary")

@@ -297,3 +297,200 @@ function external_forcing_tendency!(Yₜ, Y, p, t, ::ISDACForcing)
# total specific humidity
@. Yₜ.c.ρq_tot += Y.c.ρ * ᶜdqtdt_nudging
end

# For ERA5 reanalysis forcing data
function external_forcing_cache(Y, external_forcing::ERA5Forcing, params)
Copy link
Member

Choose a reason for hiding this comment

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

I would try to dispatch at a lower level if possible, specifically for external_forcing_cache and external_forcing_tendency on the ERA5Forcing and GCMForcing types. For instance, instead of adding a external_forcing_cache dispatched on the ERA5Forcing, you could have one functions that's internally dispatch on setvar! and called for both ERA5Forcing and GCMForcing.

parent(cc_field[colidx]) .= interp_vertical_prof(
zc_gcm,
zc_forcing,
era5_driven_profile(ds.group[cfsite_number], varname),
Copy link
Member

Choose a reason for hiding this comment

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

I would be more straightforwards to have new function names match the existing naming pattern. i.e. the setvar! for the GCMDriven cases uses the time-mean gcm_driven_profile_tmean profile, whereas the setvar! ERA5 calls era5_driven_profile, and it's not clear if it's time-mean or not. This will also be less confusing when there's time-varying forcings

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.

2 participants