Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove regridding funcs that are in ClimaUtilities #1109

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

imreddyTeja
Copy link
Contributor

@imreddyTeja imreddyTeja commented Dec 5, 2024

Closes #1107
Regridder module removed. The hdwrite_regridfile_rll_to_cgll only works for 2d spaces in ClimaUtilities, and the function in Regridder.jl also worked for 3d spaced, so this functionality is lost.

The functions read_available_dates and yyyymmmddd_to_datetime are copied from ClimaUtilities. This is necessary because land_fraction needs the first date in the dataset. TempestRegridder calls hdwrite_regridfile_rll_to_cgll, which extracts the dates and returns them, but TempestRegridder then discards those extracted dates.

The regridder functions in ClimaUtilities do not work properly when the time dim is made up of numbers, and it errors when the time dim is made up of large floats. To function properly, the time time must be datetimes. The functions in Regridder.jl worked with the time dim as numbers.

Many of the regridding functions in Regridder.jl allowed the outfile_root to be set. When using the TempestRegridder, it is autmatically set to the varname. This results in file with names structured like: "varname_varname_time.hdf5"

Purpose

To-do

  • move Regridder module docs to news.md
  • make changes in ClimaUtilities (time reading, outfile_root, varname to varnames)
    see here
    changes to the time reading probably require a small discussion, and making TempestRegridder support multiple varnames requires enough changes to be a separate issue (implementing would change interface, or would need to continue supporting old interface)
  • Docs differentiate internal vs external functions
  • test for binary mask

Content

  • Regridder module removed (also checked that there is equivalent functionality in ClimaUtilities. If there was not, it is noted)
  • added to NEWS.md

  • I have read and checked the items on the review checklist.

@imreddyTeja imreddyTeja force-pushed the tr/use-ClimaUtilities.Regridders branch 6 times, most recently from bc2c517 to 9432748 Compare December 11, 2024 00:23
Remove all unused functions from Regridder module.
Used functions relocated to Utilities and FieldExchanger
modules. Docs and tests appropriately updated.
ClimaUtilities needs to be re-added after rebasing,
because it is now used for the ouput paths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove functions from Regridder.jl that exist in ClimaUtilities.Regridders
1 participant