-
Notifications
You must be signed in to change notification settings - Fork 1
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 get_stats_path
#230
Labels
enhancement
New feature or request
Comments
bors bot
added a commit
that referenced
this issue
Feb 28, 2022
231: Prep for removing get_stats_path r=charleskawczynski a=charleskawczynski A step towards #230. Co-authored-by: Charles Kawczynski <[email protected]>
4 tasks
bors bot
added a commit
that referenced
this issue
May 3, 2022
331: Store z_obs vector and reference namelist in ReferenceModel. r=ilopezgp a=ilopezgp ## Changes Constructs the vector of observations and reference namelist at ReferenceModel construction time and stores them within the struct. This approach has a number of advantages: - Reduces number of calls to the infamous `get_stats_path`, - Stores observational grid points within ReferenceModel, which enables writing them to the Diagnostics. Right now it was only possible to reconstruct them implicitly based on constant `dz` assumptions, which we want to move away from, - Enables passing non-default grid namelist arguments separately to each ReferenceModel. This allows greater flexibility than the current approach, in which we either calibrated to the default resolution or to a common resolution for all cases. - Removes the need to use `run_reference_SCM`! We retain the function to be able to call TC.jl without calibration, which may be useful. But `run_reference_SCM` is no longer used in the calibration pipeline. - Reduces the time spent in the initialization step. ## Issue number (if applicable) This closes issue #319, and should be a helpful step towards resolving #311 and #230. ## Checklist before requesting a review / merging - [x] I have formatted the code using `julia --project=.dev .dev/climaformat.jl .` - [x] I have updated all test manifests using `julia --project .dev/up_deps.jl .` with Julia 1.7.0. - [x] If core features are added, I have added appropriate test coverage. - [x] If new functions and structs are added, they are documented through docstrings. Co-authored-by: Ignacio Lopez Gomez <[email protected]>
bors bot
added a commit
that referenced
this issue
May 3, 2022
331: Store z_obs vector and reference namelist in ReferenceModel. r=ilopezgp a=ilopezgp ## Changes Constructs the vector of observations and reference namelist at ReferenceModel construction time and stores them within the struct. This approach has a number of advantages: - Reduces number of calls to the infamous `get_stats_path`, - Stores observational grid points within ReferenceModel, which enables writing them to the Diagnostics. Right now it was only possible to reconstruct them implicitly based on constant `dz` assumptions, which we want to move away from, - Enables passing non-default grid namelist arguments separately to each ReferenceModel. This allows greater flexibility than the current approach, in which we either calibrated to the default resolution or to a common resolution for all cases. - Removes the need to use `run_reference_SCM`! We retain the function to be able to call TC.jl without calibration, which may be useful. But `run_reference_SCM` is no longer used in the calibration pipeline. - Reduces the time spent in the initialization step. ## Issue number (if applicable) This closes issue #319, and should be a helpful step towards resolving #311 and #230. ## Checklist before requesting a review / merging - [x] I have formatted the code using `julia --project=.dev .dev/climaformat.jl .` - [x] I have updated all test manifests using `julia --project .dev/up_deps.jl .` with Julia 1.7.0. - [x] If core features are added, I have added appropriate test coverage. - [x] If new functions and structs are added, they are documented through docstrings. Co-authored-by: Ignacio Lopez Gomez <[email protected]>
bors bot
added a commit
that referenced
this issue
May 3, 2022
331: Store z_obs vector and reference namelist in ReferenceModel. r=ilopezgp a=ilopezgp ## Changes Constructs the vector of observations and reference namelist at ReferenceModel construction time and stores them within the struct. This approach has a number of advantages: - Reduces number of calls to the infamous `get_stats_path`, - Stores observational grid points within ReferenceModel, which enables writing them to the Diagnostics. Right now it was only possible to reconstruct them implicitly based on constant `dz` assumptions, which we want to move away from, - Enables passing non-default grid namelist arguments separately to each ReferenceModel. This allows greater flexibility than the current approach, in which we either calibrated to the default resolution or to a common resolution for all cases. - Removes the need to use `run_reference_SCM`! We retain the function to be able to call TC.jl without calibration, which may be useful. But `run_reference_SCM` is no longer used in the calibration pipeline. - Reduces the time spent in the initialization step. ## Issue number (if applicable) This closes issue #319, and should be a helpful step towards resolving #311 and #230. ## Checklist before requesting a review / merging - [x] I have formatted the code using `julia --project=.dev .dev/climaformat.jl .` - [x] I have updated all test manifests using `julia --project .dev/up_deps.jl .` with Julia 1.7.0. - [x] If core features are added, I have added appropriate test coverage. - [x] If new functions and structs are added, they are documented through docstrings. Co-authored-by: Ignacio Lopez Gomez <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
get_stats_path
is a very complicated function for something that should probably be handled by callers in a much simpler way. It seems that, in most cases,get_stats_path
should simply returnjoinpath(dir, "stats", "$case_name.nc")
, and the existence of this file, which is checked in this function, could be checked much earlier.The text was updated successfully, but these errors were encountered: