En:interpolate ug

De WAVEWATCH-III Wiki

interpolateUG

This FORTRAN 90 program expects to find the following files in the running directory

  • interpolateUG.inp : ASCII input file with WWATCH convention (first character in file is the comment character)
  • interpolateUG.grd : fortran unformatted binary file, using big-endian convention. (see below for details)
  • interpolateUG.list : interpolation method and list of input and output ASCII files

Three different interpolation methods are used, for different types of variables:

  • 1. linear interpolation : used for all “normal” variables (hs, t02, uss, mss, CgE … )
  • 2. nearest non-missing value : used for variables with jumps (peak frequency stuff: fp …)
  • 3. linear interpolation through sines and cosines: used for direction variables (dir, dp …)

All the information necessary for the interpolation is stored in the interpolateUG.grd file. If this file does not existit will be generated (this takes some time!). The creation of interpolateUG.grd uses the information in interpolateUG.inp :

  • name of *.log file that contains the latitude and longitude ranges and number of points of the regular grid
  • header for WW3 ASCII files
  • interpolateUG.list : interpolation method and list of input and output ASCII files


The unformatted binary output (interpolateUG.grd) contains the following records:

  • NX, NTRI, NXO, NYO (record of 4 integers)
  • IPBPI, RDBPI (record with an integer array IPBPI(NXO,NYO,3) and a real array RDBPI(NXO,NYO,3) )
  • LATMIN,LATMAX,LONMIN,LONMAX (record of 4 real values)