ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_StationSampler.H File Reference
#include <algorithm>
#include <cmath>
#include <string>
#include <AMReX_BoxArray.H>
#include <AMReX_REAL.H>
#include <AMReX_Vector.H>
Include dependency graph for ERF_StationSampler.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  StationVar
 
struct  StationLoc
 
struct  StationColumn
 
struct  Station
 
class  StationSampler
 

Functions

bool invert_latlon_offset (amrex::Real dlat, amrex::Real dlon, amrex::Real dlat_di, amrex::Real dlon_di, amrex::Real dlat_dj, amrex::Real dlon_dj, amrex::Real &di, amrex::Real &dj)
 

Function Documentation

◆ invert_latlon_offset()

bool invert_latlon_offset ( amrex::Real  dlat,
amrex::Real  dlon,
amrex::Real  dlat_di,
amrex::Real  dlon_di,
amrex::Real  dlat_dj,
amrex::Real  dlon_dj,
amrex::Real di,
amrex::Real dj 
)
inline
63 {
64  const amrex::Real scale = std::max(std::max(std::abs(dlat_di), std::abs(dlon_di)),
65  std::max(std::abs(dlat_dj), std::abs(dlon_dj)));
66  const amrex::Real det = dlat_di*dlon_dj - dlat_dj*dlon_di;
67  if (scale <= amrex::Real(0.0) || std::abs(det) <= amrex::Real(1.0e-12)*scale*scale) {
68  return false;
69  }
70  di = ( dlat*dlon_dj - dlon*dlat_dj) / det;
71  dj = (-dlat*dlon_di + dlon*dlat_di) / det;
72  return true;
73 }
amrex::Real Real
Definition: ERF_ShocInterface.H:19
real(c_double), private di
Definition: ERF_module_mp_morr_two_moment.F90:203

Referenced by ERF::resolve_station_positions().

Here is the caller graph for this function: