-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recent PRs in `ClimaCore` and `ClimaComms` (CliMA/ClimaCore.jl#2114 and CliMA/ClimaComms.jl#103) changed how contexts are adapted to GPUs. This, coupled with CliMA/ClimaAtmos.jl#3522, prompted me to look again at the `TimeVaryingInputs0D` struct. This struct is used in two main ways: - to set site-level forcings/parameters (in ClimaLand) - to set fields that have constant value on the globe (e.g., CO2) The previous implementation achieved GPU compatibility by moving everything to the GPU. This is not a great idea when the operation being performed is some variation of linear interpolation in one dimension (time) and for just one data point, as there is nothing really to be parallelized. This choice was made because initially this feature was only used in single-site ClimaLand runs, where all we cared about was to be able to run on GPU. The other day, I realized that I could have GPU compatibility in a much simpler and more robust way by leveraging the `fill!` function. With this commit, 0D interpolation (1D in time, 0D spatially) is changed to be always on the CPU, and the result is written to the Field (or destination in general) using `fill!`. As a result, the CUDA extension is no longer needed.
- Loading branch information
Showing
6 changed files
with
31 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name = "ClimaUtilities" | ||
uuid = "b3f4f4ca-9299-4f7f-bd9b-81e1242a7513" | ||
authors = ["Gabriele Bozzola <[email protected]>", "Julia Sloan <[email protected]>"] | ||
version = "0.1.20" | ||
version = "0.1.21" | ||
|
||
[deps] | ||
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" | ||
|
@@ -21,7 +21,6 @@ ClimaUtilitiesClimaCoreExt = "ClimaCore" | |
ClimaUtilitiesClimaCoreInterpolationsExt = ["ClimaCore", "Interpolations"] | ||
ClimaUtilitiesClimaCoreNCDatasetsExt = ["ClimaCore", "NCDatasets"] | ||
ClimaUtilitiesNCDatasetsExt = "NCDatasets" | ||
ClimaUtilitiesCUDAExt = "CUDA" | ||
ClimaUtilitiesClimaCoreTempestRemapExt = "ClimaCoreTempestRemap" | ||
|
||
[compat] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters