The following resources have been assembled to take your python skills to the next level so you can:
- Effectively work with geospatial data
- Break-up your analysis and run several instances of your program
- Move your analysis to an HPC and retrieve results
Resources:
- Introduction to Spatial Data Science
- Python
- HPC
- Enter the shell (Clusters > >_Alpine Shell Access)
- Navigate to your project folder (use :"cd /projects/{user name}"), replacing {user name} to match yours
- Clone Interactive Geospatial Python Notebooks (type: "git clone https://github.com/GeospatialCentroid/interactive_geospatial_python.git" in shell and press enter)
- Create the virtual environment
- Type "acompile" and press enter to switch to a compile node
- Type "module load anaconda" and press enter to load the anaconda module
- Then type "conda create -n geospatial -c conda-forge -y jupyterlab numpy matplotlib xarray rasterio geopandas rioxarray earthpy descartes xarray-spatial pystac-client python-graphviz"
- You can use "conda info --envs" to verify your environment exists
- Activate your new environment (use: "conda activate geospatial" in shell)
- With your environment activated (the command line should now start with "(geospatial)") install one more library with "pip install papermill" so we can call our notebook from the command line and pass parameters
- Run jobs using Slurm (the HPC job scheduler)
- Duplicate and edit the job_template.sh file with "cp job_template.sh job_template{year}.sh"
- Open the new file with "vi job_template{year}.sh"
- Enter edit mode, press the Esc key then 'i'
- Change the 'year' value used in the file (two locations)
- Update the email address
- Save and close the file, press the Esc key then type ':wq' followed by the Enter key
- Use the command "sbatch job_template{year}.sh" to submit the job
- Then use "squeue --user={user_id}@colostate.edu --long" to check the status of the job
Additional Resources: