Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F118770388
template_grass_array.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
Sun, Jun 22, 03:17
Size
1 KB
Mime Type
text/x-shellscript
Expires
Tue, Jun 24, 03:17 (2 d)
Engine
blob
Format
Raw Data
Handle
26930983
Attached To
R8800 solar_potential
template_grass_array.sh
View Options
#!/bin/bash
## == Settings
#SBATCH --account=cadmos
#SBATCH --job-name=_job
#SBATCH --nodes=_nodes
#SBATCH --mem=_mem
#SBATCH --ntasks=_tasks
#SBATCH --cpus-per-task=_cores
#SBATCH --time=_time
#SBATCH --workdir ./output
#SBATCH --mail-type=ALL
#SBATCH --mail-user=_mail
#SBATCH --array=1-_lines
#SBATCH -o _job_%A_%a.out # Standard output
#SBATCH -e _job_%A_%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
## ====== Get slurm array ID
N=${SLURM_ARRAY_TASK_ID}
echo Slurm array task ID: $N
echo
WORKDIR=_workdir
# variable(s) to be read from file. Copy and change -f1 to -f2 if more than one column is read in control file
_var=`head -n ${N} $WORKDIR/_controlFile | tail -n 1 | cut -d' ' -f1`
## ====== User input
PATH_TO_SCRIPT=$WORKDIR\/_grassScript
PATH_TO_LOCATION=_grassPath
## ENTER OTHER USER INPUTS HERE ##
## ===== Variable definitions
CURR_ID=`expr $N - 1`
MAP_NAME= ## ADD NAME ##
echo Opening mapset $MAP_NAME
echo
## ===== Execute script
grass74 -c -e $PATH_TO_LOCATION\/$MAP_NAME --exec $PATH_TO_SCRIPT ## ADD COMMAND LINE ARGUMENTS
echo
echo FINISHED AT $(date)
Event Timeline
Log In to Comment