! 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("sens_rise/test($itr)/tavg.01951.01.01.nc")` if `isfile EQ 0` then use "sens_rise/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=61,z=0:100@din] let mid = posmp[x=@din,y=@din,l=61,z=100:500@din] let deep = posmp[x=@din,y=@din,l=61,z=500:6000@din] let props = surf/posmp[x=@din,y=@din,z=@din,l=61] let propm = mid/posmp[x=@din,y=@din,z=@din,l=61] let propd = deep/posmp[x=@din,y=@din,z=@din,l=61] list/format=(3F6.3, " ",e9.3)/nohead/append/file=metric.txt props,propm,propd,posmp[x=@din,y=@din,z=@din,l=61] SPAWN grep -Po "pinp=\K[^,]*" sens_rise/test($itr)/control.in >> param1.txt SPAWN grep -Po "prise=\K[^,]*" sens_rise/test($itr)/control.in >> param2.txt canc data 1 endif def symbol itr = `($itr)+($inc)`