-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add find_type_instabilities #961
Conversation
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## master #961 +/- ##
==========================================
- Coverage 85.12% 84.85% -0.28%
==========================================
Files 40 41 +1
Lines 4041 4054 +13
==========================================
Hits 3440 3440
- Misses 601 614 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was getting an error because the values of the dim_dict
are nothing
for the components, so altered the access to data structures ... I think this will work better but need to double check time
I only tried this after running the model, maybe at that point the dims are there? But if we can get this to work without running, even better. |
Interesting, at first I was doing
to get a built model but not run it because the migration model is just so slow, but I also tried it with a run |
src/utils/diagnostics.jl
Outdated
p = typeof(mi.comps_dict[comp].parameters) | ||
d = typeof(NamedTuple(name => (name == :time ? timesteps(clock) : collect(values(dim))) for (name, dim) in dim_dict)) | ||
|
||
tool(f, (p, v, d, Int)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want to put a AbstractTimestep
type ie. Mimi.FixedTimestep{1750, 1, 2300}
in t
to get better results ... I experimented it with it and I think it works well.
We should be able to get that from the clock
or something, that is parameterized by the Timestep type I think, I'll take a look tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davidanthoff looks good, I've tested it quite a bit in practice and it's extremely helpful! Agree on keeping it out of docs and mostly with developers until we're certain the kinks are worked out.
Usage is:
and that will call
code_warntype
on therun_timestep
method for that component.In theory one can also use this with https://github.com/JuliaDebug/Cthulhu.jl by doing
but in practice that doesn't seem to work together with our way of generating these
run_timestep
methods from our macro.I would suggest we don't document this for now and don't consider it part of the "public" API, until we have figured out whether this is actually working well or not. We might also try to get this to work with Cthulhu properly.