next up previous contents
Next: pointer_index Up: Fortran: Module Interface histFileMod Previous: hist_addfld1d   Contents



   subroutine hist_addfld2d (fname, type2d, units, avgflag, long_name, type1d_out, &
                         ptr_gcell, ptr_lunit, ptr_col, ptr_pft, ptr_lnd, ptr_atm, &
                         p2c_scale_type, c2l_scale_type, l2g_scale_type, &
                         set_lake, set_urb, set_nourb, set_spec, default)

Initialize a single level history field. The pointer, ptrhist, is a pointer to the clmtype array that the history buffer will use. The value of type1d passed to masterlist_add_fld determines which of the 1d type of the output and the beginning and ending indices the history buffer field). Default history contents for given field on all tapes are set by calling [masterlist_make_active] for the appropriatae tape. After the masterlist is built, routine [htapes_build] is called for an initial or branch run to initialize the actual history tapes.


     use clmtype
     use clm_varpar, only : nlevgrnd, nlevlak, numrad
 #if (defined CASA)
     use CASAMod,    only : nlive, npools, npool_types
     implicit none
     character(len=*), intent(in) :: fname                    ! field name
     character(len=*), intent(in) :: type2d                   ! 2d output type
     character(len=*), intent(in) :: units                    ! units of field
     character(len=1), intent(in) :: avgflag                  ! time averaging flag
     character(len=*), intent(in) :: long_name                ! long name of field
     character(len=*), optional, intent(in) :: type1d_out     ! output type (from clmtype)
     real(r8)        , optional, pointer    :: ptr_atm(:,:)   ! pointer to atm array
     real(r8)        , optional, pointer    :: ptr_lnd(:,:)   ! pointer to lnd array
     real(r8)        , optional, pointer    :: ptr_gcell(:,:) ! pointer to gridcell array
     real(r8)        , optional, pointer    :: ptr_lunit(:,:) ! pointer to landunit array
     real(r8)        , optional, pointer    :: ptr_col(:,:)   ! pointer to column array
     real(r8)        , optional, pointer    :: ptr_pft(:,:)   ! pointer to pft array
     real(r8)        , optional, intent(in) :: set_lake       ! value to set lakes to
     real(r8)        , optional, intent(in) :: set_urb        ! value to set urban to
     real(r8)        , optional, intent(in) :: set_nourb      ! value to set non-urban to
     real(r8)        , optional, intent(in) :: set_spec       ! value to set special to
     character(len=*), optional, intent(in) :: p2c_scale_type ! scale type for subgrid averaging of pfts to column
     character(len=*), optional, intent(in) :: c2l_scale_type ! scale type for subgrid averaging of columns to landunits
     character(len=*), optional, intent(in) :: l2g_scale_type ! scale type for subgrid averaging of landunits to gridcells
     character(len=*), optional, intent(in) :: default        ! if set to 'inactive, field will not appear on primary tape
   Created by Mariana Vertenstein

Erik Kluzek 2011-06-15