For this tutorial you will need:
|Snow Cover and Sea Ice on the Robinson Map Projection|
So before we start, I want to give a full disclaimer: The plot is not actually showing any observed SST. In this tutorial I'm going to use the 0.25 degree GFS surface temperature. In practice the surface temperature should be roughly equal to the SST over the Oceans.
The first thing we need to do is open both the GFS data and the sea ice data. This data will come from NOMADS and will be opened using the 'sdfopen' command. Note, the files below are for February 2015, so keep in mind, that you will need to change the date on files if you wish to copy paste the example code below.
Now that the files are open we will simply set up the map. Since we are using the Robinson Projection, we need to set the longitude to range from -180 to 180 and the latitude -90 to 90.
'set gxout shaded'
'set mpdset hires'
'set lon -180 180'
'set lat -90 90'
'set mproj robinson'
'colormaps -l 272 307 0.5 -map jet' ;*Note the use of colormaps.gs
Then we display the variable:
'xcbar -fs 4'
After a moment, the surface temperature will be displayed following the "jet" color map.
Now, we are going to mask out the land using the land basemap from basemap.gs.
Note, in my version of basemap.gs, I did not want to include the frame around the map projection. So I opened up basemap.gs and commented out the lines at the bottom that draw the rectangle:
* Draw a new square frame around the plot
* If you have 'set frame off' or 'set frame circle' before running basemap,
* you may want to comment out the next 2 lines
*'set line 1 1 6'
*'draw rec 'x1' 'y1' 'x2' 'y2
We are going to use the "medium (M)" resolution option for the coastlines, and we are going to define a custom dark gray color for the land.
'set rgb 73 80 80 80'
'basemap L 73 0 M' ;*L = Land, 73 = Fill Color, 0 = outline Color, M=Medium resolution
Now that we are done with the "SST" and the land mask, we are going to open up the sea-ice file and plot the sea ice. It is important that you use the maskout function when plotting the sea-ice, otherwise you will overwrite all of the SST data with zeros.
'set gxout shaded'
'set dfile 2' ;*Sets Default file to file 2 (Sea ice)
'set z 1' ;*Set z to 1
'set t 1' ;*Set t to 1
'set map 0 1 6'
'color 0 0.6 0.1 -kind dimgray->seashell->white' ;*Note use of color.gs
'd maskout(icecmsl,icecmsl-0.1)' ;*Need to mask out ice.
After a few moments, the sea ice will plot and you will have an image like this:
|Sea Ice and SST only!|
Now this is all well and good, but our knowledge is limited to the ice over the oceans, we don't really get any sense of how ice and snow covers the land masses. So the final touch that we'll add to the map is to plot the GFS snow water equivalent (SWE) using a similar color scale as ice cover. To do that, we need to reset the file to our first file and then reset our time our vertical level. Lastly, we plot SWE (again using maskout to avoid plotting over everything).
'color 10 100 5 -kind dimgray->seashell->white'
'set z 1'
'set t 1'
'set map 0 1 6'
And after a few moments, you have a map like the one shown at the beginning of the tutorial.
You can play around with your minimum values for ice and snow, I used 0.1 for sea-ice and 10 mm for SWE. That seemed to produce a good looking map. Experiment as you like! This plot is really basic, no special formatting outside of the actual plot (titles, etc). Hopefully you enjoyed this tutorial, I know it was oddly specific, and didn't really present anything new, hopefully you learned something anyway!
Download Example Script