Skip to content

Commit

Permalink
Use higher resolution land-sea mask
Browse files Browse the repository at this point in the history
As added in CliMA/ClimaArtifacts#49

60 arcseconds is already pretty high resolution
  • Loading branch information
Sbozzolo committed Oct 18, 2024
1 parent f823e06 commit 37b12aa
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 58 deletions.
12 changes: 12 additions & 0 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, ...).



### 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 @@ -29,3 +40,4 @@ to our output diagnostics using the ClimaDiagnostics interface.

This PR also removes the AMIP paperplots function, but this
functionality is replaced by the generalized `make_plots` function.

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

This file was deleted.

7 changes: 0 additions & 7 deletions artifacts/download_artifacts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,3 @@ end


include(joinpath(@__DIR__, "artifact_funcs.jl"))

# Trigger download if data doesn't exist locally
function trigger_download()
@info "mask dataset path: `$(mask_dataset_path())`"
return nothing
end
trigger_download()
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"
11 changes: 9 additions & 2 deletions experiments/ClimaEarth/run_amip.jl
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,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 +273,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),
)
if !mono_surface
land_area_fraction = Regridder.binary_mask.(land_area_fraction)
end
Expand Down
24 changes: 11 additions & 13 deletions experiments/ClimaEarth/run_cloudy_slabplanet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ import ClimaCoupler
import ClimaCoupler:
ConservationChecker, Checkpointer, FieldExchanger, FluxCalculator, Interfacer, Regridder, TimeManager, Utilities

import ClimaUtilities.ClimaArtifacts: @clima_artifact
import Interpolations

pkg_dir = pkgdir(ClimaCoupler)

#=
Expand Down Expand Up @@ -157,7 +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

0 comments on commit 37b12aa

Please sign in to comment.