Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kmdeck committed Sep 11, 2024
1 parent 9f072c0 commit d52d685
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
22 changes: 15 additions & 7 deletions experiments/long_runs/land_region.jl
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 =
Expand All @@ -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"
Expand Down
6 changes: 4 additions & 2 deletions src/shared_utilities/Domains.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down

0 comments on commit d52d685

Please sign in to comment.