Commented out the k=1 boundary conditions in diffusion_zm_lhs and diffusion_zt_lhs, since these are not currently fed into the final LHS matrix. I included comments to describe why this was done. Results are b4b. (details)
Passing tunable parameters into the new tau code. (details)
Passed down more parameters. Results are bit-for-bit. (details)
Passing through more clubb parameters. Bit-for-bit (details)
Passing down CLUBB's tunable parameters into the setup_pdf_parameters and (details)
These updates incorporate some of Shixuan Zhang's changes, including: (details)
Passing down CLUBB's tunable parameters into the remainder of the (details)
I passed down the forgotten thlp2_rad_coef tunable parameter. (details)
Uncommenting diffusion.F90 k=1 lines again to fix Oracle uninit var test. I've updated the accompanying note to state clearly that the lines have no effect on model output, but I guess we need to keep the lines to avoid uninitialized variables. (details)
I am passing down the forgotten parameter, altitude threshold, in (details)
Updating for changes to CLUBB. See https://github.com/larson-group/clubb/pull/968. (details)
Adding code wrapped in a flag (l_use_tke_in_K_dfsn) to use u_i'u_i' in the wp2 and wp3 eddy diffusion terms, instead of just wp2 or wp3. Relevant to CLUBB issue #920. (details)
Adding code wrapped in a flag (l_use_tke_in_K_dfsn) to use u_i'u_i' in the wp2 and wp3 eddy diffusion terms, instead of just wp2 or wp3. Relevant to CLUBB issue #920. (details)
Updates as requested to the l_use_tke_in_K_dfsn code: (details)
Updates as requested to the l_use_tke_in_K_dfsn code: (details)
I am committing the final stage of the "pass-down params" project. (details)
I am committing the final stage of the "pass-down params" project. (details)
Adding an option to use invrs_tau_N2_iso for C4 terms. The same invrs_tau had been used for C4 and C14 terms, so some adjustments had to be made to separate them out (this was started with an earlier commit: https://github.com/larson-group/clubb/commit/ef3be1b1378bcd1a447f3866c9f88f8cc4764233). The flag is currently set to false so results will be b4b. (details)
Renaming invrs_tau_zt and invrs_tauw3t to "invrs_tau_wp3_zt" in advance_wp2_wp3 to avoid confusion. This variable is only used for the wp3 C8 term, so one consistent name is simpler, and the name "invrs_tau_zt" is already used by another variable in advance_clubb_core. (details)
I forgot to add this necessary subroutine call to the clubb API. (details)
Fixing a minor accounting bug related to the changes in https://github.com/larson-group/clubb/commit/987d63de489d2baa09ad6e1538b2c6dbb7551690. There was some overcounting of the relevant terms. (details)
This commit fixes SAM to work with the new version of CLUBB. (details)
I have turned the nu_vert_res_dep family of variables into a derived (details)
Added sam file name to DYCOMS_RF02_DO case, fixed the clipping in calc_w_up_in_cloud in pdf_closure_module.f90, and changed long name of w_up_in_cloud in stats_zt_module.f90 (details)
Resolved any issues in the pull request. See https://github.com/larson-group/clubb/pull/970 for details (details)
Resolved any issues in the pull request. See https://github.com/larson-group/clubb/pull/970 for details (details)
Included a check in pdf_closure_module.f90 to check if flag for iw_up_in_cloud is set. Removed iw_up_in_cloud from standard_stats.in to prevent binary diffs in CLUBB output files after merge (details)
fixed a typo in pdf_closure_module.f90, line 1284 (details)
added some documentation in pdf_close_module.f90 and started writing of w_up_in_cloud to disk (details)
See respective messages on the issue 958 on date 10/12/2021 (details)
Added sam file name to DYCOMS_RF02_DO case, fixed the clipping in calc_w_up_in_cloud in pdf_closure_module.f90, and changed long name of w_up_in_cloud in stats_zt_module.f90 (details)
Resolved any issues in the pull request. See https://github.com/larson-group/clubb/pull/970 for details (details)
Included a check in pdf_closure_module.f90 to check if flag for iw_up_in_cloud is set. Removed iw_up_in_cloud from standard_stats.in to prevent binary diffs in CLUBB output files after merge (details)
See respective messages on the issue 958 on date 10/12/2021 (details)
fixed a typo in pdf_closure_module.f90, line 1284 (details)
Resolved any issues in the pull request. See https://github.com/larson-group/clubb/pull/970 for details (details)
Passing w_up_in_cloud out of advance_clubb_core (details)
Updating SAM-CLUBB for the most recent version of CLUBB. (details)
Adding some additional statistics output relevant to Stephens Larson Mironov 2022 paper. (details)
Updating RUNDATA/lst so that the new stats I added in https://github.com/larson-group/sam_clubb/commit/72a614957aa439ae75dbf8be6b4870a7a4c48c4b will be output. (details)
Updates relevant to reproducing results for Stephens, Larson, and Mironov 2022. (details)
Adding comments to described SAM's pressure variable. (details)
These changes allow you to call the 4 clubb "advance" subroutines in any (details)
Placing the order variables in a nice, convenient place for testing use. (details)
I reordered advance_clubb_core so that the "Advance xp3" (which is a (details)
I am committing the idiot-proofing code that forces l_min_xp2_from_corr_wx (details)
I am indenting the portion of the code where the advance subroutines (details)
Temporarily commenting out the idiot proofing in order to run some tests ... (details)
Now official reinstating the idiot-proofing and turning off the (details)
I am committing some idiot proofing in regards to the advance (details)
Updated for the latest version of CLUBB. (details)
Adding new file to describe in detail SAM's wp2 and wp3 budgets. (details)
Fixing an array definition issue that created a problem with the PGI (details)
Updating CLUBB to pass uprcp and vprcp into and out of advance_clubb_core. (details)
Now that uprcp and vprcp have been passed through advance_clubb_core, (details)
I am adding more arguments to the argument list for advance_clubb_core (details)
Updating SAM-CLUBB for the latest additions to the call to advance_clubb_core_api (details)
Fixing the sam_clubb_silhs_gfortran build by locally making wp3 the (details)
Insert print about overwriting default flags with namelist values (details)
Insert print about overwriting default parameters with namelist values (details)
Making api version of setup_grid. larson-group/clubb#972 (details)
Making some paramters_silhs variables available from the silhs api (details)
Pushing column loop into advance_clubb_core, and adding interface for it so that we will not need to update any host models. Everything is bit-for-bit, testing all standalone cases and our cam_coarse res run. larson-group/clubb#972 (details)
Adding l_stats check around stats stuff. This fixes the crashing when stats is disabled. larson-group/clubb#972 (details)
Making single and multi column versions of advance clubb core available through clubb_api. larson-group/clubb#972 (details)
Breaking up column loop in advance_clubb_core. larson-group/clubb#972 (details)
Pushing loop into pdf_closure and breaking it up. larson-group/clubb#972 (details)
I changed C_invrs_tau_N2_wp2 from 0.1 to 0.2 to help stop turbulence (details)
I changed C_invrs_tau_N2_wp2 from 0.1 to 0.2 to help stop turbulence (details)
Pushing loop into pdf_closure_module and breaking it up. larson-group/clubb#972 (details)
Making the good version of pdf_params used most places. The bad version is the single column version. larson-group/clubb#972 (details)
Making a commit that officially places the call to the PDF in the "post" (details)
Making a commit that officially places the call to the PDF in the "post" (details)
Pushing loops into all relevent lowest level routines in pdf_closure. larson-group/clubb#972 (details)
We need to initialize our local pdf_implicit_coefs_terms_zm in certain pdf types. We also don't need to zero out pdf_implicit_coefs_terms arrays, since that's done in the initialization. This should fix segfaults when l_call_pdf_closure_twice=.True. larson-group/clubb#972 (details)
I am updating ice_supersat_frac to be an intent(inout) variable for (details)
Intializing sigma_sqd_w_zt when not using ADG1. larson-group/clubb#972 (details)
Fixing bug, we were not initializng pdf_params for all columns. larson-group/clubb#972 (details)
Pushing column index into zm2zt and zt2zm. larson-group/clubb#972 (details)
Pushing column index into Skx_func and making it a subroutine. larson-group/clubb#972 (details)
A variety of small loop pushing. larson-group/clubb#972 (details)
Fixed small bug that slipped through because the G_unit tests use nz=1. (details)
Pushing column index into mixing length routines, not all the way down for the non-tau based calculation. larson-group/clubb#972 (details)
I added a subroutine that prints that values of all PDF parameters in (details)
Small changes and a loop push. larson-group/clubb#972 (details)
Pushing loop into advance_xm_wpxp. larson-group/clubb#972 (details)
Making the G_unit test use a dummy column index. This makes it so we don't need an interface for compute_sigma_sqd_w since now we only use it with 2 dimensions. This is just nicer. larson-group/clubb#972 (details)
Breaking up column loop in advance_xm_wpxp_module. larson-group/clubb#972 (details)
Pushing column loop into local functions. larson-group/clubb#972 (details)
Moving stats call for uprcp and vprcp to after they are calculated. This fixes the silhs restart test. But does not seem to fix the E3SM or CAM tests that are still failing. (details)
Adding in Post Step log reporting to ensure we recieve log output even on failed runs. (details)
Fixing syntax errror in the jenkins file. (details)
Fixing test deleting log file before it can be read. (details)
Adding 2D version of zt2zm and zm2zt to clubb_api (details)
Pushing loop into solve_xm_wpxp_with_single_lhs (#986) (details)
Refactoring to remove need for global stats scratch variables. (#988) (details)
Fixing small bug that breaks runs with scalars. (details)
Implementations of smooth min, max and heaviside function. Added G-Unit tests (details)
Making setup_pdf_parameters accept ngrdcols size arrays of stats and grid types. (details)
Forgot two small changes. larson-group/cam#129 (details)
Removing need for data copies. larson-group/cam#129 (details)
Changing column loop index from j to i. larson-group/cam#129 (details)
Changing microphysics file to UWM from 1MOM for the carson nightly tests. (details)
Removing data copies that we don't need anymore. This still runs correctly on GPUs. (details)
Making clip_transform_silhs_output use an array of gr. This is how it should have been once the column loop was pushed down into it, but at the time clubb was using gr through a use statement making that not possible. (details)
No more need for these data copies anymore now that pdf_params is allocated with ngrdcol rather than pcols. (details)
Increasing HBUF_MAX_LENGTH to 2000 to account for increase in vaiables. (details)
Adds a blank line to trigger git merge with E3SM (details)
Removes a blank line in order to trigger merge with E3SM (details)
Pushing column loop into xm_wpxp_clipping_and_stats and monotonic_turbulent_flux_limit. This essentially completes advance_xm_wpxp for now. larson-group/clubb#972 (details)
Replacing the i loop iterator for scalars with sclr. (details)
Moving the lhs_dp1 calculation to outside of xp2_xpyp_lhs. This gives us more flexibility, since we want to pass lhs_dp1 into xp2_xpyp_implicit_stats. (details)
Moving the lmm_stepping and stats calls to immediately after calls to xp2_xpyp_solve. This is because xp2_xpyp_implicit_stats saves things that are saved by scratch variables, and these scratch variables are set by the lhs and rhs setup calls. So for the multiple lhs routine, we need to save the scratch variables immediately after these calls before overwriting them by calling lhs and rhs again for a different variable. Since the stats also saves the variable were solving for, we also have to move the lmm_stepping to before this call. (details)
Removing need for stats scratch variables by passing lhs terms to save through agument lists. This makes everything better in every way. (details)
Adding slicing for some lhs arrays being saved in stats. This was causing bit changing in a few lhs terms when run in multicolumn. (details)
Changing names of dp1 variables for up2 and vp2. Surrounding where they're set to be within a l_stats_samp. (details)
Changed the UTIL Makefile to use ifort rather than sunf95 to allow nightly tests to run. (details)
Adding files and updates necessary to run new neutral, shear_driven case in SAM. The case (details)
I added l_relax_clipping to CLUBB's config flags. (details)
I added l_relax_clipping to CLUBB's config flags. (details)
I am updating clubb_sgs.F90 for the addition of the l_enable_relaxed_clipping (details)
Forgot to add l_enable_relaxed_clipping to the namelist readible flags. (details)
Added a3_coef_min to the list of CLUBB's tunable parameter and then (details)
Added a3_coef_min to the list of CLUBB's tunable parameter and then (details)
Updated SAM-CLUBB for CLUBB's new tunable parameter a3_coef_min (details)
Adding samClubbCodeCopy.bash to the jenkins directory for testing Clubb changes. larson-group/sys_admin#768 (details)
Added idiot-proofing to print a warning message when l_diag_Lscale_from_tau (details)
Updating the call to setup_clubb_core_api based on changes found (details)
I added the code for the l_linearize_pbl_winds flag that was originally (details)
I added the code for the l_linearize_pbl_winds flag that was originally (details)
Interfacing SAM-CLUBB with the latest version of CLUBB. (details)
Updated code so that it actually compiles and runs. (details)
Renaming folder and script as well as adding test Jenkinsfile. (details)
Fixing cutt off lines and spelling mistakes. (details)
Renamed smth_range to heaviside_smth_range (details)
Added tot_vartn_normlzd statistics. Renamed sclr in advance_helper_module to scalar to be more consistent with clubb naming schemes. (details)
Implemented three further normalized variation stats. Included a (most likely temporary) check because in a few cases, denominator for normalization would be 0. (details)
Changed priorities of total normalized variation stats, included error handling in total normalized variation stats. (details)
Renamed pdf_output_filename. Added grid_level constant to avoid magic numbers in stats_update_var_pt calls. (details)
Bugfix for merge #1000. stderr was not imported in stat_clubb_utilities.F90, causing compilation to fail. (details)
Renaming the new case from SHEAR_DRIVEN to NEUTRAL, and associated mentions in files. (details)
Added ability to apply smooth min max functions in mixing_length.F90 (details)
Updated deprecated documentation of smooth min and max functions in advance_helper_module.F90. https://github.com/larson-group/clubb/issues/965 (details)
Checked whether results really are identical even with round-off when we have l_smooth_min_max=T and smooth_min_max_mag=zero. Next commit rolls some of these changes back for merge into master. https://github.com/larson-group/clubb/issues/965 (details)
Added test cases to smooth_min_max_tests.F90 and updated documentation. (details)
removed SAM_CLUBB_standards.tex, SAM_CLUBB.tex, SAM_code_notes.tex, and SAM6.10_guide.doc larson-group/sys_admin#622 (details)
COrrecting a couple of omissions from when I was renaming the shear_driven case to "neutral". (details)
Constructing rcm within SILHS (as rcm_pdf) (#1011) (details)
Constructing rcm within SILHS (as rcm_pdf) (#1011) (details)
Updating for changes to CLUBB. See https://github.com/larson-group/clubb/commit/e4f125ba067ba8083f917e0e06b6b2398483d3e4. (details)
Making compatible with latest clubb change. (details)
Making pdf_implicit_coefs_terms a type containing 2D arrays. (#1014) (details)
The G_unit tests never allocated pdf_implicit_coefs_terms. It's unclear to me how these were working before, but it seems that something about making these 2D allocatable arrays exposed the bug. (details)
Making zt2zm calls with pdf_implicit_coefs_terms use the 2D version. (details)
Removing setup_grid and setup_parameters functionality from setup_clubb_core. This is beacuse in host models the required grid information may not be known during the setup process, resulting in dummy arguments for setup_clubb_core and the grid and paramters being setup during runtime anyway. Now, in the host models we can call these subroutines immediately after setup_clubb_core to maintain identical functionality (sam, wrf), and in others we can wait to call these until the main timestepping procedure (cam,e3sm). (details)
Making compatible with latest clubb change. (details)
Making 2D versions of setup_grid and setup_parameters. (details)
Making lmin a scalar again, twas a mistake to make it an array, it can only take on one value. (details)
Making nu_vert_res_dep a type containing arrays, as opposed to being an array of types. (details)
I have passed down CLUBB's tunable parameters into advance_wp2_wp3_module.F90.
The results in NetCDF output files from this revision are an exact match to the results in NetCDF output files from the previous revision for all cases.
Commented out the k=1 boundary conditions in diffusion_zm_lhs and diffusion_zt_lhs, since these are not currently fed into the final LHS matrix. I included comments to describe why this was done. Results are b4b.
See https://github.com/larson-group/clubb/issues/920#issuecomment-942735433.
These updates incorporate some of Shixuan Zhang's changes, including:
(1) upwind scheme for the eddy diffusion code, which Shixuan says does not make a huge difference; and (2) l_smooth_heaviside_tau_wpxp flag in the mixing_length.F90 code, which is intended to give smoother results.
Both of the flags for these changes are turned off, but these updates are BIT_CHANGING because of some minor changes to the way that factors of rho_ds_* and invrs_rho_ds_* are handled going into the diffusion.F90 subroutines. Most cases look identical in pyplotgen, but sensitive cases like arm_97 and rico look slightly different.
These changes were originally in pull request #962, but because of conflicts with the master branch code base that developed, they could not be rebased and merged, so I incorporated them into this new commit.
Uncommenting diffusion.F90 k=1 lines again to fix Oracle uninit var test. I've updated the accompanying note to state clearly that the lines have no effect on model output, but I guess we need to keep the lines to avoid uninitialized variables.
Adding code wrapped in a flag (l_use_tke_in_K_dfsn) to use u_i'u_i' in the wp2 and wp3 eddy diffusion terms, instead of just wp2 or wp3. Relevant to CLUBB issue #920.
Results are b4b when the flag is turned off, which it currently is.
Adding code wrapped in a flag (l_use_tke_in_K_dfsn) to use u_i'u_i' in the wp2 and wp3 eddy diffusion terms, instead of just wp2 or wp3. Relevant to CLUBB issue #920.
Results are b4b when the flag is turned off, which it currently is.
Updates as requested to the l_use_tke_in_K_dfsn code:
- The name of the flag is changed to l_use_tke_in_wp2_wp3_K_dfsn - Comments are added to the main pieces of code in advance_wp2_wp3 - The flag is added to the "compatible_r8029" configurable flags file.
See this comment https://github.com/larson-group/clubb/issues/920#issuecomment-931446401 and following for more information.
Updates as requested to the l_use_tke_in_K_dfsn code:
- The name of the flag is changed to l_use_tke_in_wp2_wp3_K_dfsn - Comments are added to the main pieces of code in advance_wp2_wp3 - The flag is added to the "compatible_r8029" configurable flags file.
See this comment https://github.com/larson-group/clubb/issues/920#issuecomment-931446401 and following for more information.
Adding an option to use invrs_tau_N2_iso for C4 terms. The same invrs_tau had been used for C4 and C14 terms, so some adjustments had to be made to separate them out (this was started with an earlier commit: https://github.com/larson-group/clubb/commit/ef3be1b1378bcd1a447f3866c9f88f8cc4764233). The flag is currently set to false so results will be b4b.
See also the discussion here: https://github.com/larson-group/clubb/issues/920#issuecomment-920338746 and following comments.
Renaming invrs_tau_zt and invrs_tauw3t to "invrs_tau_wp3_zt" in advance_wp2_wp3 to avoid confusion. This variable is only used for the wp3 C8 term, so one consistent name is simpler, and the name "invrs_tau_zt" is already used by another variable in advance_clubb_core.
Fixing a minor accounting bug related to the changes in https://github.com/larson-group/clubb/commit/987d63de489d2baa09ad6e1538b2c6dbb7551690. There was some overcounting of the relevant terms.
Results are b4b since the l_use_tke_in_wp2_wp3_K_dfsn flag is false.
I have turned the nu_vert_res_dep family of variables into a derived type and that variable is now being passed throughout the CLUBB code, rather than accessing variables through a USE statement.
Added sam file name to DYCOMS_RF02_DO case, fixed the clipping in calc_w_up_in_cloud in pdf_closure_module.f90, and changed long name of w_up_in_cloud in stats_zt_module.f90
Included a check in pdf_closure_module.f90 to check if flag for iw_up_in_cloud is set. Removed iw_up_in_cloud from standard_stats.in to prevent binary diffs in CLUBB output files after merge
Added sam file name to DYCOMS_RF02_DO case, fixed the clipping in calc_w_up_in_cloud in pdf_closure_module.f90, and changed long name of w_up_in_cloud in stats_zt_module.f90
Included a check in pdf_closure_module.f90 to check if flag for iw_up_in_cloud is set. Removed iw_up_in_cloud from standard_stats.in to prevent binary diffs in CLUBB output files after merge
In principle, removing the clipping should reduce noise. In practice, it makes rico noiser but mpace_b less noisy. It also allows twp_ice to run to completion with the gfortran compiler.
Updating RUNDATA/lst so that the new stats I added in https://github.com/larson-group/sam_clubb/commit/72a614957aa439ae75dbf8be6b4870a7a4c48c4b will be output.
These changes allow you to call the 4 clubb "advance" subroutines in any order that you want to try. In the default order (where the order is the same as found in the current version of the CLUBB master), results are bit-for-bit when compared to CLUBB master.
I reordered advance_clubb_core so that the "Advance xp3" (which is a basic calculation of xp3 by the ansatz by default) section is moved out of the way of the "advance loop" to a point that is after advance_windm_edsclrm (or whatever will be called last in the advance loop.
This change does not alter the default results. Everything is still bit-for-bit.
I am committing the idiot-proofing code that forces l_min_xp2_from_corr_wx and l_enable_relaxed_clipping to have opposite values (one must be true and the other must be false). In this commit, both are set to true, so the code will produce an exception.
Temporarily commenting out the idiot proofing in order to run some tests ... The results from this branch are still bit-for-bit with the master branch.
I am committing some idiot proofing in regards to the advance subroutines ordering. No index can have a value of less than 1, greater than 4, and no index can have the same value as any other index. Each adv routine order index must have a unique value.
Now that uprcp and vprcp have been passed through advance_clubb_core, I can get rid of this idiot-proofing code that stops the run when l_predict_upwp_vpwp is enabled and the PDF is in the "post" position.
Fixing the sam_clubb_silhs_gfortran build by locally making wp3 the same type (real r4) as the other variables (wp2_zt, etc.) in CLUBB's calls to MPI-ish stuff.
Also adding the -fallow-argument-mismatch flag to handle SAM's issues with type mismatches in MPI calls within the bowels of SAM.
when l_min_xp2_from_corr_wx = F and l_enable_relaxed_clipping = F. The goal is to allow the clubb_backwards_compatibility_gfortran_test Jenkins test to pass again.
Add l_smooth_Heaviside_tau_wpxp to smooth discontinuity in invrs_tau_wpxp_zm
This option calls subroutine smooth_heaviside_peskin, which implements the smooth Peskin Heaviside function. The option is turned off for now, and so the results should remain bit for bit.
Add l_smooth_Heaviside_tau_wpxp to smooth discontinuity in invrs_tau_wpxp_zm
This option calls subroutine smooth_heaviside_peskin, which implements the smooth Peskin Heaviside function. The option is turned off for now, and so the results should remain bit for bit.
Pushing column loop into advance_clubb_core, and adding interface for it so that we will not need to update any host models. Everything is bit-for-bit, testing all standalone cases and our cam_coarse res run. larson-group/clubb#972
I changed C_invrs_tau_N2_wp2 from 0.1 to 0.2 to help stop turbulence from going to the model top, which ultimately caused MC3E to crash by becoming too cold. Additionally, I set C_invrs_tau_shear back to 0.15 from 0.16. This commit is BIT_CHANGING.
I changed C_invrs_tau_N2_wp2 from 0.1 to 0.2 to help stop turbulence from going to the model top, which ultimately caused MC3E to crash by becoming too cold. Additionally, I set C_invrs_tau_shear back to 0.15 from 0.16. This commit is BIT_CHANGING.
Making a commit that officially places the call to the PDF in the "post" position (meaning after CLUBB's predictive fields have been advanced). This commit is BIT_CHANGING
Making a commit that officially places the call to the PDF in the "post" position (meaning after CLUBB's predictive fields have been advanced). This commit is BIT_CHANGING
We need to initialize our local pdf_implicit_coefs_terms_zm in certain pdf types. We also don't need to zero out pdf_implicit_coefs_terms arrays, since that's done in the initialization. This should fix segfaults when l_call_pdf_closure_twice=.True. larson-group/clubb#972
I am updating ice_supersat_frac to be an intent(inout) variable for advance_clubb_core. When the PDF is in the "post" position, there is a chance that it can be used before it is set unless it is preserved from timestep to timestep.
Making the G_unit test use a dummy column index. This makes it so we don't need an interface for compute_sigma_sqd_w since now we only use it with 2 dimensions. This is just nicer. larson-group/clubb#972
Moving stats call for uprcp and vprcp to after they are calculated. This fixes the silhs restart test. But does not seem to fix the E3SM or CAM tests that are still failing.
Making clip_transform_silhs_output use an array of gr. This is how it should have been once the column loop was pushed down into it, but at the time clubb was using gr through a use statement making that not possible.
Pushing column loop into xm_wpxp_clipping_and_stats and monotonic_turbulent_flux_limit. This essentially completes advance_xm_wpxp for now. larson-group/clubb#972
Moving the lmm_stepping and stats calls to immediately after calls to xp2_xpyp_solve. This is because xp2_xpyp_implicit_stats saves things that are saved by scratch variables, and these scratch variables are set by the lhs and rhs setup calls. So for the multiple lhs routine, we need to save the scratch variables immediately after these calls before overwriting them by calling lhs and rhs again for a different variable. Since the stats also saves the variable were solving for, we also have to move the lmm_stepping to before this call.
Adding files and updates necessary to run new neutral, shear_driven case in SAM. The case is modeled on George Bryan's CM1 shear-driven case from Moeng and Sullivan 1994.
See https://github.com/larson-group/clubb/issues/991.
Added idiot-proofing to print a warning message when l_diag_Lscale_from_tau is being used and C1, C1b, C2rt, C2thl, C2rtthl, C6rt, C6rtb, C6thl, C6thlb, or C14 do not have a value 1. This can later be upgraded to a fatal error when we can finally run this code with the C2 and C6 families of parameters having a value of 1 (that value is currently 2 right now).
* Pushing column loop into xm_wpxp_clipping_and_stats and monotonic_turbulent_flux_limit. This essentially completes advance_xm_wpxp for now. larson-group/clubb#972
* Replacing the i loop iterator for scalars with sclr.
* Pushing loop into advance_xp2_wpxp.
* Moving the lhs_dp1 calculation to outside of xp2_xpyp_lhs. This gives us more flexibility, since we want to pass lhs_dp1 into xp2_xpyp_implicit_stats.
* Moving the lmm_stepping and stats calls to immediately after calls to xp2_xpyp_solve. This is because xp2_xpyp_implicit_stats saves things that are saved by scratch variables, and these scratch variables are set by the lhs and rhs setup calls. So for the multiple lhs routine, we need to save the scratch variables immediately after these calls before overwriting them by calling lhs and rhs again for a different variable. Since the stats also saves the variable were solving for, we also have to move the lmm_stepping to before this call.
* Removing need for stats scratch variables by passing lhs terms to save through agument lists. This makes everything better in every way.
* Adding slicing for some lhs arrays being saved in stats. This was causing bit changing in a few lhs terms when run in multicolumn.
* Changing names of dp1 variables for up2 and vp2. Surrounding where they're set to be within a l_stats_samp.
* Breaking up column loop in advance_xp2_xpyp and pushing column loop into calc_xp2_xpyp_ta_terms. larson-group/cam#972
* Breaking up column loop in calc_xp2_xpyp_ta_terms.
* Pushing loop into solve_xp2_xpyp_with_single_lhs.
Implemented three further normalized variation stats. Included a (most likely temporary) check because in a few cases, denominator for normalization would be 0.
* Pushing loop down through advance_windm. Other files needed to be touched because they were using a simple function, xpwp_func, which has been replaced in relevenant places by the few lines of code it takes to do.
* Cleaned up intents
* Moving xpwp calcuations back to procedure, but making procedure a 1/2D interface in advance helper. Other various small tweaks as well.
Checked whether results really are identical even with round-off when we have l_smooth_min_max=T and smooth_min_max_mag=zero. Next commit rolls some of these changes back for merge into master. https://github.com/larson-group/clubb/issues/965
Constructing rcm within SILHS (as rcm_pdf) (#1011)
* Constructing rcm within SILHS (as rcm_pdf) to avoid having to pass rcm directly to SILHS. Relevant to possibly moving PDF call placement into the "post" position in CAM.
See https://github.com/ESCOMP/CAM/issues/582.
* Reconstructing rcm inside of setup_pdf_parameters instead of passing it through the argument lists. Might help NCAR move the PDF call placement to "post" position in CAM.
See https://github.com/larson-group/clubb/issues/997.
Constructing rcm within SILHS (as rcm_pdf) (#1011)
* Constructing rcm within SILHS (as rcm_pdf) to avoid having to pass rcm directly to SILHS. Relevant to possibly moving PDF call placement into the "post" position in CAM.
See https://github.com/ESCOMP/CAM/issues/582.
* Reconstructing rcm inside of setup_pdf_parameters instead of passing it through the argument lists. Might help NCAR move the PDF call placement to "post" position in CAM.
See https://github.com/larson-group/clubb/issues/997.
The G_unit tests never allocated pdf_implicit_coefs_terms. It's unclear to me how these were working before, but it seems that something about making these 2D allocatable arrays exposed the bug.
Removing setup_grid and setup_parameters functionality from setup_clubb_core. This is beacuse in host models the required grid information may not be known during the setup process, resulting in dummy arguments for setup_clubb_core and the grid and paramters being setup during runtime anyway. Now, in the host models we can call these subroutines immediately after setup_clubb_core to maintain identical functionality (sam, wrf), and in others we can wait to call these until the main timestepping procedure (cam,e3sm).