Routines for reading and writing the cpl6 restart file.
REVISION HISTORY:
2002-Nov-06 - B. Kauffman - created initial versionREMARKS:
This is not a generic low-level module, it is a high-level module hard-coded to particular bundle declarations and restart data needs for a particular version of the coupler.INTERFACE:
module restart_modUSES:
use cpl_kind_mod ! access to F90 kind declarations use cpl_control_mod, dbug=>cpl_control_infoDBug use cpl_comm_mod ! mpi communicator groups & related use diag_mod ! runtime diagnostic subsystem module use shr_date_mod ! date/time module use cpl_iobin_mod ! binary data file creation use frac_mod ! surface fractions use data_mod ! lengthly data declarations/inits for main program use shr_sys_mod ! wrappers to system calls use shr_timer_mod ! timing utilities use shr_file_mod ! file get/put use shr_mpi_mod ! mpi layer implicit none private ! exceptPUBLIC TYPES:
! nonePUBLIC MEMBER FUNCTIONS:
public :: restart_write ! write a restart file public :: restart_read ! read a restart file public :: restart_readDate ! read a restart file, read date onlyPUBLIC DATA MEMBERS:
! none
Create desired restart file using input date. Update restart pointer file.
If cpl_control_restNow is false, this routine does nothing.
REMARKS:
Acceses data file from module data_mod .REVISION HISTORY:
2002-Nov-06 - B. Kauffman - initial version.INTERFACE:
subroutine restart_write(date) implicit noneINPUT/OUTPUT PARAMETERS:
type(shr_date) :: date ! date associated with bundles
Read all data from Coupler restart file.
REVISION HISTORY:
2002-Nov-06 - B. Kauffman - initial version.INTERFACE:
subroutine restart_read(date) implicit noneINPUT/OUTPUT PARAMETERS:
type(shr_date),intent(inout) :: date ! date associated with restart data
Read model date from restart file and return it in output argument cDate.
REMARKS:
All processors need to read the date from the restart file.REVISION HISTORY:
2002-Dec-13 - B. Kauffman - initial version.INTERFACE:
subroutine restart_readDate(cDate) implicit noneINPUT/OUTPUT PARAMETERS:
integer(IN),intent(out) :: cDate ! start date from restart file