LCOV - code coverage report
Current view: top level - chemistry/mozart - mo_chemini.F90 (source / functions) Hit Total Coverage
Test: coverage.info Lines: 45 47 95.7 %
Date: 2024-12-17 22:39:59 Functions: 1 1 100.0 %

          Line data    Source code
       1             : 
       2             : module mo_chemini
       3             : 
       4             :   use shr_kind_mod, only : r8 => shr_kind_r8
       5             :   use spmd_utils,   only : masterproc
       6             :   use cam_logfile,  only : iulog
       7             : 
       8             :   implicit none
       9             : 
      10             :   private
      11             :   public :: chemini
      12             : 
      13             : contains
      14             : 
      15        1536 :   subroutine chemini &
      16             :        ( euvac_file &
      17             :        , photon_file &
      18             :        , electron_file &
      19             :        , airpl_emis_file &
      20             :        , depvel_lnd_file &
      21             :        , xs_coef_file &
      22             :        , xs_short_file &
      23             :        , xs_long_file &
      24             :        , photo_max_zen &
      25             :        , rsf_file &
      26             :        , fstrat_file &
      27        3072 :        , fstrat_list &
      28        1536 :        , srf_emis_specifier &
      29             :        , srf_emis_type &
      30             :        , srf_emis_cycle_yr &
      31             :        , srf_emis_fixed_ymd &
      32             :        , srf_emis_fixed_tod &
      33        1536 :        , ext_frc_specifier &
      34             :        , ext_frc_type &
      35             :        , ext_frc_cycle_yr &
      36             :        , ext_frc_fixed_ymd &
      37             :        , ext_frc_fixed_tod &
      38             :        , exo_coldens_file &
      39             :        , use_hemco &
      40             :        , pbuf2d &
      41             :        )
      42             : 
      43             :     !-----------------------------------------------------------------------
      44             :     !   ... Chemistry module intialization
      45             :     !-----------------------------------------------------------------------
      46             : 
      47             :     use mo_airplane,       only : airpl_src
      48             :     use mo_srf_emissions,  only : srf_emissions_inti
      49             :     use mo_sulf,           only : sulf_inti
      50             :     use mo_photo,          only : photo_inti
      51             :     use mo_drydep,         only : drydep_inti
      52             :     use mo_imp_sol,        only : imp_slv_inti
      53             :     use mo_exp_sol,        only : exp_sol_inti
      54             :     use spmd_utils,        only : iam
      55             :     use mo_fstrat,         only : fstrat_inti
      56             :     use mo_sethet,         only : sethet_inti
      57             :     use mo_usrrxt,         only : usrrxt_inti
      58             :     use hco_cc_emissions,  only : hco_extfrc_inti
      59             :     use mo_extfrc,         only : extfrc_inti
      60             :     use mo_setext,         only : setext_inti
      61             :     use mo_setinv,         only : setinv_inti
      62             :     use mo_gas_phase_chemdr,only: gas_phase_chemdr_inti
      63             : 
      64             :     use tracer_cnst,       only : tracer_cnst_init
      65             :     use tracer_srcs,       only : tracer_srcs_init
      66             :     use mo_airglow,        only : init_airglow
      67             :     use mo_mean_mass,      only : init_mean_mass
      68             :     use mo_mass_xforms,    only : init_mass_xforms
      69             :     use mo_strato_rates,   only : init_strato_rates
      70             :     use mo_cph,            only : init_cph
      71             :     use mo_sad,            only : sad_inti
      72             :     use euvac,             only : euvac_init
      73             :     use mo_heatnirco2,     only : heatnirco2_init
      74             :     use mo_waccm_hrates,   only : init_hrates
      75             :     use mo_aurora,         only : aurora_inti
      76             :     use clybry_fam,        only : clybry_fam_init
      77             :     use mo_neu_wetdep,     only : neu_wetdep_init
      78             :     use physics_buffer,    only : physics_buffer_desc
      79             :     use cam_abortutils,    only : endrun
      80             : 
      81             :     character(len=*), intent(in) :: euvac_file
      82             :     character(len=*), intent(in) :: photon_file
      83             :     character(len=*), intent(in) :: electron_file
      84             : 
      85             :     character(len=*), intent(in) :: airpl_emis_file
      86             :     character(len=*), intent(in) :: depvel_lnd_file
      87             :     character(len=*), intent(in) :: xs_coef_file
      88             :     character(len=*), intent(in) :: xs_short_file
      89             :     character(len=*), intent(in) :: xs_long_file
      90             :     real(r8),         intent(in) :: photo_max_zen
      91             :     character(len=*), intent(in) :: rsf_file
      92             :     character(len=*), intent(in) :: fstrat_file
      93             :     character(len=*), intent(in) :: fstrat_list(:)
      94             :     character(len=*), dimension(:), intent(in) :: srf_emis_specifier
      95             :     character(len=*), dimension(:), intent(in) :: ext_frc_specifier
      96             :     character(len=*), intent(in) :: exo_coldens_file
      97             :     character(len=*), intent(in) :: ext_frc_type
      98             :     integer,          intent(in) :: ext_frc_cycle_yr
      99             :     integer,          intent(in) :: ext_frc_fixed_ymd
     100             :     integer,          intent(in) :: ext_frc_fixed_tod
     101             :     character(len=*), intent(in) :: srf_emis_type
     102             :     integer,          intent(in) :: srf_emis_cycle_yr
     103             :     integer,          intent(in) :: srf_emis_fixed_ymd
     104             :     integer,          intent(in) :: srf_emis_fixed_tod
     105             :     logical,          intent(in) :: use_hemco
     106             : 
     107             :     type(physics_buffer_desc), pointer :: pbuf2d(:,:)
     108             : 
     109             :     !-----------------------------------------------------------------------
     110             :     !   ... initialize the implicit solver
     111             :     !-----------------------------------------------------------------------
     112        1536 :     call imp_slv_inti()
     113        1536 :     call exp_sol_inti()
     114             : 
     115        1536 :     call gas_phase_chemdr_inti()
     116             : 
     117        1536 :     call init_mean_mass
     118        1536 :     call init_mass_xforms
     119             : 
     120        1536 :     call setinv_inti()
     121        1536 :     call sethet_inti()
     122        1536 :     call usrrxt_inti()
     123        1536 :     call init_hrates
     124        1536 :     call init_airglow
     125             : 
     126        1536 :     call init_strato_rates
     127        1536 :     call init_cph
     128             : 
     129             :     !-----------------------------------------------------------------------
     130             :     !   ... initialize tracer modules
     131             :     !-----------------------------------------------------------------------
     132        1536 :     call tracer_cnst_init()
     133        1536 :     call tracer_srcs_init()
     134             : 
     135             :     !-----------------------------------------------------------------------
     136             :     !   ... read time-independent airplane emissions
     137             :     !-----------------------------------------------------------------------
     138        1536 :     call airpl_src(airpl_emis_file)
     139        1536 :     if (masterproc) write(iulog,*) 'chemini: after airpl_src on node ',iam
     140             : 
     141             :     !-----------------------------------------------------------------------
     142             :     !   ... read time-dependent surface flux dataset
     143             :     !-----------------------------------------------------------------------
     144        1536 :     call srf_emissions_inti ( srf_emis_specifier, srf_emis_type, srf_emis_cycle_yr, srf_emis_fixed_ymd, srf_emis_fixed_tod)
     145             : 
     146        1536 :     if (masterproc) write(iulog,*) 'chemini: after srf_emissions_inti on node ',iam
     147             : 
     148             :     !-----------------------------------------------------------------------
     149             :     !   ... initialize external forcings module
     150             :     !-----------------------------------------------------------------------
     151        1536 :     call setext_inti()
     152             : 
     153        1536 :     if ( use_hemco ) then
     154             :         ! Initialize HEMCO version of extfrc_inti
     155           0 :         call hco_extfrc_inti()
     156           0 :         if (masterproc) write(iulog,*) 'chemini: after hco_extfrc_inti on node ',iam
     157             :     else
     158        1536 :         call extfrc_inti(ext_frc_specifier, ext_frc_type, ext_frc_cycle_yr, ext_frc_fixed_ymd, ext_frc_fixed_tod)
     159        1536 :         if (masterproc) write(iulog,*) 'chemini: after extfrc_inti on node ',iam
     160             :     endif
     161             : 
     162        1536 :     call sulf_inti()
     163        1536 :     if (masterproc) write(iulog,*) 'chemini: after sulf_inti on node ',iam
     164             : 
     165             :     !-----------------------------------------------------------------------
     166             :     !   ... initialize the sad module
     167             :     !-----------------------------------------------------------------------
     168        1536 :     call sad_inti(pbuf2d)
     169        1536 :     if (masterproc) write(iulog,*) 'chemini: after sad_inti on node ',iam
     170             : 
     171             :     !-----------------------------------------------------------------------
     172             :     !   ... initialize the dry deposition module
     173             :     !-----------------------------------------------------------------------
     174        1536 :     call drydep_inti(depvel_lnd_file)
     175             : 
     176        1536 :     if (masterproc) write(iulog,*) 'chemini: after drydep_inti on node ',iam
     177             : 
     178             :     !-----------------------------------------------------------------------
     179             :     !   ... Initialize the upper boundary module
     180             :     !-----------------------------------------------------------------------
     181        1536 :     call fstrat_inti( fstrat_file, fstrat_list )
     182        1536 :     if (masterproc) write(iulog,*) 'chemini: after fstrat_inti on node ',iam
     183             : 
     184             :     !-----------------------------------------------------------------------
     185             :     !   ... initialize the co2 nir heating module
     186             :     !-----------------------------------------------------------------------
     187        1536 :     call heatnirco2_init
     188             : 
     189             :     !-----------------------------------------------------------------------
     190             :     !   ... initialize photorate module
     191             :     !-----------------------------------------------------------------------
     192             : 
     193             :     !-----------------------------------------------------------------------
     194             :     !   ... initialize the euvac etf module
     195             :     !-----------------------------------------------------------------------
     196        1536 :     call euvac_init (euvac_file)
     197             : 
     198             :     call photo_inti( xs_coef_file, xs_short_file, xs_long_file, rsf_file, &
     199             :          photon_file, electron_file, &
     200        1536 :          exo_coldens_file, photo_max_zen )
     201             : 
     202        1536 :     if (masterproc) write(iulog,*) 'chemini: after photo_inti on node ',iam
     203             : 
     204             :     !-----------------------------------------------------------------------
     205             :     !   ... initialize ion production
     206             :     !-----------------------------------------------------------------------
     207        1536 :     call aurora_inti(pbuf2d)
     208        1536 :     if (masterproc) write(iulog,*) 'chemini: after aurora_inti'
     209             : 
     210        1536 :     call neu_wetdep_init()
     211        1536 :     if (masterproc) write(iulog,*) 'chemini: after wetdep_init'
     212             : 
     213        1536 :     call clybry_fam_init()
     214             : 
     215        1536 :     if (masterproc) write(iulog,*) 'chemini: finished on node ',iam
     216             : 
     217        1536 :   end subroutine chemini
     218             : 
     219             : end module mo_chemini

Generated by: LCOV version 1.14