-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathget_gedi.py
More file actions
12 lines (8 loc) · 934 Bytes
/
Copy pathget_gedi.py
File metadata and controls
12 lines (8 loc) · 934 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
import subprocess
from datetime import datetime
# code = 'gh3_extract_shots -o ./gedi_data/europe/data -r ./shapefiles/Europe.shp -l2a shot_number root_file beam channel degrade_flag delta_time surface_flag rx_assess/rx_energy -l2b l2b_quality_flag sensitivity lon_lowestmode lat_lowestmode surface_flag -l4a l2_quality_flag l4_quality_flag agbd -rh 98 -a "{\'glad_forest_loss\':[\'loss\', \'loss_sum_3x3\', \'lossyear\']}" --geo -n 10 -A 50 -D'
code = 'gh3_extract_shots -o ./gedi_data/europe/data -r ./shapefiles/Europe.shp -l2a shot_number root_file beam channel degrade_flag delta_time surface_flag rx_assess/rx_energy -l2b l2b_quality_flag sensitivity surface_flag -l4a l2_quality_flag l4_quality_flag agbd -rh 98 --geo -D'
subprocess.run(code, shell=True)
now = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
with open('gedi_data/report.txt', 'a') as file:
file.write(f"\ncode: \n{code} \nexecution finished at {now} \n")