 Hello and welcome to this section of tutorial 7 on handling active microwave data using Python. So, in the first section of the tutorial, we understood about the data coming from gray satellites and we saw how to visualize the data in Python and then we tried to understand the fundamentals of satellite altimetry which gives you water levels from space and then we were trying to look at specific missions like JSON and CERL and we are trying to visualize how the data looks like from JSON2 which is what when we were discussing that JSON2 will have two types of variables, one is a model based variables that you get from numerical weather prediction models and the other is satellite based variables both are shown in different colors in the screen because both have differing spatial resolutions as well as differing temporal resolution. Now let us try to visualize the data using maps. Now what is maps? I will come to that later but firstly to install maps we need to have MATLAB compiler. So you can go directly to the website to download the MATLAB compiler where a number of versions are given. So for me I am going to use the 64 bit windows version. Now maps stands for multi-mission altimetry processing software. So that is the full form of maps, it helps you to visualize the data from altimetry missions but then maps is developed on MATLAB and that is why we need to have the MATLAB compiler installed before we try to install maps. So let us try to install maps now. So as before to install the MATLAB compiler once the file gets downloaded you just need to click on the installed file and you will be guided to complete the installation. The same applies for the maps underscore installer underscore web dot exe file. Once you download it, it carries you through a series of steps which you need to complete the installation process. Now this has been developed particularly for visualizing the processing altimetry data to generate say a time series of water levels. Now the latest version of maps has the ability to process data from around 9 altimeter missions. Say JSON 1, 2, 3 and then ERS2, NVSAT, SRL, Cryosat, Sentinel, ISAT. Now let us see how to use maps. So as I mentioned before, you first try to download the dot exe file and once the download is completed you click on the same for the installation to begin. The input data for maps can be created using Google Earths. Why I say this is because say I want to identify a water body that has been crossed by a particular satellite say SRL or JSON, I can create a shape file say the polygon shape file around the water body which can be used as input in maps. So that can be easily done with Google Earths. So in case you do not have Google Earth installed it will be good if you install the same. Now most of us would have been familiar with Google Earth at some point or the other. So it gives a representation of Earth primarily based on satellite imagery. You can directly go to the website and complete the installation process. So hardly takes a few minutes to download as well as complete the installation. So what have we done now? So far we have installed the Matlab compiler, we have installed the maps dot exe file and we have installed Google Earth. So first let us try to open Google Earths to create a KML file. So if you notice I have imported the tracks, orbital tracks of JSON satellite as well as SRL satellite. It is the satellite orbit files which shows the track coverage of both the satellites in Google Earth. So I just want to zoom to the Mumbai region to see if any water body is getting crossed by the tracks. Maybe I need to pan a little further, yes I am going to zoom into this particular lake. So what I am trying to do is I am trying to create a KML file where KML stands for Keyhole Markup Language. They can store geographic data and are used to view and share Google Earth information. So I can just create a new polygon, name it. So what I have done is I have identified a water body which is intersected by the satellite track. What you see in red and blue earlier where the satellite tracks from the satellites JSON and SRL and then I zoomed into a location where the track was crossing a water body and once I have identified a water body I am trying to create a polygon shape file surrounding the water body I am creating a polygon then I can save the same. So let me move the unnecessary files and name the polygon very similar to how you create a polygon shape file in QGIS you know. You are just marking the area around the lake, yes. Now it will be worthwhile to note that while you are creating a polygon you can note the corresponding track or pass number of the same crossing the water body. So what I will do is I will save the KML file say in the desktop so that I can access it later when I am using maps. So now that I have created a KML file let us try to open maps. So this is how the interface of maps looks like and then from the pop-up window I can select surface type that is rivers and lakes and mission that is I am going to select with JSON2 and the data type that is netcdf. Let me open the folder which contains the data from JSON2 for representation purposes I am going to select not all the files but just a one or two files to see how the data looks like in maps. So once I select all the files and click on refresh button it displays the data in a spatial plot. So let me select and click on refresh button it displays the data in spatial plot. So again as I mentioned before I am going to select just a few files because this is for representation purpose. So you can at the bottom you can see you can select the variables that you need to display. In maps the estimated water surface heights are stored under the variable named as ice one altimeter height which is what you see displayed here ice one altimeter height and this is specific to JSON2 satellite. So if you try to open data from some other satellite the variable names may slightly vary. For example now let us try to open the data from several satellite I am going to follow a similar procedure leading to the folder which contains the data and for representation purposes I am clicking on two files as before I can select it and refresh so that the data is opened as spatial plots. Now you can zoom into the data and select unwanted data like outliers to remove it all that functions are made available in maps. Now at this point let me mention that different altimetry data sets are referenced to various data terms like WGS84 ok. I can even get to export the time series data from maps and select it. Now again you remember the .KML file we selected before say you want to see the data over the .KML file then I can click on the select zone option to open the .KML file defining the study area and then I can add click on the data option to import the altimetry data sets corresponding to the track numbers. So instead of just giving you a spatial plot like this you will see on your screen the polygon that you created and the data overlying the polygon. Just a few functions that helps you to understand the data better ok fine. So till now what we did is we tried to visualize the data in maps. Now let us come to Python. Let us try how to work with satellite altimetry data in Python. So as before I am going to need certain libraries, I am going to import x array, net CDF4, globe math, matplotlib and numpy all of these have been discussed before and then I need to specify path of the file ok. I have specified the path of the file again it is a net CDF file and hence the extension .nc. Now let us open the file. Let us try to open the file. So I am going to use as before xr.open underscore data set and within brackets the path. So now data is opened, inside I find the coordinates and I can see the latitude and longitude. I can even see the latitude underscore 40 hertz. You remember I mentioned that the satellite altimetry data set has two variables the satellite based and the model based which differ in frequency. For JSON it was 20 hertz and this is Saral which is 40 hertz and I can specifically access the time by just typing data dot time. Here data is the name I have given to the opened file ok. Just to show you simple commands wherein we can access the different parts of the net CDF file like the time and remember it has 147 variables. It has geoid, it has scaling factors, C state bias, range, certain flags. So remember you may not need all these variables to compute the water level information ok. We will just be requiring a few variables to estimate water levels. So what we will do is let us try to pick those relevant variables from the net CDF file of Saral satellite which are required for you to estimate water levels ok. Because I have the data file read into data, every time I am going to use data dot and the variable name. You do not have to know by heart the variable names because you just opened the dot NC file. So you can scroll down each time and then find out the variable name and then use that specific variable name after the dot. So now I am going to use data dot long underscore 40 hertz dot values. Because the file is read into data and after a dot I write the variable name. So these are the relevant variables that I need to be extracted from the net CDF file so as to calculate the water levels. So I am trying to pick out the latitude values, the longitude values and IONO is nothing but the ionospheric correction ok. Similarly I am going to name D tropo to pick out the dry tropospheric correction ok. In the file it is named in this particular manner that is why I am trying to use data dot name of the variable. Similarly I need to pick out the wet tropospheric correction. I am going to name it as W tropo and the P tide that is nothing but the polar tide ok. Solid earth tide values that is next and also I can pick out the altitude values. The ice one range 40 hertz values, 40 hertz is the frequency with which the data is being made available. As I mentioned earlier two variables differing special resolution and differing frequencies. I can pick out the range, the mean sea surface values, MSS and the geoid in sea surface values ok. So using these set of variables one can estimate the water levels as required for one's research. So just to visualize how range 40 looks like. So here I am not going to delve deeper into the corrections that need to be applied to range. I am just trying to show you how to import the file in Python, how to open it, how to extract the relevant variables using which you can estimate the water levels for your research. Just to show you how the variables can be extracted.