#!/bin/bash

source ./Setup.bash


# ============================================================

for ATM in LMD9695 LMD144142 ICO30 ICO40 ICO450 dynamico30 dynamico40 dynamico450
do
    for OCE in ORCA2.3 eORCA1.2 ORCA025
    do
	Liste=$(ls *${ATM}*_*${OCE}*.nc *${OCE}*_*${ATM}*.nc  *${ATM}x${OCE}*.nc *${OCE}x${ATM}*.nc 2> /dev/null  )

	if [[ -z ${Liste} ]] ; then
	    echo "${ATM} : ${OCE} : Vide "
	else
	    echo "${ATM} : ${OCE} : ${Liste}"
	    mkdir -p ${OCE}x${ATM}
	    mv ${Liste} ${OCE}x${ATM}

	fi
	
    done
done
