Classes 21, and 22 – NetCDF

This is our second to last assignment……..

We are going to expand on our maps and NetCDF to make an animated GIF.

These are all really helpful skills to have going forward.

Mapping is a critical part of earth sciences.  A lot of people will use google maps and ArcGIS for their mapping.  These are great tools. What i am also learning is that Python has a lot of tools within it that makes mapping very easy. Plus you can make professional looking maps.  Plus if you have multiple parameters in your pandas dataframe it is easy to loop and plot them all.  This is a new mapping segment as I changed what I used to do to update it and help us make publishable maps. I am still organizing so here is a list of files we will be using.

Files.

NetCDF is now becoming a common file type in the earth and atmospheric sciences.  After doing today’s workbook your homework is to make something similar to the animated gif below.  I put a ton of hints in the notebook and it really brings together everything you have learned.  Be patient.  This is a really big data set.  In addition, we are just using numpy arrays for this.  No need to use pandas!

Homework

Due See Courseworks

1..  Make the animated Gif below.   But you need your name on it somewhere so I know it is yours and not copied from someone else.  Also, make sure to write a brief description of what you observe in your Gif. Do you see any seasonal patterns?  Also, I am not sure why I lost resolution on my writing. I am working on it…  (Note to myself.  To get it to work I needed to make it full size).  I JUST LEARNED how to get better resolution on the words.  I did this.  fig.savefig(filename,dpi=50,bbox_inches=’tight’,facecolor=’white’).  When reading stackoverflow someone said putting a background on a png improves the letter quality and it really does help.

 

IGNORE BELOW THIS

Overview

This is our last assignment……..

We had to skip mapping but I will show you a little and this is a really fun project.  …. One of the things I wanted you to learn was how easy it was to install packages. We learned this with netCDF.

We need to install Basemap today.

conda install -c anaconda basemap

Then in our notebook we need to add these lines at the top maybe.

#On Mac's
import os
os.environ['PROJ_LIB'] = '/anaconda3/share/proj/share/proj'

First try without.  Then if you are on a mac. try it.  If you are on a pc and it doesn’t work we need to look at your screen.

NetCDF is now becoming a common file type in the earth and atmospheric sciences.  After doing today’s workbook your homework is to make something similar to the animated gif below.  I put a ton of hints in the notebook and it really brings together everything you have learned.  Be patient.  This is a really big data set.  In addition, we are just using numpy arrays for this.  No need to use pandas!

Homework

Due See Courseworks

  1.  Make a map of surface air temperatures on the day you were born and mark where you were born.

2..  Make the animated Gif below.   But you need your name on it somewhere so I know it is yours and not copied from someone else.  Also, make sure to write a brief description of what you observe in your Gif. Do you see any seasonal patterns?  Also, I am not sure why I lost resolution on my writing. I am working on it…

 

2. For the final 10% bonus….. You need to make a second animated gif.  I have two examples for you below.   Make ONE of them!  I think the sea ice on might be more straightforward.  Remember the data is from our notebook. To get to the data go here to noaa  and then scroll up and hit ‘select see list’ and then ‘see list’ again.

  • skip this one.  We can make the second animated Gif that compares 2014 and 2015 to see if we see the impact of El Nino.  Mine is below.  If you want you can choose two other years to compare.  It is not much harder………  But it takes some thinking and really slowed down my computer.  Give it a shot!  If you make it describe the difference you see.
  • Make an animated gif of the sea ice extent for one year with a polar projection.  From basemap you know how to make a polar projection.  Then it becomes very similar to what you have already done.  You just need to download the sea ice data from the same website.  The units are from 0-1 and are in fraction of sea ice.  So a 1 means 100% of the sea has sea ice.  I changed my colors this year in the example from class and I think I like it much better.

 

 

 

SKIP THIS ONE

elnino