Skip to content

File Spherical.h

FileList > src > Spherical.h

Go to the source code of this file

  • #include "General.h"
  • #include "Param.h"
  • #include "Arrays.h"
  • #include "Forcing.h"
  • #include "MemManagement.h"
  • #include "Util_CPU.h"
  • #include "Kurganov.h"

Public Functions

Type Name
__host__ __device__ T calcCM (T Radius, T delta, T yo, int iy)
Calculate the scale factor for the y face length in a spherical model. This function computes the scale factor based on the sphere's radius, grid spacing, origin offset, and index in the y direction. Scale factor for y face length (x face lengh scale is always 1 in spherical model assuming that lat long are entered)
__host__ __device__ T calcFM (T Radius, T delta, T yo, T iy)
Calculate the scale factor for the y face length in a spherical model. This function computes the scale factor based on the sphere's radius, grid spacing, origin offset and index in the y direction. Scale factor for y face length (x face lengh scale is always 1 in spherical model assuming that lat long are entered)
__host__ __device__ T spharea (T Radius, T lon, T lat, T dx)
Calculate the surface area of a spherical cap.

Public Functions Documentation

function calcCM

Calculate the scale factor for the y face length in a spherical model. This function computes the scale factor based on the sphere's radius, grid spacing, origin offset, and index in the y direction. Scale factor for y face length (x face lengh scale is always 1 in spherical model assuming that lat long are entered)

template<class T>
__host__ __device__ T calcCM (
    T Radius,
    T delta,
    T yo,
    int iy
) 

Parameters:

  • Radius Radius of the sphere
  • delta Grid spacing
  • yo Origin offset in the y direction
  • iy Index in the y direction

function calcFM

Calculate the scale factor for the y face length in a spherical model. This function computes the scale factor based on the sphere's radius, grid spacing, origin offset and index in the y direction. Scale factor for y face length (x face lengh scale is always 1 in spherical model assuming that lat long are entered)

template<class T>
__host__ __device__ T calcFM (
    T Radius,
    T delta,
    T yo,
    T iy
) 

Parameters:

  • Radius Radius of the sphere
  • delta Grid spacing
  • yo Origin offset in the y direction
  • iy Index in the y direction

function spharea

Calculate the surface area of a spherical cap.

template<class T>
__host__ __device__ T spharea (
    T Radius,
    T lon,
    T lat,
    T dx
) 

Template parameters:

  • T Data type (float or double)

Parameters:

  • Radius Radius of the sphere
  • lon Longitude of the center of the cap (in degrees)
  • lat Latitude of the center of the cap (in degrees)
  • dx Grid spacing (in degrees)

Returns:

Surface area of the spherical cap



The documentation for this class was generated from the following file src/Spherical.h