Create a reader to ingest standard climate data formats in 3D [day, latitude, longitude] to the format and units required by Xanthos [land_cell, month].
COMPLETED:
Built functionality to read in raw climate data commonly used and generated by ISIMIP
Currently built functionality for pr, tas, tasmin, tasmax
Test suite included
USAGE:
To save formatted outputs as datasets:
from xanthos import ClimateToXanthos
ctx = ClimateToXanthos(save_outputs=True)
# for precipitation ('pr')
pr_arr = ctx.format_pr(ncdf="<path to NetCDF file>",
data_variable_name='pr',
start_yr=<int four digit year>,
through_yr=<int four digit year>,
yr_interval=1,
out_file="<path and name to save NPY file to>")
# for `tas`
tas_arr = ctx.format_tas(ncdf="<path to NetCDF file>",
data_variable_name='tas',
out_file="<path and name to save NPY file to>")
@crvernon It looks like you still have me marked as a reviewer on this PR. I'm guessing this is an oversight, though I'm happy to give you my thoughts if you want them.
TASK:
Create a reader to ingest standard climate data formats in 3D [day, latitude, longitude] to the format and units required by Xanthos [land_cell, month].
COMPLETED:
pr
,tas
,tasmin
,tasmax
USAGE:
To save formatted outputs as datasets: