Skip to content

Commit

Permalink
Merge pull request #5 from CICE-Consortium/master
Browse files Browse the repository at this point in the history
Update according to consortium
  • Loading branch information
TillRasmussen authored Dec 25, 2019
2 parents f6b057e + 3e5f693 commit 1239007
Show file tree
Hide file tree
Showing 41 changed files with 129 additions and 192 deletions.
8 changes: 4 additions & 4 deletions cicecore/cicedynB/dynamics/ice_transport_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module ice_transport_driver
use icepack_intfc, only: icepack_warnings_flush, icepack_warnings_aborted
use icepack_intfc, only: icepack_compute_tracers
use icepack_intfc, only: icepack_query_tracer_flags, &
icepack_query_tracer_numbers, icepack_query_tracer_indices, &
icepack_query_tracer_sizes, icepack_query_tracer_indices, &
icepack_query_parameters

implicit none
Expand Down Expand Up @@ -88,7 +88,7 @@ subroutine init_transport

call ice_timer_start(timer_advect) ! advection

call icepack_query_tracer_numbers(ntrcr_out=ntrcr)
call icepack_query_tracer_sizes(ntrcr_out=ntrcr)
call icepack_query_tracer_indices(nt_Tsfc_out=nt_Tsfc, nt_qice_out=nt_qice, &
nt_qsno_out=nt_qsno, nt_sice_out=nt_sice, nt_fbri_out=nt_fbri, &
nt_iage_out=nt_iage, nt_FY_out=nt_FY, nt_alvl_out=nt_alvl, nt_fsd_out=nt_fsd, &
Expand Down Expand Up @@ -304,7 +304,7 @@ subroutine transport_remap (dt)
character(len=*), parameter :: subname = '(transport_remap)'

call ice_timer_start(timer_advect) ! advection
call icepack_query_tracer_numbers(ntrcr_out=ntrcr)
call icepack_query_tracer_sizes(ntrcr_out=ntrcr)
call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)
Expand Down Expand Up @@ -709,7 +709,7 @@ subroutine transport_upwind (dt)

call ice_timer_start(timer_advect) ! advection

call icepack_query_tracer_numbers(ntrcr_out=ntrcr)
call icepack_query_tracer_sizes(ntrcr_out=ntrcr)
call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)
Expand Down
12 changes: 7 additions & 5 deletions cicecore/cicedynB/general/ice_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ module ice_init
use icepack_intfc, only: icepack_init_trcr
use icepack_intfc, only: icepack_init_parameters
use icepack_intfc, only: icepack_init_tracer_flags
use icepack_intfc, only: icepack_init_tracer_indices
use icepack_intfc, only: icepack_init_tracer_sizes
use icepack_intfc, only: icepack_query_tracer_flags
use icepack_intfc, only: icepack_query_tracer_numbers
use icepack_intfc, only: icepack_query_tracer_sizes
use icepack_intfc, only: icepack_query_tracer_indices
use icepack_intfc, only: icepack_query_parameters

Expand Down Expand Up @@ -1261,7 +1261,9 @@ subroutine input_data
call icepack_init_tracer_flags(tr_iage_in=tr_iage, tr_FY_in=tr_FY, &
tr_lvl_in=tr_lvl, tr_aero_in=tr_aero, tr_fsd_in=tr_fsd, tr_pond_in=tr_pond, &
tr_pond_cesm_in=tr_pond_cesm, tr_pond_lvl_in=tr_pond_lvl, tr_pond_topo_in=tr_pond_topo)
call icepack_init_tracer_indices(ncat_in=ncat, nilyr_in=nilyr, nslyr_in=nslyr, nblyr_in=nblyr)
call icepack_init_tracer_sizes(ncat_in=ncat, nilyr_in=nilyr, nslyr_in=nslyr, nblyr_in=nblyr, &
nfsd_in=nfsd, n_algae_in=n_algae, n_aero_in=n_aero, n_DOC_in=n_DOC, n_DON_in=n_DON, &
n_DIC_in=n_DIC, n_fed_in=n_fed, n_fep_in=n_fep, n_zaero_in=n_zaero)
call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)
Expand Down Expand Up @@ -1323,7 +1325,7 @@ subroutine init_state
!-----------------------------------------------------------------

call icepack_query_parameters(heat_capacity_out=heat_capacity)
call icepack_query_tracer_numbers(ntrcr_out=ntrcr)
call icepack_query_tracer_sizes(ntrcr_out=ntrcr)
call icepack_query_tracer_flags(tr_iage_out=tr_iage, tr_FY_out=tr_FY, &
tr_lvl_out=tr_lvl, tr_aero_out=tr_aero, tr_fsd_out=tr_fsd, &
tr_pond_cesm_out=tr_pond_cesm, tr_pond_lvl_out=tr_pond_lvl, tr_pond_topo_out=tr_pond_topo)
Expand Down Expand Up @@ -1654,7 +1656,7 @@ subroutine set_state_var (nx_block, ny_block, &

!-----------------------------------------------------------------

call icepack_query_tracer_numbers(ntrcr_out=ntrcr)
call icepack_query_tracer_sizes(ntrcr_out=ntrcr)
call icepack_query_tracer_flags(tr_brine_out=tr_brine, tr_lvl_out=tr_lvl)
call icepack_query_tracer_indices( nt_Tsfc_out=nt_Tsfc, nt_qice_out=nt_qice, &
nt_qsno_out=nt_qsno, nt_sice_out=nt_sice, &
Expand Down
4 changes: 2 additions & 2 deletions cicecore/cicedynB/general/ice_state.F90
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module ice_state
use ice_blocks, only: nx_block, ny_block
use ice_exit, only: abort_ice
use ice_fileunits, only: nu_diag
use icepack_intfc, only: icepack_query_tracer_numbers
use icepack_intfc, only: icepack_query_tracer_sizes
use icepack_intfc, only: icepack_warnings_flush, icepack_warnings_aborted

implicit none
Expand Down Expand Up @@ -139,7 +139,7 @@ subroutine alloc_state
integer (int_kind) :: ntrcr, ierr
character(len=*),parameter :: subname='(alloc_state)'

call icepack_query_tracer_numbers(ntrcr_out=ntrcr)
call icepack_query_tracer_sizes(ntrcr_out=ntrcr)
call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)
Expand Down
14 changes: 7 additions & 7 deletions cicecore/cicedynB/general/ice_step_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module ice_step_mod
use icepack_intfc, only: icepack_max_doc, icepack_max_dic, icepack_max_aero
use icepack_intfc, only: icepack_max_fe
use icepack_intfc, only: icepack_query_parameters
use icepack_intfc, only: icepack_query_tracer_flags, icepack_query_tracer_numbers
use icepack_intfc, only: icepack_query_tracer_flags, icepack_query_tracer_sizes
use icepack_intfc, only: icepack_query_tracer_indices

implicit none
Expand Down Expand Up @@ -217,7 +217,7 @@ subroutine step_therm1 (dt, iblk)

call icepack_query_parameters(puny_out=puny)
call icepack_query_parameters(calc_Tsfc_out=calc_Tsfc)
call icepack_query_tracer_numbers(ntrcr_out=ntrcr)
call icepack_query_tracer_sizes(ntrcr_out=ntrcr)
call icepack_query_tracer_flags( &
tr_iage_out=tr_iage, tr_FY_out=tr_FY, &
tr_aero_out=tr_aero, tr_pond_out=tr_pond, tr_pond_cesm_out=tr_pond_cesm, &
Expand Down Expand Up @@ -483,7 +483,7 @@ subroutine step_therm2 (dt, iblk)
character(len=*), parameter :: subname = '(step_therm2)'

call icepack_query_parameters(z_tracers_out=z_tracers)
call icepack_query_tracer_numbers(ntrcr_out=ntrcr, nbtrcr_out=nbtrcr)
call icepack_query_tracer_sizes(ntrcr_out=ntrcr, nbtrcr_out=nbtrcr)
call icepack_query_tracer_flags(tr_fsd_out=tr_fsd)
call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
Expand Down Expand Up @@ -610,7 +610,7 @@ subroutine update_state (dt, daidt, dvidt, dagedt, offset)
character(len=*), parameter :: subname='(update_state)'

call icepack_query_tracer_flags(tr_iage_out=tr_iage)
call icepack_query_tracer_numbers(ntrcr_out=ntrcr)
call icepack_query_tracer_sizes(ntrcr_out=ntrcr)
call icepack_query_tracer_indices(nt_iage_out=nt_iage)
call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
Expand Down Expand Up @@ -855,7 +855,7 @@ subroutine step_dyn_ridge (dt, ndtd, iblk)
call ice_timer_start(timer_column)
call ice_timer_start(timer_ridge)

call icepack_query_tracer_numbers(ntrcr_out=ntrcr, nbtrcr_out=nbtrcr)
call icepack_query_tracer_sizes(ntrcr_out=ntrcr, nbtrcr_out=nbtrcr)
call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)
Expand Down Expand Up @@ -997,7 +997,7 @@ subroutine step_radiation (dt, iblk)

call ice_timer_start(timer_sw) ! shortwave

call icepack_query_tracer_numbers(ntrcr_out=ntrcr, &
call icepack_query_tracer_sizes(ntrcr_out=ntrcr, &
nbtrcr_out=nbtrcr, nbtrcr_sw_out=nbtrcr_sw)
call icepack_query_tracer_flags( &
tr_brine_out=tr_brine, tr_bgc_N_out=tr_bgc_N, tr_zaero_out=tr_zaero)
Expand Down Expand Up @@ -1322,7 +1322,7 @@ subroutine biogeochemistry (dt, iblk)

call icepack_query_tracer_flags(tr_brine_out=tr_brine)
call icepack_query_parameters(skl_bgc_out=skl_bgc)
call icepack_query_tracer_numbers(ntrcr_out=ntrcr, nbtrcr_out=nbtrcr)
call icepack_query_tracer_sizes(ntrcr_out=ntrcr, nbtrcr_out=nbtrcr)
call icepack_query_tracer_flags(tr_zaero_out=tr_zaero)
call icepack_query_tracer_indices(nlt_zaero_out=nlt_zaero)
call icepack_query_tracer_indices(bio_index_o_out=bio_index_o)
Expand Down
3 changes: 1 addition & 2 deletions cicecore/cicedynB/infrastructure/comm/mpi/ice_boundary.F90
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module ice_boundary
! 2008-01-28: Elizabeth Hunke replaced old routines with new POP
! infrastructure

use mpi ! MPI Fortran module
use ice_kinds_mod
use ice_communicate, only: my_task, mpiR4, mpiR8, mpitagHalo
use ice_constants, only: field_type_scalar, &
Expand All @@ -37,8 +38,6 @@ module ice_boundary
implicit none
private

include 'mpif.h'

type, public :: ice_halo
integer (int_kind) :: &
communicator, &! communicator to use for update messages
Expand Down
35 changes: 1 addition & 34 deletions cicecore/cicedynB/infrastructure/comm/mpi/ice_broadcast.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module ice_broadcast
! author: Phil Jones, LANL
! Oct. 2004: Adapted from POP version by William H. Lipscomb, LANL

use mpi ! MPI Fortran module
use ice_kinds_mod
use ice_communicate, only: mpiR8, mpir4, MPI_COMM_ICE
use ice_exit, only: abort_ice
Expand Down Expand Up @@ -60,8 +61,6 @@ subroutine broadcast_scalar_dbl(scalar, root_pe)
! to all other processors. This is a specific instance of the generic
! broadcast\_scalar interface.

include 'mpif.h' ! MPI Fortran include file

integer (int_kind), intent(in) :: &
root_pe ! processor number to broadcast from

Expand Down Expand Up @@ -94,8 +93,6 @@ subroutine broadcast_scalar_real(scalar, root_pe)
! to all other processors. This is a specific instance of the generic
! broadcast\_scalar interface.

include 'mpif.h' ! MPI Fortran include file

integer (int_kind), intent(in) :: &
root_pe ! processor number to broadcast from

Expand Down Expand Up @@ -128,8 +125,6 @@ subroutine broadcast_scalar_int(scalar, root_pe)
! to all other processors. This is a specific instance of the generic
! broadcast\_scalar interface.

include 'mpif.h' ! MPI Fortran include file

integer (int_kind), intent(in) :: &
root_pe ! processor number to broadcast from

Expand Down Expand Up @@ -162,8 +157,6 @@ subroutine broadcast_scalar_log(scalar, root_pe)
! to all other processors. This is a specific instance of the generic
! broadcast\_scalar interface.

include 'mpif.h' ! MPI Fortran include file

integer (int_kind), intent(in) :: &
root_pe ! processor number to broadcast from

Expand Down Expand Up @@ -210,8 +203,6 @@ subroutine broadcast_scalar_char(scalar, root_pe)
! to all other processors. This is a specific instance of the generic
! broadcast\_scalar interface.

include 'mpif.h' ! MPI Fortran include file

integer (int_kind), intent(in) :: &
root_pe ! processor number to broadcast from

Expand Down Expand Up @@ -248,8 +239,6 @@ subroutine broadcast_array_dbl_1d(array, root_pe)
! to all other processors. This is a specific instance of the generic
! broadcast\_array interface.

include 'mpif.h' ! MPI Fortran include file

integer (int_kind), intent(in) :: &
root_pe ! processor number to broadcast from

Expand Down Expand Up @@ -286,8 +275,6 @@ subroutine broadcast_array_real_1d(array, root_pe)
! to all other processors. This is a specific instance of the generic
! broadcast\_array interface.

include 'mpif.h' ! MPI Fortran include file

integer (int_kind), intent(in) :: &
root_pe ! processor number to broadcast from

Expand Down Expand Up @@ -324,8 +311,6 @@ subroutine broadcast_array_int_1d(array, root_pe)
! to all other processors. This is a specific instance of the generic
! broadcast\_array interface.

include 'mpif.h' ! MPI Fortran include file

integer (int_kind), intent(in) :: &
root_pe ! processor number to broadcast from

Expand Down Expand Up @@ -362,8 +347,6 @@ subroutine broadcast_array_log_1d(array, root_pe)
! to all other processors. This is a specific instance of the generic
! broadcast\_array interface.

include 'mpif.h' ! MPI Fortran include file

integer (int_kind), intent(in) :: &
root_pe ! processor number to broadcast from

Expand Down Expand Up @@ -420,8 +403,6 @@ subroutine broadcast_array_dbl_2d(array, root_pe)
! to all other processors. This is a specific instance of the generic
! broadcast\_array interface.

include 'mpif.h' ! MPI Fortran include file

integer (int_kind), intent(in) :: &
root_pe ! processor number to broadcast from

Expand Down Expand Up @@ -458,8 +439,6 @@ subroutine broadcast_array_real_2d(array, root_pe)
! to all other processors. This is a specific instance of the generic
! broadcast\_array interface.

include 'mpif.h' ! MPI Fortran include file

integer (int_kind), intent(in) :: &
root_pe ! processor number to broadcast from

Expand Down Expand Up @@ -496,8 +475,6 @@ subroutine broadcast_array_int_2d(array, root_pe)
! to all other processors. This is a specific instance of the generic
! broadcast\_array interface.

include 'mpif.h' ! MPI Fortran include file

integer (int_kind), intent(in) :: &
root_pe ! processor number to broadcast from

Expand Down Expand Up @@ -534,8 +511,6 @@ subroutine broadcast_array_log_2d(array, root_pe)
! to all other processors. This is a specific instance of the generic
! broadcast\_array interface.

include 'mpif.h' ! MPI Fortran include file

integer (int_kind), intent(in) :: &
root_pe ! processor number to broadcast from

Expand Down Expand Up @@ -592,8 +567,6 @@ subroutine broadcast_array_dbl_3d(array, root_pe)
! to all other processors. This is a specific instance of the generic
! broadcast\_array interface.

include 'mpif.h' ! MPI Fortran include file

integer (int_kind), intent(in) :: &
root_pe ! processor number to broadcast from

Expand Down Expand Up @@ -630,8 +603,6 @@ subroutine broadcast_array_real_3d(array, root_pe)
! to all other processors. This is a specific instance of the generic
! broadcast\_array interface.

include 'mpif.h' ! MPI Fortran include file

integer (int_kind), intent(in) :: &
root_pe ! processor number to broadcast from

Expand Down Expand Up @@ -668,8 +639,6 @@ subroutine broadcast_array_int_3d(array, root_pe)
! to all other processors. This is a specific instance of the generic
! broadcast\_array interface.

include 'mpif.h' ! MPI Fortran include file

integer (int_kind), intent(in) :: &
root_pe ! processor number to broadcast from

Expand Down Expand Up @@ -706,8 +675,6 @@ subroutine broadcast_array_log_3d(array, root_pe)
! to all other processors. This is a specific instance of the generic
! broadcast\_array interface.

include 'mpif.h' ! MPI Fortran include file

integer (int_kind), intent(in) :: &
root_pe ! processor number to broadcast from

Expand Down
13 changes: 5 additions & 8 deletions cicecore/cicedynB/infrastructure/comm/mpi/ice_communicate.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module ice_communicate
! author: Phil Jones, LANL
! Oct. 2004: Adapted from POP version by William H. Lipscomb, LANL

use mpi ! MPI Fortran module
use ice_kinds_mod
use ice_exit, only: abort_ice
use icepack_intfc, only: icepack_warnings_flush, icepack_warnings_aborted
Expand Down Expand Up @@ -61,8 +62,6 @@ subroutine init_communicate(mpicom)
!
!-----------------------------------------------------------------------

include 'mpif.h' ! MPI Fortran include file

integer (kind=int_kind), optional, intent(in) :: mpicom ! specified communicator

integer (int_kind) :: ierr ! MPI error flag
Expand Down Expand Up @@ -166,8 +165,6 @@ subroutine create_communicator(new_comm, num_procs)
! this routine should be called from init_domain1 when the
! domain configuration (e.g. nprocs_btrop) has been determined

include 'mpif.h'

integer (int_kind), intent(in) :: &
num_procs ! num of procs in new distribution

Expand All @@ -187,7 +184,7 @@ subroutine create_communicator(new_comm, num_procs)
integer (int_kind) :: &
ierr ! error flag for MPI comms

integer (int_kind), dimension(3) :: &
integer (int_kind), dimension(3,1) :: &
range ! range of tasks assigned to new dist
! (assumed 0,num_procs-1)

Expand All @@ -201,9 +198,9 @@ subroutine create_communicator(new_comm, num_procs)

call MPI_COMM_GROUP (MPI_COMM_ICE, MPI_GROUP_ICE, ierr)

range(1) = 0
range(2) = num_procs-1
range(3) = 1
range(1,1) = 0
range(2,1) = num_procs-1
range(3,1) = 1

!-----------------------------------------------------------------------
!
Expand Down
Loading

0 comments on commit 1239007

Please sign in to comment.