added -heap-arrays tag to FFlags on Makefile to fix jenkins testing error (details)
Makefile came with a few other accidental changes, these have been corrected. (details)
The big grid change. Converting gr from being an array of types containing 1D arrays, to a type containing 2D arrays. All cases BFB, cam multicolumn+silhs BFB, and cam multicolumn (no silhs) with backwards compatible settings BFB. (details)
The big grid change. Converting gr from being an array of types containing 1D arrays, to a type containing 2D arrays. All cases BFB, cam multicolumn+silhs BFB, and cam multicolumn (no silhs) with backwards compatible settings BFB. (details)
Adding column index to gr arrays, hard coding to 1 since sam only uses single column calls. (details)
Removing the zt2zm interface from clubb_api and making the api calls just redirect to the grid class interface for it. (details)
Pushing column loop into mean advection procedures. (details)
I changed the w_up_in_cloud code in 2 ways: (details)
I added stats output for w_down_in_cloud to all_stats.in. (details)
Modified for the latest changes to CLUBB. (details)
adding line to fix mpi configuration in micro drizzle test (details)
I altered the w_up_in_cloud and w_down_in_cloud code so that a (details)
I have optimized the new w_up_in_cloud and w_down_in_cloud code by (details)
Refactored fill_holes_vertical to make GPUization simple. This is BIT_CHANGING, but results are bit-for-bit when using -O0 optimization, thus it is not answer changing. The first pass over each grid column will not parallelize well, the k-loop needs to be done in serial. Maximum parallelization has been exposed for the global hole-filling though, at the cost of occasionally doing unneccesary calculations. larson-group/clubb#972. (details)
Removing fill_holes_multiplicative and replacing magic numbers with parameters from constants_clubb. larson-group/clubb#972 (details)
Moving vertical_avg and vertical_integral to advance_helper_module. larson-group/clubb#972 (details)
Moving vertical_avg and vertical_integral to advance_helper_module. larson-group/clubb#972 (details)
Making compatible with latest clubb change. (details)
Removing elementalness from sat_vapor_press_liq and making interal procedures subroutines rather than functions to prevent unneccesary data copies. Doing the same for thlm2T_in_K since it is often used in conjunction with sat_vapor_press_liq. Bit-for-bit confirmed with O0 using all single column cases with or without l_diag_Lscale_from_tau, and with cam_coarse_res. larson-group/clubb#972 (details)
Cleaning up new subroutine calc_liquid_cloud_frac_component, and making sat_mixrat_ice a subroutine that works the same way as sat_mixrat_liq. larson-group/clubb#972 (details)
Removing these paratheses is BIT_CHANGING since it modifies the order of operations, but allows for the multiplication and subraction to be done in parallel for complex pipelines. (details)
Improvements. Netcdf output is now functional and we can detect errors with multiple columns even when the standard output is identical. (details)
Updating column num input in config flags. larson-group/clubb#1033 (details)
Adding comments, setting to num_standalone_columns=1 by default, and preventing multicolumn output when l_stats=false. larson-group/clubb#1033 (details)
Improvements. Netcdf output is now functional and we can detect errors with multiple columns even when the standard output is identical. (details)
Namelists need to be closed with a '/', and omitting it will break many tests. (details)
Making save variables in the multicol code threadprivate, this fixes the openmp test. Also changing the way we name and save the multicol output, this allows the parallel run to run with multiple columns. I've reflected the changes in comments where relevant. larson-group/clubb#1033 (details)
Adds commented-out line that prevents the monotonic flux (details)
Updating monotonic flux limiter code to remove spikes. (#1038) (details)
Creating new flags to control monotonic flux limiter (#1039) (details)
Creating new flags to control monotonic flux limiter (#1039) (details)
Updating for changes to CLUBB. See https://github.com/larson-group/clubb/pull/1039. (details)
I am adding cloudy_updraft_frac and cloudy_downdraft_frac as (details)
Updating SAM-CLUBB for the latest changes to the call to (details)
Minor adjustment to eliminate spikes in thlm tendencies from the monotonic flux limiter. (#1043) (details)
Making compatible with latest clubb changes. (details)
Adding capability to change matrix solving method via clubb_config_flags. (details)
Fixing small bug, need to pass _copy arrays to prevent lapack mangling the real ones. (details)
Adding capability to change matrix solving method via clubb_config_flags. (details)
Making GPU and CPU versions of the penta_lu solver the same as discussed in larson-group/clubb#1024. (details)
Replacing $ with & in namelist definition to make consistent. (details)
I added "smooth" max clipping for invrs_tau_shear, which is a variable (details)
ADG1_pdf_driver subroutine port with OpenACC (details)
Replacing old elemental ADG1_w_closure with new GPUized one. Making G_unit tests work with new version. Also making mixt_frac_max_mag a scalar since it was only being used as such. larson-group/clubb#1049 (details)
I can now safely remove all the "ifdef E3SM" statements from CLUBB's (details)
Restructuring and Porting of Compute_mixing_length subroutine(Phase 1) (#1052) (details)
Restructuring and Porting of Compute_mixing_length subroutine(Phase 2) (#1054) (details)
Breaking up column loop in mono_flux_limiter. This may not be the final form for GPUization, but it's definitely a start, no longer do we have to copy single column variables to multicolumn ones anywhere. (#1051) (details)
Adding OpenACC data directives for mixing length and adg routines (details)
Fixing error causing GPU code not to run. Some variables to be copied were labelled as (ngrdcol,nz) when it should be (:ngrdcol,:nz). I've just removed the data length specifiers completely since they are not neccesary in general. (details)
Removing update_pressure since it is no longer called anywhere in clubb or host models. The addition of this subroutine was discussed in larson-group/e3sm#6 and the removal of the call to it was discussed in larson-group/clubb#926. (details)
Removing update_pressure from public list. This was causing compilation crashes. RESOLVED:8c7230fecb877d04fb129ef5e143e0993b4b29b1 (details)
Moving compute_cloud_cover outside of if ( l_use_cloud_cover ) then statement, the cloud_cover and rcm_in_layer variables they compute aren't output in clubb_standalone, but are in cam, causing cam bit diff tests to break. (details)
Adding Skthl_zm to the update host list, I missed this in the last PR. I noticed this by comparing results with and without managed memory, now I've checked BFBness with arm, mpace_b, mc3e, and gabls2. (details)
Small tweaks to fix some GPU bugs. Some variables were uninitialized on the CPU while we were saving them. This could only have been caught by comparing consecutive runs and checking _zt and _zm files, even then few cases were having problems. (details)
Fixing a labelling error in redirect_interpolated_azt_2D and similar procedures, since this interpolates to zt the input should be zm. I think this was my fault, so I cleaned all the zt2zm and zm2zt things up to make it a little nicer. Also ordered the routines _k _1D _2D to make it easier to jump around, it was a bit confusing as they were out of order and the typo really made it hard. (details)
Making it so sclr_tol is set to 0 before the specified sclr_tol_in. This is so that it is initialized to 0 in the case that sclr_dim = 0, since now we are setting it to have a minimum allocation size of 1 and would otherwise have a garbage value. This is what broke the clubb_openmp_gfortran_test. (details)
This commit is a commit that changes absolutely nothing. It is meant to trigger a change in the git update scripts, so that I can start the commit message logging in the autocommit updates larson-group/sys_admin#797 (details)
This commit is a commit that changes absolutely nothing. It is meant to trigger a change in the git update scripts, so that I can start the commit message logging in the autocommit updates larson-group/sys_admin#797 (details)
this is another commit that cahnges nothing that will trigger the gitUpdate scripts (details)
adding an update that changes nothing and is just a test for the autoupdate script (details)
Making CLUBB's splatting scheme implicit and smoother (#1075) (details)
change to calc pressure to trigger autoupdate (details)
GPUizing Lscale_width_vert_avg. Loops have been restructured for simplicity, and algorithm has a different starting value to avoid k dependency. Results are BFB. (#1083) (details)
GPUizing most of advance_clubb_core (#1084) (details)
advance_wp2_wp3 with explicitly managed memory (#1085) (details)
advance_xp2_xpyp with explicitly managed memory (#1086) (details)
advance_windm_edsclrm with explicitly managed memory (#1087) (details)
Moving data statements to outter most parts of clubb and little fix in advance_wp2_wp3 (#1088) (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)
BIT_CHANGING for lscale setup. Updated configurable_model_flags.in and model_flags.F90 - CLUBB ticket #1102 (#1108) (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)
Tunable Richardson number exponent - CLUBB ticket #1102 (#1114) (details)
Tunable Richardson number exponent - CLUBB ticket #1102 (#1114) (details)
Making compatible with latest clubb change. (details)
Removing awkward nan check in favor of a default for Ncnp2_on_Ncnm2 (details)
Fixing bug by changing saturation_equation to match namelist argument, also adding it to namelist. (details)
Adding new argument list variables to openacc copyin statements (details)
Setting l_smooth_Heaviside_tau_wpxp to .true. by default (details)
I am altering the mean advection code in preparation for ghost point (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 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)
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 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)
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)
Add blank line in order to trigger Jenkins tests for CAM (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)
Making compatible with latest clubb changes. (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)
It was discovered that the location where the ghost point values (details)
I accidentally committed a couple things in the previous commit (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)
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)
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)
I am committing code that effectively ignores the values of certain (details)
I am moving the advance_xm_wpxp setting of xm(1) = xm(2) from the (details)
Adding extra exclamation to acc statement to comment it out. (details)
gr%zm should be used here instead of gr%zt, since these are (details)
Thermodynamic-level (zt) values should be used with zt-variable (details)
Fixing small GPU bug in advance_xm, also fixing a bug with sclrpthvp that's only detectable when were running 1 column on GPUs. (details)
Fixing a bug. Does not change default results. (details)
The variable rc_coef_zm needed to be passed in and saved from (details)
Making the f in f90 capital for consistency. (details)
Making the only change required to make clubb run with openacc in cam. (details)
Ri zm calc (Part 1) - Combine and move call to calc_brunt_vaisala_freq_sqd (#1154) (details)
This code in adj_low_res_nu was using the ghost point when (details)
I am updating the SILHS code that calculates k_lh_start to work (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)
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)
removing cheyenne-related content and adding new content for (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)
Fixing mpirun command in the derecho and casper batch scripts. (details)
Editing the LES setup script to give instructions for UCAR computers. (details)
Added zt2zm2zt-smoothing to remove noise in MPACE_B winds (#1161) (details)
Added zt2zm2zt-smoothing to remove noise in MPACE_B winds (#1161) (details)
Moving PosInf to clubb_model_settings.F90 (details)
Removing the target attributes wherever possible. These are artifacts from when gr and the the stats types were globals, and got naively copied when these were pushed through the call stack. (details)
Removing the target attributes wherever possible. These are artifacts from when gr and the the stats types were globals, and got naively copied when these were pushed through the call stack. (details)
The big grid change. Converting gr from being an array of types containing 1D arrays, to a type containing 2D arrays. All cases BFB, cam multicolumn+silhs BFB, and cam multicolumn (no silhs) with backwards compatible settings BFB.
The big grid change. Converting gr from being an array of types containing 1D arrays, to a type containing 2D arrays. All cases BFB, cam multicolumn+silhs BFB, and cam multicolumn (no silhs) with backwards compatible settings BFB.
1) The denominator term is now the "cloudy updraft" frac in each PDF component, rather than just the PDF component cloud_frac. This is more consistent with the quantity being integrated.
2) I also added a w_down_in_cloud for cloudy downdraft velocity.
Since these fields are not output as part of standard stats, this commit will be bit-for-bit for the normal CLUBB output files.
I altered the w_up_in_cloud and w_down_in_cloud code so that a thresholding is used similar to what is seen in the cloud fraction and cloud water code. If the PDF component mean of w more than the maximum allow number of standard deviations away from 0, the PDF component is either all-updrafty or all-downdrafty, and the code avoids expensive computations where large magnitude values can potentially be fed into ERF or EXP.
Of course, the results are not bit-for-bit with the previous version, meaning that there are some situations where these thresholds come into effect. However, plots of all cases show no visible differences in w_up_in_cloud and w_down_in_cloud.
Since w_up_in_cloud and w_down_in_cloud are not included in normal stats output, this commit does not change the bit-for-bitness of CLUBB code.
I have optimized the new w_up_in_cloud and w_down_in_cloud code by only doing repeated operations one time and then saving them as a local variable.
Since the numerical order of operations changes for the argument to the EXP term, the results will differ at the level of numerical round-off, making this revision not bit-for-bit with the last revision. This only affects the w_up_in_cloud and w_down_in_cloud statistical output variables, which in turn are not output as part of standard_stats.in.
Refactored fill_holes_vertical to make GPUization simple. This is BIT_CHANGING, but results are bit-for-bit when using -O0 optimization, thus it is not answer changing. The first pass over each grid column will not parallelize well, the k-loop needs to be done in serial. Maximum parallelization has been exposed for the global hole-filling though, at the cost of occasionally doing unneccesary calculations. larson-group/clubb#972.
Removing elementalness from sat_vapor_press_liq and making interal procedures subroutines rather than functions to prevent unneccesary data copies. Doing the same for thlm2T_in_K since it is often used in conjunction with sat_vapor_press_liq. Bit-for-bit confirmed with O0 using all single column cases with or without l_diag_Lscale_from_tau, and with cam_coarse_res. larson-group/clubb#972
Cleaning up new subroutine calc_liquid_cloud_frac_component, and making sat_mixrat_ice a subroutine that works the same way as sat_mixrat_liq. larson-group/clubb#972
Removing these paratheses is BIT_CHANGING since it modifies the order of operations, but allows for the multiplication and subraction to be done in parallel for complex pipelines.
Making save variables in the multicol code threadprivate, this fixes the openmp test. Also changing the way we name and save the multicol output, this allows the parallel run to run with multiple columns. I've reflected the changes in comments where relevant. larson-group/clubb#1033
I am adding cloudy_updraft_frac and cloudy_downdraft_frac as outputs to the calculate_w_up_in_cloud code.
These fields are non-interactive for the standard set of cases. Thus, all cases are bit-for-bit identical.
However, for the w_up_in_cloud and w_down_in_cloud results themselves, it is possible that results might not be bit-for-bit since the location of the max(eps, ...) clipping in the denominator is changed. However, results should not be appreciable different.
A different way of dealing with monotonic flux limiter spikes (#1046)
* A different way of dealing with monotonic flux limiter spikes in CAM, by increasing the value of thl_tol_mfl. ALso reverts the earlier fix. BIT_CHANGING.
See https://github.com/NCAR/amwg_dev/discussions/134#discussioncomment-4165447.
* Clubb ticket #1025: Implemented changes dealing with pdf_params%thl1/2 and wp2 floating point errors occurring in tuning runs. BIT_CHANGING - Added command-line option -t/--tuner to compile.bash which enables the -DTUNER compiler flag. - Added line to gfortran compilation config file to easily disable openMP - Added a couple error messages and cleaned up some instances of error handling in src/error.F90, src/clubb_driver.F90, and src/CLUBB_core/advance_clubb_core_module.F90 - Added global constant wp2_max in src/CLUBB_core/constants_clubb.F90 which sets the upper bound for wp2 - In pdf_closure, added sanity checks for pdf_params%thl1/2 (>=190K, <=1000K) - Added debug warning in src/CLUBB_core/advance_wp2_wp3_module.F90 when wp2 is clipped. - Added wp2_sfc clipping in src/CLUBB_core/sfc_varnce_module.F90 - Added debug_level_check to NaN check in clubb_driver.F90 - Added mention of the new compiler option to the README
I added "smooth" max clipping for invrs_tau_shear, which is a variable that is supposed to be positive definite, yet was obtaining negative values at the model lower boundary owing to linear extension at the boundaries as part of the linear interpolation call.
Added OpenACC related flags in linux_x86_64_nvhpc_casper.bash You can enable/disable OpenACC compilation using OPENACC=true/false. Added OpenACC directives in ADG1_pdf_driver subroutine.
Replacing old elemental ADG1_w_closure with new GPUized one. Making G_unit tests work with new version. Also making mixt_frac_max_mag a scalar since it was only being used as such. larson-group/clubb#1049
I can now safely remove all the "ifdef E3SM" statements from CLUBB's parameters_tunable.F90. This code is now located in the clubb_intr.F90 portion of E3SM.
Restructuring and Porting of Compute_mixing_length subroutine(Phase 1) (#1052)
* Restructuring and Porting of Compute_mixing_length subroutine(Phase 1)
Restructure: The compute_mixing_length is one of the top most routine taking 35-50% of the total time in a single timestep. The subroutine has been restructured to push the i-loop further down to extract vectorization and parallelization. The restructuring also involves introduction of sat_mixrat_liq_acc routines to extract parallelism when called inside a OpenACC parallel region.
Porting: OpenACC directives are inserted to port the restructured compute_mixing_length code on to the GPUs. This port is currently unoptimized and there is still room for improvement.
NOTE: Currently, l_sat_mixrat_lookup = false and saturation_formula = saturation_flatau (Earthworks config options) case is supported on OpenACC build. Any other options works on CPUs as usual. OpenACC declare create directives are inserted in model_flags and constants_clubb, as these module variables are used inside the saturation routines.
* Added debug message about only supporting l_sat_mixrat_lookup = false and saturation_formula = saturation_flatau on GPUs Answers are Bit for Bit with arm-multicolumn case + nvhpc compiler.
* Changing CLUBB debug level 1 to 0 for the saturation formula support running on GPUs
* Changing indentation to make gfortran happy, it wants ifdefs to start at the beginning of the line.
* Adding use statements for error checks and printouts, also making the errors set err_code to clubb_fatal_error.
Restructuring and Porting of Compute_mixing_length subroutine(Phase 2) (#1054)
* Restructuring and Porting of Compute_mixing_length subroutine(Phase 2)
Restructure: sat_mixrat_liq_2D_acc is being directly called instead of calling the 1D version inside the column loop. Changing sat_mixrat_liq_2D_acc to a subroutine from a function and adding output array, start_index as additional argument. This is a workaround for passing sub-arrays. The OpenACC doen't like the sub-arrays being passed and fails the validation.
Porting: OpenACC directives are added inside sat_mixrat_liq_2D_acc for porting
Validation: Answers are Bit for Bit with arm-multicolumn case + nvhpc compiler
* Fix for compilation issues
Issue 1: Missed out declaring 'start_index' while intergrating the change
Issue 2: The use of error_code module and the procedures inside it causes OpenACC compilation issues when run on the device.
* Removing the sat_mixrat_liq_acc and sat_mixrat_liq_2D_acc, making the normal sat_mixrat_liq work for all current use cases, and making the other versions of sat_mixrat_liq (bolton,gfdl,lookup) functional with OPENACC.
Breaking up column loop in mono_flux_limiter. This may not be the final form for GPUization, but it's definitely a start, no longer do we have to copy single column variables to multicolumn ones anywhere. (#1051)
Adding OpenACC data directives for mixing length and adg routines
OpenACC structured data regions are added to optimize the data transfers between CPU and GPU. These data regions will converted to unstrucutred data region in the later optimization phase. Results are bit for bit.
Fixing error causing GPU code not to run. Some variables to be copied were labelled as (ngrdcol,nz) when it should be (:ngrdcol,:nz). I've just removed the data length specifiers completely since they are not neccesary in general.
Removing update_pressure since it is no longer called anywhere in clubb or host models. The addition of this subroutine was discussed in larson-group/e3sm#6 and the removal of the call to it was discussed in larson-group/clubb#926.
Porting pdf_closure subroutine with OpenACC (#1059)
* Porting pdf_closure subroutine with OpenACC
OpenACC directives are added to pdf_closure subroutine. The necessary structured data region is also added for optimzing data movement across kernels. There is opportunity to task parallelize using streams and will be explored in the future.
Clubb ticket #1025: Implemented way to make esa tuner reproducible, h… (#1068)
* Clubb ticket #1025: Implemented way to make esa tuner reproducible, hid error output of optional diagnostic variables behind check, fixed parallelization issue with tuner, esa max_iters parameter is now in stats namelist, fixed issue with TUNER compiler directive, some small fixes. - New namelist variables prescribed_rand_seed and l_use_prescribed_rand_seed determine if the esa tuner will use a random or a fixed value as random seed. Added descriptions to README. - Added max_iters to stats namelist to make it more modifiable. - Renamed stp_adjst_intercept_in and stp_adjst_slope_in to stp_adjst_shift_in and stp_adjst_factor_in, respectively, to better reflect their influence on step size. - The error output in src/CLUBB_core/pdf_closure_module.F90 for the diagnostic variables wprtp2, wpthlp2, wprtpthlp, and rcp2 is now hidden behind existence checks for these variables. And a clarification was added to "#ifdef TUNER" directive. - NetCDF file access caused the tuner to crash in parallel mode (-fopenmp flag in config file and multiple cases). Adding an $OMP CRITICAL structure around the call to stats_init in clubb_driver.F90 fixed that. - Fixed compile/README. Config files are specified with the -c option. - The -t option in run_scripts/run_tuner.bash interfered with the previous usage of the TUNER compiler directive. Renamed the old TUNER directive to NR_SP, a short for "numerical recipes, single precision". TUNER now is the option to "turn on" code changes required to run the tuner.
* Fixing bug. This was only triggered when l_input_fields=.true., which I am only testing because it needs to be true so that I can test ADG2_driver.
* Removing usage of gr from pdf_closure. It was only ever used for nz, which is now fed in directly.
* Making openacc statements more consistent. Ensuring all statments on double loops have specified gang and vector, and that all parallel loops have an end parallel loop statment at the end of them. Everything BFB on CPUs and GPUs.
* Pushing acc data region to outermost parts of mixing_length.
* Removing pdf_implicit_coefs_terms from acc copyin and copyout. It is only used when iiPDF_type == iiPDF_new .or. iiPDF_type == iiPDF_new_hybrid, so we do not need to do any copying with it. The inclusion of it also caused the data statement to copy unallocated arrays, which are just garbage pointers, and that was causing random occasional crashes (either segfaults or gpu out of memory).
* The update device clauses for return variables seems to only be requried for arrays contained in types. See https://github.com/larson-group/clubb/issues/1049\#issuecomment-1440624778
* Moving acc end data to end of pdf_closure. This reuqired removing any conditional return statements that appear before the final return, since we're not allowed to branch out of an acc region early. I also moved a large printout statement outside of a loop. The only reason it was in the loop to begin with was because pdf_params used to be an array of types, but now is a type of arrays, allowing us to print the full arrays directly.
* Making loop an acc loop. If we weren't outputting w_[up/down]_in_cloud (iw_up_in_cloud <= 0 .or. iw_down_in_cloud <= 0, then these arrays were only being zerod out on the CPU and would've getting overwritten by the uninitialized GPU data at the end of the data statement. This change causes the arrays to get correctly zerod out on the GPU when we need.
* Update VariableGroupNondimMoments.py
Fixed a typo
* Merging new changes from master
* Removing need for -gpu=deepcopy, pushing some acc data statements up call tree, and replacing some acc data statements with acc delare statements so that return statements can be added back in.
* Adding back an acc loop that was accidentally removed during a merge.
---------
Co-authored-by: Brian Griffin <31553422+bmg929@users.noreply.github.com>
This code change is expected to be BIT_CHANGING for cases in which `l_predict_upwp_vpwp = T`, `l_mono_flux_lim_um = T` or `l_mono_flux_lim_vm = T`, and the monotonic flux limiter is triggered.
This bug fix prevents non-conservation of momentum when the vertical integral of either of the wind components `um` or `vm` is negative.
Moving compute_cloud_cover outside of if ( l_use_cloud_cover ) then statement, the cloud_cover and rcm_in_layer variables they compute aren't output in clubb_standalone, but are in cam, causing cam bit diff tests to break.
Adding Skthl_zm to the update host list, I missed this in the last PR. I noticed this by comparing results with and without managed memory, now I've checked BFBness with arm, mpace_b, mc3e, and gabls2.
Code changes to implement modificiations on wp3 clippings This commit contains code changes to implement modifications of skewness clippings on wp3 in src/CLUBB_core/clip_explicit.F90. The default method attempts to apply smaller (larger) clippings below (above) 100m AGL level, which can cause a discontinuities around 100m AGL level. This clippings is found to trigger sawthooth oscillations in wp3 when linear diffusion is used. Such swathooth oscillations are eleminated if a smoothed Heaviside function is introduced to obtain a smooth transition of clippings at around 100m AGL level. The changes is necessary to obtain the first order convergence in CLUBB-SCM when lienar diffusion is used.
Code changes to implement modificiations on wp3 clippings This commit contains code changes to implement modifications of skewness clippings on wp3 in src/CLUBB_core/clip_explicit.F90. The default method attempts to apply smaller (larger) clippings below (above) 100m AGL level, which can cause a discontinuities around 100m AGL level. This clippings is found to trigger sawthooth oscillations in wp3 when linear diffusion is used. Such swathooth oscillations are eleminated if a smoothed Heaviside function is introduced to obtain a smooth transition of clippings at around 100m AGL level. The changes is necessary to obtain the first order convergence in CLUBB-SCM when lienar diffusion is used.
This commit contains code changes to implement modifications on limiters in three places:
1. remove the limiters in denominator of equation for brunt_vaisala_freq_sqd_smth, which affects the computed eddy dissipation time scale in turbulent fluxes (wpxp). (in mixing_length.F90)
2. reduce the threshold values of limiters in the equation for richardson number (sqrt_Ri_zm) (in mixing_length.F90)
3. introduce the smoothed max/min function for limiters in equation of Cx_fnc_Richardson. (in advance_helper_module.F90).
After the modification, we also apply a zt2m(zm2zt) smoothing on the calculated quantities. These modifications are found to be benificial for improving solution convergence in CLUBB-SCM
The code changes are controlled by a newly introduced flag named "l_modify_limiters_for_cnvg_test", which is set to .false. (meaning that the modificaitons on limiters is turned off) by default.
This commit contains code changes to implement modifications on limiters in three places:
1. remove the limiters in denominator of equation for brunt_vaisala_freq_sqd_smth, which affects the computed eddy dissipation time scale in turbulent fluxes (wpxp). (in mixing_length.F90)
2. reduce the threshold values of limiters in the equation for richardson number (sqrt_Ri_zm) (in mixing_length.F90)
3. introduce the smoothed max/min function for limiters in equation of Cx_fnc_Richardson. (in advance_helper_module.F90).
After the modification, we also apply a zt2m(zm2zt) smoothing on the calculated quantities. These modifications are found to be benificial for improving solution convergence in CLUBB-SCM
The code changes are controlled by a newly introduced flag named "l_modify_limiters_for_cnvg_test", which is set to .false. (meaning that the modificaitons on limiters is turned off) by default.
* Adding Skthl_zm to the update host list, I missed this in the last PR. I noticed this by comparing results with and without managed memory, now I've checked BFBness with arm, mpace_b, mc3e, and gabls2.
* Small GPU fixes (#1076)
* Fixing small things that I caught by adding the default(present) onto acc loops.
* Moving default(present) to the end because it looks nicer there.
* Adding default(present) to all acc loop statements. Also adding azt to a copyin statement, which was missed previously. All BFB.
* Incemental update, not well tested yet.
* Removing some copies and making the sclr_dim change.
* Fixing a bug that only seemed detectable with astex_a209. We need to pass only single arrays to functions, calling ddzt( nz, ngrdcol, gr, rho_ds_zt * K_zt_nu ) was resulting in rho_ds_zt * K_zt_nu being evluated on the CPU, but the values were only valid on the GPU. So we need to evaluate that expression on the GPU, save it into an array (currently K_zt_nu_tmp), then pass that to ddzt.
* GPUizing calc_turb_adv_range
* GPUizing mono_flux_limiter
* Cleaning up data statments and a couple other things.
* Updated for some different options.
* More updates needed for various options.
* Reverting accidental flag change
* Should be the final changes, all options tested now.
* Replacing some comments in monoflux limiter, and also modifying it to make it BFB on CPUs. Also changing incorrect error conditions on tridiag.
* Adding max_x_allowable to update host statement, missed previous.
* Properly naming tmp variables and variables calculated from ddzt and ddzm start with ddzt_ and ddzm_.
* Replacing constants with named ones from constants_clubb.
* Replacing hard coded numbers in lhs variables representing the number of bands they contain with fortran parameters.
Small tweaks to fix some GPU bugs. Some variables were uninitialized on the CPU while we were saving them. This could only have been caught by comparing consecutive runs and checking _zt and _zm files, even then few cases were having problems.
Fixing a labelling error in redirect_interpolated_azt_2D and similar procedures, since this interpolates to zt the input should be zm. I think this was my fault, so I cleaned all the zt2zm and zm2zt things up to make it a little nicer. Also ordered the routines _k _1D _2D to make it easier to jump around, it was a bit confusing as they were out of order and the typo really made it hard.
Making it so sclr_tol is set to 0 before the specified sclr_tol_in. This is so that it is initialized to 0 in the case that sclr_dim = 0, since now we are setting it to have a minimum allocation size of 1 and would otherwise have a garbage value. This is what broke the clubb_openmp_gfortran_test.
* Making 2 new functions zm2zt2zm and zt2zm2zt to handle smoothing by interpolation. Replaced the spots in clubb I know that uses this to smooth things. This is just a nice to have and could allow for easy optimizations in the future by inlining the interpolations. All cases BFB on CPU and GPU, checked all relevant options too.
* GPUizing diagnose_Lscale_from_tau
* Removing some unused variables.
* Moving acc data statements from calc_Lscale_directly up to advance_clubb_core.
* Removing an unused variable.
* GPUizing the l_smooth_min_max option.
* GPUizing l_avg_Lscale
* Changes to variable names to avoid gross long names only used once.
* GPUizing pvertinterp even though I don't think we care about the l_do_expldiff_rtm_thlm flag
* Fixing bug. Setting l_do_expldiff_rtm_thlm causes us to use edsclrm, so we need to also ensure that edsclrm > 1 (1 because it uses a edsclr_dim-1 index)
This commit is a commit that changes absolutely nothing. It is meant to trigger a change in the git update scripts, so that I can start the commit message logging in the autocommit updates larson-group/sys_admin#797
This commit is a commit that changes absolutely nothing. It is meant to trigger a change in the git update scripts, so that I can start the commit message logging in the autocommit updates larson-group/sys_admin#797
* BIT_CHANGING:3b086a40085284aa49c71d32c001d20153a8ddb4 the last commit is bit changing for only some cases and only when using higher than -02 optimization. uf min seems to be the first calculation that starting to differ bitwise. Using the check_multicol script confirms the differences are small.
* Adding a tweak to surface values in the extra columns. This helped me check calc_sfc_varance, since we were not changing any arrays that would've affected calculations there.
* Small optimization, making wstar and ustar2 scalars.
* GPUizing calc_sfc_varnce
* Removing conditional around some stats calls. Now we will always save sfc values to stats, because this will change stats files when gr%zm(i,1) > sfc_elevation, this is potentially BIT_CHANGING.
* Merging with latest clubb changes and making work on GPUs again.
This contained 2 commits that are BIT_CHANGING in some situations.
GPUizing Lscale_width_vert_avg. Loops have been restructured for simplicity, and algorithm has a different starting value to avoid k dependency. Results are BFB. (#1083)
* Chaning acc declare statements to acc enter data statement
* Making acc statements more consistent
* Making lapack useable while using openacc. Lapack is still run on the CPU
* Updating setup_clubb_core to now accept clubb_config_flags as an input, and adding warning in case clubb is running with lapack but was compiled with openacc.
* Making all end parallel directives specify end loop
* Replacing last acc declare in a procedure with acc enter/exit data commands
* Removing pure declarations, turns out they dont really improve performance and openmp isn't allowed within them.
* Adding explicit directives to penta_lu and tridiag_lu, as opposed to the previously used kernels directive. Also splitting up a loop to improve GPU performance.
* Splitting up a couple loops for performance reasons.
* Moving functions called inside loops to their own 2D subroutines. This is for performance, but is also BIT_CHANGING.
* Correct range of values to calculate for term_dp1_lhs
* Comments and cleanup
* Slight change to Skx_func, this is mathematically equivalent but BIT_CHANGING. This is faster on GPUs, and doesn't seem to have a signficiant impact on CPU performance.
* Introducing wp_coef and wp_coef_zt to reduce needed computations. This changes order of operations, so it is BIT_CHANGING.
BIT_CHANGING! Added e-folding code for mixed Brunt Vaisala frequency - CLUBB ticket #1069 - Included usage for bv_efold in src/CLUBB_core/advance_helper_module.F90 - Added intent(out) for correction_stability in subroutine calc_correction_stability - Removed brunt_vaisala_freq_sqd_plus - Idiot proofed interaction between l_diag_Lscale_from_tau and l_use_invrs_tau_N2_iso - Moved stat_update_var(invrs_tau_wp3_zm) out of if ( l_diag_Lscale_from_tau ) - Fixed some typos in src/CLUBB_core/stats_zt_module.F90 - Added comment about to input_misc/tuner/README about t_variables adn input/stats/tuning_stats.in
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
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.
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.
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.
* 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.
* 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
* 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
* 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
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.
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 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
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.
* 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.
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.
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.
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.
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.
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.
`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 spack. Also a lot of cleanup+enhancements to make running easier. https://github.com/larson-group/sys_admin/issues/829
* Adding flag to disable uninit check for intel. This seems to be new for ifx and causes problems easily. A similar issue was noted for cam when compiling with intel, see https://github.com/larson-group/sys_admin/issues/829\#issuecomment-2209596620. Problems with this option are also discussed on this thread https://community.intel.com/t5/Intel-Fortran-Compiler/MemorySanitizer-use-of-uninitialized-value/td-p/1512631
* Making changes to jenkins tests to get running with new system and new Makefile changes.
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.
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
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.
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
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
* 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!
* 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!
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
Removing the target attributes wherever possible. These are artifacts from when gr and the the stats types were globals, and got naively copied when these were pushed through the call stack.
Removing the target attributes wherever possible. These are artifacts from when gr and the the stats types were globals, and got naively copied when these were pushed through the call stack.