-
Notifications
You must be signed in to change notification settings - Fork 747
Introduce physics suites mechanism for ARW #124
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
This option selects the physics suite, either 'continental_convection' or 'tropical_convection'
This new routine is responsible for setting physics options based on the physics suite selection made in the namelist.
The setting up of physics suites happens after the call to check_nml_consistency but before the call to set_physics_rconfigs.
The namelist variables mp_physics, ra_lw_physics, ra_sw_physics, sf_surface_physics, bl_pbl_physics, and cu_physics are set to -1 in the Registry.EM_COMMON file, indicating that these options should take on whatever value is dictated by the physics suite chosen by the user.
As part of a suite specification, we now include the surface layer scheme. The default value for the 'sf_sfclay_physics' namelist option is now -1, indicating that this option should default to the option from the selected suite.
…t.input All physics options that are selected by a suite should no longer appear in the default ARW namelist.input file.
When listing the physics schemes selected by a physics suite, the width of the field with the name of the option has been reduced.
Why not have the default of physics_suite in Registry be 'none'? |
@jamiebresch |
@mkavulich was just asking (in person) about whether we are changing the default behavior in WRF, and it's worth pointing out that using any existing |
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.
Perhaps we should just use 'tropical' and 'continental' and remove 'convection' in the suite name.
We should also consider removing some of the non-critical physics namelists from our templates a later time.
Should we make recommendation for number of vertical levels too?
Rather than setting components of physics suites based on numbers that may change, we now use Registry-defined constants, e.g., 16 becomes NTIEDTKESCHEME for the selection of cu_physics.
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.
- Change names to "CONUS" and "tropical"
- Make names case-insensitive
These two physics suites were previously known as 'continental_convection' and 'tropical_convection'.
Before the select-case block to handle physics suites, we first convert the name of the physics suite specified by the user to all lowercase.
@mkavulich Both of your requested changes (name changes and case insensitivity) have been addressed. |
@mgduda the unlimited format string is Fortran 2008 standard. |
@jamiebresch Thanks for the info. Perhaps that explains why it works for various compilers besides PGI, and also why I couldn't find it in the Fortran 2003 book. |
@jamiebresch I'll update the commit message to mention Fortran 2003 and earlier, specifically. |
The setup_physics_suite() routine previously used format strings like '(A21,*(I6,A1))' with the intention of repeating the (I6,A1) part some number of times determined at runtime. The use of '*' as a repetition count isn't valid in Fortran 90/95/2003, however, and was caught by the PGI compiler. This commit introduces code to build a format statement based on the runtime-determined repetition count, and to then use that format statement when printing out the schemes selected in a physics suite.
b3098f3
to
ba63baa
Compare
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.
Approved
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.
As I mentioned to Michael, we need to think about the behavior when someone uses an old namelist which will be seen as 'CONUS' with a lot of overrides in the print-out.
@dudhia @davegill @weiwangncar Jimy's concern about the use of existing namelists generating confusing printout in the To avoid confusing printout with old namelist files, we could:
What do you all think? |
I prefer the default suite to be none. We can add a suite into the default
em_real namelist.input.
Having the default as none permits us to rename suites later without
causing users problems
or namelist-invisible changes to results.
Jimy
…On Mon, Feb 13, 2017 at 5:59 PM, Michael Duda ***@***.***> wrote:
@dudhia <https://github.com/dudhia> @davegill
<https://github.com/davegill> @weiwangncar
<https://github.com/weiwangncar> Jimy's concern about the use of existing
namelists generating confusing printout in the rsl.error.0000 file is
something that we may be able to address with relatively minor changes
(described below). Perhaps we can have a quick vote: should we merge this
PR as it is now to enable testing of suites to begin, or should we merge
this PR after making changes to void confusing printout with old namelist
files?
To avoid confusing printout with old namelist files, we could:
1. Set the default suite in the Registry.EM_COMMON file to none
2. In the suite setup routine, if the suite is none, print a simple
message stating that we are not setting up a physics suite and return
immediately
What do you all think?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#124 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ARGf_FYGLNbO9WQgVOW02SWMJam8bVoHks5rcPyPgaJpZM4LmTzn>
.
|
I'm ok with this proposal too. We can play with it once it's in and see
what may need to be tweaked.
…On Mon, Feb 13, 2017 at 6:08 PM, dudhia ***@***.***> wrote:
I prefer the default suite to be none. We can add a suite into the default
em_real namelist.input.
Having the default as none permits us to rename suites later without
causing users problems
or namelist-invisible changes to results.
Jimy
On Mon, Feb 13, 2017 at 5:59 PM, Michael Duda ***@***.***>
wrote:
> @dudhia <https://github.com/dudhia> @davegill
> <https://github.com/davegill> @weiwangncar
> <https://github.com/weiwangncar> Jimy's concern about the use of
existing
> namelists generating confusing printout in the rsl.error.0000 file is
> something that we may be able to address with relatively minor changes
> (described below). Perhaps we can have a quick vote: should we merge this
> PR as it is now to enable testing of suites to begin, or should we merge
> this PR after making changes to void confusing printout with old namelist
> files?
>
> To avoid confusing printout with old namelist files, we could:
>
> 1. Set the default suite in the Registry.EM_COMMON file to none
> 2. In the suite setup routine, if the suite is none, print a simple
> message stating that we are not setting up a physics suite and return
> immediately
>
> What do you all think?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#124 (comment)>, or
mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/ARGf_
FYGLNbO9WQgVOW02SWMJam8bVoHks5rcPyPgaJpZM4LmTzn>
> .
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#124 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AMHfkDU-93mPJqBMm3VVEY8dKurovlmnks5rcP57gaJpZM4LmTzn>
.
|
This commit sets the default physics suite to 'none', and adds code to print a simple message and return early from the suite setup routine if the suite is 'none'. This should avoid any confusing output in the rsl files for anyone using existing namelist.input files with WRF v3.9.
I've just pushed a commit that makes
The default suite in the namelist at If there are no objections, I'll rerun the regtest and merge this PR later today. |
What happens if someone mistypes a suite name. Does it abort with a message
or default to something?
…On Tue, Feb 14, 2017 at 12:18 PM, Michael Duda ***@***.***> wrote:
I've just pushed a commit that makes none the default physics suite in
the Registry, and prints the following message if the physics suite is
none:
*************************************
No physics suite selected.
Physics options will be used directly from the namelist.
*************************************
The default suite in the namelist at test/em_real/namelist.input is still
CONUS.
If there are no objections, I'll rerun the regtest and merge this PR later
today.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#124 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ARGf_HsEmvi54BTxh2nqOEmBPcTQ2IbRks5rcf31gaJpZM4LmTzn>
.
|
@dudhia yes, the code will stop with this fatal error:
|
TYPE: enhancement
KEYWORDS: physics suites
SOURCE: internal
PURPOSE:
Introduce a mechanism for specifying physics suites, which automatically set physics options based on the suite selection.
DESCRIPTION OF CHANGES:
This PR introduces a mechanism for selecting suites of physics schemes via the
namelist.input
file, and it provides the initial definitions of two suites, tentatively named 'CONUS' and 'tropical'.From a user perspective, the
&physics
namelist record contains a new option,physics_suite
, which is a character string naming the physics suite to be used in a simulation. By default, namelist options for selecting individual physics schemes (specifically,mp_physics
,cu_physics
,ra_lw_physics
,ra_sw_physics
,bl_pbl_physics
,sf_sfclay_physics
, andsf_surface_physics
) do not appear in the namelist. However, the selection of any of the aforementioned schemes may be overridden by specifying that namelist option explicitly.At runtime, the model prints to the rsl files a summary of the physics schemes that will be used in the simulation:
In the printout, if any options were overridden by the user, those options will be printed with a trailing asterisk.
The suite mechanism is implemented as a new routine,
setup_physics_suite( )
, that is called just aftercheck_nml_consistency( )
and beforeset_physics_rconfigs( )
. Suite definitions are hard-wired in this routine asCASE
statements.Several design decisions are worth mentioning:
which results in the following printout to the
rsl.error.0000
file:A value of
-1
was chosen to indicate "the scheme following the choice of physics suite" for the namelist optionsmp_physics
,cu_physics
,ra_lw_physics
,ra_sw_physics
, etc., since a value of 0 is already used to indicate no parameterization.Both the
real.exe
andwrf.exe
programs may use physics suites, but at present no attempt to enable physics suites for WRF DA has been made.The
namelist.output
file reflects the state of the namelist before processing of physics suites. This means that, for example,CU_PHYSICS= 11*-1
appears in thenamelist.output
file if the user has not explicitly overridden the selection of cumulus scheme for any domain.LIST OF MODIFIED FILES:
TESTS CONDUCTED:
All WTF regression tests pass.
Short two-domain simulations with 'CONUS' and 'tropical' suites, with and without specific physics schemes overridden from suite default.