Robert Scott's software resources

Why have I put these here?

In principle journal articles describe in enough detail the methods used that one could reproduce the results. In practise any time I've reproduced someone results a lot of guessing and experimenting were required. Why not simply provide our scripts?!

... ready for Senator Joe Barton, just in case!

More scripts available on . ... back to my homepage ... ;

Finite difference derivatives on a non-uniform grid

My colleagues and I have found biases in the statistics of geostrophic velocities computed from the Aviso maps of sea surface height depending upon the number of points used in the finite difference stencil (Arbic, Scott, et al. 2011). Perhaps surprisingly we required 7-pt stencils for reasonable convergence of the velocity statistics. Here are the MatLab scritps for computing the accurate geostrophic velocities: ssh2vel.m computes the zonal and meridional velocity by calling ddc_of_map_npts.m to computes the first derivative with 3,5, or 7 point stencils. The latter routine calls get_npts_stencil_coeffs.m which calculates the corresponding coefficents. To run these you need geophysical_constants.m for the variable mperdeg, the number of meters in 1 deg. of latitude using the spherical Earth approximation.

Lee wave generation

Working with John Goff, Alberto Naveira Garabato and George Nurser, we have made a global calculation of the rate of generation of internal gravity waves by quasi-steady flow in the lee of small-scale topography. The script energy_flux_estimate_global_v4p5.m was used, with support routines get_flux_pgoff_v5.m and get_pgoff.m. Post-processing was done with post_processing.m . For the spectral decomposition we used get_flux_pgoff_spc_v2.m and post_processing_spc_v2.m .

Spectral flux calculation

The spectral energy flux is a useful diagnostic for understanding how the kinetic energy spectrum is maintained. The following scripts handle a variety of cases. A good reference defining the spectral energy flux and spectral transfer is Scott and Arbic (2007).

Given the geostrophic streamfunction, one can calculate the spectral flux using the psi2flux_v2.m routine, as explained by Scott and Wang (2005). Working with Bo Qiu and Shuiming Chen, we calculated the spectral transfer in 2D using psi2trans2d_v2.m . This helped to explain the corresponding 2D kinetic energy spectrum calculated with psi2psd2d_uv.m . This work is described in Qiu, Scott, Chen (2008), see publications .

Starting from the 2D velocity fields, one can calculate both the spectral flux and spectral transfer with vel2flux_v2.m . If one wants the spectral transfer in 2D, one can use vel2trans2d.m . The kinetic energy spectrum is calculated with vel2psd_v2.m .


For GFD 1 students

When plotting the locations of things on the world map, I'd like you to include the outline of the continents, as demonstrated in class of Lesson 9. You'll need the basemap.m script and also the basemap.mat file.