Skip to content

Commit

Permalink
Remove Regridder module
Browse files Browse the repository at this point in the history
Remove all unused functions from Regridder module.
Used functions relocated to Utilities and FieldExchanger
modules. Docs and tests appropriately updated.
  • Loading branch information
imreddyTeja committed Dec 10, 2024
1 parent 9042946 commit bc2c517
Show file tree
Hide file tree
Showing 28 changed files with 301 additions and 1,239 deletions.
10 changes: 0 additions & 10 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,6 @@ steps:

- group: "Unit Tests"
steps:
- label: "MPI Regridder unit tests"
key: "regridder_mpi_tests"
command: "srun julia --color=yes --project=test/ test/mpi_tests/regridder_mpi_tests.jl"
timeout_in_minutes: 20
env:
CLIMACOMMS_CONTEXT: "MPI"
NPROCS: 2
agents:
slurm_ntasks: 2
slurm_mem: 16GB

- label: "MPI Checkpointer unit tests"
key: "checkpointer_mpi_tests"
Expand Down
8 changes: 0 additions & 8 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@ version = "0.1.1"
[deps]
ClimaComms = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d"
ClimaCore = "d414da3d-4745-48bb-8d80-42e94e092884"
ClimaCoreTempestRemap = "d934ef94-cdd4-4710-83d6-720549644b70"
ClimaUtilities = "b3f4f4ca-9299-4f7f-bd9b-81e1242a7513"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
SurfaceFluxes = "49b00bb7-8bd4-4f2b-b78c-51cd0450215f"
Expand All @@ -20,12 +16,8 @@ Thermodynamics = "b60c26fb-14c3-4610-9d3e-2d17fe7ff00c"
[compat]
ClimaComms = "0.5.6, 0.6"
ClimaCore = "0.14.19"
ClimaCoreTempestRemap = "0.3"
ClimaUtilities = "0.1.17"
Dates = "1"
JLD2 = "0.4, 0.5"
Logging = "1"
NCDatasets = "0.11, 0.12, 0.13, 0.14.2"
SciMLBase = "1, 2"
StaticArrays = "1.5"
SurfaceFluxes = "0.11, 0.12"
Expand Down
3 changes: 3 additions & 0 deletions docs/src/fieldexchanger.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ If an `update_field!` function is not defined for a particular component model,
ClimaCoupler.FieldExchanger.update_sim!
ClimaCoupler.FieldExchanger.reinit_model_sims!
ClimaCoupler.FieldExchanger.step_model_sims!
ClimaCoupler.FieldExchanger.update_surface_fractions!
ClimaCoupler.FieldExchanger.combine_surfaces!
ClimaCoupler.FieldExchanger.dummmy_remap!
```
54 changes: 36 additions & 18 deletions docs/src/regridder.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,53 @@
# Regridder

This module contains functions to regrid information between spaces.
Many of the functions used in this module call TempestRemap functions
via ClimaCoreTempestRemap wrappers.
This module was removed from ClimaCoupler. Most of the functions that were
inside the module are available in ClimaUtilities. Some functions were moved
to other modules, and some unused functions were deleted.

Information about the TempestRemap library can be found [here](https://github.com/ClimateGlobalChange/tempestremap).
Multiple remapping approaches from TempestRemap have been tested with our
implementation, and information about them is located [here](https://github.com/CliMA/ClimaCoupler.jl/wiki/ClimaCoupler-Lessons-Learned).
## Moved Functions

## Regridder API
The following functions:

```@docs
ClimaCoupler.Regridder.write_to_hdf5
ClimaCoupler.Regridder.read_from_hdf5
```Julia
ClimaCoupler.Regridder.dummmy_remap!
ClimaCoupler.Regridder.remap_field_cgll_to_rll
ClimaCoupler.Regridder.land_fraction
ClimaCoupler.Regridder.update_surface_fractions!
ClimaCoupler.Regridder.combine_surfaces!
ClimaCoupler.Regridder.combine_surfaces_from_sol!
ClimaCoupler.Regridder.binary_mask
```

are now:

## Regridder Internal Functions
```Julia
ClimaCoupler.FieldExchanger.dummmy_remap!
ClimaCoupler.FieldExchanger.update_surface_fractions!
ClimaCoupler.FieldExchanger.combine_surfaces!
ClimaCoupler.Utilities.binary_mask
```

```@docs
ClimaCoupler.Regridder.reshape_cgll_sparse_to_field!
## Deleted Functions

The following functions were removed from ClimaCoupler and have an equivalent in ClimaUtilities:

```Julia
ClimaCoupler.Regridder.write_to_hdf5
ClimaCoupler.Regridder.read_from_hdf5
ClimaCoupler.Regridder.hdwrite_regridfile_rll_to_cgll
ClimaCoupler.Regridder.reshape_cgll_sparse_to_field!
ClimaCoupler.Regridder.get_time
```

Note that the the `hdwrite_regridfile_rll_to_cgll` does not support 3d fields, but the removed function from the Regridder module did.

The following functions were deleted and do not have an equivalent in ClimaUtilities:

```julia
ClimaCoupler.Regridder.remap_field_cgll_to_rll
ClimaCoupler.Regridder.land_fraction
ClimaCoupler.Regridder.combine_surfaces_from_sol!
ClimaCoupler.Regridder.write_datafile_cc
ClimaCoupler.Regridder.binary_mask
ClimaCoupler.Regridder.read_remapped_field
ClimaCoupler.Regridder.get_coords
ClimaCoupler.Regridder.get_time
```

All the above functions can be found in commit
`9e5bf061f34659188485f066bc322c77bcc0f1fa`
1 change: 1 addition & 0 deletions docs/src/utilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ ClimaCoupler.Utilities.get_device
ClimaCoupler.Utilities.show_memory_usage
ClimaCoupler.Utilities.setup_output_dirs
ClimaCoupler.Utilities.time_to_seconds
ClimaCoupler.Utilities.binary_mask
```
128 changes: 1 addition & 127 deletions experiments/ClimaCore/Manifest-v1.11.toml
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,6 @@ weakdeps = ["BandedMatrices"]
[deps.BlockArrays.extensions]
BlockArraysBandedMatricesExt = "BandedMatrices"

[[deps.Blosc_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Lz4_jll", "Zlib_jll", "Zstd_jll"]
git-tree-sha1 = "ef12cdd1c7fb7e1dfd6fa8fd60d4db6bc61d2f23"
uuid = "0b7ba130-8d10-5ba8-a3d6-c5182647fed9"
version = "1.21.6+0"

[[deps.Bzip2_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "8873e196c2eb87962a2048b3b8e08946535864a1"
Expand All @@ -204,12 +198,6 @@ git-tree-sha1 = "389ad5c84de1ae7cf0e28e381131c98ea87d54fc"
uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82"
version = "0.5.0"

[[deps.CFTime]]
deps = ["Dates", "Printf"]
git-tree-sha1 = "5afb5c5ba2688ca43a9ad2e5a91cbb93921ccfa1"
uuid = "179af706-886a-5703-950a-314cd64e0468"
version = "0.1.3"

[[deps.CPUSummary]]
deps = ["CpuId", "IfElse", "PrecompileTools", "Static"]
git-tree-sha1 = "5a97e67919535d6841172016c9530fd69494e5ec"
Expand Down Expand Up @@ -293,14 +281,8 @@ git-tree-sha1 = "e1e82d32ba993a18fc760d5cbd7db3bcabd1f3c8"
uuid = "908f55d8-4145-4867-9c14-5dad1a479e4d"
version = "0.4.6"

[[deps.ClimaCoreTempestRemap]]
deps = ["ClimaComms", "ClimaCore", "CommonDataModel", "Dates", "LinearAlgebra", "NCDatasets", "PkgVersion", "TempestRemap_jll"]
git-tree-sha1 = "99845c1da7e9f687180c49cf4d53140f21fc8683"
uuid = "d934ef94-cdd4-4710-83d6-720549644b70"
version = "0.3.18"

[[deps.ClimaCoupler]]
deps = ["ClimaComms", "ClimaCore", "ClimaCoreTempestRemap", "ClimaUtilities", "Dates", "JLD2", "Logging", "NCDatasets", "SciMLBase", "StaticArrays", "SurfaceFluxes", "Thermodynamics"]
deps = ["ClimaComms", "ClimaCore", "Dates", "Logging", "SciMLBase", "StaticArrays", "SurfaceFluxes", "Thermodynamics"]
path = "../.."
uuid = "4ade58fe-a8da-486c-bd89-46df092ec0c7"
version = "0.1.1"
Expand All @@ -321,28 +303,6 @@ version = "0.7.38"
PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"

[[deps.ClimaUtilities]]
deps = ["Artifacts", "ClimaComms", "Dates"]
git-tree-sha1 = "ae6e4d3223ecb29d3f3d9c5f82b622bae12f3bff"
uuid = "b3f4f4ca-9299-4f7f-bd9b-81e1242a7513"
version = "0.1.19"

[deps.ClimaUtilities.extensions]
ClimaUtilitiesCUDAExt = "CUDA"
ClimaUtilitiesClimaCoreExt = "ClimaCore"
ClimaUtilitiesClimaCoreInterpolationsExt = ["ClimaCore", "Interpolations"]
ClimaUtilitiesClimaCoreNCDatasetsExt = ["ClimaCore", "NCDatasets"]
ClimaUtilitiesClimaCoreTempestRemapExt = "ClimaCoreTempestRemap"
ClimaUtilitiesNCDatasetsExt = "NCDatasets"

[deps.ClimaUtilities.weakdeps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
ClimaCore = "d414da3d-4745-48bb-8d80-42e94e092884"
ClimaCoreTempestRemap = "d934ef94-cdd4-4710-83d6-720549644b70"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"

[[deps.CloseOpenIntervals]]
deps = ["Static", "StaticArrayInterface"]
git-tree-sha1 = "05ba0d07cd4fd8b7a39541e31a7b0254704ea581"
Expand Down Expand Up @@ -383,12 +343,6 @@ git-tree-sha1 = "362a287c3aa50601b0bc359053d5c2468f0e7ce0"
uuid = "5ae59095-9a9b-59fe-a467-6f913c188581"
version = "0.12.11"

[[deps.CommonDataModel]]
deps = ["CFTime", "DataStructures", "Dates", "Preferences", "Printf", "Statistics"]
git-tree-sha1 = "98d64d5b9e5263884276656a43c45424b3a645c2"
uuid = "1fbeeb36-5f17-413c-809b-666fb144f157"
version = "0.3.7"

[[deps.CommonSolve]]
git-tree-sha1 = "0eee5eb66b1cf62cd6ad1b460238e60e4b09400c"
uuid = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2"
Expand Down Expand Up @@ -588,12 +542,6 @@ version = "0.6.22"
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[[deps.DiskArrays]]
deps = ["LRUCache", "OffsetArrays"]
git-tree-sha1 = "e0e89a60637a62d13aa2107f0acd169b9b9b77e7"
uuid = "3c3547ce-8d99-4f5e-a174-61eb10b00ae3"
version = "0.4.6"

[[deps.Distributed]]
deps = ["Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
Expand Down Expand Up @@ -847,11 +795,6 @@ deps = ["Random"]
uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820"
version = "1.11.0"

[[deps.GMP_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d"
version = "6.3.0+0"

[[deps.GPUArraysCore]]
deps = ["Adapt"]
git-tree-sha1 = "83cf05ab16a73219e5f6bd1bdfa9848fa24ac627"
Expand Down Expand Up @@ -904,12 +847,6 @@ git-tree-sha1 = "674ff0db93fffcd11a3573986e550d66cd4fd71f"
uuid = "7746bdde-850d-59dc-9ae8-88ece973131d"
version = "2.80.5+0"

[[deps.GnuTLS_jll]]
deps = ["Artifacts", "GMP_jll", "JLLWrappers", "Libdl", "Nettle_jll", "P11Kit_jll", "Zlib_jll"]
git-tree-sha1 = "383db7d3f900f4c1f47a8a04115b053c095e48d3"
uuid = "0951126a-58fd-58f1-b5b3-b08c7c4a876d"
version = "3.8.4+0"

[[deps.Graphics]]
deps = ["Colors", "LinearAlgebra", "NaNMath"]
git-tree-sha1 = "a641238db938fff9b2f60d08ed9030387daf428c"
Expand Down Expand Up @@ -1089,12 +1026,6 @@ git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856"
uuid = "82899510-4779-5014-852e-03e436cf321d"
version = "1.0.0"

[[deps.JLD2]]
deps = ["FileIO", "MacroTools", "Mmap", "OrderedCollections", "PrecompileTools", "Requires", "TranscodingStreams"]
git-tree-sha1 = "ce5737c0d4490b0e0040b5dc77fbb6a351ddf188"
uuid = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
version = "0.5.8"

[[deps.JLLWrappers]]
deps = ["Artifacts", "Preferences"]
git-tree-sha1 = "be3dc50a92e5a386872a493a10050136d4703f9b"
Expand Down Expand Up @@ -1195,15 +1126,6 @@ git-tree-sha1 = "78211fb6cbc872f77cad3fc0b6cf647d923f4929"
uuid = "1d63c593-3942-5779-bab2-d838dc0a180e"
version = "18.1.7+0"

[[deps.LRUCache]]
git-tree-sha1 = "b3cc6698599b10e652832c2f23db3cab99d51b59"
uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637"
version = "1.6.1"
weakdeps = ["Serialization"]

[deps.LRUCache.extensions]
SerializationExt = ["Serialization"]

[[deps.LZO_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "854a9c268c43b77b0a27f22d7fab8d33cdb3a731"
Expand Down Expand Up @@ -1349,12 +1271,6 @@ version = "0.3.28"
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
version = "1.11.0"

[[deps.Lz4_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "abf88ff67f4fd89839efcae2f4c39cbc4ecd0846"
uuid = "5ced341a-0733-55b8-9ab6-a4889d929147"
version = "1.10.0+1"

[[deps.MKL_jll]]
deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "oneTBB_jll"]
git-tree-sha1 = "f046ccd0c6db2832a9f639e2c669c6fe867e5f4f"
Expand Down Expand Up @@ -1471,12 +1387,6 @@ version = "0.3.3"
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"

[[deps.NCDatasets]]
deps = ["CFTime", "CommonDataModel", "DataStructures", "Dates", "DiskArrays", "NetCDF_jll", "NetworkOptions", "Printf"]
git-tree-sha1 = "2c9dc92001ac06d432f363f37ff5552954d9947c"
uuid = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
version = "0.14.6"

[[deps.NVTX]]
deps = ["Colors", "JuliaNVTXCallbacks_jll", "Libdl", "NVTX_jll"]
git-tree-sha1 = "53046f0483375e3ed78e49190f1154fa0a4083a1"
Expand All @@ -1495,24 +1405,12 @@ git-tree-sha1 = "0877504529a3e5c3343c6f8b4c0381e57e4387e4"
uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
version = "1.0.2"

[[deps.NetCDF_jll]]
deps = ["Artifacts", "Blosc_jll", "Bzip2_jll", "HDF5_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "OpenMPI_jll", "XML2_jll", "Zlib_jll", "Zstd_jll", "libzip_jll"]
git-tree-sha1 = "a8af1798e4eb9ff768ce7fdefc0e957097793f15"
uuid = "7243133f-43d8-5620-bbf4-c2c921802cf3"
version = "400.902.209+0"

[[deps.Netpbm]]
deps = ["FileIO", "ImageCore", "ImageMetadata"]
git-tree-sha1 = "d92b107dbb887293622df7697a2223f9f8176fcd"
uuid = "f09324ee-3d7c-5217-9330-fc30815ba969"
version = "1.1.1"

[[deps.Nettle_jll]]
deps = ["Artifacts", "GMP_jll", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "eca63e3847dad608cfa6a3329b95ef674c7160b4"
uuid = "4c82536e-c426-54e4-b420-14f461c4ed8b"
version = "3.7.2+0"

[[deps.NetworkOptions]]
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
version = "1.2.0"
Expand All @@ -1537,12 +1435,6 @@ git-tree-sha1 = "887579a3eb005446d514ab7aeac5d1d027658b8f"
uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051"
version = "1.3.5+1"

[[deps.OpenBLAS32_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"]
git-tree-sha1 = "dd806c813429ff09878ea3eeb317818f3ca02871"
uuid = "656ef2d0-ae68-5445-9ca0-591084a874a2"
version = "0.3.28+3"

[[deps.OpenBLAS_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
Expand Down Expand Up @@ -1594,12 +1486,6 @@ git-tree-sha1 = "dfdf5519f235516220579f949664f1bf44e741c5"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.6.3"

[[deps.P11Kit_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "2cd396108e178f3ae8dedbd8e938a18726ab2fbf"
uuid = "c2071276-7c44-58a7-b746-946036e04d0a"
version = "0.24.1+0"

[[deps.PCRE2_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15"
Expand Down Expand Up @@ -2170,12 +2056,6 @@ weakdeps = ["IntervalArithmetic", "StaticArrays"]
TaylorSeriesIAExt = "IntervalArithmetic"
TaylorSeriesSAExt = "StaticArrays"

[[deps.TempestRemap_jll]]
deps = ["Artifacts", "HDF5_jll", "JLLWrappers", "Libdl", "NetCDF_jll", "OpenBLAS32_jll"]
git-tree-sha1 = "723112218783928a20e0d865932694acfb7a7571"
uuid = "8573a8c5-1df0-515e-a024-abad257ee284"
version = "2.2.0+0"

[[deps.TensorCore]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "1feb45f88d133a655e001435632f019a9a1bcdb6"
Expand Down Expand Up @@ -2435,12 +2315,6 @@ git-tree-sha1 = "ccbb625a89ec6195856a50aa2b668a5c08712c94"
uuid = "c5f90fcd-3b7e-5836-afba-fc50a0988cb2"
version = "1.4.0+0"

[[deps.libzip_jll]]
deps = ["Artifacts", "Bzip2_jll", "GnuTLS_jll", "JLLWrappers", "Libdl", "XZ_jll", "Zlib_jll", "Zstd_jll"]
git-tree-sha1 = "668ac0297e6bd8f4d53dfdcd3ace71f2e00f4a35"
uuid = "337d8026-41b4-5cde-a456-74a10e5b31d1"
version = "1.11.1+0"

[[deps.nghttp2_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"
Expand Down
Loading

0 comments on commit bc2c517

Please sign in to comment.