Skip to main content

Python wrapper for the NOAA Environmental Modeling System

Project description

NEMSpy

Python wrapper for the NOAA Environmental Modeling System

tests build

This repository implements the National Unified Operational Prediction Capability (NUOPC).

Usage:

from datetime import timedelta

from nemspy import ModelingSystem
from nemspy.model import ADCIRC, AtmosphericMesh, NationalWaterModel, WaveMesh

# returning interval of main run sequence
interval = timedelta(hours=1)

# model entries
ocean_model = ADCIRC(processors=300, verbose=True, DumpFields=False)
wave_mesh = WaveMesh()
atmospheric_mesh = AtmosphericMesh()
hydrological_model = NationalWaterModel(processors=769, DebugFlag=0)

# instantiate model system with a specified order of execution
nems = ModelingSystem(interval, ocean=ocean_model, wave=wave_mesh, atmospheric=atmospheric_mesh, hydrological=hydrological_model)

# form connections between models using `.connect()`
nems.connect('atmospheric', 'ocean')
nems.connect('wave', 'ocean')
nems.connect('atmospheric', 'hydrological')
nems.connect('wave', 'hydrological')
nems.connect('ocean', 'hydrological')

# write configuration to file
nems.write('nems.configure')

the resulting nems.configure file looks like this:

#############################################
####  NEMS Run-Time Configuration File  #####
#############################################

# EARTH #
EARTH_component_list: ATM WAV OCN HYD
EARTH_attributes::
  Verbosity = min
::

# OCN #
OCN_model:                      adcirc
OCN_petlist_bounds:             0 299
OCN_attributes::
  Verbosity = max
  DumpFields = false
::

# WAV #
WAV_model:                      ww3data
WAV_petlist_bounds:             300 300
WAV_attributes::
  Verbosity = min
::

# ATM #
ATM_model:                      atmesh
ATM_petlist_bounds:             301 301
ATM_attributes::
  Verbosity = min
::

# HYD #
HYD_model:                      nwm
HYD_petlist_bounds:             302 1070
HYD_attributes::
  Verbosity = min
  DebugFlag = 0
::

# Run Sequence #
runSeq::
  @3600
    ATM -> OCN   :remapMethod=redist
    WAV -> OCN   :remapMethod=redist
    ATM -> HYD   :remapMethod=redist
    WAV -> HYD   :remapMethod=redist
    OCN -> HYD   :remapMethod=redist
    OCN
    WAV
    ATM
    HYD
  @
::

Related Repositories:

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nemspy-0.2.2.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

nemspy-0.2.2-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file nemspy-0.2.2.tar.gz.

File metadata

  • Download URL: nemspy-0.2.2.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for nemspy-0.2.2.tar.gz
Algorithm Hash digest
SHA256 6ec30e0491340dd265d771e1bc3e52463c54a52547487fedd5e13d4b7de366fe
MD5 0b1864a6b5156c91e3f730600b39966d
BLAKE2b-256 0d4d6e600deb013624df7e09e526107158466ae7f93de1823c93b1ae6f17bb18

See more details on using hashes here.

Provenance

File details

Details for the file nemspy-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: nemspy-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for nemspy-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2d0c43f9d733df53312f94b1aeb8bec1372369693b5011d4e55e7adad0391859
MD5 d258ca94f97eb64534ce4c288f75640f
BLAKE2b-256 fb17097b6dbe33b523aa86edb6a41bd74baed9229ac8d1df624e362df4070de5

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page