#!/bin/bash -l
#SBATCH --job-name=smartcarb
#SBATCH --account=d73

#SBATCH --time=03:00:00
#SBATCH --partition=normal
#SBATCH --constraint=gpu

# the script will run on multi core node with 36 cpus and thus 
# should be able to use these resources

export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK
export CRAY_CUDA_MPS=1


# load modules for Python virtual environment
export EB_CUSTOM_REPOSITORY=${HOME}/production/easybuild

module load daint-gpu
module load EasyBuild-custom/cscs

module load GDAL
module load GEOS
module load PROJ

# activate Python 3.5 virtual environment
source /users/gkuhl/Py35-env/bin/activate


module list

python /users/gkuhl/projects/smartcarb/analysis_src/smartcarb2 \
                  --output_path /scratch/snx3000/gkuhl/smartcarb/level2/$1 --dont_overwrite \
                  --instrument $1 --orbit_number 0 4600 --longitude_equator $2 --compute_orbit \
                  --cosmo_vars '\w*NO2_\w' '\w*CO_' 'CLCT' \
                  --log_level 'DEBUG' \
                  --cosmo_path '/scratch/snx3000/gkuhl/smartcarb/cosmo_2d/cosmo_2d_%Y%m%d%H.nc' \
                  --albedo_path '/scratch/snx3000/gkuhl/smartcarb/COSMO_2D_MCD43A3.006_WSA.nc' \
                  --nproc 12

#                  --cosmo_vars '\w*CO2_\w' 'CLCT' \
