From d52d6851ebf66aaad0ed06ee6bd8a4194abd9f03 Mon Sep 17 00:00:00 2001 From: kmdeck Date: Wed, 11 Sep 2024 08:00:07 -0700 Subject: [PATCH] review comments --- experiments/long_runs/land_region.jl | 22 +++++++++++++++------- src/shared_utilities/Domains.jl | 6 ++++-- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/experiments/long_runs/land_region.jl b/experiments/long_runs/land_region.jl index ed6bde2d38..7dfe7962fa 100644 --- a/experiments/long_runs/land_region.jl +++ b/experiments/long_runs/land_region.jl @@ -1,6 +1,6 @@ # # Global run of land model -# The code sets up and runs the soil/canopy model for 6 hours on a spherical domain, +# The code sets up and runs the soil/canopy model for 6 hours on a small region of the globe in Southern California, # using ERA5 data. In this simulation, we have # turned lateral flow off because horizontal boundary conditions and the # land/sea mask are not yet supported by ClimaCore. @@ -56,7 +56,7 @@ diagnostics_outdir = joinpath(root_path, "regional_diagnostics") outdir = ClimaUtilities.OutputPathGenerator.generate_output_path(diagnostics_outdir) -function setup_prob(t0, tf, Δt; outdir = outdir, nelements = (2, 2, 15)) +function setup_prob(t0, tf, Δt; outdir = outdir, nelements = (10, 10, 15)) earth_param_set = LP.LandParameters(FT) radius = FT(6378.1e3) @@ -371,8 +371,16 @@ function setup_prob(t0, tf, Δt; outdir = outdir, nelements = (2, 2, 15)) # Conductance Model g1 = FT(141) # Wang et al: 141 sqrt(Pa) for Medlyn model; Natan used 300. - #Photosynthesis model - Vcmax25 = FT(9e-5) # from Yujie's paper 4.5e-5 , Natan used 9e-5 + clm_artifact_path = ClimaLand.Artifacts.clm_data_folder_path(; context) + # vcmax is read in units of umol CO2/m^2/s and then converted to mol CO2/m^2/s + Vcmax25 = SpaceVaryingInput( + joinpath(clm_artifact_path, "vegetation_properties_map.nc"), + "vcmx25", + surface_space; + regridder_type, + regridder_kwargs = (; extrapolation_bc,), + file_reader_kwargs = (; preprocess_func = (data) -> data / 1_000_000,), + ) # Plant Hydraulics and general plant parameters SAI = FT(0.0) # m2/m2 @@ -608,7 +616,7 @@ function setup_prob(t0, tf, Δt; outdir = outdir, nelements = (2, 2, 15)) ref_time; output_writer = nc_writer, output_vars = :short, - average_period = :daily, + average_period = :monthly, ) diagnostic_handler = @@ -623,9 +631,9 @@ end function setup_and_solve_problem(; greet = false) t0 = 0.0 - tf = 60 * 60.0 * 24 * 2 + tf = 60 * 60.0 * 24 * 334 Δt = 900.0 - nelements = (2, 2, 15) + nelements = (10, 10, 15) if greet @info "Run: Regional Soil-Canopy Model" @info "Resolution: $nelements" diff --git a/src/shared_utilities/Domains.jl b/src/shared_utilities/Domains.jl index 779b946386..9cc109afeb 100644 --- a/src/shared_utilities/Domains.jl +++ b/src/shared_utilities/Domains.jl @@ -267,8 +267,10 @@ function Plane(; @assert periodic == (false, false) radius_earth = FT(radius_earth) long, lat = longlat - dxlim = xlim # long - dylim = ylim # lat + dxlim = xlim # long bounds + dylim = ylim # lat bounds + # Now make x refer to lat, and y refer to long, + # for compatibility with ClimaCore xlim = (lat - dylim[1] / (2radius_earth), lat + dylim[2] / (2radius_earth)) ylim = (