-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added new plane average that works on fine levels #667
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ashesh2512
approved these changes
Aug 19, 2022
This will cause small diffs in all ABL reg tests. For single level this is due to the round off error in the denominator term when calculating plane averages, for multiple level ABL's it's a new implementation using the finest level for wall model and abl forcing. @jrood-nrel |
ewquon
pushed a commit
to ewquon/amr-wind
that referenced
this pull request
Sep 1, 2022
* added new plane average that works on fine levels * formatting * changed mean boussinesq back to level 0 field plane average * formatting and bug fix * changed some always asserts to normal asserts * changed some always asserts to normal asserts * removed unused variable * moved cellsize out of gpu loop * fixed some cppcheck stuff * tidy fix
ewquon
added a commit
to ewquon/amr-wind
that referenced
this pull request
Sep 2, 2022
mchurchf
pushed a commit
that referenced
this pull request
Nov 29, 2023
* Initial commit of WRF forcing * Hacking away WRF forcing * more hacking * Some compilation related fixes * Some more compilation related fixes * And more compilation related fixes * fix some more compilation issues * initial commit temperature forcing * WRF file class * missed header file * Move WRF file read to a separate class * Missing header file * cleaning up * hacking on some errors * moving constructor to cpp file * more clean up header * Comment some errors * Accomodate comments from Shreyas * some bug fixes * some more bug fixes * Fix errors with unique_ptr * Fix compilation errors * missing headers * Compiled code ready for testing momentum forcing * Debug Print statements * WRF momentum forcing working; rebase on top of latest main * Temperature forcing from WRF * update cmakelists * Update ABL to call temperature forcing * Compiled WRF temperature forcing * Update field init to initialize from profile and wall function surface t flux * some compilation related bug fixes * Output statistics of K_sgs * put a check on tke field existence * clang format some of the stats modifications * Indirect momentum forcing * k_sgs output statistics * Bug fix * Indirect forcing for both momentum and temperature * Bug fix in temp forcing * bug fix in polynomial fit * read gain coeff from input file * Multi-level WRF forcing * Output wrf forcing in the stats file * Bug fix - add forward declaration of WRF classes * Bug fix - fixed the missing pointers to wrf mom and temp classes * Height varying Bodyforce implementation * remove dt from source term; instead supply bodyforce with dt * Add bodyforce from WRF from precursor to temperature equation * Fixed a typo in CmakeLists * body force magnitude not needed for height vary * WRF tendency forcing * missing gain coeff read and missing call to tendency forcing in theta equation * Create ABLWrfForcing superclass * Perform parm parse in ABLWrfForcing constructor * Put `m_wrf_ht` back in associated ABLWrfForcing*.H * Add comments and debugging output * Add dev readme * Move hard-coded scaleFact to one place * Add input weighting vector for ABLWrfForcing, with defaults * Rename input weighting member vars * Add forcing_transition; implement updateWeights() * Move indirectForcingInit to mean-height update; fix reinitialization flag * Implement weighting in Z^T W Z; save direct error profiles in indirect case * Add additional inputs for different forcing_transition modes * Add option `normalize_by_zmax` for consistency with SOWFA * Minor cleanup * Fix bug with when to call indirectForcingInit() * Update conditions for calling indirectForcingInit() * Add function override weighting profile based on the chosen forcing_transition Still need to set m_transition_height at this point * Implement indirectToConstant forcing transition based on SOWFA6/src/ABLForcing/drivingForce/drivingForce.C * Rearrange parmparse queries in ABLWrfForcing constructor * Implement forcing_transition = "indirectToDirect" * Add screen debug print control Also, changed forcing_scheme to be a required input * Switch to int debug flag * has_var always returns 0 status code if the varid pointer is NULL This may affect other functions in the netcdf interface as well! * WIP: Implement transition_height read from netcdf Lots of unexpected behaviors when attempting to use new netcdf file with additional `transition_height` variable. Something appears to get corrutped in memory. When running with full profile assimilation (transition_height is unused) with the original input netcdf file (results should be identical to before this commit), the forcing is corrupted, resulting in CFL blowing up (violating the CFL constraint from step 2) and the debug flag somehow gets turned off (the error profile is not printed to screen). When running with partial profile assimilation (transition_height should be read from the netcdf input), the solver performs no iterations after step 1-- is the forcing somehow 0? * Restore backwards compatibility and expected behavior Comment out changes to ABLWRFfile for now, add "FIXME" tag * Implement workaround for d8db484 * Interpolate the instantaneous transition height; add datfile.is_open check * Update README.profileAssim.md * Fix merge * Fixes to allow specifying surface temperature flux history w/o WRF profiles Notes: * `Temperature.source_terms = ABLWrfForcingTemp` needs to be set * `ABLWrfForcing[Mom|Temp].forcing_scheme` does not need to be specified * `nheight` and `arraySize` can be 0 in the forcing input file * Allow WRF input file to not have any height information (if forcing_scheme=="") * Fix formatting * Add NETCDF preprocessor directive * Cleanup BodyForce operator * Remove unused inline function closest_index * Improve style and readability * More formatting fixes * Define var for use in kernel function * More clang-tidy fixes * Rename ABLWrf.* source files * Rename ABLWrfForcing class * Create ABLMesoscaleInput.* from ABLMesoscaleForcing.* (previously part of ABLWrf.*) * Generalize ABLWRFfile --> ABLMesoscaleInput * Generalize member variable and function names ("wrf" --> "meso") * Make consistent the names of register_meso_*_forcing() and associated pointers * Minor cleanup * Add ABL.mesoscale_forcing ncfile input; ABL.WRFforcing is deprecated * Rename source classes ABLWrfForcing* --> ABLMesoForcing* * Formatting * Formatting * Fix for memory leak Discovered between 8746f4c..f45e5c7; cause unclear * Fix to work with #667 * Fix merge, compatibility issues; do some cleanup * Fix formatting * formatting * cppcheck and clang-tidy fixes * Explicitly cast to int to avoid clang-tidy bugprone-narrowing-conversions warning * gah formatting * Additional clang-tidy cleanup * More cppcheck * Fix ABLMesoscaleInput instantiation * Formatting * Fixes for C++ "best practice" * stupid formatting * stupid formatting * CodeQL clean up, remove transition_height workaround Workaround was put in place in commit ec5eb95, see that commit message for details. Affects indirect profile assimilation with the following options set: - forcing_transition = indirectToConstant or indirectToDirect - constant_transition_height is NOT set * formatting * formatting * clang-tidy fixes * Silly formatting * make codeql happy --------- Co-authored-by: ShashankNREL <shashank.yellapantula@nrel.gov>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.