cable_soil_params.F90 Source File


This file depends on

sourcefile~~cable_soil_params.f90~~EfferentGraph sourcefile~cable_soil_params.f90 cable_soil_params.F90 sourcefile~cable_define_types.f90 cable_define_types.F90 sourcefile~cable_soil_params.f90->sourcefile~cable_define_types.f90 sourcefile~grid_constants_cbl.f90 grid_constants_cbl.F90 sourcefile~cable_soil_params.f90->sourcefile~grid_constants_cbl.f90 sourcefile~cable_climate_type_mod.f90 cable_climate_type_mod.F90 sourcefile~cable_define_types.f90->sourcefile~cable_climate_type_mod.f90 sourcefile~cable_climate_type_mod.f90->sourcefile~grid_constants_cbl.f90 sourcefile~cable_common.f90 cable_common.F90 sourcefile~cable_climate_type_mod.f90->sourcefile~cable_common.f90 sourcefile~cable_runtime_opts_mod.f90 cable_runtime_opts_mod.F90 sourcefile~cable_common.f90->sourcefile~cable_runtime_opts_mod.f90

Files dependent on this one

sourcefile~~cable_soil_params.f90~~AfferentGraph sourcefile~cable_soil_params.f90 cable_soil_params.F90 sourcefile~cable_parameters.f90 cable_parameters.F90 sourcefile~cable_parameters.f90->sourcefile~cable_soil_params.f90 sourcefile~cable_input.f90 cable_input.F90 sourcefile~cable_input.f90->sourcefile~cable_parameters.f90 sourcefile~cable_driver_common.f90 cable_driver_common.F90 sourcefile~cable_driver_common.f90->sourcefile~cable_input.f90 sourcefile~cable_mpimaster.f90 cable_mpimaster.F90 sourcefile~cable_mpimaster.f90->sourcefile~cable_input.f90 sourcefile~cable_mpimaster.f90->sourcefile~cable_driver_common.f90 sourcefile~cable_mpiworker.f90 cable_mpiworker.F90 sourcefile~cable_mpiworker.f90->sourcefile~cable_input.f90 sourcefile~cable_mpiworker.f90->sourcefile~cable_driver_common.f90 sourcefile~cable_serial.f90 cable_serial.F90 sourcefile~cable_serial.f90->sourcefile~cable_input.f90 sourcefile~cable_serial.f90->sourcefile~cable_driver_common.f90 sourcefile~cable_offline_driver.f90 cable_offline_driver.F90 sourcefile~cable_offline_driver.f90->sourcefile~cable_driver_common.f90 sourcefile~cable_offline_driver.f90->sourcefile~cable_serial.f90

Source Code

MODULE cable_soil_params_mod

USE grid_constants_mod_cbl, ONLY: nsoil_max   ! # of soil types [9]
IMPLICIT NONE 

TYPE soilin_type

  CHARACTER(LEN=70) ::  desc(nsoil_max) ! decriptns of soil type 

   REAL, DIMENSION(nsoil_max) ::                                        &
      silt,    & !
      clay,    & !
      sand,    & !
      swilt,   & !
      sfc,     & !
      ssat,    & !
      bch,     & !
      hyds,    & !
      sucs,    & !
      rhosoil, & !
      css,     & !
      c3         !

END TYPE soilin_type

TYPE(soilin_type), SAVE  :: soilin

CHARACTER(LEN=70), DIMENSION(nsoil_max) ::  soil_desc    

CONTAINS

subroutine cable_soil_params()

! Gets parameter values for each vegetation type and soil type.
USE cable_def_types_mod, ONLY : mstype

implicit none

integer :: ERROR
integer, parameter :: namelist_unit=711178
integer :: j
CHARACTER(LEN=*), parameter :: iomessage='something wrong with your soil params file' 
CHARACTER(LEN=*), parameter :: nml_dir='./' 
CHARACTER(LEN=*), PARAMETER :: routinename='cable_soil_params'

NAMELIST / cable_soilparm / soilin

mstype = nsoil_max 
 
!SOIL parameters are assigned as TYPE soilin% but later mapped to soil%

!-----------------------------------------------------------------------------
! Read namelist
!-----------------------------------------------------------------------------
write (6,*) "Reading CABLE_SOILPARM namelist..."

OPEN( namelist_unit, FILE=(TRIM(nml_dir) // '/' // 'cable_soilparm.nml'),          &
      STATUS='old', POSITION='rewind', ACTION='read', IOSTAT  = ERROR )
IF ( ERROR /= 0 ) write (6,*) "Error opening  CABLE_SOILPARM namelist..."

READ(namelist_unit, NML = cable_soilparm, IOSTAT = ERROR )
IF ( ERROR /= 0 ) write (6,*) "Error reading  CABLE_SOILPARM namelist..."
                 
CLOSE(namelist_unit, IOSTAT = ERROR)

soil_desc = soilin%desc

End subroutine cable_soil_params

END MODULE cable_soil_params_mod