#!/bin/bash

for y in {2020..2022} ; do
   for f in *rlds*1-5-0-1_*${y}*.nc ; do
    tag=$( echo ${f%.nc} | awk -F_ '{print $2}' )
#    echo mv $f ${f%_*}_y$y.nc
#     mv $f ${f%_*}_y$y.nc
    echo mv $f drowned_${tag}_JRA55_y$y.nc
    mv $f drowned_${tag}_JRA55_y$y.nc
   done
done
      


exit
drowned_tas_JRA55_197901010000-197912312100.nc
