{'fraction_non_alphanumeric': 0.023369695039413965, 'fraction_numerical': 0.018671868779361413, 'mean_word_length': 4.642183288409703, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Uncovering the Fractal Nature of Water Vapor Distribution above the Surface of the Earth

Fractals have been at the heart of geophysical and geospatial studies in the recent past. We examine the emergent fractal character of water vapor distributions above the surface of the Earth as a function of both image resolution (number of pixels) and moisture content percentile. We calculate physically relevant quantities such as fractal dimension, number of clusters, and size of the largest cluster with varying vapor percentile using computational methods and algorithms. We test the applicability of Korcak's law on our system and determine the quality of the fit using the Kolmogorov-Smirnoff satistic. We show that the fractal character of the distribution is exact as a function of image resolution and approximate in some regimes as a function of the vapor percentiles.


I. INTRODUCTION
Initiated by a series of papers of Mandelbrot and Wallis [1][2][3], the fractal dimensional analysis of geophysical variables, over a time period, has become an established tool for the investigation of the dynamics of the systems. This has been followed by applications of the technique to various geophysical phenomena [4][5][6]. The geophysical phenomena, particularly climate variability and trends, have significant environmental and socio-economic impacts. Understanding the emergent fractal structures embedded in certain geographic distributions of physical quantities will lead to further discoveries and characterizations of these quantities.
A fractal [7] is a beautiful and infinite pattern that is self-similar from the macroscopic to the microscopic. Such objects are not integer dimensional in the conventional sense. Fractal dimensional analysis can identify and quantify how the geometry of patterns repeat from one size to another. Scaling laws are at the heart of fractal analyses. Many natural and social-economic phenomena display a scale distribution [1][2][3]7], including coastline and mountain formations. These distributions are approximate fractals, i.e., that they appear scale-invariant in a certain range of scales. It is well understood that while ideal fractals exist as mathematical constructions, the fractal structures found in nature are approximate.
Numerous attempts [8][9][10][11][12][13][14][15][16][17][18][19] that elucidate the spatio-temporal patterns of land surface temperature (LST) and reveal the scaling properties in these distributions motivated us to study the fractal analysis of the distribution of water vapour data. Based on theory, fractal analysis can be used to decompose irregular data sets to many microscopic pictures on multiple scales and reveal their scaling properties in various geospatial distributions.
In this paper, we concentrate on the analysis of Earth's primary greenhouse gas, water vapour, which is a critical component of Earth's climate system. Accurate quantification of water vapour data and the interpretation of its physical characteristics are crucial in understanding how global climate systems, such as global warming, are changing over time. Urban land use [20,21], urban infrastructure [22], and network distributions [23][24][25] have been studied using fractal based analyses and techniques. Similar techniques have also been developed for atmospheric sciences [26]. We, however, seek to characterize water vapor distribution above the entire planet, and not restrict to cities or urban areas. We also analyze the applicability of Korcak's law to our system and provide substantial data driven evidence in the affirmative.
The structure of this manuscript is as follows: In section II we discuss the methods of data acquisition, data extraction, and data processing. In section III, we examine the fractal nature of the distribution as a function of the resolution of the images obtained, namely at 180 × 360 pixels and 360 × 720 pixels. In section IV we examine the fractal character of the vapor distribution as a function of the vapor percentile. We discuss our observations in both sections III and IV. In section V we summarize our findings and conclude.

II. DATA EXTRACTION AND PROCESSING
Data was obtained in the Geotiff format for the monthly global distribution of water vapor from the TERRA MODIS (Moderate Resolution Imaging Spectroradiometer) dataset [27] for 2021 at 360 × 720 pixels and for the years 2012-2021 at 180 × 360 pixels. The MODIS atmospheric water vapor data estimates the total column water vapor made from integrated MODIS infrared retrievals of atmospheric moisture profiles in clear scenes over land and ocean. Note that the total column water vapor can only be obtained in clear-sky conditions. Representative datafiles are plotted in Fig. 1, where the data in the top row is for two different months at the resolutions of 180×360 and 360×720 pixels, respectively, for the left and right plots. This data was then extracted using the Rasterio module in python v3.9 and converted to the numpy array format. Different values of vapor percentiles were chosen from 0 to 100 and the numpy arrays were binned binarily based on whether the value in a given pixel was greater or lesser than the given vapor percentile. The bottom row in Fig. 1 represents the binned data at different vapor percentiles. Once this was completed for all data files, a clustering algorithm was used to to determine the clusters in the binarily binned arrays. This algorithm was recursive and identified all the pixels in the Moore neighborhood of a given pixel. Two pixels are said to be in the same cluster if they both have value 1 and are in each others Moore neigborhood. The pixels were added to a list if they satisfy the above criteria, and the neighboring cells of these added cells were identified. The whole process was repeated until the entire grid was covered. A separate algorithm was used to calculate the perimeters and areas of the clusters. While the areas of clusters were trivial to calculate, since they are simply the number of cells in a cluster, the perimeters were harder to determine and required a caching of the neighbors of each cell. The data produced from these computations was then stored on disk for further analysis.
FIG. 1: Visualization of the MODIS water vapor data: The top panel shows the distributions at two different resolutions, namely 180 × 360 pixels and 360 × 720 pixels. The bottom panel shows the same data after the binning procedure described above. The left plot is at the 80th percentile while the right plot is at the 20th percentile.

III. RESOLUTION BASED NUMERICAL ANALYSIS
The self-similar property underlying the original fractal model assumes that the form or pattern of the spatial phenomenon remains unchanged throughout all scales. Closely related to scale is the concept of resolution. Resolution refers to the smallest distinguishable parts in an object or a sequence and is often determined by the least count of the instrument or the sampling interval used in a study. Moreover, fractals may be useful in identifying the breakpoints in a pattern or distribution at a particular scale where the processes contributing to these patterns become unstable. In this regard, it is important to have a clear understanding of the effect of resolution in fractal dimensional analysis.
We considered the binarily binned data with the clusters being formed by the aggregation of the cells with value 1. We examined data at two different resolutions of 180 × 360 pixels and 360 × 720 pixels in order to see how the nature of the distribution varied as a function of resolution. Alternatively, we could also have binned the cells with value 0 and this would give us a complementary distribution to the one we are currently studying. An analysis of this complimentary distribution, while potentially interesting, is relegated to a future work.

A. Perimeter vs Area Plots
In order to quantify the fractal nature of the water vapor distribution, we consider the aggregated area-perimeter fractal dimension [7,19] of the clusters at each vapor percentile V using the following equation where c represtens each cluster in the total set of clusters C, A c and P c are the area and the perimeter of the cluster c, k = 2 √ π, and D is the fractal dimension. The value of k is determined based on the limiting case of a circle. When the shapes of the clusters cumuluatively are more elongated or convoluted, we approach the linear limit of P = A and D = 2.
The distributions of clusters are obtained at different values of the water vapor percentile ranging from 0 to 100. We present below a log-log plot of the distribution of the cumulative perimeter vs cumulative area at different percentiles for the year 2021. All 12 months of the year are considered in the analysis at two different resolutions of 180 × 360 pixels and 360 × 720 pixels. The slope of the scatter plots represents the fractal dimension up to an additive constant.
FIG. 2: Aggregate area-perimeter scatter plot at 180x360 pixels and 360x720 pixels on the left and right, respectively. The fact that the distributions look almost identical at these two resolutions leads us to explore further.
As a very interesting observation, we note that the distributions (and in particular, the slopes) look visually identical at both resolutions, indicating that there maybe some universality in the data as a function of resolution. Thus, we find motivation to explore this aspect further.

B. Fractal Dimension
We plot the fractal dimensions as a function of water vapor percentiles for the 12 months in 2021 at both resolutions. The results are shown in Fig. 3. We observe that the fractal dimensions are in general identical for the cluster distribtuions at both resolutions for almost all the months. We find that the January data presents a disagreement to the previous observation and we allude this discrepancy to an anomaly in the data, since it is not a prevalent phenomenon. The fact that the fractal dimension is independent of resolution is a key result of this work, as the fundamental construction of fractals states that fractal geometries are scale invariant. While we would like to have explored this further at other resolutions, current computational capacity limits this.

C. Percolation Phenomena
The existence of percolation phenomena associated with the vapor distribution clusters may be studied by examining the number of clusters at different vapor percentiles. We examine the scaled number of clusters as a function of vapor percentile. The scaled number of clusters is defined as follows scaled # of clusters = # of clusters maximum # of clusters (2) The results are plotted in Fig. 4 for all 12 months in 2021 at both resolutions. Strikingly, we find once again, an almost identical distribution at both resolutions, further strengthening our claim of scale-invariance. We observe a general trend that above V = 30% the number of clusters remain approximately constant, while below this percentile the number of clusters drop linearly to 1 at V = 0. This indicates that a percolation phenomenon exists, such that below the 30th percentile the clusters aggregate to form larger and larger clusters. The percolation threshold is thus estimated to be V thres = 30% and is represented in Fig. 4 as the dashed vertical line. The anomaly presented in the previous subsection is also present in this case for the month of January.

D. Maximum Cluster Size
We also examine the variation of the scaled maximum cluster size as a function of the vapor percentile and the results for both resolutions is presented in Fig. 5. The scaled maximum cluster size is defined as scaled maximum size of clusters = local maximum cluster size global maximum cluster size The data in the plots below corroborate well with the story presented in the previous subsection, with the scaled maximum cluster size decreasing from 1 to 0 as the vapor percentile increases from 0 to 100. As such, this shows that the clusters are largest at 0% and get smaller as the vapor percentile increases. The curves presented in Fig. 5 appear to be decaying exponentials though we have not attempted to fit the data to an exponentially decaying fit function. We note that there appears to be a dip in the scaled maximum cluster size for all months at the 60th percentile, but we don't have a good physical reason for its occurence.

E. Scaling Exponents
In fractal landscape structures, clusters are statistically self-similar at the percolation threshold over certain sizeranges. The cluster areas follow a probability distribution with a power-law tail [28] at the percolation threshold. The physcist Korcak made this prediction, and the law is now known as Korcak's law [29]. We wish to examine the applicability of Korcak's law to our distribution, wherein the statement of the law reads where a represents the area of a cluster, P (a) represents the probability of randomly selecting a cluster of size a, and β is the scaling exponent. Tempering may occur as a result of deviations from the powerlaw above the percolation threshold [30].
We plot the probabilities for March 2021 as a function of the cluster areas in Fig. 6 at the percolation threshold for both resolutions, 180 × 360 pixels on the left and 360 × 720 pixels on the right. The data is plotted as the orange scatter points, and the power-law fit is represented by the blue line. We test for the quality of the fit by using the Kolmogorov-Smirnoff (KS) statistic. These values are stated in the plots below. As we can see, the fit to the data is close to perfect, with the KS statistic being approximately 1 (up to machine precision) and the p-value being 0. This verifies that our data is in agreement with Korcak's law.
We also plot the scaling exponents for the data at the percolation threshold for all months of the year 2021 in Fig.  7. The blue markers show the scaling exponents for the 180 × 360 pixel data and the orange dots show the same for the 360 × 720 pixel data. The scaling exponents are not identical for each month at the two resolutions and there is no reason to believe that there should be a correspondence. The range exhibited by the scaling exponent is β ∈ (1.6, 2.3). We have verified that in each case the KS statistic is very close to 1 and the p-value is roughly 0.

IV. VAPOR PERCENTILE BASED NUMERICAL ANALYSIS
In this section, we examine the fractal nature of the water vapor distribution as a function of vapor percentile. We conduct the analysis at a data resolution of 180 × 360, and 10 years worth of monthly data is considered in the period 2012 − 2021. We proceed with the analysis as in the previous section and the results are presented below.

A. Perimeter vs Area
We start by plotting the cumulative perimeter versus the cumulative area on a log-log plot. The plots are presented in Fig. 8 where we average over each month on the left plot and over each year for the plot on the right. The distributions are very similar with the fractal dimension lying between 1 and 2 which are the limiting cases of a circle and a straight line. This is the first indication that there is some fractal character to the distribution, since the aggregated area-perimeter fractal dimension is not an integer. We next examine the fractal dimensions for all 12 months of the years 2012 − 2021 as a function of the vapor percentile. Each subplot in Fig. 9 contains the data for all 10 years for a given month. We notice an overall trend in the behavior of the fratal dimension while the exact numerical values are case dependent, but continue to lie in the interval 1 < D < 2. For each of the subplots in Fig. 9 we observe that the fractal dimension increases rapidly for vapor percentiles V ≤ 30%, and then stabilizes to an approximately fixed value in the range 30 < V < 50. Then the fractal dimensions increase again in the interval 50 ≤ V < 80, but more gradually than before. Finally, the fractal dimensions remain steady for percentiles 80 ≤ V ≤ 100. We can thus conclude that the fractal dimension remains constant in two regimes of vapor percentiles, and so the clusters exhibit an approximate fractal behavior as a function of threshold in these two regimes. Outside these regimes, since the fractal dimensions vary with vapor percentile, we cannot conclude an approximate fractal behavior.
We further plot the monthly and yearly averaged distributions of fractal dimensions as a function of vapor percentile in Fig. 10. Some interesting trends arise as a result of this data representation. Firstly, we see that on the left plot of Fig. 10 that fractal dimensions show a broad distribution at 80% ≤ V ≤ 100% with the hottest and driest months of the year in the Northern hemisphere, May and June showing the lowest values. A comparatively drier month, December, shows the next highest value of fractal dimension in this regime, while the rest of the months are clumped together. The yearly or annual averages also show unobvious trends, with the fractal dimension distributions being almost identical in the ranges 0% ≤ V ≤ 40% and 80% ≤ V ≤ 100%. In the intermediate range 40% < V < 80%, the distributions grow in magnitude at different rates for different years, with the peak growth rate being observed for the year 2018. The plot on the right shows that the peak fractal dimension occurs for the year 2017 and this value is reached at the 60th percentile.

C. Percolation Phenomena
We plot the number of clusters as a function of vapor percentile for each month for all 10 years, 2012 − 2021 in the plots in Fig. 11. While the distributions of cluster sizes are narrow for each month for percentiles V < 30%, they form a broad distribution above this percentile. The phenomenon of percolation is once again observed here and we percolation the peroclation threshold percentile as V thres = 30%. Above the 30th percentile, the number of clusters is approximately constant for each year, while below it the number of clusters falls in a linear manner to 1 at V = 0%. Other features exist in the plots in Fig. 11, however, we can make no ubiquitous statements about these features and so we decide not to discuss them in any detail.
In Fig. 12, we plot the same distributions as in Fig. 11 averaged over years and months on the left and right plots, respectively. For the plot on the left, the cluster counts show a broad distribution at percentiles higher than V = 50%. The general trend is for the number of clusters to increase with the increase in vapor percentile, with the highest value being held by April at the 100th percentile. The plot on the right shows an overlap for the data at percentiles lower than V = 30%. At percentiles higher than V thres , the distribution assumes a broader character, with the highest cluster count being exhibited by 2015 at the 100th percentile. As before, we also plot the size of the largest cluster as a function of vapor percentile for each month for all 10 years at a resolution of 180 × 360 pixels. These plots are shown in Fig. 13. The distributions show an exponential decay for all months and years, with significant overlap between the data for different years. Some exceptions to this observations occur on and around the 60th percentile. The distributions agree well with the percolation hypothesis, since at low vapor percentiles there exits one single massive cluster while at very large percentiles, the average size of clusters is small and approximately constant. While we observe that the decays are likely exponential, we make no attempt at fitting them to some fit function. We also plot the above data averaged over years and months in Fig. 14 on the left and right plots, respectivelty.
The plot on the left shows a relatively broad distribution for percentiles less than 30%, and a narrow or convergent distribution for larger percentiles. The overall tendency of the distribution is one of an exponential decay, although there exist some inflection points in the interim. The plot on the right, which represents data averaged anually, shows a large overlap for all years except around the 60th percentile. While this is an interesting observation, we have no hypotheses as to appearance of the broadening and the relavance of the 60th percentile to it.

E. Scaling Exponents
As discussed previously, we are interested in testing the validity of Korcak's law for our distributions. We proceed as before and calculate the probabilities P (a) for all areas of cluster size a. We plot the probabilities for the March 2021 data as a function of the cluster areas in Fig. 15 at the percolation threshold (left plot) and at the 75th percentile (right plot). The data is plotted as the orange scatter points, and the power-law fit is represented by the blue line. We test for the quality of the fit by using the Kolmogorov-Smirnoff (KS) statistic. These values are stated in the plots below. As we can see from the plots below, the fit to the data is close to perfect, with the KS statistic being approximately 1 and the p-value being 0. This verifies that our data is in agreement with Korcak's law, with little deviation from the powerlaw behaviour even above the percolation threshold.
We plot the scaling exponents for the data at the percolation threshold averaged over years and months in Fig.  16 on the left and right plots respectively. The scatter plots contain the mean scaling exponents and the respective standard deviations. The range of the scaling exponents in both cases lie between 1.90 and 2.20 with relatively small deviations from the mean. We have verified that in each case the KS statistic is very close to 1 and the p-value is roughly 0. In this work we have sought to unravel the underlying fractal nature of the distribution of water vapor above the Earth. We have obtained data from the TERRA MODIS dataset and processed it using python v3.9. Clustering and numerical calculations were performed using author-designed algorithms.
We first investigated the variation of fractal dimension of the dataset as a function of the resolution of the data at resolutions of 180 × 360 pixels and 360 × 720 pixels for the year 2021. We found that the fractal dimension of the vapor distribution as a function of vapor percentile remained universal with values between 1 and 2 for both resolutions for all months except January. The anomalous result for January 2021 was attributed to some inconsitency in constructing the dataset. Further, the scaled number of clusters as a function of vapor percentile was plotted, and we found percolation to occur at V thres = 30%. This observation was further supported by the results of plotting the scaled maximum cluster size versus vapor percentile. Both sets of representations showed an identical overlap between the data for both resolutions, further confirming the universality of the fractal structure as a function of resolution. We then determined the scaling exponent for this data distribution based on Korcak's law and found our numerical analysis to be in agreement with it. The quality of our fit was tested using the Kolmogorov-Smirnov statistic which approached unity, with a p-value of zero. This confirmed the excellent quality of our fit function and parameters.
We then examined the variation of fractal dimension of the dataset as a function of vapor percentile at a resolution of 180 × 360 pixels for the years 2012-2021. The fractal dimension of the vapor distribution as a function of vapor percentile remained constant (as a function of vapor percentile) in certain ranges with values between 1 and 2 for all months and years. We therefore concluded that the data exhibited approximate fractal behavior in these ranges of vapor percentiles. The number of clusters as a function of vapor percentile was plotted, and we found percolation to occur at V thres = 30%. This observation was further supported by the results of plotting the maximum cluster size versus vapor percentile. We plotted the monthly averaged and yearly averaged version of all three quantities discussed above and found some interesting trends in the distributions. The data was then fitted to Korcak's law and the scaling exponents were determined. We tested the quality of our fit using the Kolmogorov-Smirnov statistic which approached unity, with a p-value of zero. This affirmed the effectiveness of our fit function and parameters.
In conclusion, we find that the water vapor distribution above the surface of the Earth exhibits a fractal character as a function of data resolution and vapor percentile, the former of which is exact while the latter is approximate. The water vapour clusters display properties analogous to that of a percolating system as we vary the vapour percentile. At the percolation threshold, the size distribution of these water vapour clusters follows a power law, namely Korkac's law, with a scaling exponent of β ∈ (1.6, 2.3). To the best of our knowledge, the examination of the global distribution of water vapor from a fractal perspetctive is novel, which underlies the importance of this work.