For RegTune, adds quadratic curves to three-dot plot. (details)
For RegTune, defaults to polynomial fit for sensitivity matrix (details)
In RegTune, normalizes metrics by a user-specified number (details)
For RegTune, adds color-coded matrix of correlations among parameter vectors. (details)
For clarity, renames figures in RegTune. (details)
Creates new function, setUpPreliminaries, in RegTune. (details)
For RegTune, adds capability to prescribe (not tune) a parameter (details)
Hides print statements in RegTune by using beVerbose=False. (details)
Fixes bug in QuadTune's code that prescribes parameter values. (details)
Adds basic cost function printouts to QuadTune. (details)
QuadTune: refactored to use more subroutines (details)
Fixed some oversights for the bv_efold commits and increased string length for tuning field names for invrs_tau variables - CLUBB ticket #1069 (#1106) (details)
BIT_CHANGING! brunt_vaisala_freq_sqd_mixed now replaces brunt_vaisala_freq_sqd for later calculations - CLUBB ticket #1102 (details)
Added option to plot "Lumped Buoyance Budgets" (wpxp_bp combined with (details)
Added a statement that I had previously omitted. The new combined budget (details)
Updating pyplotgen to include a "contour" plot of rcm in the background. (details)
I added the --background-rcm optional flag to pyplotgen. (details)
Small additions that allow all cases to run with pyplotgen. (details)
In the previous commits for the --background-rcm option of pyplotgen, (details)
I am updating the --background-rcm option of pyplotgen to make two (details)
BIT_CHANGING for lscale setup. Updated configurable_model_flags.in and model_flags.F90 - CLUBB ticket #1102 (#1108) (details)
QuadTune: Adds chisqd metric and bar chart for a global run. (details)
QuadTune: adds commented-out attempt to vary the bar base (details)
Likely BIT_CHANGING because of added output fields. Added code outputting C6_term and different Brunt Vaisala frequencies to disk - CLUBB ticket #1102 (#1109) (details)
Changed sqrt_Ri_zm to Ri_zm in preparation of changing the exponent for calculation of invrs_tau_wpxp_zm in mixing_length.F90 - CLUBB ticket #1102 (#1110) (details)
BIT_CHANGING! Removed Richardson_num and all corresponding code - CLUBB ticket #1102 (#1111) (details)
QuadTune: Adds fnc to plot a horizonal bar chart for metrics. (details)
QuadTune: Includes full perturbation in params bar chart (details)
QuadTune: Adds new parameter correlation matrix plot. (details)
Adding new argument list variables to openacc copyin statements (details)
Limiting gabls2 to 500 timesteps in new jenkins test (details)
Changing sclr test case to cobra, keeping 500 timestpes, gabls2 appears less stable as a result of commit 77ce77409e9da770515f66bbb50a869da74aca7d (details)
Setting l_smooth_Heaviside_tau_wpxp to .true. by default (details)
Undoing accidental changes to compiler config (details)
Making nightly cpu vs gpu test use a new config script for the cpu compile. This is the minimize the differences to be only whether or not the openacc GPU code is enabled. (details)
Limiting mpace_b to 250 timestpes for gpu vs cpu test. The mpace_b test passed on my home GPU (RTX 3080), but not when run in jenkens on nelson (P4000). So either the tolerance is too strict, or we're running too many timesteps for mpace_b. Currently the largest difference on mpace_b multicol check is 3.31551e-05 on jenkins, so if this fails also I'll up the tolerance for mpace_b instead of further reducing timesteps run. (details)
I am altering the mean advection code in preparation for ghost point (details)
Fixing bug. See https://github.com/larson-group/clubb/issues/1139 (details)
Fixing tridiag solver bug. See https://github.com/larson-group/clubb/issues/1139 (details)
Slight rework to acc data statements. This allows us to use return calls in advance_clubb_core again. See https://github.com/larson-group/clubb/issues/1139 (details)
Changing xm to out in mono flux solver. There is no need for it to be inout, and it confused me for a bit so I'm fixing it. (details)
Adding clubb specific compiler flag -DCLUBB_GPU, intended for use with openmp or openacc running on the GPU. Also adding a compiler flags, -DCUDA, and case statment for generating random numbers in silhs. (details)
Adding new compiler flags to nvfortran GPU compile script (details)
Adding openacc to openmp conversion script, and making some new compiler config files. (details)
Adds comments to openmp conversion script (details)
Now that the value of wp3 is being set to a boundary value of 0 (details)
This is (amazingly) BIT_CHANGING. The differences are due to some compiler optimizations, see https://github.com/larson-group/clubb/pull/1133\#issuecomment-1865156979. (details)
Removing git log print before logging to file. On some systems/configs the command would cause a busy wait until the person running hit q, and it is superfluous since we are already saving the git log to a file. (details)
Removing backslashes. These should be slashes, but gnu,intel,nvidia generate code that treats slashes as whitespace and backslashes as a character, while cray treats backslashes as whitespace as well. This is easily fixed by using quotes, and in the meantime we will change the backslashes to forward slashes. See https://github.com/larson-group/clubb/issues/1138\#issuecomment-1910844013 (details)
Adding ifdefs around multicol netcdf outputting. (details)
These should've been single quotes. I didn't tested a files with single quotes, then for some reason did all the changes as double quotes and only retested with gfortran. RESOLVED:9b495acd26a0b009ec84845aa289c36befff0c41 (details)
Some files have tabs in them, this broke my previous sed commands in various spots. (details)
Adding -no-declare-mapper to the openmp conversion script. This adds a sort of data mapper for derived types, but we just copy those in explicitly so they are unneccesary. They also cause problems for the cray compiler. (details)
Fixing a bug where the Lscale used in calculating the damping (details)
adding equals sign cuz I've had it up to here with this typo! (details)
fixing bug, name of wm_zt was left as "wm" (details)
README change to add BIT_CHANGING:595e2c13024c1e913815d56ae724823a82bddc03 when using l_diag_Lscale_from_tau=.false. and for the CAM repo we have BIT_CHANGING:d275ac17f3e53d65641c3210df33ce0fad4e5aef as the hash (details)
Add blank line in order to trigger Jenkins tests for CAM (details)
Fixing restarts by changing wm to wm_zt, the stats output name was changed in 4b25d3a (details)
Fixing bug with C6 parameters, see https://github.com/larson-group/clubb/pull/1147. This is technically BIT_CHANGING, but only when C6thl != C6thlb and l_diag_Lscale_from_tau=.false. (details)
Adding space to make commit because last commit RESOLVED:35d228ebbb66b1463f30659321cd4f7d76adffa2 (details)
Fixing a bug. These directives get added when running the ACC to OMP conversion script. I'm unsure how I accidentally commited this, and equally unsure of how only one file is affected. This was found while debugging the clubb thread test (details)
At the ghost point below the surface, which does not matter in (details)
The code that advances um and vm when l_predict_upwp_vpwp is turned off (details)
It was discovered that the location where the ghost point values (details)
I accidentally committed a couple things in the previous commit (details)
Pushing loop into calc_ref_z_linear_thvm to prevent erroneous inlining optimizations by nvfortran. This is BFB on nvhpc 24.3 with -O0 and BFB on nvhpc 22.5 with -O2. https://github.com/larson-group/clubb/issues/1148 (details)
Making change to add RESOLVED:a492228d3adfed56f8777d12176fcd7d165260f6, which was technically bit changing because it undid changes to the config flags AND was tested relative to the previous commit (which introduced the flag changes) because that one was labelled as bit changing. (details)
While it doesn't affect results, I fixed what appears to be an (details)
I am updating the loop in subroutine diagnose_xpwp so that it doesn't (details)
This commit is being made to keep the stats zt output from the (details)
I am committing a bug fix to the code that calculates mixed Brunt (details)
Adding -noacc to nvhpc openmp config script, sometimes nvhpc compiles acc code automatically, and this shuts it off. (details)
I am committing a stats change to the ghost point values of zt (details)
Committing some thresholding around positive-definite fields after (details)
Changing the linear interpolation in the zt2zm function at momentum (details)
I'm changing the way ddzt handles the derivative over momentum level 1. (details)
Adding space to include BIT_CHANGING:84588a46852a812266d19e36a8220f71ad56043a. This (https://github.com/larson-group/clubb/commit/84588a46852a812266d19e36a8220f71ad56043a) is described as not bit changing, but that seems to depend on the compiler version and some flags. The bin diff tests detected differences in only twp_ice when using e3sm flags on nelson, and both e3sm flags and default flags on carson. (details)
Moved the ghost-point setting of xm(1) = xm(2) to the last line (details)
Optional arguments are just best sometimes (#1150) (details)
Fixing bug. RESOLVED:556370c6406e6b943b88affbe7728a5036b1ba22, this was catchable by using debugging flags, but seems to otherwise cause no issues. Investigating I found that it only clips the below ground level, so that must not have been affecting other levels. This is technically BIT_CHANGING since it resolves an issue. (details)
Making num_draw_points in fill_holes a constant. We were already using this value as a constant everywhere, but passing a constant by argument list makes it difficult/impossible for a compiler to optimize using that constant, unless it does inlining. Now, rather than passing the constant num_hf_draw_points (or sometimes a hardcoded 2) we just use num_hf_draw_points directly from constants_clubb. This massively improves the performance of a loop in fill holes when using nvhpc+omp, which was the motivation for this, but should also improve the performance on CPUs. Everything is BFB. (details)
Making compatible with latest clubb changes. (details)
The variable rc_coef_zm needed to be passed in and saved from (details)
QuadTune: Moves plotting code to new fnc, createFigs. (details)
Making the f in f90 capital for consistency. (details)
Surrounding print statement with debug flag check. (details)
Making multicol diffness script rely on the largest difference detected, rather the the sum/total of differences. This is essentially to relax the cpu vs gpu diffness test because mpace_b is noisey and often causes the test to fail for innocent bit changing commits. Looking at the largest difference does have the advantage of the check being less sensitive to case differences, such as number of timesteps, vertical levels, number of columns, etc. (details)
Making the only change required to make clubb run with openacc in cam. (details)
QuadTune: Removes LWCF and PRECT from 2-point dpMin plot. (details)
I fixed a bug where the array declarations for X_mixt_comp_all_levs, (details)
QuadTune: Customizes inputs to threeDotFig. (details)
QuadTune: Customizes metrics shown in parameter adjustment bar chart. (details)
Adds blank line so that I can note BIT_CHANGING:5df5fcb3d6c51d6af2e8017d270336eefa75ad3e (details)
QuadTune: Adds more flags to toggle plots. (details)
This commit fixes 2 issues in regards to hydrometeor sedimentation: (details)
Updated the turbulent sedimentation code to account for ghost point (details)
QuadTune: Feeds in 20degree_CAM_TAUS_202404 runs. (details)
QuadTune: Feeds in 20degree_CAM_TAUS_2020404, take 2. (details)
Ri_zm calc (Part 2) - Move the brunt_vaisala smoothing into calc_brunt_vaisala_freq_sqd (#1156) (details)
Testing the new module system with our GPU diffness test. See https://github.com/larson-group/sys_admin/issues/829 (details)
The module system is setup via paths in /etc/profile.d/larson-group.sh, so we need to source it. https://github.com/larson-group/sys_admin/issues/829 (details)
Making our mkl compile config work directly in the compile script rather than relying on a correspondence with the config files. Also settig main config scripts to use new ifx compiler. (details)
Removing allocatable status of some variables. These need not be declared allocatable and ifx seems to have a problem with it. The allocatable status is an artifact from when we had these as arrays of initially unknown size. (details)
Fixing the run agent to be carson, since it has the only GPU capable of running with openmp gpu offloading. (details)
Making jenkins bit diff tests only run on carson. This is because these tests are defined by a file we store on carson that needs to be updated after each test. (details)
Replacing pgi references with nvhpc, and adding nvhpc_debug config script along with new jenkins tests. (details)
This code in adj_low_res_nu was using the ghost point when (details)
This technically BIT_CHANGING commit is being made to keep results in (details)
I am updating the SILHS code that calculates k_lh_start to work (details)
QuadTune: Adds arrow plot and plot of bias vs. a diagnostic field such as U10. (details)
I am making this commit because, as part of deghosting, I discovered 2 (details)
I am updating the snowslope output stat so it matches bit-for-bit (details)
Setting the value of K_hm to 0 at the non-interactive upper and lower (details)
I am committing changes to stats output for cloud_cover, rcm_in_layer, (details)
There were furhter issues found with the k_lh_start code. (details)
Ri_zm calc (Part 3) - Moving calculations for Ri_zm out of diagnose_Lscale_from_taus (#1157) (details)
In my previous commit, I changed the domain of the maxloc commands (details)
This commit brings the stats output from the all cases run with (details)
Updates README so that I can note that BIT_CHANGING:9ca167aa8b04cbebe4a1177a72f13731454e1e11 (details)
Committing a change that will initialize this set of variables (details)
Making a change to the l_C2_cloud_frac option with advance_xp2_xpyp. (details)
Fixing bug. qclvar copying is handled by the api, but we were deleting it with an unstructured data statement. I added this due as a fix before thinking qclvar was a local variable, which happened because I mixed up the CLUBB_CAM and CLUBBND_CAM flags. https://github.com/larson-group/cam/issues/175 (details)
When l_vert_avg_closure is enabled, the flags l_call_pdf_closure_twice, (details)
Fixing GPU bug. There is a vertical dependency with wpxp. This is what was breaking the ECT test, see larson-group/cam#175 (details)
Fixing bugs that are only caught when not outputting w_[up/down]_in_cloud stats or if l_host_applies_sfc_fluxes=.true. The l_host_applies_sfc_fluxes=.true. isn't testable (at least not in clubb_standalone), and I just caught that visually. The cloudy_updraft_frac and cloudy_downdraft_frac fields not being set were only noticable in cam, because we always run with iw_up_in_cloud>0 and iw_down_in_cloud>0 to output stats. (details)
Moving pdf_params copying to copyin. This is the data structure that contains pointers, and these pointers will be different on the host and device, so it is bad in theory to copy the structure back to the CPU as it might overwrite cpu memory pointers with gpu memory pointers. In practice though I've seen no problems caused by this, I'm just making this commit preemptively, and it has already been tested with the ECT test. (details)
Updating input fields so that the zt2zm function is used for (details)
Added zt2zm2zt-smoothing to remove noise in MPACE_B winds (#1161) (details)
Moving PosInf to clubb_model_settings.F90 (details)
Changing openacc to openmp migration repo to a fork with a change to switch the order of copyins and copies. This is to allow us to only copyin the pdf_params structure, but copy the internal arrays. When the copying of the internal arrays happens first, followed by the copyin of the structure, we overwrite the pointers to the internal arrays on the GPU version of the structure. Hence why we want the copyins to precede the copy statements. (details)
QuadTune: Plots subsets of 20x20-degree regions. (details)
Small bugs fix in bugsrad code. This was only caught when compiling with intel debug and using '-warn all', which compares interface dimensions/declaration between files. (details)
Variable name correction in acc data statement. (details)
Splitting zeros_vector into versions with nzt or nzm size to match sizes in subroutine. (details)
Making radf size correct in api and clubb_driver. (details)
For RegTune, adds color-coded matrix of correlations among parameter vectors. Also, this commit separates the three-dot panel plot into its own function.
Creates new function, setUpPreliminaries, in RegTune. setUpPreliminaries calculates some basic quantities that are used later. As part of this refactoring, a number of functions were moved from analyze_sensitivity_matrix to set_up_dashboard_inputs.
For RegTune, adds capability to prescribe (not tune) a parameter to a value that is different from the default. The code has not been checked, but it does run and produce plots.
Fixed some oversights for the bv_efold commits and increased string length for tuning field names for invrs_tau variables - CLUBB ticket #1069 (#1106)
This commit is NOT bit changing - Removed remaining mentions of brunt_vaisala_freq_sqd_plus - Added assignment for invrs_tau_wp3_zm in Lscale mode in advance_clubb_core - Increased length of string variables hoc_v, les_v, and t_variables in src/error.F90 to accomodate tuning for invrs_tau fields
BIT_CHANGING! brunt_vaisala_freq_sqd_mixed now replaces brunt_vaisala_freq_sqd for later calculations - CLUBB ticket #1102
Changes in src/CLUBB_core/mixing_length.F90: - brunt_vaisala_freq_sqd_mixed is now used to calculate brunt_vaisala_freq_sqd_smth and brunt_vaisala_freq_sqd_clipped instead of brunt_vaisala_freq_sqd - Removed 0.1 factor for bkgnd term in calculation of invrs_tau_xp2_zm - Commented out clipping of invrs_tau_xp2_zm to 0.003 and lower out of cloud
In the previous commits for the --background-rcm option of pyplotgen, I had previously thought that the code to extract values of rcm from a file wanted the case name as input, but in actuality it required the directory name instead of the case name. I am correcting that error in this commitment.
BIT_CHANGING for lscale setup. Updated configurable_model_flags.in and model_flags.F90 - CLUBB ticket #1102 (#1108)
- Added new flags to inut/tunable_parameters_Lscale/configurable_model_flags.in - Changed default setting for l_use_tke_in_wp3_pr_turb_term in model_flags.F90 from false to true
Likely BIT_CHANGING because of added output fields. Added code outputting C6_term and different Brunt Vaisala frequencies to disk - CLUBB ticket #1102 (#1109)
- Added C6_term and bv_freq fields to all_stats.F90 and standard_stats.F90 - Added new fields to VariableGroupTaus.py in pyplotgen - Added calls to stat_update_var to advance_clubb_core_module.F90 - Modified stats_variables.F90 and stats_zm_module.F90 accordingly
Changed sqrt_Ri_zm to Ri_zm in preparation of changing the exponent for calculation of invrs_tau_wpxp_zm in mixing_length.F90 - CLUBB ticket #1102 (#1110)
BIT_CHANGING! Changed sqrt_Ri_zm to Ri_zm in preparation of changing the exponent for calculation of invrs_tau_wpxp_zm in mixing_length.F90 - CLUBB ticket #1102 Changes in input/stats/all_stats.in, src/CLUBB_core/advance_clubb_core_module.F90, src/CLUBB_core/mixing_length.F90, src/CLUBB_core/stats_variables.F90, and src/CLUBB_core/stats_zm_module.F90 Ri_zm was added to input/stats/standard_stats.in
BIT_CHANGING! Removed Richardson_num and all corresponding code - CLUBB ticket #1102 (#1111)
This commit is BIT_CHANGING because: 1. the output field Richardson_num was removed. 2. Since the flag l_use_shear_turb_freq_sqd was removed, the variable shear_sqd is now always written to disk. That means previously, the outputted field shear_sqd was 0 everywhere whereas now it is not anymore. The calculation of shear_sqd within CLUBB did not change! - Removed mentions in input/stats/all_stats.in and standards_stats.in - Removed mentions in src/CLUBB_core/stats_variables.F90 and stats_zm_module.F90 - In src/CLUBB_core/advance_helper_module.F90 removed mentions to [i]Richardson_num[_clipped], as well as l_use_shear_turb_freq_sqd, l_Richardson_vert_avg, and turb_freq_sqd sinc those are only used for calculation of Richardson_num.
CLUBB ticket #1102 - pull request #1113 - Changed the outputs to be more evocative and differentiating between types of differences: Now we can distinguish between differences in the set of variables or differences in specific variables - Fixed the issue where a variable that appears in only one of the compared files would either not be detected or cause the script to crash, depending on the order of input. - Changed file output structure - Changed case handling depending on existing files: - Case is still treated even if it is commented in RUN_CASES - Case is still treated even if not all files exist and messages are printed accordingly
Tunable Richardson number exponent - CLUBB ticket #1102 (#1114)
BIT_CHANGING! Added the exponent to the Richardson number in the calculation of the invrs_tau_wpxp threshold term in src/CLUBB_core/mixing_length.F90 to the list of tunable parameters. This is bit changing due to the difference in Fortran between taking the sqrt and the .5th power.
- Added new folder input/tunable_parameters_tauMatchLscale/ for latest taus code setup reproducing the master Lscale output. - Changes in src/CLUBB_core_mixing_length.F90: - Renamed ddzt_umvm -> ddzt_umvm_sqd ddzt_umvm_clipped -> ddzt_umvm_sqd_clipped sqrt_ddzt_umvm -> norm_ddzt_umvm smooth_sqrt_ddzt_umvm -> smooth_norm_ddzt_umvm Ri_zm_clipped -> Ri_zm_smooth in some places - Made some variable replacements for consistency's sake - Fixed path of log files in run_scripts/run_bindiff_all.py
BIT_CHANGING! Fixed some issues with wpxp_Ri_exp, changed z_displace value - CLUBB ticket #1115 (#1120)
- Removed commented lines from tunable_parameters.in file in input/tunable_parameters_tauMatchLscale - Increased z_displace value from 10 to 25. This value was chosen so that the taus code with the parameter and flag settings in input/tunable_parameters_tauMatchLscale match the master Lscale output below clouds - Fixed some issues with the new parameter wpxp_Ri_exp: - Moved new exponentiation to a place so that it emulates the previous version with sqrt(Ri_zm) - Adjusted code for l_smooth_min_max=true to match the default version
Updated CLUBB so that adj_low_res_nu (which can be called on its own or called through calling setup_parameters) no longer uses momentum_heights and thermodynamic_heights, but rather makes use of gr%zm and gr%zt, which are always set and available by the time the calls are made.
Quick fix for AnimationPanel so it works with the background-rcm changes (#1123)
- Modified super call in AnimationPanel constructor - Removed first frame from consideration when determining x-axis scaling since the starting values are sometimes large compared to the other time steps
* Grouping stats indices into a derived type and making that accessible globally, for now. This does not run yet, but a checkpoint I wish to save.
* Checkpoint to save
* Checkpoint
* It actually works now and is BFB with every case.
* Starting to push the new derived type through the argument list.
* The new dervied type, now stats_metadata, has been fed through the argument list.
* Moved l_stats_samp into stats_metadata
* Moved all the other stats_variables into stats_metadata
* Small cleanup
* Fixes a stats bug when calling compute_sample_mean in silhs.
* Arrays in stats_metadata need only be allocated once, but we may want to call the stats init routines to set up more stats variables. So now we check for allocation before allocating. Also made the stat_indices type publicly available through clubb_api.
* This should be initialized to 0. The new changes in cam were able to tease this out, which is a good sign.
* A couple more to initialize to zero.
* Moving stats_metadata to before stats_ variables in argument lists, just for consistency.
- Changed invrs_tau_xp2/wp2 calculations to match the wpxp calculation: Those now have a brunt_freq_pos and a brunt_freq_out_cloud term - Changed tmp_calc magic number from .007 to .001 - Changed upper clipping bound for Ri_zm from 12 to 2 in invrs_tau_wpxp calculation - Reversed accidental changes to input_misc/tuner/error_four_cases.in
Added non-trapezoidal zm interpolation for cloud_frac (#1127)
- Added a calculation for `cloud_frac_zm` when `l_call_pdf_closure_twice=false` and `l_trapezoidal_rule_zt=false` This is BIT_CHANGING if `l_call_pdf_closure_twice=false` and `l_trapezoidal_rule_zt=false` since, in that case, `cloud_frac_zm` is now nonzero. - Some minor formatting fixes - Some minor fixes to pyplotgen's source code - Added `a3_coef_min` to Lscale tunable_parameters.in
Adding boundary conditions for the wp3_term_ta_ADG1_lhs subroutine. The value of wp3_zm at the model lower and upper boundaries is now assumed to be 0 for simplicity and conservation.
Added new Brunt-Väisälä frequency plots to pyplotgen's VariableGroupTaus CLUBB ticket #1132, BIT_CHANGING because new output fields were added - Added 3 new Brunt-Väisälä output fields: - bv_freq_sqd_smth: The smoothed bv_mixed which is used to calculate the invrs_taus - bv_freq_pos: The positive part of the sqrt of bv_freq_sqd_smth - bv_freq_out_cloud: The out-of-cloud part of bv_freq_pos - Added the plots of those fields to VariableGroupTaus
With wp3 now being set to a fixed-point boundary condition value of 0 at the current thermodynamic level 2 (first t-lev above the surface), it is not necessary to loop over level 2 within the code for each wp3 term.
This commit is BIT_CHANGING, but only for the wp3 budget terms (e.g. wp3_ta) in the zt output file at level k = 2. It doesn't change the actual answer. All other variables are bit-for-bit identical.
* Initial threadprivate removals and simple changes.
* model flags update, incomplete
* Some updates, almost working
* Added saturation_formula and l_host_applies_sfc_fluxes to clubb_config_flags
* Accompanying changes to flags lists
* Changes to corrrelation array setup
* Adding more flag checking
* Forgot to set l_host_applies_sfc_fluxes in initialize_clubb_config_flags_type and commit adding l_implemented to the argument loit
* Adding saturation parameters to api
* Most of the way through passing sclr_dim, hydromet_dim, edsclr_dim, and sclr_tol through arguemnt lists. Moved first_write breaking silhs stats aparently, and bit changing due to the way we were writing sclr_tol for cases that have sclr_dim=0 (arm different, gabls2 BFB).
* Removing accidentally commited files.
* Fixed silhs output, all cases BFB but sclr_tol is saved differently to stats files in cases where sclr_dim = 0, so this is bc also bc:fb20458d5212b007c79c17613201af637bbc3d7e since that introduced the difference.
* Changing stats logicals back to false, only set to true for testing. So technically BIT_CHANGING
* Starting array_vars changes.
* No more global scalar indices
* Starting to remove hydromet indices
* Finished the annoying part with the microphysics interfaces.
* No more global variables in array_index. All cases BFB relative to last commit.
* No more global pdf_dim, Ncnp2_on_Ncnm2 now set via argument list, and added temporary hydromet_dim_glob because I thought it would fix a bug but it didn't, it might in the future though, so I left it in for now, it will be removed soon.
* Added nan checking before overriding default value for Ncnp2_on_Ncnm2
* Finished hydromet_dim argument listing and removed global versions of it as well as sclr_dim, edsclr_dim, and sclr_tol.
* open_netcdf_for_writing does nothing if nvars=0 for a stats file, which is understandable, but now that we call first_write immediately after we need that also to check for nvar=0
* Adding better error messages to stats_init
* The nvidia compiler does not like zero size arrays.
* Adding defaults for scalar arrays values in clubb driver, and adding an error check after calling stats_init.
* Reverting accidental changes to clubb_thread_test
* Changing name of scarr/scalar_array to sclr_idx and hydromet_array to hm_metadata
* Adding new types to _api
* Fixing erroneous name changes.
* Fixing bug introduced in 65987c8a77496f7bb10bfd28717345b1f63de1b7
* Removing print
* QuadTune: updates setup in order to read in 30x30 regional files automatically.
For #910.
* Updating the code to set the bottom of the thermodynamic level grid for diffusion at thermodynamic level 2 -- the first level above the surface.
This is being done in preparation for ghostless gridding.
* Commit to enforce a fixed-point boundary condition of wp3=0 at thermodynamic level k = 2, the first above-ground thermodynamic level.
This is being done in preparation for ghostless gridding.
This commit is bc.
Results are much more similar to the previous results than using using zero-flux as the lower boundary condition for wp3.
* With wp3 now being set to a fixed-point boundary condition value of 0 at the current thermodynamic level 2 (first t-lev above the surface), it is not necessary to loop over level 2 within the code for each wp3 term.
This commit is BIT_CHANGING, but only for the wp3 budget terms (e.g. wp3_ta) in the zt output file at level k = 2. It doesn't change the actual answer. All other variables are bit-for-bit identical.
* Removing omp parallel test line
* Removing parameter declarion around l_quintic_poly_interp. Having this be a parameter causes bit changes when using -O2
Making nightly cpu vs gpu test use a new config script for the cpu compile. This is the minimize the differences to be only whether or not the openacc GPU code is enabled.
Limiting mpace_b to 250 timestpes for gpu vs cpu test. The mpace_b test passed on my home GPU (RTX 3080), but not when run in jenkens on nelson (P4000). So either the tolerance is too strict, or we're running too many timesteps for mpace_b. Currently the largest difference on mpace_b multicol check is 3.31551e-05 on jenkins, so if this fails also I'll up the tolerance for mpace_b instead of further reducing timesteps run.
I am altering the mean advection code in preparation for ghost point removal, since the mean advection code incorporates the ghost point in its current calculations.
The lower boundary is now treated in the same manner as the upper boundary, where a zero derivative over the boundary is assumed. Any interaction of the current ghost level with the model code is now removed from the mean advection calculation.
The results are bit-for-bit for most cases, but not all of them. They are not necessarily expected to be bit-for-bit. There are no discernable differences on plots of priority cases. However, this commit is technically BIT_CHANGING.
Slight rework to acc data statements. This allows us to use return calls in advance_clubb_core again. See https://github.com/larson-group/clubb/issues/1139
Adding clubb specific compiler flag -DCLUBB_GPU, intended for use with openmp or openacc running on the GPU. Also adding a compiler flags, -DCUDA, and case statment for generating random numbers in silhs.
Now that the value of wp3 is being set to a boundary value of 0 at the first thermodynamic grid level above the surface, it doesn't make sense to loop over budget terms anymore at that particular level, since they don't factor in the solution and give a false impression.
With this commit, wp3 budget terms now start their loop at level 3.
This commit is BIT_CHANGING, but the only thing that changes are budget stats for a couple of wp3 budget terms. The solution does not actually change.
This is (amazingly) BIT_CHANGING. The differences are due to some compiler optimizations, see https://github.com/larson-group/clubb/pull/1133\#issuecomment-1865156979.
Removing git log print before logging to file. On some systems/configs the command would cause a busy wait until the person running hit q, and it is superfluous since we are already saving the git log to a file.
Removing backslashes. These should be slashes, but gnu,intel,nvidia generate code that treats slashes as whitespace and backslashes as a character, while cray treats backslashes as whitespace as well. This is easily fixed by using quotes, and in the meantime we will change the backslashes to forward slashes. See https://github.com/larson-group/clubb/issues/1138\#issuecomment-1910844013
These should've been single quotes. I didn't tested a files with single quotes, then for some reason did all the changes as double quotes and only retested with gfortran. RESOLVED:9b495acd26a0b009ec84845aa289c36befff0c41
Adding -no-declare-mapper to the openmp conversion script. This adds a sort of data mapper for derived types, but we just copy those in explicitly so they are unneccesary. They also cause problems for the cray compiler.
Fixing a bug where the Lscale used in calculating the damping coefficient in advance_xm_wpxp_module.F90 should be Lscale_zm, since the term is calculated on momentum grid levels.
Along the way, I found out that I could streamline the code by passing in the value of Lscale_zm that was already calculated (interpolated from Lscale) in advance_clubb_core. This value could be passed into both advance_xm_wpxp and calc_stability_correction, and then fed down.
This results of this code change are bit-for-bit identical with the previous revision, most likely because this code only matters when certain flags are flipped that are not used by default.
README change to add BIT_CHANGING:595e2c13024c1e913815d56ae724823a82bddc03 when using l_diag_Lscale_from_tau=.false. and for the CAM repo we have BIT_CHANGING:d275ac17f3e53d65641c3210df33ce0fad4e5aef as the hash
* Initial changes to make clubb_params have an ngrdcol dimension. All BFB on CPU and GPU.
* pdf_closure done
* pdf_closure missed changes
* calc_Lscale_directly changes and removed accidentally added files
* advance_xp2_xpyp done
* Missed file
* Added space here because the addition of this line in the last commit is to prevent Ri_zm from being uninitialized when using l_diag_Lscale_from_tau=.false.
* advance_wp2_wp3 done
* advance_xm_wpxp done
* Fixed bugs found by checking l_modify_limiters_for_cnvg_test=.true.
* Fixed bug found by checking l_diffuse_rtm_and_thlm and l_stability_correct_Kh_N2_zm
* Removing slightly redundant logic
* Swapping back order of l_gamma_skw if statements. I'm not sure why I swapped them in the first place.
Fixing bug with C6 parameters, see https://github.com/larson-group/clubb/pull/1147. This is technically BIT_CHANGING, but only when C6thl != C6thlb and l_diag_Lscale_from_tau=.false.
Fixing a bug. These directives get added when running the ACC to OMP conversion script. I'm unsure how I accidentally commited this, and equally unsure of how only one file is affected. This was found while debugging the clubb thread test
At the ghost point below the surface, which does not matter in the calculations, a value of 0 is now being entered for thermodynamic-level output stats coef_wprtp2_implicit, term_wprtp2_explicit, etc.
Why would we do this? The answer is "Why Not??!!!!"
This is being done to keep the trunk results bit-for-bit with the clubb_ghost_exorcism branch, which is no longer loops over the ghost level below the surface in the region of code where these stats are recorded.
In terms of the master, this commit is technically BIT_CHANGING. However, only for these 6 output terms at the ghost point.
The code that advances um and vm when l_predict_upwp_vpwp is turned off (as found in advance_windm_edsclrm) was accessing the ghost point in one spot. I rewrote it in the exact way the code in the clubb_ghost_exorcism branch is written so that it makes the same calculation without referencing the ghost point.
I also rewrote a couple stats by outputting a value of 0 at the ghost point to maintain stat consistency between the master and the ghost exorcism branch.
This commit is BIT_CHANGING, but only when the l_predict_upwp_vpwp flag is set to false (which is not the case by default).
It was discovered that the location where the ghost point values of um and vm were set equal to their respective values at the first thermodynamic level above the surface was not ideal. Their assignment occurred before the love nudge (l_uv_nudge). Then, the love nudge came along and altered their values so that um(1) no longer equaled um(2) -- and analogous for vm(1) and vm(2) -- for a half dozen cases. In addition to making the code inconsistent, it also caused bit-for-bitness differences between the master and clubb_ghost_exorcism branches. For those reasons, this BIT_CHANGING commit is being made.
Pushing loop into calc_ref_z_linear_thvm to prevent erroneous inlining optimizations by nvfortran. This is BFB on nvhpc 24.3 with -O0 and BFB on nvhpc 22.5 with -O2. https://github.com/larson-group/clubb/issues/1148
Making change to add RESOLVED:a492228d3adfed56f8777d12176fcd7d165260f6, which was technically bit changing because it undid changes to the config flags AND was tested relative to the previous commit (which introduced the flag changes) because that one was labelled as bit changing.
While it doesn't affect results, I fixed what appears to be an obvious bug in advance_xm_wpxp. If everything is at a singular zm level, the referenced height shouldn't be gr%zt, but rather gr%zm.
I am updating the loop in subroutine diagnose_xpwp so that it doesn't loop over the model upper or lower boundaries. Calculations at those levels are irrelevant to the results, and their inclusion causes bitness differences between the master and clubb_ghost_exorcism branches. Since this code change causes differences in the zm stats file at the upper and lower boundaries for a few fields, this commit is technically BIT_CHANGING, although it should be noted that it does not change the simulation results.
This commit is being made to keep the stats zt output from the master branch inline with the output from the clubb_ghost_exorcism branch. In short, the only change is that the value of a couple of inputs relative to wpxp turbulent advection from thermodynamic level 1 are set to 0 for stats output in order to keep the master and ghost exorcism branches bit-for-bit with each other. The output at those levels are not used in any calculations and are unnecessary. However, this change is technically BIT_CHANGING.
I am committing a bug fix to the code that calculates mixed Brunt Vaisala frequency. The variable ice_supersat_frac was used directly in calculations that are supposed to take place on a momentum level. The fix is to interpolated ice_supersat_frac to momentum levels before use. This commit is BIT_CHANGING.
I am committing a stats change to the ghost point values of zt stats output variables found in the monotonic flux limiter. These values are all being set simply to 0 at the ghost point for purposes of providing an easy comparison to stats output files from the clubb_ghost_exorcism branch. The code change is not at all answer changing. However, it is technically BIT_CHANGING.
Committing some thresholding around positive-definite fields after a zt2zm statement. This commit does not change the results in our CLUBB standalone cases.
Changing the linear interpolation in the zt2zm function at momentum level 1 from an interpolation between the ghost point and the first level above the surface to simply a "drop down" of the value found at the first level above the surface.
This is being done ahead of the removal of the ghost point from the model.
I'm changing the way ddzt handles the derivative over momentum level 1. Previously, it was based on the differential between the ghost point and the first level above the surface. Now, the value of the derivative at momentum level 2 is simply being dropped down to momentum level 1.
This is being done in advance of ghost point removal.
Adding space to include BIT_CHANGING:84588a46852a812266d19e36a8220f71ad56043a. This (https://github.com/larson-group/clubb/commit/84588a46852a812266d19e36a8220f71ad56043a) is described as not bit changing, but that seems to depend on the compiler version and some flags. The bin diff tests detected differences in only twp_ice when using e3sm flags on nelson, and both e3sm flags and default flags on carson.
Optional arguments are just best sometimes (#1150)
* Adding optional argument to zm2zt/zt2zm to act as threshold. This cuts down on lots of bulk and reduces the chances of breaking the GPU code. All BFB.
* Removing TODO
* Replacing hardcoded 0.0_core_rknd with zero_threshold
Fixing bug. RESOLVED:556370c6406e6b943b88affbe7728a5036b1ba22, this was catchable by using debugging flags, but seems to otherwise cause no issues. Investigating I found that it only clips the below ground level, so that must not have been affecting other levels. This is technically BIT_CHANGING since it resolves an issue.
Making num_draw_points in fill_holes a constant. We were already using this value as a constant everywhere, but passing a constant by argument list makes it difficult/impossible for a compiler to optimize using that constant, unless it does inlining. Now, rather than passing the constant num_hf_draw_points (or sometimes a hardcoded 2) we just use num_hf_draw_points directly from constants_clubb. This massively improves the performance of a loop in fill holes when using nvhpc+omp, which was the motivation for this, but should also improve the performance on CPUs. Everything is BFB.
I am committing code that effectively ignores the values of certain zt stats at the ghost level by setting them to 0. This is done to allow for bit-for-bitness comparisons between the master branch and the clubb_ghost_exorcism branch.
Technically, since zt stat file output at the irrelevant ghost level is changed for some variables, this commit is BIT_CHANGING.
Effectively, this commit doesn't change squat in terms of model results.
I am moving the advance_xm_wpxp setting of xm(1) = xm(2) from the end of xm_clipping_and_stats to the very end of advance_xm_wpxp, right before the return to advance_clubb_core. The reason I am doing this is the nudging was done after setting xm(1) = xm(2) and would alter the results. This is no longer the case, as setting xm(1) = xm(2) is now being done after nudging.
This is being done in advance of removal of the ghost point from CLUBB. This helps ensure a bit-for-bit match between the ghost exorcism branch and the master branch.
This commit technically alter fields such as um, vm, um_bt, vm_bt, wpup2, wpvp2, and shear at level 1 only. Thus, this commit is technically BIT_CHANGING.
Effectively, once again, this commit doesn't change squat.
* Added integration with sympy and adjusted variables.
* Integration now works.
* Add 4th and second order moments.
* check equation 56 with 20, 11 and 4
* check equation 56 with 20, 11 and 4
* remove unnecessary symbols
* Move documents and rename
* Rename document
* Add files and start to implement the analytic integral
* Add functions
* Add symbols and functions. Tried analytic integration with simpler functions but the triple integral still does not work. For integrating numerically I like to use lambdify and then numpy but therefore the symbols have to be renamed because lambdify does not like backslashes.
* Numerical evaluation of the first, second, third, and fourth order moments of the triple Gaussian with limits -10 to 10.
* Added mixture fractions to the Gaussian.
* Convert results to dataframe for better readability.
* Check results for third Gaussian, also adjusted the third Gaussian.
* Tidy up code.
* Changed name of file. Added function for evaluating the fraction w_prime_4_bar divided by w_prime_2_bar_squared which is parameterized.
* Added columns to the dataframe to check if the numerical evaluation of the 4th order moment is equal to the parameterized evaluation of the 4th order moment.
* Adjusted symbols and added the constant for lambda_w.
* Added documentation.
* Added check for w_prime_4_bar calculated just with the parameters.
* Improved functions and improved calculating the moments from a dataframe.
* Tidied up code
* Tidied up code
* Reordered document
* Added some files and restructured the document.
* Added a file to compute another function
* Added a file for computing the 4th order moment based on the parameters and checking this with the numeric integrals.
* fixed notebook
* Checked some equations analytically.
* Added document for checking eq_26
* Added document for checking eq_24
* Added document for checking eq_33
* Fixed some parameters
* finished document for computing the moments numerically.
* Verified(?) eq 75
* Changed values for ?verifying? eq 75
* Adjusted alphas and deltas but did not run it to the end yet.
* Ran the code with the adjusted alphas and deltas.
* Calculated the integral based on the marginal of G_3
* Ran the notebook again.
* Added Checking for eq 80. Not done yet.
* Added new document.
* Calculated w_bar
* Finished 1 dim integral.
* Added calculation for sigma_lambda_w and lambda_w.
* Added calculation for sigma_lambda_w and lambda_w.
* Added third Gaussian.
* Calculated 4th order moment.
* Added files and split up evaluation of the moments for w
* Verified all moments for w.
* Fixed a typo.
* Set up document for another integral.
* Working on the integral for w_prime_theta_l_prime_bar.
* Working on the integral for w_prime_theta_l_prime_bar.
* Did the check for w_prime_theta_l_prime_bar.
* Did the check for w_prime_theta_l_prime_bar.
* Did the check for w_prime_theta_l_prime_bar with rational numbers.
* Add numerical difference.
* Add numerical difference.
* Finished the check for w_prime_theta_l_prime
* Finished the check for w_prime_squared_theta_l_prime
* Finished the check for theta_l_prime_3_bar
* Finished the check for w_prime_theta_l_prime_squared_bar
* Did the checks again with arbitrary distinct values.
* Did the checks again with arbitrary distinct values.
* Add check for theta_l_prime_2_bar.
* Calculated $\beta$.
* Corrected a minor mistake.
* Backed out beta from the theta_prime_l_bar equation.
* Checked the beta equation numerically.
* Printed all NaN values.
* Reformat Check.
* Reformat Check.
* Reformat Check.
* Reformat Check.
* Reformat Check.
* Reformat Check.
* Reformat Check.
* Reformat Check.
* Reformat Check.
* Changed Heading.
* Changed the limits of integration.
* Delete doc/.ipynb_checkpoints directory
* Rearrange symbols
* Added beta to the dataframe.
* Added diagnostic values to the dataframe.
* Fixed typo.
* rearranged dataframe
* rearranged dataframe
* rearranged dataframe
* rearranged dataframe
* rearranged dataframe
* Computed the triple integral again.
* Rearranged symbols.
* Working on the trivariate Normal.
* Fixed numerical integration for triple gaussian
* plot relationship between delta and lambda_w
* plotted proposed relationship
* Rearranged files and computed everything again.
* Added README.md
* Added file to README.md
* Add function for plotting
* Finished numerical check for w_prime_q_t_prime_theta_l_prime_bar_beta.ipynb
* Finished numerical check for w_prime_q_t_prime_theta_l_prime_bar_beta.ipynb
* Finished numerical check for theta_l_prime_q_t_prime_bar.ipynb
* Worked on plotting
* Worked on README.md
* replace q_t with r_t
* replace q_t with r_t
* replace q_t with r_t
* Add explanation
* Reformat code
* Corrected a file
* Corrected a file
* Worked on checking w_prime_r_t_prime_theta_l_prime_bar_beta.ipynb
* Simplified creating of dataframe.
* - Added calculation for w_prime_r_t_prime_theta_l_prime_bar_E.ipynb and improved diagnostics output.
* Changed all sigma_lamda to sigma_3 and plotted \lambda vs \delta
* Plotted \lambda vs \delta with the "initial condition"
* Plotted \lambda vs \delta with the "initial condition"
* Update README.md
* Reran jupyter notebooks
* Refactored code
* Reran notebook
* Rearranged README.md
* Rearranged README.md
* Remove files
---------
Co-authored-by: Vincent Larson <vlarson@users.noreply.github.com>
Thermodynamic-level (zt) values should be used with zt-variable calculations. This commit changes results (but not visibly) for the l_avg_Lscale code, but since this code is not the default in CLUBB, the code remains bit-for-bit since the last commit.
Making multicol diffness script rely on the largest difference detected, rather the the sum/total of differences. This is essentially to relax the cpu vs gpu diffness test because mpace_b is noisey and often causes the test to fail for innocent bit changing commits. Looking at the largest difference does have the advantage of the check being less sensitive to case differences, such as number of timesteps, vertical levels, number of columns, etc.
I fixed a bug where the array declarations for X_mixt_comp_all_levs, lh_rt_clipped, lh_thl_clipped, lh_rc_clipped, lh_rv_clipped, and lh_Nc_clipped had been declared backwards.
This commit fixes 2 issues in regards to hydrometeor sedimentation:
1) The code was taking into consideration the value of the hydrometeor at the ghost point within the center-differenced option. 2) If a hydrometeor was present (value > 0) at the highest thermodynamic grid level, the code was potentially not conservative.
Both these issues are fixed with this commit. The results are BIT_CHANGING.
`brunt_vaisala_frq_sqd_smth` is now calculated in subroutine `calc_brunt_vaisala_freq_sqd` and it is now written to disk in `advance_clubb_core` with all the other `brunt_vaisala` variables.
Unfortunately, I had to make a couple more changes since moving this calculation into `calc_brunt_vaisala_freq_sqd` meant that any subroutine involved in calling `calc_stability_correction` would need to get `l_modify_limiters_for_cnvg_test` fed in, because `calc_brunt_vaisala_freq_sqd` is also called in `calc_stability_correction`.
This commit is BIT_CHANGING since `brunt_vaisala_frq_sqd_smth` used to be all zeros before this change in Lscale mode and now it is actually calculated. BFB in taus code.
* Initial changes to get code working with the new spack+module system. See https://github.com/larson-group/sys_admin/issues/829
* Changes for restart_gfortran_test
* Possible fix for tuning test
* Part 2 to tuning test fix. It's unclear why the recent change caused top level directory for these stages to be in clubb, rather than the parent directory. Perhaps it has to do with the triple quote
* Adding the mkl flag back to intel config scripts. It's still usable when adding -m or --mkl_lapack to our compile script call, and now we have intel-oneapi-mkl installed because wrf needs it.
Making our mkl compile config work directly in the compile script rather than relying on a correspondence with the config files. Also settig main config scripts to use new ifx compiler.
Removing allocatable status of some variables. These need not be declared allocatable and ifx seems to have a problem with it. The allocatable status is an artifact from when we had these as arrays of initially unknown size.
Making jenkins bit diff tests only run on carson. This is because these tests are defined by a file we store on carson that needs to be updated after each test.
This code in adj_low_res_nu was using the ghost point when grid_type = 2. This has now been changed to not include the ghost level. This code is BIT_CHANGING.
This technically BIT_CHANGING commit is being made to keep results in _zm.nc output files the same between the master branch and the clubb_ghost_exorcism branch.
I am making this commit because, as part of deghosting, I discovered 2 bugs in the way that COAMPS microphysics was set up.
1) The code that was handling the grid flipping for hydrometeor sedimentation velocities output from coamps (flipping from the coamps grid to the clubb grid) was mis-aligned;
2) The code within coamps then interpolated those velocities to the zm grid However, CLUBB expected that output on the zt grid.
These issues were corrected in this commit that is BIT_CHANGING for mpace_b -- the only case that uses COAMPS microphysics by default.
Setting the value of K_hm to 0 at the non-interactive upper and lower boundaries. The values of that variable at those levels don't get used in the code.
This change is meant to keep stats the same between the master branch and the clubb_ghost_exorcism branch. This changes does not change the simulations, but yet it is BIT_CHANGING because it changes stat files output at those levels.
I am committing changes to stats output for cloud_cover, rcm_in_layer, and z_cloud base owing to the gymnastics it takes to avoid the ghost point in calculations. These changes are BIT_CHANGING, but they don't change the answer.
There were furhter issues found with the k_lh_start code.
The code would find that sometimes, the maximum location of rcm in cloud would occur at the ghost level, k = 1, and set that level as k_lh_start for SILHS. This is undesirable for two reasons: 1) k_lh_start should be set around a legimate, "within domain" grid level; and 2) Setting k_lh_start to 1 is unachievable for the ghostless branch of the model, making a match between the master and clubb_ghost_exorcism branhes unattainable.
The issue is corrected here by allowing the maxloc function to only search over "in-domain levels" for maximum cloud. The results are BIT_CHANGING.
Ri_zm calc (Part 3) - Moving calculations for Ri_zm out of diagnose_Lscale_from_taus (#1157)
CLUBB tocket #1145 BIT_CHANGING for lscale since Ri_zm was not calculated before.
1. mixing_length.F90: - Removed unused input variables from diagnose_Lscale_from_taus: um, vm, exner, p_in_Pa, rtm, thlm, thvm, rcm, saturation_formula, l_brunt_vaisala_freq_moist, l_use_thvm_in_bv_freq, l_modify_limiters_for_cnvg_test; added ddzt_umvm_sqd as input; changed Ri_zm from out to in - Removed unused brunt_vaisala_freq_sqd variables from diagnose_Lscale_from_tau - Removed calculations for Ri_zm and ddzt_umvm_sqd - Fixed some line length issues
2. advance_helper_module.F90 - Removed unused input variables and imports - Fixed some line length issues
3. advance_clubb_core_module.F90 - Added calculations for ddzt_umvm_sqd and Ri_zm - Adjusted subroutine calls - Fixed some line length issues
In my previous commit, I changed the domain of the maxloc commands in the computation of k_lh_start to check over the arrays from levels 2:nz. However, when that happens, the output will be offset by 1. Consider a situation where the rcm max is at level 2. By being passed 2 through nz only, maxloc will return a value of 1. I needed to add +1 to the output to rectify this issue. The results are BIT_CHANGING.
This commit brings the stats output from the all cases run with the master branch (using the default configuration) in bit-for-bit agreement with the stats output from all cases run with the clubb_ghost_exorcism branch. Of course, this agreement ignores the ghost level output in the zt files run with the master branch. This commit is technically BIT_CHANGING because it alters a few stats for a couple cases, but does not change results.
Committing a change that will initialize this set of variables under all circumstances. This change does not affect output except when the New Hybrid PDF is used. In the case of the New Hybrid PDF, the variables F_rt, F_thl, F_rt_min, F_rt_max, F_thl_min, and F_thl_max were never initialized and never set (they are not part of the New Hybrid PDF -- only in the original New PDF), resulting NaN values being output to stat files.
Making a change to the l_C2_cloud_frac option with advance_xp2_xpyp. Cloud fraction needed to be interpolated to momentum levels for proper use in the code.
Since this code change does not change CLUBB's default configuration, results are bit-for-bit for the default configuration.
Fixing bug. qclvar copying is handled by the api, but we were deleting it with an unstructured data statement. I added this due as a fix before thinking qclvar was a local variable, which happened because I mixed up the CLUBB_CAM and CLUBBND_CAM flags. https://github.com/larson-group/cam/issues/175
When l_vert_avg_closure is enabled, the flags l_call_pdf_closure_twice, l_trapezoidal_rule_zt, and l_trapezoidal_rule_zm should all be enabled.
That is not changed by this commit.
However, when l_vert_avg_closure is disabled, then the setting of those other 3 flags should be left to whatever setting they have in the configurable flags file. They should **not** be automatically overwritten to false.
Since all 4 of those flags are all turned off by default anyway in CLUBB, this commit will have no effect on the default results.
Fixing bugs that are only caught when not outputting w_[up/down]_in_cloud stats or if l_host_applies_sfc_fluxes=.true. The l_host_applies_sfc_fluxes=.true. isn't testable (at least not in clubb_standalone), and I just caught that visually. The cloudy_updraft_frac and cloudy_downdraft_frac fields not being set were only noticable in cam, because we always run with iw_up_in_cloud>0 and iw_down_in_cloud>0 to output stats.
Moving pdf_params copying to copyin. This is the data structure that contains pointers, and these pointers will be different on the host and device, so it is bad in theory to copy the structure back to the CPU as it might overwrite cpu memory pointers with gpu memory pointers. In practice though I've seen no problems caused by this, I'm just making this commit preemptively, and it has already been tested with the ECT test.
Updating input fields so that the zt2zm function is used for interpolation from thermodynamic to momentum grids in the case of reading in UP2 and Vp2 from SAM LES output.
Added zt2zm2zt-smoothing to remove noise in MPACE_B winds (#1161)
BIT_CHANGING
In order to remove noise in the wind fields in MPACE_B, we added some smoothing.
* Added `zt2zm2zt`-smoothing to `diagnose_upxp` calls in `advance_xm_wpxp` * Added `zm2zt2zm`-smoothing to `wp2` and `em` vars fed into `wp3_term_pr_turb_rhs` in `advance_wp2_wp3` * Changed C_wp2_splat to 0.00 in default tunable_parameters.in
Changing openacc to openmp migration repo to a fork with a change to switch the order of copyins and copies. This is to allow us to only copyin the pdf_params structure, but copy the internal arrays. When the copying of the internal arrays happens first, followed by the copyin of the structure, we overwrite the pointers to the internal arrays on the GPU version of the structure. Hence why we want the copyins to precede the copy statements.
* I am adding grid_class_new.F90 to the code as a copy of grid_class.F90.
The first step toward removing the ghost level from the model is to modify the grid file. Having a second grid file in play will allow functions and subroutines that are undergoing modification earlier in this process to use the new file, while functions and subroutines that have not yet been modified will continue to use the old grid file until they can be modified.
At the end of this process, the old grid file will be able to be removed and grid_class_new.F90 will simply be able to be renamed grid_class.F90 at that point.
In this commit, I have altered the schematic and the comments at the very start of the module to be "ghostless".
* Updated grid_class for the changes to the grid interpolation weighting functions for the new "ghostless" ascending grid.
* Committing some updates to the new grid class file for ghostless ascending.
* Updating to match recent changes made to grid_class.F90.
* I finished the removal of the ghost level from the entirety of the new grid_class file. This standalone file compiles successfully.
* Removing the sources of compiler warnings in grid_class_new.F90 (these were carried over from grid_class.F90).
* Committing progress in advance_wp2_wp3_module.F90 with regards to ghostless grid.
* I am committing the updated version of grid_class_new.F90 that allows all cases to run, regardless of grid_type.
* Fixed a bug in grid_class_new.F90
When grid_type = 2, the calculations of the indices begin_height and end_height are based on the thermodynamic level grids. Those grid indices should be used in the call to setup_grid_heights, where the array of thermodynamic_heights, from index begin_height to index end_height, should become gr%zt.
When grid_type - 3, the calculations of the indices begin_height and end_height are based on the momentum grid levels.
Either way, momentum_heights and thermodynamic_heights should both have the array from begin_height to end_height passed in. When grid_type = 2, only the thermodynamic height array is relevant in the setup. When grid_type = 3, only the momentum height array is relevant in the setup.
* For thermodynamic_height, 1:nzmax-1 is the entire array, but I entered this for a clarification, especially considering the following check block.
* Updated grid_class_new to better handle the begin_height and end_height indices.
* Some modifications to advance_wp2_wp3
* Committed some temporary code.
* committed some temporary changes to clubb_api_module.
* Making a bunch of commits to clubb_driver that are mainly temporary for interface and printing purposes.
* Deghosted another subroutine.
* Updated wp2_term_ta_lhs to use the new gridding.
* De-ghosting wp2_terms_ac_pr2_lhs
* De-ghosted wp2_term_pr3_rhs
* Deghosting wp3_term_tp_lhs.
* Deghosted wp3_terms_ac_pr2_lhs
* Updated the wp3_term_ta_ADG1_lhs subroutine to use boundary conditions where wp3 (at the top level and bottom momentum levels of the model) is assumed to have a value of 0.
* For single loop vectors, removing the "collapse(2)" from the acc statements.
This commit is not bit changing, but the previous commit to this branch was BIT_CHANGING:902d6caed8a4533f59f4165106276959b4f90895
* I updated wp3_term_ta_explicit_rhs for the ghostless grid.
When l_explicit_turbulent_adv_wp3 is turned on, the results from this branch exactly match those found on the master branch.
* Updating diffusion_zm_lhs for "Ghostless" gridding.
* Fixed a typo in the comments that was introduced in the previous commit.
* Updated for "ghostless" diffusion.
* With wp3 now being set to a fixed-point boundary condition value of 0 at the current thermodynamic level 1 (first t-lev above the surface), it is not necessary to loop over level 1 within the code for each wp3 term.
Also contains code to enforce a fixed-point boundary condition of wp3=0 at the first thermodynamic level above the surface.
* Restoring diffusion to the way it should be for the exorcised ghost grid prior to the most recent master merge. Lines for the ghost point were accidentally added during the merge commit.
* Updated code to correct wp3_bp1 and wp3_pr2 budget terms so that they still match bit-for-bit what is found in the master branch.
* Updating term_ma_zm_lhs for ghostless gridding. Results are bit-for-bit identical.
* After debugging, I am now committing the ghostless version of term_ma_zt_lhs.
* Updating the clubb_ghost_exorcism branch for ghostless wp23 rhs, lhs, and solve.
This revision runs; however, there are still some issues tracking down the source of problems in maintaining bit-for-bit results.
* Updated to maintain bit-for-bitness with the master code.
* Finished exorcising the ghost from advance_wp2_wp3_module.F90.
* Small openacc changes to fix GPU runs
* Adjusting new hybrid PDF code to continue to match the master branch bit-for-bit while construction continues.
* Committing the first portion of a nomenclature change where the number of momentum vertical grid levels is denoted as nzm rather than nz.
* Changing the notation of the number of grid levels on the momentum grid, previously nz, to nzm in some files.
* Changed some comments and a little bit of code in the new grid_class file to provide a better description.
* Updated sigma_sqd_w_module for ghostless gridding.
* I added the new "ghostless" discretization to turbulent_adv_pdf.F90, and also appropriately altered the points in the code where the turbulent advection subroutines are called from in advance_xm_wpxp_module.F90 and advance_xp2_xpyp_module.F90.
The code produced bit-for-bit results in regards to the standard configuration, the new hybrid PDF configuration, and also for the configuration with the godunov flags turned on.
* Altered many of the lower-level subroutines in advance_xp2_xpyp_module.F90 for ghostless gridding.
* Upgraded subroutine calc_xp2_xpyp_ta_terms for ghostless discretization.
This should alter the results when the new_hybrid PDF is used in conjunction with upwind discretization, but it doesn't alter the results for anything else.
* Completed making advance_xp2_xpyp ghostless.
* Completed the de-ghosting of advance_windm_edsclrm.
Results are BIT_CHANGING because the ghost level was interacting with the results.
* The call to calc_xpwp from advance_microphys was not supposed to be updated yet. It wound up being sort of "partially updated" for ghostless gridding, which was a bug that led to some diagnostic output fields not being bit-for-bit. In this commit, I returned it to its prior form so that zm output files once again retain bit-for-bit status between this branch and the master.
* The ghost point interface statements after the return from advance_windm_edsclrm needed to be encased in the same conditional statements that the calculations occurred in with the aforementioned subroutine. This change fixes a bug where a handful of cases had results that were not bit-for-bit from revisions before this code was added.
* Fixed bug where the wrong stats were being recorded to the stats for coef_wpthlp2_implicit, etc.
* I am committing a bug fix to the implicit surface flux calculation in the eddy-diffusivity wind code (which is used when l_predict_upwp_vpwp is turned off).
I am also committing some temporary ghost point interface stats code within advance_windm_edsclrm.
* I updated the diagrams in advance_windm_edsclrm to reflect the new ghostless grid.
* I improved the description section of advance_windm_edsclrm.
* Made numerous low-level subroutines ghostless within advance_xm_wpxp_module.F90. Maintained bit-for-bit results with the master branch.
* I am updating the xm wpxp code that calls the wpxp turbulent advection term based on your PDF and option for ghostless gridding.
* Updating some of the lower-level functions of the monotonic flux limiter for ghostless gridding.
* I have updated the monotonic flux limiter for ghostless gridding!
* A couple of redundant declarations were brought in on the last merge.
* Committing further updates to ghostless gridding, including:
1) Further modifications to advance_xm_wpxp, which includes branching out in Brunt-Vaisala frequency calculations in advance_helper;
2) Update in calculating the initial pressure;
and 3) updating grid class new to use the same "value drop down" in the zt2zm function and "derivative drop down" in the ddzt function that are now used in grid_class in the master.
Results are bit-for-bit identical with the master.
* Updated xm_wpxp_lhs for ghostless gridding.
* Made xm_wpxp_rhs ghostless.
* Updated xm_wpxp_solve for ghostless gridding!
* Updating pos_definite_module.F90 for ghostless gridding.
* Updated vertical hole filling and xm clipping and stats for ghost point removal.
Results are still bit-for-bit with the master branch.
* Updated advance_xm_wpxp to remove the ghost point.
* Updating some zt stats to use a value of 0 for the "ghost" level.
* Updated subroutine compute_mixing_length for ghostless gridding.
* Removing the ghost point from calculate_Lscale_directly
* Added a "ghostbuster" option (-g) in the run_bindiff_all.py python script that omits the "ghost" level from the comparison for _zt.nc output files when envoked.
* I de-ghosted the l_diagnose_Lscale_from_tau code.
* Fixing a couple bugs with the merge.
* De-ghosted a couple of subroutines with advance_helper_module.F90.
* Code wasn't compiling because of too many characters on one line.
* De-ghosted precipitation_fraction.F90.
* De-ghosted more code, including sfc_varnce_module.F90.
* De-ghosted numerical_check.F90
* Committing a chunk of code that effectively "finishes off" the deghosting of CLUBB core, although results aren't there yet and it still needs more debugging.
* This corrects the bug where an error would occur when trying to compare a run with a ghost level to a run without a ghost level.
* Commiting some necessary ghost point removal code.
* Updated the calculations of rcm_in_layer and cloud_cover for ghostless gridding.
* I removed the ghost point from all the files within the Benchmark_cases directory.
* I am committing code that removes the ghost level from setup_clubb_pdf_params and most of the collection of CLUBB's microphysics schemes.
* Fixing a bug in SILHS where sample point values were being overwritten at level 1.
* I fixed some bugs in the ghostless version of the Morrison microphysics driver.
* I fixed some array declaration mismatches in silhs_api_module.F90.
* I have deghosted the call to the code that calculates microphysics tendencies and everything below it.
* Performed a de-ghosting, as well as an improvement that ensures that mean sedimentation is always conservative (excluding the amount of hydrometeor that leaves the domain at the surface), to all subroutines at the level of microphys_lhs and lower in advance_microphys_module.F90. This includes all process-related subroutines like those that govern sedimentation or turbulent sedimentation.
Gee, how is it possible that such are large amount of work gets done when there's no office. It must have been magic elves who did it. I mean, a physical office must be key to every element of functioning in life, right?
* Reversing the accidental stats file commit I made in the previous commit.
* Updating the "leftovers" from the previous merge to make it consistent with the call syntax in the new, ghostless CLUBB.
* Updated the turbulent sedimentation code to handle upper and lower boundary conditions in a better manner.
* I have finished de-ghosting the entirety of advance_microphys_module.F90 and all codes that are underneath its umbrella.
* I finished de-ghosting the radiation portion of CLUBB.
* I have removed the ghost level from hydrostatic_module.F90.
* I removed the ghost point from parameters_tunable and started referencing the ghostless grid through the entirety of clubb_api_module as well as in all of the G-unit tests.
* Deghosted another file. Not too many left.
* Deghosted sounding.F90
* I have deghosted clubb_driver.F90 and everything below its umbrella, which is a huge benchmark in this process.
* It is not necessary to de-ghost the source code for the tuner, since the information on what levels it is tuning for is fed in from input files.
Within the tuner input files, I have adjusted the tuning ranges by 1 to compensate for the fact that the ghost level has now been entirely removed from the model.
* Got rid of some unnecessary "use grid_class" statements that were still referencing the old grid.
* I have found a bug in the ghostless SILHS code in the SILHS code that calculates the variances and covariances of moisture and heat (that are fed back into the model predictive equations). In short, variables that were used to store the grid mean values of thl, rt, and w were being set to 0 at level 1. This was fine when level 1 was the ghost level, but level 1 is no longer the ghost level. This was root cause of the issue.
* The line that sets rand_pool at level 1 that was merged in during the previous merge commit needs to be removed.
* These lines also needed to be fixed because they were supposed to be changed to nzt / 2 after the previous merge commit.
* Correcting a bug in coamps microphysics regarded the unnecessary interpolation of hydrometeor sedimentation velocities to the zm grid. This interpolation is a bug because CLUBB expects hydrometeor velocities output on the zt grid.
* I am committing a fix to the _ta budget terms. It will fix the error messages as well allow for budget term agreement between the master and clubb_ghost_exorcism branches.
* Fixing an error in the ghostless budget stats for turbulent sedimentation.
* After the merge, I am once again updating the merged code for ghost level removal.
* Getting rid of leftover ghost removal junk that was still lying around.
* I needed to pass p_sfc inside CLUBB core to help set the value of p_in_Pa_zm at level 1.
* C11_Skw_fnc is a zt variable, while Cx_fnc_Richardson is a zm variable. The offset is to keep results the same between the current master branch and the clubb_ghost_exorcism branch when the l_use_C11_Richardson flag is enabled.
* Fixed a bug.
* I found a couple more instances where the api had dimensions switched around.
* Eliminated diffusion_cloud_frac_zt_lhs, which is unused code that isn't even hooked up (called from) anywhere in the model anymore.
* Changes that also needed to be made with the previous commit.
* The source of the array out-of-bounds error.
* Moving grid_class_new back to grid_class!
* Reminder notes in case input_fields gets used in the future.
* I accidentally committed input fields related changes to rico_model.in that weren't meant to be committed in the previous commit. I am undoing those now.
* Having clubb thermodynamic level 1 below the surface is no longer the stanard scenario!
Small bugs fix in bugsrad code. This was only caught when compiling with intel debug and using '-warn all', which compares interface dimensions/declaration between files.
Updating tuner code to include an option to save all netcdf files (#1171)
* Updating tuner code to include an option to save all netcdf files from a tuner run. Works with multiple tuner cases, and labels the files with "_iter0001.nc" or "_iter0108.nc", for example.
* Clarifying that there is no need to define "tuning_filename" in error.F90 to avoid confusion for posterity.
change loop index to sclr and edsclr for sclr_dim and edsclr_dim (#1173)
Whenever a loop is dimensioned sclr_dim, use sclr as the loop index. Whenever a loop is dimensioned edsclr_dim, use edsclr as the loop index.
Added changes and tested for binary differences with the following flags for the gabls2 case: l_host_applies_sfc_fluxes=true/false l_call_pdf_closure_twice=true/false l_lmm_stepping=true/false l_explicit_turbulent_adv_wpxp=true/false
Cleaning up subroutine compute_Cx_fnc_Richardson 1) In advance_helper_module.F90: - Removed superfluous inputs - Added Brunt Väisälä frequency variables, shear_sqd, and Lscale_zm as inputs - Removed call to calc_brunt_vaisala_freq_sqd - Removed zt2zm(Lscale) - Removed calculation and stat_update_var of shear_sqd
2) In advance_clubb_core: - Added stat_update_var for shear_sqd - Adjusted call to compute_Cx_fnc_Richardson
3) Renamed netcdf variable `shear_sqd` to `ddzt_umvm_sqd` to keep variable names consistent.
Eliminating call to calc_stability_correction in advance_xm_wpxp 1) In advance_xm_wpxp_module.F90: - Eliminated call to calc_stability_correction in calc_xm_wpxp_lhs_terms - stability_correction is now passed through advance_xm_wpxp to calc_xm_wpxp_lhs_terms - Cleaned up input lists
2) In advance_clubb_core: - Adjusted call to advance_xm_wpxp