Skip to content

Commit

Permalink
Fix registry of lbd diagnostics
Browse files Browse the repository at this point in the history
* remove v_extensive=.true. from 2D diagnostics and group them with
  other 2D fields;

* changes names (_lbd_dfx_2d) to be consistent between diag_types
  1 and 2.They all have _lbd_diffx_2d now.
  • Loading branch information
gustavo-marques committed Nov 19, 2019
1 parent 6bce8ab commit 0a89aac
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions src/tracer/MOM_tracer_registry.F90
Original file line number Diff line number Diff line change
Expand Up @@ -414,20 +414,12 @@ subroutine register_tracer_diagnostics(Reg, h, Time, diag, G, GV, use_ALE)
Tr%id_dfy = register_diag_field("ocean_model", trim(shortnm)//"_dfy", &
diag%axesCvL, Time, trim(flux_longname)//" diffusive merdional flux" , &
trim(flux_units), v_extensive = .true., x_cell_method = 'sum')
Tr%id_lbd_dfx = register_diag_field("ocean_model", trim(shortnm)//"_lbd_dfx", &
Tr%id_lbd_dfx = register_diag_field("ocean_model", trim(shortnm)//"_lbd_diffx", &
diag%axesCuL, Time, trim(flux_longname)//" diffusive zonal flux from the lateral boundary diffusion "&
"scheme", trim(flux_units), v_extensive = .true., y_cell_method = 'sum')
Tr%id_lbd_dfy = register_diag_field("ocean_model", trim(shortnm)//"_lbd_dfy", &
Tr%id_lbd_dfy = register_diag_field("ocean_model", trim(shortnm)//"_lbd_diffy", &
diag%axesCvL, Time, trim(flux_longname)//" diffusive meridional flux from the lateral boundary diffusion"&
" scheme", trim(flux_units), v_extensive = .true., x_cell_method = 'sum')
Tr%id_lbd_dfx_2d = register_diag_field("ocean_model", trim(shortnm)//"_lbd_dfx_2d", &
diag%axesCu1, Time, trim(flux_longname)//&
"Vertically-integrated zonal diffusive flux from the lateral boundary diffusion scheme" , &
trim(flux_units), v_extensive = .true., y_cell_method = 'sum')
Tr%id_lbd_dfy_2d = register_diag_field("ocean_model", trim(shortnm)//"_lbd_dfy_2d", &
diag%axesCv1, Time, trim(flux_longname)//&
"Vertically-integrated meridional diffusive flux from the lateral boundary diffusion scheme" , &
trim(flux_units), v_extensive = .true., x_cell_method = 'sum')
else
Tr%id_adx = register_diag_field("ocean_model", trim(shortnm)//"_adx", &
diag%axesCuL, Time, "Advective (by residual mean) Zonal Flux of "//trim(flux_longname), &
Expand All @@ -447,23 +439,13 @@ subroutine register_tracer_diagnostics(Reg, h, Time, diag, G, GV, use_ALE)
Tr%id_lbd_dfy = register_diag_field("ocean_model", trim(shortnm)//"_lbd_diffy", &
diag%axesCvL, Time, "Lateral Boundary Diffusive Meridional Flux of "//trim(flux_longname), &
flux_units, v_extensive=.true., conversion=Tr%flux_scale, x_cell_method = 'sum')
Tr%id_lbd_dfx_2d = register_diag_field("ocean_model", trim(shortnm)//"_lbd_diffx_2d", &
diag%axesCu1, Time, "Vertically-integrated zonal diffusive flux from the lateral boundary diffusion "//&
"scheme for" //trim(flux_longname), flux_units, v_extensive=.true., conversion=Tr%flux_scale, &
y_cell_method = 'sum')
Tr%id_lbd_dfy_2d = register_diag_field("ocean_model", trim(shortnm)//"_lbd_diffy_2d", &
diag%axesCv1, Time, "Vertically-integrated meridional diffusive flux from the lateral boundary diffusion "//&
"scheme for "//trim(flux_longname), flux_units, v_extensive=.true., conversion=Tr%flux_scale, &
x_cell_method = 'sum')
endif
if (Tr%id_adx > 0) call safe_alloc_ptr(Tr%ad_x,IsdB,IedB,jsd,jed,nz)
if (Tr%id_ady > 0) call safe_alloc_ptr(Tr%ad_y,isd,ied,JsdB,JedB,nz)
if (Tr%id_dfx > 0) call safe_alloc_ptr(Tr%df_x,IsdB,IedB,jsd,jed,nz)
if (Tr%id_dfy > 0) call safe_alloc_ptr(Tr%df_y,isd,ied,JsdB,JedB,nz)
if (Tr%id_lbd_dfx > 0) call safe_alloc_ptr(Tr%lbd_dfx,IsdB,IedB,jsd,jed,nz)
if (Tr%id_lbd_dfy > 0) call safe_alloc_ptr(Tr%lbd_dfy,isd,ied,JsdB,JedB,nz)
if (Tr%id_lbd_dfx_2d > 0) call safe_alloc_ptr(Tr%lbd_dfx_2d,IsdB,IedB,jsd,jed)
if (Tr%id_lbd_dfy_2d > 0) call safe_alloc_ptr(Tr%lbd_dfy_2d,isd,ied,JsdB,JedB)

Tr%id_adx_2d = register_diag_field("ocean_model", trim(shortnm)//"_adx_2d", &
diag%axesCu1, Time, &
Expand All @@ -489,13 +471,21 @@ subroutine register_tracer_diagnostics(Reg, h, Time, diag, G, GV, use_ALE)
diag%axesCv1, Time, &
"Total Bulk Diffusive Meridional Flux of "//trim(flux_longname), &
flux_units, conversion=Tr%flux_scale, x_cell_method = 'sum')
Tr%id_lbd_dfx_2d = register_diag_field("ocean_model", trim(shortnm)//"_lbd_diffx_2d", &
diag%axesCu1, Time, "Vertically-integrated zonal diffusive flux from the lateral boundary diffusion "//&
"scheme for "//trim(flux_longname), flux_units, conversion=Tr%flux_scale, y_cell_method = 'sum')
Tr%id_lbd_dfy_2d = register_diag_field("ocean_model", trim(shortnm)//"_lbd_diffy_2d", &
diag%axesCv1, Time, "Vertically-integrated meridional diffusive flux from the lateral boundary diffusion "//&
"scheme for "//trim(flux_longname), flux_units, conversion=Tr%flux_scale, x_cell_method = 'sum')

if (Tr%id_adx_2d > 0) call safe_alloc_ptr(Tr%ad2d_x,IsdB,IedB,jsd,jed)
if (Tr%id_ady_2d > 0) call safe_alloc_ptr(Tr%ad2d_y,isd,ied,JsdB,JedB)
if (Tr%id_dfx_2d > 0) call safe_alloc_ptr(Tr%df2d_x,IsdB,IedB,jsd,jed)
if (Tr%id_dfy_2d > 0) call safe_alloc_ptr(Tr%df2d_y,isd,ied,JsdB,JedB)
if (Tr%id_lbd_bulk_dfx > 0) call safe_alloc_ptr(Tr%lbd_bulk_df_x,IsdB,IedB,jsd,jed)
if (Tr%id_lbd_bulk_dfy > 0) call safe_alloc_ptr(Tr%lbd_bulk_df_y,isd,ied,JsdB,JedB)
if (Tr%id_lbd_dfx_2d > 0) call safe_alloc_ptr(Tr%lbd_dfx_2d,IsdB,IedB,jsd,jed)
if (Tr%id_lbd_dfy_2d > 0) call safe_alloc_ptr(Tr%lbd_dfy_2d,isd,ied,JsdB,JedB)

Tr%id_adv_xy = register_diag_field('ocean_model', trim(shortnm)//"_advection_xy", &
diag%axesTL, Time, &
Expand Down

0 comments on commit 0a89aac

Please sign in to comment.