#!/bin/bash
set -x
#------------------------------------------------------------------------------------------------
#
# This script automatically clean all compiled object, scripts and executables of monarch v2.0 
#
# Author: oriol.jorba@bsc.es
#------------------------------------------------------------------------------------------------
######################################
# Do not modify anything below
######################################
MONARCH=`pwd`
#  PREPROC/binary2netcdf
cd $MONARCH/PREPROC/binary2netcdf
rm -f *.x
rm -f compile.sh

# PREPROC/EMISSIONS/megan
cd $MONARCH/PREPROC/EMISSIONS/megan/global/src
make clean
rm -f Makefile

# PREPROC/FIXED
cd $MONARCH/PREPROC/FIXED
rm -f runfixed_rrtm.scr

# PREPROC/VARIABLE
cd $MONARCH/PREPROC/VARIABLE
rm -f compile_read_paul_source
rm -f compile_read_paul_source_mdb2.tmp
rm -f compile_read_paul_source_mdb2_2018.tmp
rm -f compile_read_source_foo_landuse.tmp
rm -f compile_read_roughness_prigent.tmp
rm -f degribERA_generic.sh
rm -f degribgfs_generic_05_grib2.sh
rm -f degribgfs_generic_05.sh
rm -f runalbedo
rm -f runalbedorrtm1deg
rm -f runcnv_rrtm
rm -f rundegribsst
rm -f runduststart
rm -f runemissivity
rm -f runfbare_modis.tmp
rm -f run_rrtm
rm -f runvegfrac
rm -f runz0vegustar

# MODEL/SRC
cd $MONARCH/MODEL/SRC
make clean
cd $MONARCH/MODEL/SRC/conf
rm -f configure.nmmb

exit
