! This is max_conc.jnl ! Find the depth of max 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 maxmp=totmp[l=151,z=@max,x=@ave,y=@ave] !depth of max MP at 2010 let zero_at_max=totmp[l=151,x=@ave,y=@ave]-maxmp let d_of_max=zero_at_max[z=@LOC:0] ! list d_of_max list/format=(F6.1)/nohead/append/file=metric.txt d_of_max 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)`