[Thread Prev][Thread Next][Index]

Re: [ferret_users] Save grid area [nlon,nlat] to file?



Hi Paul,
Is your data on a curvilinear grid?  Could you send the output of

ncdump -h var_for_model_X.nc

??

If there are variables that contain cell_area, then it's probably just a matter of summing them up, but if you want to find a particular longitude/latitude subset that might be the tricky part.

Ansley

On 9/13/2011 2:52 PM, Paul Young wrote:
Hi all,

I've seen that there are several entries in the archives about saving the area for a particular region (using @din; e.g. http://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2004/msg00026.html), but is there a simple way to return a variable that is dimensioned (nlon, nlat) and has the the grid cell areas for each cell? Else, do I need to step through and do the geometry myself?

I'm looping through a bunch of different models (perhaps some on spectral grids) and I'd like to have a generic script. I'm envisaging something like:

use "var_for_model_X.nc"											!Load in any variable on the model grid (e.g. surface pressure: lon, lat, time)
let cell_areas = { something clever in one/two lines! }					!Calculate areas [lon,lat]
save/file="cell_areas_for_model_X.nc" cell_areas					!Save them to netcdf

I bet the solution is very simple and staring me in the face, but - as I can't see it - please forgive me for crowd-sourcing from the help list.

Cheers,

Paul






[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement