Skip to content
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

Improve log flexibility in HEMCO #298

Draft
wants to merge 23 commits into
base: dev/no-diff-to-benchmark
Choose a base branch
from

Conversation

lizziel
Copy link
Contributor

@lizziel lizziel commented Nov 20, 2024

Name and Institution (Required)

Name: Lizzie Lundgren
Institution: Harvard University

Describe the update

Coming soon

Expected changes

This is a zero diff update for benchmarking. In CESM it enables writing all HEMCO prints to CAM log file atm.log.

Reference(s)

None

Related Github Issue

None

…ng MPI

This update is relevant only for use of HEMCO read routines within
MPI models. It does not impact GCHP.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Default is 6 if not passed to ConfigInit. In GEOS-Chem this corresponds
to standard output. This enables specifying destination other than stdout
or HEMCO.log for HEMCO prints in models. For example, in CESM this allows
printing to atm.log rather than cesm.log (stdout) by using
HcoConfig%outLun in write statements.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
This update allows specifying which log prints in HCO_ERROR, HCO_MSG,
and HCO_WARNING should be printed to if called without passed a HEMCO
Err object.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
…assed

The verb argument is an artifact of when verbose was level rather than
logical. Calling HCO_MSG without the Err object should always result in
a print. This supported by the currently implementation which always
passeas verb=.true. when it is called.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
…sage

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
… open

This removes a check for negative LUN and only looks at logical for if
file is open. CESM uses negative LUN so output should not be directed
to stdout if LUN is negative.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
The CAM log is always open when HEMCO starts in CESM.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
The log file is not closed in CESM. Doing the error summary print where
logfile is closed therefore results in not error summary printed in CESM.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
…_SET

Previously almost all of the type members had initial values also
initializaed in HCO_ERROR_SET which was redundant. Comments explaining
what each field is are now added as well.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Err%LUN is also now initialized to 6 (stdout) if LogFile is *.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
The CESM log file does not need to be opened and closed by HEMCO



Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
There are no remaining instances of calling HCO_Warning without passing
the Err object.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
…uracy

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
This specifies where to write the messages since log information in
the Err object is not used.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
@lizziel lizziel self-assigned this Nov 22, 2024
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant