<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Elian Wira Sena on Medium]]></title>
        <description><![CDATA[Stories by Elian Wira Sena on Medium]]></description>
        <link>https://medium.com/@elianwirasena?source=rss-c757a480b620------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*L2vjaQ2nsD967oeyTENDEQ.jpeg</url>
            <title>Stories by Elian Wira Sena on Medium</title>
            <link>https://medium.com/@elianwirasena?source=rss-c757a480b620------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 22:34:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@elianwirasena/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Extracting Wind Components from Reanalyse (Atmospheric reanalysis) data]]></title>
            <link>https://elianwirasena.medium.com/extracting-wind-components-from-reanalyse-atmospheric-reanalysis-data-346c4a77c24c?source=rss-c757a480b620------2</link>
            <guid isPermaLink="false">https://medium.com/p/346c4a77c24c</guid>
            <category><![CDATA[wind]]></category>
            <category><![CDATA[remote-sensing]]></category>
            <category><![CDATA[hamburg]]></category>
            <category><![CDATA[gis]]></category>
            <category><![CDATA[meteorological-data]]></category>
            <dc:creator><![CDATA[Elian Wira Sena]]></dc:creator>
            <pubDate>Tue, 04 Jul 2023 19:07:47 GMT</pubDate>
            <atom:updated>2023-07-04T19:36:38.456Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/307/1*wHX03XpCuqTWoMoZcJUJCQ.png" /></figure><h3>Atmospheric Reanalysis</h3><p>Reanalysis data provide the most comprehensive depiction of weather and climate in the past [2].</p><p>They combine observations and reruns of historical short-range weather forecasts using contemporary weather forecasting models. Globally complete and temporally consistent, they are sometimes called “maps without gaps” [2].</p><figure><img alt="reanalysis process [2]" src="https://cdn-images-1.medium.com/proxy/0*hrTIdsUiqyW8VxAK.jpg" /><figcaption><strong><em>Figure reanalysis process [2].</em></strong></figcaption></figure><h3>Data understanding</h3><p><strong><em>The dataset: ERA5</em></strong></p><p>ERA5 is the European Centre for Medium-Range Weather Forecasts’ fifth-generation atmospheric reanalysis of the world’s climate from January 1940 to the present. ERA5 is produced by the Copernicus Climate Change Service (C3S) at ECMWF [1].</p><p>A wide range of atmospheric, terrestrial, and marine climate variables are estimated hourly by ERA5. The data are global, with a grid spacing of 30km, and they resolve the atmosphere at 137 levels, from ground level to an altitude of 80km. Uncertainties for all variables at lower spatial and temporal resolutions are included in ERA5 [1].</p><h3>Process</h3><p><em>Step in this story</em></p><ul><li>Initialize the Google Earth Engine API</li><li>Set up data.</li><li>Select a <em>Region of Interest</em> or location of studies.</li><li>Analyze Data</li><li>Visualize Data</li><li>Enhance, Modify and/or Refine the question</li></ul><p><strong><em>Tools on this story</em></strong></p><ul><li>Google Earth Engine</li><li>Google Colab/ Jupyter notebook</li><li>Python</li><li>Pandas</li></ul><h3>Working</h3><h4>1. Authenticate and Initialize Earth Engine</h4><p>Earth Engine API is already installed in Google Colab, so we must import and authenticate to access it.</p><pre>import ee<br><br># Trigger the authentication flow.<br>ee.Authenticate()<br><br># Initialize the library.<br>ee.Initialize()</pre><h3>2. Set up data of interest</h3><p>Image collection<strong> </strong>:</p><p><strong><em>ERA5 Daily Aggregates — Latest Climate Reanalysis Produced by ECMWF / Copernicus Climate Change Service</em></strong></p><p>Google Earth Engine Snippet :</p><p><strong><em>ee.ImageCollection(“ECMWF/ERA5/DAILY”)</em></strong></p><p>Band of interest :</p><p><strong><em>u_component_of_wind_10m → u-component of wind (daily average) </em></strong>10m</p><p><strong><em>v_component_of_wind_10m→ v-component of wind (daily average) </em></strong>10m</p><pre># Selection of image collection.<br>wind_image = ee.ImageCollection(&#39;ECMWF/ERA5/DAILY&#39;)<br><br># Initial date of interest (inclusive).<br>i_date = &#39;2010-01-01&#39;<br><br># Final date of interest (exclusive).<br>f_date = &#39;2022-01-01&#39;<br><br># Selection of band u_component_of_wind_10m and dates .<br>wind_u = wind_image.select(&#39;u_component_of_wind_10m&#39;).filterDate(i_date, f_date)<br>#Selection of band v_component_of_wind_10m and dates .<br>wind_v = wind_image.select(&#39;v_component_of_wind_10m&#39;).filterDate(i_date, f_date)</pre><h3>3. Set up data of interest</h3><p>In this study, we will work on <strong>Hamburg</strong>:</p><pre># Region of interest<br>Hamburg_lon = 10.451526<br>Hamburg_lat = 51.165691<br>Hamburg_point = ee.Geometry.Point(Hamburg_lon, Hamburg_lat)</pre><h3>4. Analyze Data</h3><p>we tested and did a simple data analysis</p><pre># Calculate and print the mean value of the LST collection at the point.<br>scale = 1000  # scale in meters<br>wind_urban_u = wind_u.mean().sample(Hamburg_point,scale).first().get(&#39;u_component_of_wind_10m&#39;).getInfo()<br>wind_urban_v = wind_v.mean().sample(Hamburg_point,scale).first().get(&#39;v_component_of_wind_10m&#39;).getInfo()<br>print(&#39;Hamburg wind component u:&#39;, round(wind_urban_u, 2), &quot;m/s&quot;)<br>print(&#39;Hamburg wind component v:&#39;, round(wind_urban_v, 2), &quot;m/s&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/226/1*jR7J9zkHmryn_RER5lqQJQ.png" /><figcaption>The output</figcaption></figure><h3>4. Extract Data</h3><p>get whole wind component data at Hamburg from ‘2010–01–01’ to ‘2022–01–01’</p><pre># Get the data for the pixel intersecting the point in rural area.<br>wind_u_Hamburg_full = wind_u.getRegion(Hamburg_point, scale).getInfo()<br>wind_v_Hamburg_full = wind_v.getRegion(Hamburg_point, scale).getInfo()<br># Preview the result.<br>wind_u_Hamburg_full[:3]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/473/1*YlC_Y7nz-eDD8jgN6Vff6w.png" /><figcaption>Preview the result</figcaption></figure><h3>5. Transform to pandas Dataframe</h3><p>create extraction function and transform the time to datetime to make it easier to merge data v and u</p><pre>def dfdata(data,v):<br>    df = pd.DataFrame(data) #Convert list to dataframe<br>    headers = df.iloc[0]   # Rearrange the header.<br>    df = pd.DataFrame(df.values[1:], columns=headers)   # Rearrange the header.<br>    if v == &quot;v&quot;:<br>      df = df[[&#39;longitude&#39;, &#39;latitude&#39;, &#39;time&#39;, &quot;v_component_of_wind_10m&quot; ]].dropna() # Remove rows with null data.<br>      df[&#39;datetime&#39;] = pd.to_datetime(df[&#39;time&#39;], unit=&#39;ms&#39;)  # Convert datetime to datetime values.<br>      df[ &quot;v_component_of_wind_10m&quot;] = pd.to_numeric(df[ &quot;v_component_of_wind_10m&quot;], errors=&#39;coerce&#39;)    # Convert to numeric values.<br>      df = df[[&#39;datetime&#39;,  &quot;v_component_of_wind_10m&quot;   ]] # take interest part<br>    else:<br>      df = df[[&#39;longitude&#39;, &#39;latitude&#39;, &#39;time&#39;, &quot;u_component_of_wind_10m&quot; ]].dropna() # Remove rows with null data.<br>      df[&#39;datetime&#39;] = pd.to_datetime(df[&#39;time&#39;], unit=&#39;ms&#39;)  # Convert datetime to datetime values.<br>      df[ &quot;u_component_of_wind_10m&quot;] = pd.to_numeric(df[ &quot;u_component_of_wind_10m&quot;], errors=&#39;coerce&#39;)    # Convert to numeric values.<br>      df = df[[&#39;datetime&#39;,  &quot;u_component_of_wind_10m&quot;   ]] # take interest part<br>    return df</pre><p>now extract the wind component data :</p><pre>df_v = dfdata(wind_v_Hamburg_full,&quot;v&quot;) #Convert list to dataframe<br>df_u = dfdata(wind_u_Hamburg_full,&quot;u&quot;)#Convert list to dataframe<br>wind_dataset = df_v.merge(df_u, left_on=[&#39;datetime&#39;],right_on=[&#39;datetime&#39;], how=&#39;left&#39;)<br>wind_dataset</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*xoQaBwyY9N09EItvQuDgig.png" /><figcaption>Wind Component U &amp; V at Hamburg from 2010 to 2020 is ready to use</figcaption></figure><h3>6. Visualization of Dataframe</h3><p>ERA5 Daily Aggregates visualization :</p><p><em>u (from west to east) in m/s</em></p><p><em>v (from south to north) in m/s</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lTmU-Q1mkfQZZqJvJTq5Og.png" /><figcaption>U component of wind 10m at Hamburg from 2010 to 2020</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K4_OJlzT58Trkv-9qsYN1w.png" /><figcaption>V component of wind 10m at Hamburg from 2010 to 2020</figcaption></figure><ol><li><a href="https://www.ecmwf.int/en/forecasts/dataset/ecmwf-reanalysis-v5">https://www.ecmwf.int/en/forecasts/dataset/ecmwf-reanalysis-v5</a></li><li><a href="https://www.ecmwf.int/en/about/media-centre/focus/2020/fact-sheet-reanalysis">https://www.ecmwf.int/en/about/media-centre/focus/2020/fact-sheet-reanalysis</a></li><li>Gorelick, N., Hancher, M., Dixon, M., Ilyushchenko, S., Thau, D., &amp; Moore, R. (2017). Google Earth Engine: Planetary-scale geospatial analysis for everyone. <em>Remote Sensing of Environment</em>.</li><li>Copernicus Climate Change Service (C3S) (2017): ERA5: Fifth generation of ECMWF atmospheric reanalyses of the global climate. Copernicus Climate Change Service Climate Data Store (CDS), (date of access), <a href="https://cds.climate.copernicus.eu/cdsapp#!/home">https://cds.climate.copernicus.eu/cdsapp#!/home</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=346c4a77c24c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to load Landsat Imaginary Data with EE]]></title>
            <link>https://elianwirasena.medium.com/how-to-load-landsat-imaginary-data-with-ee-f04f146ed4a3?source=rss-c757a480b620------2</link>
            <guid isPermaLink="false">https://medium.com/p/f04f146ed4a3</guid>
            <category><![CDATA[geospatial]]></category>
            <category><![CDATA[gis]]></category>
            <category><![CDATA[remote-sensing]]></category>
            <category><![CDATA[geospatial-data]]></category>
            <category><![CDATA[germany]]></category>
            <dc:creator><![CDATA[Elian Wira Sena]]></dc:creator>
            <pubDate>Wed, 28 Jun 2023 16:43:08 GMT</pubDate>
            <atom:updated>2023-06-28T16:43:08.473Z</atom:updated>
            <content:encoded><![CDATA[<p>Working with Remote Sensing Satelite</p><p><strong><em>Tools will be used in this story</em></strong></p><ul><li>Google Earth Engine</li><li>Google Colab/ Jupyter notebook</li><li>Python</li><li>Pandas</li></ul><p><strong><em>Regional of Interest :</em></strong></p><ul><li>Hamburg</li></ul><h3><strong>1. Authenticate and Initialize Earth Engine</strong></h3><p>Earth Engine API is already installed in Google Colab, so we must import and authenticate to access it.</p><pre>import ee<br><br># Trigger the authentication flow.<br>ee.Authenticate()<br><br># Initialize the library.<br>ee.Initialize()</pre><h3>2. Set up data of interest</h3><p>In this study, we will work on Germany and use the SRTM satellite data</p><p>The Shuttle Radar Topography Mission (SRTM, see <a href="https://onlinelibrary.wiley.com/doi/10.1029/2005RG000183/full">Farr et al. 2007</a>) digital elevation data is an international research effort that obtained digital elevation models on a near-global scale. NASA JPL provides this SRTM V3 product (SRTM Plus) at a resolution of 1 arc-second (approximately 30m).</p><pre>countries = ee.FeatureCollection(&quot;USDOS/LSIB_SIMPLE/2017&quot;);<br>Germany = countries.filter(ee.Filter.eq(&quot;country_na&quot;,&quot;Germany&quot;))<br>dem = ee.Image(&#39;USGS/SRTMGL1_003&#39;)</pre><h3>3. Visualize Data with Folium Package</h3><p>function to display image tiles to the folium map</p><pre>import folium<br>def add_ee_layer(self,ee_image_object,vis_params,name):<br>  map_id_dict = ee.Image(ee_image_object).getMapId(vis_params)<br>  folium.raster_layers.TileLayer(<br>      tiles = map_id_dict[&#39;tile_fetcher&#39;].url_format,<br>      attr = &#39;Map Data &amp;copy; &lt;a href=&quot;https://earthengine.google.com/&quot;&gt;Google Earth Engine&lt;/a&gt;&#39;,<br>      name = name,<br>      overlay = True,<br>      control = True).add_to(self)</pre><p>drawing the map</p><pre>folium.Map.add_ee_layer = add_ee_layer <br>vis_params = {&#39;min&#39; : 0,&#39;max&#39; : 4000,&#39;palette&#39; : [&#39;006633&#39;,&#39;E5FFCC&#39;,&#39;662A00&#39;,&#39;D8D8D8&#39;,&#39;F5F5F5&#39;] }<br>my_map = folium.Map(locaion=[9,39],zoom_start=6)<br>my_map.add_ee_layer(dem.clip(Germany).updateMask(dem.gt(0)),vis_params,&quot;DEM&quot;) <br>my_map.add_child(folium.LayerControl())<br>display(my_map)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*0CkfsY_qWwHhBmvicBzqgg.png" /><figcaption>output ( Data by © <a href="http://openstreetmap.org/">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>., Map Data © <a href="https://earthengine.google.com/">Google Earth Engine</a>)</figcaption></figure><p><em>Reference</em></p><ol><li>Gorelick, N., Hancher, M., Dixon, M., Ilyushchenko, S., Thau, D., &amp; Moore, R. (2017). Google Earth Engine: Planetary-scale geospatial analysis for everyone. <em>Remote Sensing of Environment</em>.</li><li>Farr, T.G., Rosen, P.A., Caro, E., Crippen, R., Duren, R., Hensley, S., Kobrick, M., Paller, M., Rodriguez, E., Roth, L., Seal, D., Shaffer, S., Shimada, J., Umland, J., Werner, M., Oskin, M., Burbank, D., and Alsdorf, D.E., 2007, The shuttle radar topography mission: Reviews of Geophysics, v. 45, no. 2, RG2004, at <a href="https://doi.org/10.1029/2005RG000183">https://doi.org/10.1029/2005RG000183</a>.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f04f146ed4a3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Land Surface Temperature (LST) Data Extraction]]></title>
            <link>https://elianwirasena.medium.com/land-surface-temperature-lst-data-extraction-dce7bd42cc0?source=rss-c757a480b620------2</link>
            <guid isPermaLink="false">https://medium.com/p/dce7bd42cc0</guid>
            <category><![CDATA[hamburg]]></category>
            <category><![CDATA[temperature]]></category>
            <category><![CDATA[gis]]></category>
            <category><![CDATA[geospatial-data]]></category>
            <category><![CDATA[geoscience]]></category>
            <dc:creator><![CDATA[Elian Wira Sena]]></dc:creator>
            <pubDate>Mon, 19 Jun 2023 03:01:57 GMT</pubDate>
            <atom:updated>2023-07-04T19:33:11.681Z</atom:updated>
            <content:encoded><![CDATA[<p>How to <strong>extract </strong>Land Surface <strong>Temperature </strong>( LST ) <strong>data </strong>from <strong>Google Earth Engine</strong> using <strong>Google Colab</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/232/1*jgClfdoJSzWwqwJUqTR5rQ.png" /><figcaption>Temperature visualization</figcaption></figure><p>This notebook will guide you to extracting land surface temperature data from the Google Earth Engine. Google Colab is used to deal with this process.</p><p>The goal is to be able to provide temperature data for the next process, such as forecasting temperatures in the future, or to combine it with other data for other studies.</p><h3><strong>First step</strong></h3><p>Data understanding</p><p>We need to choose which remote sensing data we want to use. We could see all the details and descriptions of data from this Earth Engine data catalog.</p><p><a href="https://developers.google.com/earth-engine/datasets">Earth Engine Data Catalog | Google for Developers</a></p><p>to make it easier, we can write which data we are looking for. In this notebook, we will focus on Land Surface Temperature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UZpWvGbplTU_mp2B5shFBw.png" /></figure><p>We will use MOD11A1.061 Terra Land Surface Temperature and Emissivity Daily Global 1km. This Data was provided by <a href="https://doi.org/10.5067/MODIS/MOD11A1.061">NASA LP DAAC at the USGS EROS Center</a>, data available from 2000–02–24 to 2023–06–15.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*w0-nPXJOwTCscz_-wTjz0Q.png" /></figure><p>The resolution for this data is 1000 meters, and the unit temperature is in Kelvin. We will take this band to get temperature information during the day. we could also combine with other bands to get full-day temperature, but in this notebook, we are focusing on daytime temperature.</p><h3>Second step</h3><p>Data Extraction</p><p>To work with the google earth engine, we need to initialize the API</p><pre>import ee<br><br># Trigger the authentication flow.<br>ee.Authenticate()<br><br># Initialize the library.<br>ee.Initialize()</pre><p>The result of that will tell you how to use your account to give this notebook access to Earth Engine.</p><p>since we want to explore LST from Modis Terra Satelite, so we need to import the data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vmRkp-YUYCUsjtJv3nEOwQ.png" /></figure><p>you need the Earth engine snippet. it is like an id which data catalog from the Earth engine we want to work for.</p><p>you might see ee.ImageCollection and ee.Image in this snippet. The differences is :</p><p><em>Images</em> that are like features but may include several bands.</p><p><em>Collections</em> are groups of features or images.</p><p>now we import the data :</p><pre># Import the MODIS LST collection.<br>lst = ee.ImageCollection(&#39;MODIS/061/MOD11A1&#39;)</pre><p>now we put our focus : (duration and band of interest)</p><p>we are focused only for 1 year from 2022 -2023</p><pre># Initial date of interest (inclusive).<br>i_date = &#39;2022-01-01&#39;<br><br># Final date of interest (exclusive).<br>f_date = &#39;2023-01-01&#39;<br><br># Selection of appropriate bands and dates for LST.<br>band = lst.select(&#39;LST_Day_1km&#39;, &#39;QC_Day&#39;).filterDate(i_date, f_date)</pre><p>now we put our focus : (location of interest)</p><p>we can take a look at the coordinates on Google or google maps</p><pre># Define the urban location of interest as a point.<br># We gonna use hamburg location<br>Hamburg_lon = 9.993682<br>Hamburg_lat = 53.551086<br>Hamburg_point = ee.Geometry.Point(Hamburg_lon, Hamburg_lat)</pre><p>now time to extract the data :</p><p>we will try to calculate and print the mean value of the LST collection at our interest point and convert from kelvin to celcius.</p><pre>scale = 1000  # scale in meters<br>lst_hamburg = band.mean().sample(Hamburg_point, scale).first().get(&#39;LST_Day_1km&#39;).getInfo()<br>print(&#39;Hamburg average daytime LST:&#39;, round(lst_hamburg*0.02 -273.15, 2), &#39;°C&#39;)<br># output is : Hamburg average daytime LST: 16.83 °C</pre><p>now get whole interest data</p><pre>lst_Hamburg_full = band.getRegion(Hamburg_point, scale).getInfo()<br>lst_Hamburg_full[:3] # Preview the output.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*4qQ24ceybEohLrB-YOvwRw.png" /><figcaption>Output</figcaption></figure><p>we can already see the data. We will transform the data into a pandas data frame to make it easier.</p><pre>import pandas as pd<br>df = pd.DataFrame(lst_Hamburg_full) #Convert list to dataframe<br>headers = df.iloc[0]   # Rearrange the header.<br>df = pd.DataFrame(df.values[1:], columns=headers)   # Rearrange the header.<br>df = df[[&#39;longitude&#39;, &#39;latitude&#39;, &#39;time&#39;, &quot;LST_Day_1km&quot; ]].dropna() # Remove rows with null data.<br>df[ &quot;LST_Day_1km&quot;] = pd.to_numeric(df[ &quot;LST_Day_1km&quot;], errors=&#39;coerce&#39;)    # Convert to numeric values.<br>df[&#39;datetime&#39;] = pd.to_datetime(df[&#39;time&#39;], unit=&#39;ms&#39;)  # Convert datetime to datetime values.<br>df = df[[&#39;time&#39;,&#39;datetime&#39;,  &quot;LST_Day_1km&quot;   ]] # take interest part<br>df.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/266/1*tAGEG6iXwbE_tQTTlx5sDw.png" /><figcaption>output</figcaption></figure><p>I&#39;m not familiar with kelvin, so I&#39;m gonna convert the temperature to Celsius</p><pre>def kelvin_to_celcius(t_kelvin):<br>    t_celsius =  t_kelvin*0.02 - 273.15<br>    return t_celsius<br>df[&#39;LST_Day_1km&#39;] = df[&#39;LST_Day_1km&#39;].apply(kelvin_to_celcius)<br>df.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/271/1*y1AZ-tBhRn78DvVz1gNdTw.png" /><figcaption>output samples</figcaption></figure><p>basically, we have done the process. We extracted temperature data between 2022 to 2023 in Hamburg.</p><h3>Visualization step</h3><p>Data Visualization</p><p>With the help of Scipy library, we will fit the temperature curve in Hamburg.</p><pre>import matplotlib.pyplot as plt<br>import numpy as np<br>from scipy import optimize<br><br>x_data_u = np.asanyarray(df[&#39;time&#39;].apply(float))<br>y_data_u = np.asanyarray(df[&#39;LST_Day_1km&#39;].apply(float))<br><br>fig, ax = plt.subplots(figsize=(14, 6))<br>ax.scatter(df[&#39;datetime&#39;], df[&#39;LST_Day_1km&#39;],<br>           c=&#39;black&#39;, alpha=0.2, label=&#39;Hamburg (data)&#39;)<br><br>def fit_func(t, lst0, delta_lst, tau, phi):<br>    return lst0 + (delta_lst/2)*np.sin(2*np.pi*t/tau + phi)<br><br>lst0 = 20<br>delta_lst = 40<br>tau = 365*24*3600*1000  <br>phi = 2*np.pi*4*30.5*3600*1000/tau  <br><br>params_u, params_covariance_u = optimize.curve_fit(<br>    fit_func, x_data_u, y_data_u, p0=[lst0, delta_lst, tau, phi])<br><br>ax.plot(df[&#39;datetime&#39;],<br>        fit_func(x_data_u, params_u[0], params_u[1], params_u[2], params_u[3]),<br>        label=&#39;Hamburg (fitted)&#39;, color=&#39;black&#39;, lw=2.5)<br><br>ax.set_title(&#39;Daytime Land Surface Temperature Hamburg&#39;, fontsize=16)<br>ax.set_xlabel(&#39;Date&#39;, fontsize=14)<br>ax.set_ylabel(&#39;Temperature [C]&#39;, fontsize=14)<br>ax.set_ylim(-0, 40)<br>ax.grid(lw=0.2)<br>ax.legend(fontsize=14, loc=&#39;lower right&#39;)<br><br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*YaMdRr0t6MK0vg9B94tAXg.png" /></figure><p><em>Reference</em></p><ol><li>Gorelick, N., Hancher, M., Dixon, M., Ilyushchenko, S., Thau, D., &amp; Moore, R. (2017). Google Earth Engine: Planetary-scale geospatial analysis for everyone. <em>Remote Sensing of Environment</em>.</li><li><em>MODIS Mount TERRA image from 2022 to 2023 was retrieved on 2023_19_06 from </em><a href="https://lpdaac.usgs.gov,/"><em>https://lpdaac.usgs.gov,</em></a><em> maintained by the NASA EOSDIS Land Processes Distributed Active Archive Center (LP DAAC) at the USGS Earth Resources Observation and Science (EROS) Center, Sioux Falls, South Dakota. 2018.</em></li><li>Guiattard. (n.d.). <em>An intro to the Earth Engine Python API | google earth engine | google for developers</em>. Google. <a href="https://developers.google.com/earth-engine/tutorials/community/intro-to-python-api">https://developers.google.com/earth-engine/tutorials/community/intro-to-python-api</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dce7bd42cc0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>