#!/bin/bash
#
# Quick script to download IMERG-early and -late rain rates for 
# using in LIS runs as precip forcing.
#

ver='v7c'

earlyscr=/usr/people/casejl/scripts/IMERG/wget_imerg_early_${ver}.bash
latescr=/usr/people/casejl/scripts/IMERG/wget_imerg_late_${ver}.bash

yyyymmddbeg="20260304"
yyyymmddend="20260408"

yyyymmdd=$yyyymmddbeg
while [ $yyyymmdd -le $yyyymmddend ] ; do
  $earlyscr $yyyymmdd
  $latescr $yyyymmdd
  yyyymmdd=`date -u +%Y%m%d -d "${yyyymmdd}+1 days"`
done

exit
