#include <AMReX.H>
#include <AMReX_MultiFab.H>
#include <ERF_Rrtmgp.H>
#include <ERF_Constants.H>
Go to the source code of this file.
|
void | zenith (int &calday, amrex::MultiFab *clat, amrex::MultiFab *clon, const amrex::Vector< int > &rank_offsets, real1d &coszrs, int &ncol, const amrex::Real &eccen, const amrex::Real &mvelpp, const amrex::Real &lambm0, const amrex::Real &obliqr, amrex::Real uniform_angle=-1.0) |
|
AMREX_GPU_HOST AMREX_FORCE_INLINE amrex::Real | shr_orb_cosz (const amrex::Real &jday, const amrex::Real &lat, const amrex::Real &lon, const amrex::Real &declin, amrex::Real uniform_angle) |
|
AMREX_GPU_HOST AMREX_FORCE_INLINE void | shr_orb_decl (const amrex::Real &calday, const amrex::Real &eccen, const amrex::Real &mvelpp, const amrex::Real &lambm0, const amrex::Real &obliqr, amrex::Real &delta, amrex::Real &eccf) |
|
◆ shr_orb_cosz()
AMREX_GPU_HOST AMREX_FORCE_INLINE amrex::Real shr_orb_cosz |
( |
const amrex::Real & |
jday, |
|
|
const amrex::Real & |
lat, |
|
|
const amrex::Real & |
lon, |
|
|
const amrex::Real & |
declin, |
|
|
amrex::Real |
uniform_angle |
|
) |
| |
32 amrex::Real cos_sol_zen_ang;
36 if (uniform_angle>0.0) {
37 cos_sol_zen_ang = std::cos(uniform_angle *
PI/180.0);
41 cos_sol_zen_ang = std::sin(lat)*std::sin(declin) - std::cos(lat)*std::cos(declin) *
42 std::cos((jday-std::floor(jday))*2.0*
PI + lon);
45 return cos_sol_zen_ang;
constexpr amrex::Real PI
Definition: ERF_Constants.H:6
Referenced by zenith().
◆ shr_orb_decl()
AMREX_GPU_HOST AMREX_FORCE_INLINE void shr_orb_decl |
( |
const amrex::Real & |
calday, |
|
|
const amrex::Real & |
eccen, |
|
|
const amrex::Real & |
mvelpp, |
|
|
const amrex::Real & |
lambm0, |
|
|
const amrex::Real & |
obliqr, |
|
|
amrex::Real & |
delta, |
|
|
amrex::Real & |
eccf |
|
) |
| |
61 static constexpr amrex::Real day_p_yr = 365.0;
62 static constexpr amrex::Real ve = 80.5;
80 amrex::Real lambm = lambm0 + (calday - ve)*2.0*
PI/day_p_yr;
81 amrex::Real lmm = lambm - mvelpp;
85 amrex::Real sinl = std::sin(lmm);
86 amrex::Real lamb = lambm + eccen*(2.0*sinl + eccen*(1.25*sin(2.0*lmm)
87 + eccen*((13.0/12.0)*sin(3.0*lmm) - 0.25*sinl)));
95 amrex::Real invrho = (1.0 + eccen*std::cos(lamb - mvelpp)) / (1.0 - eccen*eccen);
98 delta = std::asin(std::sin(obliqr)*std::sin(lamb));
Referenced by Radiation::radiation_driver_sw(), and zenith().
◆ zenith()
void zenith |
( |
int & |
calday, |
|
|
amrex::MultiFab * |
clat, |
|
|
amrex::MultiFab * |
clon, |
|
|
const amrex::Vector< int > & |
rank_offsets, |
|
|
real1d & |
coszrs, |
|
|
int & |
ncol, |
|
|
const amrex::Real & |
eccen, |
|
|
const amrex::Real & |
mvelpp, |
|
|
const amrex::Real & |
lambm0, |
|
|
const amrex::Real & |
obliqr, |
|
|
amrex::Real |
uniform_angle = -1.0 |
|
) |
| |