Skip to content

Adding flexibility to choose the time string suffix for output file names#660

Merged
rem1776 merged 6 commits into
NOAA-GFDL:release/2020.04from
uramirez8707:diag_manager_fix
Jan 20, 2021
Merged

Adding flexibility to choose the time string suffix for output file names#660
rem1776 merged 6 commits into
NOAA-GFDL:release/2020.04from
uramirez8707:diag_manager_fix

Conversation

@uramirez8707

@uramirez8707 uramirez8707 commented Jan 11, 2021

Copy link
Copy Markdown
Contributor

Description
This PR allows the user to change the time used to set the filename when history files are written periodically using the diag_table.

The allowed options are "begin", "middle", and "end". If no option is present the default, "middle", will be used.

Fixes #626

How Has This Been Tested?
Passes diag_manager unit test.

"ocn_middle%4yr%2mo%2dy%2hr", 6, "hours", 1, "hours", "time", 6, "hours", "2 1 1 0 0 0", 0, "", "middle"
generates the files:
ocn_middle_0002_01_01_03.nc for time_bnds [0,6]
ocn_middle_0002_01_01_09.nc for time_bnds [6,12]
ocn_middle_0002_01_01_15.nc for time_bnds [12,18]

"ocn_begin%4yr%2mo%2dy%2hr", 6, "hours", 1, "hours", "time", 6, "hours", "2 1 1 0 0 0" 0, "", "begin"
generates the files:
ocn_begin_0002_01_01_00.nc for time_bnds [0,6]
ocn_begin_0002_01_01_06.nc for time_bnds [6,12]
ocn_begin_0002_01_01_12.nc for time_bnds [12,18]

"ocn_end%4yr%2mo%2dy%2hr", 6, "hours", 1, "hours", "time", 6, "hours", "2 1 1 0 0 0" 0, "", "end"
generates the files:
ocn_end_0002_01_01_06.nc for time_bnds [0,6]
ocn_end_0002_01_01_12.nc for time_bnds [6,12]
ocn_end_0002_01_01_18.nc for time_bnds [12,18]

"ocn_default%4yr%2mo%2dy%2hr", 6, "hours", 1, "hours", "time", 6, "hours", "2 1 1 0 0 0"
generates the files:
ocn_default_0002_01_01_03.nc for time_bnds [0,6]
ocn_default_0002_01_01_09.nc for time_bnds [6,12]
ocn_default_0002_01_01_15.nc for time_bnds [12,18]

AM4.1 runs with intel/debug on gaea still work.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included
  • make distcheck passes

@uramirez8707 uramirez8707 marked this pull request as ready for review January 11, 2021 15:08
@uramirez8707 uramirez8707 marked this pull request as draft January 11, 2021 17:09
@uramirez8707 uramirez8707 marked this pull request as ready for review January 19, 2021 14:55
@mlee03

mlee03 commented Jan 19, 2021

Copy link
Copy Markdown
Contributor

@uramirez8707, the ocn*.nc files are named as expected following your diag_table specifications.

@rem1776 rem1776 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@mlee03 @uramirez8707 Is this the last thing needed for 2020.04.01?

@uramirez8707

Copy link
Copy Markdown
Contributor Author

@rem1776 Yes, this is the last, last thing.

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.

3 participants