-
Notifications
You must be signed in to change notification settings - Fork 749
Adding Solar diagnostics package #1103
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
Conversation
dyn_em/module_first_rk_step_part1.F
Outdated
! shallow cumulus parameterization | ||
CALL wrf_debug ( 200 , ' call shallow_cumulus_driver' ) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pedro-jm Can you leave the blank lines alone?
@twjuliano @pedro-jm @dudhia @weiwangncar |
cldfra(i,k,j)=cldfra(i,k,j)+ccldfra(i,k,j)-0.5*(ITRMX+ITRMN) | ||
ENDDO | ||
ENDDO | ||
ENDDO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@twjuliano @pedro-jm These were added in recent PR #921
phys/module_radiation_driver.F
Outdated
do k=1,pver | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@twjuliano @pedro-jm Please leave the blank lines as they are. Thanks.
There seem to be large reorganizations in the radiation driver.
…On Tue, Feb 25, 2020 at 11:57 AM weiwangncar ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In phys/module_radiation_driver.F
<#1103 (comment)>:
> do k=1,pver
-
@twjuliano <https://github.com/twjuliano> @pedro-jm
<https://github.com/pedro-jm> Please leave the blank lines as they are.
Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1103?email_source=notifications&email_token=AEIZ77CTDOSTSKE6PFZTNZTREVS2JA5CNFSM4K3PI6TKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCW34XRI#pullrequestreview-364366789>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEIZ77FIWY6DXY3CKCZF7ZLREVS2JANCNFSM4K3PI6TA>
.
|
@twjuliano @pedro-jm @dudhia As a general rule, any reorganization of the code should be done in a separate PR, not to be mixed with the actual code changes. |
The changes in the radiation driver are necessary to expose the calculation of unresolved hydrometeors to non radiation time steps (We are moving code). The diagnostics package calculates the column-integrated hydrometeor content of the unresolved hydrometeors and this is why we moved the code. Also, the unresolved hydrometeors are used by FARMS every model time step to calculate the surface irradiance. How should we move forward with this? The removing of blank lines is a side effect of conflict resolution. We can add them back if necessary. |
@pedro-jm OK if the moving of the code is necessary, please add some notes in your PR. Please recover some code you deleted and add the blank lines back, both in readiation driver, and module_first_rk_step_part1.F. Thanks. Because you moved code around in radiation driver, we would like to know if it has any impact in the before and after results. |
OK @twjuliano will add back the blank lines and improve the PR notes. The missing/removed code is actually there. It was just moved. @twjuliano did a couple of sims one with the develop branch as it was a few days ago and the other with develop + solar diag and he found bit for bit equivalent results. He is going to add this info to the PR note. If you find any other thing let us know. |
@davegill @weiwangncar @dudhia @pedro-jm I've just pushed two separate commits. The first one adds back the blank lines that were unintentionally removed in previous commits. The second one makes some minor modifications to the diag_solar code to account for unresolved hydrometeors when no only using icloud=3 in order to better align with the modifications made in the radiation driver. I hope that this PR is now good to go. Please let me know if any other changes are necessary. Also, because @pedro-jm generated this new PR, I am not able to edit the PR note. Are you able to grant me access to edit? Thanks. |
@twjuliano Thank you for bringing back the blank lines. If you send us a few sentences about the need to re-organize the radiation driver code, we can help to add it in. |
#else | ||
grid%ts_tsk(n,i) = grid%nmm_tsk(ix,iy) | ||
#endif | ||
grid%ts_tslb(n,i) = grid%tslb(ix,1,iy) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put this line back in, too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
#endif | ||
grid%ts_tsk(n,i) = 1.E30 | ||
grid%ts_tslb(n,i) = 1.E30 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add this line back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@weiwangncar I conducted these two tests yesterday and the results were identical. Unfortunately, the login nodes for Cheyenne and Casper are currently unavailable, so I am not able to access the simulation output. Hopefully I can do this tomorrow AM. Thanks. |
@twjuliano That's good to know. I am now ok with this PR. Don't forget to edit the PR message. |
@weiwangncar PR message has been edited. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Release note added.
@dudhia @weiwangncar |
Closed, will use #1110 "Adding Solar diagnostics package" |
TYPE: New feature
KEYWORDS: WRF-Solar, diagnostics
SOURCE: Timothy Juliano, Pedro Jimenez, Ju-Hye Kim (NCAR/RAL)
DESCRIPTION OF CHANGES:
Replaces PR #1047 "Adding Solar diagnostic package"
We have created a new diagnostic package for users with interests in parameters that are potentially relevant to solar applications. In the new package, we calculate: solar zenith angle, clearness index, 2-D max cloud fraction, water vapor path, liquid water path, ice water path, snow water path, total water path (liquid + ice + snow), liquid cloud effective radius, ice effective radius, snow effective radius, liquid cloud optical thickness, ice optical thickness, snow optical thickness, cloud base height, and cloud top height. Also, for liquid and ice variables, we calculate the 'total' water path, effective radius, and optical thickness, where the 'total' variables also account for subgrid (unresolved) hydrometeors. We have re-organized the radiation driver code in order to expose the calculation of unresolved hydrometeors during time steps when the radiation physics is not called. After re-organization of the radiation driver code, we ran two tests: one using the default develop code and the other using our modified code with the solar diagnostics turned off; the outputs are bit-for-bit equivalent.
All of the variables added within the solar diagnostics package are defined on the 2-D grid and also as timeseries variables in Registry/registry.solar_fields and the variables are calculated in phys/module_diag_solar.F. The solar diagnostics package is activated by setting solar_diagnostics = 1 in the WRF namelist.input file:
LIST OF MODIFIED FILES:
M Registry/Registry.EM_COMMON
M Registry/registry.em_shared_collection
M dyn_em/module_first_rk_step_part1.F
M main/depend.common
M phys/Makefile
M phys/module_diagnostics_driver.F
M phys/module_radiation_driver.F
M share/module_check_a_mundo.F
M share/wrf_timeseries.F
M run/README.namelist
M run/README.tslist
M test/em_real/examples.namelist
LIST OF NEW FILES:
A Registry/registry.solar_fields
A phys/module_diag_solar.F
TESTS CONDUCTED: Ran a full diurnal cycle of a real case over the Pacific Northwest, USA. The simulation completed, with the output being bit-for-bit equal to the output from a simulation with the same configuration ran using an un-modified version of the code. Shown below are a few images of sample solar package variables for the domain in addition to a time series at the location indicated by a star.
RELEASE NOTES:
A new diagnostic package for users with interests in parameters that are potentially relevant to solar applications is added. In the new package, The following variables are calculated: solar zenith angle, clearness index, 2-D max cloud fraction, water vapor path, liquid water path, ice water path, snow water path, total water path (liquid + ice + snow), liquid cloud effective radius, ice effective radius, snow effective radius, liquid cloud optical thickness, ice optical thickness, snow optical thickness, cloud base height, and cloud top height. Also, for liquid and ice variables, the 'total' water path, effective radius, and optical thickness are computed, where the 'total' variables also account for subgrid (unresolved) hydrometeors. The diagnostics is activated by namelist variable solar_diagnostics (=1) in namelist record @Diags. (Thanks to Timothy Juliano, Pedro Jimenez, Ju-Hye Kim of NCAR/RAL)