-
Notifications
You must be signed in to change notification settings - Fork 0
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
HiTRes Inversion Options #1
Conversation
Former-commit-id: 524a305f1ef056fe4c3cf35e3448cc9bbc2d83dd
Former-commit-id: 5fb9af139f2ccbf4456310bec3cfc1c394f5ca7d
… and then filters out nans Former-commit-id: f8c10d14bd19cdc7d27df1e8dba8025fa30a690b
…tion Former-commit-id: 4bcea91defcb8ee22b8751248a6edce5397d0e34
Former-commit-id: 631950cf3c895f09883a0cf53a92412ea8cc1c24
…te docstrings Former-commit-id: f3c90bd82ee15c6b49471ff70db24c2560d15314
Former-commit-id: c6643f80a149c87cc7a7b5d91737e9f1920db65e
Former-commit-id: ed627fbb17262fb3ec531e008f76333a3d0fb18e
Former-commit-id: c3dcd444f43274c95e373913c5b52a6b3b6f69b1
Former-commit-id: eb3002b5b40191792e5bb69b4528a09b81876e85
Former-commit-id: 16d65e0c15dfb3e85482d62cb2f0a0b281d2e794
…idusing too much memory Former-commit-id: 364589fc2e9f03760c946b88151db4ac80da2ba1
…ementation Error Former-commit-id: 74f4a969d8f36b18a304d0fe2cdb09cef5bcc47a
Former-commit-id: c4ce8a647bb261234a61f53b21f2e6e743eceed8
Former-commit-id: 55f5e1f86884a72fd98fff75615faed5b4566837
…ng timeseries_HiTRes twice if both are needed Former-commit-id: 20239b5ed277cd9340185d03e2e207a6b5b48fad
Former-commit-id: 478b28e1bf671d2a69589cd377d9b895474be9c3
…c_sensitivity Former-commit-id: c3dbde41bc5b9a8da6f6db8e863e125041dfae47
Former-commit-id: 54231427e57e1dd2dbe4b3daf2072fbe5e50dc9f
…metres Former-commit-id: 6bca8d9bd83937e02b35263d306704e1db242622
Former-commit-id: c82380d405b3a539b02733ca7a15c65fcb8debb4
…tasets Former-commit-id: d68bd5630b911b08abb2d8b16d148b7f5deb7e9c
Former-commit-id: 034688e7f621e6bf95d9b2d2b704396c1dc1c1e4
Former-commit-id: 70b593cd09f815665b938642981ceb816fb1fc9b
Former-commit-id: 15bbfd42ebc93425773a82d2238fad7e92d42c92
Former-commit-id: 0ba832bbdd493e487a3773632777a8fea7ef03c8
…sensitivity Former-commit-id: 6135421929a10633b3dc1bf05fe74c6ab7827226
Former-commit-id: 5331d20abcf7836c9f3030cb6ea78bbeea122f01
Former-commit-id: d5616288860496c459aa1c5ba2c58b2f18239144
Former-commit-id: e8b6316aed360a4aa5068f61d1d7fbee1baa8996
In terms of the inversion, the HiTRes specific processes are only used in the set up i.e. where it calls footprints_data_merge & fp_sensitivity - although I agree that the test coverage for the HiTRes part of name.py is not great |
adjust the start datetime for name.flux_for_HiTRes to only import the required hours back, rather than a whole extra month
add tests for importing HiTRes footprints, and for name.flux_for_HiTRes
initally import data from year before start if start month=1 and HiTRes=True, and then slice to required time range
allow for flexible options of H_backwhen importing fluxes
Ok, but given that this PR is to integrate the HiTRes options into the hbmcmc code it would be useful to have even a very simple example which demonstrates that integration works. Even if we're happy each individual part works it's nice to know that the steps can and do work together. |
split HiTRes tests out where there were multiple asserts in 1 test to ensure all sserts are run if any fail
test that using HiTRes fp with constant flux gives the same as integrated fp with constant flux
this should allow for easier testing
dd46c68
to
a403282
Compare
I haven't added this test as I'm not sure how to write a test to run an inversion without it being very inefficient - from what I could see of the current hbmcmc tests they mostly use a toy model which doesn't use fpdm inputs (I could be wrong though). It would be good to have this merged in so that we could add a version number to the APO paper, I can add an issue that some version of the test should be added later. There are 4 tests failing but these are also failing in develop |
to integrated and HiTRes footprints \ | ||
{integrated:path1, HiTRes:path2}") | ||
return None | ||
fp_directory = join(data_path, 'LPDM/fp_NAME/') if fp_directory is None else fp_directory |
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.
Based on previous code - is it no longer expected that fp_directory
will be a dictionary for 'HiTRes' option?
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've never used a dictionary for it as the HiTRes footprints are stored in the same area as the integrated ones now, do you think it would be better to change the code to make that an option again, or just take out reference to is being a dictionary?
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.
A lot of the code would need changing to use a dictionary for it, and I don't think you'd often have a reason for importing both so I think it would be best just to change the documentation
(The way the footprints are processed now means that the HiTRes code now only needs the HiTRes ones)
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 the question is around backwards compatibility - thinking about it I think the dictionary option was because we used to have to use separate integrated and HiTRes files. If it's not too much work if may be good to allow it to be included as an option? Otherwise, maybe you could just add a comment to say this mode is no longer supported.
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.
Yeah ok I think that's fine - seems like a thing to add to the change log just so we know when the change happened.
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.
Sounds good
I've reviewed this as much as I can given the time constraints and I think this looks really good overall. You're correct that there are currently failing tests in develop anyway so these aren't being influenced by your changes. I think you're right it's best to get this in but as you say if an issue could be added to say that this needs to be tested that would be very helpful. At the very least were there some examples of how this can be run with example inputs etc.? As a group we also should really think about getting this integrated into the |
Thank you Rachel, I appreciate it's a big PR so you'e done a thorough job in the circumstances! I never got to the point of running a HiTRes inversion so I don't have example runs of that, but my APO models rely on some of the other changes to run. Eric has added the HiTRes option to the openghg-inversions code, and is going to make any other changes that need to go in for that. |
Description:
resolves issues #124 & #126
Type of Change:
[ ] Bug fix
[X] New feature
[ ] Code-breaking change
Checklist:
[ ] Code documentation has been updated if needed
[ ] If new tests are needed, they have been added
[X] All tests pass
[X] No merge conflicts
[X] /CHANGELOG.md has been updated if change is significant