% use curl if you want to save in a file 
% nohup /usr/local/bin/matlab -nojvm -nosplash < test.m > log &

clear all
% CFS version 2 
% 1. UGRD :

unix('curl http://iridl.ldeo.columbia.edu/expert/SOURCES/.NOAA/.NCEP/.EMC/.CFSv2/.ENSEMBLE/.PGBF/.pressure_level/.UGRD%5BM%5Daverage/P/925/VALUE/S/%28%200000%201%20Mar%201982%29%280000%201%20Mar%202011%29RANGEEDGES/S/12/STEP/L/4.5/6.5/RANGEEDGES%5BL%5Daverage/S/%28T%29renameGRID/-999.0/setmissing_value/%5BX/Y%5D%5BT%5Dcptv10.tsv.gz > U925_CFSv2stMar_8211JAS.tsv.gz')

%=== old cpt
unix('curl http://iridl.ldeo.columbia.edu/expert/SOURCES/.NOAA/.NCEP/.EMC/.CFSv2/.ENSEMBLE/.PGBF/.pressure_level/.UGRD%5BM%5Daverage/P/925/VALUE/S/%28%200000%201%20Mar%201982%29%280000%201%20Mar%202011%29RANGEEDGES/S/12/STEP/L/4.5/6.5/RANGEEDGES%5BL%5Daverage/S/%28T%29renameGRID/-999.0/setmissing_value/%5BX/Y%5D%28%25d%20%25b%20%25Y%5BT%5D%20%29datatable.tsv.gz > U925_CFSv2stMar_8211JAS.tsv.gz')

% then for 2012 
% ==old
unix('curl http://iridl.ldeo.columbia.edu/expert/SOURCES/.NOAA/.NCEP/.EMC/.CFSv2/.MONTHLY_REALTIME/.PGBF/.pressure_level/.UGRD/P/925/VALUE%5BM%5Daverage/S/%280000%2010%20Feb%202012%29%280000%2015%20Feb%202012%29%280000%2020%20Feb%202012%29%280000%2025%20Feb%202012%29%280000%2002%20Mar%202012%29%280000%2007%20Mar%202012%29VALUES/L/S/CopyStream/%280000%2002%20Mar%202012%29readunits/0/get/flaglt/add/L/%2FLnew/renameGRID%5BL%5Dsample-along/Lnew/%2FL/renameGRID%5BS%5Daverage/L/4.5/6.5/RANGEEDGES%5BL%5Daverage/-999.0/setmissing_value/%5BX/Y%5Ddatatable.tsv.gz > U925_CFSv2stMar_2012JAS.tsv.gz')

%== For MJ
unix('curl http://iridl.ldeo.columbia.edu/expert/SOURCES/.NOAA/.NCEP/.EMC/.CFSv2/.ENSEMBLE/.PGBF/.pressure_level/.UGRD%5BM%5Daverage/P/925/VALUE%5BP%5Daverage/S/%28%200000%201%20Mar%201982%29%280000%201%20Mar%202011%29RANGEEDGES/S/12/STEP/L/2.5/3.5/RANGEEDGES%5BL%5Daverage/S/%28T%29renameGRID/-999.0/setmissing_value/%5BX/Y%5D%28%25d%20%25b%20%25Y%5BT%5D%20%29datatable.tsv.gz > U925_CFSv2stMar_8211MJ.tsv.gz')
% then 2012
unix('curl  http://iridl.ldeo.columbia.edu/expert/SOURCES/.NOAA/.NCEP/.EMC/.CFSv2/.MONTHLY_REALTIME/.PGBF/.pressure_level/.UGRD/P/925/VALUE%5BM%5Daverage/S/%280000%2010%20Feb%202012%29%280000%2015%20Feb%202012%29%280000%2020%20Feb%202012%29%280000%2025%20Feb%202012%29%280000%2002%20Mar%202012%29%280000%2007%20Mar%202012%29VALUES/L/S/CopyStream/%280000%2002%20Mar%202012%29readunits/0/get/flaglt/add/L/%2FLnew/renameGRID%5BL%5Dsample-along/Lnew/%2FL/renameGRID%5BS%5Daverage/L/2.5/3.5/RANGEEDGES%5BL%5Daverage/-999.0/setmissing_value/%5BX/Y%5Ddatatable.tsv.gz  > U925_CFSv2stMar_2012MJ.tsv.gz')


% 1. Precipitation rate  :

unix('curl http://iridl.ldeo.columbia.edu/expert/SOURCES/.NOAA/.NCEP/.EMC/.CFSv2/.ENSEMBLE/.FLXF/.surface/.PRATE/86400/mul%5BM%5Daverage/S/%28%200000%201%20Mar%201982%29%280000%201%20Mar%202011%29RANGEEDGES/S/12/STEP/L/4.5/6.5/RANGEEDGES%5BL%5Daverage/S/%28T%29renameGRID/-999.0/setmissing_value/%5BX/Y%5D%28%25d%20%25b%20%25Y%5BT%5D%20%29datatable.tsv.gz  > RR_CFSv2stMar_8211JAS.tsv.gz')

% 2012 :
unix('curl http://iridl.ldeo.columbia.edu/expert/SOURCES/.NOAA/.NCEP/.EMC/.CFSv2/.MONTHLY_REALTIME/.FLXF/.surface/.PRATE%5BM%5Daverage/86400/mul/S/%280000%2010%20Feb%202012%29%280000%2015%20Feb%202012%29%280000%2020%20Feb%202012%29%280000%2025%20Feb%202012%29%280000%2002%20Mar%202012%29%280000%2007%20Mar%202012%29VALUES/L/S/CopyStream/%280000%2002%20Mar%202012%29readunits/0/get/flaglt/add/L/%2FLnew/renameGRID%5BL%5Dsample-along/Lnew/%2FL/renameGRID%5BS%5Daverage/L/4.5/6.5/RANGEEDGES%5BL%5Daverage/-999.0/setmissing_value/%5BX/Y%5Ddatatable.tsv.gz > RR_CFSv2stMar_2012JAS.tsv.gz')

% MJ

unix('curl http://iridl.ldeo.columbia.edu/expert/SOURCES/.NOAA/.NCEP/.EMC/.CFSv2/.ENSEMBLE/.FLXF/.surface/.PRATE/86400/mul%5BM%5Daverage/S/%28%200000%201%20Mar%201982%29%280000%201%20Mar%202011%29RANGEEDGES/S/12/STEP/L/2.5/3.5/RANGEEDGES%5BL%5Daverage/S/%28T%29renameGRID/-999.0/setmissing_value/%5BX/Y%5D%28%25d%20%25b%20%25Y%5BT%5D%20%29datatable.tsv.gz > RR_CFSv2stMar_8211MJ.tsv.gz')

unix('curl http://iridl.ldeo.columbia.edu/expert/SOURCES/.NOAA/.NCEP/.EMC/.CFSv2/.MONTHLY_REALTIME/.FLXF/.surface/.PRATE%5BM%5Daverage/86400/mul/S/%280000%2010%20Feb%202012%29%280000%2015%20Feb%202012%29%280000%2020%20Feb%202012%29%280000%2025%20Feb%202012%29%280000%2002%20Mar%202012%29%280000%2007%20Mar%202012%29VALUES/L/S/CopyStream/%280000%2002%20Mar%202012%29readunits/0/get/flaglt/add/L/%2FLnew/renameGRID%5BL%5Dsample-along/Lnew/%2FL/renameGRID%5BS%5Daverage/L/2.5/3.5/RANGEEDGES%5BL%5Daverage/-999.0/setmissing_value/%5BX/Y%5Ddatatable.tsv.gz > RR_CFSv2stMar_2012MJ.tsv.gz')



