Skip to main content

No project description provided

Project description


Logo

GERG Plotting

Data plotting package for GERG
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgments

About The Project

This project was created to streamline and standardize the process of generating plots at GERG.

Built With

Python

Getting Started

There are three ways to get started

  1. Create a fresh virtual environment using your favorite method and install the dependencies
  2. Use an already established virtual environment and install the dependencies

Dependencies

I have provided some commands to install the dependencies using conda but you can use any package manager

List of dependencies:

  • python = 3.12
  • numpy = 2.0.0
  • pandas = 2.2.2
  • matplotlib = 3.9.1
  • xarray = 2024.6.0
  • attrs = 23.2.0
  • netcdf4 = 1.7.1.post1
  • cmocean = 4.0.3
  • scipy = 1.14.0
  • mayavi = 4.8.2

Installation

  1. Activate your virtual environment
  2. Use pip to install pip install gerg_glider

Usage

Plot data at GERG using Python.

Create Histgrams u and v current vectors

import numpy as np
import xarray as xr
import matplotlib.pyplot as plt
from gerg_plotting.Histogram import Histogram
from gerg_plotting.SpatialInstruments import Buoy, Bounds

# Open in the dataset
ds = xr.open_dataset('../test_data/buoy.nc')
# Convert the dataset to pandas dataframe
df = ds[['u','v']].to_dataframe().reset_index()

# Initialize the buoy instrument data container
buoy = Buoy(lat=np.array([21]),
            lon=np.array([-85]),
            depth=df['bin'].to_numpy(),
            time=df['date'].to_numpy(),
            u_current=df['u'].to_numpy(),
            v_current=df['v'].to_numpy())

# Initialize the bounds class
bounds = Bounds(lat_min=18,
                lat_max=24,
                lon_max=-82,
                lon_min=-89,
                depth_bottom=1000,
                depth_top=None)

# Initialize the figure and axes
fig,axes = plt.subplots(nrows=2,figsize = (5,20))
# Initialize the histogram plotter
hist = Histogram(instrument=buoy,bounds=bounds)
# Plot the 1-d histograms for u and v currents
hist.plot(fig=fig,ax=axes[0],var='u_current',bins=100)
hist.plot(fig=fig,ax=axes[1],var='v_current',bins=100)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Alec Krueger - alecmkrueger@tamu.edu

Project Link: https://github.com/alecmkrueger/gerg_plotting

Acknowledgments

  • Alec Krueger, Texas A&M University, Geochemical and Environmental Research Group, alecmkrueger@tamu.edu

(back to top)

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

gerg_plotting-0.0.8.tar.gz (57.3 MB view details)

Uploaded Source

Built Distribution

gerg_plotting-0.0.8-py3-none-any.whl (57.3 MB view details)

Uploaded Python 3

File details

Details for the file gerg_plotting-0.0.8.tar.gz.

File metadata

  • Download URL: gerg_plotting-0.0.8.tar.gz
  • Upload date:
  • Size: 57.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Windows/11

File hashes

Hashes for gerg_plotting-0.0.8.tar.gz
Algorithm Hash digest
SHA256 ed507f8ea8c5cb47c6ac30768a1442c6ff6fd1c6ae75ccbf0d7defaeb909ccaa
MD5 faaf57497413ffeb34bd9a6356dd6509
BLAKE2b-256 c55bfb602805f072e6f14ef8033f16bc50c8415f89321e0b69886fd7208927a1

See more details on using hashes here.

File details

Details for the file gerg_plotting-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: gerg_plotting-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 57.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Windows/11

File hashes

Hashes for gerg_plotting-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 d2077c5deb0417958dc3a0bae368b32aa38813f92be203b9ff50284544fc61bd
MD5 209a3a7e13b23e151e0c68ce4cbc9456
BLAKE2b-256 a76e126b2a2052fe5a62a8d53f0165c2f4b5aed9ff064cabbb0b33ca64ac2d74

See more details on using hashes here.

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