Difference between revisions of "Programming"

(Analysing Data)
Line 1: Line 1:
Starting point for topics related to programming
+
Here are some starting point for topics related to programming. Generally we rely on external sources for basic how-tos and only provide domain-specific advice ourselves. You can also check out our [https://www.youtube.com/user/COECSSCMS/videos Youtube channel] and [https://climate-cms.org blog] for more topics and demonstrations.
  
 
== Python ==
 
== Python ==

Revision as of 02:11, 29 April 2021

Here are some starting point for topics related to programming. Generally we rely on external sources for basic how-tos and only provide domain-specific advice ourselves. You can also check out our Youtube channel and blog for more topics and demonstrations.

Python

Python is a language widely used in the climate community for data analysis. It's also one of the most commonly used languages generally, knowing Python is a very useful skill.

Beginner

Intermediate

Advanced

Jupyter Notebooks

A handy way to work with Python is to use the Jupyter Notebook interface. This lets you make documents combining text, python code and images. You can run Jupyter at NCI using the CLEX Conda environment.

Plotting

Matplotlib is the starting point for Python plotting. Most of the time you use its pyplot interface, which is much easier to work with.

If you're making plots on a map check out the Cartopy library - this handles things like map projections, drawing coastlines and adding background images.

Analysing data

The xarray library is a great place to start if you're working with gridded NetCDF data. It allows you to easily open a file, perform common types of analyses like climatologies, and easily plot results.

Pandas is a similar library for tabular data, like you'd get from observations at a weather station.

Numpy and Scipy are the grandfathers of Python science. They provide optimised versions of standard mathematical functions, especially for working with arrays. Xarray and Pandas both use Numpy arrays to store data.

Fortran

Fortran is the language most commonly used in numerical climate and weather models, like MOM and WRF. It's not commonly used outside of science, its main advantage is its optimised speed on supercomputers.

Beginner:

Intermediate:

Advanced:

Parallel Programming

Debugging

Bash

Bash is the most common language used in the Linux terminal, though there are alternatives like 'csh' and 'zsh'. There are a wide variety of command line programs available

Beginner

Intermediate

Analysing Data

There's a number of useful tools for working with climate data on the command line, most notably CDO (climate data operators) and NCO (netcdf operators). Both provide easy access to a wide variety of operations.