#!/bin/bash

for fl in /data1/agecoclim-v2301/data/output/raster/weather/*
do # elv, ss, ...
        if [ -d $fl ]  && [[ ${fl##/*/} == sunshine* ]] # && [[ ${fl##/*/} != fixture ]]
        then
                for fl2 in $fl/*
                do # 2023
                        if [ -d $fl2 ]
                        then

                                # echo "${fl2##/*/}"
                                if [[ ${fl2} == *2021 ]] || [[ ${fl2} == *2022 ]]
                                then
					rm -rf $fl2
					echo "rm $fl2"
                                fi
                        fi
                done
        fi
done
