Wednesday, July 21, 2010

Compiling netcdf4 for ROMS

ROMS likes static netCDF4 libraries. This is how to compile those:

export FC=gfortran
export F77=gfortran
export F90=gfortran
export FFLAGS='-O3'
./configure --prefix=/opt/netcdf4_static/gfortran --enable-netcdf-4 --with-hdf5=/opt/hdf5/gfortran --disable-shared --disable-dap

This configuration makes a set of static libraries that do not use opendap (otherwise, a libcurl needs to be linked to). Other programs prefer the shared libraries, so these go to the usual location /opt/netcdf4/gfortran.

Tuesday, July 13, 2010

Presentation fonts

I usually use Helvetica for presentations, and then include LaTeX equations using LaTeXit. The best font to use with Helvetica seems to be Arev, which has the right weight to balance Helvetica. To use this, simply put

\usepackage{arev}

in the preamble.

Monday, July 5, 2010

Auto Draft

Random netcdf4-python notes

Some notes on using netcdf4-python


  • Use the shared netcdf4 libraries to compile. (ROMS needs static netcdf4 libraries -- so you need to build both).
  • The new version returns a np.ma.MaskedArray when there are missing values.
  • Using ncks (from the netCDF operators) to compress -- need to be careful about specifying netcdf4_classic format. Standard netcdf4 format does not play nice with MFDataset.
  • The new netCDF4 is DAP enabled, a feature that is passed through to netcdf4-python. All you need to do is specify a DAP-URL, and you can see your data over the internet!