mk-prism converts yearly MK-PRISM South Korea climate archives into GeoTIFF products.
The script in main.py unpacks MK-PRISM NetCDF archives from dataset/, exports yearly rasters in EPSG:4326, and reprojects them to EPSG:32652 at 30 m resolution.
This repository currently contains:
- main.py: the conversion pipeline
- config.yaml: runtime paths, CRS settings, dimension names, and export options
- environment.yml: Conda environment definition
dataset/with four MK-PRISM yearly archive files for 2000-2019:MKPRISM_MKPRISMv21_skorea_TA_gridraw_yearly_2000_2019_nc.tar.gzMKPRISM_MKPRISMv21_skorea_TAMIN_gridraw_yearly_2000_2019_nc.tar.gzMKPRISM_MKPRISMv21_skorea_TAMAX_gridraw_yearly_2000_2019_nc.tar.gzMKPRISM_MKPRISMv21_skorea_RN_gridraw_yearly_2000_2019_nc.tar.gz
The repository does not currently include extracted .nc files or generated GeoTIFF outputs. Those are created when the pipeline runs.
When you run the converter, it creates and populates:
dataset/raw_data/: original tar archives after extractionprocessed_epsg4326/: yearly GeoTIFF outputs inEPSG:4326processed_utm52n_30m/: yearly GeoTIFF outputs inEPSG:32652with 30 m resolution
The bundled MK-PRISM archives cover four variables:
TA: mean temperatureTAMIN: minimum temperatureTAMAX: maximum temperatureRN: precipitation
MK-PRISM data download:
For public use, prefer the portable environment file:
conda env create -f environment-public.yml
conda activate mk-prismThe existing environment.yml is better treated as a fuller local export. It can still be useful for reproducing the original setup, but it is more platform-specific than most public users need.
If you want to use the exported environment instead, run:
conda env create -f environment.yml
conda activate aibio_310If you keep environment.yml in the public repo, avoid reintroducing a machine-specific prefix: line.
Run the full conversion pipeline:
python main.py --config config.yamlRun only a subset of years:
python main.py --config config.yaml --from 2010 --to 2015The pipeline does the following:
- scans
dataset/for*.tar*and*.ncfiles - safely extracts
.ncmembers from tar archives - moves processed tar files into
dataset/raw_data/ - reads the configured time dimension (
timeby default) - writes yearly GeoTIFF files in
EPSG:4326 - reprojects each raster to
EPSG:32652 - uses bilinear resampling at 30 m resolution
- writes
float32outputs and fills missing values with-99 - writes tiled, deflate-compressed GeoTIFF files with
BIGTIFF=YES
Example geographic output:
processed_epsg4326/MKPRISM_MKPRISMv21_skorea_TA_yearly_2010_2015/MKPRISMv21_skorea_TA_2015_4326_1e-2.tif
Example projected output:
processed_utm52n_30m/MKPRISM_MKPRISMv21_skorea_TA_yearly_2010_2015/MKPRISMv21_skorea_TA_2015_32652_30m.tif
- Paths in config.yaml are resolved relative to main.py, not the shell working directory.
- Files are filtered by the
MKPRISM_MKPRISMv21_skorea_prefix configured in config.yaml. - If extracted
.ncfiles already exist indataset/, the script skips re-extraction and moves matching tar files intodataset/raw_data/.
Code and documentation in this repository are licensed under the MIT License. See LICENSE.
The contents of dataset/ are not automatically covered by the MIT License unless you explicitly have the right to release those files under MIT. If you plan to publish this repository, confirm the redistribution terms for the dataset archives or document a separate data license.
Before pushing this repository publicly, verify the following:
- confirm that you have the right to redistribute the files in
dataset/ - if the dataset archives are public, check their internal metadata for usernames, internal paths, or processing history you do not want to expose
- prefer environment-public.yml for public setup instructions
- keep generated outputs out of version control via .gitignore