! This is hi_lat.jnl ! Find the high latitude ocean inventory in 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 posmp = if totmp GT 0 then totmp else 0 let hilats = posmp[x=@din,y=60S:90S@din,l=61,k=@din] !particles in hilat ocean let hilatn = posmp[x=@din,y=60N:90N@din,l=61,k=@din] let tothilat = hilats+hilatn let prop = tothilat/posmp[x=@din,y=@din,z=@din,l=61] let props = hilats/posmp[x=@din,y=@din,z=@din,l=61] let propn = hilatn/posmp[x=@din,y=@din,z=@din,l=61] list/format=(3F6.3)/nohead/append/file=metric.txt prop,props,propn 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)`