Skip to content

Commit

Permalink
Remove unused nCells from cam_mpas_read_static
Browse files Browse the repository at this point in the history
Previous versions of the lonCell_arr adjustment used an explicit loop. Without this loop, the nCells variable and the routine to fetch it are no longer needed.
  • Loading branch information
gdicker1 committed Jul 19, 2024
1 parent 7edc1db commit f3dfa51
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/dynamics/mpas/driver/cam_mpas_subdriver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ subroutine cam_mpas_read_static(fh_ini, endrun)
field0DReal, field1DReal, field2DReal, field3DReal, field1DInteger, field2DInteger, &
MPAS_STREAM_NOERR
use mpas_pool_routines, only : MPAS_pool_get_subpool, MPAS_pool_get_field, MPAS_pool_create_pool, MPAS_pool_destroy_pool, &
MPAS_pool_add_config, MPAS_pool_get_dimension, MPAS_pool_get_array
MPAS_pool_add_config, MPAS_pool_get_array
use mpas_dmpar, only : MPAS_dmpar_exch_halo_field
use mpas_stream_manager, only : postread_reindex
use mpas_constants, only : pii
Expand Down Expand Up @@ -930,12 +930,10 @@ subroutine cam_mpas_read_static(fh_ini, endrun)

type (MPAS_Stream_type) :: mesh_stream

integer, pointer :: nCells
real(kind=RKIND), dimension(:), pointer :: lonCell_arr

nullify(cell_gradient_coef_x)
nullify(cell_gradient_coef_y)
nullify(nCells)
nullify(lonCell_arr)

call MPAS_createStream(mesh_stream, domain_ptr % ioContext, 'not_used', MPAS_IO_NETCDF, MPAS_IO_READ, &
Expand Down Expand Up @@ -1177,7 +1175,6 @@ subroutine cam_mpas_read_static(fh_ini, endrun)
call endrun(subname//': FATAL: Failed to close static input stream.')
end if

call mpas_pool_get_dimension(meshPool, 'nCells', nCells)
call mpas_pool_get_array(meshPool, 'lonCell', lonCell_arr)

! Ensure longitudes w/i [0, 2*pi) range
Expand Down

0 comments on commit f3dfa51

Please sign in to comment.