You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The functionality of getting a regional average might exist in the package already, and/or be accomplishable via rasterizing then using crop.
But for the sake of consistency with the team producing FVCOM, this is the suggested methodology I received from Dr. Wang via email correspondence on the topic:
Regarding the calculation of the regional mean using FVCOM results, the area of each triangle needs to be considered because the resolution is different spatially. For example, here is the process to calculate the regional mean bottom temperature for the GOM3 domain:
Interpolate the bottom temperature from node to cell (the function "f_interp_node2cell.m" in matFVCOM toolbox).
Calculate the area of each triangle (the function "calc_area.m" in matFVCOM toolbox).
Compute the sum of the product of temperature and area for all the triangles and divide it by the total area of GOM3 domain. This gives the regional mean bottom temperature for the GOM3 domain.
For calculating the vertical mean, the function "f_mean_column.m" in matFVCOM can do that.
This one feels like a combination of: using sf::st_intersection() to clip the mesh to an area we want the zonal summaries for. Then use sf::st_area() to get the size of each triangle (or remaining area of triangles that get clipped).
Then when assigning the values for each of the triangles' fills, it seems like they assign the average of the three node values to the location coordinates of "nele"
I think you are correct. They are just taking the mean of the three vertices' values. That's probably fine, and I agree that to aggregate multiple elements (facets?, triangles?) each should be weighted.
The functionality of getting a regional average might exist in the package already, and/or be accomplishable via rasterizing then using crop.
But for the sake of consistency with the team producing FVCOM, this is the suggested methodology I received from Dr. Wang via email correspondence on the topic:
This is the matFVCOM toolbox mentioned:
https://github.com/SiqiLiOcean/matFVCOM
The text was updated successfully, but these errors were encountered: