update ChangeLog with regression test results (details)
Added aux_pumas test suite, added first attempt at making pumas a valid configure and namelist option for microphysics. Added a test to make sure pumas and mg3 give the same results and it only passes when pumas is set to mg3 in configure right now. More work to do. (details)
fix r8 issue in refractive_aerosol_optics_mod (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)
Cherry picked changes from NCAR (https://github.com/ESCOMP/CAM/commit/8a07c9e37cb5028b08cf0c66d6505e9c60b691c0) to switch svn to git. (details)
Undoing some of the cherry picked changes. These seem related to moving the clubb and silhs code to different directories, which we would have to reflect in our git structure before including. (details)
I am altering the mean advection code in preparation for ghost point (details)
Making commit to fix nightly tests, they had failed because of git dropping svn support, which has been fixed by the previous two commits. RESOLVED:9be0cef04a0a87e891e8274b1cefd661c25b0d0b (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)
Remove CAM3 test since no longer supported (details)
bug fix for iopTimeIdx when iop step size is smaller than model timestep (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)
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)
fv3 updates to bring in more current fms tag. Created fv3 interface directory brought in as an external which points back to GFDL to get the fv3 library code (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)
Rainbows testing added to aux_pumas tests, not aux_cam (details)
Making compatible with latest clubb changes. Omitting these changes broke the bit diff tests, so RESOLVED:e0a868cc878ff72458edfa35cddcfa4c52ca23f9 RESOLVED:48f2a12737dc499dd1ff3703ca350bb5ae52bc6e (details)
Adding space to make commit because the last commit fixed the code, and that means it was technically bit changing, so RESOVLED:bd5c54cf32b9d84bcf5e5d1e4ca722a64cdc3519 (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)
make cam7 physics directory; allow 32 level cam7; up wallclock limits (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)
I am committing code that effectively ignores the values of certain (details)
Updating PIO version to use a commit more recent than the tag to avoid a bug, see https://github.com/larson-group/cam/pull/171\#discussion_r1608836640 for more detail. (details)
Adding space to trigger jenkins bin diff tests. (details)
Making changes to jenkins tests to get running with new system and new Makefile changes. Also setting run_scam debug back to true by default. (details)
Renaming tests to make clear which uses debugging and which doesnt. Intel-oneapi currently doesn't work with debugging, see https://github.com/larson-group/sys_admin/issues/829\#issuecomment-2212729099 (details)
The bin diff tests need to be run on carson because that's where we store the test config files that we use to store the results. (details)
The module loading is handled by the ccs_config code, so we don't need module commands in jenkinsfiles. Also loading intel-oneapi-mkl for intel builds. (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)
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)
Bug fix for runs where CLUBB_SGS is not defined (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)
remove ndep stream from aquaplanet and simple model runs (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)
This commit also includes reorganizing of all GEOS-Chem interface USE statements so that they are split into three categories: CAM modules, GEOS-Chem interface modules in CAM, and GEOS-Chem modules. They are alphabetized within each section.
An extraneous hemco_interface declaration and new line are also removed.
Added aux_pumas test suite, added first attempt at making pumas a valid configure and namelist option for microphysics. Added a test to make sure pumas and mg3 give the same results and it only passes when pumas is set to mg3 in configure right now. More work to do.
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.
Updates for paper, SE grid compatibility, bug fixes
- Support Input_Opt%correctConvUTLS to correct for convective scavenging of soluble tracers (science update, upcoming paper) - Update to UCX mpi broadcast of State_Chm%NOXCOEFF as SE grid not all CPUs have same amount of chunks and MPI code has to be moved to higher level that is aware of chunking - Update to drydep namelist for SE compatibility - Fix for incorrect SOA mapping inconsistent with published Fritz et al. (2022) methodology
Signed-off-by: Haipeng Lin <hplin@seas.harvard.edu>
Changes include updating the mpas external hash to a few commits after the 'v8.0.1' tag, updating the mpas/Makefile, adding the mpas_cam_damping_levels namelist option, updating some subroutine calls to use new arguments, and setting up the halo_groups MPAS uses.
- 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
NTHRDS is 1 by default when using GEOS-Chem compsets so these overrides are not necessary. We find that manually changing NTHRDS to something other than 1 breaks the model, but this is the case with non-GEOS-Chem compsets as well. Unless this becomes a problem the overrides are not needed at this time.
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
Exit with warning in build-namelist if hemco_config_file or hemco_diagn_file are specified in user namelist.
Current behavior in build-namelist enforces use of config files in case directory which are copied to run directory at submit time. User customization to user_nl_cam for the path of HEMCO config files will not take effect when running with GEOS-Chem chemistry, instead the user should edit or symlink from the files in the case directory similar to standalone GEOS-Chem operation. This commit adds a check in build-namelist for this customization and aborts with error to warn user that this is unsupported.
Signed-off-by: Haipeng Lin <hplin@seas.harvard.edu>
Split master deposition lists into two: mozart and geoschem
Deposition lists are no longer stored in GEOS-Chem use case files. Set_dep_lists now takes chem as an argument and picks the appropriate master deposition list file to use, either Mozart or GEOS-Chem.
Revert dep_data_file input_pathname to "abs"; use new file for geoschem
Previously the dep_data_file default for GEOS-Chem was not actually being used due to inclusion in the use case files. This let a bug go under the radar that dep_data_file input_pathname="abs" was removed from the namelist definitions, meaning the configured inputdata path would not be used as a prefix to whatever dep_data_file was set as. This allowed GEOS-Chem compsets to work since the full path was in the use case files, but it resulted in non-GEOS-Chem compsets failing due to an incomplete path for the deposition netcdf file containing Henry's Law coeffs et al.
This update restores using inputdata path as a prefix to dep_data_file, and so fixes the non-GEOS-Chem compsets. It also removes the setting of dep_data_file in the GEOS-Chem compsets and updates the filename in the namelist defaults for dep_data_file if using GEOS-Chem.
GEOS-Chem compsets will not work until someone at NCAR moves the file to the target inputdata directory. The request to do this has been made.
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
Use mpas_cam_damping in F2000climo mpasa480 grid aux_cam test
To ensure the absorbing layer code is tested going forward, the F2000climo aux_cam test using the mpasa480_mpasa480 grid has been modified to turn on the damping associated with mpas_cam_coef and mpas_cam_damping_levels (in addition to the existing Rayleigh damping).
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
Undoing some of the cherry picked changes. These seem related to moving the clubb and silhs code to different directories, which we would have to reflect in our git structure before including.
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.
Making commit to fix nightly tests, they had failed because of git dropping svn support, which has been fixed by the previous two commits. RESOLVED:9be0cef04a0a87e891e8274b1cefd661c25b0d0b
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.
Change FCnudged_GC derecho test to not use zonal mean nudging
I previously changed the test to zonal mean nudging when updating from cheyenne to derecho. Apparently the compset is not set up to do this and I therefore reverted to the previous test which is basic nuging.
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.
fv3 updates to bring in more current fms tag. Created fv3 interface directory brought in as an external which points back to GFDL to get the fv3 library code
* 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.
Making compatible with latest clubb changes. Omitting these changes broke the bit diff tests, so RESOLVED:e0a868cc878ff72458edfa35cddcfa4c52ca23f9 RESOLVED:48f2a12737dc499dd1ff3703ca350bb5ae52bc6e
Adding space to make commit because the last commit fixed the code, and that means it was technically bit changing, so RESOVLED:bd5c54cf32b9d84bcf5e5d1e4ca722a64cdc3519
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.
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.
[ 50 character, one line summary ] Update ChangeLog [ Description of the changes in this commit. It should be enough information for someone not following this development to understand. Lines should be wrapped at about 72 characters. ]
Test suite: Test baseline: Test namelist changes: Test status: [bit for bit, roundoff, climate changing]
Fixes: [CIME Github issue #]
User interface changes?: [Yes (describe what changes), No]
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.
Updating PIO version to use a commit more recent than the tag to avoid a bug, see https://github.com/larson-group/cam/pull/171\#discussion_r1608836640 for more detail.
Squashed '.lib/git-fleximod/' changes from 94121295..a354b052
a354b052 Bump to 0.7.5 71273de6 Merge pull request #37 from ESMCI/fix/git_workflow 1fddaac9 return str not Path 4aa073c3 update find_root_dir to work with git worktree
modified: bld/build-namelist modified: bld/config_files/definition.xml modified: bld/configure new file: src/chemistry/pp_trop_strat_mam5_ts4/chem_mech.doc new file: src/chemistry/pp_trop_strat_mam5_ts4/chem_mech.in new file: src/chemistry/pp_trop_strat_mam5_ts4/chem_mods.F90 new file: src/chemistry/pp_trop_strat_mam5_ts4/m_rxt_id.F90 new file: src/chemistry/pp_trop_strat_mam5_ts4/m_spc_id.F90 new file: src/chemistry/pp_trop_strat_mam5_ts4/mo_adjrxt.F90 new file: src/chemistry/pp_trop_strat_mam5_ts4/mo_exp_sol.F90 new file: src/chemistry/pp_trop_strat_mam5_ts4/mo_imp_sol.F90 new file: src/chemistry/pp_trop_strat_mam5_ts4/mo_indprd.F90 new file: src/chemistry/pp_trop_strat_mam5_ts4/mo_lin_matrix.F90 new file: src/chemistry/pp_trop_strat_mam5_ts4/mo_lu_factor.F90 new file: src/chemistry/pp_trop_strat_mam5_ts4/mo_lu_solve.F90 new file: src/chemistry/pp_trop_strat_mam5_ts4/mo_nln_matrix.F90 new file: src/chemistry/pp_trop_strat_mam5_ts4/mo_phtadj.F90 new file: src/chemistry/pp_trop_strat_mam5_ts4/mo_prod_loss.F90 new file: src/chemistry/pp_trop_strat_mam5_ts4/mo_rxt_rates_conv.F90 new file: src/chemistry/pp_trop_strat_mam5_ts4/mo_setrxt.F90 new file: src/chemistry/pp_trop_strat_mam5_ts4/mo_sim_dat.F90
`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.
Tag name: cam6_4_007 Originator(s): Michael Waxmonsky Date: 7/8/2024 One-line Summary: cam6_4_007: CCPP-ized TJ2016 Github PR URL: https://github.com/ESCOMP/CAM/pull/1070
Purpose of changes (include the issue number and title text for each relevant GitHub issue): - Exchanges TJ2016 source from cam/physics/simple to atmospheric_physics submodule (https://github.com/ESCOMP/atmospheric_physics/pull/92)
Describe any changes made to build system: - Adds src/atmos_phys/tj2016 to list of folders to search for compiling in <case>/bld/atm/obj/Filepath used during ./preview_namelists
Describe any changes made to the namelist: N/A
List any changes to the defaults for the boundary datasets: N/A
Describe any substantial timing or memory changes: N/A
Code reviewed by: cacraigucar, nusbaume
List all files eliminated:
$ git diff --name-status cam_development..tj2016 | grep ^D D src/physics/simple/tj2016.F90
List all files added and what they do: N/A
List all existing files that have been modified, and describe the changes:
M .gitmodules - Updating atmospheric_physics to tag atmos_phys0_03_000
M bld/configure - See comment to change in build system
M src/physics/simple/tj2016_cam.F90 - Updated API into CCPP-ized TJ2016 precip and sfc_plb_hs run functions (See https://github.com/ESCOMP/atmospheric_physics/pull/92 for API change desciription).
If there were any failures reported from running test_driver.sh on any test platform, and checkin with these failures has been OK'd by the gatekeeper, then copy the lines from the td.*.status files for the failed tests to the appropriate machine below. All failed tests must be justified.
CAM tag used for the baseline comparison tests if different than previous tag: - cesm2_3_alpha17g for manually testing FTJ16 compset, previous baseline for aux_cam tests
Summarize any changes to answers, i.e., - what code configurations: - what platforms/compilers: - nature of change (roundoff; larger than roundoff but same climate; new climate): N/A
Updates to make cam work with the new spack system. This also includes changing the traditional "nelson" name for our machine to a general "larson-group" one. Also moving our custom cmake and config files from "cime_config_cesm_machines_files" to "custom_ccs_config_files" because the new build system in cam is named ccs_config.
* Initial changes to get code working with the new spack+module system. See https://github.com/larson-group/sys_admin/issues/829
* Making module versions specific in config_machines. This will prevent cam from breaking if someone installs another version of a package like esmf.
Renaming tests to make clear which uses debugging and which doesnt. Intel-oneapi currently doesn't work with debugging, see https://github.com/larson-group/sys_admin/issues/829\#issuecomment-2212729099
The module loading is handled by the ccs_config code, so we don't need module commands in jenkinsfiles. Also loading intel-oneapi-mkl for intel builds.
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
* 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!
PDFP_RTP2_CLUBB is calculated on thermodynamic grid levels and should only have "lev" number of statistical output grid levels (rather than "ilev", which is for momentum-level variables).
Removing lines from the ERP Jenkins test that (1) no longer work based on the present state of coding in clubb_intr.F90, and (2) no longer seem to be necessary.
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.
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.
Commit 4f7294c182d43d0550fe0bc92568d3232c3cd41e Author: st3113n Date: Tue Sep 17 07:26:23 2024 -0500 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
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.