You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Structured grids

Dimensions

D depth points, corners of grid cells
Z water level points, cell centres of grid , http://en.wikipedia.org/wiki/Face_(geometry)
UV velocity points, contravariant

Length of dimensions
i number of rows
j number of columns
D = (i+1) * (j+1)
Z = i * j
U = (i+1)j
V = i(j+1)

Netcdf example for collocated grids

dimensions:
  imax = 128;
  jmax = 64;
  nv = 4;
variables:
  //coordinates of Z
  float lat(imax,jmax);
    lat:long_name = "latitude";
    lat:units = "degrees_north";
    lat:bounds = "lat_bnds";
  float lon(imax,jmax);
    lon:long_name = "longitude";
    lon:units = "degrees_east";
    lon:bounds = "lon_bnds";
  //coordinates of the boundaries of D
  float lat_bnds(imax,jmax,nv);
  float lon_bnds(imax,jmax,nv);

Netcdf example for arakawa c grid as used in 3d flow

dimensions:
zimax = 1116 //number of cells in x direction: 1116
zjmax = 7028 //number of cells in y direction: 7028
uimax = 1117 //number of u edges in x direction (i+1)
ujmax = 7028 // number of u edges in y direction (j)
vimax = 1116 //number of v edges in x direction (i)
vjmax = 7029 // number of v edges in y direction (j+1)
dimax = 1117 // number of d vertices in x direction (i+1)
djmax = 7029 // number of d vertices in y direction (j+1)

D = 7851393 //(i+1) * (j+1)
Z = 7843248 // i * j 
U = 7850276 // (i+1)j 
V = 7844364 // i(j+1)  

variables:
  //Z-grid
  //coordinates of centres
  double zx(zimax, zjmax);
    zx:standard_name = "longitude"; 
    zx:units = "degrees_east";
  double zy(zimax, zjmax);
    zy:standard_name = "latitude";
    zy:units = "degrees_north";

  //U-grid
  //coordinates of u edges
  double ux(uimax, ujmax);
    ux:standard_name = "longitude"; 
    ux:units = "degrees_east";
  double uy(uimax, ujmax);
    uy:standard_name = "latitude";
    uy:units = "degrees_north";

  //V-grid
  //coordinates of v edges
  double vx(vimax, vjmax);
    vx:standard_name = "longitude"; 
    vx:units = "degrees_east";
  double vy(vimax, vjmax);
    vy:standard_name = "latitude";
    vy:units = "degrees_north";


  //D-grid
  //coordinates of d vertices
  double dx(dimax, djmax);
    dx:standard_name = "longitude"; 
    dx:units = "degrees_east";
  double dy(dimax, djmax);
    dy:standard_name = "latitude";
    dy:units = "degrees_north";


  //Constituents are defined at the Z grid
  double c(zimax, zjmax);
    c:long_name = "rhodamyne";
    c:units= "1e-3"
    
  //

Unstructured grids

Networks

  • No labels