next up previous contents
Next: masterlist_build Up: Routine/Function Prologues Previous: Fortran: Module Interface globals   Contents

Fortran: Module Interface histFileMod (Source File: histFileMod.F90)

   Module containing methods to for clm2 history file handling
USES:
   use shr_kind_mod, only: r8 => shr_kind_r8
   implicit none
   save
   private
   include "netcdf.inc"
   !PUBLIC TYPES
   Constants
   integer , public, parameter :: max_tapes = 6          ! max number of history tapes
   integer , public, parameter :: max_flds = 1000        ! max number of history fields 
   integer , public, parameter :: max_namlen = 32        ! maximum number of characters for field name
   real(r8), public, parameter :: spval = 1.e36          ! fill value
   Counters
   integer , public :: ntapes = 0          ! index of max history file requested 
   Namelist
   integer :: ni                          ! implicit index below
   logical, public :: &
        hist_empty_htapes  = .false.      ! namelist: flag indicates no default history fields
   integer, public :: &
        hist_ndens(max_tapes) = 2         ! namelist: output density of netcdf history files
   integer, public :: &
        hist_mfilt(max_tapes) = 30        ! namelist: number of time samples per tape
   logical, public :: &
        hist_dov2xy(max_tapes) = (/.true.,(.true.,ni=2,max_tapes)/) ! namelist: true=> do grid averaging
   integer, public :: &
        hist_nhtfrq(max_tapes) = (/0, (-24, ni=2,max_tapes)/)        ! namelist: history write freq(0=monthly)
   character(len=1), public :: &
        hist_avgflag_pertape(max_tapes) = (/(' ',ni=1,max_tapes)/)   ! namelist: per tape averaging flag
   character(len=max_namlen), public :: &
        hist_type1d_pertape(max_tapes)  = (/(' ',ni=1,max_tapes)/)   ! namelist: per tape type1d
 
   character(len=max_namlen+2), public :: &
        hist_fincl1(max_flds) = (/(' ',ni=1,max_flds)/) ! namelist: list of fields to add 
   character(len=max_namlen+2), public :: &
        hist_fincl2(max_flds) = (/(' ',ni=1,max_flds)/) ! namelist: list of fields to add  
   character(len=max_namlen+2), public :: &
        hist_fincl3(max_flds) = (/(' ',ni=1,max_flds)/) ! namelist: list of fields to add  
   character(len=max_namlen+2), public :: &
        hist_fincl4(max_flds) = (/(' ',ni=1,max_flds)/) ! namelist: list of fields to add  
   character(len=max_namlen+2), public :: &
        hist_fincl5(max_flds) = (/(' ',ni=1,max_flds)/) ! namelist: list of fields to add  
   character(len=max_namlen+2), public :: &
        hist_fincl6(max_flds) = (/(' ',ni=1,max_flds)/) ! namelist: list of fields to add  
   character(len=max_namlen+2), public :: &
        fincl(max_flds,max_tapes)    ! namelist-equivalence list of fields to add 
 
   character(len=max_namlen), public :: &
        hist_fexcl1(max_flds) = (/(' ',ni=1,max_flds)/) ! namelist: list of fields to remove 
   character(len=max_namlen), public :: &
        hist_fexcl2(max_flds) = (/(' ',ni=1,max_flds)/) ! namelist: list of fields to remove 
   character(len=max_namlen), public :: &
        hist_fexcl3(max_flds) = (/(' ',ni=1,max_flds)/) ! namelist: list of fields to remove 
   character(len=max_namlen), public :: &
        hist_fexcl4(max_flds) = (/(' ',ni=1,max_flds)/) ! namelist: list of fields to remove 
   character(len=max_namlen), public :: &
        hist_fexcl5(max_flds) = (/(' ',ni=1,max_flds)/) ! namelist: list of fields to remove 
   character(len=max_namlen), public :: &
        hist_fexcl6(max_flds) = (/(' ',ni=1,max_flds)/) ! namelist: list of fields to remove
   character(len=max_namlen), public :: &
        fexcl(max_flds,max_tapes)    ! namelist-equivalence list of fields to remove
   Equivalence used to satisfy namelist on a wide variety of platforms
   NOTE: It is *ASSUMED* that max_tapes is 6
    
   equivalence (hist_fincl1,fincl(1,1))
   equivalence (hist_fincl2,fincl(1,2))
   equivalence (hist_fincl3,fincl(1,3))
   equivalence (hist_fincl4,fincl(1,4))
   equivalence (hist_fincl5,fincl(1,5))
   equivalence (hist_fincl6,fincl(1,6))
 
   equivalence (hist_fexcl1,fexcl(1,1))
   equivalence (hist_fexcl2,fexcl(1,2))
   equivalence (hist_fexcl3,fexcl(1,3))
   equivalence (hist_fexcl4,fexcl(1,4))
   equivalence (hist_fexcl5,fexcl(1,5))
   equivalence (hist_fexcl6,fexcl(1,6))
   Restart
   logical, public :: if_writrest    ! true=> write restart file now  
   !PUBLIC MEMBER FUNCTIONS
   public  :: masterlist_build ! Build master field list of all possible history file fields 
   public  :: htapes_build     ! Initialize history file handler for initial or continue run
   public  :: htapes_wrapup    ! Write and/or dispose history tape(s) 
   public  :: update_hbuf      ! Updates history buffer 
   public  :: restart_history  ! Read/write history file restart data
   !REVISION HISTORY
   Created by Mariana Vertenstein



Subsections

Mariana Vertenstein 2003-01-14