INTERFACE:
subroutine casa_write_cpool()DESCRIPTION:
Writes out a CPOOL_INITIAL file containing the mapped carbon pools. It may be read later in initCASA() during initialization. This file is not saved or shipped to the Mass Storage System since it is really just for debugging. Carbon pool states are saved now in initial datasets.
USES:
use decompMod , only : get_proc_bounds, get_proc_global
use subgridAveMod, only : p2g
use domainMod , only : ldomain, llatlon
use clm_varpar , only : lsmlon, lsmlat
use spmdMod , only : masterproc
use ncdio_pio
ARGUMENTS:
implicit noneLOCAL VARIABLES:
type(file_desc_t):: ncid ! file id
integer :: omode ! netCDF mode returned
integer :: dimid ! netCDF dimension id
integer :: begp, endp ! per-proc beginning and ending pft indices
integer :: begc, endc ! per-proc beginning and ending column indices
integer :: begl, endl ! per-proc beginning and ending landunit indices
integer :: begg, endg ! per-proc gridcell ending gridcell indices
integer :: numg ! total number of gridcells across all processors
integer :: numl ! total number of landunits across all processors
integer :: numc ! total number of columns across all processors
integer :: nump ! total number of pfts across all processors
integer :: ier ! error flag
integer :: n,m,g ! index
real(r8), pointer :: histi(:,:)
real(r8), pointer :: histo(:,:)
real(r8), pointer :: hist1do(:)
character(len=32) :: subname='casa_write_cpool' ! subroutine name
! pointers
real(r8), pointer :: Tpool_C(:,:) ! Total C pool size
CALLED FROM:
initCASA() for debugging.REVISION HISTORY:
2004.08.17 Created by Forrest Hoffman