Skip to content

Commit

Permalink
Merge branch 'dmUpdate' of github.com:NOAA-GFDL/FMS into allocate_buff
Browse files Browse the repository at this point in the history
  • Loading branch information
uramirez8707 committed Aug 1, 2023
2 parents 0dfe62f + bfe4cad commit 68a5475
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions diag_manager/fms_diag_file_object.F90
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ module fms_diag_file_object_mod

contains
procedure, public :: add_field_and_yaml_id
procedure, public :: add_buffer_ids
procedure, public :: add_buffer_id
procedure, public :: is_field_registered
procedure, public :: init_diurnal_axis
procedure, public :: has_file_metadata_from_model
Expand Down Expand Up @@ -292,15 +292,15 @@ subroutine add_field_and_yaml_id (this, new_field_id, yaml_id)
endif
end subroutine add_field_and_yaml_id

!> \brief Adds a field and yaml ID to the file
subroutine add_buffer_ids (this, buffer_id)
!> \brief Adds a buffer_id to the file object
subroutine add_buffer_id (this, buffer_id)
class(fmsDiagFile_type), intent(inout) :: this !< The file object
integer, intent(in) :: buffer_id !< Buffer id to add to the file

this%number_of_buffers = this%number_of_buffers + 1
this%buffer_ids(this%number_of_buffers) = buffer_id

end subroutine add_buffer_ids
end subroutine add_buffer_id

!> \brief Initializes a diurnal axis for a fileobj
!! \note This is going to be called for every variable in the file, if the variable is not a diurnal variable
Expand Down
8 changes: 4 additions & 4 deletions diag_manager/fms_diag_object.F90
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ integer function fms_register_diag_field_obj &
do i = 1, size(file_ids)
fileptr => this%FMS_diag_files(file_ids(i))%FMS_diag_file
call fileptr%add_field_and_yaml_id(fieldptr%get_id(), diag_field_indices(i))
call fileptr%add_buffer_ids(fieldptr%buffer_ids(i))
call fileptr%add_buffer_id(fieldptr%buffer_ids(i))
call fileptr%set_file_domain(fieldptr%get_domain(), fieldptr%get_type_of_domain())
call fileptr%init_diurnal_axis(this%diag_axis, this%registered_axis, diag_field_indices(i))
call fileptr%add_axes(axes, this%diag_axis, this%registered_axis, diag_field_indices(i), &
Expand All @@ -259,7 +259,7 @@ integer function fms_register_diag_field_obj &
do i = 1, size(file_ids)
fileptr => this%FMS_diag_files(file_ids(i))%FMS_diag_file
call fileptr%add_field_and_yaml_id(fieldptr%get_id(), diag_field_indices(i))
call fileptr%add_buffer_ids(fieldptr%buffer_ids(i))
call fileptr%add_buffer_id(fieldptr%buffer_ids(i))
call fileptr%init_diurnal_axis(this%diag_axis, this%registered_axis, diag_field_indices(i))
call fileptr%set_file_domain(fieldptr%get_domain(), fieldptr%get_type_of_domain())
call fileptr%add_axes(axes, this%diag_axis, this%registered_axis, diag_field_indices(i), &
Expand All @@ -270,15 +270,15 @@ integer function fms_register_diag_field_obj &
do i = 1, size(file_ids)
fileptr => this%FMS_diag_files(file_ids(i))%FMS_diag_file
call fileptr%add_field_and_yaml_id(fieldptr%get_id(), diag_field_indices(i))
call fileptr%add_buffer_ids(fieldptr%buffer_ids(i))
call fileptr%add_buffer_id(fieldptr%buffer_ids(i))
call fileptr%add_start_time(init_time, this%current_model_time)
call fileptr%set_file_time_ops (fieldptr%diag_field(i), fieldptr%is_static())
enddo
else !no axis or init time present
do i = 1, size(file_ids)
fileptr => this%FMS_diag_files(file_ids(i))%FMS_diag_file
call fileptr%add_field_and_yaml_id(fieldptr%get_id(), diag_field_indices(i))
call fileptr%add_buffer_ids(fieldptr%buffer_ids(i))
call fileptr%add_buffer_id(fieldptr%buffer_ids(i))
call fileptr%set_file_time_ops (fieldptr%diag_field(i), fieldptr%is_static())
enddo
endif
Expand Down

0 comments on commit 68a5475

Please sign in to comment.