diff --git a/src/offline/cable_driver_init.F90 b/src/offline/cable_driver_init.F90 index 670b53b36..1ef44a615 100644 --- a/src/offline/cable_driver_init.F90 +++ b/src/offline/cable_driver_init.F90 @@ -90,11 +90,12 @@ MODULE cable_driver_init_mod CONTAINS - SUBROUTINE cable_driver_init(mpi_grp, trunk_sumbal) + SUBROUTINE cable_driver_init(mpi_grp, trunk_sumbal, NRRRR) !! Model initialisation routine for the CABLE offline driver. TYPE(mpi_grp_t), INTENT(IN) :: mpi_grp !! MPI group to use DOUBLE PRECISION, INTENT(OUT) :: trunk_sumbal !! Reference value for quasi-bitwise reproducibility checks. + INTEGER, INTENT(OUT) :: NRRRR !! Number of repeated spin-up cycles INTEGER :: ioerror, unit CHARACTER(len=4) :: cRank ! for worker-logfiles @@ -184,6 +185,8 @@ SUBROUTINE cable_driver_init(mpi_grp, trunk_sumbal) LALLOC = 3 ! for use with POP: makes use of pipe model to partition between stem and leaf END IF + NRRRR = MERGE(MAX(cable_user%CASA_NREP,1), 1, CASAONLY) + END SUBROUTINE cable_driver_init END MODULE cable_driver_init_mod diff --git a/src/offline/cable_offline_driver.F90 b/src/offline/cable_offline_driver.F90 index e098d889e..4220b0db5 100644 --- a/src/offline/cable_offline_driver.F90 +++ b/src/offline/cable_offline_driver.F90 @@ -14,14 +14,15 @@ PROGRAM cable_offline_driver TYPE(mpi_grp_t) :: mpi_grp DOUBLE PRECISION :: trunk_sumbal !! Reference value for quasi-bitwise reproducibility checks. + INTEGER :: NRRRR !! Number of repeated spin-up cycles call mpi_mod_init() mpi_grp = mpi_grp_t() - CALL cable_driver_init(mpi_grp, trunk_sumbal) + CALL cable_driver_init(mpi_grp, trunk_sumbal, NRRRR) IF (mpi_grp%size == 1) THEN - CALL serialdrv(trunk_sumbal) + CALL serialdrv(trunk_sumbal, NRRRR) ELSE IF (mpi_grp%rank == 0) THEN CALL mpidrv_master(mpi_grp%comm, trunk_sumbal) diff --git a/src/offline/cable_serial.F90 b/src/offline/cable_serial.F90 index 9f84b7295..b1310b9dc 100644 --- a/src/offline/cable_serial.F90 +++ b/src/offline/cable_serial.F90 @@ -153,10 +153,11 @@ MODULE cable_serial CONTAINS -SUBROUTINE serialdrv(trunk_sumbal) +SUBROUTINE serialdrv(trunk_sumbal, NRRRR) !! Offline serial driver. DOUBLE PRECISION, INTENT(IN) :: trunk_sumbal !! Reference value for quasi-bitwise reproducibility checks. + INTEGER, INTENT(IN) :: NRRRR !! Number of repeated spin-up cycles ! timing variables INTEGER, PARAMETER :: kstart = 1 ! start of simulation @@ -176,7 +177,6 @@ SUBROUTINE serialdrv(trunk_sumbal) YYYY, & ! RYEAR, & ! RRRR, & ! - NRRRR, & ! ctime, & ! day count for casacnp LOY, & ! days in year count_sum_casa ! number of time steps over which casa pools & @@ -302,7 +302,6 @@ SUBROUTINE serialdrv(trunk_sumbal) cable_user%MetType = 'gswp' ENDIF - NRRRR = MERGE(MAX(CABLE_USER%CASA_NREP,1), 1, CASAONLY) ! casa time count ctime = 0