Skip to content
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

[REVIEW]: PythonicDISORT: A Python reimplementation of the Discrete Ordinate Radiative Transfer package DISORT #6442

Open
editorialbot opened this issue Mar 4, 2024 · 28 comments

Comments

@editorialbot
Copy link
Collaborator

editorialbot commented Mar 4, 2024

Submitting author: @dhjx1996 (Jia Xu Dion Ho)
Repository: https://github.com/LDEO-CREW/Pythonic-DISORT
Branch with paper.md (empty if default branch):
Version: v0.4.2
Editor: @phibeck
Reviewers: @arjunsavel, @simonrp84, @pscicluna
Archive: Pending

Status

status

Status badge code:

HTML: <a href="https://joss.theoj.org/papers/ec19f2796dac7303ea3bd476455b641f"><img src="https://joss.theoj.org/papers/ec19f2796dac7303ea3bd476455b641f/status.svg"></a>
Markdown: [![status](https://joss.theoj.org/papers/ec19f2796dac7303ea3bd476455b641f/status.svg)](https://joss.theoj.org/papers/ec19f2796dac7303ea3bd476455b641f)

Reviewers and authors:

Please avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the target repository and link to those issues (especially acceptance-blockers) by leaving comments in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)

Reviewer instructions & questions

@arjunsavel & @simonrp84 & @pscicluna, your review will be checklist based. Each of you will have a separate checklist that you should update when carrying out your review.
First of all you need to run this command in a separate comment to create the checklist:

@editorialbot generate my checklist

The reviewer guidelines are available here: https://joss.readthedocs.io/en/latest/reviewer_guidelines.html. Any questions/concerns please let @phibeck know.

Please start on your review when you are able, and be sure to complete your review in the next six weeks, at the very latest

Checklists

📝 Checklist for @arjunsavel

📝 Checklist for @simonrp84

@editorialbot
Copy link
Collaborator Author

Hello humans, I'm @editorialbot, a robot that can help you with some common editorial tasks.

For a list of things I can do to help you, just type:

@editorialbot commands

For example, to regenerate the paper pdf after making changes in the paper's md or bib files, type:

@editorialbot generate pdf

@editorialbot
Copy link
Collaborator Author

Reference check summary (note 'MISSING' DOIs are suggestions that need verification):

OK DOIs

- 10.1364/AO.27.002502 is OK
- 10.1109/WHISPERS.2014.8077573 is OK
- 10.1093/mnras/111.4.377 is OK

MISSING DOIs

- None

INVALID DOIs

- https://doi.org/10.1016/S0098-3004(97)00130-1 is INVALID because of 'https://doi.org/' prefix
- https://doi.org/10.1175/1520-0477(1998)079<2101:SARATS>2.0.CO;2 is INVALID because of 'https://doi.org/' prefix

@editorialbot
Copy link
Collaborator Author

Software report:

github.com/AlDanial/cloc v 1.90  T=0.10 s (643.9 files/s, 445267.2 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Fortran 77                       8           2738           8727           8640
Jupyter Notebook                24              0          11827           5269
Python                          14            517            657           2423
Fortran 90                       1            508            128           2043
Markdown                         5             77              0            324
YAML                             4             13             22            118
TeX                              1              5              0             73
TOML                             1              3              0             31
DOS Batch                        1              8              1             26
reStructuredText                 2             11             18             13
make                             2              7              8             12
Bourne Shell                     1              1              6              6
-------------------------------------------------------------------------------
SUM:                            64           3888          21394          18978
-------------------------------------------------------------------------------

Commit count by author:

   134	Dion Ho Jia Xu
     7	Dion Ho JX
     6	Robert Pincus
     4	Maths2209

@editorialbot
Copy link
Collaborator Author

Paper file info:

📄 Wordcount for paper.md is 1036

✅ The paper includes a Statement of need section

@editorialbot
Copy link
Collaborator Author

License info:

✅ License found: MIT License (Valid open source OSI approved license)

@editorialbot
Copy link
Collaborator Author

👉📄 Download article proof 📄 View article proof on GitHub 📄 👈

@phibeck
Copy link

phibeck commented Mar 4, 2024

@dhjx1996 as reported above by editorialbot, there are two references with invalid DOIs. When you have a moment, please fix these, thanks

@arjunsavel
Copy link

arjunsavel commented Mar 4, 2024

Review checklist for @arjunsavel

Conflict of interest

  • I confirm that I have read the JOSS conflict of interest (COI) policy and that: I have no COIs with reviewing this work or that any perceived COIs have been waived by JOSS for the purpose of this review.

Code of Conduct

General checks

  • Repository: Is the source code for this software available at the https://github.com/LDEO-CREW/Pythonic-DISORT?
  • License: Does the repository contain a plain-text LICENSE or COPYING file with the contents of an OSI approved software license?
  • Contribution and authorship: Has the submitting author (@dhjx1996) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?
  • Substantial scholarly effort: Does this submission meet the scope eligibility described in the JOSS guidelines
  • Data sharing: If the paper contains original data, data are accessible to the reviewers. If the paper contains no original data, please check this item.
  • Reproducibility: If the paper contains original results, results are entirely reproducible by reviewers. If the paper contains no original results, please check this item.
  • Human and animal research: If the paper contains original data research on humans subjects or animals, does it comply with JOSS's human participants research policy and/or animal research policy? If the paper contains no such data, please check this item.

Functionality

  • Installation: Does installation proceed as outlined in the documentation?
  • Functionality: Have the functional claims of the software been confirmed?
  • Performance: If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)

Documentation

  • A statement of need: Do the authors clearly state what problems the software is designed to solve and who the target audience is?
  • Installation instructions: Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.
  • Example usage: Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).
  • Functionality documentation: Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?
  • Automated tests: Are there automated tests or manual steps described so that the functionality of the software can be verified?
  • Community guidelines: Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support

Software paper

  • Summary: Has a clear description of the high-level functionality and purpose of the software for a diverse, non-specialist audience been provided?
  • A statement of need: Does the paper have a section titled 'Statement of need' that clearly states what problems the software is designed to solve, who the target audience is, and its relation to other work?
  • State of the field: Do the authors describe how this software compares to other commonly-used packages?
  • Quality of writing: Is the paper well written (i.e., it does not require editing for structure, language, or writing quality)?
  • References: Is the list of references complete, and is everything cited appropriately that should be cited (e.g., papers, datasets, software)? Do references in the text use the proper citation syntax?

@dhjx1996
Copy link

dhjx1996 commented Mar 4, 2024

@dhjx1996 as reported above by editorialbot, there are two references with invalid DOIs. When you have a moment, please fix these, thanks

I have fixed these and pushed the changes.

@phibeck
Copy link

phibeck commented Mar 5, 2024

@editorialbot check references

@editorialbot
Copy link
Collaborator Author

Reference check summary (note 'MISSING' DOIs are suggestions that need verification):

OK DOIs

- 10.1364/AO.27.002502 is OK
- 10.1109/WHISPERS.2014.8077573 is OK
- 10.1016/S0098-3004(97)00130-1 is OK
- 10.1175/1520-0477(1998)079<2101:SARATS>2.0.CO;2 is OK
- 10.1093/mnras/111.4.377 is OK

MISSING DOIs

- None

INVALID DOIs

- None

@simonrp84
Copy link

simonrp84 commented Mar 5, 2024

Review checklist for @simonrp84

Conflict of interest

  • I confirm that I have read the JOSS conflict of interest (COI) policy and that: I have no COIs with reviewing this work or that any perceived COIs have been waived by JOSS for the purpose of this review.

Code of Conduct

General checks

  • Repository: Is the source code for this software available at the https://github.com/LDEO-CREW/Pythonic-DISORT?
  • License: Does the repository contain a plain-text LICENSE or COPYING file with the contents of an OSI approved software license?
  • Contribution and authorship: Has the submitting author (@dhjx1996) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?
  • Substantial scholarly effort: Does this submission meet the scope eligibility described in the JOSS guidelines
  • Data sharing: If the paper contains original data, data are accessible to the reviewers. If the paper contains no original data, please check this item.
  • Reproducibility: If the paper contains original results, results are entirely reproducible by reviewers. If the paper contains no original results, please check this item.
  • Human and animal research: If the paper contains original data research on humans subjects or animals, does it comply with JOSS's human participants research policy and/or animal research policy? If the paper contains no such data, please check this item.

Functionality

  • Installation: Does installation proceed as outlined in the documentation?
  • Functionality: Have the functional claims of the software been confirmed?
  • Performance: If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)

Documentation

  • A statement of need: Do the authors clearly state what problems the software is designed to solve and who the target audience is?
  • Installation instructions: Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.
  • Example usage: Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).
  • Functionality documentation: Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?
  • Automated tests: Are there automated tests or manual steps described so that the functionality of the software can be verified?
  • Community guidelines: Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support

Software paper

  • Summary: Has a clear description of the high-level functionality and purpose of the software for a diverse, non-specialist audience been provided?
  • A statement of need: Does the paper have a section titled 'Statement of need' that clearly states what problems the software is designed to solve, who the target audience is, and its relation to other work?
  • State of the field: Do the authors describe how this software compares to other commonly-used packages?
  • Quality of writing: Is the paper well written (i.e., it does not require editing for structure, language, or writing quality)?
  • References: Is the list of references complete, and is everything cited appropriately that should be cited (e.g., papers, datasets, software)? Do references in the text use the proper citation syntax?

@phibeck
Copy link

phibeck commented Mar 18, 2024

@arjunsavel, @simonrp84 & @pscicluna, thanks again for reviewing! Just checking in on your review. Please let me know if you have any questions about the process. Feel free to create issues in project repository directly or write them down as comments here, but please do link the issues in this review so it's easy to follow for everyone. @pscicluna, please go ahead and create your checklist first using the command @editorialbot generate my checklist.

@phibeck
Copy link

phibeck commented Apr 1, 2024

@arjunsavel, @simonrp84 & @pscicluna let me know if there is anything stopping you from starting your reviews. We aim for a publication time of ~3 months, so it is ideal if reviewers can complete their review in 4-6 weeks.

@arjunsavel
Copy link

Thank you for your patience. I’ve finished my review of the PythonicDISORT package. It’s an excellent piece of work that has clear utility in both pedagogical and research contexts.

My comments are below. Provided they’re addressed, I recommend this project for acceptance.

Miscellaneous

  • This seems like quite a large GitHub repo. I believe 695 MB?
    • Could some of the size be cut down by trimming notebook histories? And evaluate the notebooks on the fly?
  • The benefit of downloading the optional dependencies is not immediately apparent.
  • No community guidelines. Maybe make a contributing.md?
  • Really impressive set of notebooks!
  • Thoughts on including polarization?

Code edits

  • Could you please add function documentation in _one_Fourier_mode? For each argument?
  • Same with _loop_and_assemble_results. Even though these aren’t ever accessed directly, documenting these makes for easier contributor / developer experience.
  • pydisort is a bit of a long function and could likely be modularized. Is it implemented this way to be more one-to-one with the original fortran? Either way, this isn’t something that gets in the way of acceptance — I’m mostly just curious.
  • Some code could maybe be vectorized — e.g. in src/PythonicDISORT/_diagonalize.py. Again, not required for acceptance.
  • Could you add a more descriptive docstring to _assemble_solution_functions?

Paper edits

  • Can we get definitions of the terms in the equations?
  • Are omega and D functions of tau?
  • You mention computational reasons…are those temporary? Is speed optimization a future goal, e.g., with numba, or Jax, or python? Or even joblib for parallelization? If you end up using Jax, you could replace your autograd usage with jax.
  • Is “comprehensive documentation” meant to be hyperlinked?
  • Widely used —> widely used,
  • Please cite numpy, scipy, Jupyter notebook
  • Please hyperlink GitHub and pypi for your specific thing
  • Any citations for the applications?
  • What about other pythonic radiative transfer codes?
  • Nice clearly written statement of need!

Documentation

  • Please also include the installation instructions here.

@phibeck
Copy link

phibeck commented Apr 18, 2024

Thank you @arjunsavel for the update on your review! @dhjx1996, feel free to get started working on the comments and issues raised by the reviewer.

@simonrp84 & @pscicluna please let me know if you have any questions or if you need more time for your reviews, thanks.

@dhjx1996
Copy link

dhjx1996 commented Apr 29, 2024

@arjunsavel Thank you very much for the review. I greatly appreciate the feedback and praise. Here are my updates with respect to your feedback:

Thank you for your patience. I’ve finished my review of the PythonicDISORT package. It’s an excellent piece of work that has clear utility in both pedagogical and research contexts.

My comments are below. Provided they’re addressed, I recommend this project for acceptance.

Miscellaneous

  • This seems like quite a large GitHub repo. I believe 695 MB?

    • Could some of the size be cut down by trimming notebook histories? And evaluate the notebooks on the fly?

The repository's large size is due to the .npz files for the pytest reference solutions. I have reduced the $\tau$ test points to exactly those used in the DISORT tests (disotest.f90) and the repository is now 140 MB. Let me know if this size reduction is sufficient.

  • The benefit of downloading the optional dependencies is not immediately apparent.

Made changes to README.md.

  • No community guidelines. Maybe make a contributing.md?

Added.

  • Really impressive set of notebooks!
  • Thoughts on including polarization?

It is not a priority especially since the feature is not in DISORT, but as a rule I am happy to add features to PythonicDISORT.

Code edits

  • Could you please add function documentation in _one_Fourier_mode? For each argument?
  • Same with _loop_and_assemble_results. Even though these aren’t ever accessed directly, documenting these makes for easier contributor / developer experience.

I have improved the documentation in every module.

  • pydisort is a bit of a long function and could likely be modularized. Is it implemented this way to be more one-to-one with the original fortran? Either way, this isn’t something that gets in the way of acceptance — I’m mostly just curious.

This is caused by the length of the NT correction functions. I can modularize the NT corrections but I am currently disinclined to that change since it would be a major deviation from DISORT wherein NT corrections are under-the-hood and always performed if possible.

  • Some code could maybe be vectorized — e.g. in src/PythonicDISORT/_diagonalize.py. Again, not required for acceptance.

Yes, and I have and will continue to optimize the code. As of v0.7.0, however, I believe every expensive operation (e.g. diagonalization) is vectorized and no longer in Python for-loops.

  • Could you add a more descriptive docstring to _assemble_solution_functions?

Added.

Paper edits

  • Can we get definitions of the terms in the equations?

Added.

  • Are omega and D functions of tau?

No. I added clarifications.

  • You mention computational reasons…are those temporary? Is speed optimization a future goal, e.g., with numba, or Jax, or python? Or even joblib for parallelization? If you end up using Jax, you could replace your autograd usage with jax.

Speed optimization has been and remains a goal, but it is impossible for the Python-based PythonicDISORT to match the FORTRAN-based DISORT in speed. I have attempted parallelization with joblib but the overhead actually results in a net slow down for all practical use cases. I am disinclined to use numba or Jax because they diminish the main advantage of PythonicDISORT which is its ease of use and installation. In fact, I have a guideline in CONTRIBUTING.md stating that "PythonicDISORT should remain system agnostic and installable through a simple pip install command. If your contributions have dependencies, they should be similarly accessible and easy to install."

  • Is “comprehensive documentation” meant to be hyperlinked?
  • Widely used —> widely used,
  • Please cite numpy, scipy, Jupyter notebook
  • Please hyperlink GitHub and pypi for your specific thing

These changes made been made.

  • Any citations for the applications?

Unfortunately I am not aware of any published applications at the moment (PythonicDISORT is quite new). At least two of the projects which are using PythonicDISORT are close to publication, however, and if they are published before this then I will add the citations.

  • What about other pythonic radiative transfer codes?

They are Python wrappers around DISORT. I have added two citations into the paper.

  • Nice clearly written statement of need!

Documentation

  • Please also include the installation instructions here.

Added.

@dhjx1996
Copy link

@editorialbot check references

@editorialbot
Copy link
Collaborator Author

Reference check summary (note 'MISSING' DOIs are suggestions that need verification):

OK DOIs

- 10.1038/s41592-019-0686-2 is OK
- 10.1038/s41586-020-2649-2 is OK
- 10.1364/AO.27.002502 is OK
- 10.1109/WHISPERS.2014.8077573 is OK
- 10.1016/S0098-3004(97)00130-1 is OK
- 10.1175/1520-0477(1998)079<2101:SARATS>2.0.CO;2 is OK
- 10.1093/mnras/111.4.377 is OK

MISSING DOIs

- No DOI given, and none found for title: Jupyter Notebooks – a publishing format for reprod...
- No DOI given, and none found for title: Radiative Transfer
- No DOI given, and none found for title: pyRT_DISORT: A pre-processing front-end to help ma...
- No DOI given, and none found for title: pyDISORT
- No DOI given, and none found for title: LLLab disort website

INVALID DOIs

- None

@dhjx1996
Copy link

@editorialbot generate pdf

@editorialbot
Copy link
Collaborator Author

👉📄 Download article proof 📄 View article proof on GitHub 📄 👈

@dhjx1996
Copy link

@phibeck @simonrp84 @arjunsavel @pscicluna The latest version of PythonicDISORT is now v0.7.0. This has been released on GitHub and on PyPI.

@dhjx1996
Copy link

Reference check summary (note 'MISSING' DOIs are suggestions that need verification):

OK DOIs

- 10.1038/s41592-019-0686-2 is OK
- 10.1038/s41586-020-2649-2 is OK
- 10.1364/AO.27.002502 is OK
- 10.1109/WHISPERS.2014.8077573 is OK
- 10.1016/S0098-3004(97)00130-1 is OK
- 10.1175/1520-0477(1998)079<2101:SARATS>2.0.CO;2 is OK
- 10.1093/mnras/111.4.377 is OK

MISSING DOIs

- No DOI given, and none found for title: Jupyter Notebooks – a publishing format for reprod...
- No DOI given, and none found for title: Radiative Transfer
- No DOI given, and none found for title: pyRT_DISORT: A pre-processing front-end to help ma...
- No DOI given, and none found for title: pyDISORT
- No DOI given, and none found for title: LLLab disort website

INVALID DOIs

- None

@phibeck Regarding the missing DOIs, these are all references to packages. The one exception is the book "Radiative Transfer" by Chandrasekhar (1960) for which I could not find a DOI.

@simonrp84
Copy link

Apologies for the delay in reviewing - I have been more busy than expected recently. I will submit my review later this week.

@simonrp84
Copy link

This is a very interesting library, thanks for creating it! Unfortunately I cannot test all of the code due to a missing module, for which I've created a github issue. This module is included in the github repo, but the docs do not describe how to install it.

I agree with @arjunsavel's comments on the manuscript and library, so please address all of those. In addition, I have some other points to raise - which are listed below.

Paper comments:

  • The software paper is well-written. However, I miss a brief introduction (one or two sentences) as to why an RT code is needed.

  • Throughout the paper there are various terms that are not introduced. For example, theta (line 9). Even though it's usually clear what these terms are from the context I think the terms should be explicitly introduced. From personal experience, different DISORT users have different interpretations of geometry terms, so being clear would be very helpful here.

  • Same for I_0 and mu_0, which are also undefined.

  • Line 33: ODE is not introduced.

  • Line 46: "projects which" should be "projects that"

  • General paper comment, I see some places where "we" is used (f.ex line 47: "We will continue...") this seems odd for a single-author paper. Either there should be more authors, or "we" is inappropriate. Can you please clarify this in the text and / or repository.

Code/repo comments:

  • It looks like the code in the ./disort4.0.99_f2py/ directory is based on code from elsewhere...does that affect the license?

  • The git repo is huge (~140Mb) compared to the size of the source code (~2.5Mb). I presume this is a remnant to the tidying that the other reviewer recommended. Can you do clean up the history to reduce this file size?

  • For the docs, could you also add a statement saying that the notebook should be used as an example? This is mentioned in the readme but not, as far as I can see, in the docs themselves.

  • The notebook in the docs folder is very comprehensive and nicely introduces the various concepts and uses of the library, great work!

  • I do miss a simple example, though. The notebook is somewhat overwhelming for a newbie. Would it be possible to add a notebook demonstrating some simple use of DISORT? Maybe simulating the signal for an airborne or spaceborne sensor, the effect of Rayleigh scattering, or something like that? I note in this context the reviewer checklist item: "Do the authors include examples of how to use the software (ideally to solve real-world analysis problems)."

I've ticked the appropriate boxes in the reviewer checklist, and will await an author response before going further. Sorry again for my long delay in performing this review.

@dhjx1996
Copy link

dhjx1996 commented May 1, 2024

@simonrp84 Thank you very much for the review! I will address the most urgent matters and follow-up on the rest later this week.

This is a very interesting library, thanks for creating it! Unfortunately I cannot test all of the code due to a missing module, for which I've created a github issue. This module is included in the github repo, but the docs do not describe how to install it.

  • It looks like the code in the ./disort4.0.99_f2py/ directory is based on code from elsewhere...does that affect the license?

disort4.0.99 is the original FORTRAN-based DISORT that PythonicDISORT reimplements in Python. disort4.0.99_f2py is disort4.0.99 but with a Python-wrapper added by me. The missing module is this Python-wrapped DISORT. The test notebooks require it as they run both DISORT and PythonicDISORT to compare their results. I included disort4.0.99_f2py in my repository for this reason, but installation of disort4.0.99_f2py is system-dependent and users will have to independently install FORTRAN compilers. Note that running pytest in the pydisotest directory bypasses the need for DISORT since I have saved its results in .npz files, but the test notebooks are how I generate those .npz files.

I see two possibilities going forward:

  1. Make very clear to users that they should not expect the disort (Python-wrapped DISORT) module to work. I can also document how I installed it, but I am concerned about causing more confusion as my installation experience is unlikely to be universal.
  2. Remove disort4.0.99_f2py and remove all references to disort. This would prevent confusion with that module and prevent licensing issues (does its inclusion cause licensing issues @phibeck ?) but would cause the reference solutions for the tests (solutions from DISORT) to be harder to reproduce.

I am currently inclined towards 2) as it would also reduce the size of the repository, but feedback on this would be appreciated.

  • The git repo is huge (~140Mb) compared to the size of the source code (~2.5Mb). I presume this is a remnant to the tidying that the other reviewer recommended. Can you do clean up the history to reduce this file size?

Minor remark: I have already cleaned the history using git-filter-repo but I will look into how to further reduce the size of the repository.

@dhjx1996
Copy link

dhjx1996 commented May 3, 2024

As a follow-up to my previous comment, I will revamp the current test notebooks into examples for users and remove disort4.0.99_f2py and all references to the disort module to avoid licensing issues. I may make some changes to how the tests are conducted but there will still be automated tests at the very least. I will update on this and on the other points raised by @simonrp84 as soon as possible.

@phibeck
Copy link

phibeck commented May 6, 2024

Hi @dhjx1996 I think this is a good idea to avoid licensing issues, although the details of such potential issues would probably depend on the license of DISORT. It seems sensible to me to remove the module and just provide the reference solutions as benchmarks. Of course that requires that the author(s) of PythonicDISORT keep this data up-to-date.

Thanks @simonrp84 for getting your review started! @pscicluna please let me know if you have any question about the review process or if you need more time as ideally we'd like to finish the review within 4-6 weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants