! 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 surf = posmp[x=@din,y=@din,l=151,z=0:100@din] let mid = posmp[x=@din,y=@din,l=151,z=100:500@din] let deep = posmp[x=@din,y=@din,l=151,z=500:6000@din] let props = surf/posmp[x=@din,y=@din,z=@din,l=151] let propm = mid/posmp[x=@din,y=@din,z=@din,l=151] let propd = deep/posmp[x=@din,y=@din,z=@din,l=151] list/format=(3F6.3, " ",e9.3)/nohead/append/file=metric.txt props,propm,propd,posmp[x=@din,y=@din,z=@din,l=151] 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)`