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

Modern_diag_manager:: 0 days freq, mix_snapshot_average_fields deprecation #1500

Merged
merged 4 commits into from
May 9, 2024

Conversation

uramirez8707
Copy link
Contributor

@uramirez8707 uramirez8707 commented Apr 26, 2024

Description

  • Implement the freq=0 days capability into the new diag manager
  • Crash if you try to have averaged fields when the freq=-1 days or 0 days
  • Crash if mix_snapshot_average_fields=.true. for the new diag manager
  • Crash if mixing averaged and non-averaged fields in the same file
  • Adds tests

Fixes #1498
Fixes #1499

How Has This Been Tested?
CI, including new tests

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 changed the title Modern_diag_manager:: 0 days freq Modern_diag_manager:: 0 days freq, mix_snapshot_average_fields deprecation May 2, 2024
@rem1776 rem1776 changed the base branch from dmUpdate to main May 7, 2024 13:34
@rem1776 rem1776 requested review from rem1776 and bensonr as code owners May 7, 2024 13:34
rem1776
rem1776 previously approved these changes May 9, 2024
@@ -94,7 +94,7 @@ module fms_diag_file_object_mod
integer :: number_of_axis !< Number of axis in the file
integer, dimension(:), allocatable :: buffer_ids !< array of buffer ids associated with the file
integer :: number_of_buffers !< Number of buffers that have been added to the file
logical :: time_ops !< .True. if file contains variables that are time_min, time_max, time_average or time_sum
logical, allocatable :: time_ops !< .True. if file contains variables that are time_min, time_max, time_average or time_sum
Copy link
Contributor

Choose a reason for hiding this comment

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

this is getting flagged by the linter since its over the character limit

@@ -850,7 +851,7 @@ subroutine fms_diag_do_io(this, end_time)
! Go away if there is no data to write
if (.not. diag_buff%is_there_data_to_write()) cycle

if ( diag_buff%is_time_to_finish_reduction(end_time)) then
if ( diag_buff%is_time_to_finish_reduction(end_time) .and. .not. do_not_write) then
Copy link
Member

Choose a reason for hiding this comment

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

ahhh a double negative

@rem1776 rem1776 merged commit c422d44 into NOAA-GFDL:main May 9, 2024
18 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants