"Inf" Values in ERA5 Land hourly dataset

I downloaded hourly 2-m air temperature and total precipitation data from ERA5-Land using the API & the default Python script, and subsequently computed monthly mean temperature and cumulative monthly precipitation. For precipitation, I downloaded data at 24:00 hours only; this gives me total daily precipitation with a day lag.

During preprocessing, I masked the data to the boundary of the study area. I then extracted values at the regional level using an area-weighted extraction approach and subsequently computed population-weighted values using regional population proportions derived from grid-level population counts within each region. Because the population dataset is at a finer spatial resolution than the temperature dataset, I aggregated the population data to the temperature resolution using summation (rather than bilinear interpolation), as the objective was spatial aggregation rather than interpolation.

The main issue I am currently facing is the presence of a large number of infinite (Inf) values in the temperature dataset, particularly in coastal grid cells. According to the ERA5-Land documentation, ocean and water bodies are masked; however, I am unsure how common Inf values are in ERA5-Land temperature data. My study site is an island country, & many coastal cities are regions of interest. Although all regions are larger than the temperature grid resolution and therefore retain at least some valid data, in some cases only one or two grid cells contribute because other coastal grid cells contain Inf values.

I am therefore uncertain whether this issue reflects an inherent characteristic of the dataset or is related to my analytical choices, particularly boundary masking during preprocessing. It is also important to note that I am using custom shapefiles to define boundaries during both preprocessing and the main analysis. The primary concern arises when computing population-weighted temperature for coastal cities: because some grid cells contain Inf values (which I convert to NA during analysis), only a small number of inland grid cells may contribute. When a single grid cell dominates the calculation, the resulting population-weighted exposure can be substantially lower than the observed regional mean temperature. For example, the unweighted exposure for one region was 33 °C, whereas the population-weighted exposure was 23 °C. I suspect that the way my population-weighted exposure function handles these Inf values may be contributing to this discrepancy. This needs fix.

For precipitation, the values obtained after conversion to millimetres appear higher than expected. Is this a common characteristic of ERA5-Land precipitation data for countries located near the equator?