Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use higher resolution land-sea mask #1006

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .buildkite/amip/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ steps:
- "julia --project=experiments/ClimaEarth/ -e 'using Pkg; Pkg.precompile()'"
- "julia --project=experiments/ClimaEarth/ -e 'using Pkg; Pkg.status()'"

- echo "--- Download artifacts"
- "julia --project=experiments/ClimaEarth/ artifacts/download_artifacts.jl"

agents:
slurm_gpus: 1
slurm_cpus_per_task: 8
Expand Down
4 changes: 0 additions & 4 deletions .buildkite/benchmarks/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ steps:
- "julia --project=test/ -e 'using Pkg; Pkg.instantiate(;verbose=true)'"
- "julia --project=test/ -e 'using Pkg; Pkg.precompile()'"
- "julia --project=test/ -e 'using Pkg; Pkg.status()'"

- echo "--- Download artifacts"
- "julia --project=experiments/ClimaEarth artifacts/download_artifacts.jl"

agents:
slurm_gpus: 1
slurm_cpus_per_task: 8
Expand Down
3 changes: 0 additions & 3 deletions .buildkite/hierarchies/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ steps:
- "julia --project=experiments/ClimaEarth/ -e 'using Pkg; Pkg.precompile()'"
- "julia --project=experiments/ClimaEarth/ -e 'using Pkg; Pkg.status()'"

- echo "--- Download artifacts"
- "julia --project=experiments/ClimaEarth/ artifacts/download_artifacts.jl"

agents:
queue: clima
modules: climacommon/2024_10_09
Expand Down
12 changes: 0 additions & 12 deletions .buildkite/longruns/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ steps:
- "julia --project=experiments/ClimaEarth/ -e 'using Pkg; Pkg.precompile()'"
- "julia --project=experiments/ClimaEarth/ -e 'using Pkg; Pkg.status()'"

- echo "--- Download artifacts"
- "julia --project=artifacts -e 'using Pkg; Pkg.instantiate(;verbose=true)'"
- "julia --project=artifacts -e 'using Pkg; Pkg.precompile()'"
- "julia --project=artifacts -e 'using Pkg; Pkg.status()'"
- "julia --project=artifacts artifacts/download_artifacts.jl"

agents:
slurm_cpus_per_task: 8
env:
Expand All @@ -50,12 +44,6 @@ steps:
- "julia --project=experiments/ClimaEarth/ -e 'using Pkg; Pkg.precompile()'"
- "julia --project=experiments/ClimaEarth/ -e 'using Pkg; Pkg.status()'"

- echo "--- Download artifacts"
- "julia --project=artifacts -e 'using Pkg; Pkg.instantiate(;verbose=true)'"
- "julia --project=artifacts -e 'using Pkg; Pkg.precompile()'"
- "julia --project=artifacts -e 'using Pkg; Pkg.status()'"
- "julia --project=artifacts artifacts/download_artifacts.jl"

agents:
queue: clima
modules: climacommon/2024_10_09
Expand Down
3 changes: 0 additions & 3 deletions .buildkite/nightly/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ steps:
- "julia --project=experiments/ClimaEarth/ -e 'using Pkg; Pkg.precompile()'"
- "julia --project=experiments/ClimaEarth/ -e 'using Pkg; Pkg.status()'"

- echo "--- Download artifacts"
- "julia --project=experiments/ClimaEarth/ artifacts/download_artifacts.jl"

agents:
slurm_gpus: 1
slurm_cpus_per_task: 8
Expand Down
3 changes: 0 additions & 3 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ steps:
- "julia --project=test/ -e 'using Pkg; Pkg.precompile()'"
- "julia --project=test/ -e 'using Pkg; Pkg.status()'"

- echo "--- Download artifacts"
- "julia --project=experiments/ClimaEarth/ artifacts/download_artifacts.jl"

concurrency: 1
concurrency_group: 'depot/climacoupler-ci'
agents:
Expand Down
14 changes: 12 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,19 @@ low-resolution version of such files is automatically downloaded when a
higher-resolution version is not available. Please, refer to
[ClimaArtifacts](https://github.com/CliMA/ClimaArtifacts) for more information.

### A higher resolution land-sea mask is now used and automatically downloaded - PR [#1006](https://github.com/CliMA/ClimaCoupler.jl/pull/1006)

A 60 arcsecond land-sea mask constructed from topographic data is now used.
Topographic data is automatically downloaded and a land-sea mask is constructed
by identifying where elevation is greater than 0. Note, this can lead to
misidentification of ocean in some areas of the globe that are inland but below
sea level (Dead Sea, Death Valley, ...).
Comment on lines +20 to +22
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a plan to correct this ocean misidentification in the future?




### Code cleanup
#### Remove ClimaCoupler.Diagnostics module - PR [#953](https://github.com/CliMA/ClimaCoupler.jl/pull/953)

The ClimaCoupler Diagnostics module had become redundant with
ClimaDiagnostics.jl, a package designed to provide robust
diagnostics across the CliMA ecosystem.
Expand All @@ -37,5 +48,4 @@ This PR follows directly from the Diagnostics module removal.

### Maintenance
- Update to JuliaFormatter v2. PR [#1024](https://github.com/CliMA/ClimaCoupler.jl/pull/1024)
- Update CI to use Julia v1.11. Introduce Manifest files for
Julia 1.11, in addition to the existing generic Manifests. PR [#1026](https://github.com/CliMA/ClimaCoupler.jl/pull/1026)
- Update CI to use Julia v1.11. Introduce Manifest files for Julia 1.11, in addition to the existing generic Manifests. PR [#1026](https://github.com/CliMA/ClimaCoupler.jl/pull/1026)
8 changes: 0 additions & 8 deletions artifacts/Artifacts.toml

This file was deleted.

5 changes: 0 additions & 5 deletions artifacts/Project.toml

This file was deleted.

36 changes: 0 additions & 36 deletions artifacts/artifact_funcs.jl

This file was deleted.

27 changes: 0 additions & 27 deletions artifacts/download_artifacts.jl

This file was deleted.

10 changes: 10 additions & 0 deletions experiments/ClimaEarth/Artifacts.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,13 @@ git-tree-sha1 = "9c3bd05b68e820fceb43d130ce6b4e86ce788e4e"
[[co2_dataset.download]]
sha256 = "46923ec3e1f9028a11899c47e6b13d675d84daa9db2f37351a19ec9187f87865"
url = "https://caltech.box.com/shared/static/fuwajscgyblccy8y9aq01d0pgy91gwut.gz"

[earth_orography_30arcseconds]
git-tree-sha1 = "03dd08fcbf363ed055a176dd7adefb60ff1c3493"

[earth_orography_60arcseconds]
git-tree-sha1 = "fe19d8dbe7a18ff39588e1f718014b0479d9c0f7"

[[earth_orography_60arcseconds.download]]
sha256 = "eca66c0701d1c2b9e271742314915ffbf4a0fae92709df611c323f38e019966e"
url = "https://caltech.box.com/shared/static/4asrxcgl6xsgenfcug9p0wkkyhtqilgk.gz"
4 changes: 2 additions & 2 deletions experiments/ClimaEarth/Manifest-v1.11.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# This file is machine-generated - editing it directly is not advised

julia_version = "1.11.1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we want to stay at 1.11.1 unless there's a reason to go back to 1.11.0

julia_version = "1.11.0"
manifest_format = "2.0"
project_hash = "9e067c01eff1d3e9d90940fc842d1bd69aeb1be4"
project_hash = "5649495ebeefc92d7b9428a7f4ac45942550b0ca"

[[deps.ADTypes]]
git-tree-sha1 = "eea5d80188827b35333801ef97a40c2ed653b081"
Expand Down
6 changes: 3 additions & 3 deletions experiments/ClimaEarth/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

julia_version = "1.10.5"
manifest_format = "2.0"
project_hash = "ef236430f0314c4267948fabeb1aaedf2d54cb45"
project_hash = "4a006d2b7db06fc9ece2310e0cd50b83c36993fe"

[[deps.ADTypes]]
git-tree-sha1 = "eea5d80188827b35333801ef97a40c2ed653b081"
Expand Down Expand Up @@ -2187,9 +2187,9 @@ version = "3.45.3+0"

[[deps.SciMLBase]]
deps = ["ADTypes", "Accessors", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "Expronicon", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"]
git-tree-sha1 = "0453b3c89a95aeba2ef4647f701884bfd2dea6d0"
git-tree-sha1 = "26fea1911818cd480400f1a2b7f6b32c3cc3836a"
uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
version = "2.56.3"
version = "2.56.4"

[deps.SciMLBase.extensions]
SciMLBaseChainRulesCoreExt = "ChainRulesCore"
Expand Down
2 changes: 0 additions & 2 deletions experiments/ClimaEarth/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[deps]
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
ArtifactWrappers = "a14bc488-3040-4b00-9dc1-f6467924858a"
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
ClimaAnalysis = "29b5916a-a76c-4e73-9657-3c8fd22e65e6"
Expand Down Expand Up @@ -33,7 +32,6 @@ YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"

[compat]
ArgParse = "1.1"
ArtifactWrappers = "0.2"
ClimaAnalysis = "0.5.10"
ClimaAtmos = "0.27"
ClimaCorePlots = "0.2"
Expand Down
15 changes: 9 additions & 6 deletions experiments/ClimaEarth/run_amip.jl
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,7 @@ config_dict["print_config_dict"] && @info(config_dict)

#=
## Data File Paths
The data files are downloaded from the `ClimaCoupler` artifacts directory. If the data files are not present, they are downloaded from the
original sources.
=#
include(joinpath(pkgdir(ClimaCoupler), "artifacts", "artifact_funcs.jl"))

sst_data, sic_data = try
joinpath(@clima_artifact("historical_sst_sic", comms_ctx), "MODEL.SST.HAD187001-198110.OI198111-202206.nc"),
joinpath(@clima_artifact("historical_sst_sic", comms_ctx), "MODEL.ICE.HAD187001-198110.OI198111-202206.nc")
Expand All @@ -228,7 +224,8 @@ catch error
)
end
co2_data = joinpath(@clima_artifact("co2_dataset", comms_ctx), "co2_mm_mlo.txt")
land_mask_data = joinpath(mask_dataset_path(), "seamask.nc")
land_mask_data =
joinpath(@clima_artifact("earth_orography_60arcseconds", comms_ctx), "ETOPO_2022_v1_60s_N90W180_surface.nc")

#=
## Component Model Initialization
Expand Down Expand Up @@ -272,7 +269,13 @@ Note that land-sea area fraction is different to the land-sea mask, which is a b
(masks are used internally by the coupler to indicate passive cells that are not populated by a given component model).
=#

land_area_fraction = SpaceVaryingInput(land_mask_data, "LSMASK", boundary_space)
# Preprocess the file to be 1s and 0s before remapping into onto the grid
land_area_fraction = SpaceVaryingInput(
land_mask_data,
"z",
boundary_space,
file_reader_kwargs = (; preprocess_func = (data) -> data >= 0),
juliasloan25 marked this conversation as resolved.
Show resolved Hide resolved
)
if !mono_surface
land_area_fraction = Regridder.binary_mask.(land_area_fraction)
end
Expand Down
26 changes: 12 additions & 14 deletions experiments/ClimaEarth/run_cloudy_slabplanet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ import ClimaCoupler
import ClimaCoupler:
ConservationChecker, Checkpointer, FieldExchanger, FluxCalculator, Interfacer, Regridder, TimeManager, Utilities

import ClimaUtilities.ClimaArtifacts: @clima_artifact
import ClimaUtilities.SpaceVaryingInputs: SpaceVaryingInput
import Interpolations

pkg_dir = pkgdir(ClimaCoupler)

#=
Expand Down Expand Up @@ -156,8 +160,8 @@ dir_paths = setup_output_dirs(output_dir = coupler_output_dir, comms_ctx = comms
#=
## Data File Paths
=#
include(joinpath(pkgdir(ClimaCoupler), "artifacts", "artifact_funcs.jl"))
land_mask_data = artifact_data(mask_dataset_path(), "seamask")
land_mask_data =
joinpath(@clima_artifact("earth_orography_60arcseconds", comms_ctx), "ETOPO_2022_v1_60s_N90W180_surface.nc")

#=
## Component Model Initialization
Expand Down Expand Up @@ -191,18 +195,12 @@ This is a static field that contains the area fraction of land and sea, ranging
Note that land-sea area fraction is different to the land-sea mask, which is a binary field (masks are used internally by the coupler to indicate passive cells that are not populated by a given component model).
=#

land_area_fraction =
FT.(
Regridder.land_fraction(
FT,
dir_paths.regrid,
comms_ctx,
land_mask_data,
"LSMASK",
boundary_space,
mono = false,
),
)
land_area_fraction = SpaceVaryingInput(
land_mask_data,
"z",
boundary_space,
file_reader_kwargs = (; preprocess_func = (data) -> data >= 0),
)

#=
### Surface Model: Bucket Land and Slab Ocean
Expand Down
Loading
Loading