Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Now that you have a list of proper date variables, you can find the difference between consecutive dates using a single line which subtracts one set of list elements from another (very similar to computing the 'period precipitation' we did earlier). Now you have a list of time differences in days. You can multiply by 24 to get them in hours.

...

The result is a list of values, a value for each field. You can directly multiply a list variable by a number to obtain a new list where each element has been multiplied - do this to scale from metres to mm.

The final calculation requires converting the data values into mm per hour - divide this list of values by the list of time differences, which are should be in hours (e.g. if the time difference between two steps is 7 hours, then the rate of precip per hour is the mean precip value divided by 7).

Print the result - it will be a list of numbers, one for each time period.

Computing a climatology

The supplied GRIB file era_t2m_jan_2009_2013.grib contains 2 metre temperature fields from the ERA Interim data set, interpolated onto a low-resolution 5x5 degree grid. The data are from years 2009 to 2013 and only include the month of January. The data are also from two times: 00:00 and 12:00. Check that all of this is true!

...