Skip to content

Commit 405dddc

Browse files
committed
rever override solar angles change
1 parent b3773cd commit 405dddc

File tree

1 file changed

+6
-27
lines changed

1 file changed

+6
-27
lines changed

src_test/test_rte_rrtmgp_rt.cu

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -240,15 +240,11 @@ void solve_radiation(int argc, char** argv)
240240
{"profiling" , { false, "Perform additional profiling run." }},
241241
{"delta-cloud" , { false, "delta-scaling of cloud optical properties" }},
242242
{"delta-aerosol" , { false, "delta-scaling of aerosol optical properties" }},
243-
{"override-sza" , { false, "" }},
244-
{"override-azi" , { false, "" }},
245243
{"tica" , { false, "attenuate path when doing an overhead 1D calculation of tilted input" }}};
246244

247245
std::map<std::string, std::pair<int, std::string>> command_line_ints {
248246
{"raytracing", {32, "Number of rays initialised at TOD per pixel per quadraute."}},
249-
{"single-gpt", {1 , "g-point to store optical properties and fluxes of" }},
250-
{"override-sza", {0, "solar zenith angle (theta) in degrees."}},
251-
{"override-azi", {0, "Solar azimuth angle in degrees."}}};
247+
{"single-gpt", {1 , "g-point to store optical properties and fluxes of" }}};
252248

253249
if (parse_command_line_options(command_line_switches, command_line_ints, argc, argv))
254250
return;
@@ -269,12 +265,8 @@ void solve_radiation(int argc, char** argv)
269265
const bool switch_delta_cloud = command_line_switches.at("delta-cloud" ).first;
270266
const bool switch_delta_aerosol = command_line_switches.at("delta-aerosol" ).first;
271267
const bool switch_tica = command_line_switches.at("tica" ).first;
272-
const bool switch_override_sza = command_line_switches.at("override-sza" ).first;
273-
const bool switch_override_azi = command_line_switches.at("override-azi" ).first;
274268

275269
Int photons_per_pixel = Int(command_line_ints.at("raytracing").first);
276-
int sza_deg = Int(command_line_ints.at("override-sza").first);
277-
int azi_deg = Int(command_line_ints.at("override-azi").first);
278270

279271
if (Float(int(std::log2(Float(photons_per_pixel)))) != std::log2(Float(photons_per_pixel)))
280272
{
@@ -453,26 +445,13 @@ void solve_radiation(int argc, char** argv)
453445

454446
Float tica_sza;
455447
Float tica_azi;
456-
if (switch_override_sza) {
457-
tica_sza = sza_deg * M_PI / 180.0f;
458-
Float mu0_in = cosf(sza_deg * M_PI / 180.0f);
459-
for (int icol=1; icol<=n_col; ++icol)
460-
mu0({icol}) = mu0_in;
461-
} else {
462-
mu0 = input_nc.get_variable<Float>("mu0", {n_col_y, n_col_x});
463-
tica_sza = acos(mu0.v()[0]) * 180.0 / M_PI;
464-
}
465448

466-
if (switch_override_azi) {
467-
tica_azi = azi_deg * M_PI/ 180.0f;
468-
Float azi_in = azi_deg * M_PI/ 180.0f;
469-
for (int icol=1; icol<=n_col; ++icol)
470-
azi({icol}) = azi_in;
471-
} else {
472-
azi = input_nc.get_variable<Float>("azi", {n_col_y, n_col_x});
473-
tica_azi = azi.v()[0];
474-
}
449+
mu0 = input_nc.get_variable<Float>("mu0", {n_col_y, n_col_x});
450+
azi = input_nc.get_variable<Float>("azi", {n_col_y, n_col_x});
475451

452+
tica_sza = acos(mu0.v()[0]) * 180.0 / M_PI;
453+
tica_azi = azi.v()[0];
454+
476455
if (switch_tica)
477456
{
478457
for (int icol=1; icol<=n_col; ++icol)

0 commit comments

Comments
 (0)