[1] As noted, you can sum the area [TAREA] of each grid cell.
[2] Further, do not use a double do loop. Use the 'where' function.
where is an array function
http://www.ncl.ucar.edu/Document/Functions/Built-in/where.shtml
EG: Use
rmask = where(temp(nlt,nln).le.-1.8, 1, rmask)
and not
if(.not.ismissing(temp(nlt,nln)).and.temp(nlt,nln).le.-1.8) then
rmask(nlt,nln) = 1
-- Use rmask = where(temp.gt.-1.8.and.temp(nlt,nln).le.0., 2, rmask) Not if(.not.ismissing(temp(nlt,nln)).and.temp(nlt,nln).gt.-1.8.and.temp(nlt,nln).le.0.) then rmask(nlt,nln) = 2 -- You may want rmask = ocn->REGION_MASK rmask = rmask@_FillValue ; set all to _FillValue Then set your mask; then sum the TAREA fir eacj mask value Good luck On 3/9/12 8:05 PM, klindsay@ucar.edu wrote: > Angie, > > Based on the variable names you are reading from localfile, it seems like you are > dealing with model output from the ocean model POP. The variable TAREA in the model > output contains the surface area of each grid cell, computed in a way that is > consistent with the model discretizations. > > Hope this helps, > Keith > > > > > _______________________________________________ > ncl-talk mailing list > List instructions, subscriber options, unsubscribe: > http://mailman.ucar.edu/mailman/listinfo/ncl-talk _______________________________________________ ncl-talk mailing list List instructions, subscriber options, unsubscribe: http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Fri Mar 9 17:22:17 2012
This archive was generated by hypermail 2.1.8 : Tue Mar 13 2012 - 14:00:14 MDT