#!/bin/bash

for fl in /data1/agecoclim-v2301/data/output/raster/base/*
do # risk, weather, ...
        if [ -d $fl ] # && [[ ${fl##/*/} == ss ]] # && [[ ${fl##/*/} != fixture ]]
        then
                for fl2 in $fl/*
                do # 2023
                        if [ -d $fl2 ]
                        then
                                # echo "${fl2##/*/}"
                                if [[ ${fl2} == *2023 ]] # || [[ ${fl2} == *2020 ]] || [[ ${fl2} == *2021 ]] || [[ ${fl2} == *2022 ]] || [[ ${fl2} == *2023 ]]
                                then
					for fl3 in $fl2/*
					do # 12
						if [ -d $fl3 ]
						then
							if [[ ${fl3} == *10 ]] #|| [[ ${fl3} == *02 ]] || [[ ${fl3} == *03 ]] || [[ ${fl3} == *04 ]] || [[ ${fl3} == *05 ]] || [[ ${fl3} == *06 ]]
							then
								rm -rf $fl3
								echo "rm $fl3"
							fi
						fi
					done
                                fi
                        fi
                done
        fi
done
