Message Boards Message Boards

[WSS17] A study of climate change regional impact based on local CO2 levels

Abstract

The goal of the project was to find how do the amounts of carbon dioxide can influence the temperature locally and how effective is greenhouse effect locally. The local amounts of carbon dioxide in some places (especially Urban ones) can be consistently higher than in others. Although the weather is very dynamic and inconsistent, it is interesting to see if there is any correlation between the temperature and amounts of carbon dioxide locally, so the heat might get trapped and increase the temperature.

The work could be divided in few steps:

  • Retrieving the data from OCO-2 NASA satellite, which measures amount of carbon dioxide globally.
  • Retrieving the weather data from Wolfram repository: the temperature data from weather stations, which date back to 1950s, were retrieved and plotted. The measurements of carbon dioxide from OCO-2 satellite was retrieved: the measurements included points around all the globe.
  • Only small amount (66) of reliable weather stations date back to 1950s. There was no increase in average temperature observed overall, however, this is obviously very small sample and it is very hard to predict any reliable results from such a small number of samples.

The data of NASA sattelite OCO-2 (Orbting Carbon Observatory) ( Orbiting Carbon Observatory was retrieved from NASA database (you need to register, to access the files), where OCO2L2Standard.7r/ file was used (L2 stands for level 2 processed data).

The data was accessed in the format as in the example below: NASA Sattelite data HDF file example

As the OCO2L2Standard.7r/ file contains approximately 2-3 TB of data, some data processing had to be performed, in order to successfully run the data analysis.

The following method was employed:

  • The data was downloaded using Wget software;
  • All time, latitude, longitude, CO2 measure, uncertainty and measuring mode values were imported;
  • All of the aforementioned values were gathered and exported into .mx file.

Firstly, a set of functions were created for looping through the files, which were named "001", "002", "003" etc by NASA. (Base directory is the directory set in the folder, where all the downloaded files "001", "002", "003" etc to the computer exist).

    dayToStr[day_] := StringJoin[ToString /@ IntegerDigits[day, 10, 3]]

    folderStr[{year_, day_}] := 
     FileNameJoin[{baseDirectory, ToString@year, dayToStr@day}]

    waitFolder[{year_, day_}] := While[! DirectoryQ[folderStr[{year, day}]]];

    daysAll = Join[Table[{2014, d}, {d, 249, 355}],Table[{2015, d}, {d, 1, 355}],Table[{2016, d}, {d, 1, 355}],Table[{2017, d}, {d, 1, 152}]];

NB: The measurements start at 6th September (249th day of 2014) and at the time of writing 152nd day of 2017 was the last on record.

    dayFinished[{year_, day_}] := 
     FileExistsQ[FileNameJoin[{baseDirectory, ToString[{year, day}] <> ".mx"}]]

    daysToProcess = Select[daysAll, (! dayFinished[#] &)];

The following directory was provided by NASA, in order to download the files via Wget. Therefore, .bat file was run, looping through the files within each year and delete the downloaded file (so not to fill the memory space of the hard drive):

    script = StringJoin[
       "mkdir \"" <> FileNameJoin[{baseDirectory, ToString@#1}] <> "\"
          mkdir \"" <> folderStr[{##}] <> "\"
          cd \"" <> folderStr[{##}] <> "\"
          wget --load-cookies c:\\\\Users\\\\PC\\\\.urs_cookies --save-cookies c:\
    \\\\Users\\\\PC\\\\.urs_cookies --keep-session-cookies -r -c -nH -nd -np -A \
    h5,xml \"https://oco2.gesdisc.eosdis.nasa.gov/data/s4pa/OCO2_DATA/OCO2_L2_\
    Standard.7r/" <> ToString@#1 <> "/" <> dayToStr@#2 <> "/\"

          " & @@@ daysToProcess];

    SetDirectory[baseDirectory];
    Export["runNew.bat", script, "Text"];

    Function[index, Block[{yearday},
        yearday = daysToProcess[[index]];
        Print["Waiting for day " <> ToString@daysToProcess[[index + 1]] <> 
          " to appear"];
        waitFolder[daysToProcess[[index + 1]]];
        Print["   processing day " <> ToString@yearday];
        Export[FileNameJoin[{baseDirectory, ToString@yearday}] <> ".mx",
         ReadDay[folderStr@yearday]
         ];
        SetDirectory[baseDirectory];
        DeleteDirectory[folderStr@yearday, DeleteContents -> True];
        ]] /@ Range[Length[daysToProcess]];

Afterwards the measuring points of the satellite were drawn for one day:

enter image description here

Not all of the points are drawn on the satellite's pathway, since some points have been unusable due to the clouds and some were calibrated against other factors, such as darkness, cosmic rays etc.

Data analysis

The data was analysed from view perspectives: from perspective of Carbon dioxide, temperature change and both elements combined together. It was done in few steps:

  1. The WeatherData imported all the weather stations present on Earth and the they were filtered out to include only old enough ones, which contain more than one data point since Jan 1 1950.
  2. The goal was to find all the points, approximately 0.5 degree away from the point.
  3. The weather stations then were filtered out, in order to make the computation faster (as there are ~125000 valid data points as it turned out later in the course of the exploration). To do that, first the weather stations were clustered according to their coordinates, using method DBSCAN:

    clustering2 = FindClusters[GeoPosition /@ vet4Coordinates, Method -> "DBSCAN"];
    GeoListPlot[clustering2]
    

enter image description here

"Three-layer" filter was built:

  • The rectangles then were drawn on top of each grouped set of weather stations;
  • Then yellow rectangles were drawn, covering most of the Earth;
  • Finally, small rectangles, with dimensions of 0.5 x 0.5 degrees latitude/longitude, with the centred weather station were drawn.

enter image description here

3.. Most of the points were "caught" by the first filter - yellow rectangles: any point falling within those boundaries was immediately removed; Secondly, all the points that were within the bigger black rectangle regions were included into the list; Thirdly, only the points that fell within the smaller rectangle boundaries were kept in the final list of "useful data".

The data was gathered and carbon dioxide average taken over this area. The following image is an example of an area around Berlin. Each point is a separate satellite measurement.

GeoGraphics[{Opacity[0.6], Red, 
    Point@*GeoPosition /@ dataPerStation[[#, All, {3, 4}]], Blue, 
    GeoDisk[vet4Coordinates[[#]], Quantity[50, "Miles"]]},
   GeoRange -> Quantity[50, "Miles"], 
   GeoCenter -> vet4Coordinates[[#]]] &[12]

enter image description here

As a result, the average amount of carbon dioxide was measured for every weather station present since 1950 Jan 1 and plotted in the list:

GeoRegionValuePlot[
 Thread[(GeoDisk[GeoPosition[#], Quantity[150, "Miles"]] & /@ 
     vet4Coordinates) -> 1000000 median], PlotLegends -> Histogram, 
 PlotRange -> {395, 407}]

enter image description here

Values were retrieved for every the weather station, and so the average yearly temperature of every such weather station plotted:

ListLinePlot[Transpose[{Range[1950, 2016], yearlyT[[6]]}]]

enter image description here

Afterwards, the two data sets should be compared. The linear coefficient of yearly average temperature of every station was computed:

coef = (LinearModelFit[{#1, QuantityMagnitude[#2]} & @@@ 
       Select[Transpose[{Range[1950, 2016], #}], ! 
          MissingQ[#[[2]]] &], x, x] & /@ yearlyT)[[All, 1, 2, 2]]

{0.00371378, 0.0542189, 0.0820265, 0.0160782, 0.00793586, 0.0580557, \
0.0055168, 0.0947859, 0.0509784, 0.0816632, 0.103044, 0.0820661, \
0.118003, 0.0342412, 0.0217804, 0.105359, 0.0403722, 0.0276531, \
0.0477835, 0.0347086, 0.023233, 0.00935989, 0.0482361, 0.0630625, \
0.040502, 0.0282736, -0.0659128, 0.00591188, 0.040027, 0.120001, \
0.106594, 0.0421535, 0.0864724, 0.129447, 0.0260252, 0.052249, \
0.0353381, 0.031032, 0.027143, 0.0352129, 0.16812, 0.0386357, \
0.0671354, 0.0159072, 0.0359843, -0.0118974, -0.0145698, 0.0160264, \
0.0469458, 0.0202098, 0.0893197, 0.032603, -0.0141009, 0.0570599, \
0.00816991, 0.0332818, 0.0567717, 0.0272904, 0.0578431, 0.0748964, \
0.102903, 0.114452, 0.0156321, 0.0405842, 0.0606741, 0.0793137}

The value of coefficient (in y axis) was compared to the amount of Subscript[CO2, 2] around that station over 2014-2017 years. The following plot was obtained:

ListPlot[Transpose[{median, coef}], AxesLabel -> {"CO2", "lin x, F"}]

enter image description here

It seems as there is very little correlation found between the local amount of carbon dioxide and temperature change over the past 67 years. However, very few points were available and it is very hard to draw solid conclusions from that. One thing to take into account is that the although very insignificant, there was seen some positive correlation of temperature increase over the last 67 years. On the other hand, the amount of carbon dioxide in those places seemed not to correlate with the local temperature changes. While it is known that the weather is extremely dynamic, the hypothesis that the carbon dioxide locally would have some significance, especially in the areas with the high carbon dioxide emittance, where the carbon dioxide could potentially trap the heat and create micro climate for greenhouse effect.

This is just a regional comparison of the weather, which once more proves that weather is extremely dynamic element and should not be modelled regionally. Or it might be just another supportive statement that climate change is a hoax. Is it?

GitHub link

POSTED BY: Mantas Pastolis
3 Replies

Thanks Neil,

I agree that weather (temperature, wind) and concentrations of carbon dioxide are extremely dynamic elements around the earth. However, after looking at this video, made by NASA, which shows the movement of carbon dioxide all over the Earth, I noticed that some sources of carbon dioxide (eastern US, south east China and Hong Kong, for example) have a constant cloud of gases over it. Therefore, I wanted to check, if carbon dioxide can actually trap heat locally. I agree with you that carbon dioxide is by far not the only reason for greenhouse effect, however, I could not find the satellite data for other GHGs and decided to restrict myself to carbon dioxide for now.

POSTED BY: Mantas Pastolis

... Although I liked your presentation and I think it does a good job of showing that climate change is not a local phenomena (since it is recognized as a global issue of accumulating heat). I just think your conclusion does not follow from your analysis.

POSTED BY: Neil Singer

Mantas,

I think your whole premise that local CO2 has an affect on local weather makes no sense when you understand the mechanism of how CO2 warms the earth. The idea is that greenhouse gasses (and not just Co2) absorb energy in the infrared spectrum so they stop the earth from radiating some heat at night that would normally be radiated. This is not a local affect and is a cycle that happens every day and night. A good discussion of this can be found here

POSTED BY: Neil Singer
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract