Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Question about Area-Averaging over Irregular Regions in CESM2 lonlat Grid

Kitty

Guo kt
New Member
I'm a bit confused about area averaging over irregular regions in CESM2's lonlat grid output. Since the grid is regular in longitude and latitude, do I still need to apply area weights (e.g., cos(lat)) when computing spatial means, or is this already accounted for? Could anyone clarify this for me?
Thank you for any useful information.
 

islas

Moderator
Staff member
You still need to apply a cos(lat) weighting when computing spatial means because the grid is not equal area - the regular longitude grid means that each grid box represents a smaller area the closer you get to the pole.
 
Vote Upvote 0 Downvote

Kitty

Guo kt
New Member
You still need to apply a cos(lat) weighting when computing spatial means because the grid is not equal area - the regular longitude grid means that each grid box represents a smaller area the closer you get to the pole.
Thank you very much for your reply!
I understand that the `cos(lat)` approach is actually an estimated form of area weighting. If the latitudinal variation within the region is not very large, the difference between using `cos(lat)` weighting and simply averaging over grid points is generally small. I first want to ask: is it acceptable to directly compute the regional average by simply taking the mean over the number of grid points? Second, if area weighting is considered, is using only this estimated method (i.e., `cos(lat)`) sufficiently rigorous?
Could you please clarify this for me?
 
Vote Upvote 0 Downvote

islas

Moderator
Staff member
I think using the cos(lat) weighting is sufficiently rigorous. Certainly the errors introduced by not applying the weighting when averaging over a small latitude range are smaller than when averaging over a large latitude range, but I'm not sure why you would want to make that approximation when you can just as well do it more accurately and apply the weighting. I see no reason to not apply the weighting even if you're averaging only over a small latitude range.
 
Vote Upvote 0 Downvote

Kitty

Guo kt
New Member
I think using the cos(lat) weighting is sufficiently rigorous. Certainly the errors introduced by not applying the weighting when averaging over a small latitude range are smaller than when averaging over a large latitude range, but I'm not sure why you would want to make that approximation when you can just as well do it more accurately and apply the weighting. I see no reason to not apply the weighting even if you're averaging only over a small latitude range.
The point that I'm currently in doubt about is that the data I downloaded is planar data rather than spherical data. So I'm wondering if the values assigned to each grid point have already been processed? Secondly, in the literature I have already read, I did not find any explanation that the data undergoes weighting processing when used. Thank you very much for answering my questions.
 
Vote Upvote 0 Downvote

islas

Moderator
Staff member
It has not been processed. It is the values on the model grid which is not an equal area grid. Each value represents the value at a given grid box and those grid boxes have different size.
 
Vote Upvote 0 Downvote

Kitty

Guo kt
New Member
In fact, the GPP data of CESM2 that I downloaded was read using the cdo command, and it showed a total of 55296 grid points (288×192). There was a description stating "lon: 0 to 358.75 by 1.25 degrees east (circular); lat: -90 to 90 by 0.9424084 degrees north". Therefore, the grid point size here is consistent. Later, I obtained 0.5°×0.5° latitude-longitude grid data using the bilinear interpolation method. From this perspective, is the optimal solution for calculating the regional average not dependent on the number of regional grid points?
 
Vote Upvote 0 Downvote

islas

Moderator
Staff member
It doesn't matter if you've regridded. You would still want to apply an area (cosine(lat)) weighting. If you're wanting to calculate the area sum then of course you would need to account for the different size of your grid box after regridding. But if you're wanting to calculate the area average, you would just do the same thing - average with a cos(lat) weighting applied.
 
Vote Upvote 0 Downvote

Kitty

Guo kt
New Member
It doesn't matter if you've regridded. You would still want to apply an area (cosine(lat)) weighting. If you're wanting to calculate the area sum then of course you would need to account for the different size of your grid box after regridding. But if you're wanting to calculate the area average, you would just do the same thing - average with a cos(lat) weighting applied.
I have downloaded the tas data of the hist-aer experiment of the CESM2 model. Among them, it records: "float tas(time=180, lat=192, lon=288); _:FillValue = 1.0E20f;" // float
:cell_measures = "area: areacella";
:cell_methods = "area: time: mean";
:comment = "TREFHT";
:coordinates = "time lat lon";
:description = "near-surface (usually, 2 meter) air temperature";
:frequency = "mon";
:id = "tas";
:long_name = "Near-Surface Air Temperature";
:mipTable = "Amon";
:missing_value = 1.0E20; // double
:out_name = "tas";
:prov = "Amon ((isd.003))";
:realm = "atmos";
:standard_name = "air_temperature";
:time = "time";
:time_label = "time-mean";
:time_title = "Temporal mean";
:title = "Near-Surface Air Temperature";
:type = "real";
:units = "K";
:variable_id = "tas";
:_ChunkSizes = 1U, 192U, 288U; // The "uint" in this context is "cell_methods = "area: time: mean";" Does this indicate that when calculating the average of a region, only the number of grid points needs to be applied? Is it redundant to want to use weighted methods to calculate the average of a region?
 
Vote Upvote 0 Downvote

islas

Moderator
Staff member
No, that just means it is the mean value in the grid cell. It doesn't mean that it is accounting for the different areas of different grid cells. You need to apply area weighting if you're going to compute a spatial average across multiple grid cells.
 
Vote Upvote 0 Downvote

chenyihui

chen
New Member
No, that just means it is the mean value in the grid cell. It doesn't mean that it is accounting for the different areas of different grid cells. You need to apply area weighting if you're going to compute a spatial average across multiple grid cells.
Dear CESM Support Team,

I am working with CESM model outputs and have some questions regarding the grid cell area variable in the companion domain file (domain.lnd.fv0.9x1.25_gx1v6.090309.nc, see figure). I would appreciate your clarification on the following points:

My specific questions are:

  1. Calculation Methodology of Grid Cell Area
    In the domain.lnd.fv0.9x1.25_gx1v6.090309.nc file, does the area variable (units: radian²) fully account for the actual shape of the finite volume grid (fv0.9x1.25) and spherical geometry effects? In other words, does this area value represent the precise surface area of each grid cell on the actual Earth's surface?
  2. Weighting Treatment for Spatial Distribution Plots
    When I need to create spatial distribution plots of variables (such as soil temperature TSOI), should the data be area-weighted? Or is it appropriate to directly use the raw variable values for plotting?
My understanding and confusion:

  • For calculating regional averages or integrated quantities, I understand that area weighting is necessary
  • However, when simply visualizing spatial patterns, should I use the raw values from each grid cell without considering area differences?

    1760950371451.png
 
Vote Upvote 0 Downvote

islas

Moderator
Staff member
When looking at things in map form, you should not area weight if you want to be looking at the value at a given location. When calculating area averages, you should area weight. The area variable is the area of the grid cell accounting for spherical geometry. If you do an ncview on this file and look at the area variable you will see that it's larger at the equator and smaller at the poles.
 
Vote Upvote 0 Downvote
Top