-
Notifications
You must be signed in to change notification settings - Fork 20
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
base: main
Are you sure you want to change the base?
Conversation
|
||
zc_gcm = Fields.coordinate_field(Y.c).z[colidx] | ||
|
||
setvar!(ᶜdTdt_hadv, "tntha", colidx, zc_gcm, zc_forcing) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setvar!(ᶜdTdt_hadv, "tntha", colidx, zc_gcm, zc_forcing) | |
evaluate!(ᶜdTdt_hadv, dTdt_timevaryinginput, t) |
1e32660
to
cd74d00
Compare
moist: "equil" | ||
config: "column" | ||
z_max: 70e3 | ||
truncation: 40000 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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), |
There was a problem hiding this comment.
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
cd74d00
to
784da18
Compare
291f4e7
to
4f2daca
Compare
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