Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F112248040
grass_horizon_exec.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
Fri, May 9, 07:51
Size
1 KB
Mime Type
text/x-shellscript
Expires
Sun, May 11, 07:51 (2 d)
Engine
blob
Format
Raw Data
Handle
26033238
Attached To
R8800 solar_potential
grass_horizon_exec.sh
View Options
#!/bin/bash
## ====== Settings
#SBATCH --account=cadmos
#SBATCH --job-name=horizon_grass
#SBATCH --nodes=1
#SBATCH --mem=16G
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --time=01:00:00
#SBATCH --workdir ./output
#SBATCH --mail-type=ALL
#SBATCH --mail-user=alina.walch@epfl.ch
#SBATCH --array=1-4
#SBATCH -o horizon_grass_%A_%a.out # Standard output
#SBATCH -e horizon_grass_%A_%a.err # Standard error
echo
STARTING AT
$(
date
)
## == Specify here the needed modules and the virtual env
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
## == Specify here the user settings and paths
LOCATION_PATH_CLUSTER
=
/scratch/walch/grassgis/LSN
SOLPOS_BASE
=
/Users/alinawalch/Documents/EPFL/data/grassgis_test/GVA_SOLPOS/GVA_SOLPOS
##---------- HORIZON SETTINGS -----------------##
# https://grass.osgeo.org/grass74/manuals/r.horizon.html
# Layer names
ELEVATION
=
DOM_LSN
ROOFTOP_MASK
=
rooftop_select_LSN
# Settings
OUTPUT_BASE
=
HORIZON
MAXDISTANCE
=
5000
DISTANCE_FACTOR
=
1.0
# sampling distance step coefficient
REGION
=
current
##BUFFER=
## == Specify here the commands to execute
N
=
${
SLURM_ARRAY_TASK_ID
}
# nr. of estimators
DIRECTION_FILE
=
$SOLPOS_BASE
\_
direction.txt
dir
=
`
head -n
${
N
}
$DIRECTION_FILE
| tail -n 1 | cut -d
' '
-f1
`
# alt=`head -n ${N} $DIRECTION_FILE | tail -n 1 | cut -d' ' -f2`
## Run. Argument to pass : direction (dir)
TMP_PATH
=
$LOCATION_PATH_CLUSTER
\/
TMP_DIR_
$dir
HORIZON_RAW
=
RAW_
$OUTPUT_BASE
grass74 -c
$TMP_PATH
-e --exec r.horizon -d
$ELEVATION
output
=
$HORIZON_RAW
direction
=
$dir
step
=
0.0
maxdistance
=
$MAXDISTANCE
distance
=
$DISTANCE_FACTOR
echo
Computed horizon map and saved in layer
$HORIZON_RAW
echo
FINISHED AT
$(
date
)
Event Timeline
Log In to Comment