3. Software Installation/Getting Started

3.1. Introduction

This chapter describes how to install and get started using METdataio. METdataio has been developed and tested on Mac and Linux operating systems. Support for additional platforms may be added in future releases.

METdbload is a Python3 program that requires some extra packages to be available on the user’s computer prior to installation. METdbload is part of the METdataio database package. Additional METdataio programs that work with the data are planned.

3.2. Requirements

METdataio relies on the following tools. These must be installed and tested prior to installing METdataio:

MySQL or MariaDB - download and install the latest version. This can be on a separate computer. Use “SET GLOBAL max_allowed_packet=110000000;” by typing the command in the CLI and/or make the corresponding edit to /etc/my.cnf, so that the change persists after the next reboot.

AuroraDB could alternately be used as a database in the cloud.

3.2.1. Python Requirements

Python 3.10.4+ - Python 3.10.4 or higher must be installed.

The requirements below come directly from the requirements.txt file at the top level of the repository.

lxml==4.9.1
numpy==1.24.2
pandas==1.5.2
pip==23.3
PyMySQL==1.0.2
pytest==7.2.1
python-dateutil==2.8.2
PyYAML==6.0
xarray>=2023.1.0



3.3. Installation

3.3.1. Download

Download METdataio into an installation directory. Programs can be run from the ush subdirectory.

git clone https://github.com/dtcenter/METdataio [install]/METdataio
cd [install]/METdataio/METdbLoad/ush

3.3.2. Create Database

Data must be loaded into a database which has the prefix 'mv_', e.g. mv_met_data. This database must be structured with the METviewer mv_mysql.sql schema:

cd [install]/metviewer
mysql -u[db_username] -p[db_password] -e'create database [db_name];'
mysql -u[db_username] -p[db_password] [db_name] < sql/mv_mysql.sql

Create an XML load specification document which contains information about your MET data. Run METdbload using the XML load specification as input (called [load_xml] here) and monitor progress:

python met_db_load.py [load_xml] [optional redirection of output, e.g. &> log/load_[date].log &]'