5 #include <AMReX_MultiFab.H>
6 #include <ERF_Rrtmgp.H>
11 amrex::MultiFab* clat,
12 amrex::MultiFab* clon,
13 const amrex::Vector<int> &rank_offsets,
16 const amrex::Real& eccen,
17 const amrex::Real& mvelpp,
18 const amrex::Real& lambm0,
19 const amrex::Real& obliqr,
20 amrex::Real uniform_angle=-1.0);
27 const amrex::Real& lat,
28 const amrex::Real& lon,
29 const amrex::Real& declin,
30 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;
53 const amrex::Real& eccen ,
54 const amrex::Real& mvelpp,
55 const amrex::Real& lambm0,
56 const amrex::Real& obliqr,
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));
constexpr amrex::Real PI
Definition: ERF_Constants.H:6
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)
Definition: ERF_Orbit.H:26
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)
Definition: ERF_Orbit.H:52