I try to interpolate heat fluxes from atmospheric model to ROMS and i want to use conservative type interpolation for heat and rain fluxes. To do that i need to calculate area of the each grid cell in ROMS model. I was using following code to calculate rho centered grid area,
Code: Select all
area(i,j) = (1.0d0/pm(i,j))*(1.0d0/pn(i,j))
Code: Select all
area(i,j) = (6.3712d6*6.3712d6)*
& abs(grid_corner_lon(1,i,j)*deg2rad-
& grid_corner_lon(4,i,j)*deg2rad)*
& abs(dsin(grid_corner_lat(3,i,j)*deg2rad)-
& dsin(grid_corner_lat(4,i,j)*deg2rad))
Thanks,