Skip to content
Success

Changes

Summary

  1. Putting other log file copy commands in try catch to prevent it from failing the step before cleaning the directory (details)
  2. The big grid change. Converting gr from being an array of types containing 1D arrays, to a type containing 2D arrays. All cases BFB, cam multicolumn+silhs BFB, and cam multicolumn (no silhs) with backwards compatible settings BFB. (details)
  3. The big grid change. Converting gr from being an array of types containing 1D arrays, to a type containing 2D arrays. All cases BFB, cam multicolumn+silhs BFB, and cam multicolumn (no silhs) with backwards compatible settings BFB. (details)
  4. Making compatible with latest clubb change. update_xp2_mc will be broken by this, but all we need to do to fix it is push the column loop into it. (details)
  5. Fixing small bug preventing compilation. (details)
  6. Removing the zt2zm interface from clubb_api and making the api calls just redirect to the grid class interface for it. (details)
  7. Pushing column loop into mean advection procedures. (details)
  8. Little loop push (details)
  9. Moving above/below index of grid weights to last dimension. (details)
  10. Pushing loop into fill_holes. (details)
  11. Forgot small change. (details)
  12. Making linear_interpolated_azt_2D and linear_interpolated_azm_2D subroutines just to avoid a needless data copy. (details)
  13. Making update_xp2_mc 2D and creating interface for 1D calls. (details)
  14. Making use of new 2D call to update_xp2_mc (details)
  15. Fixing units in stats_zt_module.F90 (details)
  16. Fixing a bug in mono_flux_limiter.F90. (#1026) (details)
  17. Fixing a bug. (details)
  18. I changed the w_up_in_cloud code in 2 ways: (details)
  19. I added stats output for w_down_in_cloud to all_stats.in. (details)
  20. Modifications for the latest CLUBB code changes. (details)
  21. Adding w_down_in_cl to the E3SM stats output, as well. (details)
  22. I altered the w_up_in_cloud and w_down_in_cloud code so that a (details)
  23. I have optimized the new w_up_in_cloud and w_down_in_cloud code by (details)
  24. Refactored fill_holes_vertical to make GPUization simple. This is BIT_CHANGING, but results are bit-for-bit when using -O0 optimization, thus it is not answer changing. The first pass over each grid column will not parallelize well, the k-loop needs to be done in serial. Maximum parallelization has been exposed for the global hole-filling though, at the cost of occasionally doing unneccesary calculations. larson-group/clubb#972. (details)
  25. Removing fill_holes_multiplicative and replacing magic numbers with parameters from constants_clubb. larson-group/clubb#972 (details)
  26. Moving vertical_avg and vertical_integral to advance_helper_module. larson-group/clubb#972 (details)
  27. Moving vertical_avg and vertical_integral to advance_helper_module. larson-group/clubb#972 (details)
  28. Removing elementalness from sat_vapor_press_liq and making interal procedures subroutines rather than functions to prevent unneccesary data copies. Doing the same for thlm2T_in_K since it is often used in conjunction with sat_vapor_press_liq. Bit-for-bit confirmed with O0 using all single column cases with or without l_diag_Lscale_from_tau, and with cam_coarse_res. larson-group/clubb#972 (details)
  29. Adding comments. (details)
  30. Adding initial subroutine calc_ice_cloud_frac_component. (details)
  31. Cleaning up new subroutine calc_liquid_cloud_frac_component, and making sat_mixrat_ice a subroutine that works the same way as sat_mixrat_liq. larson-group/clubb#972 (details)
  32. Comment update (details)
  33. Removing these paratheses is BIT_CHANGING since it modifies the order of operations, but allows for the multiplication and subraction to be done in parallel for complex pipelines. (details)
  34. Improvements. Netcdf output is now functional and we can detect errors with multiple columns even when the standard output is identical. (details)
  35. I have updated the diagnostic. Main changes: 1. Merge Prof. Larson's tuner analyze_sensitivity_matrix. But domatrix is false by default, because the tuner is not the latest version.  2. Mergeing Kate's changes in function_pick_out.py. CAM's FV  dycore can be handled. 3. Plotting profiles below 700hPa. 4. Merge Brian's flag for DJF mean. 5. Creating new regional files for tuner, see draw_plots_hoz_2D.py. (details)
  36. Plotting file for large scale variables. (details)
  37. Adds commented-out line that prevents the monotonic flux (details)
  38. Updating monotonic flux limiter code to remove spikes. (#1038) (details)
  39. Creating new flags to control monotonic flux limiter (#1039) (details)
  40. Updating for changes to CLUBB.  See https://github.com/larson-group/clubb/pull/1039. (details)
  41. I am adding cloudy_updraft_frac and cloudy_downdraft_frac as (details)
  42. Modified for changes made to call to advance_clubb_core_api. (details)
  43. Minor adjustment to eliminate spikes in thlm tendencies from the monotonic flux limiter. (#1043) (details)
  44. Making interface for matrix solvers. (details)
  45. Making tridag tridiag everywhere, making sol soln, and adding intent comments. (details)
  46. A different way of dealing with monotonic flux limiter spikes (#1046) (details)
  47. Steffens tuner fixer branch (#1041) (details)
  48. Making compatible with latest clubb changes. (details)
  49. Adding capability to change matrix solving method via clubb_config_flags. (details)
  50. Fixing small bug, need to pass _copy arrays to prevent lapack mangling the real ones. (details)
  51. Making GPU and CPU versions of the penta_lu solver the same as discussed in larson-group/clubb#1024. (details)
  52. I added "smooth" max clipping for invrs_tau_shear, which is a variable (details)
  53. ADG1_pdf_driver subroutine port with OpenACC (details)
  54. Replacing old elemental ADG1_w_closure with new GPUized one. Making G_unit tests work with new version. Also making mixt_frac_max_mag a scalar since it was only being used as such. larson-group/clubb#1049 (details)
  55. I updated the clubb_intr.F90 file in the clubb_silhs_devel branch to (details)
  56. I can now safely remove all the "ifdef E3SM" statements from CLUBB's (details)
  57. Pushing column loop into lapack wrap. (details)
  58. Restructuring and Porting of Compute_mixing_length subroutine(Phase 1) (#1052) (details)
  59. Restructuring and Porting of Compute_mixing_length subroutine(Phase 2) (#1054) (details)
  60. Breaking up column loop in mono_flux_limiter. This may not be the final form for GPUization, but it's definitely a start, no longer do we have to copy single column variables to multicolumn ones anywhere. (#1051) (details)
  61. Adding tridiag_lu solver (#1056) (details)
  62. Adding OpenACC data directives for mixing length and adg routines (details)
  63. Fixing error causing GPU code not to run. Some variables to be copied were labelled as (ngrdcol,nz) when it should be (:ngrdcol,:nz). I've just removed the data length specifiers completely since they are not neccesary in general. (details)
  64. GPUizing sat_mixrat_ice_2D. (details)
  65. Pushing column loop into calculate_thvm (details)
  66. Removing update_pressure since it is no longer called anywhere in clubb or host models. The addition of this subroutine was discussed in larson-group/e3sm#6 and the removal of the call to it was discussed in larson-group/clubb#926. (details)
  67. Removing update_pressure from public list. This was causing compilation crashes. RESOLVED:8c7230fecb877d04fb129ef5e143e0993b4b29b1 (details)
  68. GPUizing some helping procedures. (details)
  69. Removing sigma_sqd_w from the acc data copyout statement. This is a bug which was causing the code to crash when not using managed memory. (details)
  70. Porting pdf_closure subroutine with OpenACC (#1059) (details)
  71. Adding wp3_on_wp2_cfl_num to CLUBB's output stats. (details)
  72. Removing usage of gr from pdf_closure. It was only ever used for nz, which is now fed in directly. (details)
  73. Clubb ticket #1025: Implemented way to make esa tuner reproducible, h… (#1068) (details)
  74. Gpu updates (#1070) (details)
  75. Implements Thomas Toniazzo's bug fix for spike removal (details)
  76. Making 'a_const' into a CLUBB tunable parameter. (#1072) (details)
  77. Updating for changes to CLUBB.  See https://github.com/larson-group/clubb/pull/1072. (details)
  78. Pdf closure driver gpuization (#1071) (details)
  79. Moving compute_cloud_cover outside of if ( l_use_cloud_cover ) then statement, the cloud_cover and rcm_in_layer variables they compute aren't output in clubb_standalone, but are in cam, causing cam bit diff tests to break. (details)
  80. Adding Skthl_zm to the update host list, I missed this in the last PR. I noticed this by comparing results with and without managed memory, now I've checked BFBness with arm, mpace_b, mc3e, and gabls2. (details)
  81. Small GPU fixes (#1076) (details)
  82. Code changes to implement modificiations on wp3 clippings (details)
  83. This commit contains code changes to implement modifications on limiters in three places: (details)
  84. Updated for recent changes to CLUBB. (details)
  85. Advance xm wpxp gpuization (#1077) (details)
  86. Small tweaks to fix some GPU bugs. Some variables were uninitialized on the CPU while we were saving them. This could only have been caught by comparing consecutive runs and checking _zt and _zm files, even then few cases were having problems. (details)
  87. Fixing a labelling error in redirect_interpolated_azt_2D and similar procedures, since this interpolates to zt the input should be zm. I think this was my fault, so I cleaned all the zt2zm and zm2zt things up to make it a little nicer. Also ordered the routines _k _1D _2D to make it easier to jump around, it was a bit confusing as they were out of order and the typo really made it hard. (details)
  88. Making it so sclr_tol is set to 0 before the specified sclr_tol_in. This is so that it is initialized to 0 in the case that sclr_dim = 0, since now we are setting it to have a minimum allocation size of 1 and would otherwise have a garbage value. This is what broke the clubb_openmp_gfortran_test. (details)
  89. Lscale GPUization (#1079) (details)
  90. gfortran does not like intent(out) specifiers for functions. (details)
  91. GPUizing Various Small Routines (#1080) (details)
  92. This commit is a commit that changes absolutely nothing. It is meant to trigger a change in the git update scripts, so that I can start the commit message logging in the autocommit updates larson-group/sys_admin#797 (details)
  93. This commit is a commit that changes absolutely nothing. It is meant to trigger a change in the git update scripts, so that I can start the commit message logging in the autocommit updates larson-group/sys_admin#797 (details)
  94. this is another commit that cahnges nothing that will trigger the gitUpdate scripts (details)
  95. adding an update that changes nothing and is just a test for the autoupdate script (details)
  96. Making CLUBB's splatting scheme implicit and smoother (#1075) (details)
  97. Calc sfc varnce GPUization (#1081) (details)
  98. Reducing C_wp2_splat to 0.25 (from 2.0) for new implicit splatting code. (details)
  99. Removed Space From clip_explicit (details)
  100. making changes to trigger autoudpate for test, these commits do nothing (details)
  101. making changes to trigger autoudpate for test, these commits do nothing (details)
  102. Here is another commit that changes nothing (details)
  103. Here is another commit that changes nothing (details)
  104. change to trigger updates (details)
  105. change to calc pressure to trigger autoupdate (details)
Commit 65d171a91d80478bbe599ab2f58f14facd2ad7a7 by pbroels
Putting other log file copy commands in try catch to prevent it from failing the step before cleaning the directory
The file was modified jenkins_tests/e3sm_run_gfortran_test/Jenkinsfile (diff)
Commit fece46637566b9e53ed2e20894a4f53cc2f617da by 37674341+huebleruwm
The big grid change. Converting gr from being an array of types containing 1D arrays, to a type containing 2D arrays. All cases BFB, cam multicolumn+silhs BFB, and cam multicolumn (no silhs) with backwards compatible settings BFB.
The file was modified fill_holes.F90 (diff)
The file was modified adg1_adg2_3d_luhar_pdf.F90 (diff)
The file was modified advance_xp3_module.F90 (diff)
The file was modified clubb_api_module.F90 (diff)
The file was modified turbulent_adv_pdf.F90 (diff)
The file was modified advance_windm_edsclrm_module.F90 (diff)
The file was modified pdf_closure_module.F90 (diff)
The file was modified mixing_length.F90 (diff)
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified grid_class.F90 (diff)
The file was modified advance_xm_wpxp_module.F90 (diff)
The file was modified pos_definite_module.F90 (diff)
The file was modified stats_clubb_utilities.F90 (diff)
The file was modified sponge_layer_damping.F90 (diff)
The file was modified parameters_tunable.F90 (diff)
The file was modified setup_clubb_pdf_params.F90 (diff)
The file was modified advance_wp2_wp3_module.F90 (diff)
The file was modified calc_pressure.F90 (diff)
The file was modified mono_flux_limiter.F90 (diff)
The file was modified advance_helper_module.F90 (diff)
The file was modified diffusion.F90 (diff)
The file was modified advance_xp2_xpyp_module.F90 (diff)
The file was modified clip_explicit.F90 (diff)
Commit dcb05d4849a9fd845627278f534f82c5d95b5424 by 37674341+huebleruwm
The big grid change. Converting gr from being an array of types containing 1D arrays, to a type containing 2D arrays. All cases BFB, cam multicolumn+silhs BFB, and cam multicolumn (no silhs) with backwards compatible settings BFB.
The file was modified latin_hypercube_driver_module.F90 (diff)
The file was modified silhs_api_module.F90 (diff)
Commit d3c8b62d7f46a6a6211d20aba97f99144c8e15f4 by Gunther Huebler
Making compatible with latest clubb change. update_xp2_mc will be broken by this, but all we need to do to fix it is push the column loop into it.
The file was modified components/eam/src/physics/cam/clubb_intr.F90 (diff)
The file was modified components/eam/src/physics/cam/subcol_SILHS.F90 (diff)
Commit 96ea77f83759b2826af8066f7bba0b8622e002b2 by Gunther Huebler
Fixing small bug preventing compilation.
The file was modified components/eam/src/physics/cam/clubb_intr.F90 (diff)
The file was modified components/eam/src/physics/cam/subcol_SILHS.F90 (diff)
Commit b283dcad1f9b9a9c6574f5c7466bd8125a80a917 by 37674341+huebleruwm
Removing the zt2zm interface from clubb_api and making the api calls just redirect to the grid class interface for it.
The file was modified clubb_api_module.F90 (diff)
Commit 64ef912040e0e808923bb5c9354e39c0d4ddbe87 by 37674341+huebleruwm
Pushing column loop into mean advection procedures.
The file was modified mono_flux_limiter.F90 (diff)
The file was modified advance_wp2_wp3_module.F90 (diff)
The file was modified advance_xp2_xpyp_module.F90 (diff)
The file was modified advance_xm_wpxp_module.F90 (diff)
The file was modified mean_adv.F90 (diff)
The file was modified advance_windm_edsclrm_module.F90 (diff)
The file was modified advance_xm_wpxp_module.F90 (diff)
Commit dd7ed27deff26acabf5edfe1932224e64ae68f5e by 37674341+huebleruwm
Moving above/below index of grid weights to last dimension.
The file was modified grid_class.F90 (diff)
The file was modified advance_wp2_wp3_module.F90 (diff)
The file was modified turbulent_adv_pdf.F90 (diff)
The file was modified mean_adv.F90 (diff)
The file was modified mono_flux_limiter.F90 (diff)
Commit 61e346b94dc205f46ddb43e037f2758a535a20b3 by 37674341+huebleruwm
Pushing loop into fill_holes.
The file was modified fill_holes.F90 (diff)
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified advance_xp2_xpyp_module.F90 (diff)
The file was modified advance_xm_wpxp_module.F90 (diff)
The file was modified clubb_api_module.F90 (diff)
The file was modified advance_wp2_wp3_module.F90 (diff)
The file was modified advance_xm_wpxp_module.F90 (diff)
Commit add842c9f5797774559dce57ce5f51a506523344 by 37674341+huebleruwm
Making linear_interpolated_azt_2D and linear_interpolated_azm_2D subroutines just to avoid a needless data copy.
The file was modified grid_class.F90 (diff)
Commit dc9e57ed7bdf35c97640ff0ddc87e39a6a51897b by 37674341+huebleruwm
Making update_xp2_mc 2D and creating interface for 1D calls.
The file was modified advance_xp2_xpyp_module.F90 (diff)
The file was modified clubb_api_module.F90 (diff)
Commit 1d80834b46adaac8de5937323d44e5353ffd033f by Gunther Huebler
Making use of new 2D call to update_xp2_mc
The file was modified components/eam/src/physics/cam/clubb_intr.F90 (diff)
Commit ed460b8da54ec8c8672698204b962b1f2c0bba76 by noreply
Fixing units in stats_zt_module.F90

This change will be BIT_CHANGING because it will affect the descriptions of variables in the netcdf files, but will not change answers.
The file was modified stats_zt_module.F90 (diff)
Commit 8d3e4542fb9b0c14babe8621eca51648539827a8 by noreply
Fixing a bug in mono_flux_limiter.F90. (#1026)

* Fixing a bug in mono_flux_limiter.F90.  This code was outputting "xm" instead of "wpxp" in several places.

This commit is BIT_CHANGING since it will affect the netcdf output for these variables, even though there
is no real change to answers.

* Renaming wpthlp_entermfl to wpthlp_enter_mfl which is more consistent with other variable names.

This is BIT_CHANGING due to changing the name and description in the output netcdf files.

* Renaming a few more instances of wpthlp_entermfl to wpthlp_enter_mfl.
The file was modified stats_zm_module.F90 (diff)
The file was modified stats_variables.F90 (diff)
The file was modified mono_flux_limiter.F90 (diff)
The file was modified pdf_closure_module.F90 (diff)
Commit 9434be0736f63802f57dc200dad4c6eae62f68be by bmg2
I changed the w_up_in_cloud code in 2 ways:

1)  The denominator term is now the "cloudy updraft" frac in each
PDF component, rather than just the PDF component cloud_frac.  This
is more consistent with the quantity being integrated.

2)  I also added a w_down_in_cloud for cloudy downdraft velocity.

Since these fields are not output as part of standard stats, this
commit will be bit-for-bit for the normal CLUBB output files.
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified clubb_api_module.F90 (diff)
The file was modified pdf_closure_module.F90 (diff)
Commit d0bd6bf033fe043e0218e55cf4059316e0d308e4 by bmg2
I added stats output for w_down_in_cloud to all_stats.in.

Since this stat was not added to standard_stats.in, official results
will still be bit-for-bit.
The file was modified pdf_closure_module.F90 (diff)
The file was modified stats_clubb_utilities.F90 (diff)
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified stats_zt_module.F90 (diff)
The file was modified stats_variables.F90 (diff)
Commit 4c4ee5a20f2aa6b971a1280e2303f6afe94fa02b by bmg2
Modifications for the latest CLUBB code changes.
The file was modified components/eam/src/physics/cam/clubb_intr.F90 (diff)
Commit 8d7f385fbf475f4ca9f958ea87394d34c6525dbb by bmg2
Adding w_down_in_cl to the E3SM stats output, as well.
The file was modified components/eam/src/physics/cam/clubb_intr.F90 (diff)
Commit a7de6b09f4f0e09b48f663e2432b3e98b29bfe60 by bmg2
I altered the w_up_in_cloud and w_down_in_cloud code so that a
thresholding is used similar to what is seen in the cloud fraction
and cloud water code.  If the PDF component mean of w more than
the maximum allow number of standard deviations away from 0, the
PDF component is either all-updrafty or all-downdrafty, and the
code avoids expensive computations where large magnitude values
can potentially be fed into ERF or EXP.

Of course, the results are not bit-for-bit with the previous version,
meaning that there are some situations where these thresholds come
into effect.  However, plots of all cases show no visible differences
in w_up_in_cloud and w_down_in_cloud.

Since w_up_in_cloud and w_down_in_cloud are not included in normal
stats output, this commit does not change the bit-for-bitness of
CLUBB code.
The file was modified pdf_closure_module.F90 (diff)
Commit 493cf3aafada57c53b1508b2b5990ce0a7dcafea by bmg2
I have optimized the new w_up_in_cloud and w_down_in_cloud code by
only doing repeated operations one time and then saving them as a
local variable.

Since the numerical order of operations changes for the argument
to the EXP term, the results will differ at the level of numerical
round-off, making this revision not bit-for-bit with the last revision.
This only affects the w_up_in_cloud and w_down_in_cloud statistical
output variables, which in turn are not output as part of
standard_stats.in.
The file was modified pdf_closure_module.F90 (diff)
Commit ab4282b0f6e0a3a1e3404836c96121fb79a872d4 by 37674341+huebleruwm
Refactored fill_holes_vertical to make GPUization simple. This is BIT_CHANGING, but results are bit-for-bit when using -O0 optimization, thus it is not answer changing. The first pass over each grid column will not parallelize well, the k-loop needs to be done in serial. Maximum parallelization has been exposed for the global hole-filling though, at the cost of occasionally doing unneccesary calculations. larson-group/clubb#972.
The file was modified advance_wp2_wp3_module.F90 (diff)
The file was modified advance_xp2_xpyp_module.F90 (diff)
The file was modified advance_xm_wpxp_module.F90 (diff)
The file was modified clubb_api_module.F90 (diff)
The file was modified fill_holes.F90 (diff)
The file was modified advance_clubb_core_module.F90 (diff)
Commit b0eeb2ebed4160829305c9a13bc60818b045fb22 by 37674341+huebleruwm
Removing fill_holes_multiplicative and replacing magic numbers with parameters from constants_clubb. larson-group/clubb#972
The file was modified constants_clubb.F90 (diff)
The file was modified fill_holes.F90 (diff)
The file was modified advance_xm_wpxp_module.F90 (diff)
The file was modified advance_xp2_xpyp_module.F90 (diff)
The file was modified advance_wp2_wp3_module.F90 (diff)
The file was modified advance_clubb_core_module.F90 (diff)
Commit 0a21a67e8c0d8373ae4315241b338842259b1d69 by 37674341+huebleruwm
Moving vertical_avg and vertical_integral to advance_helper_module. larson-group/clubb#972
The file was modified mono_flux_limiter.F90 (diff)
The file was modified stats_clubb_utilities.F90 (diff)
The file was modified advance_helper_module.F90 (diff)
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified fill_holes.F90 (diff)
The file was modified clubb_api_module.F90 (diff)
Commit 18677b4114aff3b59943c43e9207fc7a8630060e by 37674341+huebleruwm
Moving vertical_avg and vertical_integral to advance_helper_module. larson-group/clubb#972
The file was modified latin_hypercube_driver_module.F90 (diff)
Commit 09720448888edc3117ea736bfa140a0c60bd6f04 by 37674341+huebleruwm
Removing elementalness from sat_vapor_press_liq and making interal procedures subroutines rather than functions to prevent unneccesary data copies. Doing the same for thlm2T_in_K since it is often used in conjunction with sat_vapor_press_liq. Bit-for-bit confirmed with O0 using all single column cases with or without l_diag_Lscale_from_tau, and with cam_coarse_res. larson-group/clubb#972
The file was modified mixing_length.F90 (diff)
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified clubb_api_module.F90 (diff)
The file was modified saturation.F90 (diff)
The file was modified stats_clubb_utilities.F90 (diff)
The file was modified T_in_K_module.F90 (diff)
The file was modified advance_helper_module.F90 (diff)
The file was modified pdf_closure_module.F90 (diff)
The file was modified saturation.F90 (diff)
The file was modified T_in_K_module.F90 (diff)
The file was modified clubb_api_module.F90 (diff)
The file was modified grid_class.F90 (diff)
Commit bf79a8d55fe3ca7aacc106b68052a316cc3e359e by 37674341+huebleruwm
Adding initial subroutine calc_ice_cloud_frac_component.
The file was modified pdf_closure_module.F90 (diff)
Commit 60041d793c8fa3229f278a20ec6bdd9fc468f39f by 37674341+huebleruwm
Cleaning up new subroutine calc_liquid_cloud_frac_component, and making sat_mixrat_ice a subroutine that works the same way as sat_mixrat_liq. larson-group/clubb#972
The file was modified stats_clubb_utilities.F90 (diff)
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified saturation.F90 (diff)
The file was modified pdf_closure_module.F90 (diff)
The file was modified pdf_closure_module.F90 (diff)
Commit f2673f56e2eb850b910f74fa7f50ed589a9aebb3 by 37674341+huebleruwm
Removing these paratheses is BIT_CHANGING since it modifies the order of operations, but allows for the multiplication and subraction to be done in parallel for complex pipelines.
The file was modified saturation.F90 (diff)
Commit fb2e67620ac50c35b5cf20cb5e18a1a96d504a86 by 37674341+huebleruwm
Improvements. Netcdf output is now functional and we can detect errors with multiple columns even when the standard output is identical.
The file was modified output_netcdf.F90 (diff)
Commit a6da22b4021eb5de7b06dcfd65f057fb48623123 by guozhun
I have updated the diagnostic. Main changes: 1. Merge Prof. Larson's tuner analyze_sensitivity_matrix. But domatrix is false by default, because the tuner is not the latest version.  2. Mergeing Kate's changes in function_pick_out.py. CAM's FV  dycore can be handled. 3. Plotting profiles below 700hPa. 4. Merge Brian's flag for DJF mean. 5. Creating new regional files for tuner, see draw_plots_hoz_2D.py.
The file was modified diagnostic_v2_0/function_pick_out.py (diff)
The file was modified diagnostic_v2_0/E3SM_CLUBB_diag.py (diff)
The file was modified diagnostic_v2_0/draw_plots_hoz_3D.py (diff)
The file was modified diagnostic_v2_0/draw_clubb_standard.py (diff)
The file was modified diagnostic_v2_0/draw_plots_hoz_2D.py (diff)
The file was modified diagnostic_v2_0/function_cal_mean.py (diff)
The file was modified diagnostic_v2_0/draw_large_scale.py (diff)
Commit 4cbdc2fc796e609d89b1ae3c1bd5f707ac333c46 by guozhun
Plotting file for large scale variables.
The file was addeddiagnostic_v2_0/draw_large_scale_low.py
Commit 7e894655b82f891a5b60ba4e0e6670ff3c0fa5b0 by noreply
Adds commented-out line that prevents the monotonic flux

limiter from acting on rtm.  The comments are included to remind us of how to do this in case we choose to do so in the future.
The file was modified advance_xm_wpxp_module.F90 (diff)
Commit 4ba46bf534c3ed32f9227282f94b102f7006918e by noreply
Updating monotonic flux limiter code to remove spikes. (#1038)

Also putting a commented out code change in advance_xm_wpxp,
in case shutting of the flux limiter entirely for rtm is preferred.

See https://github.com/NCAR/amwg_dev/discussions/134 for discussion.

This commit will be BIT_CHANGING although the differences are only
obvious in sensitive cases like arm_97.
The file was modified mono_flux_limiter.F90 (diff)
Commit f30bf0d926336356fdb094f944cfb1174a1ec225 by noreply
Creating new flags to control monotonic flux limiter (#1039)

* Creating new flags to control monotonic flux limiter and the IF statement fix for the spikes found in CAM.

* Removing no-longer-necessary logical l_mono_flux_lim.

* Adding requested changes from PR (intent statements and editing error statement).

* Accidentally set flag to false. Changing to true.
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified clubb_api_module.F90 (diff)
The file was modified mono_flux_limiter.F90 (diff)
The file was modified model_flags.F90 (diff)
The file was modified advance_xm_wpxp_module.F90 (diff)
Commit 5ea2d151462b9f4b915e1b57f8f956f7e363ae46 by 59519056+bstephens82
Updating for changes to CLUBB.  See https://github.com/larson-group/clubb/pull/1039.
The file was modified components/eam/src/physics/cam/clubb_intr.F90 (diff)
Commit 3bdab2ca5a22a425da62f8cae4c8e01097f44fa8 by bmg2
I am adding cloudy_updraft_frac and cloudy_downdraft_frac as
outputs to the calculate_w_up_in_cloud code.

These fields are non-interactive for the standard set of cases.
Thus, all cases are bit-for-bit identical.

However, for the w_up_in_cloud and w_down_in_cloud results themselves,
it is possible that results might not be bit-for-bit since
the location of the max(eps, ...) clipping in the denominator
is changed.  However, results should not be appreciable different.
The file was modified pdf_closure_module.F90 (diff)
The file was modified stats_zt_module.F90 (diff)
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified clubb_api_module.F90 (diff)
The file was modified stats_variables.F90 (diff)
The file was modified stats_clubb_utilities.F90 (diff)
Commit 27a8c6d30493b2075a3082e341f469517a377d4d by bmg2
Modified for changes made to call to advance_clubb_core_api.
The file was modified components/eam/src/physics/cam/clubb_intr.F90 (diff)
Commit 200706b307be40ceb42f6121bd0f7d1be2b116c6 by noreply
Minor adjustment to eliminate spikes in thlm tendencies from the monotonic flux limiter. (#1043)

See https://github.com/NCAR/amwg_dev/discussions/134.

This commit will be BIT_CHANGING. Differences are mainly noticeable in the more sensitive cases.
The file was modified mono_flux_limiter.F90 (diff)
Commit 952c923222bf8901dc9b388f286872a73e6c609d by 37674341+huebleruwm
Making interface for matrix solvers.
The file was modified lapack_wrap.F90 (diff)
The file was addedmatrix_solver_wrapper.F90
The file was modified mono_flux_limiter.F90 (diff)
The file was modified advance_windm_edsclrm_module.F90 (diff)
The file was modified advance_wp2_wp3_module.F90 (diff)
The file was modified advance_xp2_xpyp_module.F90 (diff)
The file was modified advance_xm_wpxp_module.F90 (diff)
The file was addedpenta_lu_solver.F90
Commit 6d88c22f60109415cdedeafb87ef6ab88ca1b07e by 37674341+huebleruwm
Making tridag tridiag everywhere, making sol soln, and adding intent comments.
The file was modified advance_xm_wpxp_module.F90 (diff)
The file was modified lapack_wrap.F90 (diff)
The file was modified penta_lu_solver.F90 (diff)
The file was modified matrix_solver_wrapper.F90 (diff)
Commit 5baacd72ae885dceeb8a535b8d190c8be73a6931 by noreply
A different way of dealing with monotonic flux limiter spikes (#1046)

* A different way of dealing with monotonic flux limiter spikes in CAM, by increasing the value
of thl_tol_mfl.  ALso reverts the earlier fix.  BIT_CHANGING.

See https://github.com/NCAR/amwg_dev/discussions/134#discussioncomment-4165447.

* Reducing value of thl_tol_mfl from 0.5 to 0.2.

This will be BIT_CHANGING.
The file was modified constants_clubb.F90 (diff)
The file was modified mono_flux_limiter.F90 (diff)
Commit 269513ec0b95ddee2bff960d0c74a4ceccb8feef by noreply
Steffens tuner fixer branch (#1041)

* Clubb ticket #1025: Implemented changes dealing with pdf_params%thl1/2 and wp2 floating point errors occurring in tuning runs. BIT_CHANGING
- Added command-line option -t/--tuner to compile.bash which enables the -DTUNER compiler flag.
- Added line to gfortran compilation config file to easily disable openMP
- Added a couple error messages and cleaned up some instances of error handling in src/error.F90, src/clubb_driver.F90, and src/CLUBB_core/advance_clubb_core_module.F90
- Added global constant wp2_max in src/CLUBB_core/constants_clubb.F90 which sets the upper bound for wp2
- In pdf_closure, added sanity checks for pdf_params%thl1/2 (>=190K, <=1000K)
- Added debug warning in src/CLUBB_core/advance_wp2_wp3_module.F90 when wp2 is clipped.
- Added wp2_sfc clipping in src/CLUBB_core/sfc_varnce_module.F90
- Added debug_level_check to NaN check in clubb_driver.F90
- Added mention of the new compiler option to the README
The file was modified constants_clubb.F90 (diff)
The file was modified advance_wp2_wp3_module.F90 (diff)
The file was modified sfc_varnce_module.F90 (diff)
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified grid_class.F90 (diff)
The file was modified numerical_check.F90 (diff)
The file was modified pdf_closure_module.F90 (diff)
Commit 82ac519ddad0a61b0b0724326452fc96da315679 by Gunther Huebler
Making compatible with latest clubb changes.
The file was modified components/eam/src/physics/cam/clubb_intr.F90 (diff)
Commit 127883ca8f0dce455123056d72efb0cdef4794ca by 37674341+huebleruwm
Adding capability to change matrix solving method via clubb_config_flags.
The file was modified model_flags.F90 (diff)
The file was modified advance_wp2_wp3_module.F90 (diff)
The file was modified advance_windm_edsclrm_module.F90 (diff)
The file was modified matrix_solver_wrapper.F90 (diff)
The file was modified mono_flux_limiter.F90 (diff)
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified advance_xp2_xpyp_module.F90 (diff)
The file was modified clubb_api_module.F90 (diff)
The file was modified advance_xm_wpxp_module.F90 (diff)
Commit d8493869b48641432cac85c681884b5d5bf203a6 by 37674341+huebleruwm
Fixing small bug, need to pass _copy arrays to prevent lapack mangling the real ones.
The file was modified matrix_solver_wrapper.F90 (diff)
Commit 4588198937b2b4dcc148fc980125b5ea87fa3354 by 37674341+huebleruwm
Making GPU and CPU versions of the penta_lu solver the same as discussed in larson-group/clubb#1024.
The file was modified penta_lu_solver.F90 (diff)
Commit 65b7c1dd0001b0cb328a3b61ffa72e228b14c91c by bmg2
I added "smooth" max clipping for invrs_tau_shear, which is a variable
that is supposed to be positive definite, yet was obtaining negative
values at the model lower boundary owing to linear extension at the
boundaries as part of the linear interpolation call.

This change is BIT_CHANGING.
The file was modified mixing_length.F90 (diff)
Commit ac76c76a553d2c52a3156258c0afe41f66bea786 by 37674341+huebleruwm
ADG1_pdf_driver subroutine port with OpenACC

Added OpenACC related flags in linux_x86_64_nvhpc_casper.bash
You can enable/disable OpenACC compilation using OPENACC=true/false.
Added OpenACC directives in ADG1_pdf_driver subroutine.
The file was modified adg1_adg2_3d_luhar_pdf.F90 (diff)
Commit 512e68baec75eb6f5abc36582d6407fb9dceb189 by 37674341+huebleruwm
Replacing old elemental ADG1_w_closure with new GPUized one. Making G_unit tests work with new version. Also making mixt_frac_max_mag a scalar since it was only being used as such. larson-group/clubb#1049
The file was modified adg1_adg2_3d_luhar_pdf.F90 (diff)
Commit 013862237dcc4cd75e8a3e51f7d0caafe9e41946 by bmg2
I updated the clubb_intr.F90 file in the clubb_silhs_devel branch to
match the new style of CLUBB parameter declaration that is found
in the v3_convection_candidate branches.
The file was modified components/eam/src/physics/cam/clubb_intr.F90 (diff)
Commit 936783d00f3c1e950c0092e31b019249b16042f7 by bmg2
I can now safely remove all the "ifdef E3SM" statements from CLUBB's
parameters_tunable.F90.  This code is now located in the clubb_intr.F90
portion of E3SM.
The file was modified parameters_tunable.F90 (diff)
Commit 38f9da3d580e38623856fb89bf73e274c5207f79 by 37674341+huebleruwm
Pushing column loop into lapack wrap.
The file was modified matrix_solver_wrapper.F90 (diff)
The file was modified lapack_wrap.F90 (diff)
Commit 21426fea400c37cfd10dbde5beb0f96690a2f838 by noreply
Restructuring and Porting of Compute_mixing_length subroutine(Phase 1) (#1052)

* Restructuring and Porting of Compute_mixing_length subroutine(Phase 1)

Restructure: The compute_mixing_length is one of the top most routine taking 35-50%
of the total time in a single timestep. The subroutine has been restructured to
push the i-loop further down to extract vectorization and parallelization.
The restructuring also involves introduction of sat_mixrat_liq_acc routines to
extract parallelism when called inside a OpenACC parallel region.

Porting: OpenACC directives are inserted to port the restructured compute_mixing_length
code on to the GPUs. This port is currently unoptimized and there is still room for improvement.

NOTE: Currently, l_sat_mixrat_lookup = false and saturation_formula = saturation_flatau
(Earthworks config options) case is supported on OpenACC build. Any other options works
on CPUs as usual. OpenACC declare create directives are inserted in model_flags and
constants_clubb, as these module variables are used inside the saturation routines.

* Added debug message about only supporting
l_sat_mixrat_lookup = false and saturation_formula = saturation_flatau
on GPUs
Answers are Bit for Bit with arm-multicolumn case + nvhpc compiler.

* Changing CLUBB debug level 1 to 0 for the saturation formula support
running on GPUs

* Changing indentation to make gfortran happy, it wants ifdefs to start at the beginning of the line.

* Adding use statements for error checks and printouts, also making the errors set err_code to clubb_fatal_error.

Co-authored-by: huebler <huebler@uwm.edu>
The file was modified model_flags.F90 (diff)
The file was modified saturation.F90 (diff)
The file was modified constants_clubb.F90 (diff)
The file was modified mixing_length.F90 (diff)
Commit 38b63ff28ea145707d4ee1d9469013ee20b1697b by noreply
Restructuring and Porting of Compute_mixing_length subroutine(Phase 2) (#1054)

* Restructuring and Porting of Compute_mixing_length subroutine(Phase 2)

Restructure: sat_mixrat_liq_2D_acc is being directly called instead of
calling the 1D version inside the column loop. Changing sat_mixrat_liq_2D_acc
to a subroutine from a function and adding output array, start_index as
additional argument. This is a workaround for passing sub-arrays. The OpenACC
doen't like the sub-arrays being passed and fails the validation.

Porting: OpenACC directives are added inside sat_mixrat_liq_2D_acc for porting

Validation: Answers are Bit for Bit with arm-multicolumn case + nvhpc compiler

* Fix for compilation issues

Issue 1: Missed out declaring 'start_index' while intergrating the
change

Issue 2: The use of error_code module and the procedures inside it
causes OpenACC compilation issues when run on the device.

* Removing the sat_mixrat_liq_acc and sat_mixrat_liq_2D_acc, making the normal sat_mixrat_liq work for all current use cases, and making the other versions of sat_mixrat_liq (bolton,gfdl,lookup) functional with OPENACC.

Co-authored-by: huebler <huebler@uwm.edu>
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified mixing_length.F90 (diff)
The file was modified model_flags.F90 (diff)
The file was modified saturation.F90 (diff)
Commit 9f86ec344fcdd14a084c6249520c33815e225c24 by noreply
Breaking up column loop in mono_flux_limiter. This may not be the final form for GPUization, but it's definitely a start, no longer do we have to copy single column variables to multicolumn ones anywhere. (#1051)

The file was modified mono_flux_limiter.F90 (diff)
Commit a5ae081b3485ebbd6b470a1bf077eaf8ba2a2979 by noreply
Adding tridiag_lu solver (#1056)

* Adding tridiag_lu solver

* Changing low to lower in tridiag_lu and penta_lu, also fixing up some spacing.

* Making variables that represent matrix solutions more consistently named.
The file was modified lapack_wrap.F90 (diff)
The file was modified penta_lu_solver.F90 (diff)
The file was modified model_flags.F90 (diff)
The file was addedtridiag_lu_solver.F90
The file was modified matrix_solver_wrapper.F90 (diff)
Commit 79e3b2b05f93ffc04d514aad915c1a0aaec0f45f by Vince Larson
Adding OpenACC data directives for mixing length and adg routines

OpenACC structured data regions are added to optimize the data transfers
between CPU and GPU. These data regions will converted to unstrucutred
data region in the later optimization phase.
Results are bit for bit.
The file was modified adg1_adg2_3d_luhar_pdf.F90 (diff)
The file was modified mixing_length.F90 (diff)
Commit 466f229f2b977abcc4be9ac96c4ac11b818d1d37 by Gunther Huebler
Fixing error causing GPU code not to run. Some variables to be copied were labelled as (ngrdcol,nz) when it should be (:ngrdcol,:nz). I've just removed the data length specifiers completely since they are not neccesary in general.
The file was modified adg1_adg2_3d_luhar_pdf.F90 (diff)
The file was modified stats_clubb_utilities.F90 (diff)
The file was modified saturation.F90 (diff)
Commit ef8ea9df21e00777179b628e5deaf68842411ecd by 37674341+huebleruwm
Pushing column loop into calculate_thvm
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified calc_pressure.F90 (diff)
Commit b0a3a8fc353a232b661ebe6fa26c264d59904993 by 37674341+huebleruwm
Removing update_pressure since it is no longer called anywhere in clubb or host models. The addition of this subroutine was discussed in larson-group/e3sm#6 and the removal of the call to it was discussed in larson-group/clubb#926.
The file was modified calc_pressure.F90 (diff)
Commit 6f870bb99c6f94145ebef421ea0435ac083e84f1 by Gunther Huebler
Removing update_pressure from public list. This was causing compilation crashes. RESOLVED:8c7230fecb877d04fb129ef5e143e0993b4b29b1
The file was modified calc_pressure.F90 (diff)
Commit 4ed2ca7249d959da9e95b40faf2475fb3322f174 by 37674341+huebleruwm
GPUizing some helping procedures.
The file was modified mean_adv.F90 (diff)
The file was modified grid_class.F90 (diff)
The file was modified saturation.F90 (diff)
The file was modified turbulent_adv_pdf.F90 (diff)
Commit 5543d4fdcd60911bcef0658fc693b9ddc50a0e4a by 37674341+huebleruwm
Removing sigma_sqd_w from the acc data copyout statement. This is a bug which was causing the code to crash when not using managed memory.
The file was modified adg1_adg2_3d_luhar_pdf.F90 (diff)
Commit 02732556bd0ed380f305bb59f5e421e5a4c615a8 by noreply
Porting pdf_closure subroutine with OpenACC (#1059)

* Porting pdf_closure subroutine with OpenACC

OpenACC directives are added to pdf_closure subroutine. The necessary
structured data region is also added for optimzing data movement across
kernels. There is opportunity to task parallelize using streams and
will be explored in the future.

Answers are bit for bit.

* Fixing the copyin directives

* Making work without managed memory.
The file was modified pdf_closure_module.F90 (diff)
The file was modified pdf_utilities.F90 (diff)
Commit 74d62d932283ec7f668d1ab7a7eb5cf4c2518e31 by bmg2
Adding wp3_on_wp2_cfl_num to CLUBB's output stats.
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified stats_variables.F90 (diff)
The file was modified stats_zm_module.F90 (diff)
The file was modified stats_clubb_utilities.F90 (diff)
Commit 2cfb4126e2acaad338d58387801f2f0e69f2be66 by 37674341+huebleruwm
Removing usage of gr from pdf_closure. It was only ever used for nz, which is now fed in directly.
The file was modified pdf_closure_module.F90 (diff)
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified adg1_adg2_3d_luhar_pdf.F90 (diff)
Commit 90851771d55ebaeb104a3bd7edae92ffd4a248a6 by noreply
Clubb ticket #1025: Implemented way to make esa tuner reproducible, h… (#1068)

* Clubb ticket #1025: Implemented way to make esa tuner reproducible, hid error output of optional diagnostic variables behind check, fixed parallelization issue with tuner, esa max_iters parameter is now in stats namelist, fixed issue with TUNER compiler directive, some small fixes.
- New namelist variables prescribed_rand_seed and l_use_prescribed_rand_seed determine if the esa tuner will use a random or a fixed value as random seed. Added descriptions to README.
- Added max_iters to stats namelist to make it more modifiable.
- Renamed stp_adjst_intercept_in and stp_adjst_slope_in to stp_adjst_shift_in and stp_adjst_factor_in, respectively, to better reflect their influence on step size.
- The error output in src/CLUBB_core/pdf_closure_module.F90 for the diagnostic variables wprtp2, wpthlp2, wprtpthlp, and rcp2 is now hidden behind existence checks for these variables. And a clarification was added to "#ifdef TUNER" directive.
- NetCDF file access caused the tuner to crash in parallel mode (-fopenmp flag in config file and multiple cases). Adding an $OMP CRITICAL structure around the call to stats_init in clubb_driver.F90 fixed that.
- Fixed compile/README. Config files are specified with the -c option.
- The -t option in run_scripts/run_tuner.bash interfered with the previous usage of the TUNER compiler directive. Renamed the old TUNER directive to NR_SP, a short for "numerical recipes, single precision". TUNER now is the option to "turn on" code changes required to run the tuner.
The file was modified pdf_closure_module.F90 (diff)
Commit 61ea0db56546ea2946cb3c0ee368fd57752c1451 by noreply
Gpu updates (#1070)

* Fixing bug. This was only triggered when l_input_fields=.true., which I am only testing because it needs to be true so that I can test ADG2_driver.

* Removing usage of gr from pdf_closure. It was only ever used for nz, which is now fed in directly.

* Making openacc statements more consistent. Ensuring all statments on double loops have specified gang and vector, and that all parallel loops have an end parallel loop statment at the end of them. Everything BFB on CPUs and GPUs.

* Pushing acc data region to outermost parts of mixing_length.

* Removing pdf_implicit_coefs_terms from acc copyin and copyout. It is only used when iiPDF_type == iiPDF_new .or. iiPDF_type == iiPDF_new_hybrid, so we do not need to do any copying with it. The inclusion of it also caused the data statement to copy unallocated arrays, which are just garbage pointers, and that was causing random occasional crashes (either segfaults or gpu out of memory).

* The update device clauses for return variables seems to only be requried for arrays contained in types. See https://github.com/larson-group/clubb/issues/1049\#issuecomment-1440624778

* Moving acc end data to end of pdf_closure. This reuqired removing any conditional return statements that appear before the final return, since we're not allowed to branch out of an acc region early. I also moved a large printout statement outside of a loop. The only reason it was in the loop to begin with was because pdf_params used to be an array of types, but now is a type of arrays, allowing us to print the full arrays directly.

* Making loop an acc loop. If we weren't outputting w_[up/down]_in_cloud (iw_up_in_cloud <= 0 .or. iw_down_in_cloud <= 0, then these arrays were only being zerod out on the CPU and would've getting overwritten by the uninitialized GPU data at the end of the data statement. This change causes the arrays to get correctly zerod out on the GPU when we need.

* Update VariableGroupNondimMoments.py

Fixed a typo

* Merging new changes from master

* Removing need for -gpu=deepcopy, pushing some acc data statements up call tree, and replacing some acc data statements with acc delare statements so that return statements can be added back in.

* Adding back an acc loop that was accidentally removed during a merge.

---------

Co-authored-by: Brian Griffin <31553422+bmg929@users.noreply.github.com>
The file was modified saturation.F90 (diff)
The file was modified adg1_adg2_3d_luhar_pdf.F90 (diff)
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified turbulent_adv_pdf.F90 (diff)
The file was modified mean_adv.F90 (diff)
The file was modified pdf_closure_module.F90 (diff)
The file was modified grid_class.F90 (diff)
The file was modified mixing_length.F90 (diff)
The file was modified pdf_utilities.F90 (diff)
Commit fdf454198c75d605df4d989599620e23c42135fe by noreply
Implements Thomas Toniazzo's bug fix for spike removal

in the monotonic flux limiter.  See

https://github.com/larson-group/clubb_release/pull/11/files

This code change is
expected to be BIT_CHANGING for cases in which
`l_predict_upwp_vpwp = T`, `l_mono_flux_lim_um = T`
or `l_mono_flux_lim_vm = T`, and the monotonic
flux limiter is triggered.

This bug fix prevents non-conservation of momentum
when the vertical integral of either of the wind components `um` or `vm` is negative.
The file was modified mono_flux_limiter.F90 (diff)
Commit e2ffb7330b8d80d9d895759c6a1781239ec00141 by noreply
Making 'a_const' into a CLUBB tunable parameter. (#1072)

* Converting the sfc_varnce_module.F90 parameter 'a_const' into a CLUBB tunable parameter.

Results should be bit-for-bit since it will be set to 1.8 and with l_vary_convect_depth=F
this is the standard value.

Some discussion in ticket #994.

* Completing requested changes, see PR #1072.
The file was modified clubb_api_module.F90 (diff)
The file was modified parameter_indices.F90 (diff)
The file was modified parameters_tunable.F90 (diff)
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified sfc_varnce_module.F90 (diff)
Commit 502b6d142e2d71530febdcb89fed0fb126daddfb by benjamin.andrew.stephens
Updating for changes to CLUBB.  See https://github.com/larson-group/clubb/pull/1072.
The file was modified components/eam/src/physics/cam/clubb_intr.F90 (diff)
Commit 1463a2c08c088d8c28aaf6831e88e234b76bdddd by noreply
Pdf closure driver gpuization (#1071)

* GPUizing pdf_closure_driver, testing still needed, bug likely.

* Making data movement better. Also fixed some random things. Still need to return returns.

* Adding back a couple return statments. Moving a comment where it should be. GPUizing a missed loop.

* Making arguements list satisfy standards.

* Making arguements list satisfy standards. Also adding max(1,hydrometdim) to hydromet inputs.

* Capitalizing K

* Making the error case in compute_cloud_cover behavior a bit differently. This allows the error to be detected immediately by GPU runs as well.

* Calling compute_cloud_cover only needs to be done if l_use_cloud_cover = .true.
The file was modified Skx_module.F90 (diff)
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified T_in_K_module.F90 (diff)
The file was modified sigma_sqd_w_module.F90 (diff)
The file was modified pdf_closure_module.F90 (diff)
Commit 6dd01b5920350c08035fa76d513f4086340a43f7 by Gunther Huebler
Moving compute_cloud_cover outside of if ( l_use_cloud_cover ) then statement, the cloud_cover and rcm_in_layer variables they compute aren't output in clubb_standalone, but are in cam, causing cam bit diff tests to break.
The file was modified advance_clubb_core_module.F90 (diff)
Commit f635d227db08b38aa005bebbc8d0e63c4d6ea9ce by Gunther Huebler
Adding Skthl_zm to the update host list, I missed this in the last PR. I noticed this by comparing results with and without managed memory, now I've checked BFBness with arm, mpace_b, mc3e, and gabls2.
The file was modified advance_clubb_core_module.F90 (diff)
Commit adba51a83aea7bd6e044720c58e4d27596b235fa by noreply
Small GPU fixes (#1076)

* Fixing small things that I caught by adding the default(present) onto acc loops.

* Moving default(present) to the end because it looks nicer there.
The file was modified mean_adv.F90 (diff)
The file was modified Skx_module.F90 (diff)
The file was modified grid_class.F90 (diff)
The file was modified adg1_adg2_3d_luhar_pdf.F90 (diff)
The file was modified pdf_utilities.F90 (diff)
The file was modified turbulent_adv_pdf.F90 (diff)
The file was modified parameters_model.F90 (diff)
The file was modified mixing_length.F90 (diff)
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified T_in_K_module.F90 (diff)
The file was modified saturation.F90 (diff)
The file was modified pdf_closure_module.F90 (diff)
The file was modified sigma_sqd_w_module.F90 (diff)
Commit 7435d1c799f340302393782cc58d5f7eaeb608ef by bmg2
Code changes to implement modificiations on wp3 clippings
This commit contains code changes to implement modifications of skewness
clippings on wp3 in src/CLUBB_core/clip_explicit.F90. The default method attempts
to apply smaller (larger) clippings below (above) 100m AGL level, which
can cause a discontinuities around 100m AGL level. This clippings is
found to trigger sawthooth oscillations in wp3 when linear diffusion is
used. Such swathooth oscillations are eleminated if a smoothed Heaviside
function is introduced to obtain a smooth transition of clippings at
around 100m AGL level. The changes is necessary to obtain the first
order convergence in CLUBB-SCM when lienar diffusion is used.

Previously committed by Shixuan.
The file was modified model_flags.F90 (diff)
The file was modified clip_explicit.F90 (diff)
The file was modified clubb_api_module.F90 (diff)
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified advance_wp2_wp3_module.F90 (diff)
Commit 16fcc9ba1c2ab85f00a4d798dccf7a59cbfc718b by bmg2
This commit contains code changes to implement modifications on limiters in three places:

1. remove the limiters in denominator of equation for
   brunt_vaisala_freq_sqd_smth, which affects the computed
   eddy dissipation time scale in turbulent fluxes (wpxp).
   (in mixing_length.F90)

2. reduce the threshold values of limiters in the equation
   for richardson number (sqrt_Ri_zm)
   (in mixing_length.F90)

3. introduce the smoothed max/min function for limiters in
   equation of Cx_fnc_Richardson.
   (in advance_helper_module.F90).

After the modification, we also apply a zt2m(zm2zt) smoothing
on the calculated quantities. These modifications are found to
be benificial for improving solution convergence in CLUBB-SCM

The code changes are controlled by a newly introduced flag named
"l_modify_limiters_for_cnvg_test", which is set to .false. (meaning that
the modificaitons on limiters is turned off) by default.

Originally committed by Shixuan.
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified mixing_length.F90 (diff)
The file was modified clubb_api_module.F90 (diff)
The file was modified advance_helper_module.F90 (diff)
The file was modified model_flags.F90 (diff)
Commit fbb7d22afa20acd41121319a2309d6e91dd75103 by bmg2
Updated for recent changes to CLUBB.
The file was modified components/eam/src/physics/cam/clubb_intr.F90 (diff)
Commit 781ef9dfc3079f5d20cf22f044eac5970443c1b9 by noreply
Advance xm wpxp gpuization (#1077)

* Initial commit for GPUizing advance_xm_wpxp.

* GPUizing fill_holes_vertical

* Adding Skthl_zm to the update host list, I missed this in the last PR. I noticed this by comparing results with and without managed memory, now I've checked BFBness with arm, mpace_b, mc3e, and gabls2.

* Small GPU fixes (#1076)

* Fixing small things that I caught by adding the default(present) onto acc loops.

* Moving default(present) to the end because it looks nicer there.

* Adding default(present) to all acc loop statements. Also adding azt to a copyin statement, which was missed previously. All BFB.

* Incemental update, not well tested yet.

* Removing some copies and making the sclr_dim change.

* Fixing a bug that only seemed detectable with astex_a209. We need to pass only single arrays to functions, calling ddzt( nz, ngrdcol, gr, rho_ds_zt * K_zt_nu ) was resulting in rho_ds_zt * K_zt_nu being evluated on the CPU, but the values were only valid on the GPU. So we need to evaluate that expression on the GPU, save it into an array (currently K_zt_nu_tmp), then pass that to ddzt.

* GPUizing calc_turb_adv_range

* GPUizing mono_flux_limiter

* Cleaning up data statments and a couple other things.

* Updated for some different options.

* More updates needed for various options.

* Reverting accidental flag change

* Should be the final changes, all options tested now.

* Replacing some comments in monoflux limiter, and also modifying it to make it BFB on CPUs. Also changing incorrect error conditions on tridiag.

* Adding max_x_allowable to update host statement, missed previous.

* Properly naming tmp variables and variables calculated from ddzt and ddzm start with ddzt_ and ddzm_.

* Replacing constants with named ones from constants_clubb.

* Replacing hard coded numbers in lhs variables representing the number of bands they contain with fortran parameters.
The file was modified advance_xm_wpxp_module.F90 (diff)
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified grid_class.F90 (diff)
The file was modified diffusion.F90 (diff)
The file was modified mean_adv.F90 (diff)
The file was modified matrix_solver_wrapper.F90 (diff)
The file was modified mono_flux_limiter.F90 (diff)
The file was modified advance_helper_module.F90 (diff)
The file was modified fill_holes.F90 (diff)
The file was modified parameters_model.F90 (diff)
The file was modified turbulent_adv_pdf.F90 (diff)
The file was modified clip_explicit.F90 (diff)
Commit 4e5ef2859907a8a3e8b44fea718de72c509ae1a4 by Gunther Huebler
Small tweaks to fix some GPU bugs. Some variables were uninitialized on the CPU while we were saving them. This could only have been caught by comparing consecutive runs and checking _zt and _zm files, even then few cases were having problems.
The file was modified advance_xm_wpxp_module.F90 (diff)
Commit 9552ab496758875cdb5dff86d47d80e2d3a7cb0f by Gunther Huebler
Fixing a labelling error in redirect_interpolated_azt_2D and similar procedures, since this interpolates to zt the input should be zm. I think this was my fault, so I cleaned all the zt2zm and zm2zt things up to make it a little nicer. Also ordered the routines _k _1D _2D to make it easier to jump around, it was a bit confusing as they were out of order and the typo really made it hard.
The file was modified grid_class.F90 (diff)
Commit c3bec1875abeade74fe0dd0cd38cb5361e7cac8f by Gunther Huebler
Making it so sclr_tol is set to 0 before the specified sclr_tol_in. This is so that it is initialized to 0 in the case that sclr_dim = 0, since now we are setting it to have a minimum allocation size of 1 and would otherwise have a garbage value. This is what broke the clubb_openmp_gfortran_test.
The file was modified parameters_model.F90 (diff)
Commit 40a65a54f061974152b9431e88a562d557f70dc5 by noreply
Lscale GPUization (#1079)

* Making 2 new functions zm2zt2zm and zt2zm2zt to handle smoothing by interpolation. Replaced the spots in clubb I know that uses this to smooth things. This is just a nice to have and could allow for easy optimizations in the future by inlining the interpolations. All cases BFB on CPU and GPU, checked all relevant options too.

* GPUizing diagnose_Lscale_from_tau

* Removing some unused variables.

* Moving acc data statements from calc_Lscale_directly up to advance_clubb_core.

* Removing an unused variable.

* GPUizing the l_smooth_min_max option.

* GPUizing l_avg_Lscale

* Changes to variable names to avoid gross long names only used once.
The file was modified mixing_length.F90 (diff)
The file was modified grid_class.F90 (diff)
The file was modified clip_explicit.F90 (diff)
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified advance_helper_module.F90 (diff)
Commit 7094e3620ee063af2bd55a8f072cb32ce3858c4b by Gunther Huebler
gfortran does not like intent(out) specifiers for functions.
The file was modified grid_class.F90 (diff)
Commit e12416aef4fd25ee8f843abab95e16d9a186d57e by noreply
GPUizing Various Small Routines (#1080)

* GPUizing compute_Cx_fnc_Richardson

* GPUizing term_wp2_splat and term_wp3_splat

* GPUizing xp3_LG_2005_ansatz

* GPUizing calculate_thvm

* GPUizing pvertinterp even though I don't think we care about the l_do_expldiff_rtm_thlm flag

* Fixing bug. Setting l_do_expldiff_rtm_thlm causes us to use edsclrm, so we need to also ensure that edsclrm > 1 (1 because it uses a edsclr_dim-1 index)

* Pushing some data statements up the call tree.
The file was modified Skx_module.F90 (diff)
The file was modified interpolation.F90 (diff)
The file was modified advance_helper_module.F90 (diff)
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified sigma_sqd_w_module.F90 (diff)
The file was modified calc_pressure.F90 (diff)
Commit 0dbf4fc79c628d0d783a67b545a14792662177a3 by cernikt
This commit is a commit that changes absolutely nothing. It is meant to trigger a change in the git update scripts, so that I can start the commit message logging in the autocommit updates larson-group/sys_admin#797
The file was modified grid_class.F90 (diff)
Commit fb9b5e177deabcd39ce0cf36b7b1f0fd883f4af6 by cernikt
This commit is a commit that changes absolutely nothing. It is meant to trigger a change in the git update scripts, so that I can start the commit message logging in the autocommit updates larson-group/sys_admin#797
The file was modified math_utilities.F90 (diff)
Commit 8360118ab54c355ad8a86ed330ade644c4bdcbd8 by cernikt
this is another commit that cahnges nothing that will trigger the gitUpdate scripts
The file was modified interpolation.F90 (diff)
Commit fa866723ef299b5e7c3574bb3f45f38f3fcb07f5 by cernikt
adding an update that changes nothing and is just a test for the autoupdate script
The file was modified clip_explicit.F90 (diff)
Commit e7a5c0ce02567906f9003eb1b1a1cf5ca94bca4c by noreply
Making CLUBB's splatting scheme implicit and smoother (#1075)

* Introducing rough implicit splatting scheme into CLUBB.  Not yet implicit for wp3.

* Implementing implicit splatting for wp3.

* Further improvements to implicit splatting code, including

- smoothing of the BV freq used for splatting
- adding a new variable 'bv_freq_sqd_splat' to stats
- add the new variable to pyplotgen standard output

See PR #1075 and issue #994.

* Some cleanup.

* More cleanup, and adding comments.

* More comments.

* Updating implicit splatting scheme.

* Updates to resolve PR requests.

Updates associated with implicit splatting will be BIT_CHANGING.
The file was modified advance_helper_module.F90 (diff)
The file was modified advance_xp2_xpyp_module.F90 (diff)
The file was modified stats_variables.F90 (diff)
The file was modified stats_zm_module.F90 (diff)
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified advance_wp2_wp3_module.F90 (diff)
The file was modified sfc_varnce_module.F90 (diff)
Commit 08475cfca3f2571fc6342c8137f1c64d61bd6857 by noreply
Calc sfc varnce GPUization (#1081)

* Initial loop push for calc_sfc_varnce

* BIT_CHANGING:3b086a40085284aa49c71d32c001d20153a8ddb4 the last commit is bit changing for only some cases and only when using higher than -02 optimization. uf min seems to be the first calculation that starting to differ bitwise. Using the check_multicol script confirms the differences are small.

* Adding a tweak to surface values in the extra columns. This helped me check calc_sfc_varance, since we were not changing any arrays that would've affected calculations there.

* Small optimization, making wstar and ustar2 scalars.

* GPUizing calc_sfc_varnce

* Removing conditional around some stats calls. Now we will always save sfc values to stats, because this will change stats files when gr%zm(i,1) > sfc_elevation, this is potentially BIT_CHANGING.

* Merging with latest clubb changes and making work on GPUs again.

This contained 2 commits that are BIT_CHANGING in some situations.
The file was modified advance_clubb_core_module.F90 (diff)
The file was modified sfc_varnce_module.F90 (diff)
The file was modified advance_helper_module.F90 (diff)
Commit 3daa3257c2033ab03757a3c5bed4d780fae45770 by benjamin.andrew.stephens
Reducing C_wp2_splat to 0.25 (from 2.0) for new implicit splatting code.

Also fixing bug that shows up when l_brunt_vaisala_freq_moist = T.  This
will hopefully help to get some failing CAM tests running again.

See #1074 and PR #1075 for info.

This is BIT_CHANGING for all cases due to the new tunable parameter value.
The file was modified advance_helper_module.F90 (diff)
Commit a9af25eeab72b59dae5bd30bd315b35c8c78961a by cernikt
Removed Space From clip_explicit

This is another commit that changes absolutely nothing, and only exists to test autocommit changes
The file was modified clip_explicit.F90 (diff)
Commit a7df38330f8cf210f542a395c8b1df60b166859b by cernikt
making changes to trigger autoudpate for test, these commits do nothing

here is a body to the commit as well
The file was modified calendar.F90 (diff)
Commit c5d25471ddb6daf201a8dc99ed95aca1b1f6091c by cernikt
making changes to trigger autoudpate for test, these commits do nothing

here is a body to the commit as well
The file was modified math_utilities.F90 (diff)
Commit 571c3fab16ab4f1315e272fa536064a8dc4720f0 by cernikt
Here is another commit that changes nothing

Here is the body
The file was modified calendar.F90 (diff)
Commit 10561ea5166e8f1045de302b117e2d6526332337 by cernikt
Here is another commit that changes nothing

Here is the body
The file was modified math_utilities.F90 (diff)
Commit 81f82f5ff2f9a5f7047d2c810aeff0ac5c296b43 by cernikt
change to trigger updates

this is the last batch
The file was modified endian.F90 (diff)
Commit c2e0cf01861d6d2e292f0cc51c24a83c8ab1e711 by cernikt
change to calc pressure to trigger autoupdate

body
The file was modified calc_pressure.F90 (diff)