! This is max_conc.jnl ! Find the max surface concentration of total MP def symbol inc = $1%1% list ($itr) let isfile = `test_opendap("test($itr)/tavg.01951.01.01.nc")` if `isfile EQ 0` then use "test($itr)/tavg.01951.01.01.nc" let totmp=o_mp+o_mpa+o_mpp let npgmax=totmp[l=151,x=150e:120w@max,y=20n:40n@max,k=1] !max surface conc@NPG let nagmax=totmp[l=151,x=80w:10w@max,y=20n:40n@max,k=1] !max surface conc@NAG let spgmax=totmp[l=151,x=160w:80w@max,y=20s:40s@max,k=1] !max surface conc@SPG let sagmax=totmp[l=151,x=30w:10e@max,y=20s:40s@max,k=1] !max surface conc@SAG let iogmax=totmp[l=151,x=40e:110e@max,y=20s:40s@max,k=1] !max surface conc@IOG list/format=(E9.3, " ",E9.3, " ",E9.3, " ",E9.3, " ",E9.3)/nohead/append/file=metric.txt npgmax, nagmax, spgmax, sagmax, iogmax SPAWN grep -Po "pinp=\K[^,]*" control_($itr).in >> param1.txt SPAWN grep -Po "prise=\K[^,]*" control_($itr).in >> param2.txt canc data 1 endif def symbol itr = `($itr)+($inc)`