#!/bin/csh -f 
#set echo
  set maxday = (31 28 31 30 31 30 31 31 30 31 30 31)
 set j = 1
 while ( $j <= 12 )
   if ($j <= 9) then 
      set day = 1
      while ( $day <= $maxday[$j] )
        if ($day <= 9) then
         set link=https://www.wpc.ncep.noaa.gov/dailywxmap/htmlimages/sfcplot_sm_20190${j}0${day}.gif
        else 
         set link=https://www.wpc.ncep.noaa.gov/dailywxmap/htmlimages/sfcplot_sm_20190${j}${day}.gif
        endif 
        @ day++
        echo ${link}
        wget ${link}
      end
   else
      set day = 1
      while ( $day <= $maxday[$j] )
        if ($day <= 9) then
         set link=https://www.wpc.ncep.noaa.gov/dailywxmap/htmlimages/sfcplot_sm_2019${j}0${day}.gif
        else 
         set link=https://www.wpc.ncep.noaa.gov/dailywxmap/htmlimages/sfcplot_sm_2019${j}${day}.gif
        endif 
        @ day++
        echo ${link}
        wget ${link}
      end
   endif 

     @ j++
 end
