Skip to content

Commit 3c6b2c6

Browse files
committed
review comments
1 parent 7ebaa5c commit 3c6b2c6

File tree

15 files changed

+51
-40
lines changed

15 files changed

+51
-40
lines changed

docs/list_of_apis.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
apis = [
66
"ClimaLand" => [
7-
"ClimaLand" => "APIs/ClimaLand.md",
8-
"Shared Utilities" =>
9-
["APIs/Simulations.md", "APIs/shared_utilities.md"],
107
"Soil" => [
118
"Soil Energy and Hydrology" => "APIs/Soil.md",
129
"Soil Biogeochemistry" => "APIs/SoilBiogeochemistry.md",
@@ -25,4 +22,7 @@ apis = [
2522
"Bucket Model" => "APIs/Bucket.md",
2623
"Snow Model" => "APIs/Snow.md",
2724
],
25+
"Integrated Models" => "APIs/ClimaLand.md",
26+
"Shared Utilities" =>
27+
["APIs/Simulations.md", "APIs/shared_utilities.md"],
2828
]

docs/src/APIs/ClimaLand.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ClimaLand.LandModel
1010
ClimaLand.SoilCanopyModel
1111
ClimaLand.LandHydrology
1212
ClimaLand.LandSoilBiogeochemistry
13-
ClimaLand.LandHydrology
13+
ClimaLand.SoilSnowModel
1414
ClimaLand.land_components
1515
ClimaLand.lsm_aux_vars
1616
ClimaLand.lsm_aux_types

docs/src/getting_started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ julia> Pkg.add(ClimaLand)
1414
julia> using ClimaLand
1515
```
1616

17-
A typical land simulation employs several different parameterizations to model the various land-surface processes. Let's start our journet into ClimaLand by looking at one of those.
17+
A typical land simulation employs several different parameterizations to model the various land-surface processes. Let's start our journey into ClimaLand by looking at one of those.
1818

1919
### Parameterization
2020

docs/src/tutorials/global/bucket.jl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ outdir =
4040
start_date = DateTime(2008)
4141
stop_date = DateTime(2009);
4242

43-
# Create the domain - intentionally low resolution since
44-
# we are running on CPU:
43+
# Create the domain - this is intentionally low resolution,
44+
# about 4.5 degrees x 4.5 degrees, to run quickly
45+
# when making the documentation on CPU.
4546
nelements = (20, 7)
4647
depth = FT(3.5)
4748
dz_tuple = FT.((1.0, 0.05))
@@ -80,6 +81,7 @@ atmos, radiation = ClimaLand.prescribed_forcing_era5(
8081
time_interpolation_method = LinearInterpolation(PeriodicCalendar()),
8182
regridder_type = :InterpolationsRegridder,
8283
);
84+
8385
# Make the model:
8486
bucket = BucketModel(
8587
parameters = bucket_parameters,
@@ -92,10 +94,9 @@ bucket = BucketModel(
9294
# This should have the argument structure (Y,p,t, model)
9395
# in order to be used by the `LandSimulation` struct, below:
9496
function set_ic!(Y, p, t, bucket)
95-
temp_anomaly_amip(coord) = 40 * cosd(coord.lat)^4
97+
coords = ClimaCore.Fields.coordinate_field(Y.bucket.T)
9698
T_sfc_0 = 271.0
97-
cds = ClimaCore.Fields.coordinate_field(Y.bucket.T)
98-
@. Y.bucket.T = T_sfc_0 + temp_anomaly_amip(cds)
99+
@. Y.bucket.T = T_sfc_0 + 40 * cosd(coords.lat)^4
99100
Y.bucket.W .= 0.15
100101
Y.bucket.Ws .= 0.0
101102
Y.bucket.σS .= 0.0

docs/src/tutorials/global/snowy_land.jl

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# # Global snow+soil+canopy run
1+
# # Global full land (snow+soil+canopy) run
22

33
# The code sets up the ClimaLand land model on a spherical domain,
44
# forcing with ERA5 data, but does not actually run the simulation.
@@ -20,8 +20,8 @@ using CairoMakie, ClimaAnalysis, GeoMakie, Poppler_jll, Printf, StatsBase
2020
import ClimaLand.LandSimVis as LandSimVis;
2121

2222
# Set the simulation float type, determine the
23-
# context (MPI or on a single node), and device type. Create
24-
# a default output directory for diagnostics.
23+
# context (MPI or on a single node), and device type (CPU or GPU).
24+
# Create a default output directory for diagnostics.
2525
const FT = Float64;
2626
context = ClimaComms.context()
2727
ClimaComms.init(context)
@@ -40,11 +40,7 @@ stop_date = DateTime(2009);
4040

4141
# Create the domain:
4242
nelements = (101, 15)
43-
domain = ClimaLand.Domains.global_domain(
44-
FT;
45-
context = ClimaComms.context(),
46-
nelements,
47-
);
43+
domain = ClimaLand.Domains.global_domain(FT; context, nelements);
4844

4945
# Low-resolution forcing data from ERA5 is used here,
5046
# but high-resolution should be used for production runs.

docs/src/tutorials/integrated/fluxnet_data.jl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# # Fluxnet forcing data: LAI, radiation, and atmospheric variables
22

3+
# In this tutorial, we will demonstrate how we read in forcing data at a Fluxnet site
4+
# using our ClimaLand infrastructure. To see an example running a simulation at a
5+
# Fluxnet site, please see the corresponding tutorials for the [SoilCanopyModel](docs/src/tutorials/integrated/soil_canopy_fluxnet_tutorial.md)
6+
# or [LandModel](docs/src/tutorials/integrated/snowy_land_fluxnet_tutorial.md)
37
# To access the forcing data (LAI from MODIS, SW_d, LW_d, T_air, q_air,
48
# P_air, and precipitation from fluxtower data), you first need the
59
# the fluxtower site ID.
@@ -105,9 +109,10 @@ CairoMakie.save("air_temp.png", fig);
105109
# ![](air_temp.png)
106110

107111
# We do something very similar with LAI, but now the data is coming
108-
# from MODIS. In this case, we linearly interpolate from the gridded
109-
# MODIS data to the latitude and longitude of the site. To do spatial
110-
# interpolation, we need to create a ClimaLand domain.
112+
# from MODIS. In this case, we use nearest-neighbor interpolatation
113+
# to move from the gridded
114+
# MODIS data to the LAI at the latitude and longitude of the site.
115+
# To do spatial interpolation, we need to create a ClimaLand domain.
111116
domain =
112117
Column(; zlim = (FT(-3.0), FT(0.0)), nelements = 10, longlat = (long, lat))
113118
surface_space = domain.space.surface;

docs/src/tutorials/integrated/fluxnet_vis.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
# are also implementing a method to write the simulation data to
66
# file so that you can use your plotting methods of choice.
77

8-
# First, take a look at the fluxnet simulation tutorials, [canopy and soil](docs/src/tutorials/integrated/soil_canopy_fluxnet_tutorial.md) or [canopy, soil, and snow](docs/src/tutorials/integrated/snowy_land_fluxnet_tutorial.md). To use the default plotting tools (`LandSimVis`),
8+
# First, take a look at the fluxnet simulation tutorials for [SoilCanopyModel](docs/src/tutorials/integrated/soil_canopy_fluxnet_tutorial.md) or [LandModel](docs/src/tutorials/integrated/snowy_land_fluxnet_tutorial.md).
9+
# To use the default plotting tools (`LandSimVis`),
910
# you need to start by importing the packages required:
1011

1112
# ``` julia

docs/src/tutorials/integrated/snowy_land_fluxnet_tutorial.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# # Fluxnet simulations with the full land model: snow, soil, canopy
22

33
# In the
4-
# [canopy and soil tutorial](docs/src/tutorials/integrated/soil_canopy_fluxnet_tutorial.md),
4+
# [SoilCanopyModel tutorial](docs/src/tutorials/integrated/soil_canopy_fluxnet_tutorial.md),
55
# we demonstrated how to run the an integrated model with a soil and
66
# canopy component at the US-MOz fluxnet site.
77
# Here we add in a snow component, and run the site at the Niwot Ridge site instead.
@@ -110,6 +110,7 @@ diagnostics = ClimaLand.default_diagnostics(
110110
data_dt = Second(FluxnetSimulations.get_data_dt(site_ID));
111111
updateat = Array(start_date:data_dt:stop_date);
112112

113+
# Now we can construct the simulation object and solve it.
113114
simulation = Simulations.LandSimulation(
114115
start_date,
115116
stop_date,
@@ -120,7 +121,7 @@ simulation = Simulations.LandSimulation(
120121
user_callbacks = (),
121122
diagnostics,
122123
);
123-
@time solve!(simulation);
124+
solve!(simulation);
124125

125126
# # Plotting results
126127
LandSimVis.make_diurnal_timeseries(

docs/src/tutorials/integrated/soil_canopy_fluxnet_tutorial.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# we demonstrated how to run the canopy model in
66
# standalone mode using a prescribed soil moisture
77
# and ground temperature. ClimaLand can also
8-
# integrate the canopy model with a prongostic soil model
8+
# integrate the canopy model with a prognostic soil model
99
# and timestep the two components together to simulate an
1010
# interacting canopy-soil system. This tutorial
1111
# demonstrates how to set that up.

docs/src/tutorials/shared_utilities/driver_tutorial.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ seconds = 0:data_dt:((length(local_datetime) - 1) * data_dt);
6767
T = @. 298.15 + 5.0 * sin(2π * (seconds - 3600 * 6) / (3600 * 24));
6868
LW_d = 5.67 * 10^(-8) .* T .^ 4;
6969
SW_d = @. max(1400 * sin(2π * (seconds - 3600 * 6) / (3600 * 24)), 0.0);
70-
diffuse_fraction = 0.5 .+ zeros(length(seconds))
70+
diffuse_fraction = 0.5 .+ zeros(length(seconds));
71+
7172
# Next, fit interpolators to the data. These interpolators are what are stored in
7273
# the driver function. Then we can evaluate the radiative forcing
7374
# at any simulation time (and not just at times coinciding with measurements).

0 commit comments

Comments
 (0)