Skip to main content

Generate regular or rotated coordinate grid NetCDF files for weather and climate models.

Project description

zonda-rotgrid

Generate regular or rotated coordinate grid NetCDF files for weather and climate models.

This package is used by Zonda for generating a lat-lon grid file that matches the ICON grid.

Installation

pip install zonda-rotgrid

General usage

After installation, you can use the command line tool for generating rotated (create-rotated-grid) or regular (create-latlon-grid) lat/lon grids:

Rotated grid example for EUR-12 domain (using dlon/dlat in degrees)

create-rotated-grid --dlon 0.11 --dlat 0.11 --center_lat -0.77 --center_lon -5.11 --hwidth_lat 22.605 --hwidth_lon 23.265 --pole_lat 39.25 --pole_lon -162.0 --ncells_boundary 0 --output EUR-12_rotated.nc

Rotated grid example (using grid spacing in km)

create-rotated-grid --grid_spacing 12.14 --center_lat -0.77 --center_lon -5.11 --hwidth_lat 24.365 --hwidth_lon 25.025 --pole_lat 39.25 --pole_lon -162 --ncells_boundary 0 --output rotated_grid.nc

Usage

usage: create-rotated-grid [-h] (--grid_spacing GRID_SPACING | --dlon DLON --dlat DLAT) --center_lat CENTER_LAT --center_lon CENTER_LON --hwidth_lat HWIDTH_LAT --hwidth_lon HWIDTH_LON
                           --pole_lat POLE_LAT --pole_lon POLE_LON [--ncells_boundary NCELLS_BOUNDARY] --output OUTPUT

Generate a rotated coordinate grid NetCDF file.

optional arguments:
  -h, --help            show this help message and exit
  --grid_spacing GRID_SPACING
                        Grid spacing in horizontal direction [km]
  --dlon DLON           Grid spacing in longitude direction [degrees]
  --dlat DLAT           Grid spacing in latitude direction [degrees]
  --center_lat CENTER_LAT
                        Center latitude of the domain
  --center_lon CENTER_LON
                        Center longitude of the domain
  --hwidth_lat HWIDTH_LAT
                        Half-width of domain in latitude [degrees]
  --hwidth_lon HWIDTH_LON
                        Half-width of domain in longitude [degrees]
  --pole_lat POLE_LAT   Rotated pole latitude
  --pole_lon POLE_LON   Rotated pole longitude
  --ncells_boundary NCELLS_BOUNDARY
                        Lateral boundary cells to be removed (default: 0)
  --output OUTPUT       Output NetCDF file path

Geographical lat/lon grid example

create-latlon-grid --grid_spacing 12.1 --center_lat 47.0 --center_lon 8.0 --hwidth_lat 12.0 --hwidth_lon 12.0 --ncells_boundary 16 --output latlon_grid.nc

Usage

usage: create-latlon-grid [-h] --grid_spacing GRID_SPACING --center_lat CENTER_LAT --center_lon CENTER_LON --hwidth_lat HWIDTH_LAT --hwidth_lon HWIDTH_LON
                          [--ncells_boundary NCELLS_BOUNDARY] --output OUTPUT

Generate a geographical lat/lon grid NetCDF file.

optional arguments:
  -h, --help            show this help message and exit
  --grid_spacing GRID_SPACING
                        Grid spacing in horizontal direction [km]
  --center_lat CENTER_LAT
                        Center latitude of the domain
  --center_lon CENTER_LON
                        Center longitude of the domain
  --hwidth_lat HWIDTH_LAT
                        Half-width of domain in latitude [degrees]
  --hwidth_lon HWIDTH_LON
                        Half-width of domain in longitude [degrees]
  --ncells_boundary NCELLS_BOUNDARY
                        Lateral boundary cells to be removed (default: 0)
  --output OUTPUT       Output NetCDF file path

License

MIT

Project details


Download files

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

Source Distribution

zonda_rotgrid-0.4.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zonda_rotgrid-0.4.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file zonda_rotgrid-0.4.0.tar.gz.

File metadata

  • Download URL: zonda_rotgrid-0.4.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.18

File hashes

Hashes for zonda_rotgrid-0.4.0.tar.gz
Algorithm Hash digest
SHA256 0531053b37ac7f501d8d6d7d32b34bf04a8d7849a10d7c73655afce9fe137704
MD5 3f9bba4db6d1dd29cdacbbf0cb8011d2
BLAKE2b-256 8d5233b95e87e51c781835f5b2c8fe7ded3cc94f1689c5c362a5a9549ad3a122

See more details on using hashes here.

File details

Details for the file zonda_rotgrid-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: zonda_rotgrid-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.18

File hashes

Hashes for zonda_rotgrid-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c64cc6ca61508bd57df7b827c161dc96ea41a5653bd6c7ed195248a4fd7a8385
MD5 53825bfc4f285c878feaa2fe2c9f6d51
BLAKE2b-256 711b828b7b42d56f9b01230fdb3fc7fac2675d8599129ed42617dbc9305e7777

See more details on using hashes here.

Supported by

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