Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
e401fdf
Diagnostic regridding for zstar, sigma and rho vertical coordinates. …
Jul 7, 2016
df6cd17
Correct available_diags for vertically remapped diagnostics. #334
nichannah Jul 20, 2016
5240529
Extend vertical remapping to handle SLIGHT and HYCOM1. #334
nichannah Jul 20, 2016
c3ce7bc
Use conversion=GV%H_to_kg_m2 for umo,vmo diagnostics
adcroft Sep 5, 2016
b0a60b8
Re-factor of MOM_diag_mediator + cell_methods fix
adcroft Sep 5, 2016
54b5724
Re-factor of diag_mediator: removed functions is_u_axes, is_v_axes, ...
adcroft Sep 6, 2016
11141a2
Implemented z-coordinate diagnostics of interface variables
adcroft Sep 6, 2016
bfd21a4
Implemented remapped diagnostics of vertically extrinsic fields
adcroft Sep 7, 2016
3a7efe5
Labeled some diagnostics as vertically integrated by layer
adcroft Sep 7, 2016
ccdc9b6
Doxygenized assert()
adcroft Sep 8, 2016
b77344b
Clarification: renamed vector of diag_remap to diag_remap_cs
adcroft Sep 8, 2016
4804926
Added axes_groups for each diagnostic coordinate
adcroft Sep 8, 2016
9338ee5
Clarification: renamed diag_type%axes to diag_type%axes_ids
adcroft Sep 8, 2016
d393a08
Re-introduced name "Z*" for ZSTAR coordinate mode
adcroft Sep 8, 2016
0816589
Merge branch 'user/aja/diag_interp_and_extrinsic' into nicjhan-334-rh…
adcroft Sep 9, 2016
47c82b8
Fixed reintegrate_column() for missing data cases
adcroft Sep 9, 2016
1f0a1d7
Renamed old diag-to-z diagnostics module
adcroft Sep 9, 2016
73207b5
Merge pull request #1 from adcroft/user/aja/diag_interp_and_extrinsic
Sep 20, 2016
f059eb5
Remove unused code and add/improve comments after aja/diag_interp_and…
Sep 20, 2016
3ee3dac
Merge branch 'dev/master' into 334-rho-sigma-diagnostic-regridding
Oct 27, 2016
3bd0add
Better diagnostic debugging and fixed subroutine name for correctness…
Nov 1, 2016
b1b2381
Improved checking for vertical grid definition input, also layer var …
Nov 1, 2016
fc6942f
Don't pass temporary axes variable to register_diag_field(). #334.
Nov 1, 2016
604540b
Compiler error: fix dummy argument intent. #334
Nov 1, 2016
7bb14ed
Whitespace and formatting fixes. #334
Nov 1, 2016
1057172
Whitespace and comment fixes. #334.
Nov 1, 2016
42670b4
Change names of several old z coord diags to be the same as regular d…
Nov 1, 2016
593de0a
Add some masking for vertically remapped diags based on on bathymetry…
Nov 2, 2016
2072bfe
Merge dev/master fixing conflicts. #334.
Nov 2, 2016
fdb4caf
Fix merge mistake. #334
Nov 2, 2016
8fb94a2
Variable renaming, whitespace and documentation. #334
Nov 4, 2016
32586a4
Diagnostic vertical remapping performance improvement. Only activate …
Nov 4, 2016
caf702d
Whitespace changes. #334
Nov 7, 2016
b701b8b
Fix masking for vertically remapped diagnostics. #334
Nov 7, 2016
e4e167a
Merge branch 'dev/master' into 334-rho-sigma-diagnostic-regridding
Nov 17, 2016
bd1028e
Allow DIAG_REMAP_Z_GRID_DEF to use old protocol
adcroft Nov 11, 2016
4493464
Reduce references to external parameter vertical_coord_strings
adcroft Nov 18, 2016
9fac48a
Reduced available coords for diags
adcroft Nov 18, 2016
78fdc73
Removed out-of-date error checking in MOM_diag_to_Z
adcroft Nov 19, 2016
9fb5f33
Added arbitrary number of diagnostic coordinates, NUM_DIAG_COORDS
adcroft Nov 20, 2016
e6385f7
Updated ALE_initRegridding API
adcroft Nov 21, 2016
c6db899
Separated ALE_initRegridding into re-usable parts
adcroft Nov 21, 2016
d0cdda0
Hide unused coordinate config parameters, pt 1
adcroft Nov 22, 2016
d4361f3
Hide interp_scheme when not needed, pt 2
adcroft Nov 22, 2016
7608654
Overloaded regrid_consts:state_dependent()
adcroft Nov 22, 2016
0640a80
Added extract_integer() to MOM_string_functions
adcroft Nov 23, 2016
599044d
Re-factor of regrid initialization, pt 1
adcroft Nov 23, 2016
1bc03d8
Moved reading of regridding parameters into MOM_regridding.F90
adcroft Nov 24, 2016
a323495
Changed default DIAG_COORD_Z grid to be WOA09 for deep configurations
adcroft Nov 24, 2016
0d8783a
Fix conflict with dimension names in diag_manager
adcroft Nov 24, 2016
043345e
Extended "UNIFORM" syntax to UNIFORM[:N[,dz]]
adcroft Nov 24, 2016
8acebf1
Cleaned up diag_remap_configure_axes() arguments
adcroft Nov 24, 2016
b726404
Minor re-factor to insert new layer in register_diag hierarchy
adcroft Nov 24, 2016
c71fe83
Fixed masking for _z remapped diagnostics
adcroft Nov 25, 2016
6fae7f7
Added _xyave to all remapped diagnostics
adcroft Nov 25, 2016
58b26a0
Remove support for diagnostic horizontal averaging on Z interfaces. #334
nichannah Nov 28, 2016
c32946c
Fix subroutine name in error string. #334
nichannah Nov 28, 2016
3aa0e78
Fix "edges" attribute for dimension variable in z-diag output
adcroft Nov 29, 2016
ff858c7
Corrected variable names (changed extrinsic to extensive)
adcroft Nov 29, 2016
5bd2cfc
Implemented xy-averaged diagnostics for interface data
adcroft Nov 30, 2016
fd533dc
Added draft of Diagnostics page
adcroft Nov 30, 2016
90d31ed
Moved to flat (no subdirs) mode for doxygen
adcroft Nov 30, 2016
b1ed87f
Merge branch 'dev/master' into nicjhan-334-rho-sigma-diagnostic-regri…
adcroft Dec 1, 2016
360fb36
Moved umo,vmo to MOM.F90 and based on uhtr,vhtr
adcroft Dec 7, 2016
c838594
Re-enable support for diagnostic horizonal averaging on Z interfaces …
nichannah Dec 8, 2016
a4031da
Fix variable intent compilation error in dev/master. #334
nichannah Dec 8, 2016
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
2 changes: 1 addition & 1 deletion .doxygen
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ OUTPUT_DIRECTORY =
# performance problems for the file system.
# The default value is: NO.

CREATE_SUBDIRS = YES
CREATE_SUBDIRS = NO

# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
# characters to appear in the names of generated files. If set to NO, non-ASCII
Expand Down
387 changes: 12 additions & 375 deletions src/ALE/MOM_ALE.F90

Large diffs are not rendered by default.

675 changes: 597 additions & 78 deletions src/ALE/MOM_regridding.F90

Large diffs are not rendered by default.

73 changes: 60 additions & 13 deletions src/ALE/regrid_consts.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,50 @@ module regrid_consts

implicit none ; public

! List of regridding types
integer, parameter :: REGRIDDING_LAYER = -1 !< Layer mode
integer, parameter :: REGRIDDING_ZSTAR = 0 !< z* coordinates
integer, parameter :: REGRIDDING_RHO = 1 !< Target interface densities
integer, parameter :: REGRIDDING_SIGMA = 2 !< Sigma coordinates
integer, parameter :: REGRIDDING_ARBITRARY = 3 !< Arbitrary coordinates
integer, parameter :: REGRIDDING_HYCOM1 = 4 !< Simple HyCOM coordinates without BBL
integer, parameter :: REGRIDDING_SLIGHT = 5 !< Stretched coordinates in the
integer, parameter :: REGRIDDING_NUM_TYPES = 2

! List of regridding types. These should be consecutive and starting at 1.
! This allows them to be used as array indices.
integer, parameter :: REGRIDDING_LAYER = 1 !< Layer mode
integer, parameter :: REGRIDDING_ZSTAR = 2 !< z* coordinates
integer, parameter :: REGRIDDING_RHO = 3 !< Target interface densities
integer, parameter :: REGRIDDING_SIGMA = 4 !< Sigma coordinates
integer, parameter :: REGRIDDING_ARBITRARY = 5 !< Arbitrary coordinates
integer, parameter :: REGRIDDING_HYCOM1 = 6 !< Simple HyCOM coordinates without BBL
integer, parameter :: REGRIDDING_SLIGHT = 7 !< Stretched coordinates in the
!! lightest water, isopycnal below
character(len=5), parameter :: REGRIDDING_LAYER_STRING = "LAYER" !< Layer string
character(len=2), parameter :: REGRIDDING_ZSTAR_STRING = "Z*" !< z* string
character(len=3), parameter :: REGRIDDING_RHO_STRING = "RHO" !< Rho string
character(len=5), parameter :: REGRIDDING_SIGMA_STRING = "SIGMA" !< Sigma string
character(len=6), parameter :: REGRIDDING_LAYER_STRING = "LAYER" !< Layer string
character(len=6), parameter :: REGRIDDING_ZSTAR_STRING_OLD = "Z*" !< z* string (legacy name)
character(len=6), parameter :: REGRIDDING_ZSTAR_STRING = "ZSTAR" !< z* string
character(len=6), parameter :: REGRIDDING_RHO_STRING = "RHO" !< Rho string
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm curious about why are you changed the declared string lengths to not match the string? I think it's a harmless change but was there a failure somewhere?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think I did that because I put these into an array below. My understanding is that Fortran doesn't like having variable length strings in an array. I'll add a comment.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I see that now. I'm surprised that character(len=*), dimension(n), parameter = works - I would have thought the * is at odds with the parameter...

character(len=6), parameter :: REGRIDDING_SIGMA_STRING = "SIGMA" !< Sigma string
character(len=6), parameter :: REGRIDDING_ARBITRARY_STRING = "ARB" !< Arbitrary coordinates
character(len=6), parameter :: REGRIDDING_HYCOM1_STRING = "HYCOM1" !< Hycom string
character(len=6), parameter :: REGRIDDING_SLIGHT_STRING = "SLIGHT" !< Hybrid S-rho string
character(len=5), parameter :: DEFAULT_COORDINATE_MODE = REGRIDDING_LAYER_STRING !< Default coordinate mode
character(len=6), parameter :: DEFAULT_COORDINATE_MODE = REGRIDDING_LAYER_STRING !< Default coordinate mode

integer, dimension(REGRIDDING_NUM_TYPES), parameter :: vertical_coords = &
(/ REGRIDDING_LAYER, REGRIDDING_ZSTAR /)
!(/ REGRIDDING_LAYER, REGRIDDING_ZSTAR, REGRIDDING_RHO, &
! REGRIDDING_SIGMA, REGRIDDING_ARBITRARY, &
! REGRIDDING_HYCOM1, REGRIDDING_SLIGHT /)

character(len=*), dimension(REGRIDDING_NUM_TYPES), parameter :: vertical_coord_strings = &
(/ REGRIDDING_LAYER_STRING, REGRIDDING_ZSTAR_STRING /)
!(/ REGRIDDING_LAYER_STRING, REGRIDDING_ZSTAR_STRING, REGRIDDING_RHO_STRING, &
! REGRIDDING_SIGMA_STRING, REGRIDDING_ARBITRARY_STRING, &
! REGRIDDING_HYCOM1_STRING, REGRIDDING_SLIGHT_STRING /)

interface coordinateUnits
module procedure coordinateUnitsI
module procedure coordinateUnitsS
end interface

interface state_dependent
module procedure state_dependent_char
module procedure state_dependent_int
end interface

contains

!> Parse a string parameter specifying the coordinate mode and
Expand All @@ -40,10 +62,12 @@ function coordinateMode(string)
select case ( uppercase(trim(string)) )
case (trim(REGRIDDING_LAYER_STRING)); coordinateMode = REGRIDDING_LAYER
case (trim(REGRIDDING_ZSTAR_STRING)); coordinateMode = REGRIDDING_ZSTAR
case (trim(REGRIDDING_ZSTAR_STRING_OLD)); coordinateMode = REGRIDDING_ZSTAR
case (trim(REGRIDDING_RHO_STRING)); coordinateMode = REGRIDDING_RHO
case (trim(REGRIDDING_SIGMA_STRING)); coordinateMode = REGRIDDING_SIGMA
case (trim(REGRIDDING_HYCOM1_STRING)); coordinateMode = REGRIDDING_HYCOM1
case (trim(REGRIDDING_SLIGHT_STRING)); coordinateMode = REGRIDDING_SLIGHT
case (trim(REGRIDDING_ARBITRARY_STRING)); coordinateMode = REGRIDDING_ARBITRARY
case default ; call MOM_error(FATAL, "coordinateMode: "//&
"Unrecognized choice of coordinate ("//trim(string)//").")
end select
Expand Down Expand Up @@ -76,4 +100,27 @@ function coordinateUnitsS(string)
coordinateUnitsS = coordinateUnitsI(coordMode)
end function coordinateUnitsS

!> Returns true if the coordinate is dependent on the state density, returns false otherwise.
logical function state_dependent_char(string)
character(len=*), intent(in) :: string !< String to indicate coordinate mode

state_dependent_char = state_dependent_int( coordinateMode(string) )

end function state_dependent_char

!> Returns true if the coordinate is dependent on the state density, returns false otherwise.
logical function state_dependent_int(mode)
integer, intent(in) :: mode !< Coordinate mode
select case ( mode )
case (REGRIDDING_LAYER); state_dependent_int = .true.
case (REGRIDDING_ZSTAR); state_dependent_int = .false.
case (REGRIDDING_RHO); state_dependent_int = .true.
case (REGRIDDING_SIGMA); state_dependent_int = .false.
case (REGRIDDING_HYCOM1); state_dependent_int = .true.
case (REGRIDDING_SLIGHT); state_dependent_int = .true.
case default ; call MOM_error(FATAL, "state_dependent: "//&
"Unrecognized choice of coordinate.")
end select
end function state_dependent_int

end module regrid_consts
86 changes: 64 additions & 22 deletions src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module MOM
use MOM_diag_mediator, only : diag_mediator_init, enable_averaging
use MOM_diag_mediator, only : diag_mediator_infrastructure_init
use MOM_diag_mediator, only : diag_register_area_ids
use MOM_diag_mediator, only : diag_set_thickness_ptr, diag_update_target_grids
use MOM_diag_mediator, only : diag_set_state_ptrs, diag_update_remap_grids
use MOM_diag_mediator, only : disable_averaging, post_data, safe_alloc_ptr
use MOM_diag_mediator, only : register_diag_field, register_static_field
use MOM_diag_mediator, only : register_scalar_field
Expand Down Expand Up @@ -356,8 +356,8 @@ module MOM
integer :: id_e_preale = -1

! Diagnostics for tracer horizontal transport
integer :: id_uhtr = -1
integer :: id_vhtr = -1
integer :: id_uhtr = -1, id_umo = -1, id_umo_2d = 1
integer :: id_vhtr = -1, id_vmo = -1, id_vmo_2d = 1

! The remainder provides pointers to child module control structures.
type(MOM_dyn_unsplit_CS), pointer :: dyn_unsplit_CSp => NULL()
Expand Down Expand Up @@ -485,7 +485,8 @@ subroutine step_MOM(fluxes, state, Time_start, time_interval, CS)
h ! h : layer thickness (meter (Bouss) or kg/m2 (non-Bouss))

real, dimension(SZI_(CS%G),SZJ_(CS%G),SZK_(CS%G)+1) :: eta_predia, eta_preale

real, dimension(SZIB_(CS%G), SZJ_(CS%G)) :: umo2d ! Diagnostics
real, dimension(SZI_(CS%G), SZJB_(CS%G)) :: vmo2d ! Diagnostics

real :: tot_wt_ssh, Itot_wt_ssh, I_time_int
real :: zos_area_mean, volo, ssh_ga
Expand Down Expand Up @@ -766,7 +767,7 @@ subroutine step_MOM(fluxes, state, Time_start, time_interval, CS)

! Whenever thickness changes let the diag manager know, target grids
! for vertical remapping may need to be regenerated.
call diag_update_target_grids(CS%diag)
call diag_update_remap_grids(CS%diag)

call post_diags_TS_vardec(G, CS, dtdia)

Expand Down Expand Up @@ -848,7 +849,7 @@ subroutine step_MOM(fluxes, state, Time_start, time_interval, CS)

! Whenever thickness changes let the diag manager know, target grids
! for vertical remapping may need to be regenerated.
call diag_update_target_grids(CS%diag)
call diag_update_remap_grids(CS%diag)

endif
endif
Expand Down Expand Up @@ -969,7 +970,7 @@ subroutine step_MOM(fluxes, state, Time_start, time_interval, CS)

! Whenever thickness changes let the diag manager know, target grids
! for vertical remapping may need to be regenerated.
call diag_update_target_grids(CS%diag)
call diag_update_remap_grids(CS%diag)

if (CS%useMEKE) call step_forward_MEKE(CS%MEKE, h, CS%VarMix%SN_u, CS%VarMix%SN_v, &
CS%visc, dt, G, GV, CS%MEKE_CSp, CS%uhtr, CS%vhtr)
Expand Down Expand Up @@ -1116,7 +1117,7 @@ subroutine step_MOM(fluxes, state, Time_start, time_interval, CS)
! Whenever thickness changes let the diag manager know, target grids
! for vertical remapping may need to be regenerated. This needs to
! happen after the H update and before the next post_data.
call diag_update_target_grids(CS%diag)
call diag_update_remap_grids(CS%diag)

call post_diags_TS_vardec(G, CS, CS%dt_trans)

Expand Down Expand Up @@ -1208,6 +1209,32 @@ subroutine step_MOM(fluxes, state, Time_start, time_interval, CS)

if (CS%id_uhtr > 0) call post_data(CS%id_uhtr, CS%uhtr, CS%diag)
if (CS%id_vhtr > 0) call post_data(CS%id_vhtr, CS%vhtr, CS%diag)
if (CS%id_umo_2d > 0) then
umo2d(:,:) = CS%uhtr(:,:,1)
do k = 2, nz
umo2d(:,:) = umo2d(:,:) + CS%uhtr(:,:,k)
enddo
umo2d(:,:) = umo2d(:,:) * ( GV%H_to_kg_m2 / CS%dt_trans )
call post_data(CS%id_umo, umo2d, CS%diag)
endif
if (CS%id_umo > 0) then
! Convert to kg/s. Modifying the array for diagnostics is allowed here since it is set to zero immediately below
CS%uhtr(:,:,:) = CS%uhtr(:,:,:) * ( GV%H_to_kg_m2 / CS%dt_trans )
call post_data(CS%id_umo, CS%uhtr, CS%diag)
endif
if (CS%id_vmo_2d > 0) then
vmo2d(:,:) = CS%vhtr(:,:,1)
do k = 2, nz
vmo2d(:,:) = vmo2d(:,:) + CS%vhtr(:,:,k)
enddo
vmo2d(:,:) = vmo2d(:,:) * ( GV%H_to_kg_m2 / CS%dt_trans )
call post_data(CS%id_vmo, vmo2d, CS%diag)
endif
if (CS%id_vmo > 0) then
! Convert to kg/s. Modifying the array for diagnostics is allowed here since it is set to zero immediately below
CS%uhtr(:,:,:) = CS%uhtr(:,:,:) * ( GV%H_to_kg_m2 / CS%dt_trans )
call post_data(CS%id_vmo, CS%vhtr, CS%diag)
endif

call post_diags_TS_tendency(G,GV,CS,dtdia)

Expand Down Expand Up @@ -2538,17 +2565,18 @@ subroutine initialize_MOM(Time, param_file, dirs, CS, Time_in, offline_tracer_mo
! and before MOM_diagnostics_init
call diag_masks_set(G, GV%ke, CS%missing, diag)

! Set up a pointers h within diag mediator control structure,
! this needs to occur _after_ CS%h has been allocated.
call diag_set_thickness_ptr(CS%h, diag)
! Set up pointers within diag mediator control structure,
! this needs to occur _after_ CS%h etc. have been allocated.
call diag_set_state_ptrs(CS%h, CS%T, CS%S, CS%tv%eqn_of_state, diag)

! This call sets up the diagnostic axes. These are needed,
! e.g. to generate the target grids below.
call set_axes_info(G, GV, param_file, diag)

! Whenever thickness changes let the diag manager know, target grids
! for vertical remapping may need to be regenerated.
call diag_update_target_grids(diag)
! Whenever thickness/T/S changes let the diag manager know, target grids
! for vertical remapping may need to be regenerated.
! FIXME: are h, T, S updated at the same time? Review these for T, S updates.
call diag_update_remap_grids(diag)

! Diagnose static fields AND associate areas/volumes with axes
call write_static_fields(G, CS%diag)
Expand Down Expand Up @@ -2820,7 +2848,7 @@ subroutine register_diags(Time, G, GV, CS, ADp)
'Meridional velocity', 'meter second-1', cmor_field_name='vo', cmor_units='m s-1', &
cmor_standard_name='sea_water_y_velocity', cmor_long_name='Sea Water Y Velocity')
CS%id_h = register_diag_field('ocean_model', 'h', diag%axesTL, Time, &
'Layer Thickness', thickness_units, v_cell_method='sum')
'Layer Thickness', thickness_units, v_extensive=.true.)

CS%id_volo = register_scalar_field('ocean_model', 'volo', Time, diag,&
long_name='Total volume of liquid ocean', units='m3', &
Expand Down Expand Up @@ -2970,7 +2998,7 @@ subroutine register_diags(Time, G, GV, CS, ADp)
CS%id_v_predia = register_diag_field('ocean_model', 'v_predia', diag%axesCvL, Time, &
'Meridional velocity before diabatic forcing', 'meter second-1')
CS%id_h_predia = register_diag_field('ocean_model', 'h_predia', diag%axesTL, Time, &
'Layer Thickness before diabatic forcing', thickness_units, v_cell_method='sum')
'Layer Thickness before diabatic forcing', thickness_units, v_extensive=.true.)
CS%id_e_predia = register_diag_field('ocean_model', 'e_predia', diag%axesTi, Time, &
'Interface Heights before diabatic forcing', 'meter')
if (CS%diabatic_first .and. (.not. CS%adiabatic)) then
Expand All @@ -2979,7 +3007,7 @@ subroutine register_diags(Time, G, GV, CS, ADp)
CS%id_v_preale = register_diag_field('ocean_model', 'v_preale', diag%axesCvL, Time, &
'Meridional velocity before remapping', 'meter second-1')
CS%id_h_preale = register_diag_field('ocean_model', 'h_preale', diag%axesTL, Time, &
'Layer Thickness before remapping', thickness_units, v_cell_method='sum')
'Layer Thickness before remapping', thickness_units, v_extensive=.true.)
CS%id_T_preale = register_diag_field('ocean_model', 'T_preale', diag%axesTL, Time, &
'Temperature before remapping', 'degC')
CS%id_S_preale = register_diag_field('ocean_model', 'S_preale', diag%axesTL, Time, &
Expand All @@ -2997,10 +3025,24 @@ subroutine register_diags(Time, G, GV, CS, ADp)

! Diagnostics related to tracer transport
CS%id_uhtr = register_diag_field('ocean_model', 'uhtr', diag%axesCuL, Time, &
'Accumulated zonal thickness fluxes to advect tracers', 'kg')
'Accumulated zonal thickness fluxes to advect tracers', 'kg', &
y_cell_method='sum', v_extensive=.true.)
CS%id_vhtr = register_diag_field('ocean_model', 'vhtr', diag%axesCvL, Time, &
'Accumulated meridional thickness fluxes to advect tracers', 'kg')

'Accumulated meridional thickness fluxes to advect tracers', 'kg', &
x_cell_method='sum', v_extensive=.true.)
CS%id_umo = register_diag_field('ocean_model', 'umo', &
diag%axesCuL, Time, 'Ocean Mass X Transport', 'kg/s', &
standard_name='ocean_mass_x_transport', y_cell_method='sum', v_extensive=.true.)
CS%id_vmo = register_diag_field('ocean_model', 'vmo', &
diag%axesCvL, Time, 'Ocean Mass Y Transport', 'kg/s', &
standard_name='ocean_mass_y_transport', x_cell_method='sum', v_extensive=.true.)
CS%id_umo_2d = register_diag_field('ocean_model', 'umo_2d', &
diag%axesCu1, Time, 'Ocean Mass X Transport Vertical Sum', 'kg/s', &
standard_name='ocean_mass_x_transport_vertical_sum', y_cell_method='sum')
CS%id_vmo_2d = register_diag_field('ocean_model', 'vmo_2d', &
diag%axesCv1, Time, 'Ocean Mass Y Transport Vertical Sum', 'kg/s', &
standard_name='ocean_mass_y_transport_vertical_sum', x_cell_method='sum')

end subroutine register_diags


Expand Down Expand Up @@ -3038,7 +3080,7 @@ subroutine register_diags_TS_tendency(Time, G, CS)
cmor_field_name="opottemptend", cmor_units="W m-2", &
cmor_standard_name="tendency_of_sea_water_potential_temperature_expressed_as_heat_content", &
cmor_long_name ="Tendency of Sea Water Potential Temperature Expressed as Heat Content", &
v_cell_method='sum')
v_extensive=.true.)
CS%id_Th_tendency_2d = register_diag_field('ocean_model', 'Th_tendency_2d', diag%axesT1, Time, &
'Vertical sum of net time tendency for heat', 'W/m2', &
cmor_field_name="opottemptend_2d", cmor_units="W m-2", &
Expand Down Expand Up @@ -3078,7 +3120,7 @@ subroutine register_diags_TS_tendency(Time, G, CS)
cmor_field_name="osalttend", cmor_units="kg m-2 s-1", &
cmor_standard_name="tendency_of_sea_water_salinity_expressed_as_salt_content", &
cmor_long_name ="Tendency of Sea Water Salinity Expressed as Salt Content", &
v_cell_method='sum')
v_extensive=.true.)
CS%id_Sh_tendency_2d = register_diag_field('ocean_model', 'Sh_tendency_2d', diag%axesT1, Time, &
'Vertical sum of net time tendency for salt', 'kg/(m2 * s)', &
cmor_field_name="osalttend_2d", cmor_units="kg m-2 s-1", &
Expand Down
6 changes: 3 additions & 3 deletions src/core/MOM_dynamics_legacy_split.F90
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ module MOM_dynamics_legacy_split
use MOM_diag_mediator, only : diag_mediator_init, enable_averaging
use MOM_diag_mediator, only : disable_averaging, post_data, safe_alloc_ptr
use MOM_diag_mediator, only : register_diag_field, register_static_field
use MOM_diag_mediator, only : set_diag_mediator_grid, diag_ctrl, diag_update_target_grids
use MOM_diag_mediator, only : set_diag_mediator_grid, diag_ctrl, diag_update_remap_grids
use MOM_domains, only : MOM_domains_init, pass_var, pass_vector
use MOM_domains, only : pass_var_start, pass_var_complete
use MOM_domains, only : pass_vector_start, pass_vector_complete
Expand Down Expand Up @@ -946,7 +946,7 @@ subroutine step_MOM_dyn_legacy_split(u, v, h, tv, visc, &
call cpu_clock_end(id_clock_continuity)
! Whenever thickness changes let the diag manager know, target grids
! for vertical remapping may need to be regenerated.
call diag_update_target_grids(CS%diag)
call diag_update_remap_grids(CS%diag)
if (G%nonblocking_updates) then
call cpu_clock_begin(id_clock_pass)
pid_h = pass_var_start(h, G%Domain)
Expand Down Expand Up @@ -987,7 +987,7 @@ subroutine step_MOM_dyn_legacy_split(u, v, h, tv, visc, &
call cpu_clock_end(id_clock_continuity)
! Whenever thickness changes let the diag manager know, target grids
! for vertical remapping may need to be regenerated.
call diag_update_target_grids(CS%diag)
call diag_update_remap_grids(CS%diag)
call cpu_clock_begin(id_clock_pass)
call pass_var(h, G%Domain)
call cpu_clock_end(id_clock_pass)
Expand Down
Loading