-
Notifications
You must be signed in to change notification settings - Fork 14
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
Allow variable-length inputs and outputs #23
base: main
Are you sure you want to change the base?
Conversation
I know this has been here a while, but it's on my list to take a closer look. Superficially it looks fine, but I'm trying to figure out whether the changes have side-effects... Compilation seems fine. Maybe even fewer warnings than before? E.g.,
That could mean (probably means?) we need to update the wrapping, or it could point to a different issue. I'll take a look and see what I can find. |
I've revisited this and I have figured out the updates required on the spacepy side to have this work. Tests pass on my local, modified SpacePy version that uses the present updates. So basically, I don't see any major issues right now on this PR. I will note that the items listed where "it happens in the following parts" are pretty ambiguous. For example, For my notes (for updating SpacePy to accommodate this change): |
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.
frames.html
documents the arguments for many (all) of these subroutines, so the HTML docs should at least be updated to show the correct dimension.
It'd also be nice to have a place where things like this can be recorded, beyond just looking up a PR. Maybe a changelog or explicit release notes would be good. Maybe that's as simple as opening a new issue that describes the subroutines that can't be updated yet and what needs to change so the requirement for ntime_max
can be dropped altogether.
Other than that, this looks good and is long overdue!
…ray sizes on drift_shell routines inputs to be coherent with outputs.
114ed0c
to
10137c7
Compare
…imension everywhere, and updated documentation
So this is a long overdue PR. Significant changes were to be done to the documentation since a lot of interfaces change (hopefully in a backward-compatible manner). What I've done is to remove the mention of NTIME_MAX except in the few routines were they were necessary:
|
Hi @AntoineBrunet, Looks like this PR has a minor conflict with your recently merged docs PR. Once you resolve the |
This PR changes most subroutines inputs and outputs arrays to variable-length array, when possible.
In practice, it means that when
ntime_max
was the last dimension of a parameter array, I replaced it withntime
(if it was a parameter of the routine). This means that:ntime_max
.As a side effect, it fixes bug #21 which has been reported a few times. When
ntime_max
was not the last dimension of the array, such modification would break compatibility, so I did not make the changes. It happens in the following parts:AE8_AP8.f
onera_desp_lib.f
in themake_lstar_shell_splitting
routine due to the alpha dimension (here we could change the constant Nalp to Nipa).LandI2Lstar.f
, for the shell-splitting version of LAndI2Lstar.sgp4_ele.f
AFRL_CRRES_models.f
We should probably think about how to appropriately document these changes in the API. Again, these modification should be compatible with legacy code (I checked with the IDL and python programs in the repository, but of course it does not cover every use case yet).
See issue #
orCloses #
)