Skip to content

Commit 74b7837

Browse files
committed
small clean up
1 parent 1e0c426 commit 74b7837

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

src_cuda_rt/Cloud_optics_rt.cu

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -235,32 +235,32 @@ void Cloud_optics_rt::cloud_optics(
235235
Array_gpu<Float,2> ltau ({0, 0});
236236
Array_gpu<Float,2> ltaussa ({0, 0});
237237
Array_gpu<Float,2> ltaussag({0, 0});
238-
238+
239239
Array_gpu<Bool,2> icemsk({0, 0});
240240
Array_gpu<Float,2> itau ({0, 0});
241241
Array_gpu<Float,2> itaussa ({0, 0});
242242
Array_gpu<Float,2> itaussag({0, 0});
243-
243+
244244
// Temporary arrays for storage, only on set needed if either liquid or ice is present
245245
Array_gpu<Bool,2> msk({0, 0});
246246
Array_gpu<Float,2> taussa ({0, 0});
247247
Array_gpu<Float,2> taussag({0, 0});
248-
248+
249249
if ((clwp.ptr() != nullptr) && (ciwp.ptr() != nullptr))
250250
{
251251
liqmsk.set_dims({ncol, nlay});
252252
ltau.set_dims({ncol, nlay});
253253
ltaussa.set_dims({ncol, nlay});
254254
ltaussag.set_dims({ncol, nlay});
255-
255+
256256
icemsk.set_dims({ncol, nlay});
257257
itau.set_dims({ncol, nlay});
258258
itaussa.set_dims({ncol, nlay});
259259
itaussag.set_dims({ncol, nlay});
260260

261261
set_mask<<<grid_m_gpu, block_m_gpu>>>(
262262
ncol, nlay, mask_min_value, liqmsk.ptr(), clwp.ptr());
263-
263+
264264
set_mask<<<grid_m_gpu, block_m_gpu>>>(
265265
ncol, nlay, mask_min_value, icemsk.ptr(), ciwp.ptr());
266266
}
@@ -300,7 +300,7 @@ void Cloud_optics_rt::cloud_optics(
300300
this->liq_nsteps, this->liq_step_size, this->radliq_lwr,
301301
this->lut_extliq_gpu.ptr(), this->lut_ssaliq_gpu.ptr(),
302302
this->lut_asyliq_gpu.ptr(), ltau.ptr(), ltaussa.ptr(), ltaussag.ptr());
303-
303+
304304
compute_from_table_kernel<<<grid_gpu, block_gpu>>>(
305305
ncol, nlay, ibnd-1, icemsk.ptr(), ciwp.ptr(), reice.ptr(),
306306
this->ice_nsteps, this->ice_step_size, this->radice_lwr,
@@ -325,8 +325,8 @@ void Cloud_optics_rt::cloud_optics(
325325
this->lut_extice_gpu.ptr(), this->lut_ssaice_gpu.ptr(),
326326
this->lut_asyice_gpu.ptr(), optical_props.get_tau().ptr(), taussa.ptr(), taussag.ptr());
327327
}
328-
329-
328+
329+
330330
constexpr Float eps = std::numeric_limits<Float>::epsilon();
331331
if ((ciwp.ptr() != nullptr) && (clwp.ptr() != nullptr))
332332
{
@@ -348,7 +348,7 @@ void Cloud_optics_rt::cloud_optics(
348348
store_single_phase_kernel<<<grid_gpu, block_gpu>>>(
349349
ncol, nlay, eps,
350350
optical_props.get_tau().ptr(), optical_props.get_ssa().ptr(), optical_props.get_g().ptr(),
351-
taussa.ptr(), taussag.ptr());
351+
taussa.ptr(), taussag.ptr());
352352
}
353353

354354
}
@@ -362,7 +362,7 @@ void Cloud_optics_rt::cloud_optics(
362362
{
363363
const int ncol = optical_props.get_tau().dim(1);
364364
const int nlay = optical_props.get_tau().dim(2);
365-
365+
366366
// Set the mask.
367367
constexpr Float mask_min_value = Float(0.);
368368
const int block_col_m = 16;
@@ -379,32 +379,32 @@ void Cloud_optics_rt::cloud_optics(
379379
Array_gpu<Float,2> ltau ({0, 0});
380380
Array_gpu<Float,2> ltaussa ({0, 0});
381381
Array_gpu<Float,2> ltaussag({0, 0});
382-
382+
383383
Array_gpu<Bool,2> icemsk({0, 0});
384384
Array_gpu<Float,2> itau ({0, 0});
385385
Array_gpu<Float,2> itaussa ({0, 0});
386386
Array_gpu<Float,2> itaussag({0, 0});
387-
387+
388388
// Temporary arrays for storage, only on set needed if either liquid or ice is present
389389
Array_gpu<Bool,2> msk({0, 0});
390390
Array_gpu<Float,2> taussa ({0, 0});
391391
Array_gpu<Float,2> taussag({0, 0});
392-
392+
393393
if ((clwp.ptr() != nullptr) && (ciwp.ptr() != nullptr))
394394
{
395395
liqmsk.set_dims({ncol, nlay});
396396
ltau.set_dims({ncol, nlay});
397397
ltaussa.set_dims({ncol, nlay});
398398
ltaussag.set_dims({ncol, nlay});
399-
399+
400400
icemsk.set_dims({ncol, nlay});
401401
itau.set_dims({ncol, nlay});
402402
itaussa.set_dims({ncol, nlay});
403403
itaussag.set_dims({ncol, nlay});
404404

405405
set_mask<<<grid_m_gpu, block_m_gpu>>>(
406406
ncol, nlay, mask_min_value, liqmsk.ptr(), clwp.ptr());
407-
407+
408408
set_mask<<<grid_m_gpu, block_m_gpu>>>(
409409
ncol, nlay, mask_min_value, icemsk.ptr(), ciwp.ptr());
410410
}
@@ -444,7 +444,7 @@ void Cloud_optics_rt::cloud_optics(
444444
this->liq_nsteps, this->liq_step_size, this->radliq_lwr,
445445
this->lut_extliq_gpu.ptr(), this->lut_ssaliq_gpu.ptr(),
446446
this->lut_asyliq_gpu.ptr(), ltau.ptr(), ltaussa.ptr(), ltaussag.ptr());
447-
447+
448448
compute_from_table_kernel<<<grid_gpu, block_gpu>>>(
449449
ncol, nlay, ibnd-1, icemsk.ptr(), ciwp.ptr(), reice.ptr(),
450450
this->ice_nsteps, this->ice_step_size, this->radice_lwr,
@@ -459,7 +459,7 @@ void Cloud_optics_rt::cloud_optics(
459459
this->liq_nsteps, this->liq_step_size, this->radliq_lwr,
460460
this->lut_extliq_gpu.ptr(), this->lut_ssaliq_gpu.ptr(),
461461
this->lut_asyliq_gpu.ptr(), optical_props.get_tau().ptr(), taussa.ptr(), taussag.ptr());
462-
}
462+
}
463463
// Ice.
464464
else if (ciwp.ptr() != nullptr)
465465
{
@@ -478,13 +478,13 @@ void Cloud_optics_rt::cloud_optics(
478478
optical_props.get_tau().ptr(),
479479
ltau.ptr(), ltaussa.ptr(),
480480
itau.ptr(), itaussa.ptr());
481-
}
481+
}
482482
else if(clwp.ptr() != nullptr)
483483
{
484484
store_single_phase_kernel<<<grid_gpu, block_gpu>>>(
485485
ncol, nlay, eps,
486486
optical_props.get_tau().ptr(), taussa.ptr());
487-
}
487+
}
488488
else if(ciwp.ptr() != nullptr)
489489
{
490490
store_single_phase_kernel<<<grid_gpu, block_gpu>>>(

src_kernels_cuda_rt/raytracer_kernels.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ void ray_tracer_kernel(
222222
photon.position.x += dx;
223223
photon.position.y += dy;
224224
}
225-
225+
226226
const Float dz = photon.direction.z * (s_min + d_max);
227227
photon.position.z += dz;
228228

@@ -339,7 +339,7 @@ void ray_tracer_kernel(
339339
{
340340
Float dz = photon.direction.z * dn;
341341
photon.position.z = (dz > 0) ? min(photon.position.z + dz, (k_n+1) * kn_grid_d.z - s_min) : max(photon.position.z + dz, (k_n) * kn_grid_d.z + s_min);
342-
342+
343343
if (!independent_column)
344344
{
345345
Float dx = photon.direction.x * dn;

src_test/test_rte_rrtmgp_rt.cu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ void solve_radiation(int argc, char** argv)
373373

374374
if (switch_cloud_optics)
375375
{
376-
376+
377377
if (switch_liq_cloud_optics)
378378
{
379379
lwp.set_dims({n_col, n_lay});
@@ -958,7 +958,7 @@ void solve_radiation(int argc, char** argv)
958958
nc_sw_flux_net.add_attribute("long_name","Net shortwave fluxes (TwoStream solver)");
959959
nc_sw_flux_net.add_attribute("units","W m-2");
960960

961-
}
961+
}
962962

963963
if (switch_raytracing)
964964
{
@@ -999,7 +999,7 @@ void solve_radiation(int argc, char** argv)
999999

10001000

10011001
if (switch_single_gpt)
1002-
{
1002+
{
10031003
if (switch_twostream)
10041004
{
10051005
auto nc_sw_gpt_flux_up = output_nc.add_variable<Float>("sw_gpt_flux_up" , {"lev", "y", "x"});

0 commit comments

Comments
 (0)