Changeset 714 for trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh
- Timestamp:
- 10/12/12 10:11:24 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh
r697 r714 1700 1700 # NCO OPERATOR 1701 1701 1702 1702 1703 function IGCM_sys_ncap2 { 1703 1704 IGCM_debug_PushStack "IGCM_sys_ncap2" -- $@ … … 1705 1706 echo "IGCM_sys_ncap2 :" $@ 1706 1707 fi 1707 /usr/local/bin/ncap2 "$@" 1708 if [ $? -gt 0 ] ; then 1709 echo "IGCM_sys_ncap2 : erreur ${@}." 1710 IGCM_debug_Exit "ncap2" 1708 1709 typeset NB_ESSAI DELAI status i 1710 # number of tentative 1711 NB_ESSAI=3 1712 # time delay between tentative 1713 DELAI=2 1714 1715 i=0 1716 while [ $i -lt $NB_ESSAI ] ; do 1717 ncap2 "$@" > out_rsync 2>&1 1718 status=$? 1719 if [ ${status} -gt 0 ] ; then 1720 IGCM_debug_Print 2 "IGCM_sys_ncap2 : error code ${status}" 1721 cat out_rsync 1722 \rm out_rsync 1723 IGCM_debug_Print 2 "IGCM_sys_ncap2 : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1724 else 1725 \rm out_rsync 1726 break 1727 fi 1728 (( i = i + 1 )) 1729 done 1730 1731 if [ ${status} -gt 0 ] ; then 1732 echo "IGCM_sys_ncap2 : ncap2 error" 1733 IGCM_debug_Exit "ncap2" 1711 1734 fi 1712 1735 … … 1719 1742 echo "IGCM_sys_ncatted :" $@ 1720 1743 fi 1721 /usr/local/bin/ncatted "$@" 1722 if [ $? -gt 0 ] ; then 1723 echo "IGCM_sys_ncatted : erreur ${@}." 1724 IGCM_debug_Exit "ncatted" 1744 1745 typeset NB_ESSAI DELAI status i 1746 # number of tentative 1747 NB_ESSAI=3 1748 # time delay between tentative 1749 DELAI=2 1750 1751 i=0 1752 while [ $i -lt $NB_ESSAI ] ; do 1753 ncatted "$@" > out_rsync 2>&1 1754 status=$? 1755 if [ ${status} -gt 0 ] ; then 1756 IGCM_debug_Print 2 "IGCM_sys_ncatted : error code ${status}" 1757 cat out_rsync 1758 \rm out_rsync 1759 IGCM_debug_Print 2 "IGCM_sys_ncatted : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1760 else 1761 \rm out_rsync 1762 break 1763 fi 1764 (( i = i + 1 )) 1765 done 1766 1767 if [ ${status} -gt 0 ] ; then 1768 echo "IGCM_sys_ncatted : ncatted error" 1769 IGCM_debug_Exit "ncatted" 1725 1770 fi 1726 1771 … … 1733 1778 echo "IGCM_sys_ncbo :" $@ 1734 1779 fi 1735 /usr/local/bin/ncbo $@ 1736 if [ $? -gt 0 ] ; then 1737 echo "IGCM_sys_ncbo : erreur ${@}." 1738 IGCM_debug_Exit "ncbo" 1780 1781 typeset NB_ESSAI DELAI status i 1782 # number of tentative 1783 NB_ESSAI=3 1784 # time delay between tentative 1785 DELAI=2 1786 1787 i=0 1788 while [ $i -lt $NB_ESSAI ] ; do 1789 ncbo $@ > out_rsync 2>&1 1790 status=$? 1791 if [ ${status} -gt 0 ] ; then 1792 IGCM_debug_Print 2 "IGCM_sys_ncbo : error code ${status}" 1793 cat out_rsync 1794 \rm out_rsync 1795 IGCM_debug_Print 2 "IGCM_sys_ncbo : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1796 else 1797 \rm out_rsync 1798 break 1799 fi 1800 (( i = i + 1 )) 1801 done 1802 1803 if [ ${status} -gt 0 ] ; then 1804 echo "IGCM_sys_ncbo : ncbo error" 1805 IGCM_debug_Exit "ncbo" 1739 1806 fi 1740 1807 … … 1747 1814 echo "IGCM_sys_ncdiff :" $@ 1748 1815 fi 1749 /usr/local/bin/ncdiff $@ 1750 if [ $? -gt 0 ] ; then 1751 echo "IGCM_sys_ncdiff : erreur ${@}." 1752 IGCM_debug_Exit "ncdiff" 1816 1817 typeset NB_ESSAI DELAI status i 1818 # number of tentative 1819 NB_ESSAI=3 1820 # time delay between tentative 1821 DELAI=2 1822 1823 i=0 1824 while [ $i -lt $NB_ESSAI ] ; do 1825 ncdiff $@ > out_rsync 2>&1 1826 status=$? 1827 if [ ${status} -gt 0 ] ; then 1828 IGCM_debug_Print 2 "IGCM_sys_ncdiff : error code ${status}" 1829 cat out_rsync 1830 \rm out_rsync 1831 IGCM_debug_Print 2 "IGCM_sys_ncdiff : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1832 else 1833 \rm out_rsync 1834 break 1835 fi 1836 (( i = i + 1 )) 1837 done 1838 1839 if [ ${status} -gt 0 ] ; then 1840 echo "IGCM_sys_ncdiff : ncdiff error" 1841 IGCM_debug_Exit "ncdiff" 1753 1842 fi 1754 1843 … … 1761 1850 echo "IGCM_sys_ncea :" $@ 1762 1851 fi 1763 /usr/local/bin/ncea $@ 1764 if [ $? -gt 0 ] ; then 1765 echo "IGCM_sys_ncea : erreur ${@}." 1766 IGCM_debug_Exit "ncea" 1852 1853 typeset NB_ESSAI DELAI status i 1854 # number of tentative 1855 NB_ESSAI=3 1856 # time delay between tentative 1857 DELAI=2 1858 1859 i=0 1860 while [ $i -lt $NB_ESSAI ] ; do 1861 ncea $@ > out_rsync 2>&1 1862 status=$? 1863 if [ ${status} -gt 0 ] ; then 1864 IGCM_debug_Print 2 "IGCM_sys_ncea : error code ${status}" 1865 cat out_rsync 1866 \rm out_rsync 1867 IGCM_debug_Print 2 "IGCM_sys_ncea : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1868 else 1869 \rm out_rsync 1870 break 1871 fi 1872 (( i = i + 1 )) 1873 done 1874 1875 if [ ${status} -gt 0 ] ; then 1876 echo "IGCM_sys_ncea : ncea error" 1877 IGCM_debug_Exit "ncea" 1767 1878 fi 1768 1879 … … 1775 1886 echo "IGCM_sys_ncecat :" $@ 1776 1887 fi 1777 /usr/local/bin/ncecat $@ 1778 if [ $? -gt 0 ] ; then 1779 echo "IGCM_sys_ncecat : erreur ${@}." 1780 IGCM_debug_Exit "ncecat" 1888 1889 typeset NB_ESSAI DELAI status i 1890 # number of tentative 1891 NB_ESSAI=3 1892 # time delay between tentative 1893 DELAI=2 1894 1895 i=0 1896 while [ $i -lt $NB_ESSAI ] ; do 1897 ncecat $@ > out_rsync 2>&1 1898 status=$? 1899 if [ ${status} -gt 0 ] ; then 1900 IGCM_debug_Print 2 "IGCM_sys_ncecat : error code ${status}" 1901 cat out_rsync 1902 \rm out_rsync 1903 IGCM_debug_Print 2 "IGCM_sys_ncecat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1904 else 1905 \rm out_rsync 1906 break 1907 fi 1908 (( i = i + 1 )) 1909 done 1910 1911 if [ ${status} -gt 0 ] ; then 1912 echo "IGCM_sys_ncecat : ncecat error" 1913 IGCM_debug_Exit "ncecat" 1781 1914 fi 1782 1915 … … 1789 1922 echo "IGCM_sys_ncflint :" $@ 1790 1923 fi 1791 /usr/local/bin/ncflint $@ 1792 if [ $? -gt 0 ] ; then 1793 echo "IGCM_sys_ncflint : erreur ${@}." 1794 IGCM_debug_Exit "ncflint" 1924 1925 typeset NB_ESSAI DELAI status i 1926 # number of tentative 1927 NB_ESSAI=3 1928 # time delay between tentative 1929 DELAI=2 1930 1931 i=0 1932 while [ $i -lt $NB_ESSAI ] ; do 1933 ncflint $@ > out_rsync 2>&1 1934 status=$? 1935 if [ ${status} -gt 0 ] ; then 1936 IGCM_debug_Print 2 "IGCM_sys_ncflint : error code ${status}" 1937 cat out_rsync 1938 \rm out_rsync 1939 IGCM_debug_Print 2 "IGCM_sys_ncflint : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1940 else 1941 \rm out_rsync 1942 break 1943 fi 1944 (( i = i + 1 )) 1945 done 1946 1947 if [ ${status} -gt 0 ] ; then 1948 echo "IGCM_sys_ncflint : ncflint error" 1949 IGCM_debug_Exit "ncflint" 1795 1950 fi 1796 1951 … … 1803 1958 echo "IGCM_sys_ncks :" $@ 1804 1959 fi 1805 /usr/local/bin/ncks $@ 1806 if [ $? -gt 0 ] ; then 1807 echo "IGCM_sys_ncks : erreur ${@}." 1808 IGCM_debug_Exit "ncks" 1960 1961 typeset NB_ESSAI DELAI status i 1962 # number of tentative 1963 NB_ESSAI=3 1964 # time delay between tentative 1965 DELAI=2 1966 1967 i=0 1968 while [ $i -lt $NB_ESSAI ] ; do 1969 ncks $@ > out_rsync 2>&1 1970 status=$? 1971 if [ ${status} -gt 0 ] ; then 1972 IGCM_debug_Print 2 "IGCM_sys_ncks : error code ${status}" 1973 cat out_rsync 1974 \rm out_rsync 1975 IGCM_debug_Print 2 "IGCM_sys_ncks : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 1976 else 1977 \rm out_rsync 1978 break 1979 fi 1980 (( i = i + 1 )) 1981 done 1982 1983 if [ ${status} -gt 0 ] ; then 1984 echo "IGCM_sys_ncks : ncks error" 1985 IGCM_debug_Exit "ncks" 1809 1986 fi 1810 1987 … … 1817 1994 echo "IGCM_sys_ncpdq :" $@ 1818 1995 fi 1819 /usr/local/bin/ncpdq $@ 1820 if [ $? -gt 0 ] ; then 1821 echo "IGCM_sys_ncpdq : erreur ${@}." 1822 IGCM_debug_Exit "ncpdq" 1996 1997 typeset NB_ESSAI DELAI status i 1998 # number of tentative 1999 NB_ESSAI=3 2000 # time delay between tentative 2001 DELAI=2 2002 2003 i=0 2004 while [ $i -lt $NB_ESSAI ] ; do 2005 ncpdq $@ > out_rsync 2>&1 2006 status=$? 2007 if [ ${status} -gt 0 ] ; then 2008 IGCM_debug_Print 2 "IGCM_sys_ncpdq : error code ${status}" 2009 cat out_rsync 2010 \rm out_rsync 2011 IGCM_debug_Print 2 "IGCM_sys_ncpdq : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2012 else 2013 \rm out_rsync 2014 break 2015 fi 2016 (( i = i + 1 )) 2017 done 2018 2019 if [ ${status} -gt 0 ] ; then 2020 echo "IGCM_sys_ncpdq : ncpdq error" 2021 IGCM_debug_Exit "ncpdq" 1823 2022 fi 1824 2023 … … 1831 2030 echo "IGCM_sys_ncra :" $@ 1832 2031 fi 1833 /usr/local/bin/ncra $@ 1834 if [ $? -gt 0 ] ; then 1835 echo "IGCM_sys_ncra : erreur ${@}." 1836 IGCM_debug_Exit "ncra" 2032 2033 typeset NB_ESSAI DELAI status i 2034 # number of tentative 2035 NB_ESSAI=3 2036 # time delay between tentative 2037 DELAI=2 2038 2039 i=0 2040 while [ $i -lt $NB_ESSAI ] ; do 2041 ncra $@ > out_rsync 2>&1 2042 status=$? 2043 if [ ${status} -gt 0 ] ; then 2044 IGCM_debug_Print 2 "IGCM_sys_ncra : error code ${status}" 2045 cat out_rsync 2046 \rm out_rsync 2047 IGCM_debug_Print 2 "IGCM_sys_ncra : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2048 else 2049 \rm out_rsync 2050 break 2051 fi 2052 (( i = i + 1 )) 2053 done 2054 2055 if [ ${status} -gt 0 ] ; then 2056 echo "IGCM_sys_ncra : ncra error" 2057 IGCM_debug_Exit "ncra" 1837 2058 fi 1838 2059 … … 1845 2066 echo "IGCM_sys_ncrcat :" $@ 1846 2067 fi 1847 /usr/local/bin/ncrcat $@ 1848 if [ $? -gt 0 ] ; then 1849 echo "IGCM_sys_ncrcat : erreur ${@}." 1850 # IGCM_debug_Exit "ncrcat" 2068 2069 typeset NB_ESSAI DELAI status i 2070 # number of tentative 2071 NB_ESSAI=3 2072 # time delay between tentative 2073 DELAI=2 2074 2075 i=0 2076 while [ $i -lt $NB_ESSAI ] ; do 2077 ncrcat $@ > out_rsync 2>&1 2078 status=$? 2079 if [ ${status} -gt 0 ] ; then 2080 IGCM_debug_Print 2 "IGCM_sys_ncrcat : error code ${status}" 2081 cat out_rsync 2082 \rm out_rsync 2083 IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2084 else 2085 \rm out_rsync 2086 break 2087 fi 2088 (( i = i + 1 )) 2089 done 2090 2091 if [ ${status} -gt 0 ] ; then 2092 echo "IGCM_sys_ncrcat : ncrcat error" 2093 #IGCM_debug_Exit "ncrcat" 1851 2094 fi 1852 2095 … … 1859 2102 echo "IGCM_sys_ncrename :" $@ 1860 2103 fi 1861 /usr/local/bin/ncrename $@ 1862 if [ $? -gt 0 ] ; then 1863 echo "IGCM_sys_ncrename : erreur ${@}." 1864 IGCM_debug_Exit "ncrename" 2104 2105 typeset NB_ESSAI DELAI status i 2106 # number of tentative 2107 NB_ESSAI=3 2108 # time delay between tentative 2109 DELAI=2 2110 2111 i=0 2112 while [ $i -lt $NB_ESSAI ] ; do 2113 ncrename $@ > out_rsync 2>&1 2114 status=$? 2115 if [ ${status} -gt 0 ] ; then 2116 IGCM_debug_Print 2 "IGCM_sys_ncrename : error code ${status}" 2117 cat out_rsync 2118 \rm out_rsync 2119 IGCM_debug_Print 2 "IGCM_sys_ncrename : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2120 else 2121 \rm out_rsync 2122 break 2123 fi 2124 (( i = i + 1 )) 2125 done 2126 2127 if [ ${status} -gt 0 ] ; then 2128 echo "IGCM_sys_ncrename : ncrename error" 2129 IGCM_debug_Exit "ncrename" 1865 2130 fi 1866 2131 … … 1873 2138 echo "IGCM_sys_ncwa :" $@ 1874 2139 fi 1875 /usr/local/bin/ncwa $@ 1876 if [ $? -gt 0 ] ; then 1877 echo "IGCM_sys_ncwa : erreur ${@}." 1878 IGCM_debug_Exit "ncwa" 2140 2141 typeset NB_ESSAI DELAI status i 2142 # number of tentative 2143 NB_ESSAI=3 2144 # time delay between tentative 2145 DELAI=2 2146 2147 i=0 2148 while [ $i -lt $NB_ESSAI ] ; do 2149 ncwa $@ > out_rsync 2>&1 2150 status=$? 2151 if [ ${status} -gt 0 ] ; then 2152 IGCM_debug_Print 2 "IGCM_sys_ncwa : error code ${status}" 2153 cat out_rsync 2154 \rm out_rsync 2155 IGCM_debug_Print 2 "IGCM_sys_ncwa : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again." 2156 else 2157 \rm out_rsync 2158 break 2159 fi 2160 (( i = i + 1 )) 2161 done 2162 2163 if [ ${status} -gt 0 ] ; then 2164 echo "IGCM_sys_ncwa : ncwa error" 2165 IGCM_debug_Exit "ncwa" 1879 2166 fi 1880 2167 … … 1887 2174 function IGCM_sys_cdo { 1888 2175 IGCM_debug_PushStack "IGCM_sys_cdo" -- $@ 1889 1890 \cdo $@ 1891 if [ $? -gt 0 ] ; then 1892 echo "IGCM_sys_cdo : erreur ${@}." 2176 if ( $DEBUG_sys ) ; then 2177 echo "IGCM_sys_cdo :" $@ 2178 fi 2179 2180 typeset status 2181 2182 \cdo $@ > out_rsync 2>&1 2183 status=$? 2184 if [ ${status} -gt 0 ] ; then 2185 echo "IGCM_sys_cdo : error code ${status}" 2186 cat out_rsync 2187 \rm out_rsync 1893 2188 IGCM_debug_PopStack "IGCM_sys_cdo" 1894 2189 return 1
Note: See TracChangeset
for help on using the changeset viewer.