SPHERELAP is the jSphere module of jLab.

 SPHERELAP  Laplacian of a field on the surface of a sphere.
 
    DEL2=SPHERELAT(LAT,LON,F) computes the Laplacian of the scalar field F
    on the surface of the sphere.
 
    DEL2 has units of F per inverse meter squared.
 
    LAT and LON are vectors specifing an evenly-spaced grid, and F is an 
    array of size LENGTH(LAT) x LENGTH(LON) x M, where M is greater than
    or equal to one.  LAT and LON are in degrees.
 
    The radius of the Earth as specified by RADEARTH is used by default.
    SPHERELAP(...,R) uses a sphere of radius R, in kilometers, instead.
 
    Derivatives are computed using the second central difference.
 
    [DEL2,DEL2LON,DEL2LAT,DEL2MIXED]=SPHERELAT(LAT,LON,F) also returns the
    second partial derivative with respect to longitude DEL2LON, with 
    respect to latitude DEL2LAT, and the second mixed partial derivative 
    DEL2MIXED.  Together these make up the terms in the Hessian matrix. 
    ___________________________________________________________________
 
    First and last points
 
    SPHERELAP can use different boundary conditions in the numerical
    computation of derivatives for the first and last points.
  
    SPHERELAP(...,'periodic') uses a periodic derivative with respect
    to longitude.  This is the default behavior.  
 
    SPHERELAP(...,'endpoint') uses the forwards / second backwards 
    difference at the first and last longitude, respectively. 
 
    For both of these options, the endpoint condition is used for 
    differentiation with respect to latitude.
 
    SPHERELAP(...,'nans')  fills in the first and last values on all four
    sides of the region with NANs. 
 
    See VDIFF for more information.  
    ___________________________________________________________________
 
    See also SPHEREDIV, SPHEREGRAD, SPHERECURL, JSPHERE.
 
    'spherelap --t' runs a test.
 
    Usage: del2=spherelap(lat,lon,f);
           del2=spherelap(lat,lon,f,R);
           [del2,del2lon,del2lat,del2mixed]=spherelap(lat,lon,f,R);
           del2=spherelap(lat,lon,f,'endpoint');
    __________________________________________________________________
    This is part of JLAB --- type 'help jlab' for more information
    (C) 2007--2020 J.M. Lilly --- type 'help jlab_license' for details

contents | allhelp | index