Page MenuHomec4science

exec_single_horizon.sh
No OneTemporary

File Metadata

Created
Fri, May 2, 16:50

exec_single_horizon.sh

#!/bin/bash
## == Settings
#SBATCH --account=cadmos
#SBATCH --job-name=HORIZON
#SBATCH --nodes=1
#SBATCH --mem=32G
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --time=24:00:00
#SBATCH --workdir ./output
#SBATCH --mail-type=ALL
#SBATCH --mail-user=alina.walch@epfl.ch
#SBATCH -o HORIZON_%A.out # Standard output
#SBATCH -e HORIZON_%A.err # Standard error
echo STARTING AT $(date)
echo
## == 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
## == User input
DIRECTION=256
PATH_TO_LOCATION=/scratch/walch/grassgis/GVA_Kanton_LV95
# Grass inputs
ELEVATION=DOM_50cm
MAXDISTANCE=100
DISTANCE_FACTOR=1.0 # sampling distance step coefficient
REGION=current
## == Variable definitions
OUTPUT_LAYER=RAW_HORIZON
MAP_NAME=shade_horizon
echo Entering mapset $MAP_NAME
echo
## == Execute script
grass74 -c -e $PATH_TO_LOCATION\/$MAP_NAME --exec r.horizon -d $ELEVATION output=$OUTPUT_LAYER direction=$DIRECTION step=0.0 maxdistance=$MAXDISTANCE distance=$DISTANCE_FACTOR
echo
echo FINISHED AT $(date)

Event Timeline