diff --git a/Artifacts.toml b/Artifacts.toml index ec05491c27..b3f2802fc5 100644 --- a/Artifacts.toml +++ b/Artifacts.toml @@ -12,8 +12,21 @@ git-tree-sha1 = "3f6873a3e67722bda1fd23f7d5a05f5e2df1fe8c" sha256 = "830136abec15551a343b7884d657fb6a79b16a37237681a2becf65bd845aa692" url = "https://caltech.box.com/shared/static/6pu2f6c99g29qawvjjh3j56drkonpd3z.gz" -[era5_land_forcing_data2021] -git-tree-sha1 = "ec424296df6b60cfe273ac8f981701fbbed0bd8a" +[era5_land_forcing_data2008] +git-tree-sha1 = "93d2e93f491e77cb8fba2a1b8b3946f38bde469e" +[era5_land_forcing_data2008_lowres] +git-tree-sha1 = "67b6daae491c1fa55406dd6a65f6b197b9bd4728" + + [[era5_land_forcing_data2008_lowres.download]] + sha256 = "f1ec64818faad37cf681caa86832b77c68f93784bf105dc85dd57079e8673b10" + url = "https://caltech.box.com/shared/static/6zk5fa3ka5ib62jsrs6tx35sqwe8xv2k.gz" + +[era5_land_forcing_data2008_lai] +git-tree-sha1 = "f998a8db24647caf5f1693ad4a1e46bdf356a752" + + [[era5_land_forcing_data2008_lai.download]] + sha256 = "81b357e97daf18d998c003dc00db14a7ffdd431520f2c5c4e41a1f0254864a8d" + url = "https://caltech.box.com/shared/static/m82r23e67x04a3hb6p79dfltlumvg9z0.gz" [land_albedo] git-tree-sha1 = "3f07b70ab43a05123e93753a45e094dcf7a66b5b" diff --git a/experiments/benchmarks/land.jl b/experiments/benchmarks/land.jl index cd2807c6dd..f1e3df0889 100644 --- a/experiments/benchmarks/land.jl +++ b/experiments/benchmarks/land.jl @@ -67,12 +67,12 @@ function setup_prob(t0, tf, Δt; nelements = (101, 15)) surface_space = domain.space.surface subsurface_space = domain.space.subsurface - start_date = DateTime(2021) + start_date = DateTime(2008) # Forcing data era5_artifact_path = - ClimaLand.Artifacts.era5_land_forcing_data2021_folder_path(; context) - era5_ncdata_path = joinpath(era5_artifact_path, "era5_2021_0.9x1.25.nc") + ClimaLand.Artifacts.era5_land_forcing_data2008_folder_path(; context) + era5_ncdata_path = joinpath(era5_artifact_path, "era5_2008_1.0x1.0.nc") atmos, radiation = ClimaLand.prescribed_forcing_era5( era5_ncdata_path, surface_space, @@ -230,8 +230,12 @@ function setup_prob(t0, tf, Δt; nelements = (101, 15)) photosynthesis_args = (; parameters = Canopy.FarquharParameters(FT, is_c3; Vcmax25 = Vcmax25)) # Set up plant hydraulics + era5_lai_artifact_path = + ClimaLand.Artifacts.era5_lai_forcing_data2008_folder_path(; context) + era5_lai_ncdata_path = + joinpath(era5_lai_artifact_path, "era5_2008_1.0x1.0_lai.nc") LAIfunction = ClimaLand.prescribed_lai_era5( - era5_ncdata_path, + era5_lai_ncdata_path, surface_space, start_date; time_interpolation_method = time_interpolation_method, diff --git a/experiments/benchmarks/richards.jl b/experiments/benchmarks/richards.jl index 67c7b253b3..11995a9b1b 100644 --- a/experiments/benchmarks/richards.jl +++ b/experiments/benchmarks/richards.jl @@ -68,7 +68,7 @@ function setup_prob(t0, tf, Δt; nelements = (101, 15)) surface_space = domain.space.surface subsurface_space = domain.space.subsurface - start_date = DateTime(2021) + start_date = DateTime(2008) spatially_varying_soil_params = ClimaLand.default_spatially_varying_soil_parameters( subsurface_space, @@ -92,20 +92,18 @@ function setup_prob(t0, tf, Δt; nelements = (101, 15)) ) era5_artifact_path = - ClimaLand.Artifacts.era5_land_forcing_data2021_folder_path(; context) + ClimaLand.Artifacts.era5_land_forcing_data2008_folder_path(; context) # Below, the preprocess_func argument is used to # 1. Convert precipitation to be negative (as it is downwards) - # 2. Convert accumulations over an hour to a rate per second - start_date = DateTime(2021) # Precipitation: precip = TimeVaryingInput( - joinpath(era5_artifact_path, "era5_2021_0.9x1.25.nc"), - "tp", + joinpath(era5_artifact_path, "era5_2008_1.0x1.0.nc"), + "mtpr", surface_space; start_date, regridder_type, - file_reader_kwargs = (; preprocess_func = (data) -> -data / 3600,), + file_reader_kwargs = (; preprocess_func = (data) -> -data), ) atmos = ClimaLand.PrescribedPrecipitation{FT, typeof(precip)}(precip) bottom_bc = ClimaLand.Soil.WaterFluxBC((p, t) -> 0.0) diff --git a/experiments/integrated/global/global_soil_canopy.jl b/experiments/integrated/global/global_soil_canopy.jl index 82405e7291..99851a2cbf 100644 --- a/experiments/integrated/global/global_soil_canopy.jl +++ b/experiments/integrated/global/global_soil_canopy.jl @@ -49,12 +49,12 @@ domain = ClimaLand.Domains.SphericalShell(; surface_space = domain.space.surface subsurface_space = domain.space.subsurface -start_date = DateTime(2021); +start_date = DateTime(2008); # Forcing data era5_artifact_path = - ClimaLand.Artifacts.era5_land_forcing_data2021_folder_path(; context) -era5_ncdata_path = joinpath(era5_artifact_path, "era5_2021_0.9x1.25.nc") + ClimaLand.Artifacts.era5_land_forcing_data2008_folder_path(; context) +era5_ncdata_path = joinpath(era5_artifact_path, "era5_2008_1.0x1.0.nc") atmos, radiation = ClimaLand.prescribed_forcing_era5( era5_ncdata_path, surface_space, @@ -124,8 +124,12 @@ conductance_args = (; parameters = Canopy.MedlynConductanceParameters(FT; g1)) photosynthesis_args = (; parameters = Canopy.FarquharParameters(FT, is_c3; Vcmax25 = Vcmax25)) # Set up plant hydraulics +era5_lai_artifact_path = + ClimaLand.Artifacts.era5_lai_forcing_data2008_folder_path(; context) +era5_lai_ncdata_path = + joinpath(era5_lai_artifact_path, "era5_2008_1.0x1.0_lai.nc") LAIfunction = ClimaLand.prescribed_lai_era5( - era5_ncdata_path, + era5_lai_ncdata_path, surface_space, start_date; time_interpolation_method = time_interpolation_method, diff --git a/experiments/long_runs/bucket.jl b/experiments/long_runs/bucket.jl index 7dafe69be3..f665d62cf2 100644 --- a/experiments/long_runs/bucket.jl +++ b/experiments/long_runs/bucket.jl @@ -66,12 +66,13 @@ function setup_prob(t0, tf, Δt; outdir = outdir, nelements = (101, 7)) surface_space = domain.space.surface subsurface_space = domain.space.subsurface - start_date = DateTime(2021) + start_date = DateTime(2008) # Forcing data era5_artifact_path = - ClimaLand.Artifacts.era5_land_forcing_data2021_folder_path(; context) + ClimaLand.Artifacts.era5_land_forcing_data2008_folder_path(; context) + era5_ncdata_path = joinpath(era5_artifact_path, "era5_2008_1.0x1.0.nc") atmos, radiation = ClimaLand.prescribed_forcing_era5( - joinpath(era5_artifact_path, "era5_2021_0.9x1.25.nc"), + era5_ncdata_path, surface_space, start_date, earth_param_set, diff --git a/experiments/long_runs/land.jl b/experiments/long_runs/land.jl index 8fb0daf610..505c97dbf0 100644 --- a/experiments/long_runs/land.jl +++ b/experiments/long_runs/land.jl @@ -69,11 +69,11 @@ function setup_prob(t0, tf, Δt; outdir = outdir, nelements = (101, 15)) surface_space = domain.space.surface subsurface_space = domain.space.subsurface - start_date = DateTime(2021) + start_date = DateTime(2008) # Forcing data era5_artifact_path = - ClimaLand.Artifacts.era5_land_forcing_data2021_folder_path(; context) - era5_ncdata_path = joinpath(era5_artifact_path, "era5_2021_0.9x1.25.nc") + ClimaLand.Artifacts.era5_land_forcing_data2008_folder_path(; context) + era5_ncdata_path = joinpath(era5_artifact_path, "era5_2008_1.0x1.0.nc") atmos, radiation = ClimaLand.prescribed_forcing_era5( era5_ncdata_path, surface_space, @@ -231,9 +231,12 @@ function setup_prob(t0, tf, Δt; outdir = outdir, nelements = (101, 15)) photosynthesis_args = (; parameters = Canopy.FarquharParameters(FT, is_c3; Vcmax25 = Vcmax25)) # Set up plant hydraulics - + era5_lai_artifact_path = + ClimaLand.Artifacts.era5_lai_forcing_data2008_folder_path(; context) + era5_lai_ncdata_path = + joinpath(era5_lai_artifact_path, "era5_2008_1.0x1.0_lai.nc") LAIfunction = ClimaLand.prescribed_lai_era5( - era5_ncdata_path, + era5_lai_ncdata_path, surface_space, start_date; time_interpolation_method = time_interpolation_method, diff --git a/experiments/long_runs/land_region.jl b/experiments/long_runs/land_region.jl index 9be516afc4..9656b58264 100644 --- a/experiments/long_runs/land_region.jl +++ b/experiments/long_runs/land_region.jl @@ -73,11 +73,11 @@ function setup_prob(t0, tf, Δt; outdir = outdir, nelements = (10, 10, 15)) surface_space = domain.space.surface subsurface_space = domain.space.subsurface - start_date = DateTime(2021) + start_date = DateTime(2008) # Forcing data era5_artifact_path = - ClimaLand.Artifacts.era5_land_forcing_data2021_folder_path(; context) - era5_ncdata_path = joinpath(era5_artifact_path, "era5_2021_0.9x1.25.nc") + ClimaLand.Artifacts.era5_land_forcing_data2008_folder_path(; context) + era5_ncdata_path = joinpath(era5_artifact_path, "era5_2008_1.0x1.0.nc") atmos, radiation = ClimaLand.prescribed_forcing_era5( era5_ncdata_path, surface_space, @@ -232,8 +232,12 @@ function setup_prob(t0, tf, Δt; outdir = outdir, nelements = (10, 10, 15)) photosynthesis_args = (; parameters = Canopy.FarquharParameters(FT, is_c3; Vcmax25 = Vcmax25)) # Set up plant hydraulics + era5_lai_artifact_path = + ClimaLand.Artifacts.era5_lai_forcing_data2008_folder_path(; context) + era5_lai_ncdata_path = + joinpath(era5_lai_artifact_path, "era5_2008_1.0x1.0_lai.nc") LAIfunction = ClimaLand.prescribed_lai_era5( - era5_ncdata_path, + era5_lai_ncdata_path, surface_space, start_date; time_interpolation_method = time_interpolation_method, diff --git a/experiments/long_runs/snowy_land.jl b/experiments/long_runs/snowy_land.jl index 518a657db4..481ec0df8c 100644 --- a/experiments/long_runs/snowy_land.jl +++ b/experiments/long_runs/snowy_land.jl @@ -70,11 +70,11 @@ function setup_prob(t0, tf, Δt; outdir = outdir, nelements = (101, 15)) surface_space = domain.space.surface subsurface_space = domain.space.subsurface - start_date = DateTime(2021) + start_date = DateTime(2008) # Forcing data era5_artifact_path = - ClimaLand.Artifacts.era5_land_forcing_data2021_folder_path(; context) - era5_ncdata_path = joinpath(era5_artifact_path, "era5_2021_0.9x1.25.nc") + ClimaLand.Artifacts.era5_land_forcing_data2008_folder_path(; context) + era5_ncdata_path = joinpath(era5_artifact_path, "era5_2008_1.0x1.0.nc") atmos, radiation = ClimaLand.prescribed_forcing_era5( era5_ncdata_path, surface_space, @@ -232,9 +232,12 @@ function setup_prob(t0, tf, Δt; outdir = outdir, nelements = (101, 15)) photosynthesis_args = (; parameters = Canopy.FarquharParameters(FT, is_c3; Vcmax25 = Vcmax25)) # Set up plant hydraulics - + era5_lai_artifact_path = + ClimaLand.Artifacts.era5_lai_forcing_data2008_folder_path(; context) + era5_lai_ncdata_path = + joinpath(era5_lai_artifact_path, "era5_2008_1.0x1.0_lai.nc") LAIfunction = ClimaLand.prescribed_lai_era5( - era5_ncdata_path, + era5_lai_ncdata_path, surface_space, start_date; time_interpolation_method = time_interpolation_method, diff --git a/experiments/long_runs/soil.jl b/experiments/long_runs/soil.jl index 35c7d30049..2b27190746 100644 --- a/experiments/long_runs/soil.jl +++ b/experiments/long_runs/soil.jl @@ -67,12 +67,13 @@ function setup_prob(t0, tf, Δt; outdir = outdir, nelements = (101, 15)) surface_space = domain.space.surface subsurface_space = domain.space.subsurface - start_date = DateTime(2021) + start_date = DateTime(2008) # Forcing data era5_artifact_path = - ClimaLand.Artifacts.era5_land_forcing_data2021_folder_path(; context) + ClimaLand.Artifacts.era5_land_forcing_data2008_folder_path(; context) + era5_ncdata_path = joinpath(era5_artifact_path, "era5_2008_1.0x1.0.nc") atmos, radiation = ClimaLand.prescribed_forcing_era5( - joinpath(era5_artifact_path, "era5_2021_0.9x1.25.nc"), + era5_ncdata_path, surface_space, start_date, earth_param_set, diff --git a/experiments/standalone/Bucket/bucket_era5.jl b/experiments/standalone/Bucket/bucket_era5.jl index 750bd595c4..17f52b078d 100644 --- a/experiments/standalone/Bucket/bucket_era5.jl +++ b/experiments/standalone/Bucket/bucket_era5.jl @@ -110,7 +110,7 @@ else dz_tuple = FT.((1.0, 0.05)), ) end -start_date = DateTime(2021); +start_date = DateTime(2008); # Set up parameters σS_c = FT(0.2); @@ -134,8 +134,8 @@ bucket_parameters = BucketModelParameters(FT; albedo, z_0m, z_0b, τc); # Forcing data era5_artifact_path = - ClimaLand.Artifacts.era5_land_forcing_data2021_folder_path(; context) -era5_ncdata_path = joinpath(era5_artifact_path, "era5_2021_0.9x1.25.nc") + ClimaLand.Artifacts.era5_land_forcing_data2008_folder_path(; context) +era5_ncdata_path = joinpath(era5_artifact_path, "era5_2008_1.0x1.0.nc") bucket_atmos, bucket_rad = ClimaLand.prescribed_forcing_era5( era5_ncdata_path, surface_space, diff --git a/experiments/standalone/Soil/richards_runoff.jl b/experiments/standalone/Soil/richards_runoff.jl index 55b64dfada..10bc23ed89 100644 --- a/experiments/standalone/Soil/richards_runoff.jl +++ b/experiments/standalone/Soil/richards_runoff.jl @@ -67,20 +67,20 @@ soil_params = ClimaLand.Soil.RichardsParameters(; ) era5_artifact_path = - ClimaLand.Artifacts.era5_land_forcing_data2021_folder_path(; context) + ClimaLand.Artifacts.era5_land_forcing_data2008_folder_path(; context) # Below, the preprocess_func argument is used to # 1. Convert precipitation to be negative (as it is downwards) # 2. Convert accumulations over an hour to a rate per second -start_date = DateTime(2021); +start_date = DateTime(2008); # Precipitation: precip = TimeVaryingInput( - joinpath(era5_artifact_path, "era5_2021_0.9x1.25.nc"), - "tp", + joinpath(era5_artifact_path, "era5_2008_1.0x1.0.nc"), + "mtpr", surface_space; start_date, regridder_type, - file_reader_kwargs = (; preprocess_func = (data) -> -data / 3600,), + file_reader_kwargs = (; preprocess_func = (data) -> -data,), ) atmos = ClimaLand.PrescribedPrecipitation{FT, typeof(precip)}(precip) bottom_bc = ClimaLand.Soil.WaterFluxBC((p, t) -> 0.0) diff --git a/src/Artifacts.jl b/src/Artifacts.jl index 285d95d19f..2868580d8b 100644 --- a/src/Artifacts.jl +++ b/src/Artifacts.jl @@ -6,12 +6,30 @@ import LazyArtifacts using ArtifactWrappers """ - era5_land_forcing_data2021_path(; context) + era5_land_forcing_data2008_path(; context, lowres=false) -Return the path to the folder that contains the ERA5 data. +Return the path to the directory that contains the ERA5 forcing data for 2008. + +Optionally, you can pass the lowres=true keyword to download a lower spatial resolution version of the data. +""" +function era5_land_forcing_data2008_folder_path(; + context = nothing, + lowres = false, +) + if lowres + return @clima_artifact("era5_land_forcing_data2008_lowres", context) + else + return @clima_artifact("era5_land_forcing_data2008", context) + end +end + +""" + era5_lai_forcing_data2008_path(; context) + +Return the path to the directory that contains the ERA5 LAI forcing data for 2008. """ -function era5_land_forcing_data2021_folder_path(; context = nothing) - return @clima_artifact("era5_land_forcing_data2021", context) +function era5_lai_forcing_data2008_folder_path(; context = nothing) + return @clima_artifact("era5_land_forcing_data2008_lai", context) end """ diff --git a/src/shared_utilities/drivers.jl b/src/shared_utilities/drivers.jl index c5733451f8..884deb4cdb 100644 --- a/src/shared_utilities/drivers.jl +++ b/src/shared_utilities/drivers.jl @@ -1031,28 +1031,28 @@ function prescribed_forcing_era5( precip = TimeVaryingInput( era5_ncdata_path, - ["tp", "sf"], + ["mtpr", "msr"], surface_space; start_date, regridder_type, - file_reader_kwargs = (; preprocess_func = (data) -> -data / 3600,), + file_reader_kwargs = (; preprocess_func = (data) -> -data,), method = time_interpolation_method, - compose_function = (tp, sf) -> tp - sf, + compose_function = (mtpr, msr) -> mtpr - msr, ) snow_precip = TimeVaryingInput( era5_ncdata_path, - "sf", + "msr", surface_space; start_date, regridder_type, - file_reader_kwargs = (; preprocess_func = (data) -> -data / 3600,), + file_reader_kwargs = (; preprocess_func = (data) -> -data,), method = time_interpolation_method, ) u_atmos = TimeVaryingInput( era5_ncdata_path, - ["u10n", "v10n"], + ["u10", "v10"], surface_space; start_date, regridder_type, @@ -1105,20 +1105,18 @@ function prescribed_forcing_era5( SW_d = TimeVaryingInput( era5_ncdata_path, - "ssrd", + "msdwswrf", surface_space; start_date, regridder_type, - file_reader_kwargs = (; preprocess_func = (data) -> data / 3600,), method = time_interpolation_method, ) LW_d = TimeVaryingInput( era5_ncdata_path, - "strd", + "msdwlwrf", surface_space; start_date, regridder_type, - file_reader_kwargs = (; preprocess_func = (data) -> data / 3600,), method = time_interpolation_method, )