#!/bin/ksh

infile=2007-2010_ERA_Daily.nc 
times=$(cdo -s showyear $infile)

for year in ${times}
do
   cdo -ydaypctl,95 -selyear,$year $infile -ydaymin  $infile -ydaymax   $infile day95_${year}.nc

     cdo -gec,1 -selyear,$year $infile wetday_${year}.nc

     cdo eca_r95p -selyear,$year wetday_${year}.nc day95_${year}.nc fd_${year}.nc

done



exit 



