A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

pyroms

A collection of tools to process input and output files from the Regional Ocean Modeling System.
https://github.com/ESMG/pyroms

Category: Hydrosphere
Sub Category: Ocean Models

Keywords from Contributors

numerical-modeling oceanography ocean-circulation-models climate-model

Last synced: about 10 hours ago
JSON representation

Repository metadata

Python tools for the Regional Ocean Modeling System (ROMS)

README.md

Pyroms

Welcome to Pyroms!

Pyroms is a collection of tools to process input and output files
from the Regional Ocean Modeling System, ROMS. It was originally
started by Rob Hetland as a googlecode project, then he morphed it
into octant, also at googlecode. Frederic Castruccio then created a
fork and renamed it back to pyroms.

Pyroms is now hosted on GitHub.com in the ESMG/pyroms repository. This version is on the python3 branch. It requires Python 3.4 or later.

Installation

Pyroms is still a bit rough around the edges, particularly with regard to installation. Recent development has been done in Python environments managed by Conda. However Pyroms itself cannot yet be installed with Conda.

If you are starting from scratch, we recommend that you install
Anaconda or
Miniconda and create a Python 3 environment (as of December 2020, version 3.8 is your best bet) for Pyroms and your other scientific software. You should also consider making conda-forge your default channel. See the conda-forge tips and tricks page.

If you don't want to use Conda, that's fine, but you will have to do more of the work yourself.

Prerequisites

The following are required and are all available from Conda-Forge.

The following is optional: Pyroms can be built and run without it but some of the functionality will be missing.

  • scrip, a Python implementation of SCRIP,
    the Spherical Coordinate Remapping and Interpolation Package. This is used by the pyroms
    module. The Python scrip code (a rather old version) is
    bundled in pyroms
    and can be built and installed separately as described below. In future we plan to
    move from the bundled scrip code to a stand-alone package like
    ESMF/ESMPy or
    PySCRIP.

The following is optional and provides high-resolution coastlines for basemap:

Install from source

To clone a copy of the source and install the pyroms packages, you can use the following commands

# Cd to a convenient directory
$ git clone https://github.com/ESMG/pyroms.git
$ pip install -e pyroms/pyroms
$ pip install -e pyroms/pyroms_toolbox
$ pip install -e pyroms/bathy_smoother

This installs three PIP packages with the names pyroms, pyroms_toolbox and bathy_smoother,
each with an eponymous module.

An editable-mode installation is recommended becauses it means changes you make to your copy of the source code will take effect when you import the modules. If you don't want this you can omit the "-e" option

The "pip install" command runs "python setup.py install" (or "python setup.py develop" with the "-e" switch) in each of the subdirectories listed. The "pip install" form is recommended because it allow easy removal (see below)

The above should work on most Linuces and on OSX with the system gcc and gfortran compilers.
They have also been verified to work in a Conda environment on Windows,
provided you install the
m2w64-gcc and m2w64-gfortran compilers.

Install scrip

If you install as above and try to import the three Pyroms modules without having installed
scrip you will get a warning like this:

$ python
Python 3.8.5 | packaged by conda-forge | (default, Aug 29 2020, 01:22:49)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyroms
WARNING:root: scrip could not be imported. Remapping functions will not be available
>>> import pyroms_toolbox
>>> import bathy_smoother

The scrip module is not available via Conda or any other package repository and we are looking at alternatives. In the meantime, scrip can be built and installed from source as follows

# Start in the directory into which you cloned pyroms and cd to the SCRIP
# source directory
$ cd pyroms/pyroms/external/scrip/source/

# Print the location of the active Conda environment (which is called "python38"
# in this case). The active environment location is used to find the netCDF and
# other libraries.
$ conda info | grep "active env location"
    active env location : /home/hadfield/miniconda3/envs/python38

# Run make to build the scrip Python extension and install it into the Conda
# environment. The makefile calculates a variable called SCRIP_EXT_DIR, into
# which it installs the scrip Python extension. If pyroms has been installed
# in editable (development) mode, set the DEVELOP variable to a non-empty value.
$ export PREFIX=/home/hadfield/miniconda3/envs/python38
$ make DEVELOP=1 PREFIX=$PREFIX install
$ mv -vf scrip*.so ../../../pyroms
‘scrip.cpython-38-x86_64-linux-gnu.so’ -> ‘../../../pyroms/scrip.cpython-38-x86_64-linux-gnu.so’

Removal

To remove the three Pyroms packages you can use the "pip uninstall" command, referring to the packages by their package names

# Run from any directory in the same environment as you installed
# and use the package name
$ pip uninstall pyroms
$ pip uninstall pyroms_toolbox
$ pip uninstall bathy_smoother

If you have built and installed the scrip extension from the makefile as above, you can also uninstall it with the makefile. The PREFIX does not need to be set in this case.

# Start in the directory into which you cloned pyroms and cd to the SCRIP
# source directory
$ cd pyroms/pyroms/external/scrip/source/

# Remove with make.
$ make DEVELOP=1 uninstall

Running Pyroms

We have a gridid.txt file that's pointed to by the PYROMS_GRIDID_FILE
environment variable. If you are operating on files containing
sufficient grid information already, you won't need to use this.
An example is provided in the examples directory.

Doxygen

Running "doxygen .doxygen" in any of pyroms, pyroms_toolbox or
bathy_smoother will generate doxygen files. Edit the .doxygen files to
specify html vs. some other output format.


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 7 days ago

Total Commits: 137
Total Committers: 13
Avg Commits per committer: 10.538
Development Distribution Score (DDS): 0.248

Commits in past year: 6
Committers in past year: 3
Avg Commits per committer in past year: 2.0
Development Distribution Score (DDS) in past year: 0.333

Name Email Commits
Kate Hedstrom k****m@a****u 103
Mark Hadfield m****d@n****z 8
Bob r****n@g****m 7
Marc Honnorat m****t@g****m 4
Kate Hedstrom k****e@a****u 3
Raphael Dussin r****n@g****m 3
frederic f****c@m****u 2
JamiePringle j****e@u****u 2
Chuning Wang c****g@e****u 1
dyk dhi d****k@ ****i 1
jkatagi j****a@u****m 1
Michael Dunphy m****y@u****a 1
OKADA Teruhisa o****e 1

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 40
Total pull requests: 17
Average time to close issues: about 2 months
Average time to close pull requests: 4 months
Total issue authors: 31
Total pull request authors: 10
Average comments per issue: 4.48
Average comments per pull request: 0.35
Merged pull request: 14
Bot issues: 0
Bot pull requests: 0

Past year issues: 3
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 3
Past year pull request authors: 0
Past year average comments per issue: 0.67
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/ESMG/pyroms

Top Issue Authors

  • hadfieldnz (7)
  • wjlyx (2)
  • chnrr1 (2)
  • bhattvihang (2)
  • 278blue (1)
  • tjz2026 (1)
  • yiliouc (1)
  • wubizhi (1)
  • lawmana (1)
  • MathewBiddle (1)
  • YoungEnzo (1)
  • han348661657 (1)
  • fdufois (1)
  • dykdhi (1)
  • drf5n (1)

Top Pull Request Authors

  • hadfieldnz (5)
  • raphaeldussin (3)
  • JamiePringle (2)
  • jkatagi (1)
  • honnorat (1)
  • mdunphy (1)
  • lidiabressan (1)
  • okadate (1)
  • ChuningWang (1)
  • dykdhi (1)

Top Issue Labels

Top Pull Request Labels


Package metadata

proxy.golang.org: github.com/ESMG/pyroms

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/ESMG/pyroms#section-documentation
  • Licenses:
  • Latest release: v1.0.0 (published about 5 years ago)
  • Last Synced: 2025-04-26T14:04:02.550Z (1 day ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent packages count: 6.999%
    • Average: 8.173%
    • Dependent repos count: 9.346%
proxy.golang.org: github.com/esmg/pyroms

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/esmg/pyroms#section-documentation
  • Licenses:
  • Latest release: v1.0.0 (published about 5 years ago)
  • Last Synced: 2025-04-26T14:04:02.546Z (1 day ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent packages count: 6.999%
    • Average: 8.173%
    • Dependent repos count: 9.346%

Dependencies

bathy_smoother/setup.py pypi
pyroms/pyroms/setup.py pypi
pyroms/setup.py pypi
pyroms_toolbox/pyroms_toolbox/setup.py pypi
pyroms_toolbox/setup.py pypi

Score: -Infinity