! This is lo_lat.jnl ! Find the low 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 midlat = posmp[x=@din,y=40N:60N@din,l=61,k=@din]!+posmp[x=@din,y=40N:60N@din,l=61,k=@din] !particles in midlat ocean let prop = midlat/posmp[x=@din,y=@din,z=@din,l=61] list/format=(F6.3)/nohead/append/file=metric.txt prop 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)`