Skip to content

Commit 8e89e82

Browse files
authored
Remove Regridder module (#1109)
* Remove Regridder module Remove all unused functions from Regridder module. Used functions relocated to Utilities and FieldExchanger modules. Docs and tests appropriately updated. Re-add ClimaUtilities as dependancy after rebase ClimaUtilities needs to be re-added after rebasing, because it is now used for the ouput paths Make suggested changes * Remove date-string conversion functions The strdate_to_datetime and datetime_to_strdate are unused after removing the Regridders module. Additionally, their funcitonality is contained within the Dates package with Dates.format and DateFormats.
1 parent 73dcb28 commit 8e89e82

36 files changed

+329
-1599
lines changed

.buildkite/pipeline.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,6 @@ steps:
6565

6666
- group: "Unit Tests"
6767
steps:
68-
- label: "MPI Regridder unit tests"
69-
key: "regridder_mpi_tests"
70-
command: "srun julia --color=yes --project=test/ test/mpi_tests/regridder_mpi_tests.jl"
71-
timeout_in_minutes: 20
72-
env:
73-
CLIMACOMMS_CONTEXT: "MPI"
74-
NPROCS: 2
75-
agents:
76-
slurm_ntasks: 2
77-
slurm_mem: 16GB
7868

7969
- label: "MPI Checkpointer unit tests"
8070
key: "checkpointer_mpi_tests"

NEWS.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,46 @@ to our output diagnostics using the ClimaDiagnostics interface.
8989
This PR also removes the AMIP paperplots function, but this
9090
functionality is replaced by the generalized `make_plots` function.
9191
92+
93+
#### Remove ClimaCoupler.Regridder module - PR [#1109](https://github.com/CliMA/ClimaCoupler.jl/pull/1109)
94+
This PR removes the Regridder module. Most of the functions that were
95+
inside the module are available in [ClimaUtilities](https://github.com/CliMA/ClimaUtilities.jl/). Some functions were moved
96+
to other modules, and some unused functions were deleted.
97+
98+
The functions:
99+
- `ClimaCoupler.Regridder.dummmy_remap!`
100+
- `ClimaCoupler.Regridder.update_surface_fractions!`
101+
- `ClimaCoupler.Regridder.combine_surfaces!`
102+
- `ClimaCoupler.Regridder.binary_mask`
103+
104+
are now:
105+
- `ClimaCoupler.FieldExchanger.dummmy_remap!`
106+
- `ClimaCoupler.FieldExchanger.update_surface_fractions!`
107+
- `ClimaCoupler.FieldExchanger.combine_surfaces!`
108+
- `ClimaCoupler.Utilities.binary_mask`
109+
110+
The following functions were removed from ClimaCoupler and have an equivalent in [ClimaUtilities](https://github.com/CliMA/ClimaUtilities.jl/tree/main):
111+
112+
- `ClimaCoupler.Regridder.write_to_hdf5`
113+
- `ClimaCoupler.Regridder.read_from_hdf5`
114+
- `ClimaCoupler.Regridder.hdwrite_regridfile_rll_to_cgll`
115+
- `ClimaCoupler.Regridder.reshape_cgll_sparse_to_field!`
116+
- `ClimaCoupler.Regridder.get_time`
117+
118+
Note that the the `hdwrite_regridfile_rll_to_cgll` in [ClimaUtilities](https://github.com/CliMA/ClimaUtilities.jl/tree/main) does not support 3d fields, but the removed function from the Regridder module did.
119+
120+
The following functions were deleted and do not have an equivalent in [ClimaUtilities](https://github.com/CliMA/ClimaUtilities.jl/tree/main):
121+
122+
- `ClimaCoupler.Regridder.remap_field_cgll_to_rll`
123+
- `ClimaCoupler.Regridder.land_fraction`
124+
- `ClimaCoupler.Regridder.combine_surfaces_from_sol!`
125+
- `ClimaCoupler.Regridder.write_datafile_cc`
126+
- `ClimaCoupler.Regridder.read_remapped_field`
127+
- `ClimaCoupler.Regridder.get_coords`
128+
129+
All the above functions can be found in commit
130+
`9e5bf061f34659188485f066bc322c77bcc0f1fa`
131+
92132
#### Remove PostProcessor module - PR [#1022](https://github.com/CliMA/ClimaCoupler.jl/pull/1022)
93133
After switching to use ClimaDiagnostics.jl and ClimaAnalysis.jl
94134
for our diagnostics, the PostProcessor module is not needed.

Project.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,9 @@ version = "0.1.1"
66
[deps]
77
ClimaComms = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d"
88
ClimaCore = "d414da3d-4745-48bb-8d80-42e94e092884"
9-
ClimaCoreTempestRemap = "d934ef94-cdd4-4710-83d6-720549644b70"
109
ClimaUtilities = "b3f4f4ca-9299-4f7f-bd9b-81e1242a7513"
1110
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
12-
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
1311
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
14-
NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
1512
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
1613
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
1714
SurfaceFluxes = "49b00bb7-8bd4-4f2b-b78c-51cd0450215f"
@@ -20,12 +17,9 @@ Thermodynamics = "b60c26fb-14c3-4610-9d3e-2d17fe7ff00c"
2017
[compat]
2118
ClimaComms = "0.5.6, 0.6"
2219
ClimaCore = "0.14.19"
23-
ClimaCoreTempestRemap = "0.3"
2420
ClimaUtilities = "0.1.14"
2521
Dates = "1"
26-
JLD2 = "0.4, 0.5"
2722
Logging = "1"
28-
NCDatasets = "0.11, 0.12, 0.13, 0.14.2"
2923
SciMLBase = "1, 2"
3024
StaticArrays = "1.5"
3125
SurfaceFluxes = "0.11, 0.12"

docs/make.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ interface_pages = [
6262
"fieldexchanger.md",
6363
"fluxcalculator.md",
6464
"interfacer.md",
65-
"regridder.md",
6665
"timemanager.md",
6766
"utilities.md",
6867
]

docs/src/fieldexchanger.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,13 @@ If an `update_field!` function is not defined for a particular component model,
2222
ClimaCoupler.FieldExchanger.update_sim!
2323
ClimaCoupler.FieldExchanger.reinit_model_sims!
2424
ClimaCoupler.FieldExchanger.step_model_sims!
25+
ClimaCoupler.FieldExchanger.update_surface_fractions!
26+
```
27+
28+
## FieldExchanger Internal Functions
29+
30+
```@docs
31+
ClimaCoupler.FieldExchanger.combine_surfaces!
32+
ClimaCoupler.FieldExchanger.dummmy_remap!
33+
ClimaCoupler.FieldExchanger.nans_to_zero
2534
```

docs/src/regridder.md

Lines changed: 0 additions & 35 deletions
This file was deleted.

docs/src/timemanager.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ functions from Julia's [Dates](https://docs.julialang.org/en/v1/stdlib/Dates/) m
88

99
```@docs
1010
ClimaCoupler.TimeManager.current_date
11-
ClimaCoupler.TimeManager.strdate_to_datetime
12-
ClimaCoupler.TimeManager.datetime_to_strdate
1311
ClimaCoupler.TimeManager.trigger_callback
1412
ClimaCoupler.TimeManager.AbstractFrequency
1513
ClimaCoupler.TimeManager.Monthly

docs/src/utilities.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ ClimaCoupler.Utilities.get_device
1313
ClimaCoupler.Utilities.show_memory_usage
1414
ClimaCoupler.Utilities.setup_output_dirs
1515
ClimaCoupler.Utilities.time_to_seconds
16+
ClimaCoupler.Utilities.binary_mask
1617
```

experiments/ClimaCore/Manifest-v1.11.toml

Lines changed: 1 addition & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,6 @@ weakdeps = ["BandedMatrices"]
197197
[deps.BlockArrays.extensions]
198198
BlockArraysBandedMatricesExt = "BandedMatrices"
199199

200-
[[deps.Blosc_jll]]
201-
deps = ["Artifacts", "JLLWrappers", "Libdl", "Lz4_jll", "Zlib_jll", "Zstd_jll"]
202-
git-tree-sha1 = "ef12cdd1c7fb7e1dfd6fa8fd60d4db6bc61d2f23"
203-
uuid = "0b7ba130-8d10-5ba8-a3d6-c5182647fed9"
204-
version = "1.21.6+0"
205-
206200
[[deps.Bzip2_jll]]
207201
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
208202
git-tree-sha1 = "8873e196c2eb87962a2048b3b8e08946535864a1"
@@ -214,12 +208,6 @@ git-tree-sha1 = "389ad5c84de1ae7cf0e28e381131c98ea87d54fc"
214208
uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82"
215209
version = "0.5.0"
216210

217-
[[deps.CFTime]]
218-
deps = ["Dates", "Printf"]
219-
git-tree-sha1 = "5afb5c5ba2688ca43a9ad2e5a91cbb93921ccfa1"
220-
uuid = "179af706-886a-5703-950a-314cd64e0468"
221-
version = "0.1.3"
222-
223211
[[deps.CPUSummary]]
224212
deps = ["CpuId", "IfElse", "PrecompileTools", "Static"]
225213
git-tree-sha1 = "5a97e67919535d6841172016c9530fd69494e5ec"
@@ -303,14 +291,8 @@ git-tree-sha1 = "e1e82d32ba993a18fc760d5cbd7db3bcabd1f3c8"
303291
uuid = "908f55d8-4145-4867-9c14-5dad1a479e4d"
304292
version = "0.4.6"
305293

306-
[[deps.ClimaCoreTempestRemap]]
307-
deps = ["ClimaComms", "ClimaCore", "CommonDataModel", "Dates", "LinearAlgebra", "NCDatasets", "PkgVersion", "TempestRemap_jll"]
308-
git-tree-sha1 = "99845c1da7e9f687180c49cf4d53140f21fc8683"
309-
uuid = "d934ef94-cdd4-4710-83d6-720549644b70"
310-
version = "0.3.18"
311-
312294
[[deps.ClimaCoupler]]
313-
deps = ["ClimaComms", "ClimaCore", "ClimaCoreTempestRemap", "ClimaUtilities", "Dates", "JLD2", "Logging", "NCDatasets", "SciMLBase", "StaticArrays", "SurfaceFluxes", "Thermodynamics"]
295+
deps = ["ClimaComms", "ClimaCore", "ClimaUtilities", "Dates", "Logging", "SciMLBase", "StaticArrays", "SurfaceFluxes", "Thermodynamics"]
314296
path = "../.."
315297
uuid = "4ade58fe-a8da-486c-bd89-46df092ec0c7"
316298
version = "0.1.1"
@@ -393,12 +375,6 @@ git-tree-sha1 = "362a287c3aa50601b0bc359053d5c2468f0e7ce0"
393375
uuid = "5ae59095-9a9b-59fe-a467-6f913c188581"
394376
version = "0.12.11"
395377

396-
[[deps.CommonDataModel]]
397-
deps = ["CFTime", "DataStructures", "Dates", "Preferences", "Printf", "Statistics"]
398-
git-tree-sha1 = "98d64d5b9e5263884276656a43c45424b3a645c2"
399-
uuid = "1fbeeb36-5f17-413c-809b-666fb144f157"
400-
version = "0.3.7"
401-
402378
[[deps.CommonSolve]]
403379
git-tree-sha1 = "0eee5eb66b1cf62cd6ad1b460238e60e4b09400c"
404380
uuid = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2"
@@ -600,12 +576,6 @@ version = "0.6.27"
600576
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
601577
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
602578

603-
[[deps.DiskArrays]]
604-
deps = ["LRUCache", "OffsetArrays"]
605-
git-tree-sha1 = "e0e89a60637a62d13aa2107f0acd169b9b9b77e7"
606-
uuid = "3c3547ce-8d99-4f5e-a174-61eb10b00ae3"
607-
version = "0.4.6"
608-
609579
[[deps.Distributed]]
610580
deps = ["Random", "Serialization", "Sockets"]
611581
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
@@ -1096,12 +1066,6 @@ git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856"
10961066
uuid = "82899510-4779-5014-852e-03e436cf321d"
10971067
version = "1.0.0"
10981068

1099-
[[deps.JLD2]]
1100-
deps = ["FileIO", "MacroTools", "Mmap", "OrderedCollections", "PrecompileTools", "Requires", "TranscodingStreams"]
1101-
git-tree-sha1 = "f1a1c1037af2a4541ea186b26b0c0e7eeaad232b"
1102-
uuid = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
1103-
version = "0.5.10"
1104-
11051069
[[deps.JLLWrappers]]
11061070
deps = ["Artifacts", "Preferences"]
11071071
git-tree-sha1 = "be3dc50a92e5a386872a493a10050136d4703f9b"
@@ -1184,15 +1148,6 @@ git-tree-sha1 = "78211fb6cbc872f77cad3fc0b6cf647d923f4929"
11841148
uuid = "1d63c593-3942-5779-bab2-d838dc0a180e"
11851149
version = "18.1.7+0"
11861150

1187-
[[deps.LRUCache]]
1188-
git-tree-sha1 = "b3cc6698599b10e652832c2f23db3cab99d51b59"
1189-
uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637"
1190-
version = "1.6.1"
1191-
weakdeps = ["Serialization"]
1192-
1193-
[deps.LRUCache.extensions]
1194-
SerializationExt = ["Serialization"]
1195-
11961151
[[deps.LZO_jll]]
11971152
deps = ["Artifacts", "JLLWrappers", "Libdl"]
11981153
git-tree-sha1 = "854a9c268c43b77b0a27f22d7fab8d33cdb3a731"
@@ -1338,12 +1293,6 @@ version = "0.3.29"
13381293
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
13391294
version = "1.11.0"
13401295

1341-
[[deps.Lz4_jll]]
1342-
deps = ["Artifacts", "JLLWrappers", "Libdl"]
1343-
git-tree-sha1 = "abf88ff67f4fd89839efcae2f4c39cbc4ecd0846"
1344-
uuid = "5ced341a-0733-55b8-9ab6-a4889d929147"
1345-
version = "1.10.0+1"
1346-
13471296
[[deps.MKL_jll]]
13481297
deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "oneTBB_jll"]
13491298
git-tree-sha1 = "f046ccd0c6db2832a9f639e2c669c6fe867e5f4f"
@@ -1460,12 +1409,6 @@ version = "0.3.3"
14601409
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
14611410
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
14621411

1463-
[[deps.NCDatasets]]
1464-
deps = ["CFTime", "CommonDataModel", "DataStructures", "Dates", "DiskArrays", "NetCDF_jll", "NetworkOptions", "Printf"]
1465-
git-tree-sha1 = "2c9dc92001ac06d432f363f37ff5552954d9947c"
1466-
uuid = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
1467-
version = "0.14.6"
1468-
14691412
[[deps.NVTX]]
14701413
deps = ["Colors", "JuliaNVTXCallbacks_jll", "Libdl", "NVTX_jll"]
14711414
git-tree-sha1 = "6a6f8bfaa91bb2e40ff562ab9f30dc827741daef"
@@ -1484,12 +1427,6 @@ git-tree-sha1 = "0877504529a3e5c3343c6f8b4c0381e57e4387e4"
14841427
uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
14851428
version = "1.0.2"
14861429

1487-
[[deps.NetCDF_jll]]
1488-
deps = ["Artifacts", "Blosc_jll", "Bzip2_jll", "HDF5_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "OpenMPI_jll", "XML2_jll", "Zlib_jll", "Zstd_jll", "libzip_jll"]
1489-
git-tree-sha1 = "a8af1798e4eb9ff768ce7fdefc0e957097793f15"
1490-
uuid = "7243133f-43d8-5620-bbf4-c2c921802cf3"
1491-
version = "400.902.209+0"
1492-
14931430
[[deps.Netpbm]]
14941431
deps = ["FileIO", "ImageCore", "ImageMetadata"]
14951432
git-tree-sha1 = "d92b107dbb887293622df7697a2223f9f8176fcd"
@@ -1520,12 +1457,6 @@ git-tree-sha1 = "887579a3eb005446d514ab7aeac5d1d027658b8f"
15201457
uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051"
15211458
version = "1.3.5+1"
15221459

1523-
[[deps.OpenBLAS32_jll]]
1524-
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"]
1525-
git-tree-sha1 = "dd806c813429ff09878ea3eeb317818f3ca02871"
1526-
uuid = "656ef2d0-ae68-5445-9ca0-591084a874a2"
1527-
version = "0.3.28+3"
1528-
15291460
[[deps.OpenBLAS_jll]]
15301461
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
15311462
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
@@ -2149,12 +2080,6 @@ weakdeps = ["IntervalArithmetic", "StaticArrays"]
21492080
TaylorSeriesIAExt = "IntervalArithmetic"
21502081
TaylorSeriesSAExt = "StaticArrays"
21512082

2152-
[[deps.TempestRemap_jll]]
2153-
deps = ["Artifacts", "HDF5_jll", "JLLWrappers", "Libdl", "NetCDF_jll", "OpenBLAS32_jll"]
2154-
git-tree-sha1 = "723112218783928a20e0d865932694acfb7a7571"
2155-
uuid = "8573a8c5-1df0-515e-a024-abad257ee284"
2156-
version = "2.2.0+0"
2157-
21582083
[[deps.TensorCore]]
21592084
deps = ["LinearAlgebra"]
21602085
git-tree-sha1 = "1feb45f88d133a655e001435632f019a9a1bcdb6"
@@ -2414,12 +2339,6 @@ git-tree-sha1 = "ccbb625a89ec6195856a50aa2b668a5c08712c94"
24142339
uuid = "c5f90fcd-3b7e-5836-afba-fc50a0988cb2"
24152340
version = "1.4.0+0"
24162341

2417-
[[deps.libzip_jll]]
2418-
deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "OpenSSL_jll", "XZ_jll", "Zlib_jll", "Zstd_jll"]
2419-
git-tree-sha1 = "e797fa066eba69f4c0585ffbd81bc780b5118ce2"
2420-
uuid = "337d8026-41b4-5cde-a456-74a10e5b31d1"
2421-
version = "1.11.2+0"
2422-
24232342
[[deps.nghttp2_jll]]
24242343
deps = ["Artifacts", "Libdl"]
24252344
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"

0 commit comments

Comments
 (0)