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

Diag field type #1017

Merged
merged 11 commits into from
Aug 15, 2022
Merged

Conversation

thomas-robinson
Copy link
Member

Description
The redesign of the object oriented Diag Manager. It includes a mediator/controller tohandle all of the public functions for the object oriented stuff.

Fixes #

How Has This Been Tested?

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

Comment on lines 3921 to +3923
CALL diag_yaml_object_init(diag_subset_output)
CALL fms_diag_axis_object_init()
CALL fms_diag_object_init(255, 255) !< TO DO: MAX_LEN_VARNAME and MAX_LEN_META are supposed to be read from
!! the namelist and sent to fms_diag_object
fms_diag_files_object_initialized = fms_diag_files_object_init ()
CALL fms_diag_object%init(diag_subset_output)
Copy link
Contributor

@uramirez8707 uramirez8707 Aug 11, 2022

Choose a reason for hiding this comment

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

This initializes the yaml twice. Once in L3921 and then inside CALL fms_diag_object%init(diag_subset_output)
call diag_yaml_object_init(diag_subset_output) needs to be remove

Copy link
Member Author

Choose a reason for hiding this comment

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

A module initialized was added to the yaml module so that it doesn';t crash. The code needs to be rearranged so that the diag object handles the inialization of the yaml and the axis objects.

Copy link
Contributor

@ngs333 ngs333 left a comment

Choose a reason for hiding this comment

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

Very good. Some of my comments are intended for discussion.

diag_manager/fms_diag_object.F90 Show resolved Hide resolved
logical, private :: axes_initialized=.false. !< True if the fmsDiagObject is initialized

contains
procedure :: init => fms_diag_object_init
Copy link
Contributor

Choose a reason for hiding this comment

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

More musings on procedure names: Should we consider "type bound procedures" as just that? So "fms_diag_obj_init" is bound to type fmsDiagObj_type? The in "fms_diag_obj_init" name, the "fms" is redundant; and so is the "diag_obj". We can use the in_class declaration init => init_imp; where "_imp" stands for implementation? Also, it it possible for the "init" above to be public, wheres the "init_imp" is private? That is, we want the clients to call init, never the init_imp.

Copy link
Member Author

Choose a reason for hiding this comment

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

We will make the actual functions private so that users can only call the type bound procedures

diag_manager/fms_diag_field_object.F90 Show resolved Hide resolved
diag_manager/fms_diag_field_object.F90 Outdated Show resolved Hide resolved
@rem1776 rem1776 mentioned this pull request Aug 15, 2022
8 tasks
@thomas-robinson thomas-robinson merged commit fd634d1 into NOAA-GFDL:dmUpdate Aug 15, 2022
rem1776 pushed a commit to rem1776/FMS that referenced this pull request May 1, 2024
rem1776 pushed a commit to rem1776/FMS that referenced this pull request May 1, 2024
rem1776 pushed a commit to rem1776/FMS that referenced this pull request May 1, 2024
rem1776 pushed a commit to rem1776/FMS that referenced this pull request May 1, 2024
rem1776 pushed a commit to rem1776/FMS that referenced this pull request May 1, 2024
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