Pages

Thursday, May 9, 2013

Tutorial: Display Satellite data from the CLASS archive in GrADS

GrADS is great for plotting model data, but did you know that you can
plot RADAR and satellite data as well? This tutorial is very similar to the plotting RADAR tutorial and will take you
through the steps of making plots with archived satellite data from the CLASS data repository.

For this tutorial, it is recommended that you use the script color.gs and xcbar.gs

Using GrADS to plot satellite data is not much different than using GrADS to
plot model data, and is essentially compromised of three main steps.

Get the satellite data

Save data into a netcdf file

Plot the data using GrADS

Step 1: Get Satellite Data.

Getting the Satellite data is pretty simple, but it does require a registration (don't worry, it's free) with CLASS. CLASS stands for the "Comprehensive Large data Array Stewardship System," and is basically a treasure trove of archived satellite data. It is a little tricky to get that data you want, but basically pick your data from a list on the right side of the webpage under the header "SEARCH FOR DATA".

For this tutorial, we will pick data from the GOES-13 Satellite looking at the U.S. This begins by choosing the "GOES Satellite Data - Imager (GVAR_IMG)" option under the "Environmental Data from Geostationary Satellites" category in the data search column.

After that you are brought to new page with a lot of options, where you can pick your spatial domain, your time-period, and your satellite coverage, and your specific GOES Satellite (it may be helpful here to know which satellite is viewing your desired location). There is the option for a quick search, but often that brings up too many results at once, so I have found better success just plugging in various options and doing a regular search. Once you click search, you will be directed to a check list of different data files, usually corresponding to different times. Select what times you want, and (if you are logged in) check out. The order number will be e-mailed to you, usually within a couple of hours. Once your order is completed, you are ready to move onto step 2.

Note: Be sure to select "area" as your data format option while checking out. This way it can be easily ready using the "Weather Climate and Toolkit" program.

Step 2: Convert Data to NetCDF Format.

Similar to preparing RADAR data for use in GrADS, we will convert the satellite data into a self-describing NetCDF file using the NCDC Weather Climate Toolkit. This is very simple to use, all you need to do is select "load data" to bring up the "data selector" window. From that window, select CLASS order and copy the order number into the provided space.

Loading CLASS DATA

This will bring up a list of files that you can use, with the GOES Imager data, you get all the different bands. In this tutorial we will look at the "Infrared Water Vapor" band, but GrADS can work with all different bands. Once you have made your choice(s) simply click export data to save your data into NetCDF files. Choose the options you like as you go through, things will work just so long as you choose "Gridded NetCDF" as your file output on the first step. Save the NetCDF file to your desired location, and you're ready for the final step.

Step 3: Plot the data in GrADS.

This is, once again, the easy part. Now that you have your data in the right format, simply open up your file using the 'sdfopen' command. In my case:

'sdfopen GRIB2FILES/Tutorial/GOES13_BAND_03_20130507_011020.nc'

Now that your file is open, it might be useful to query the file to see what your variable is called. In the case of the water vapor band, it is called "calibrateddata." And after running a quick display of the data, it appears as if the plotted variable is Temperature in Kelvin. Now that you have your data all together, we just need to pick a suitable color scale. I am going to use color.gs to get a color scale similar to the one use for water vapor by the NWS. Also, since the color scale is set to a Celcius scale, we will convert the variable to Celcius as well.

Now, the variable is plotted, the last thing required is the color bar. Since, the scale is fairly fine (intervals of 2), we need to use xcbar.gs instead of cbar.gs so to space out how the text is plotted. You can always find out more about xbar.gs at the script website, but the basic command to space out the text is the '-fs' option. In this case, we will plot colorbar text every 2 intervals.

'xcbar.gs -fs 2'

If you have been following this tutorial and plotting water vapor, your image should look similar to the one below.

Water Vapor Plot in GrADS

And incase you are interested, here is a plot with other bands plotted as well.

Three Satellite Bands

That's all there is too it. Again, similar to plotting RADAR data in GrADS, most of the challenge lies in simply downloading the data and converting it into the correct format.

5 comments:

I am pretty sure that you can, though I have not tried this myself. I know that CLASS has a large selection of satellite data from polar orbiters. I imagine that you can use the same steps in this tutorial to convert this data to a self-describing netCDF file and then open it in GrADS.