Skip to content

Commit 128fa0f

Browse files
committed
Use higher resolution land-sea mask
As added in CliMA/ClimaArtifacts#49 60 arcseconds is already pretty high resolution
1 parent b278a50 commit 128fa0f

File tree

6 files changed

+43
-60
lines changed

6 files changed

+43
-60
lines changed

NEWS.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,19 @@ low-resolution version of such files is automatically downloaded when a
1313
higher-resolution version is not available. Please, refer to
1414
[ClimaArtifacts](https://github.com/CliMA/ClimaArtifacts) for more information.
1515

16+
### A higher resolution land-sea mask is now used and automatically downloaded - PR [#1006](https://github.com/CliMA/ClimaCoupler.jl/pull/1006)
17+
18+
A 60 arcsecond land-sea mask constructed from topographic data is now used.
19+
Topographic data is automatically downloaded and a land-sea mask is constructed
20+
by identifying where elevation is greater than 0. Note, this can lead to
21+
misidentification of ocean in some areas of the globe that are inland but below
22+
sea level (Dead Sea, Death Valley, ...).
23+
24+
25+
1626
### Code cleanup
1727
#### Remove ClimaCoupler.Diagnostics module - PR [#953](https://github.com/CliMA/ClimaCoupler.jl/pull/953)
28+
1829
The ClimaCoupler Diagnostics module had become redundant with
1930
ClimaDiagnostics.jl, a package designed to provide robust
2031
diagnostics across the CliMA ecosystem.
@@ -37,5 +48,4 @@ This PR follows directly from the Diagnostics module removal.
3748

3849
### Maintenance
3950
- Update to JuliaFormatter v2. PR [#1024](https://github.com/CliMA/ClimaCoupler.jl/pull/1024)
40-
- Update CI to use Julia v1.11. Introduce Manifest files for
41-
Julia 1.11, in addition to the existing generic Manifests. PR [#1026](https://github.com/CliMA/ClimaCoupler.jl/pull/1026)
51+
- 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)

artifacts/artifact_funcs.jl

-36
This file was deleted.

artifacts/download_artifacts.jl

-7
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,3 @@ end
1818

1919

2020
include(joinpath(@__DIR__, "artifact_funcs.jl"))
21-
22-
# Trigger download if data doesn't exist locally
23-
function trigger_download()
24-
@info "mask dataset path: `$(mask_dataset_path())`"
25-
return nothing
26-
end
27-
trigger_download()

experiments/ClimaEarth/Artifacts.toml

+10
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,13 @@ git-tree-sha1 = "9c3bd05b68e820fceb43d130ce6b4e86ce788e4e"
3737
[[co2_dataset.download]]
3838
sha256 = "46923ec3e1f9028a11899c47e6b13d675d84daa9db2f37351a19ec9187f87865"
3939
url = "https://caltech.box.com/shared/static/fuwajscgyblccy8y9aq01d0pgy91gwut.gz"
40+
41+
[earth_orography_30arcseconds]
42+
git-tree-sha1 = "03dd08fcbf363ed055a176dd7adefb60ff1c3493"
43+
44+
[earth_orography_60arcseconds]
45+
git-tree-sha1 = "fe19d8dbe7a18ff39588e1f718014b0479d9c0f7"
46+
47+
[[earth_orography_60arcseconds.download]]
48+
sha256 = "eca66c0701d1c2b9e271742314915ffbf4a0fae92709df611c323f38e019966e"
49+
url = "https://caltech.box.com/shared/static/4asrxcgl6xsgenfcug9p0wkkyhtqilgk.gz"

experiments/ClimaEarth/run_amip.jl

+9-2
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ catch error
228228
)
229229
end
230230
co2_data = joinpath(@clima_artifact("co2_dataset", comms_ctx), "co2_mm_mlo.txt")
231-
land_mask_data = joinpath(mask_dataset_path(), "seamask.nc")
231+
land_mask_data =
232+
joinpath(@clima_artifact("earth_orography_60arcseconds", comms_ctx), "ETOPO_2022_v1_60s_N90W180_surface.nc")
232233

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

275-
land_area_fraction = SpaceVaryingInput(land_mask_data, "LSMASK", boundary_space)
276+
# Preprocess the file to be 1s and 0s before remapping into onto the grid
277+
land_area_fraction = SpaceVaryingInput(
278+
land_mask_data,
279+
"z",
280+
boundary_space,
281+
file_reader_kwargs = (; preprocess_func = (data) -> data >= 0),
282+
)
276283
if !mono_surface
277284
land_area_fraction = Regridder.binary_mask.(land_area_fraction)
278285
end

experiments/ClimaEarth/run_cloudy_slabplanet.jl

+12-13
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ import ClimaCoupler
2727
import ClimaCoupler:
2828
ConservationChecker, Checkpointer, FieldExchanger, FluxCalculator, Interfacer, Regridder, TimeManager, Utilities
2929

30+
import ClimaUtilities.ClimaArtifacts: @clima_artifact
31+
import ClimaUtilities.SpaceVaryingInput
32+
import Interpolations
33+
3034
pkg_dir = pkgdir(ClimaCoupler)
3135

3236
#=
@@ -157,7 +161,8 @@ dir_paths = setup_output_dirs(output_dir = coupler_output_dir, comms_ctx = comms
157161
## Data File Paths
158162
=#
159163
include(joinpath(pkgdir(ClimaCoupler), "artifacts", "artifact_funcs.jl"))
160-
land_mask_data = artifact_data(mask_dataset_path(), "seamask")
164+
land_mask_data =
165+
joinpath(@clima_artifact("earth_orography_60arcseconds", comms_ctx), "ETOPO_2022_v1_60s_N90W180_surface.nc")
161166

162167
#=
163168
## Component Model Initialization
@@ -191,18 +196,12 @@ This is a static field that contains the area fraction of land and sea, ranging
191196
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).
192197
=#
193198

194-
land_area_fraction =
195-
FT.(
196-
Regridder.land_fraction(
197-
FT,
198-
dir_paths.regrid,
199-
comms_ctx,
200-
land_mask_data,
201-
"LSMASK",
202-
boundary_space,
203-
mono = false,
204-
),
205-
)
199+
land_area_fraction = SpaceVaryingInput(
200+
land_mask_data,
201+
"z",
202+
boundary_space,
203+
file_reader_kwargs = (; preprocess_func = (data) -> data >= 0),
204+
)
206205

207206
#=
208207
### Surface Model: Bucket Land and Slab Ocean

0 commit comments

Comments
 (0)