#!/bin/csh
# script to download the argo data in the Atlantic 
# https://usgodae.org/ftp/outgoing/argo/geo/atlantic_ocean/2009/01/
set echo 
set day=(31 29 31 30 31 30 31 31 30 31 30 31)
foreach y ( 2021   )
  #foreach m ( 01 02 03 04 05 06 07 08 09 10 11 12 )
#foreach y ( 2012   )
 foreach m ( 09 10 11 12   )
 	 @  dd=1
	while ( ${dd} <= ${day[${m}]})
	setenv d `echo ${dd} | awk '{printf("%02.0f", $1)}'`
        wget "https://usgodae.org/ftp/outgoing/argo/geo/atlantic_ocean/${y}/${m}/${y}${m}${d}_prof.nc" 
        @ dd = ${dd} + 1
        end
 end
end
