-
Notifications
You must be signed in to change notification settings - Fork 13
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
WIP: Updating package structure: submodules, Julia-fied diagnostics, I/O capabilities #19
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Still need to update T, D, B, C, etc. Still quite a bit of work to go.
Ideally, we would re-use the functions defined in the `Diagnostics` submodule. I need to test JuMP a bit more to figure out the best way to implement this. Can any of the functions be used right out of the box or do they need to be registered? Do they only need to be registered if they are a function of the control variable? Can they be a function of multiple parameters, including a combination of control variables and other (constant) parameters? Can functions w/ operations like `cumsum` be registered and operate within JuMP?
Huge commit. Highlights are: 1. The source code has now been split up into various sub-modules (e.g. Models, Diagnostics, Plotting, IO, etc) which makes a lot of things easier, more efficient, more modular, and more extendable. 2. Each of the diagnostic functions now has *at least* two methods: the first method takes in the numerical values (integers, floats, arrays) that determine the function while the second method takes in a ClimateModel instance (and various boolean options for e.g. turning off individual controls or turning on/off discounting). This makes the code much easier to reach, more flexible, more modular, less prone to typos / bugs. Our hope is that in a future commit these diagnostics can even be **JuMPified** so they can be used directly by the optimization functions. Additionally, some inconsistencies in the ClimateModel struct whereby some model parameters were computed upon instantiation– but were updated if the mutable struct is mutated- have been fixed by splitting parameters into independent parameters (e.g. the feedback parameter) and diagnostic parameters (e.g. the climate sensitivity). 3. Implementation of a straight-forward Input/Output process, where ClimateModel or ClimateModelParameters can be saved and loaded in a nested dictionary format to/from JSON files. This works really well using the JSON2.jl package since Julia's `struct` objects are easily translated into dictionaries, which can easily be written as strings. All of these changes have so far been tested in the default tutorial only, which has also been slightly modified and lengthened (e.g. now includes a section on I/O).
To do list:
Once I've done all of this, I'll probably release v0.1.0 and then starting ramping up the documentation and release v0.2.0 whenever the basics of documentation are finished. |
Closed
Fix CI test
The changes to the source code are minor quality of life changes & a bug fix for the figure labels.
…eMARGO.jl into updating-structure
I've now recreated all of the Drake et al. 2020 figures w/ the new updates to the code base! Should be ready for a new release, assuming all tests pass!
@JuliaRegistrator register() |
Comments on pull requests will not trigger Registrator, as it is disabled. Please try commenting on a commit or issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See comments in past commits for more info.
Tagging @fonsp