This code began as a tool to process MERRA reanalysis datasets to calculate fields, and write them in a format similar to GFS forecast data. The intent is to use these reanalysis datasets as input to the CLAVRx cloud processing system. The project has evolved to read MERRA2 reanalysis data.
The python code needs the appropriate conda environment from merra2_clavrx.yml.
Run conda create once to create the environment from the yml file.
conda env create -f merra2_clavrx.yml
Make the environment active. Type:
conda activate merra2_clavrx
Follow How to Download Files from HTTPS Service with wget to register, and set up user credential for wget data access from the GES-DISC.
Edit bash script run_merra4clavrx.sh to change variables as needed for file paths and run dates. Full months can be run with runMonth.sh, full years with runYear.sh
Run the bash script on the command line:
bash run_merra4clavrx.sh
- Using: run_merra4clavrx.sh to call the python code is recommended
Advantages of bash script: - Run dates can be updated by the user in vim - downloads merra files - creates an inventory log of succes/failure both for data download and final product completion - handles input files removal after products are created even when code exits early.
The inventory for any year is counted with .. code-block:: bash
bash scripts/runInventory.sh <YEAR>
Missing files can be listed with .. code-block:: bash
bash scripts/list_missing_inventory.sh <YEAR> <MONTH>
Both scripts have default directories which are searched for the merra2 output files. If these need to be changed, refer to script documentation using a "-h" flag. runInventory will run on current year if nothing is entered when called from the command line without a year or flag.