Changeset 4227 for palm/trunk/SOURCE/chem_emissions_mod.f90
- Timestamp:
- Sep 10, 2019 6:04:34 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/chem_emissions_mod.f90
r4218 r4227 27 27 ! ----------------- 28 28 ! $Id$ 29 ! implement new palm_date_time_mod 30 ! 31 ! 4223 2019-09-10 09:20:47Z gronemeier 29 32 ! Unused routine chem_emissions_check_parameters commented out due to uninitialized content 30 33 ! … … 118 121 ONLY: chem_emis_att_type, chem_emis_val_type 119 122 120 USE date_and_time_mod, &121 ONLY: day_of_month, hour_of_day, &122 index_mm, index_dd, index_hh, &123 month_of_year, hour_of_day, &124 time_default_indices, time_preprocessed_indices125 126 123 USE chem_gasphase_mod, & 127 124 ONLY: nvar, spc_names … … 905 902 ! Description: 906 903 ! ------------ 907 !> Routine for Update of Emission values at each timestep 904 !> Routine for Update of Emission values at each timestep. 905 !> 906 !> @todo Clarify the correct usage of index_dd, index_hh and index_mm. Consider 907 !> renaming of these variables. 908 !> @todo Clarify time used in emis_lod=2 mode. ATM, the used time seems strange. 908 909 !-------------------------------------------------------------------------------! 909 910 … … 919 920 ONLY: hyp, pt 920 921 922 USE control_parameters, & 923 ONLY: time_since_reference_point 924 925 USE palm_date_time_mod, & 926 ONLY: days_per_week, get_date_time, hours_per_day, months_per_year, seconds_per_day 921 927 922 928 IMPLICIT NONE … … 940 946 INTEGER(iwp) :: m !< running index for horizontal surfaces 941 947 948 INTEGER(iwp) :: day_of_month !< day of the month 949 INTEGER(iwp) :: day_of_week !< day of the week 950 INTEGER(iwp) :: day_of_year !< day of the year 951 INTEGER(iwp) :: days_since_reference_point !< days since reference point 952 INTEGER(iwp) :: hour_of_day !< hour of the day 953 INTEGER(iwp) :: month_of_year !< month of the year 954 INTEGER(iwp) :: index_dd !< index day 955 INTEGER(iwp) :: index_hh !< index hour 956 INTEGER(iwp) :: index_mm !< index month 957 958 REAL(wp) :: time_utc_init !< second of day of initial date 959 942 960 ! 943 961 !-- CONVERSION FACTORS: TIME 944 962 REAL(wp), PARAMETER :: hour_per_year = 8760.0_wp !< number of hours in a year of 365 days 945 REAL(wp), PARAMETER :: hour_per_day = 24.0_wp !< number of hours in a day946 963 REAL(wp), PARAMETER :: s_per_hour = 3600.0_wp !< number of sec per hour (s)/(hour) 947 964 REAL(wp), PARAMETER :: s_per_day = 86400.0_wp !< number of sec per day (s)/(day) … … 1073 1090 !-- Update time indices 1074 1091 1075 CALL time_preprocessed_indices( index_hh ) 1076 1092 CALL get_date_time( 0.0_wp, second_of_day=time_utc_init ) 1093 CALL get_date_time( time_since_reference_point, hour=hour_of_day ) 1094 1095 days_since_reference_point = INT( FLOOR( ( time_utc_init + time_since_reference_point ) & 1096 / seconds_per_day ) ) 1097 1098 index_hh = days_since_reference_point * hours_per_day + hour_of_day 1077 1099 1078 1100 ! … … 1102 1124 !-- Update time indices 1103 1125 1104 CALL time_default_indices( month_of_year, day_of_month, hour_of_day, index_hh ) 1126 CALL get_date_time( time_since_reference_point, & 1127 day_of_year=day_of_year, hour=hour_of_day ) 1128 index_hh = ( day_of_year - 1_iwp ) * hour_of_day 1105 1129 1106 1130 ! … … 1132 1156 ! 1133 1157 !-- Update time indices 1134 CALL time_default_indices( daytype_mdh, month_of_year, day_of_month, & 1135 hour_of_day, index_mm, index_dd,index_hh ) 1136 1158 CALL get_date_time( time_since_reference_point, & 1159 month=month_of_year, & 1160 day=day_of_month, & 1161 hour=hour_of_day, & 1162 day_of_week=day_of_week ) 1163 index_mm = month_of_year 1164 index_dd = months_per_year + day_of_week 1165 SELECT CASE(TRIM(daytype_mdh)) 1166 1167 CASE ("workday") 1168 index_hh = months_per_year + days_per_week + hour_of_day 1169 1170 CASE ("weekend") 1171 index_hh = months_per_year + days_per_week + hours_per_day + hour_of_day 1172 1173 CASE ("holiday") 1174 index_hh = months_per_year + days_per_week + 2*hours_per_day + hour_of_day 1175 1176 END SELECT 1137 1177 ! 1138 1178 !-- Check if the index is less or equal to the temporal dimension of MDH emission files … … 1189 1229 1190 1230 ! 1191 !-- Get time-factor for specific hour 1231 !-- Get time-factor for specific hour 1232 CALL get_date_time( time_since_reference_point, hour=hour_of_day ) 1192 1233 1193 1234 index_hh = hour_of_day … … 1196 1237 ENDIF ! emiss_lod 1197 1238 1198 1239 1199 1240 ! 1200 1241 !-- Emission distribution calculation … … 1257 1298 time_factor(icat) * & 1258 1299 emt_att%nox_comp(icat,1) * & 1259 conversion_factor * hour _per_day1300 conversion_factor * hours_per_day 1260 1301 1261 1302 emis_distribution(1,nys:nyn,nxl:nxr,ispec) = & … … 1270 1311 time_factor(icat) * & 1271 1312 emt_att%nox_comp(icat,2) * & 1272 conversion_factor * hour _per_day1313 conversion_factor * hours_per_day 1273 1314 1274 1315 emis_distribution(1,nys:nyn,nxl:nxr,ispec) = & … … 1283 1324 time_factor(icat) * & 1284 1325 emt_att%sox_comp(icat,1) * & 1285 conversion_factor * hour _per_day1326 conversion_factor * hours_per_day 1286 1327 1287 1328 emis_distribution(1,nys:nyn,nxl:nxr,ispec) = & … … 1298 1339 time_factor(icat) * & 1299 1340 emt_att%sox_comp(icat,2) * & 1300 conversion_factor * hour _per_day1341 conversion_factor * hours_per_day 1301 1342 1302 1343 emis_distribution(1,nys:nyn,nxl:nxr,ispec) = & … … 1315 1356 time_factor(icat) * & 1316 1357 emt_att%pm_comp(icat,i_pm_comp,1) * & 1317 conversion_factor * hour _per_day1358 conversion_factor * hours_per_day 1318 1359 1319 1360 emis_distribution(1,nys:nyn,nxl:nxr,ispec) = & … … 1333 1374 time_factor(icat) * & 1334 1375 emt_att%pm_comp(icat,i_pm_comp,2) * & 1335 conversion_factor * hour _per_day1376 conversion_factor * hours_per_day 1336 1377 1337 1378 emis_distribution(1,nys:nyn,nxl:nxr,ispec) = & … … 1351 1392 time_factor(icat) * & 1352 1393 emt_att%pm_comp(icat,i_pm_comp,3) * & 1353 conversion_factor * hour _per_day1394 conversion_factor * hours_per_day 1354 1395 1355 1396 emis_distribution(1,nys:nyn,nxl:nxr,ispec) = & … … 1372 1413 time_factor(icat) * & 1373 1414 emt_att%voc_comp(icat,match_spec_voc_input(ivoc)) * & 1374 conversion_factor * hour _per_day1415 conversion_factor * hours_per_day 1375 1416 1376 1417 emis_distribution(1,nys:nyn,nxl:nxr,ispec) = & … … 1389 1430 delta_emis(nys:nyn,nxl:nxr) = emis(nys:nyn,nxl:nxr) * & 1390 1431 time_factor(icat) * & 1391 conversion_factor * hour _per_day1432 conversion_factor * hours_per_day 1392 1433 1393 1434 emis_distribution(1,nys:nyn,nxl:nxr,ispec) = &
Note: See TracChangeset
for help on using the changeset viewer.