Revision as of 17:54, 22 March 2022 by C.carouge (talk | contribs)


The CMS team is running CodeBreak sessions every fortnight.

Those sessions are an opportunity to come and have your questions answered by the CMS team, or to listen in to learn something new. Queries can be on some specific code you are writing, about a training you are trying to understand or broader questions about programming or scientific modelling.
At the start of each session, we will ask you to provide a brief summary of your query so we can organise break-out rooms themed on topics, in order to make it possible to cover as many questions as possible and keep each room focussed on related problems.
When appropriate we will take a few minutes at the beginning of a session to present useful new software or language features, interesting blogs or highlight new developments in modelling. These topics will be announced beforehand as they arise.

CodeBreak sessions synopsis



  • Copying global attributes from a NetCDF file
  • Calculating differential in xarray
  • Regression analysis on spatial data


  • Problem installing the climextRemes Python package
  • Understand and use a Fortran program


  • Looping in Python and code organisation
  • Memory Consumption and optimisation in Python.
  • UM Model Crash explanation
  • How to use Gibbs-SeaWater (GSW) Oceanographic Toolbox to calculate the dynamic height
  • Code organisation with NCL and more generally.



  • How to organise plotting large numbers of plots from heterogenous models in python
  • Layout of subplots with matplotlib in python
  • Fast percentile calculation in python



  • How to analyse data weekly and creating weekly climatology
  • Curl calculations
  • Weighted function in xarray
  • How to organise calculations dynamically with python data structure (dict) e.g. looping over seasons



  • What to do when variables have coordinates that are not quite equal.
  • Calculate daily means of ERA5 pressure-level data
  • Conversion of UM outputs between pressure and model levels
  • Writing a Xarray DataArray sub-class
  • Incompatible datetime and cftime error
  • Reprojecting data from metres to lat/lon in python



  • Applying land masking to CMIP data
  • netCDF compression
  • Bathymetry data


  • Panel plot or facet plot along the time axis


  • Using dask when calculating Eddy Kinetic Energy for high resolution ocean model
  • How to calculate antecedent precipitation index efficiently for entire AGCD dataset


  • Particle trajectory data analysis.
  • Fortran code strange behaviour
  • Old Python code crash due to user-installed package needing update
  • Using ERA5 data as input for the HySplit trajectory model
  • ACCESS-OM2 output: selection of time slice
  • Understanding xarray, chunking, queue