37 lines
1.1 KiB
Python
37 lines
1.1 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
This is a just top-level skeleton script that calls
|
|
subset_data.py.
|
|
The original code (subset_data.py) is located under
|
|
python/ctsm folder.
|
|
|
|
For full instructions on how to run the code and different options,
|
|
please check python/ctsm/subset_data.py file.
|
|
This script extracts domain files, surface dataset, and DATM files
|
|
at either a single point or a region using the global dataset.
|
|
|
|
To run this script the following packages are required:
|
|
- numpy
|
|
- xarray
|
|
----------------------------------------------------------------
|
|
To see all available options for single-point/regional subsetting:
|
|
./subset_data --help
|
|
----------------------------------------------------------------
|
|
Instructions for running using conda python environments:
|
|
../../py_env_create
|
|
conda activate ctsm_py
|
|
"""
|
|
|
|
import os
|
|
import sys
|
|
|
|
# -- add python/ctsm to path
|
|
_CTSM_PYTHON = os.path.join(
|
|
os.path.dirname(os.path.realpath(__file__)), os.pardir, os.pardir, "python"
|
|
)
|
|
sys.path.insert(1, _CTSM_PYTHON)
|
|
|
|
from ctsm.subset_data import main
|
|
|
|
if __name__ == "__main__":
|
|
main() |