From 4e9c9bd472a398e1b84883d7c79f88e7d86e4f56 Mon Sep 17 00:00:00 2001 From: Niki Zadeh Date: Wed, 17 Oct 2018 17:06:55 -0400 Subject: [PATCH] Add missing logical condition for v_extensive Branch should be taken only if v_extensive is present AND .true., per conversation with @adcroft . --- src/framework/MOM_diag_mediator.F90 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/framework/MOM_diag_mediator.F90 b/src/framework/MOM_diag_mediator.F90 index a4c1787855..d529315459 100644 --- a/src/framework/MOM_diag_mediator.F90 +++ b/src/framework/MOM_diag_mediator.F90 @@ -1786,6 +1786,7 @@ subroutine attach_cell_methods(id, axes, ostring, cell_methods, & ostring = trim(adjustl(ostring))//' '//trim(axis_name)//':'//trim(v_cell_method) endif elseif (present(v_extensive)) then + if(v_extensive) then if (axes%rank==1) then call get_diag_axis_name(axes%handles(1), axis_name) elseif (axes%rank==3) then @@ -1793,6 +1794,7 @@ subroutine attach_cell_methods(id, axes, ostring, cell_methods, & endif call diag_field_add_attribute(id, 'cell_methods', trim(axis_name)//':sum') ostring = trim(adjustl(ostring))//' '//trim(axis_name)//':sum' + endif else if (len(trim(axes%v_cell_method))>0) then if (axes%rank==1) then