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

add run-time and history-write logging for ufs #63

Closed

Conversation

DeniseWorthen
Copy link
Collaborator

@DeniseWorthen DeniseWorthen commented Aug 23, 2023

Add two types of logging files for use by UFS within the CICE cap:

  1. run-time logging to measure performance for UFS. The timing information is written to log.ice.timer. The feature is enabled using a configuration attribute RunTimeLog = true, otherwise no logging will be performed.
  2. history-write logging to provide a file for the initiation of post-processing jobs in the global-workflow. The file written for forecast hour HHH is log.ice.fHHH.

required by ufs-community/ufs-weather-model#1367
resolves - #57

The logging is added inside cice_wrapper_mod code, mimicking what is currently done for the perf_mod calls for CESM (t_startf etc).

Copy link

@apcraig apcraig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks reasonable to me. All changes are in the nuopc/cmeps driver, so don't affect CICE in general. I guess I do wonder whether the CICE timers could have been used rather than creating yet another timer library. Maybe CICE needs to add some additional flexibility and/or features?

@DeniseWorthen
Copy link
Collaborator Author

@apcraig Thanks. We definitely didn't consider the feasibility of using CICE timers here. The approach has been duplicating the same calls w/in all the caps used by UFS so we knew we had the same basic measures in each case.

@apcraig
Copy link

apcraig commented Aug 23, 2023

@DeniseWorthen. I totally understand. Another idea would be to have a common set of time methods in some UFS share code? What's done here is quick, easy, and has limited flexibility. And I guess it's duplicated in all components. There are pluses and minuses. Thanks.

Copy link

@dabail10 dabail10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks fine. Do we need some ifdefs here? I see you've added some.

@DeniseWorthen
Copy link
Collaborator Author

Hi Dave. Thanks. I've avoided using ifdefs by modifying the cice_wrapper_mod.F90 instead. When compiled with 'ifdef CESMCOUPLED', then the "ufs" calls will just be stubs. I was most worried about uninitialized variables when used w/ CESM, but I did test for how it would work when CEMSCOUPLED was set in the wrapper and it passed our debug compile/run test.

Copy link

@dabail10 dabail10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see. I had not looked at cice_wrapper_mod before. Works for me.

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.

4 participants