Skip to content

Commit

Permalink
Change name of ALE remapped Z level diagnostics to have _z_new suffix…
Browse files Browse the repository at this point in the history
…, avoids conflict with existing Z level diagnostics. mom-ocean#62
  • Loading branch information
nichannah committed Jun 5, 2015
1 parent 423b0ee commit d4e25ec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/diagnostics/MOM_diag_to_Z.F90
Original file line number Diff line number Diff line change
Expand Up @@ -862,11 +862,11 @@ subroutine register_Z_tracer_low(tr_ptr, name, long_name, units, standard_name,

CS%missing_tr(m) = CS%missing_value ! This could be changed later, if desired.
if (CS%nk_zspace > 0) then
CS%id_tr(m) = register_diag_field('ocean_model_old_z', name, CS%axesTz, Time, &
CS%id_tr(m) = register_diag_field('ocean_model_z', name, CS%axesTz, Time, &
long_name, units, missing_value=CS%missing_tr(m), &
standard_name=standard_name)
else
id_test = register_diag_field('ocean_model_old_z', name, CS%diag%axesT1, Time, &
id_test = register_diag_field('ocean_model_z', name, CS%diag%axesT1, Time, &
long_name, units, missing_value=CS%missing_tr(m), &
standard_name=standard_name)
if (id_test>0) call MOM_error(WARNING, &
Expand Down Expand Up @@ -1092,7 +1092,7 @@ subroutine get_Z_depths(depth_file, int_depth_name, int_depth, cell_depth_name,
if (status /= NF90_NOERR) units = "meters"
status = NF90_GET_ATT(ncid, intvid, "long_name", long_name)
if (status /= NF90_NOERR) long_name = "Depth of edges"
edge_index = diag_axis_init(int_depth_name//'_old', int_depth, units, 'z', &
edge_index = diag_axis_init(int_depth_name, int_depth, units, 'z', &
long_name, direction=-1)

! Create an fms axis with the same data as the cell_depth array in the input file.
Expand All @@ -1109,7 +1109,7 @@ subroutine get_Z_depths(depth_file, int_depth_name, int_depth, cell_depth_name,
status = NF90_GET_ATT(ncid, layvid, "long_name", long_name)
if (status /= NF90_NOERR) long_name = "Depth of cell center"

z_axis_index = diag_axis_init(cell_depth_name//'_old', cell_depth, units, 'z',&
z_axis_index = diag_axis_init(cell_depth_name, cell_depth, units, 'z',&
long_name, edges = edge_index, direction=-1)

deallocate(cell_depth)
Expand Down
8 changes: 4 additions & 4 deletions src/framework/MOM_diag_mediator.F90
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ subroutine get_Z_output_grid(depth_file, int_depth_name, int_depth, cell_depth_n
if (status /= NF90_NOERR) units = "meters"
status = NF90_GET_ATT(ncid, intvid, "long_name", long_name)
if (status /= NF90_NOERR) long_name = "Depth of edges"
z_int_axis_index = diag_axis_init(int_depth_name, int_depth, units, 'z', &
z_int_axis_index = diag_axis_init(int_depth_name//'_new', int_depth, units, 'z', &
long_name, direction=-1)

! Create an fms axis with the same data as the cell_depth array in the
Expand All @@ -416,7 +416,7 @@ subroutine get_Z_output_grid(depth_file, int_depth_name, int_depth, cell_depth_n
status = NF90_GET_ATT(ncid, layvid, "long_name", long_name)
if (status /= NF90_NOERR) long_name = "Depth of cell center"

z_axis_index = diag_axis_init(cell_depth_name, cell_depth, units, 'z',&
z_axis_index = diag_axis_init(cell_depth_name//'_new', cell_depth, units, 'z',&
long_name, edges = z_int_axis_index, direction=-1)
deallocate(cell_depth)
status = nf90_close(ncid)
Expand Down Expand Up @@ -1012,7 +1012,7 @@ function register_diag_field(module_name, field_name, axes, init_time, &
! diagnostics on T points and layers (not interfaces) are supported,
! for other diagnostics the old remapping approach can still be used
if (axes%id == diag_cs%axesTL%id) then
fms_id = register_diag_field_fms(module_name//'_z', field_name, diag_cs%axesTZL%handles, &
fms_id = register_diag_field_fms(module_name//'_z_new', field_name, diag_cs%axesTZL%handles, &
init_time, long_name=long_name, units=units, missing_value=MOM_missing_value, &
range=range, mask_variant=mask_variant, standard_name=standard_name, &
verbose=verbose, do_not_log=do_not_log, err_msg=err_msg, &
Expand Down Expand Up @@ -1044,7 +1044,7 @@ function register_diag_field(module_name, field_name, axes, init_time, &
posted_cmor_standard_name)
endif
if (axes%id == diag_cs%axesTL%id) then
call log_available_diag(associated(z_remap_diag), module_name//'_z', field_name, &
call log_available_diag(associated(z_remap_diag), module_name//'_z_new', field_name, &
long_name, units, standard_name)
endif
endif
Expand Down

0 comments on commit d4e25ec

Please sign in to comment.