Skip to content

Commit ec0efd9

Browse files
committed
Add weatherquest config and paths to ERA5 files for ocean, sea ice, and land IC
update configs, modify prog edmf Create subseasonal mode, infer paths, clean up
1 parent 77c01cb commit ec0efd9

File tree

15 files changed

+426
-68
lines changed

15 files changed

+426
-68
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
dt: 120secs
2+
t_end: 12hours
3+
start_date: "20250831"
4+
initial_condition: "WeatherModel"
5+
discrete_hydrostatic_balance: false
6+
topo_smoothing: true
7+
topography: "Earth"
8+
rayleigh_sponge: true
9+
viscous_sponge: true
10+
hyperdiff: ClimaHyperdiffusion
11+
divergence_damping_factor: 50.0
12+
scalar_hyperdiffusion_coefficient: 0.929738
13+
vorticity_hyperdiffusion_coefficient: 0.1857
14+
insolation: "timevarying"
15+
rad: allskywithclear
16+
dt_cloud_fraction: "1hours"
17+
dt_rad: "1hours"
18+
co2_model: fixed
19+
# prescribe_ozone: true
20+
# prescribed_aerosols: ["CB1", "CB2", "DST01", "OC1", "OC2", "SO4", "SSLT01"]
21+
turbconv: diagnostic_edmfx
22+
implicit_diffusion: true
23+
approximate_linear_solve_iters: 2
24+
prognostic_tke: true
25+
edmfx_upwinding: first_order
26+
h_elem: 15
27+
z_max: 48000.0
28+
z_elem: 63
29+
dz_bottom: 30.0
30+
edmfx_entr_model: "Generalized"
31+
edmfx_detr_model: "Generalized"
32+
edmfx_nh_pressure: true
33+
edmfx_sgs_mass_flux: true
34+
edmfx_sgs_diffusive_flux: true
35+
36+
### 0M Microphysics ###
37+
precip_model: 0M
38+
moist: equil
39+
toml: [toml/diagnostic_edmfx_era5_ic.toml]
40+
41+
### 1M Microphysics ###
42+
# precip_model: "1M"
43+
# moist: "nonequil"
44+
# toml: [toml/diagnostic_edmfx_1M.toml]
45+
46+
cloud_model: "quadrature_sgs"
47+
use_itime: true
48+
deep_atmosphere: false
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
dt: 120secs
2+
t_end: 12hours
3+
start_date: "20250831"
4+
initial_condition: "WeatherModel"
5+
discrete_hydrostatic_balance: false
6+
topo_smoothing: true
7+
topography: "Earth"
8+
rayleigh_sponge: true
9+
viscous_sponge: true
10+
hyperdiff: ClimaHyperdiffusion
11+
divergence_damping_factor: 50.0
12+
scalar_hyperdiffusion_coefficient: 0.929738
13+
vorticity_hyperdiffusion_coefficient: 0.1857
14+
insolation: "timevarying"
15+
rad: allskywithclear
16+
dt_cloud_fraction: "1hours"
17+
dt_rad: "1hours"
18+
co2_model: fixed
19+
# prescribe_ozone: true
20+
# prescribed_aerosols: ["CB1", "CB2", "DST01", "OC1", "OC2", "SO4", "SSLT01"]
21+
turbconv: "prognostic_edmfx"
22+
implicit_diffusion: true
23+
implicit_sgs_advection: true
24+
implicit_sgs_entr_detr: true
25+
implicit_sgs_mass_flux: true
26+
implicit_sgs_nh_pressure: true
27+
edmfx_filter: true
28+
approximate_linear_solve_iters: 2
29+
prognostic_tke: true
30+
edmfx_upwinding: first_order
31+
h_elem: 15
32+
z_max: 48000.0
33+
z_elem: 63
34+
dz_bottom: 30.0
35+
edmfx_entr_model: "Generalized"
36+
edmfx_detr_model: "Generalized"
37+
edmfx_nh_pressure: true
38+
edmfx_sgs_mass_flux: true
39+
edmfx_sgs_diffusive_flux: true
40+
41+
### 0M Microphysics ###
42+
precip_model: 0M
43+
moist: equil
44+
# toml: [toml/longrun_aquaplanet_progedmf.toml]
45+
46+
47+
### 1M Microphysics ###
48+
# precip_model: "1M"
49+
# moist: "nonequil"
50+
# toml: [toml/diagnostic_edmfx_1M.toml]
51+
52+
cloud_model: "quadrature_sgs"
53+
use_itime: true
54+
deep_atmosphere: false
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
FLOAT_TYPE: "Float32"
2+
albedo_model: "CouplerAlbedo"
3+
atmos_config_file: "config/atmos_configs/climaatmos_wx_diagedmf.yml"
4+
coupler_toml: ["toml/amip.toml"]
5+
mode_name: "subseasonal"
6+
era5_initial_condition_dir: "/net/sampo/data1/wxquest_data/initial_conditions"
7+
initial_condition: "WeatherModel"
8+
checkpoint_dt: "7days"
9+
co2_model: "fixed"
10+
dt: "30secs"
11+
dt_cpl: "30secs"
12+
energy_check: false
13+
h_elem: 16
14+
15+
### integrated land ###
16+
# land_model: "integrated"
17+
18+
### bucket land ###
19+
land_model: "bucket"
20+
bucket_albedo_type: "map_temporal"
21+
bucket_initial_condition: "/net/sampo/data1/wxquest_data/initial_conditions/era5_bucket_processed_20250907_0000.nc"
22+
23+
land_spun_up_ic: false
24+
land_temperature_anomaly: "nothing"
25+
use_land_diagnostics: true
26+
radiation_reset_rng_seed: true
27+
start_date: "20250907"
28+
surface_setup: "PrescribedSurface"
29+
topo_smoothing: true
30+
topography: "Earth"
31+
t_end: "7days"
32+
netcdf_output_at_levels: true
33+
extra_atmos_diagnostics:
34+
- short_name: [tas, mslp, pr, ua, va, rhoa, pfull, hur, hus, clw, cli, clivi, clwvi, cl, arup, tke]
35+
period: 1hours
36+
reduction_time: average
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
FLOAT_TYPE: "Float32"
2+
albedo_model: "CouplerAlbedo"
3+
atmos_config_file: "config/atmos_configs/climaatmos_wx_progedmf.yml"
4+
coupler_toml: ["toml/amip_progedmf.toml"]
5+
mode_name: "subseasonal"
6+
era5_initial_condition_dir: "/net/sampo/data1/wxquest_data/initial_conditions"
7+
initial_condition: "WeatherModel"
8+
checkpoint_dt: "7days"
9+
co2_model: "fixed"
10+
dt: "10secs"
11+
dt_cpl: "10secs"
12+
energy_check: false
13+
h_elem: 32
14+
15+
### integrated land ###
16+
# land_model: "integrated"
17+
18+
### bucket land ###
19+
land_model: "bucket"
20+
bucket_albedo_type: "map_temporal"
21+
bucket_initial_condition: "/net/sampo/data1/wxquest_data/initial_conditions/era5_bucket_processed_20250907_0000.nc"
22+
23+
land_spun_up_ic: false
24+
land_temperature_anomaly: "nothing"
25+
use_land_diagnostics: true
26+
radiation_reset_rng_seed: true
27+
start_date: "20250907"
28+
surface_setup: "PrescribedSurface"
29+
topo_smoothing: true
30+
topography: "Earth"
31+
t_end: "7days"
32+
netcdf_output_at_levels: true
33+
extra_atmos_diagnostics:
34+
- short_name: [tas, mslp, pr, ua, va, rhoa, pfull, hur, hus, clw, cli, clivi, clwvi, cl, arup, tke]
35+
period: 1hours
36+
reduction_time: average

docs/src/interfacer.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ end
296296
ClimaCoupler.Interfacer.update_field!
297297
ClimaCoupler.Interfacer.AbstractSlabplanetSimulationMode
298298
ClimaCoupler.Interfacer.AMIPMode
299+
ClimaCoupler.Interfacer.SubseasonalMode
299300
ClimaCoupler.Interfacer.SlabplanetMode
300301
ClimaCoupler.Interfacer.SlabplanetAquaMode
301302
ClimaCoupler.Interfacer.SlabplanetTerraMode

experiments/ClimaEarth/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ Insolation = "0.10.2"
5050
Interpolations = "0.14, 0.15"
5151
Oceananigans = "0.97.1, 0.98"
5252
StaticArrays = "1"
53-
YAML = "0.4"
53+
YAML = "0.4"

experiments/ClimaEarth/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,48 @@ only surface model is the ocean, which is evaluated over the entire surface. The
9393
This configuration is similar to the general "Slabplanet" configuration, except that the
9494
only surface model is the land, which is evaluated over the entire surface. There are no ocean or sea ice models.
9595

96+
## Subseasonal mode
97+
98+
Generates 3-4 week forecasts from ERA5-derived initial conditions. Similar to `amip` setup. Given a directory containing initial condition files, the filenames associated with current date are inferred from `start_date`. Initial condition files are generated by `https://github.com/CliMA/WeatherQuest`.
99+
100+
- `era5_initial_condition_dir`: directory that contains files named like:
101+
- `sst_processed_YYYYMMDD_0000.nc`
102+
- `sic_processed_YYYYMMDD_0000.nc`
103+
- `era5_land_processed_YYYYMMDD_0000.nc`
104+
- `era5_bucket_processed_YYYYMMDD_0000.nc`
105+
106+
- **How filename inference works**: given `start_date` formatted as `YYYYMMDD`, the model constructs paths
107+
- `joinpath(era5_initial_condition_dir, "sst_processed_YYYYMMDD_0000.nc")` for the initial conditions.
108+
109+
- **Contents and expected variables**:
110+
- `sst_processed_YYYYMMDD_0000.nc`:
111+
- Variable: `SST`
112+
- Units: degrees C in file; converted internally to K
113+
- `sic_processed_YYYYMMDD_0000.nc`:
114+
- Variable: `SEAICE`
115+
- Units: percent (0–100) in file; converted internally to fraction (0–1)
116+
- `era5_land_processed_YYYYMMDD_0000.nc` (for integrated land model):
117+
- Variables used directly: `skt` (skin temperature, K), `tsn` (snow surface temperature, K)
118+
- Required fields for land initialization:
119+
- `swe` (m): snow water equivalent
120+
- `swvl` (m^3/m^3): volumetric fraction of liquid water, dims `(z, lat, lon)`
121+
- `si` (m^3/m^3): volumetric fraction of ice, dims `(z, lat, lon)`
122+
- `sie` (J/m^3): soil volumetric internal energy, dims `(z, lat, lon)`
123+
- `stl` (K): soil temperature, dims `(z, lat, lon)`
124+
- `tsn` (K): temperature of snow layer
125+
- `skt` (K): skin temperature
126+
- era5 land level midpoints: 0.035, 0.175, 0.64, 1.945 (m)
127+
128+
- `era5_bucket_processed_YYYYMMDD_0000.nc` (for bucket land model):
129+
- Required fields for initialization:
130+
- `W` (m): subsurface water content, dims `(lat, lon)`
131+
- `Ws` (m): surface water content, dims `(lat, lon)`
132+
- `S` (m): snow water equivalent, dims `(lat, lon)`
133+
- `T` (K): soil temperature profile, dims `(z, lat, lon)`
134+
- `tsn` (K): temperature of snow layer, dims `(lat, lon)`
135+
- `skt` (K): skin temperature, dims `(lat, lon)`
136+
- era5 land level midpoints: 0.035, 0.175, 0.64, 1.945 (m)
137+
96138
## Configuration files
97139
We use configuration files to specify all simulation parameters and options. The configuration files are organized hierarchically:
98140

experiments/ClimaEarth/cli_options.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function argparse_settings()
1717
arg_type = Bool
1818
default = true
1919
"--mode_name"
20-
help = "Mode of coupled simulation. [`cmip`, `amip` (default), `slabplanet`, `slabplanet_aqua`, `slabplanet_terra`]"
20+
help = "Mode of coupled simulation. [`cmip`, `amip` (default), `subseasonal`, `slabplanet`, `slabplanet_aqua`, `slabplanet_terra`]"
2121
arg_type = String
2222
default = "amip"
2323
"--coupler_toml"
@@ -151,7 +151,7 @@ function argparse_settings()
151151
arg_type = String
152152
default = "bucket"
153153
"--land_temperature_anomaly"
154-
help = "Type of temperature anomaly for land model. [`amip`, `aquaplanet` (default)]"
154+
help = "Type of temperature anomaly for land model. [`amip`, `aquaplanet` (default), `nothing`]"
155155
arg_type = String
156156
default = "aquaplanet"
157157
"--use_land_diagnostics"
@@ -171,6 +171,10 @@ function argparse_settings()
171171
help = "A file path for a NetCDF file (read documentation about requirements)"
172172
arg_type = String
173173
default = ""
174+
"--era5_initial_condition_dir"
175+
help = "Directory containing ERA5 initial condition files (subseasonal mode). Filenames inferred from start_date [none (default)]. Generated with `https://github.com/CliMA/WeatherQuest`"
176+
arg_type = String
177+
default = nothing
174178
end
175179
return s
176180
end

experiments/ClimaEarth/components/land/climaland_bucket.jl

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -143,25 +143,27 @@ function BucketSimulation(
143143
# Initial conditions with no moisture
144144
Y, p, coords = CL.initialize(model)
145145

146-
# Get temperature anomaly function
147-
T_functions = Dict("aquaplanet" => temp_anomaly_aquaplanet, "amip" => temp_anomaly_amip)
148-
haskey(T_functions, land_temperature_anomaly) ||
149-
error("land temp anomaly function $land_temperature_anomaly not supported")
150-
temp_anomaly = T_functions[land_temperature_anomaly]
151-
152-
# Set temperature IC including anomaly, based on atmospheric setup
153-
# Bucket surface temperature is in `p.bucket.T_sfc` (ClimaLand.jl)
154-
lapse_rate = FT(6.5e-3)
155-
T_sfc_0 = FT(271)
156-
@. Y.bucket.T = T_sfc_0 + temp_anomaly(coords.subsurface)
157-
# `surface_elevation` is a ClimaCore.Fields.Field(`half` level)
158-
orog_adjusted_T_data =
159-
CC.Fields.field_values(Y.bucket.T) .-
160-
lapse_rate .* CC.Fields.field_values(surface_elevation)
161-
orog_adjusted_T = CC.Fields.Field(orog_adjusted_T_data, domain.space.subsurface)
162-
# Adjust T based on surface elevation (p.bucket.T_sfc is then set using the
163-
# set_initial_cache! function)
164-
Y.bucket.T .= orog_adjusted_T
146+
if land_temperature_anomaly != "nothing"
147+
T_functions =
148+
Dict("aquaplanet" => temp_anomaly_aquaplanet, "amip" => temp_anomaly_amip)
149+
haskey(T_functions, land_temperature_anomaly) ||
150+
error("land temp anomaly function $land_temperature_anomaly not supported")
151+
temp_anomaly = T_functions[land_temperature_anomaly]
152+
153+
# Set temperature IC including anomaly, based on atmospheric setup
154+
# Bucket surface temperature is in `p.bucket.T_sfc` (ClimaLand.jl)
155+
lapse_rate = FT(6.5e-3)
156+
T_sfc_0 = FT(271)
157+
@. Y.bucket.T = T_sfc_0 + temp_anomaly(coords.subsurface)
158+
# `surface_elevation` is a ClimaCore.Fields.Field(`half` level)
159+
orog_adjusted_T_data =
160+
CC.Fields.field_values(Y.bucket.T) .-
161+
lapse_rate .* CC.Fields.field_values(surface_elevation)
162+
orog_adjusted_T = CC.Fields.Field(orog_adjusted_T_data, domain.space.subsurface)
163+
# Adjust T based on surface elevation (p.bucket.T_sfc is then set using the
164+
# set_initial_cache! function)
165+
Y.bucket.T .= orog_adjusted_T
166+
end
165167

166168
Y.bucket.W .= 0.15
167169
Y.bucket.Ws .= 0.0
@@ -175,6 +177,7 @@ function BucketSimulation(
175177
# - `S`, for snow water equivalent (2D).
176178

177179
if !isempty(bucket_initial_condition)
180+
@info "ClimaLand Bucket using land IC file" bucket_initial_condition
178181
ds = NCDataset(bucket_initial_condition)
179182
has_all_variables = all(key -> haskey(ds, key), ["W", "Ws", "T", "S"])
180183
@assert has_all_variables "The land iniital condition file is expected to contain the variables W, Ws, T, and S (read documentation about requirements)."
@@ -185,6 +188,7 @@ function BucketSimulation(
185188
regridder_type = :InterpolationsRegridder
186189
extrapolation_bc =
187190
(Interpolations.Periodic(), Interpolations.Flat(), Interpolations.Flat())
191+
188192
Y.bucket.W .= SpaceVaryingInput(
189193
bucket_initial_condition,
190194
"W",

0 commit comments

Comments
 (0)