Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F111288348
create_regions.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Apr 30, 14:38
Size
861 B
Mime Type
text/x-shellscript
Expires
Fri, May 2, 14:38 (2 d)
Engine
blob
Format
Raw Data
Handle
25865496
Attached To
R8800 solar_potential
create_regions.sh
View Options
#!/bin/bash
##== User input
REGION_CONTROL_FILE=/scratch/walch/grassgis/files/CH_split_region_16.txt
LOCATION=CH_LV03
DOM_RESOLUTION=2
DOM=DOM_2m
GRASS_DATABASE=/scratch/walch/grassgis
## == Specify here the needed modules
module purge
module use /ssoft/playground/rmsilva/spack/share/spack/lmod/linux-rhel7-x86_E5v4_Mellanox/openblas/0.2.20-3jwiins/gcc/6.4.0/
module load gcc python/2.7.14 grass
## == Main loop
echo STARTING AT $(date)
echo
LOCATION_PATH=$GRASS_DATABASE\/$LOCATION
while read REGION_ID NORTH SOUTH EAST WEST; do
MAP_NAME=region_$REGION_ID
echo Trying to open location $LOCATION_PATH\/$MAP_NAME
grass74 -c -e $LOCATION_PATH\/$MAP_NAME --exec g.region -p n=$NORTH s=$SOUTH e=$EAST w=$WEST res=$DOM_RESOLUTION zoom=$DOM align=$DOM save=$MAP_NAME --overwrite
done < $REGION_CONTROL_FILE
echo
echo FINISHED AT $(date)
Event Timeline
Log In to Comment