!//=========================================================================
!// Oslo CTM3 v2015.01
!//=========================================================================
!// Ole Amund Sovde, May 2015
!//=========================================================================
!// DUMMY.
!//=========================================================================
module soa_oslo
  !// ----------------------------------------------------------------------
  !// MODULE: soa_oslo
  !// DESCRIPTION: SOA DUMMY.
  !//
  !// Amund Sovde, July 2012
  !// ----------------------------------------------------------------------
  implicit none
  !// ----------------------------------------------------------------------
  integer,parameter :: ndep_soa = 1
  integer,dimension(ndep_soa),parameter   :: soa_deps = (/-1/)
  !// ----------------------------------------------------------------------
  private
  public soa_init, soa_setdrydep, SOA_v9_separate, soa_diag_drydep, &
       soa_diag_separate, soa_diag2file, soa_nopsdiag, &
       ndep_soa, soa_deps, soa_diag_lsscav, soa_diag_soagas
  !// ----------------------------------------------------------------------

contains


  !// ----------------------------------------------------------------------
  subroutine soa_init()
    !// --------------------------------------------------------------------
    !// Initialize SOA simulations.
    !//
    !// Amund Sovde, June 2012
    !// --------------------------------------------------------------------
    use cmn_size, only: LSOA
    use cmn_chem, only: TNAME
    use cmn_oslo, only: trsp_idx
    !// --------------------------------------------------------------------
    implicit none
    !// --------------------------------------------------------------------

    !// Check for name of component id 12
    if (.not.LSOA .and. TNAME(trsp_idx(12)).ne.'C6HXR') then
       write(*,'(a)') '* Tracer 12 is wrongly named: '//trim(TNAME(trsp_idx(12)))
       write(*,'(a)') '  It must be named C6HXR when not including SOA'
       stop
    endif

    !// --------------------------------------------------------------------
  end subroutine soa_init
  !// ----------------------------------------------------------------------



  !// ----------------------------------------------------------------------
  subroutine soa_setdrydep(VDEP,MP)
    !// --------------------------------------------------------------------
    !// DUMMY.
    !//
    !// Amund Sovde, July 2012
    !// --------------------------------------------------------------------
    use cmn_precision, only: r8
    use cmn_size, only: NPAR, IPAR, JPAR
    !// --------------------------------------------------------------------
    implicit none
    !// --------------------------------------------------------------------
    !// Input
    integer, intent(in) :: MP
    real(r8), intent(in) :: VDEP(NPAR,IPAR,JPAR)
    !// --------------------------------------------------------------------

    return

    !// --------------------------------------------------------------------
  end subroutine soa_setdrydep
  !// ----------------------------------------------------------------------



  !// ----------------------------------------------------------------------
  subroutine SOA_v9_separate( &
       ZC_MASS, & !// the mass of each species
       TEMP, &    !// temperature in column
       DV, &      !// volume in column
       ILOC, &    !// I-box
       JLOC, &    !// J-box
       LSTART, &  !// Start level for calculations
       LEND )     !// End level for calculations
    !// --------------------------------------------------------------------
    use cmn_precision, only: r8
    use cmn_size, only: LPAR, TRACER_ID_MAX
    !// --------------------------------------------------------------------
    !// DUMMY.
    !//
    !// Amund Sovde, July 2012
    !// --------------------------------------------------------------------
    implicit none
    !// --------------------------------------------------------------------
    !// Input
    integer, intent(in) :: ILOC, JLOC, LSTART, LEND
    real(r8), intent(in) :: TEMP(LPAR), DV(LPAR)
    real(r8), intent(in) :: ZC_MASS(TRACER_ID_MAX,LPAR)
    !// --------------------------------------------------------------------

    return

    !// --------------------------------------------------------------------
  end subroutine SOA_v9_separate
  !// ----------------------------------------------------------------------



  !// ----------------------------------------------------------------------
  subroutine soa_diag_drydep(DRYDEP,DV,I,J)
    !// --------------------------------------------------------------------
    !// DUMMY.
    !//
    !// Amund Sovde, July 2012
    !// --------------------------------------------------------------------
    use cmn_precision, only: r8
    use cmn_size, only: LPAR, TRACER_ID_MAX
    !// --------------------------------------------------------------------
    implicit none
    !// --------------------------------------------------------------------
    !// Input
    integer, intent(in) :: I,J
    real(r8), intent(in) :: DRYDEP(TRACER_ID_MAX), DV(LPAR)
    !// --------------------------------------------------------------------

    return

    !// --------------------------------------------------------------------
  end subroutine soa_diag_drydep
  !// ----------------------------------------------------------------------



  !// ----------------------------------------------------------------------
  subroutine soa_diag_separate(PROD,I,J,LSTART,LEND)
    !// --------------------------------------------------------------------
    !// DUMMY.
    !//
    !// Amund Sovde, July 2012
    !// --------------------------------------------------------------------
    use cmn_precision, only: r8
    use cmn_size, only: LPAR, TRACER_ID_MAX
    !// --------------------------------------------------------------------
    implicit none
    !// --------------------------------------------------------------------
    !// Input
    integer, intent(in) :: I,J,LSTART,LEND
    real(r8), intent(in) :: PROD(TRACER_ID_MAX,LPAR)
    !// --------------------------------------------------------------------

    return

    !// --------------------------------------------------------------------
  end subroutine soa_diag_separate
  !// ----------------------------------------------------------------------



  !// ----------------------------------------------------------------------
  subroutine soa_diag2file(NDAY,NDAYI)
    !// --------------------------------------------------------------------
    !// DUMMY.
    !//
    !// Amund Sovde, July 2012
    !// --------------------------------------------------------------------
    implicit none
    !// --------------------------------------------------------------------
    !// Input
    integer, intent(in) :: NDAY, NDAYI
    !// --------------------------------------------------------------------

    return

    !// --------------------------------------------------------------------
  end subroutine soa_diag2file
  !// ----------------------------------------------------------------------



  !// ----------------------------------------------------------------------
  subroutine soa_nopsdiag(NDAY,NMET,NOPS,JDAY,DTOPS)
    !// --------------------------------------------------------------------
    !// DUMMY.
    !//
    !// Amund Sovde, July 2012
    !// --------------------------------------------------------------------
    use cmn_precision, only: r8
    !// --------------------------------------------------------------------
    implicit none
    !// --------------------------------------------------------------------
    !// Input
    integer, intent(in) :: NDAY, NMET, NOPS, JDAY
    real(r8), intent(in) :: DTOPS
    !// --------------------------------------------------------------------

    return

    !// --------------------------------------------------------------------
  end subroutine soa_nopsdiag
  !// ----------------------------------------------------------------------



  !// ----------------------------------------------------------------------
  subroutine soa_diag_lsscav(BTT,BTTBCK,MP)
    !// --------------------------------------------------------------------
    !// DUMMY.
    !//
    !// Amund Sovde, August 2014
    !// --------------------------------------------------------------------
    use cmn_precision, only: r8
    use cmn_size, only: LPAR, NPAR, IDBLK, JDBLK
    !// --------------------------------------------------------------------
    implicit none
    !// --------------------------------------------------------------------
    !// Input
    integer, intent(in) :: MP
    !// In
    real(r8), dimension(LPAR,NPAR,IDBLK,JDBLK), intent(in):: BTT
    real(r8), dimension(LPAR,NPAR,IDBLK,JDBLK), intent(in):: BTTBCK
    !// --------------------------------------------------------------------

    return

    !// --------------------------------------------------------------------
  end subroutine soa_diag_lsscav
  !// ----------------------------------------------------------------------



  !// ----------------------------------------------------------------------
  subroutine soa_diag_soagas(PROD,I,J,LSTART,LEND)
    !// --------------------------------------------------------------------
    !// DUMMY.
    !//
    !// Amund Sovde, May 2016
    !// --------------------------------------------------------------------
    use cmn_precision, only: r8
    use cmn_size, only: TRACER_ID_MAX, LPAR
    !// --------------------------------------------------------------------
    implicit none
    !// --------------------------------------------------------------------
    !// Input
    integer, intent(in) :: I,J,LSTART,LEND
    real(r8), intent(in) :: PROD(TRACER_ID_MAX,LPAR) !// [kg/gridbox]
    !// --------------------------------------------------------------------

    return
    
    !// --------------------------------------------------------------------
  end subroutine soa_diag_soagas
  !// ----------------------------------------------------------------------


  !// ----------------------------------------------------------------------
end module soa_oslo
!//=========================================================================
