#!/bin/tcsh

foreach MM ( 01 02 03 04 05 06 07 08 09 10 11 12 )

  foreach DD ( 01 02 03 04 05 06 07 08 09 10 \
               11 12 13 14 15 16 17 18 19 20 \
               21 22 23 24 25 26 27 28 29 30 \
               31 )

    wget --quiet http://www.wfas.net/archive/www.fs.fed.us/land/wfas/archive/2019/$MM/$DD/fdr_fcst.txt
    wget --quiet http://www.wfas.net/archive/www.fs.fed.us/land/wfas/archive/2019/$MM/$DD/fdr_obs.txt

    if ( -f fdr_fcst.txt ) then
      echo "found for 2019 $MM $DD"
      mkdir -p 2019/$MM/$DD
      mv fdr_fcst.txt 2019/$MM/$DD/
      mv fdr_obs.txt 2019/$MM/$DD/
    endif

  end

end
