#!/bin/bash

export RETRO_CHIRPS=~/data1/LISRUN/Retro_NoahMP_GDAS_Chirps/
export RETRO_CHIRP=~/data1/LISRUN/Retro_NoahMP_GDAS_Chirp/
export RETRO_BOTH=~/data1/LISRUN/Retro_NoahMP_GDAS_CHIRP[S]
export SC=/home/kshakya/data1/SCRIPTS/Retro_NoahMP_5km/

cd $RETRO_CHIRPS/NoahMP/SURFACEMODEL

for yyyymm in `ls -1d 2?????`; do
    mkdir -p $RETRO_BOTH/$yyyymm
    cd $RETRO_BOTH/$yyyymm
    ln -sf $RETRO_CHIRPS/NoahMP/SURFACEMODEL/$yyyymm/LIS_HIST_*.nc .
done

ln -sf $RETRO_CHIRP/NoahMP/SURFACEMODEL/$yyyymm/LIS_HIST_*.nc .



















