{"id":49197876,"url":"https://github.com/nlarsen15/otso","last_synced_at":"2026-04-23T12:03:39.598Z","repository":{"id":122034623,"uuid":"552787116","full_name":"NLarsen15/OTSO","owner":"NLarsen15","description":"Oulu - Open-source geomagneToSphere prOpagation tool","archived":false,"fork":false,"pushed_at":"2025-07-18T10:07:00.000Z","size":15691,"stargazers_count":11,"open_issues_count":1,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-07-18T14:12:51.044Z","etag":null,"topics":["cosmic-rays","fortran","geophysics","magnetosphere","python"],"latest_commit_sha":null,"homepage":"","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NLarsen15.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-10-17T08:21:43.000Z","updated_at":"2025-07-18T10:07:04.000Z","dependencies_parsed_at":"2024-01-15T16:11:28.494Z","dependency_job_id":"ad7dd526-d445-44a0-b60e-683bc0f1de21","html_url":"https://github.com/NLarsen15/OTSO","commit_stats":{"total_commits":29,"total_committers":2,"mean_commits":14.5,"dds":"0.48275862068965514","last_synced_commit":"12a501b9f9a98f51e270745d471f7bebe564d39c"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/NLarsen15/OTSO","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NLarsen15%2FOTSO","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NLarsen15%2FOTSO/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NLarsen15%2FOTSO/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NLarsen15%2FOTSO/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NLarsen15","download_url":"https://codeload.github.com/NLarsen15/OTSO/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NLarsen15%2FOTSO/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32179390,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-23T11:42:27.955Z","status":"ssl_error","status_checked_at":"2026-04-23T11:42:18.877Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cosmic-rays","fortran","geophysics","magnetosphere","python"],"created_at":"2026-04-23T12:03:38.886Z","updated_at":"2026-04-23T12:03:39.586Z","avatar_url":"https://github.com/NLarsen15.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IMPORTANT UPDATE!\nThis version of OTSO is now deprecated. While it still works, we recommend using the new [OTSOpy](https://github.com/NLarsen15/OTSOpy) tool. OTSOpy is a Python package for OTSO that has many improvements and extra functionality in comparison to this initial release. It is available via pip or through the repository, making it significantly easier for users to set up and use.\n\n# OTSO\nOulu - Open-source geomagneToSphere prOpagation tool\n\nOTSO is a geophysics tool used to compute the trajectories of cosmic rays within the Earth's magnetosphere. \nThese computations are used to determine physical values, such as cut-off rigidities and asymptotic cones for locations on the Earth, \nthat are needed by the cosmic ray research community.\nOTSO provides the user with free reign to select from a plethora of input parameters for tests, such as geomagetospheric conditions, \nas well as offering various magnetospheric models to choose from. \n\nOTSO is developed using fortran and python. A knowledge of fortran is not needed to use the tool, however, it is required if the user wishes to edit the internal code of the tool (e.g. to add new magnetosphere models). \n\nOTSO is open-source. Therefore, additions and suggestions from the community are welcome. \n\nThis is a base release for the tool and bugs are to be expected. I ask the community to please inform me of any bugs they may encounter or provide solutions that can be added to the base code of OTSO.\n\nOTSO works on Windows, Linux, and Mac OS. Instructions for installing OTSO on each of these are located below.\n\n## Installation\n\nIn order for OTSO to be installed and operate correctly, one must have a fortran compiler and python installed.\nOTSO has been designed to work alongside the Anaconda python software as this makes OTSO much easier to use.\n\nInstallation instructions for OTSO outside of the Anaconda environment will be provided in the future. \nCurrently Linux is the only OS where OTSO has been reliably installed without the use of Anaconda.\n\n## Current Issues\n\nOTSO is designed around the Anaconda framework and utilises numpy distutils with f2py for compilation. Numpy has moved on from distutils in favor of meson as a compilation tool when using f2py, and this new version of numpy is provided as default in newer anaconda releases. Currently, attempts to compile OTSO with the new numpy and Anaconda have been unsuccessful. A temporary solution is to download an older release of Anaconda with the old numpy distribution included. To do this, go to [the old Anaconda releases repository](https://repo.anaconda.com/archive/) and download an older version of Anaconda. OTSO was developed on the 2022 release, so finding and installing anaconda via the installer labelled `Anaconda3-2022.10` will fix this issue. Ensure that numpy version 1.21.5 is installed.\n\nOnce a successful install of OTSO has been conducted using the new meson f2py the instructions will be added to this repository so users may use whatever version of Anaconda they desire.\n\n## Windows OS\n\nThe easiest way to install OTSO on windows is outlined below.\n\n1. Download and install [Anaconda](https://www.anaconda.com/) on your system.\n\n2. Download and install [MSYS2](https://www.msys2.org/) on your system. To install the fortran compiler follow the steps below.\n   - First enter `pacman -Syu` into the MSYS2 terminal to update the packages\n   - After this is finished MSYS2 will close, open up the terminal again and repeat the first step until no more updates are needed.\n   - To install the fortran compiler, enter `pacman -S --needed base-devel mingw-w64-x86_64-toolchain` into the MSYS2 terminal. Select the default option of `all` when prompted.\n   - To insure gfortran is installed, enter `pacman -S mingw-w64-x86_64-gcc-fortran` into the MSYS2 terminal and run. \n   - The last step for installing the fortran compiler is to add the directory where the `.exe` file for gfortran is to the environment path variables. The file is typically found at `C:\\msys64\\mingw64\\bin`, but this can vary depending on where you decided to install MSYS2. To add this directory to the environment path variables you can follow these [instructions](https://learn.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ee537574(v=office.14)).\n\n3. In order to run on your computer, OTSO needs to be compiled. This can either be done automatically or manually. We suggest using the automatic compilation first and only attempting the manual way if the former method fails.\n\n**Automatic**\n  - Run the `Windows_OTSO_Compiler.cmd` file located within the OTSO folder (the folder containing user manual) downloaded. If the previous steps have been completed correctly this should compile OTSO and it will be usable.\n  - Alternatively, you may instead run the `makefile` using the command `make` within the same terminal if you have make installed on your system. \n\n**Manual**\n  - Open up an anaconda prompt to the Library folder directory.\n  - Compile the library using the command `gfortran -c *Module.f95 *Functions.f95 *.for *.f95 *.f -fPIC` within this anaconda prompt terminal.\n  - Within the same terminal enter `ar cr OTSOlib.a *.o` to create the static library.\n  - Copy all files that end with `.mod` and the `OTSOlib.a` file into the functions folder which can be found in the Parameters folder within the Tool directory.\n  - Find the location of the `f2py-script.py` file on your computer and copy the complete path to this file (it should be located in your anaconda3 directory similar to `c:\\User\\anaconda3\\Scripts\\f2py-script.py`). We recommend copying this path to a `.txt` file within the OTSO folder for future reference. \n  - Open a new anaconda prompt, or change the directory in the already open one, to the Tool folder within OTSO and run the command `python [YOUR F2PY FILE PATH] -c --fcompiler=gnu95 --compiler=mingw32 -m MiddleMan MiddleMan.f95 OTSOlib.a`, replacing [YOUR F2PY FILE PATH] with the path to the `f2py-script.py` file on your computer.\n  - It is also possible to run `f2py -c --fcompiler=gnu95 --compiler=mingw32 -m MiddleMan MiddleMan.f95 OTSOlib.a` instead and the compilations should complete.\n  \n## Linux\n\nEasiest way to install OTSO on Linux is outlined below. Links to online tutorials are provided as well as plain summaries for each step bellow.\nNote OTSO was tested on the Ubuntu OS and the following instructions will be for installing OTSO on this OS. It is possible the use of a different Linux OS could change the installation procedure. \n\n1. Install Gfortran onto your Linux system. Follow these [instructions](https://fortran-lang.org/en/learn/os_setup/install_gfortran/). A Summary is given bellow.\n   - Open a terminal, enter in the command `sudo apt install gfortran` and run.\n   - Gfortran should now be installed on your OS.\n\n2. Install Anaconda on your Linux system. If you are using Ubuntu follow these [instructions](https://www.hostinger.com/tutorials/how-to-install-anaconda-on-ubuntu/). For other Linux OS use the following [instructions](https://docs.anaconda.com/anaconda/install/linux/). \n   - Open a terminal and enter the command `sudo apt-get update` to syncronise all repositories.\n   - Change the directory to /tmp using the command `cd /tmp`\n   - Ensure that wget is installed on your computer. Running `sudo apt-get install wget` within the same terminal will install wget if you don't already have it.\n   - To download the Anaconda installer run the command `wget https://repo.anaconda.com/archive/Anaconda3-2022.05-Linux-x86_64.sh`.\n   - To check the integrity of the package enter `sha256sum Anaconda3-2022.05-Linux-x86_64.sh` into the terminal. If no errors are produced then proceed to the next step.\n   - To install Anaconda run the command `bash Anaconda3-2022.05-Linux-x86_64.sh` in the same terminal.\n   - You will now be prompted to read the licence agreement and accept the terms as well as choose the installation directory. Your home directory should already be selected and it is recommended you select this directory to install Anaconda too.\n   - The installation is now complete. Close the terminal you are using. Future terminals that you open should have `(base)` at the start of the command line, this means that Anaconda is working and that you have access to all the packages within Anaconda.\n\n3. OTSO must now be compiled in order to run. This can be done automatically via the provided bash file or manually.\n\n**Automatic**\n  - Open a terminal to the main OTSO directory (the folder containing user manual) and run the bash `Linux_and_Mac_OTSO_Compiler.sh` file. Enter `bash Linux_and_Mac_OTSO_Compiler.sh` in the terminal and run.\n  - Alternatively, you may instead run the `makefile` using the command `make` within the same terminal if you have make installed on your system. \n\n**Manual**\n  - Open a terminal in the Library folder within OTSO. Enter `gfortran -c *Module.f95 *Functions.f95 *.for *.f95 *.f -fPIC` into the terminal and run.\n  - Next run the command `ar cr OTSOlib.a *.o` in the same terminal.\n  - Copy all files that end with `.mod` and the `OTSOlib.a` file into the functions folder which can be found in the Parameters folder within the Tool directory.\n  - Lastly, open a terminal within the functions folder and run the command `f2py -c -m MiddleMan MiddleMan.f95 OTSOlib.a`\n\n**Without Anaconda**\n1. If Python is not already on your system follow these steps\n  - Enter `sudo apt-get install python` into your terminal to get the latest Python verison installed. (note this will install Python3)\n  - Download the Python3 development tools by entering `sudo apt-get install python3-dev` into the command terminal.\n  - Install the Numpy package needed to use f2py by entering `sudo apt-get install python3-numpy` into the same terminal\n2. Download gfortran onto your linux system by entering `sudo apt-get install gfortran` into your command terminal.\n3. You can then compile OTSO using the same methods outlined above in the manual install instructions, however in the last step you must enter `f2py3 -c -m MiddleMan MiddleMan.f95 OTSOlib.a` instead. If you wish to use the `Linux_and_Mac_OTSO_Compiler.sh` compiler you will need to edit the code slightly. Open the compiler file and change the `f2py` command to `f2py3` the compiler will now work for you if you run it.\n  - You may need to grant your computer permission before you can execute the `Linux_and_Mac_OTSO_Compiler.sh` file. To do this have the terminal open in the directory containing the compiler file and enter `chmod 755`, the file should now be able to run on your system.\n  \n## Mac\n\nEasiest way to install OTSO on Mac is outlined below. Links to online tutorials are provided as well as plain summaries for each step bellow.\nNote OTSO was tested on the Monterey, Ventura, and Sonoma OS releases, as such the following instructions will be for installing OTSO on these versions of Mac OS. It is possible the use of older Mac OS releases could change the installation procedure. \n\n1. Install Anaconda on your Mac system. Follow these [instructions](https://docs.anaconda.com/anaconda/install/mac-os/) to download Anaconda on Mac. The Anaconda installer can be found [here](https://www.anaconda.com/products/distribution#macos).\n\n2. Install Gfortran onto your Mac system using Anaconda. Follow these [instructions](https://anaconda.org/conda-forge/gfortran). A Summary is given bellow.\n   - Open a terminal, enter in the command `conda install conda-forge::gfortran` and run.\n   - Gfortran should now be installed on your OS.\n\n3. OTSO must now be compiled in order to run. This can be done automatically via the provided bash file or manually.\n\n**Automatic**\n  - Open a terminal to the main OTSO directory (the folder containing user manual) and run the bash `Linux_and_Mac_OTSO_Compiler.sh` file. Enter `bash Linux_and_Mac_OTSO_Compiler.sh` in the terminal and run. \n  - Alternatively, you may instead run the `makefile` using the command `make` within the same terminal if you have make installed on your system. \n\n**Manual**\n  - Open a terminal in the Library folder within OTSO. Enter `gfortran -c *Module.f95 *Functions.f95 *.for *.f95 *.f -fPIC` into the terminal and run.\n  - Next run the command `ar cr OTSOlib.a *.o` in the same terminal.\n  - Copy all files that end with `.mod` and the `OTSOlib.a` file into the functions folder which can be found in the Parameters folder within the Tool directory.\n  - Lastly, open a terminal within the Tool folder and run the command `f2py -c -m MiddleMan MiddleMan.f95 OTSOlib.a`\n\n## How to Use\nIf the compilation process has been completed without issue OTSO should now be ready to use. Within the `Tool/Parameters` folder there are python scripts that the user should edit to fit the simulations they wish to conduct (cone_params.py, trajectory_params.py, cutoff_params.py, and planet_params.py), please refer to the OTSO user manual for a more detailed decription. Once the input variables have been edited the user should run the python script in an Anaconda prompt / terminal within the Tool folder directory (e.g. `python Cone.py` will run the cone script used to compute asymptotic cones). Results from OTSO will be stored in a created folder called Results.\n\n## Troubleshooting\n- If there are errors in the compilation step for OTSO double check you have an up to date version of your fortran compiler, this may involve uninstalling your current version and re-instaling from scratch.\n- Another issue you may encounter is a python 2 and python 3 conflict. If you are using python 3 for example f2py may need you to specify python 3 by typing `f2py3` during the compilation process, instead of just `f2py`.\n- (As more issues are found I will endeavour to keep this troubleshooting section up to date with any fixes for potential issues users may encounter)\n\n## Acknowledgments\n**Publication Acknowledgments**\n\nIf you have used OTSO within your work, we kindly ask that you include it in the acknowledgement section of your publication. Two example acknowledgments are provided below depending on if you used the official release on Zenodo or GitHub repository:\n1. \"We acknowledge the use of the OTSO tool, the latest official release of which can be found at [https://doi.org/10.5281/zenodo.7515928](https://doi.org/10.5281/zenodo.7515928)\".\n2. \"We acknowledge the use of the OTSO tool, the GitHub repository of which can be found at [https://github.com/NLarsen15/OTSO](https://github.com/NLarsen15/OTSO)\".\n\n**Community Acknowledgments**\n\nWe would like to acknowledge the use of the fantastic IRBEM library in the development of OTSO, which proved an invaluable asset and greatly sped up development. The latest release of the IRBEM library can be found at [https://doi.org/10.5281/zenodo.6867552](https://doi.org/10.5281/zenodo.6867552.). We would also like to thank N. Tsyganenko for the development of the external magnetic field models and their code which are used within OTSO.\nA wider thanks goes to the space physics community who, through the use of OTSO, provide invaluable feedback, advice on improvements, and bug reporting. All discussions and advice have aided in the continual development and improvement of OTSO, allowing it to fulfil its aim of being a community-driven open-source tool. We express our gratitude to Dr. Christian Steigies of the University of Kiel for creating and generously sharing a custom makefile for OTSO for ease of installation that has been adapted and incorporated into this tool. \n\n## Publications Using OTSO\n- Larsen, N., \u0026 Mishev, A. (2025). Radiation impact of the Halloween GLE events during the October–November 2003 period. Space Weather, 23, e2024SW004199. https://doi.org/10.1029/2024SW004199\n- Mishev, A., \u0026 Larsen, N., Asvestari, E., \u0026 Sáiz, A., et al. (2024). Anisotropic Forbush decrease of 24 March 2024: First look. Advances in Space Research, Volume 74, Issue 8. https://doi.org/10.1016/j.asr.2024.08.027\n- Gil, A., Asvestari, E., Mishev, A. et al. (2024) New Anisotropic Cosmic-Ray Enhancement (ACRE) Event on 5 November 2023 Due to Complex Heliospheric Conditions. Sol Phys 299, 97. https://doi.org/10.1007/s11207-024-02338-3\n- Hayakawa, H., \u0026 Koldobskiy, S., \u0026 Mishev, A., \u0026 Poluianov, S., \u0026 Gil, A., \u0026 Usoskina, I., \u0026 Usoskin., I. (2024). Revision of the strongest solar energetic particle event of 23 February 1956 (GLE #5) based on the rediscovered original records, A\u0026A 684 A46, DOI: 10.1051/0004-6361/202348699\n- Walter, M., Gnebner, C., Heber, B., Herbst, K., Krüger, H., Krüger, H. G., et al. (2024). Measurements of cosmic rays by a mini-neutron monitor at Neumayer III from 2014 to 2017. Space Weather, 22, e2023SW003596. https://doi.org/10.1029/2023SW003596\n- Larsen, N., \u0026 Mishev, A. (2024). Relationship between NM data and radiation dose at aviation altitudes during GLE events. Space Weather, 22, e2024SW003885. https://doi.org/10.1029/2024SW003885\n- Mishev, A., Koldobskiy, S., Larsen, N. et al. (2024). Spectra and Anisotropy of Solar Energetic Protons During GLE #65 on 28 October, 2003 and GLE #66 on 29 October, 2003. Sol Phys 299, 24. https://doi.org/10.1007/s11207-024-02269-z\n- Larsen, N., \u0026 Mishev, A. (2023). Analysis of the ground level enhancement GLE 60 on 15 April 2001, and its space weather effects: Comparison with dosimetric measurements. Space Weather, 21, e2023SW003488. https://doi.org/10.1029/2023SW003488\n- **Larsen, N., Mishev, A., \u0026 Usoskin, I. (2023). A new open-source geomagnetosphere propagation tool (OTSO) and its applications. Journal of Geophysical Research: Space Physics, 128, e2022JA031061. https://doi.org/10.1029/2022JA031061**\n- Mishev, A., Binios, A., Turunen, E. et al. (2022). Measurements of natural radiation with an MDU Liulin type device at ground and in the atmosphere at various conditions in the Arctic region, Radiation Measurements, Volume 154, 106757, ISSN 1350-4487. https://doi.org/10.1016/j.radmeas.2022.106757\n- Mishev, A., Kocharov, L., Koldobskiy, A. et al. (2022) High-Resolution Spectral and Anisotropy Characteristics of Solar Protons During the GLE N∘73 on 28 October 2021 Derived with Neutron-Monitor Data Analysis. Sol Phys 297, 88. https://doi.org/10.1007/s11207-022-02026-0\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlarsen15%2Fotso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnlarsen15%2Fotso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlarsen15%2Fotso/lists"}