Skip to main content

Introducing the nc_unpack tool! Simplify NetCDF data extraction and analysis. Explore and unpack NETCDF files effortlessly.

Project description

NetCDF Unpacker

NetCDF Unpacker is a Python library designed to simplify the process of working with NetCDF files containing satellite weather data. With this library, you can easily explore the contents of NetCDF files and extract specific weather variables, making it convenient for data analysis and visualization. NetCDF files are commonly used for storing geospatial and time-series data, including atmospheric and climate data.

Features

  • Variable Information: Explore the available variables in NetCDF files, along with their shapes and attributes.
  • Variable Extraction: Extract specific weather variables from the NetCDF file and create a pandas DataFrame for further analysis.
  • Geospatial Filtering: Specify a location using latitude and longitude and extract data for that specific point.
  • Time Handling: Utilize the time component in NetCDF files to create a time series in the DataFrame.
  • User-Friendly Interface: A user-friendly command-line interface for selecting variables and setting extraction parameters.

Installation

You can install NetCDF Unpacker using pip:

pip install netcdf-unpacker

Usage

1. Initialize NetCDF Unpacker

from netcdf-unpacker import NetCDF_Unpacker
 
# Provide the path to your NetCDF file
nc_unpacker = NetCDF_Unpacker("path_to_your_file.nc")

2. Explore Variable Information

# Get information about the variables in the NetCDF file
nc_unpacker.info()

3. Extract Weather Variables

# Extract weather variables for a specific location and time component
latitude = 40.0  # Your desired latitude
longitude = -75.0  # Your desired longitude
variable_index = 4  # Index of the variable to extract
time_variable = "time"  # The time component variable name
 
# Extract the data and get a DataFrame
weather_data = nc_unpacker.unpack(latitude, longitude, variable_index, time_variable)

4. Analyze and Visualize Data

With the extracted data in a DataFrame, you can now perform data analysis, visualization, and other operations using popular Python libraries such as pandas, matplotlib, and seaborn.

Example

Here's a simple example of extracting and visualizing data from a NetCDF file:

import matplotlib.pyplot as plt
 
# Extract temperature data
temperature_data = nc_unpacker.unpack(latitude, longitude, variable_index, time_variable)
 
# Plot the temperature time series
plt.figure(figsize=(12, 6))
plt.plot(temperature_data["Date"], temperature_data[variable_name])
plt.title(f"Temperature at Lat {latitude}, Lon {longitude}")
plt.xlabel("Date")
plt.ylabel(f"{variable_name}")
plt.grid(True)
plt.show()

Support and Contributions

If you encounter any issues, have suggestions, or would like to contribute to this project, please visit the github repository or reach out to us via mail.

-Ananya Giliyal - giliyal.ananya@gmail.com

-Isha Paranjpe - ishaparanjpe.work@gmail.com

-Mansi Katgire - katgiremansi@gmail.com

-Atishay Gwari - atishay345@gmail.com

License

This library is open-source and available under the MIT License.


NetCDF Unpacker simplifies working with NetCDF files, making it easy to extract and analyze weather data. Give it a try and unlock the potential of your satellite weather data for research, analysis, and visualization.

Project details


Release history Release notifications | RSS feed

This version

1.1

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

netcdf_unpacker-1.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file netcdf_unpacker-1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for netcdf_unpacker-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6d25d58917eb9916f3c200711fbac430fa2ee91b9cbc0880cb5d7d0611c790c9
MD5 ef4f4d407bab4830440496622c7383cf
BLAKE2b-256 ff1bf8e5989bd66dc0ed82d90f2ce3d37fa0485e0ca8f183c077d479664c72a9

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