Changeset 3652 for palm/trunk
- Timestamp:
- Jan 7, 2019 3:29:59 PM (6 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/chem_modules.f90
r3636 r3652 27 27 ! ----------------- 28 28 ! $Id$ 29 ! parameter chem_mechanism added (basit) 30 ! 31 ! 32 ! 3636 2018-12-19 13:48:34Z raasch 29 33 ! nopointer option removed 30 34 ! … … 133 137 CHARACTER (LEN=80) :: time_fac_type ='MDH' !< Type of time treatment in the emis DEFAULT mode: HOUR .OR. MDH 134 138 CHARACTER (LEN=80) :: daytype_mdh ='workday' !< Type of day in the MDH case: workday, weekend, holiday 135 CHARACTER (LEN=11), DIMENSION(99) :: data_output_pr_cs = 'novalue' !< Namelist parameter: Names of the che mfor profile output139 CHARACTER (LEN=11), DIMENSION(99) :: data_output_pr_cs = 'novalue' !< Namelist parameter: Names of the chem species for profile output 136 140 !< by cs_name for each height lvls defined by cs_heights 141 CHARACTER (LEN=30) :: chem_mechanism = 'phstatp' !< Namelist parameter: Name of chemistry mechanism 142 !< (must match with third line in chem_gasphase_mod.f90) 137 143 ! 138 144 !-- Namelist parameters for chem_emissions -
palm/trunk/SOURCE/chemistry_model_mod.f90
r3646 r3652 27 27 ! ----------------- 28 28 ! $Id$ 29 ! Checks added for chemistry mechanism, parameter chem_mechanism added (basit) 30 ! 31 ! 32 ! 3646 2018-12-28 17:58:49Z kanani 29 33 ! Bugfix: use time_since_reference_point instead of simulated_time (relevant 30 34 ! when using wall/soil spinup) … … 1120 1124 INTEGER (iwp) :: lsp_usr !< running index for user defined chem spcs 1121 1125 INTEGER (iwp) :: lsp !< running index for chem spcs. 1122 1126 CHARACTER (LEN=30) :: cs_mech,a1,b1,string 1127 1128 1129 OPEN (10,FILE="chem_gasphase_mod.f90") !get the chem_mechanism name from the file. 1130 READ (10, 100) a1,b1,string 1131 cs_mech = trim(string(16:)) 1132 100 FORMAT(a) 1133 CLOSE(10) 1123 1134 1124 1135 ! … … 1153 1164 CALL message( 'chem_check_parameters', 'CM0426', 1, 2, 0, 6, 0 ) 1154 1165 ENDIF 1166 !-- check for chemical mechanism used 1167 IF (chem_mechanism /= trim(cs_mech) ) THEN 1168 message_string = 'Incorrect chemical mechanism selected, please check spelling and/or chem_gasphase_mod' 1169 CALL message( 'chem_check_parameters', 'CM0462', 1, 2, 0, 6, 0 ) 1170 ENDIF 1171 1155 1172 1156 1173 !--------------------- 1157 1174 !-- chem_check_parameters is called before the array chem_species is allocated! 1158 1175 !-- temporary switch of this part of the check 1159 RETURN 1176 ! RETURN !bK commented 1160 1177 !--------------------- 1161 1178 … … 1173 1190 IF ( .not. found ) THEN 1174 1191 message_string = 'Unused/incorrect input for initial surface value: ' // TRIM(cs_name(lsp_usr)) 1175 CALL message( 'chem_check_parameters', 'CM0427', 0, 1, 0, 6, 0 )1192 CALL message( 'chem_check_parameters', 'CM0427', 1, 2, 0, 6, 0 ) 1176 1193 ENDIF 1177 1194 lsp_usr = lsp_usr + 1 … … 1193 1210 message_string = 'Unused/incorrect input of chemical species for surface emission fluxes: ' & 1194 1211 // TRIM(surface_csflux_name(lsp_usr)) 1195 CALL message( 'chem_check_parameters', 'CM0428', 0, 1, 0, 6, 0 )1212 CALL message( 'chem_check_parameters', 'CM0428', 1, 2, 0, 6, 0 ) 1196 1213 ENDIF 1197 1214 lsp_usr = lsp_usr + 1 … … 1590 1607 CHARACTER (LEN=80) :: docsflux_chr 1591 1608 CHARACTER (LEN=80) :: docsinit_chr 1592 1593 ! 1609 CHARACTER (LEN=30) :: cs_mech,a1,b1,string 1610 1611 ! 1612 OPEN (10,FILE="chem_gasphase_mod.f90") !get the chem_mechanism name from the file. 1613 READ (10, 100) a1,b1,string 1614 cs_mech = trim(string(16:)) 1615 100 FORMAT(a) 1616 CLOSE(10) 1617 1594 1618 !-- Write chemistry model header 1595 1619 WRITE( io, 1 ) … … 1658 1682 !-- number of variable and fix chemical species and number of reactions 1659 1683 cs_fixed = nspec - nvar 1684 1685 WRITE ( io, * ) ' --> Chemical Mechanism : ', cs_mech 1660 1686 WRITE ( io, * ) ' --> Chemical species, variable: ', nvar 1661 1687 WRITE ( io, * ) ' --> Chemical species, fixed : ', cs_fixed … … 1960 1986 REAL(wp), PARAMETER :: t_std = 273.15_wp !< standard pressure (Pa) 1961 1987 REAL(wp), PARAMETER :: p_std = 101325.0_wp !< standard pressure (Pa) 1962 REAL(wp), PARAMETER :: vmolcm = 22.414e3_wp !< Mole volume (22.414 l) in cm^ {-3}1988 REAL(wp), PARAMETER :: vmolcm = 22.414e3_wp !< Mole volume (22.414 l) in cm^3 1963 1989 REAL(wp), PARAMETER :: xna = 6.022e23_wp !< Avogadro number (molecules/mol) 1964 1990 … … 2076 2102 chem_debug2, & 2077 2103 chem_gasphase_on, & 2104 chem_mechanism, & 2078 2105 cs_heights, & 2079 2106 cs_name, & … … 2560 2587 INTEGER(iwp) :: m !< 2561 2588 INTEGER(iwp) :: lpr !< running index chem spcs 2589 LOGICAL :: ts_calc = .TRUE. 2590 2562 2591 ! REAL(wp), & 2563 2592 ! DIMENSION(dots_num_palm+1:dots_max) :: & … … 2589 2618 ENDDO 2590 2619 ENDDO 2591 ELSEIF ( mode == 'time_series' ) THEN2620 ELSEIF ( mode == 'time_series' .and. ts_calc ) THEN 2592 2621 CALL location_message( 'Time series not calculated for chemistry', .TRUE. ) 2622 ts_calc = .FALSE. 2593 2623 ENDIF 2594 2624
Note: See TracChangeset
for help on using the changeset viewer.