#!/bin/sh 
#
cd /cpc/fews/production/NMME_HOME/python_dev/vkumar
# 
# 
CYR=`date --date='0 month ago' +%Y`
NYR=`date --date='-1 month ago' +%Y`
echo $CYR $NYR
#
icm1=`date +%B`
icm=`date +%b`IC
echo $icm
echo $icm > ./seed/ic_file
# 
inpd=`date +%B%Y`
echo $inpd
echo $inpd > ./seed/ini_period_file
#
FCM0=`date --date='0 month ago' +%m`
FCM1=`date --date='-1 month ago' +%m`
FCM2=`date --date='-2 month ago' +%m`
FCM3=`date --date='-3 month ago' +%m`
FCM4=`date --date='-4 month ago' +%m`
FCM5=`date --date='-5 month ago' +%m`
FCM6=`date --date='-6 month ago' +%m`
FCM7=`date --date='-7 month ago' +%m`
FCM8=`date --date='-8 month ago' +%m`
FCM9=`date --date='-9 month ago' +%m`
echo ${FCM0} ${FCM1} ${FCM2} ${FCM3} ${FCM4} ${FCM5} ${FCM6} ${FCM7} ${FCM8} ${FCM9}
echo ${FCM0} ${FCM1} ${FCM2} ${FCM3} ${FCM4} ${FCM5} ${FCM6} ${FCM7} ${FCM8} ${FCM9} > ./seed/fcst_months
echo ${FCM0} ${FCM1} ${FCM2} ${FCM3} ${FCM4} ${FCM5} ${FCM6} > ./seed/iclim
#
FM0=`date --date='0 month ago' +%b%Y`
FM1=`date --date='-1 month ago' +%b%Y`
FM2=`date --date='-2 month ago' +%b%Y`
FM3=`date --date='-3 month ago' +%b%Y`
FM4=`date --date='-4 month ago' +%b%Y`
FM5=`date --date='-5 month ago' +%b%Y`
FM6=`date --date='-6 month ago' +%b%Y`
FM7=`date --date='-7 month ago' +%b%Y`
FM8=`date --date='-8 month ago' +%b%Y`
#
echo $icm ${FM0} ${FM1} ${FM2} ${FM3} ${FM4} ${FM5} ${FM6} ${FM7} ${FM8} ${icm1} $CYR $NYR
echo $icm ${FM0} ${FM1} ${FM2} ${FM3} ${FM4} ${FM5} ${FM6} ${FM7} ${FM8} ${icm1} $CYR $NYR > ./seed/months_file
#
FS0=`date --date='0 month ago' +%b%Y`-`date --date='-2 month ago' +%b%Y`
FS1=`date --date='-1 month ago' +%b%Y`-`date --date='-3 month ago' +%b%Y`
FS2=`date --date='-2 month ago' +%b%Y`-`date --date='-4 month ago' +%b%Y`
FS3=`date --date='-3 month ago' +%b%Y`-`date --date='-5 month ago' +%b%Y`
FS4=`date --date='-4 month ago' +%b%Y`-`date --date='-6 month ago' +%b%Y`
FS5=`date --date='-5 month ago' +%b%Y`-`date --date='-7 month ago' +%b%Y`
FS6=`date --date='-6 month ago' +%b%Y`-`date --date='-8 month ago' +%b%Y`
#
echo $icm ${FS0} ${FS1} ${FS2} ${FS3} ${FS4} ${FS5} ${FS6} ${icm1} $CYR $NYR
echo $icm ${FS0} ${FS1} ${FS2} ${FS3} ${FS4} ${FS5} ${FS6} ${icm1} $CYR $NYR > ./seed/seasons_file
#
SC0=`date --date='0 month ago' +%b`-`date --date='-2 month ago' +%b`
SC1=`date --date='-1 month ago' +%b`-`date --date='-3 month ago' +%b`
SC2=`date --date='-2 month ago' +%b`-`date --date='-4 month ago' +%b`
SC3=`date --date='-3 month ago' +%b`-`date --date='-5 month ago' +%b`
SC4=`date --date='-4 month ago' +%b`-`date --date='-6 month ago' +%b`
SC5=`date --date='-5 month ago' +%b`-`date --date='-7 month ago' +%b`
SC6=`date --date='-6 month ago' +%b`-`date --date='-8 month ago' +%b`
#
echo ${SC1} ${SC2} ${SC3} ${SC4} ${SC5} ${SC6}
echo ${SC1} ${SC2} ${SC3} ${SC4} ${SC5} ${SC6} > ./seed/sclim
#
MC0=`date --date='0 month ago' +%b`
MC1=`date --date='-1 month ago' +%b`
MC2=`date --date='-2 month ago' +%b`
MC3=`date --date='-3 month ago' +%b`
MC4=`date --date='-4 month ago' +%b`
MC5=`date --date='-5 month ago' +%b`
MC6=`date --date='-6 month ago' +%b`
MC7=`date --date='-7 month ago' +%b`
MC8=`date --date='-8 month ago' +%b`
#
echo ${MC0} ${MC1} ${MC2} ${MC3} ${MC4} ${MC5} ${MC6} ${MC7} ${MC8}
echo ${MC0} ${MC1} ${MC2} ${MC3} ${MC4} ${MC5} ${MC6} ${MC7} ${MC8} > ./seed/mclim
#
