Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions diag_manager/fms_diag_yaml.F90
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ module fms_diag_yaml_mod
public :: diagYamlObject_type, get_diag_yaml_obj, subRegion_type
public :: diagYamlFiles_type, diagYamlFilesVar_type
public :: get_num_unique_fields, find_diag_field, get_diag_fields_entries, get_diag_files_id
public :: get_diag_field_ids
public :: dump_diag_yaml_obj
!> @}

Expand Down Expand Up @@ -1457,6 +1458,22 @@ function get_diag_fields_entries(indices) &

end function get_diag_fields_entries

!> @brief Gets field indices corresponding to the indices (input argument) in the sorted variable_list
!! @return Copy of array of field indices
function get_diag_field_ids(indices) result(field_ids)

integer, intent(in) :: indices(:) !< Indices of the fields in the sorted variable_list array
integer, allocatable :: field_ids(:)
integer :: i !< For do loop

allocate(field_ids(size(indices)))

do i = 1, size(indices)
field_ids(i) = variable_list%diag_field_indices(indices(i))
end do

end function get_diag_field_ids

!> @brief Finds the indices of the diag_yaml%diag_files(:) corresponding to fields in variable_list(indices)
!! @return indices of the diag_yaml%diag_files(:)
function get_diag_files_id(indices) &
Expand Down