subroutine hist_htapes_wrapup( rstwr, nlend )DESCRIPTION:
Write history tape(s) Determine if next time step is beginning of history interval and if so: increment the current time sample counter, open a new history file and if needed (i.e., when ntim = 1), write history data to current history file, reset field accumulation counters to zero. If primary history file is full or at the last time step of the simulation, write restart dataset and close all history fiels. If history file is full or at the last time step of the simulation: close history file and reset time sample counter to zero if file is full. Daily-averaged data for the first day in September are written on date = 00/09/02 with mscur = 0. Daily-averaged data for the first day in month mm are written on date = yyyy/mm/02 with mscur = 0. Daily-averaged data for the 30th day (last day in September) are written on date = 0000/10/01 mscur = 0. Daily-averaged data for the last day in month mm are written on date = yyyy/mm+1/01 with mscur = 0.
use fileutils , only : set_filename, putfil use clm_time_manager, only : get_nstep, get_curr_date, get_curr_time, get_prev_date use clm_varcon , only : secspday use clmtypeARGUMENTS:
implicit none logical, intent(in) :: rstwr ! true => write restart file this step logical, intent(in) :: nlend ! true => end of run on this stepREVISION HISTORY:
Created by Mariana VertensteinLOCAL VARIABLES: