Index: palm/trunk/SOURCE/chem_emissions_mod.f90
===================================================================
--- palm/trunk/SOURCE/chem_emissions_mod.f90	(revision 3611)
+++ palm/trunk/SOURCE/chem_emissions_mod.f90	(revision 3685)
@@ -22,9 +22,12 @@
 ! Current revisions:
 ! ------------------
-!
+! 
 ! 
 ! Former revisions:
 ! -----------------
 ! $Id$
+! Some interface calls moved to module_interface + cleanup
+! 
+! 3611 2018-12-07 14:14:11Z banzhafs
 ! Code update to comply PALM coding rules
 ! removed unnecessary informative messsages/location
@@ -693,23 +696,17 @@
 !> fluxes at timestep 0 
 !------------------------------------------------------------------------------!
- SUBROUTINE chem_emissions_init( emt_att, emt, nspec_out )
+ SUBROUTINE chem_emissions_init
 
     USE surface_mod,                                                           &
         ONLY:  surf_def_h, surf_lsm_h, surf_usm_h
+
+    USE netcdf_data_input_mod,                                                 &
+        ONLY:  chem_emis, chem_emis_att
     
     IMPLICIT NONE
  
     CHARACTER (LEN=80)          ::  units                                           !< units of inputs
-    
-    INTEGER(iwp), INTENT(INOUT) ::  nspec_out                                       !< number of outputs
 
     INTEGER(iwp)                :: ispec                                            !< running index
-
-    TYPE(chem_emis_att_type), INTENT(INOUT) ::  emt_att                             !< variable where to store all the information
-                                                                                    !< of emission inputs whose values do not 
-                                                                                    !< depend on the considered species
-
-    TYPE(chem_emis_val_type), INTENT(INOUT), ALLOCATABLE, DIMENSION(:) ::  emt      !< variable where to store emission input  
-                                                                                    !< values depending on the considered species
 
 !    
@@ -730,5 +727,5 @@
   !
   !-- Matching
-  CALL  chem_emissions_match( emt_att, nspec_out )
+  CALL  chem_emissions_match( chem_emis_att, nspec_out )
  
   IF ( nspec_out == 0 )  THEN
@@ -743,19 +740,19 @@
      !
      !-- Set molecule masses' 
-     ALLOCATE( emt_att%xm(nspec_out) )
+     ALLOCATE( chem_emis_att%xm(nspec_out) )
 
      DO ispec = 1, nspec_out
         SELECT CASE ( TRIM( spc_names(match_spec_model(ispec)) ) )
-           CASE ( 'SO2' ); emt_att%xm(ispec) = xm_S + xm_O * 2        !< kg/mole
-           CASE ( 'SO4' ); emt_att%xm(ispec) = xm_S + xm_O * 4        !< kg/mole
-           CASE ( 'NO' ); emt_att%xm(ispec) = xm_N + xm_O             !< kg/mole
-           CASE ( 'NO2' ); emt_att%xm(ispec) = xm_N + xm_O * 2        !< kg/mole   
-           CASE ( 'NH3' ); emt_att%xm(ispec) = xm_N + xm_H * 3        !< kg/mole
-           CASE ( 'CO'  ); emt_att%xm(ispec) = xm_C + xm_O            !< kg/mole
-           CASE ( 'CO2' ); emt_att%xm(ispec) = xm_C + xm_O * 2        !< kg/mole
-           CASE ( 'CH4' ); emt_att%xm(ispec) = xm_C + xm_H * 4        !< kg/mole     
-           CASE ( 'HNO3' ); emt_att%xm(ispec) = xm_H + xm_N + xm_O*3  !< kg/mole  
+           CASE ( 'SO2' ); chem_emis_att%xm(ispec) = xm_S + xm_O * 2        !< kg/mole
+           CASE ( 'SO4' ); chem_emis_att%xm(ispec) = xm_S + xm_O * 4        !< kg/mole
+           CASE ( 'NO' ); chem_emis_att%xm(ispec) = xm_N + xm_O             !< kg/mole
+           CASE ( 'NO2' ); chem_emis_att%xm(ispec) = xm_N + xm_O * 2        !< kg/mole   
+           CASE ( 'NH3' ); chem_emis_att%xm(ispec) = xm_N + xm_H * 3        !< kg/mole
+           CASE ( 'CO'  ); chem_emis_att%xm(ispec) = xm_C + xm_O            !< kg/mole
+           CASE ( 'CO2' ); chem_emis_att%xm(ispec) = xm_C + xm_O * 2        !< kg/mole
+           CASE ( 'CH4' ); chem_emis_att%xm(ispec) = xm_C + xm_H * 4        !< kg/mole     
+           CASE ( 'HNO3' ); chem_emis_att%xm(ispec) = xm_H + xm_N + xm_O*3  !< kg/mole  
            CASE DEFAULT
-              emt_att%xm(ispec) = 1.0_wp
+              chem_emis_att%xm(ispec) = 1.0_wp
         END SELECT
      ENDDO
@@ -775,5 +772,5 @@
            !
            !-- Get emissions at the first time step
-           CALL chem_emissions_setup( emt_att, emt, nspec_out )
+           CALL chem_emissions_setup( chem_emis_att, chem_emis, nspec_out )
 
         !
@@ -785,5 +782,5 @@
            !
            !-- Get emissions at the first time step
-           CALL chem_emissions_setup( emt_att, emt, nspec_out )
+           CALL chem_emissions_setup( chem_emis_att, chem_emis, nspec_out )
 
         !
@@ -795,5 +792,5 @@
            !
            !-- Get emissions at the first time step
-           CALL chem_emissions_setup( emt_att, emt, nspec_out)
+           CALL chem_emissions_setup( chem_emis_att, chem_emis, nspec_out)
 
      END SELECT
