#include <ERF_LatLonMap.H>
◆ LatLonMap()
| LatLonMap::LatLonMap |
( |
const amrex::MultiFab & |
lat, |
|
|
const amrex::MultiFab & |
lon, |
|
|
const amrex::BoxArray & |
ba2d, |
|
|
const amrex::DistributionMapping & |
dm, |
|
|
const amrex::Geometry & |
geom0 |
|
) |
| |
154 m_dx(geom0.CellSizeArray())
156 m_dom = geom0.Domain();
166 MultiFab latlon(ba2d, dm, 2, 0);
169 BoxArray ba_one(
m_dom);
170 Vector<int> pmap(1, ParallelDescriptor::IOProcessorNumber());
171 DistributionMapping dm_one(pmap);
172 m_ll.define(ba_one, dm_one, 2, 0, MFInfo().SetArena(The_Pinned_Arena()));
173 m_ll.ParallelCopy(latlon, 0, 0, 2);
176 Gpu::streamSynchronize();
void pack_latlon(MultiFab &latlon, const MultiFab &lat, const MultiFab &lon)
Definition: ERF_LatLonMap.cpp:46
amrex::Box m_dom
Definition: ERF_LatLonMap.H:159
amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > m_dx
Definition: ERF_LatLonMap.H:161
amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > m_problo
Definition: ERF_LatLonMap.H:160
amrex::MultiFab m_ll
Definition: ERF_LatLonMap.H:158
◆ locate()
185 if (ParallelDescriptor::IOProcessor()) {
188 req_lat, req_lon, l);
189 out[0] = l.
x; out[1] = l.
y;
190 out[2] = l.
lat; out[3] = l.
lon;
193 out[8] =
static_cast<Real>(
static_cast<int>(status));
196 ParallelDescriptor::Bcast(out, 9, ParallelDescriptor::IOProcessorNumber());
198 loc.
x = out[0]; loc.
y = out[1];
199 loc.
lat = out[2]; loc.
lon = out[3];
202 return static_cast<LatLonStatus>(
static_cast<int>(std::lround(out[8])));
LatLonStatus
Definition: ERF_LatLonMap.H:105
LatLonStatus locate_latlon_on_grid(const Array4< const Real > &ll, const Box &dom, const GpuArray< Real, AMREX_SPACEDIM > &problo, const GpuArray< Real, AMREX_SPACEDIM > &dx, Real req_lat, Real req_lon, LatLonLocation &loc)
Definition: ERF_LatLonMap.cpp:86
amrex::Real Real
Definition: ERF_ShocInterface.H:19
Definition: ERF_LatLonMap.H:86
amrex::Real cos_alpha
Definition: ERF_LatLonMap.H:101
amrex::Real lat
Definition: ERF_LatLonMap.H:93
amrex::Real x
Definition: ERF_LatLonMap.H:88
amrex::Real near_lat
Definition: ERF_LatLonMap.H:97
amrex::Real y
Definition: ERF_LatLonMap.H:89
amrex::Real sin_alpha
Definition: ERF_LatLonMap.H:102
amrex::Real near_lon
Definition: ERF_LatLonMap.H:98
amrex::Real lon
Definition: ERF_LatLonMap.H:94
Referenced by ObsNudging::resolve_positions(), and ERF::resolve_station_positions().
◆ rotation_at()
210 if (ParallelDescriptor::IOProcessor()) {
211 const int i = std::clamp(
static_cast<int>(std::floor((
x -
m_problo[0]) /
m_dx[0])),
213 const int j = std::clamp(
static_cast<int>(std::floor((
y -
m_problo[1]) /
m_dx[1])),
218 ParallelDescriptor::Bcast(out, 2, ParallelDescriptor::IOProcessorNumber());
void grid_rotation_from_latlon(const Array4< const Real > &ll, const Box &dom, int i, int j, Real &cos_alpha, Real &sin_alpha)
Definition: ERF_LatLonMap.cpp:62
Real sin_alpha
Definition: ERF_Plotfile2DInterpolator.cpp:28
Real cos_alpha
Definition: ERF_Plotfile2DInterpolator.cpp:27
Referenced by ObsNudging::resolve_positions().
◆ m_dom
| amrex::Box LatLonMap::m_dom |
|
private |
◆ m_dx
| amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> LatLonMap::m_dx |
|
private |
◆ m_ll
| amrex::MultiFab LatLonMap::m_ll |
|
private |
◆ m_problo
| amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> LatLonMap::m_problo |
|
private |
The documentation for this class was generated from the following files: