Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F111480947
exec_panel_fitting_batch.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 2, 12:42
Size
1 KB
Mime Type
text/x-shellscript
Expires
Sun, May 4, 12:42 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25916948
Attached To
R8797 solarPV
exec_panel_fitting_batch.sh
View Options
#!/bin/bash
## ====== Settings
#SBATCH --account=cadmos
#SBATCH --job-name=panel_fit
#SBATCH --nodes=1
#SBATCH --mem=32G
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --time=05:00:00
#SBATCH --partition=serial
#SBATCH --workdir ./output
#SBATCH --mail-type=ALL
#SBATCH --mail-user=alina.walch@epfl.ch
#SBATCH --array=1-97
#SBATCH -o panel_fit_%A_%a.out # Standard output
#SBATCH -e panel_fit_%A_%a.err # Standard error
echo STARTING AT $(date)
## == Specify here the needed modules and the virtual env
source deactivate
#module purge
#module load gcc python/3.6.5 --> conda has the python installation!
source activate py3_all
## ====== Get slurm array ID
N=${SLURM_ARRAY_TASK_ID}
echo Slurm array task ID: $N
echo
## == Specify here the commands to execute
###### INPUTS ########
CITY=ptLancy
WORKDIR=/scratch/walch/pv_linking/files_avail_area/$CITY
SCRIPT_FP=~/code/solarPV_identification/Available_area/panel_fitting_batch_new.py
# TOTAL NUMBER OF ROOFTOP SHAPES: 9,640,000
# this makes 97 batches of size 100,000
BATCH_ID=0 ## `expr $N - 1`
BATCH_SIZE=100000
ROOF_FILE=/scratch/walch/pv_linking/files_avail_area/Avail_area_caseStudy/$CITY\_avail_area_roofs/$CITY\_avail_area_roofs.shp
TARGET_DIR=$WORKDIR\/panel_stats_horizontal
PANEL_WIDTH="1.6"
PANEL_HEIGHT=1
## Run. Argument to pass (in order): reference file, target file
echo Executing python script
python $SCRIPT_FP $ROOF_FILE $TARGET_DIR $BATCH_ID $BATCH_SIZE $PANEL_WIDTH $PANEL_HEIGHT
source deactivate
echo FINISHED AT $(date)
Event Timeline
Log In to Comment