CliMA / OceanParameterizations.jl

Machine learning (and uncertainty quantification?) of climate model parameterizations using differentiable (and probabilistic?) programming.
MIT License
21 stars 2 forks source link

Cleaning house and rename actual module to OceanParameterizations #19

Closed ali-ramadhan closed 3 years ago

ali-ramadhan commented 3 years ago

This PR kinda serves as a review of PR #17 and reorganizes the code a bit, mostly trying to separate package/library source code utils and scripts.

I also tried to make the code follow Julia standards a bit more:

  1. Julia modules should be in CamelCase so I renamed the submodules to follow this convention.
  2. I noticed some submodules were including files from other submodules. In general I think each submodule should be self-contained and only include files in its own submodule (but could import stuff from other submodules via using and import).
  3. Structs were generally not strongly typed. This violates two of the Julia performance tips: Avoid fields with abstract types and Avoid fields with abstract containers. I strongly typed those structs in case they're used in performance critical code. This doesn't change how they're used so no breaking changes!

The src/ directory was housing a mix of library function and scripts. I think in general src/ just hosts package of library code, mostly self-contained functions to be used by scripts (which live outside of src/).

Won't merge until wind_mixing/uw_train_NDE.jl works as it before (just need some JLD2 LESbrary.jl data to test) on.

ali-ramadhan commented 3 years ago

Sorry a lot of the docstrings were out of date.

Ah haha still infinitely better than no docstrings :rocket: