TSYS-AIOS-GIS-Tools-Weather-Base Container
This container is part of the TSYS-AIOS-GIS project and provides a base weather data processing environment.
Overview
The TSYS-AIOS-GIS-Tools-Weather-Base container is designed for weather data processing and analysis tasks. It includes essential tools for handling weather data formats (GRIB, NetCDF), accessing weather APIs, and performing meteorological calculations.
Tools Included
Core Tools
- Base OS: Debian Bookworm slim
- Shell: Bash
- Programming Languages:
- Python 3 with meteorological libraries
- R with weather analysis packages
Weather Data Processing Libraries
- xarray: Multi-dimensional data in Python
- cfgrib: GRIB format handling
- netCDF4: NetCDF file handling
- MetPy: Meteorological calculations
- Siphon: Access to weather data from various sources
- Numpy/Pandas/Scipy: Scientific computing libraries
Climate Data Operators
- CDO (Climate Data Operators): Tools for climate data processing
- NCO (NetCDF Operators): Operators for NetCDF files
- NCL (NCAR Command Language): For complex climate analysis
Visualization & Analysis
- Matplotlib/Seaborn: Statistical plots
- Requests: HTTP library for API access
- R packages: raster, rgdal, ncdf4, rasterVis, ncmeta
Additional Tools
- FTP client: For bulk weather data downloads
- GFortran: For compiling Fortran-based weather tools
Usage
Building the Weather Base Container
# From this directory
cd /home/localuser/AIWorkspace/TSYS-AIOS-GIS/Docker/TSYS-AIOS-GIS-Tools-Weather-Base
# Use the wrapper script to automatically detect and set user IDs
./docker-compose-wrapper.sh build
# Or run commands in the weather container with automatic user mapping
./docker-compose-wrapper.sh run tsys-weather-base [command]
# Example: Process a GRIB file with cfgrib
./docker-compose-wrapper.sh run tsys-weather-base python3 -c "import xarray as xr; ds = xr.open_dataset('file.grib', engine='cfgrib'); print(ds)"
# Example: Use CDO to process NetCDF files
./docker-compose-wrapper.sh run tsys-weather-base cdo info /workspace/weather_data.nc
# Example: Start Python with weather libraries
./docker-compose-wrapper.sh run tsys-weather-base python3
Using with docker-compose directly
# Set environment variables and run docker-compose directly
LOCAL_USER_ID=$(id -u) LOCAL_GROUP_ID=$(id -g) docker-compose up --build
# Or export variables first
export LOCAL_USER_ID=$(id -u)
export LOCAL_GROUP_ID=$(id -g)
docker-compose up
Using the wrapper script
# Build and start the base weather container with automatic user mapping
./docker-compose-wrapper.sh up --build
# Start without rebuilding
./docker-compose-wrapper.sh up
# View container status
./docker-compose-wrapper.sh ps
# Stop containers
./docker-compose-wrapper.sh down
Weather Data Processing Workflows
This container is designed to handle:
- GRIB data format processing
- NetCDF data analysis
- NOAA and European weather API integration
- Bulk data download via HTTP/FTP
- Meteorological calculations
- Climate data processing with CDO/NCO
User ID Mapping (For File Permissions)
The container automatically detects and uses the host user's UID and GID to ensure proper file permissions. This means:
- Files created inside the container will have the correct ownership on the host
- No more root-owned files after container operations
- Works across different environments (development, production servers)
The container detects the user ID from the mounted workspace volume. If needed, you can override the default values by setting environment variables:
# Set specific user ID and group ID before running docker-compose
export LOCAL_USER_ID=1000
export LOCAL_GROUP_ID=1000
docker-compose up
Or run with inline environment variables:
LOCAL_USER_ID=1000 LOCAL_GROUP_ID=1000 docker-compose up
The container runs as a non-root user named TSYS-Tools with the detected host user's UID/GID.