

Line 1: 
Line 1: 
−  == Dynlib partial derivatives libary ==
 +  {{dbauthor}} 
−   
−  The functions generally operate on real arrays with dimension (nz,ny,nx) where nz is number of times or levels, and ny and nx are the number of latitudes and longitudes, respectively. The function descriptions below contain detailed descriptions of arguments and returns where there is any deviation from this pattern; otherwise they may be assumed to be of the form:
 
−   
−  { border="1" class="wikitable" style="textalign:center;"  
−  + style="textalign:left" Arguments:
 
−  
 
−  
 
−  ! width="60"  Type
 
−  ! width="80"  Dim
 
−  ! width="300"  Description
 
−  
 
−  ! width="80"  dat
 
−   real  (nz,ny,nx)  The input data
 
−  }
 
−   
−  { border="1" class="wikitable" style="textalign:center;"  
−  + style="textalign:left" Returns:
 
−  
 
−  
 
−  ! width="60"  Type
 
−  ! width="120"  Dim
 
−  ! width="300"  Description
 
−  
 
−  ! width="80"  res
 
−   real  (nz,ny,nx)  output data
 
−  }
 
−   
−  The ubiquitous inputs ''dx'' and ''dy'' are all of the form
 
−  { border="1" class="wikitable" style="textalign:center;"
 
−  
 
−  
 
−  ! width="60"  Type
 
−  ! width="80"  Dim
 
−  ! width="300"  Description
 
−  
 
−  ! width="80"  dx
 
−   real  (ny,nx)  dx(j,i) = x(j, i+1)  x(j, i1) (in metres)
 
−  
 
−  ! width="80"  dy
 
−   real  (ny,nx)  dy(j,i) = y(j+1, i)  y(j1, i) (in metres)
 
−  }
 
−   
−  Typically, the results for each level or time are computed individually in 2D fashion, though they are returned as a 3D array of the same size as the input.
 
−   
−  === ''dynlib.diag.ddx'' : partial x derivative ===
 
−   
−  <code>res=ddx(dat,dx,dy)</code>
 
−   
−  Calculates the partial x derivative of dat, using centred differences. For a nonEWcyclic grid, 0 is returned on the edges of the x domain.
 
−   
−  === ''dynlib.diag.ddy'' : partial y derivative ===
 
−   
−  <code>res=ddy(dat,dx,dy)</code>
 
−   
−  Calculates the partial y derivative of dat, using centred differences. For a nonEWcyclic grid, 0 is returned on all edges of the x,y domain. For an EWcyclic grid, 0 is returned on the first and last latitudes.
 
−   
−  === ''dynlib.diag.grad'' : 2D gradient ===
 
−   
−  <code>(resx,resy)=grad(dat,dx,dy)</code>
 
−   
−  Calculates the 2D gradient of dat, using centred differences in x and y. For a nonEWcyclic grid, 0 is returned on all edges of the x,y domain. For an EWcyclic grid, 0 is returned on the first and last latitudes.
 
−   
−  === ''dynlib.diag.lap2'' : 2D laplacian ===
 
−   
−  <code>res=lap2(dat,dx,dy)</code>
 
−   
−  Calculates the 2D laplacian of dat, using centred differences. For a nonEWcyclic grid, 0 is returned on all edges of the x,y domain. For an EWcyclic grid, 0 is returned on the first and last latitudes.
 
−   
−  [[Category:Dynlib]]
 