-
Notifications
You must be signed in to change notification settings - Fork 19
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 for arbitrary species identifiers. Add Python 3 FortFlex module. #23
base: master
Are you sure you want to change the base?
Conversation
mkrupcale
commented
Mar 14, 2017
- .gitignore: Ignore .cache from Python tests and FortFlex extension modules
- reflexible/conv2netcdf4/flexpart_read.py: Extract the species identifiers metadata from the RELEASES file
- reflexible/conv2netcdf4/fortflex/build_FortFlex.sh: Remove signature file after invoking f2py rather than before so it doesn't accidentally get checked into repo
- reflexible/conv2netcdf4/fortflex/build_FortFlex_py3.sh: Add Python 3 FortFlex module builder
- reflexible/conv2netcdf4/grid_read.py: Accept type np.int64 in instance comparisons for nspec_ret, time_ret and nspec
- reflexible/conv2netcdf4/tests/test_netcdf4_structure.py: Make the range call a little more succinct
- reflexible/flexpart.py: Use the species identifiers in reading the species files
- reflexible/scripts/create_ncfile.py: Use the species identifiers in reading the species files
- reflexible/tests/test_flexpart.py: Update release tests to account for new dictionary structure separating release data and metadata (i.e. species IDs)
- reflexible/tests/test_flexpart.py: Update species tests to more thoroughly test species parameters
* .gitignore: Ignore .cache from Python tests and FortFlex extension modules * reflexible/conv2netcdf4/flexpart_read.py: Extract the species identifiers metadata from the RELEASES file * reflexible/conv2netcdf4/fortflex/build_FortFlex.sh: Remove signature file after invoking f2py rather than before so it doesn't accidentally get checked into repo * reflexible/conv2netcdf4/fortflex/build_FortFlex_py3.sh: Add Python 3 FortFlex module builder * reflexible/conv2netcdf4/grid_read.py: Accept type np.int64 in instance comparisons for nspec_ret, time_ret and nspec * reflexible/conv2netcdf4/tests/test_netcdf4_structure.py: Make the range call a little more succinct * reflexible/flexpart.py: Use the species identifiers in reading the species files * reflexible/scripts/create_ncfile.py: Use the species identifiers in reading the species files * reflexible/tests/test_flexpart.py: Update release tests to account for new dictionary structure separating release data and metadata (i.e. species IDs) * reflexible/tests/test_flexpart.py: Update species tests to more thoroughly test species parameters
#!/bin/bash | ||
|
||
f2py3 -m FortFlex -h FortFlex.pyf FortFlex.f | ||
f2py3 -c --fcompiler=gfortran FortFlex.pyf FortFlex.f |
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 have f2py3 here, using conda I have f2py3.6 which is identical to f2py.
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 upstream, the only difference between f2py
and f2py3
besides their name is which python interpreter executes them (i.e. Python 2 vs. Python 3). Now different distributions will have different interpreter names (in fact, python
which produces f2py
could even be a Python 3 interpreter), and I don't expect this to work for all distributions, but I believe that python3
(which produces f2py3
) is somewhat standard for generic Python 3. An alternative would be to invoke f2py
explicitly using the Python 3 interpreter, but this is inconsistent with the other FortFlex build script and requires some guessing or searching for the name of the Python 3 interpreter (no different than guessing the name of f2py
).
The user is of course not required to use this script to build the Python 3 FortFlex module, but I think this is probably generic enough to work for most users.