#!/bin/ksh

ano=$1
data=`echo ${ano} | cut -c1-6`
cam=/stornext/online1/eta/etaclim/felipe/scripts/solicitacoes/Chou/AVN_CFS
cam2=/scratchout/grupos/eta/home/etaclim/sazonal/worketa/eta/227X351X38_oper_kieee/${ano}Etasa40km

typeset -Z4 tempo
#echo $ano
#exit
Run_Date=${1}
IntFct=6
Fct=0000
ldm=`echo ${Run_Date} | cut -c7-8`
mes_sst=`echo ${Run_Date} | cut -c5-6`

nano=`echo $Run_Date | cut -c1-4`
nmes=`echo $Run_Date | cut -c5-6`
ndia=`echo $Run_Date | cut -c7-8`
nhora=`echo $Run_Date | cut -c9-10`

ldm1=`../../../util/caldate.3.0 ${Run_Date} + 0d   "ld"`
ldm2=`../../../util/caldate.3.0 ${Run_Date} + 30d  "ld"`
ldm3=`../../../util/caldate.3.0 ${Run_Date} + 60d  "ld"`
ldm4=`../../../util/caldate.3.0 ${Run_Date} + 90d  "ld"`
ldm5=`../../../util/caldate.3.0 ${Run_Date} + 120d "ld"`

let diai=${ldm1}-${ldm}
let Ndias=${diai}+${ldm2}+${ldm3}+${ldm4}+${ldm5}
let Nfct=${Ndias}*24
NFct=${Nfct}
tempo=0

cp ${cam}/${nano}${nmes}${ndia}${nhora}/*.ETA_avn ${cam2}
cp ${cam}/gdsinfo.ETA_avn ${cam2}

#let tempo=$tempo+6
#done

exit
