-
Notifications
You must be signed in to change notification settings - Fork 13
SIP80/SIP83 Remove multi-site support #92
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
base: master
Are you sure you want to change the base?
Conversation
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 really appreciate your thorough use of validation, checks for exceptions, use of tests, and maintaining backwards compatibility! A am impressed that you can keep all of this logic in your while dissecting and excising this code.
- I am not sure if this was intentionally in this PR vs SIP78 Convert switches to run time options #96, but I think that it is safe to remove the moisture_bwb and moisture_pm functions (that were commented out in this PR). When removing functionality like this I'd just make it clear in the changelog when and why it was done to help facilitate discovery and resurrection in the future for anyone so motivated.
- We discussed deprecating src/utilities/subsetData.c in which case this is just one more reason to do so - although the utility only works for files with one location, it expects there to be a location column and then confirms that there is only one location.
- As suggested on Slack I only skimmed the tests to make sure they make sense!
@@ -0,0 +1,114 @@ | |||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |||
!!! Sipnet parameter files | |||
!!! Modified from the original version by Bill Sacks ([email protected]) |
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.
Is there or should there be a standard set of 'reference' input files (e.g. that we can link to in docs?) I like the idea of such files being used in tests (like this one) to make sure they are up to date.
Also:
!!! Modified from the original version by Bill Sacks ([email protected]) | |
!!! Modified from Bill's version by Mike Longfritz (@Alomir) | |
!!! Modified from the original version by Bill Sacks ([email protected]) |
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 like this idea! I'd go so far as to suggest a /tests/sipnet/reference_inputs
directory for them (or some such) - a central place for a suite of input files. I think this would be best as a separate ticket?
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.
Created issue #102 for this (I put it in with the more general unit test revamp that's needed once this PR gets in)
tools/trim_first_chars
Outdated
@@ -0,0 +1,29 @@ | |||
#!/bin/bash |
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 don't see where this file is used in the codebase - should this function be documented somewhere? should it have a #!/bin/bash
and .sh
extension?
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.
All good questions!
- I wrote (and used) this utility to trim the location columns from a lot of input test files; I thought I'd add it here in case we wanted it for similar use. (I typically don't expect scripts in a
/tools
directory to be used in the codebase directly) - Yep, it should be documented somewhere, though I'm not sure if it would ever be for more than dev use
- And yep, it should have a
.sh
extension. I often don't do that with my own scripts, but that's a personal preference; having the extension is the usual expectation.
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.
Thanks for updating this. Although simple, it seems like it could be a handy utility for someone who wants to update their old files... perhaps mentioning it in release notes would be sufficient?
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.
Done.
src/sipnet/events.c
Outdated
* | 3 | day | day of start of this timestep | Day of year | | ||
* | 4 | event_type | type of event | (e.g., "irrig") | | ||
* | 5...n| event_param| parameters specific to the event type | (varies) | | ||
* | col | parameter | description | units | |
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.
It is great to see Doxygen docs, thank you! However, in this case, the duplicate what is in docs/parameters.md. It seems we should keep a single version that can be cross referenced.
In this specific case, I think that the end user is the key audience and thus one of the docs/*md files might be best (currently parameters.md but I suggested a separate file for inputs & outputs in #99).
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.
Yes, I've been a bit worried about doc duplication; I have a few comments like "see sipnet.h" in sipnet.c for that exact reason.
I agree that this comment block should go in favor of the markdown version, wherever that ends up. We should make sure to specify where that is in the code here.
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.
src/sipnet/sipnet.in
Outdated
@@ -13,7 +13,7 @@ FILENAME = Sites/Niwot/niwot | |||
! FILENAME.clim is the file of climate data for each time step | |||
|
|||
LOCATION = 0 | |||
! Location to run at (-1 means run at all locations) | |||
! LOCATION is obsolete; this value is ignored |
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.
? is this correct?
! LOCATION is obsolete; this value is ignored | |
! LOCATION is obsolete and this value is ignored; maintained for backward compatibility |
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.
Actually, I think this should just get deleted (both here and in /tests/smoke/sipnet.in)
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.
Works for me!
Co-authored-by: David LeBauer <[email protected]>
I meant to un-comment those out before committing - I was only checking here that they actually were not needed. I'd like to restore them here, and let them get dealt with more appropriately in that other ticket
Agreed. If no GSOC person picks that ticket up, I'm likely to do it soon so it stops nagging at me :-)
|
#80
#83
This PR:
*.param
files; the location column is ignored for those filesNote: I replaced
spatialParams.h|c
withmodelParams.h|c
(viagit mv
), but it appears here like a deletion and creation.modelParams
on its ownmodelParams
if anyone wants to suggest something else