-
Notifications
You must be signed in to change notification settings - Fork 37
PUMAS round3 #357
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
base: main
Are you sure you want to change the base?
PUMAS round3 #357
Changes from all commits
a9328ae
e7205c3
8b56c47
301f43e
ece068b
659327a
b188b67
6b3cc4b
50be090
3ec547c
ffbac28
07b71dc
335b649
fcc8453
88c2e98
80ae20a
1bc8363
90fed13
171fa8e
7443df3
01d55b0
8b359bf
485736b
2b8b259
55fb203
ff987b8
9050827
263076d
36a7324
cc036fb
544d46a
2fd07c6
fb7bc8b
22510f2
267712a
a76fdd3
55eeade
489806a
090416b
183661c
2b7ecfa
94c5548
22a3457
4b9ea65
31d342b
3aa3f24
6e18593
2a31c57
835c233
2226c40
26beeb8
4656a6b
787c32c
9020f31
e5494a7
70cc4db
9b6e450
8aa7e54
2ea30ba
e56dc31
e2f5ec2
25faf11
2797786
4bc5b7f
b8fec30
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,56 @@ | ||||||
| ! Stub for heterogeneous freezing by classical nucleation theory (hetfrz_classnuc). | ||||||
| ! | ||||||
| ! This scheme exists to read the use_hetfrz_classnuc namelist flag and expose it | ||||||
| ! via its CCPP standard name so downstream schemes (e.g. nucleate_ice_ccpp, | ||||||
| ! eventually PUMAS) can see the flag. It performs no heterogeneous-freezing | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I might replace
Suggested change
|
||||||
| ! computation -- the real hetfrz_classnuc_ccpp is not yet ported to CAM-SIMA. | ||||||
| ! | ||||||
| ! Safe to use with use_hetfrz_classnuc=.true. for snapshot-testing flows where | ||||||
| ! the flag must propagate downstream; a warning is printed at init time. | ||||||
| module hetfrz_classnuc_stub | ||||||
| use ccpp_kinds, only: kind_phys | ||||||
|
|
||||||
| implicit none | ||||||
| private | ||||||
|
|
||||||
| public :: hetfrz_classnuc_stub_init | ||||||
|
|
||||||
| contains | ||||||
|
|
||||||
| !> \section arg_table_hetfrz_classnuc_stub_init Argument Table | ||||||
| !! \htmlinclude hetfrz_classnuc_stub_init.html | ||||||
| subroutine hetfrz_classnuc_stub_init( & | ||||||
| amIRoot, iulog, & | ||||||
| use_hetfrz_classnuc, & | ||||||
| errmsg, errflg) | ||||||
|
|
||||||
| logical, intent(in) :: amIRoot | ||||||
| integer, intent(in) :: iulog | ||||||
| logical, intent(in) :: use_hetfrz_classnuc | ||||||
|
|
||||||
| character(len=*), intent(out) :: errmsg | ||||||
| integer, intent(out) :: errflg | ||||||
|
|
||||||
| errmsg = '' | ||||||
| errflg = 0 | ||||||
|
|
||||||
| if (amIRoot) then | ||||||
| if (use_hetfrz_classnuc) then | ||||||
| write(iulog, '(A)') 'WARNING: hetfrz_classnuc_stub: use_hetfrz_classnuc=.true., but ' // & | ||||||
| 'heterogeneous freezing by classical nucleation theory is not yet ' // & | ||||||
| 'implemented in CAM-SIMA (stub scheme).' | ||||||
| write(iulog, '(A)') 'WARNING: hetfrz_classnuc_stub: The flag is still propagated to ' // & | ||||||
| 'downstream schemes (e.g. nucleate_ice_ccpp) via its CCPP standard ' // & | ||||||
| 'name, but no hetfrz_classnuc computation will occur.' | ||||||
|
|
||||||
| ! this is not intended to error out for now as the flag needs to be passed to downstream schemes | ||||||
| ! (e.g., PUMAS) and modifies their behavior | ||||||
| else | ||||||
| write(iulog, '(A)') 'hetfrz_classnuc_stub: use_hetfrz_classnuc=.false. (stub scheme, ' // & | ||||||
| 'no-op).' | ||||||
| end if | ||||||
| end if | ||||||
|
|
||||||
| end subroutine hetfrz_classnuc_stub_init | ||||||
|
|
||||||
| end module hetfrz_classnuc_stub | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| [ccpp-table-properties] | ||
| name = hetfrz_classnuc_stub | ||
| type = scheme | ||
|
|
||
| [ccpp-arg-table] | ||
| name = hetfrz_classnuc_stub_init | ||
| type = scheme | ||
| [ amIRoot ] | ||
| standard_name = flag_for_mpi_root | ||
| units = flag | ||
| type = logical | ||
| dimensions = () | ||
| intent = in | ||
| [ iulog ] | ||
| standard_name = log_output_unit | ||
| units = 1 | ||
| type = integer | ||
| dimensions = () | ||
| intent = in | ||
| [ use_hetfrz_classnuc ] | ||
| standard_name = do_heterogeneous_ice_nucleation | ||
| units = flag | ||
| type = logical | ||
| dimensions = () | ||
| intent = in | ||
| [ errmsg ] | ||
| standard_name = ccpp_error_message | ||
| units = none | ||
| type = character | kind = len=* | ||
| dimensions = () | ||
| intent = out | ||
| [ errflg ] | ||
| standard_name = ccpp_error_code | ||
| units = 1 | ||
| type = integer | ||
| dimensions = () | ||
| intent = out |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,102 @@ | ||||||
| <?xml version="1.0"?> | ||||||
|
|
||||||
| <?xml-stylesheet type="text/xsl"?> | ||||||
|
|
||||||
| <entry_id_pg version="2.0"> | ||||||
|
|
||||||
|
|
||||||
| <!-- Each namelist variable is defined in an <entry> element. The | ||||||
| content of the element is the documentation of how the variable is | ||||||
| used. Other aspects of the variable's definition are expressed as | ||||||
| attributes of the <entry> element. Note that it is an XML requirement | ||||||
| that the attribute values are enclosed in quotes. The attributes are: | ||||||
|
|
||||||
| id | ||||||
| The variable's name. *** N.B. *** The name must be lower case. | ||||||
| The module convert all namelist variable names to lower case | ||||||
| since Fortran is case insensitive. | ||||||
|
|
||||||
| type | ||||||
| An abbreviation of the fortran declaration for the variable. | ||||||
| Valid declarations are: | ||||||
|
|
||||||
| char*n | ||||||
| integer | ||||||
| logical | ||||||
| real | ||||||
|
|
||||||
| Any of these types may be followed by a comma separated list of | ||||||
| integers enclosed in parenthesis to indicate an array. | ||||||
|
|
||||||
| The current namelist validation code only distinquishes between | ||||||
| string and non-string types. | ||||||
|
|
||||||
| input_pathname | ||||||
| Only include this attribute to indicate that the variable | ||||||
| contains the pathname of an input dataset that resides in the | ||||||
| CESM inputdata directory tree. Note that the variables | ||||||
| containing the names of restart files that are used in branch | ||||||
| runs don't reside in the inputdata tree and should not be given | ||||||
| this attribute. | ||||||
|
|
||||||
| The recognized values are "abs" to indicate that an absolute | ||||||
| pathname is required, or "rel:var_name" to indicate that the | ||||||
| pathname is relative and that the namelist variable "var_name" | ||||||
| contains the absolute root directory. | ||||||
|
|
||||||
| category | ||||||
| A category assigned for organizing the documentation. | ||||||
|
|
||||||
| group | ||||||
| The namelist group that the variable is declared in. | ||||||
|
|
||||||
| valid_values | ||||||
| This is an optional attribute that is mainly useful for variables | ||||||
| that have only a small number of allowed values. It is a | ||||||
| comma-separated list of valid values for the variable. | ||||||
|
|
||||||
| desc | ||||||
| This is a text description of the variable including its | ||||||
| purpose and use. | ||||||
|
|
||||||
| values | ||||||
| This is a grouping of all the cases where a value can be | ||||||
| assigned with the namelist generator has been run. | ||||||
|
|
||||||
| value | ||||||
| Each <value> tag specifies a case where a value is assigned | ||||||
| to this variable when the namelist generator is run. If the | ||||||
| tag has no attributes, it is a default value. In general, | ||||||
| the namelist generator attempts to find a value with the | ||||||
| maximum number of attribute matches (and no non-matches). | ||||||
|
|
||||||
| standard_name | ||||||
| This is the CCPP Standard Name of the variable | ||||||
|
|
||||||
| units | ||||||
| This is the CCPP unit specification of the variable (e.g., m s-1). | ||||||
| --> | ||||||
| <!-- hetfrz configuration options --> | ||||||
|
|
||||||
| <entry id="use_hetfrz_classnuc"> | ||||||
| <type>logical</type> | ||||||
| <category>microphys</category> | ||||||
| <group>hetfrz_classnuc_nl</group> | ||||||
| <standard_name>do_heterogeneous_ice_nucleation</standard_name> | ||||||
| <units>flag</units> | ||||||
| <desc> | ||||||
| Switch to turn on heterogeneous freezing by classical nucleation theory. | ||||||
| Currently a stub in CAM-SIMA: the flag is propagated to downstream schemes | ||||||
| (nucleate_ice_ccpp, eventually PUMAS) but no hetfrz computation is performed. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove
Suggested change
|
||||||
| Setting this to TRUE is supported for snapshot-testing flows where the flag | ||||||
| must match CAM; a warning is emitted at init time. | ||||||
| Default: FALSE; TRUE for CAM6 and CAM7. | ||||||
| </desc> | ||||||
| <values> | ||||||
| <value>.false.</value> | ||||||
| <value phys_suite="cam6">.true.</value> | ||||||
| <value phys_suite="cam7">.true.</value> | ||||||
| </values> | ||||||
| </entry> | ||||||
|
|
||||||
| </entry_id_pg> | ||||||
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.
Just a reminder to add all of the
hetfrz_classnuc_stub.*code to the PR description!