Category tech

Reproducibility of climate models

 — 

A recent paper looked at the reproducibility of climate models, when ported to different hardware. A bit surprising, or maybe not, is that they found significant differences between runs when looking at the 500 hPa geopotential height. They conclude:

In a seasonal prediction framework, the ensemble spread due to the ...
Tags:

Using netCDF4 from python

 — 

Although netCDF is more user-friendly than GRIB, reading and modifying netCDF files can still be quite cumbersome. There are a number of commandline tools that make handling netCDF easier (see also this post):

  • Nothing beats a quick look at your data. Always use Ncview to inspect your files.
  • Want to ...
Tags:

Netcdf info

 — 

To get some information about a netcdf, grib, or hdf file file, you can use the info options from cdo, or use the NetCDF tool ncdump. CDO can read NetCDF4, GRIB1, GRIB2, HDF5, and possibly more:

bash $ cdo sinfop file

bash $ ncdump -h file.nc

Ncview is very useful to ...

Tags:

Bash and Csh variable substitution

 — 

Some quick notes about bash and csh variable substitution. This can be found all over the web, but I never manage to find it quickly when I need it.

It seems that variables in csh defined in the environment, with 'setenv a 10' , can be masked by variables set using ...

Tags:

Profiling Python scripts

 — 

An easy way to quickly see where your script is wasting all its time is to run it under a profiler. Python comes with a few built-in profilers. See this page for the documentation.

You can use it without changing any code by passing a few extra command-line arguments to ...

Tags:

different timezone for desktop or crontab

 — 

The clock on your desktop (and all dates and times in your terminal) use the system timezone (like UTC, for instance). Changing it could require administrator privileges, but you can also set a user timezone in your environment. Put this in your bash_profile:

export TZ=Europe/Amsterdam

The same trick ...

Tags:

concattenate PDFs

 — 

You can cancattenate (join) several PDFs into a single PDF with:

gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=output.pdf file1.pdf file2.pdf file3.pdf [...] lastfile.pdf
Tags:

Remapping a netcdf file using CDO

 — 

Geographic data is often given on grids, usually in the form of $$ f(time,lon,lat) = \ldots $$ If the grid is a simple rectangular grid, lon and lat run in equal steps from lon_min and lat_min to lon_max and lat_max (these values are typically in the metadata coming with the ...

Tags:

© Jisk Attema 2014

Powered by Pelican