Update process_dem.py

Updated with Yun's modifications.