ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
erf_wrfinput Namespace Reference

Functions

amrex::IntVect file_to_erf_shift (const amrex::Box &erf_file_box, const amrex::Box &file_subdomain)
 
amrex::Box file_box_to_erf (amrex::Box file_box, const amrex::IntVect &shift)
 

Function Documentation

◆ file_box_to_erf()

amrex::Box erf_wrfinput::file_box_to_erf ( amrex::Box  file_box,
const amrex::IntVect &  shift 
)
inline

Map one file-coordinate box into the ERF index space used by init_from_wrfinput.

30 {
31  file_box.shift(shift);
32  return file_box;
33 }

◆ file_to_erf_shift()

amrex::IntVect erf_wrfinput::file_to_erf_shift ( const amrex::Box &  erf_file_box,
const amrex::Box &  file_subdomain 
)
inline

Shift horizontal WRF file coordinates into the ERF index space used by init_from_wrfinput. Keep k unchanged: WRF nests carry the parent's eta column, while their horizontal origins may be cropped or offset.

20 {
21  amrex::IntVect shift(0);
22  shift[0] = erf_file_box.smallEnd(0) - file_subdomain.smallEnd(0);
23  shift[1] = erf_file_box.smallEnd(1) - file_subdomain.smallEnd(1);
24  return shift;
25 }