Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

03a — Step 1 reproduction: a country’s natural-regeneration area from the published map

LifeWatch ERIC

Question. Do the country numbers in Williams et al. (2024) follow from the authors’ own published 30 m map (Zenodo Williams et al. (2023))?

The country is a parameter: environment variable ISO3 (default COL). Colombia is the replication’s study country; Costa Rica (ISO3=CRI) is run as a second-country check of the area-method finding. Paper values are read directly from Supp. Tables 3 and 4 (paper/supplementary/, MOESM5 / MOESM6).

Paper value (Colombia, Neotropics; default run)MhaSource
Potential for natural regeneration, continuous (expected) area11.19Supp. Table 3
Potential for natural regeneration, binary > 50 %13.70Supp. Table 4
Area available for restoration93.78Supp. Tables 3 and 4

Method.

  • Country mask: GADM 4.1 level 0 polygon (paper: “GADM (2022)”). A 30 m pixel belongs to Colombia when its centre lies inside the polygon (GDAL rasterize default rule).

  • Pixel area: the raster is on a regular 0.00025° lon/lat grid (EPSG:4326), so a pixel’s area depends only on its row. We compute it three ways:

    1. ellipsoid_wgs84: the exact area of the lon/lat cell on the WGS84 ellipsoid (closed form with the authalic q function, checked against pyproj.Geod below). This is the reference.

    2. sphere_a_mollweide: the area the paper’s stated method gives. The paper computes areas “in Mollweide projection”. PROJ’s Mollweide (ESRI:54009, +proj=moll +datum=WGS84) is a spherical projection that uses the semi-major axis a as the sphere radius, so an equal-area Mollweide area equals the area on a sphere of radius a = 6,378,137 m (verified numerically below).

    3. nominal_900m2: every pixel counted as 30 m × 30 m = 900 m² (0.09 ha, the per-cell area the paper uses for carbon), applied to the native 0.00025° lon/lat pixels without reprojection. At Colombia’s latitudes a 0.00025° pixel is ~740–770 m², so this overstates area by ~17–21 %.

  • Continuous product: values are integer percentages (0–100, 255 = NoData). Expected area = Σ area × pct / 100. Because of integer storage, the true expected area lies within Σ area × (pct ± 0.5) / 100 if values were rounded, or within [pct, pct + 1) if truncated; both bounds are reported. The product has almost no 0 values: pixels whose probability rounds (or truncates) to 0 % appear to be stored as NoData. Their missing mass is bounded by treating pixels that are NoData in the continuous product but 0 in the binary product as p ∈ [0, 0.5 %) (rounding) or [0, 1 %) (truncation).

  • Binary product (pnv_bin_30m, 0/1, 3 = NoData): area = Σ area where value = 1. It is compared with the continuous product thresholded at > 50 % and ≥ 50 %.

  • “Available for restoration”: the paper does not define the mask. We report candidate definitions (valid pixels of each product) and compare them with 93.78 Mha.

  • HEALPix aggregation (for the step-2 map comparison): each 30 m pixel centre is assigned to its HEALPix depth-8 NESTED cell on the WGS84 ellipsoid (healpix_geo.nested.lonlat_to_healpix(..., ellipsoid="WGS84")), and exact ellipsoidal pixel areas are summed per cell. No resampling.

This step reuses the authors’ outputs, not their code (available on request only).

Pixel-area models

Check both formulas: ellipsoid against pyproj.Geod (geodesic polygon area), sphere-a against the planar area of the cell projected to ESRI:54009 Mollweide.

   lat  ellipsoid    geod  sphere_a  mollweide_planar  sphere_over_ellipsoid
0   -4    767.493 767.493   772.615           772.615             0.00667391
1    0    769.317 769.317   774.502           774.502              0.0067395
2    4    767.493 767.493   772.615           772.615             0.00667391
3    8    762.027 762.027   766.964           766.964             0.00647843
4   12    752.941 752.941   757.577           757.578             0.00615691
5 15.9    740.628 740.628    744.87           744.869             0.00572809

Country polygon and tile pairs

GADM 4.1 Costa Rica geodesic polygon area: 5.1178 Mha
Supp. Table 3: ['Costa Rica', 'Neotropics', '4.97', '1.03', '0.21'] 
Supp. Table 4: ['Costa Rica', 'Neotropics', '4.97', '1.22', '0.24', '']
pnv_pct_30m_tile_-70_-60_-5_5.tif <-> pnv_bin_30m_tile_14.tif
pnv_pct_30m_tile_-70_-60_5_15.tif <-> pnv_bin_30m_tile_10.tif
pnv_pct_30m_tile_-80_-70_-5_5.tif <-> pnv_bin_30m_tile_13.tif
pnv_pct_30m_tile_-80_-70_15_25.tif <-> pnv_bin_30m_tile_5.tif
pnv_pct_30m_tile_-80_-70_5_15.tif <-> pnv_bin_30m_tile_9.tif
pnv_pct_30m_tile_-90_-80_5_15.tif <-> pnv_bin_30m_tile_8.tif

Block jobs

Each tile is cut into bands of 256 rows; for each band the polygon is clipped to the band, and only the column span of the clipped polygon is read.

52 blocks, 0.08 G pixels read

Per-block computation

For every in-country pixel the worker records (pct value, bin value) and, per row, the pixel area. Output per block:

  • counts[row, pct * 4 + bin]: pixel counts, folded with the three row-area models into area histograms over the 256 × 4 (pct, bin) combinations. Every area statistic below is derived from these histograms.

  • HEALPix depth-8 sums of ellipsoidal area for several masks.

Run all blocks in parallel (fork start method; serial fallback where fork is unavailable, e.g. Windows). On 14 cores this takes a few minutes.

0/52 blocks
done

Area statistics

H[m] is the area (m²) per (pct, bin) combination under area model m.

                                  ellipsoid_wgs84  sphere_a_mollweide  nominal_900m2
country_pixels                             5.1178              5.1502         6.0769
pct_valid                                  1.3430              1.3515         1.5955
pct_gt0                                    1.3430              1.3515         1.5955
expected                                   0.8417              0.8471         0.9999
expected_lower_round                       0.8350              0.8403         0.9920
expected_upper_round                       0.8485              0.8538         1.0079
expected_upper_trunc                       0.8552              0.8606         1.0159
pct_nodata_bin0                            3.5975              3.6203         4.2709
expected_upper_round_incl_subpct           0.8664              0.8719         1.0293
expected_upper_trunc_incl_subpct           0.8911              0.8968         1.0586
pct_gt50                                   1.0442              1.0508         1.2405
pct_ge50                                   1.0621              1.0688         1.2617
bin_valid                                  4.9403              4.9716         5.8662
bin_pnr                                    1.0258              1.0323         1.2186
bin_pnr_where_pct_valid                    1.0252              1.0316         1.2178
bin_pnr_where_pct_nodata                   0.0007              0.0007         0.0008
bin_valid_where_pct_valid                  1.3421              1.3506         1.5944
pct_valid_where_bin_nodata                 0.0009              0.0009         0.0011
pct_gt50_and_bin1                          1.0182              1.0247         1.2096
pct_le50_and_bin1                          0.0069              0.0070         0.0082
pct_gt50_and_bin0                          0.0253              0.0255         0.0301

GADM geodesic polygon area: 5.1178 Mha (country pixel sum, ellipsoid: 5.1178 Mha)

Comparison with the paper

iso3                                                     metric         area_model  value_mha  paper_value_mha     paper_source  diff_mha  diff_pct
 CRI                                    pnr_continuous_expected    ellipsoid_wgs84   0.841700             1.03    Supp. Table 3   -0.1883    -18.28
 CRI                                    pnr_continuous_expected sphere_a_mollweide   0.847100             1.03    Supp. Table 3   -0.1829    -17.76
 CRI                                    pnr_continuous_expected      nominal_900m2   0.999900             1.03    Supp. Table 3   -0.0301     -2.92
 CRI                   pnr_continuous_expected_lower_if_rounded    ellipsoid_wgs84   0.835000             1.03    Supp. Table 3   -0.1950    -18.93
 CRI                   pnr_continuous_expected_lower_if_rounded sphere_a_mollweide   0.840300             1.03    Supp. Table 3   -0.1897    -18.42
 CRI                   pnr_continuous_expected_lower_if_rounded      nominal_900m2   0.992000             1.03    Supp. Table 3   -0.0380     -3.69
 CRI                   pnr_continuous_expected_upper_if_rounded    ellipsoid_wgs84   0.848500             1.03    Supp. Table 3   -0.1815    -17.63
 CRI                   pnr_continuous_expected_upper_if_rounded sphere_a_mollweide   0.853800             1.03    Supp. Table 3   -0.1762    -17.10
 CRI                   pnr_continuous_expected_upper_if_rounded      nominal_900m2   1.007900             1.03    Supp. Table 3   -0.0221     -2.15
 CRI                 pnr_continuous_expected_upper_if_truncated    ellipsoid_wgs84   0.855200             1.03    Supp. Table 3   -0.1748    -16.97
 CRI                 pnr_continuous_expected_upper_if_truncated sphere_a_mollweide   0.860600             1.03    Supp. Table 3   -0.1694    -16.45
 CRI                 pnr_continuous_expected_upper_if_truncated      nominal_900m2   1.015900             1.03    Supp. Table 3   -0.0141     -1.37
 CRI   pnr_continuous_expected_upper_if_rounded_incl_subpercent    ellipsoid_wgs84   0.866400             1.03    Supp. Table 3   -0.1636    -15.88
 CRI   pnr_continuous_expected_upper_if_rounded_incl_subpercent sphere_a_mollweide   0.871900             1.03    Supp. Table 3   -0.1581    -15.35
 CRI   pnr_continuous_expected_upper_if_rounded_incl_subpercent      nominal_900m2   1.029300             1.03    Supp. Table 3   -0.0007     -0.07
 CRI pnr_continuous_expected_upper_if_truncated_incl_subpercent    ellipsoid_wgs84   0.891100             1.03    Supp. Table 3   -0.1389    -13.48
 CRI pnr_continuous_expected_upper_if_truncated_incl_subpercent sphere_a_mollweide   0.896800             1.03    Supp. Table 3   -0.1332    -12.93
 CRI pnr_continuous_expected_upper_if_truncated_incl_subpercent      nominal_900m2   1.058600             1.03    Supp. Table 3    0.0286      2.78
 CRI                                         pnr_binary_product    ellipsoid_wgs84   1.025800             1.22    Supp. Table 4   -0.1942    -15.92
 CRI                                         pnr_binary_product sphere_a_mollweide   1.032300             1.22    Supp. Table 4   -0.1877    -15.38
 CRI                                         pnr_binary_product      nominal_900m2   1.218600             1.22    Supp. Table 4   -0.0014     -0.11
 CRI                         pnr_binary_product_where_pct_valid    ellipsoid_wgs84   1.025200             1.22    Supp. Table 4   -0.1948    -15.97
 CRI                         pnr_binary_product_where_pct_valid sphere_a_mollweide   1.031600             1.22    Supp. Table 4   -0.1884    -15.44
 CRI                         pnr_binary_product_where_pct_valid      nominal_900m2   1.217800             1.22    Supp. Table 4   -0.0022     -0.18
 CRI                            pnr_continuous_thresholded_gt50    ellipsoid_wgs84   1.044200             1.22    Supp. Table 4   -0.1758    -14.41
 CRI                            pnr_continuous_thresholded_gt50 sphere_a_mollweide   1.050800             1.22    Supp. Table 4   -0.1692    -13.87
 CRI                            pnr_continuous_thresholded_gt50      nominal_900m2   1.240500             1.22    Supp. Table 4    0.0205      1.68
 CRI                            pnr_continuous_thresholded_ge50    ellipsoid_wgs84   1.062100             1.22    Supp. Table 4   -0.1579    -12.94
 CRI                            pnr_continuous_thresholded_ge50 sphere_a_mollweide   1.068800             1.22    Supp. Table 4   -0.1512    -12.39
 CRI                            pnr_continuous_thresholded_ge50      nominal_900m2   1.261700             1.22    Supp. Table 4    0.0417      3.42
 CRI                              available_candidate_pct_valid    ellipsoid_wgs84   1.343000             4.97 Supp. Tables 3-4   -3.6270    -72.98
 CRI                              available_candidate_pct_valid sphere_a_mollweide   1.351500             4.97 Supp. Tables 3-4   -3.6185    -72.81
 CRI                              available_candidate_pct_valid      nominal_900m2   1.595500             4.97 Supp. Tables 3-4   -3.3745    -67.90
 CRI                              available_candidate_bin_valid    ellipsoid_wgs84   4.940300             4.97 Supp. Tables 3-4   -0.0297     -0.60
 CRI                              available_candidate_bin_valid sphere_a_mollweide   4.971600             4.97 Supp. Tables 3-4    0.0016      0.03
 CRI                              available_candidate_bin_valid      nominal_900m2   5.866200             4.97 Supp. Tables 3-4    0.8962     18.03
 CRI                                available_candidate_pct_gt0    ellipsoid_wgs84   1.343000             4.97 Supp. Tables 3-4   -3.6270    -72.98
 CRI                                available_candidate_pct_gt0 sphere_a_mollweide   1.351500             4.97 Supp. Tables 3-4   -3.6185    -72.81
 CRI                                available_candidate_pct_gt0      nominal_900m2   1.595500             4.97 Supp. Tables 3-4   -3.3745    -67.90
 CRI                         country_area_pixel_centres_in_gadm    ellipsoid_wgs84   5.117800              NaN             None       NaN       NaN
 CRI                         country_area_pixel_centres_in_gadm sphere_a_mollweide   5.150200              NaN             None       NaN       NaN
 CRI                         country_area_pixel_centres_in_gadm      nominal_900m2   6.076900              NaN             None       NaN       NaN
 CRI                                 diag_bin1_where_pct_nodata    ellipsoid_wgs84   0.000700              NaN             None       NaN       NaN
 CRI                                 diag_bin1_where_pct_nodata sphere_a_mollweide   0.000700              NaN             None       NaN       NaN
 CRI                                 diag_bin1_where_pct_nodata      nominal_900m2   0.000800              NaN             None       NaN       NaN
 CRI                                   diag_bin1_where_pct_le50    ellipsoid_wgs84   0.006900              NaN             None       NaN       NaN
 CRI                                   diag_bin1_where_pct_le50 sphere_a_mollweide   0.007000              NaN             None       NaN       NaN
 CRI                                   diag_bin1_where_pct_le50      nominal_900m2   0.008200              NaN             None       NaN       NaN
 CRI                                   diag_bin0_where_pct_gt50    ellipsoid_wgs84   0.025300              NaN             None       NaN       NaN
 CRI                                   diag_bin0_where_pct_gt50 sphere_a_mollweide   0.025500              NaN             None       NaN       NaN
 CRI                                   diag_bin0_where_pct_gt50      nominal_900m2   0.030100              NaN             None       NaN       NaN
 CRI                            diag_pct_valid_where_bin_nodata    ellipsoid_wgs84   0.000900              NaN             None       NaN       NaN
 CRI                            diag_pct_valid_where_bin_nodata sphere_a_mollweide   0.000900              NaN             None       NaN       NaN
 CRI                            diag_pct_valid_where_bin_nodata      nominal_900m2   0.001100              NaN             None       NaN       NaN
 CRI                                 diag_pct_nodata_where_bin0    ellipsoid_wgs84   3.597500              NaN             None       NaN       NaN
 CRI                                 diag_pct_nodata_where_bin0 sphere_a_mollweide   3.620300              NaN             None       NaN       NaN
 CRI                                 diag_pct_nodata_where_bin0      nominal_900m2   4.270900              NaN             None       NaN       NaN
 CRI                         country_area_gadm_geodesic_polygon    ellipsoid_wgs84   5.117800              NaN             None       NaN       NaN
 CRI               proportion_continuous_of_available_pct_valid    ellipsoid_wgs84   0.626800             0.21    Supp. Table 3    0.4168    198.46
 CRI                   proportion_binary_of_available_bin_valid    ellipsoid_wgs84   0.207600             0.24    Supp. Table 4   -0.0324    -13.48
 CRI                    sphere_a_over_ellipsoid_minus1_expected              ratio   0.006322              NaN             None       NaN       NaN
 CRI                     sphere_a_over_ellipsoid_minus1_bin_pnr              ratio   0.006322              NaN             None       NaN       NaN
 CRI                   sphere_a_over_ellipsoid_minus1_pct_valid              ratio   0.006320              NaN             None       NaN       NaN
 CRI              sphere_a_over_ellipsoid_minus1_country_pixels              ratio   0.006334              NaN             None       NaN       NaN
area_model                     ellipsoid_wgs84  nominal_900m2  sphere_a_mollweide  paper
metric                                                                                  
available_candidate_bin_valid           4.9403         5.8662              4.9716   4.97
pnr_binary_product                      1.0258         1.2186              1.0323   1.22
pnr_continuous_expected                 0.8417         0.9999              0.8471   1.03

Reading the table (written for the Colombia run; see the CSV for other countries)

  • Binary product. Counting each 0.00025° pixel as a nominal 0.09 ha (nominal_900m2) reproduces Supp. Table 4 almost exactly; the ellipsoidal and Mollweide (sphere-a) areas of the same pixels are ~15 % lower. This points to the binary country sums having been computed as pixel count × 0.09 ha on the lon/lat grid rather than in an equal-area projection, contrary to the Methods. It is an inference from one country, not a demonstrated fact; a second country (e.g. Brazil, 55.12 Mha in Supp. Table 4) would test it.

  • Continuous product. No area model reproduces 11.19 Mha from the published integer-percent tiles: the nominal area is too high, and the ellipsoidal / Mollweide areas fall short unless a sizeable sub-1 % probability mass (stored as NoData) is assumed and values were truncated rather than rounded.

  • The two published products are not one thresholded prediction. Their valid domains differ by ~90 Mha and they disagree near the 50 % threshold and where the continuous product is NoData (diag_* rows).

  • “Available for restoration” (93.78 Mha) is not reproduced by any mask definable from the published rasters.

  • Sphere vs ellipsoid. The Mollweide (sphere radius a) areas exceed the exact WGS84 areas by ~0.66 % at Colombia’s latitudes (sphere_a_over_ellipsoid_*).

Per-percentage area histogram (ellipsoidal) of the continuous product inside Colombia, split by the binary product’s value.

 pct_value  area_mha_total  area_mha_bin0  area_mha_bin1  area_mha_bin_nodata
         3    6.052938e-07   6.052938e-07            0.0                  0.0
         4    9.691045e-06   9.691045e-06            0.0                  0.0
         5    5.012087e-05   5.012087e-05            0.0                  0.0
         6    1.240357e-04   1.240357e-04            0.0                  0.0
         7    2.122698e-04   2.122698e-04            0.0                  0.0 
...
  pct_value  area_mha_total  area_mha_bin0  area_mha_bin1  area_mha_bin_nodata
        98        0.000028       0.000000       0.000028         7.567840e-08
        99        0.000002       0.000000       0.000002         0.000000e+00
       255        3.774792       3.597522       0.000664         1.766067e-01

HEALPix depth-8 aggregation of the authors’ map (NetCDF)

Ellipsoidal areas (m²) of in-country 30 m pixels summed per HEALPix NESTED cell (WGS84 ellipsoid, authalic latitude). HEALPix cells are equal-area, so the cell area is the ellipsoid area / (12 × 4^depth).

<xarray.Dataset> Size: 9kB
Dimensions:         (cells: 120)
Coordinates:
    cell_ids        (cells) uint64 960B 508358 508364 509052 ... 509824 509825
    longitude       (cells) float64 960B -87.01 -87.19 -82.97 ... -85.78 -85.61
    latitude        (cells) float64 960B 5.403 5.554 7.969 ... 11.16 11.01 11.16
Dimensions without coordinates: cells
Data variables:
    area_country    (cells) float64 960B 2.12e+06 2.134e+07 ... 3.124e+08
    area_pct_valid  (cells) float64 960B 0.0 0.0 2.207e+06 ... 4.2e+07 1.126e+08
    expected_pnr    (cells) float64 960B 0.0 0.0 ... 2.281e+07 6.742e+07
    area_pct_gt50   (cells) float64 960B 0.0 0.0 ... 2.62e+07 8.883e+07
    area_bin_valid  (cells) float64 960B 1.716e+06 2.053e+07 ... 3.06e+08
    area_bin_pnr    (cells) float64 960B 0.0 0.0 ... 2.65e+07 8.951e+07
Attributes:
    title:                 Williams et al. (2024) natural-regeneration potent...
    source:                Zenodo 10.5281/zenodo.7428804 (pnv_pct_30m, pnv_bi...
    method:                30 m pixel centres in GADM polygon assigned to HEA...
    healpix_cell_area_m2:  648581977.4933989
    variables:             area_country: all in-country pixels; area_pct_vali...
check: HEALPix total expected = 0.8417395478626494 Mha
<Figure size 1100x600 with 4 Axes>
References
  1. Williams, B., Beyer, H., Fagan, M., Chazdon, R., Schmoeller, M., Sprenkle-Hyppolite, S., Griscom, B., Watson, J., Tedesco, A., Gonzalez-Roglich, M., Daldegan, G., Bodin, B., Celentano, D., Wilson, S. J., Rhodes, J., Alexandre, N., Kim, D.-H., Bastos, D., & Crouzeilles, R. (2023). The potential for natural forest regeneration in tropical regions. Zenodo. 10.5281/ZENODO.7428804