Caldtg=~/Caldtg.ksh
cdo=/cluster/gcc-4.8.5/tools/bin/cdo
ncks=/usr/bin/ncks
path=/data/public/HYCOM/shian/forecast
fname=US058GCOM-OPSnce.espc-d-031-hycom_fcst_glby008_
str=2025040712 #`date -d "-2 days" +%Y%m%d`00
sen=`date -d "-3 days" +%Y%m%d`12
#sen=2025041312
 while [ ${str} -le ${sen} ];
 do
  yyyy=`echo ${str} | cut -c 1-4`
  mm=`echo ${str} | cut -c 5-6`

  for tau in {0000..0192..0006}
    do
    if [ ! -f hycom_${str}_f${tau}_ssh.nc ] ;then
       mv ${path}/${yyyy}/${mm}/${fname}${str}_t${tau}_ssh.nc hycom_${str}_f${tau}_ssh.nc
      echo "Do ... ${str}_${tau}  ${count}"
    else
      echo "${str}_${tau}  ${count} ok"
    fi
  done
  export uvdtg=`${Caldtg} ${str} 12`
  export upth=/data/public/HYCOM/shian/forecast/SSH/hycom_${str}_f0012_ssh.nc
  ./getHIC_ic.ksh
#  $cdo remapnn,~/tar_grid.nc ${path}/${yyyy}/${mm}/${fname}${str}_t0036_u3z.nc ${str}_f0036_u.nc
#  $cdo remapnn,~/tar_grid.nc ${path}/${yyyy}/${mm}/${fname}${str}_t0036_v3z.nc ${str}_f0036_v.nc

  str=`${Caldtg} ${str} 24`

 done

