Changeset 3772
- Timestamp:
- Feb 28, 2019 3:51:57 PM (6 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/chem_emissions_mod.f90
r3685 r3772 27 27 ! ----------------- 28 28 ! $Id$ 29 ! - In case of parametrized emissions, assure that emissions are only on natural 30 ! surfaces (i.e. streets) and not on urban surfaces. 31 ! - some unnecessary if clauses removed 32 ! 33 ! 3685 2019-01-21 01:02:11Z knoop 29 34 ! Some interface calls moved to module_interface + cleanup 30 35 ! … … 1277 1282 IF ( street_type_f%from_file ) THEN 1278 1283 1279 ! 1280 !-- Streets are lsm surfaces, hence, no usm surface treatment required 1281 IF ( surf_lsm_h%ns > 0 ) THEN 1282 DO m = 1, surf_lsm_h%ns 1283 i = surf_lsm_h%i(m) 1284 j = surf_lsm_h%j(m) 1285 k = surf_lsm_h%k(m) 1286 1287 IF ( street_type_f%var(j,i) >= main_street_id .AND. street_type_f%var(j,i) < max_street_id ) THEN 1288 1289 ! 1290 !-- Cycle over matched species 1291 DO ispec = 1, nspec_out 1284 ! 1285 !-- Streets are lsm surfaces, hence, no usm surface treatment required. 1286 !-- However, urban surface may be initialized via default initialization 1287 !-- in surface_mod, e.g. at horizontal urban walls that are at k == 0 1288 !-- (building is lower than the first grid point). Hence, in order to 1289 !-- have only emissions at streets, set the surfaces emissions to zero 1290 !-- at urban walls. 1291 IF ( surf_usm_h%ns >=1 ) surf_usm_h%cssws = 0.0_wp 1292 ! 1293 !-- Now, treat land-surfaces. 1294 DO m = 1, surf_lsm_h%ns 1295 i = surf_lsm_h%i(m) 1296 j = surf_lsm_h%j(m) 1297 k = surf_lsm_h%k(m) 1298 1299 IF ( street_type_f%var(j,i) >= main_street_id .AND. street_type_f%var(j,i) < max_street_id ) THEN 1300 1301 ! 1302 !-- Cycle over matched species 1303 DO ispec = 1, nspec_out 1304 1305 ! 1306 !-- PMs are already in kilograms 1307 IF ( TRIM( spc_names(match_spec_model(ispec)) ) == "PM1 " & 1308 .OR. TRIM( spc_names(match_spec_model(ispec)) ) == "PM25" & 1309 .OR. TRIM( spc_names(match_spec_model(ispec)) )=="PM10") THEN 1292 1310 1293 1311 ! 1294 !-- PMs are already in kilograms 1295 IF ( TRIM( spc_names(match_spec_model(ispec)) ) == "PM1 " & 1296 .OR. TRIM( spc_names(match_spec_model(ispec)) ) == "PM25" & 1297 .OR. TRIM( spc_names(match_spec_model(ispec)) )=="PM10") THEN 1298 1299 ! 1300 !-- kg/(m^2*s) * kg/m^3 1301 surf_lsm_h%cssws(match_spec_model(ispec),m) = emiss_factor_main(match_spec_input(ispec)) * & 1302 emis_distribution(1,j,i,ispec) * & !< in kg/(m^2*s) 1303 rho_air(k) !< in kg/m^3 1304 1312 !-- kg/(m^2*s) * kg/m^3 1313 surf_lsm_h%cssws(match_spec_model(ispec),m) = emiss_factor_main(match_spec_input(ispec)) * & 1314 emis_distribution(1,j,i,ispec) * & !< in kg/(m^2*s) 1315 rho_air(k) !< in kg/m^3 1316 1317 ! 1318 !-- Other Species 1319 !-- Inputs are micromoles 1320 ELSE 1321 1322 ! 1323 !-- ppm/s *m *kg/m^3 1324 surf_lsm_h%cssws(match_spec_model(ispec),m) = emiss_factor_main(match_spec_input(ispec)) * & 1325 emis_distribution(1,j,i,ispec) * & !< in micromoles/(m^2*s) 1326 conv_to_ratio(k,j,i) * & !< in m^3/Nmole 1327 rho_air(k) !< in kg/m^3 1328 1329 ENDIF 1330 1331 ENDDO 1332 1333 1334 ELSEIF ( street_type_f%var(j,i) >= side_street_id .AND. street_type_f%var(j,i) < main_street_id ) THEN 1335 1336 ! 1337 !-- Cycle over matched species 1338 DO ispec = 1, nspec_out 1339 1340 ! 1341 !-- PMs are already in kilograms 1342 IF ( TRIM( spc_names(match_spec_model(ispec)) ) == "PM1" & 1343 .OR. TRIM( spc_names(match_spec_model(ispec)) ) == "PM25" & 1344 .OR. TRIM( spc_names(match_spec_model(ispec)) ) == "PM10" ) THEN 1345 1305 1346 ! 1306 !-- Other Species 1307 !-- Inputs are micromoles 1308 ELSE 1309 1310 ! 1311 !-- ppm/s *m *kg/m^3 1312 surf_lsm_h%cssws(match_spec_model(ispec),m) = emiss_factor_main(match_spec_input(ispec)) * & 1313 emis_distribution(1,j,i,ispec) * & !< in micromoles/(m^2*s) 1314 conv_to_ratio(k,j,i) * & !< in m^3/Nmole 1315 rho_air(k) !< in kg/m^3 1316 1317 ENDIF 1318 1319 ENDDO 1320 1321 1322 ELSEIF ( street_type_f%var(j,i) >= side_street_id .AND. street_type_f%var(j,i) < main_street_id ) THEN 1323 1324 ! 1325 !-- Cycle over matched species 1326 DO ispec = 1, nspec_out 1327 1328 ! 1329 !-- PMs are already in kilograms 1330 IF ( TRIM( spc_names(match_spec_model(ispec)) ) == "PM1" & 1331 .OR. TRIM( spc_names(match_spec_model(ispec)) ) == "PM25" & 1332 .OR. TRIM( spc_names(match_spec_model(ispec)) ) == "PM10" ) THEN 1333 1334 ! 1335 !-- kg/(m^2*s) * kg/m^3 1336 surf_lsm_h%cssws(match_spec_model(ispec),m) = emiss_factor_side(match_spec_input(ispec)) * & 1337 emis_distribution(1,j,i,ispec) * & !< in kg/(m^2*s) 1338 rho_air(k) !< in kg/m^3 1339 ! 1340 !-- Other species 1341 !-- Inputs are micromoles 1342 ELSE 1343 1344 ! 1345 !-- ppm/s *m *kg/m^3 1346 surf_lsm_h%cssws(match_spec_model(ispec),m) = emiss_factor_side(match_spec_input(ispec)) * & 1347 emis_distribution(1,j,i,ispec) * & !< in micromoles/(m^2*s) 1348 conv_to_ratio(k,j,i) * & !< in m^3/Nmole 1349 rho_air(k) !< in kg/m^3 1350 ENDIF 1351 1352 ENDDO 1353 1354 ELSE 1355 1356 ! 1357 !-- If no street type is defined, then assign zero emission to all the species 1358 surf_lsm_h%cssws(:,m) = 0.0_wp 1359 1360 ENDIF 1361 1362 ENDDO 1363 1364 ENDIF 1347 !-- kg/(m^2*s) * kg/m^3 1348 surf_lsm_h%cssws(match_spec_model(ispec),m) = emiss_factor_side(match_spec_input(ispec)) * & 1349 emis_distribution(1,j,i,ispec) * & !< in kg/(m^2*s) 1350 rho_air(k) !< in kg/m^3 1351 ! 1352 !-- Other species 1353 !-- Inputs are micromoles 1354 ELSE 1355 1356 ! 1357 !-- ppm/s *m *kg/m^3 1358 surf_lsm_h%cssws(match_spec_model(ispec),m) = emiss_factor_side(match_spec_input(ispec)) * & 1359 emis_distribution(1,j,i,ispec) * & !< in micromoles/(m^2*s) 1360 conv_to_ratio(k,j,i) * & !< in m^3/Nmole 1361 rho_air(k) !< in kg/m^3 1362 ENDIF 1363 1364 ENDDO 1365 1366 ELSE 1367 1368 ! 1369 !-- If no street type is defined, then assign zero emission to all the species 1370 surf_lsm_h%cssws(:,m) = 0.0_wp 1371 1372 ENDIF 1373 1374 ENDDO 1365 1375 1366 1376 ENDIF … … 1373 1383 DO ispec = 1, nspec_out 1374 1384 1375 ! 1376 !-- Default surfaces 1377 IF ( surf_def_h(0)%ns > 0 ) THEN 1378 1379 DO m = 1, surf_def_h(0)%ns 1380 1381 i = surf_def_h(0)%i(m) 1382 j = surf_def_h(0)%j(m) 1383 1384 IF ( emis_distribution(1,j,i,ispec) > 0.0_wp ) THEN 1385 1386 ! 1387 !-- PMs 1388 IF ( TRIM( spc_names(match_spec_model(ispec)) ) == "PM1" & 1389 .OR. TRIM( spc_names(match_spec_model(ispec)) ) == "PM25" & 1390 .OR. TRIM( spc_names(match_spec_model(ispec)) ) == "PM10" ) THEN 1385 ! 1386 !-- Default surfaces 1387 DO m = 1, surf_def_h(0)%ns 1388 1389 i = surf_def_h(0)%i(m) 1390 j = surf_def_h(0)%j(m) 1391 1392 IF ( emis_distribution(1,j,i,ispec) > 0.0_wp ) THEN 1393 1394 ! 1395 !-- PMs 1396 IF ( TRIM( spc_names(match_spec_model(ispec)) ) == "PM1" & 1397 .OR. TRIM( spc_names(match_spec_model(ispec)) ) == "PM25" & 1398 .OR. TRIM( spc_names(match_spec_model(ispec)) ) == "PM10" ) THEN 1399 1400 ! 1401 !-- kg/(m^2*s) *kg/m^3 kg/(m^2*s) 1402 surf_def_h(0)%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec)* & 1403 rho_air(nzb) !< in kg/m^3 1404 1405 1406 ELSE 1407 1408 ! 1409 !-- VOCs 1410 IF ( len_index_voc > 0 .AND. emt_att%species_name(match_spec_input(ispec)) == "VOC" ) THEN 1411 ! 1412 !-- (ppm/s) * m * kg/m^3 mole/(m^2/s) 1413 surf_def_h(0)%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec) * & 1414 conv_to_ratio(nzb,j,i) * & !< in m^3/mole 1415 ratio2ppm * & !< in ppm 1416 rho_air(nzb) !< in kg/m^3 1417 1418 1419 ! 1420 !-- Other species 1421 ELSE 1422 1423 ! 1424 !-- (ppm/s) * m * kg/m^3 kg/(m^2/s) 1425 surf_def_h(0)%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec) * & 1426 ( 1.0_wp / emt_att%xm(ispec) ) * & !< in mole/kg 1427 conv_to_ratio(nzb,j,i) * & !< in m^3/mole 1428 ratio2ppm * & !< in ppm 1429 rho_air(nzb) !< in kg/m^3 1430 1431 1432 ENDIF 1433 1434 ENDIF 1435 1436 ENDIF 1437 1438 ENDDO 1439 1440 ! 1441 !-- LSM surfaces 1442 DO m = 1, surf_lsm_h%ns 1443 1444 i = surf_lsm_h%i(m) 1445 j = surf_lsm_h%j(m) 1446 k = surf_lsm_h%k(m) 1447 1448 IF ( emis_distribution(1,j,i,ispec) > 0.0_wp ) THEN 1449 1450 ! 1451 !-- PMs 1452 IF ( TRIM( spc_names(match_spec_model(ispec)) ) == "PM1" & 1453 .OR. TRIM( spc_names(match_spec_model(ispec)) ) == "PM25" & 1454 .OR. TRIM( spc_names(match_spec_model(ispec)) ) == "PM10" ) THEN 1455 1456 ! 1457 !-- kg/(m^2*s) * kg/m^3 kg/(m^2*s) 1458 surf_lsm_h%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec) * & 1459 rho_air(k) !< in kg/m^3 1460 1461 ELSE 1462 1463 ! 1464 !-- VOCs 1465 IF ( len_index_voc > 0 .AND. emt_att%species_name(match_spec_input(ispec)) == "VOC" ) THEN 1466 ! 1467 !-- (ppm/s) * m * kg/m^3 mole/(m^2/s) 1468 surf_lsm_h%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec) * & 1469 conv_to_ratio(k,j,i) * & !< in m^3/mole 1470 ratio2ppm * & !< in ppm 1471 rho_air(k) !< in kg/m^3 1472 1473 ! 1474 !-- Other species 1475 ELSE 1476 ! 1477 !-- (ppm/s) * m * kg/m^3 kg/(m^2/s) 1478 surf_lsm_h%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec) * & 1479 ( 1.0_wp / emt_att%xm(ispec) ) * & !< in mole/kg 1480 conv_to_ratio(k,j,i) * & !< in m^3/mole 1481 ratio2ppm * & !< in ppm 1482 rho_air(k) !< in kg/m^3 1483 1484 ENDIF 1485 1486 ENDIF 1487 1488 ENDIF 1489 1490 ENDDO 1491 1492 ! 1493 !-- USM surfaces 1494 DO m = 1, surf_usm_h%ns 1495 1496 i = surf_usm_h%i(m) 1497 j = surf_usm_h%j(m) 1498 k = surf_usm_h%k(m) 1499 1500 IF ( emis_distribution(1,j,i,ispec) > 0.0_wp ) THEN 1501 1502 ! 1503 !-- PMs 1504 IF ( TRIM( spc_names(match_spec_model(ispec)) ) == "PM1" & 1505 .OR. TRIM( spc_names(match_spec_model(ispec)) ) == "PM25" & 1506 .OR. TRIM( spc_names(match_spec_model(ispec)) ) == "PM10" ) THEN 1391 1507 1508 ! 1509 !-- kg/(m^2*s) *kg/m^3 kg/(m^2*s) 1510 surf_usm_h%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec)* & 1511 rho_air(k) !< in kg/m^3 1512 1513 1514 ELSE 1515 1516 ! 1517 !-- VOCs 1518 IF ( len_index_voc > 0 .AND. emt_att%species_name(match_spec_input(ispec)) == "VOC" ) THEN 1392 1519 ! 1393 !-- kg/(m^2*s) *kg/m^3 kg/(m^2*s) 1394 surf_def_h(0)%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec)* & 1395 rho_air(nzb) !< in kg/m^3 1396 1397 1520 !-- (ppm/s) * m * kg/m^3 mole/(m^2/s) 1521 surf_usm_h%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec) * & 1522 conv_to_ratio(k,j,i) * & !< in m^3/mole 1523 ratio2ppm * & !< in ppm 1524 rho_air(k) !< in kg/m^3 1525 1526 ! 1527 !-- Other species 1398 1528 ELSE 1399 1529 1400 1530 ! 1401 !-- VOCs 1402 IF ( len_index_voc > 0 .AND. emt_att%species_name(match_spec_input(ispec)) == "VOC" ) THEN 1403 ! 1404 !-- (ppm/s) * m * kg/m^3 mole/(m^2/s) 1405 surf_def_h(0)%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec) * & 1406 conv_to_ratio(nzb,j,i) * & !< in m^3/mole 1407 ratio2ppm * & !< in ppm 1408 rho_air(nzb) !< in kg/m^3 1409 1410 1411 ! 1412 !-- Other species 1413 ELSE 1414 1415 ! 1416 !-- (ppm/s) * m * kg/m^3 kg/(m^2/s) 1417 surf_def_h(0)%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec) * & 1418 ( 1.0_wp / emt_att%xm(ispec) ) * & !< in mole/kg 1419 conv_to_ratio(nzb,j,i) * & !< in m^3/mole 1420 ratio2ppm * & !< in ppm 1421 rho_air(nzb) !< in kg/m^3 1422 1423 1424 ENDIF 1531 !-- (ppm/s) * m * kg/m^3 kg/(m^2/s) 1532 surf_usm_h%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec) * & 1533 ( 1.0_wp / emt_att%xm(ispec) ) * & !< in mole/kg 1534 conv_to_ratio(k,j,i) * & !< in m^3/mole 1535 ratio2ppm* & !< in ppm 1536 rho_air(k) !< in kg/m^3 1537 1425 1538 1426 1539 ENDIF … … 1428 1541 ENDIF 1429 1542 1430 ENDDO 1431 1432 ENDIF 1433 1434 ! 1435 !-- LSM surfaces 1436 IF ( surf_lsm_h%ns > 0 ) THEN 1437 1438 DO m = 1, surf_lsm_h%ns 1439 1440 i = surf_lsm_h%i(m) 1441 j = surf_lsm_h%j(m) 1442 k = surf_lsm_h%k(m) 1443 1444 IF ( emis_distribution(1,j,i,ispec) > 0.0_wp ) THEN 1445 1446 ! 1447 !-- PMs 1448 IF ( TRIM( spc_names(match_spec_model(ispec)) ) == "PM1" & 1449 .OR. TRIM( spc_names(match_spec_model(ispec)) ) == "PM25" & 1450 .OR. TRIM( spc_names(match_spec_model(ispec)) ) == "PM10" ) THEN 1451 1452 ! 1453 !-- kg/(m^2*s) * kg/m^3 kg/(m^2*s) 1454 surf_lsm_h%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec) * & 1455 rho_air(k) !< in kg/m^3 1456 1457 ELSE 1458 1459 ! 1460 !-- VOCs 1461 IF ( len_index_voc > 0 .AND. emt_att%species_name(match_spec_input(ispec)) == "VOC" ) THEN 1462 ! 1463 !-- (ppm/s) * m * kg/m^3 mole/(m^2/s) 1464 surf_lsm_h%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec) * & 1465 conv_to_ratio(k,j,i) * & !< in m^3/mole 1466 ratio2ppm * & !< in ppm 1467 rho_air(k) !< in kg/m^3 1468 1469 ! 1470 !-- Other species 1471 ELSE 1472 ! 1473 !-- (ppm/s) * m * kg/m^3 kg/(m^2/s) 1474 surf_lsm_h%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec) * & 1475 ( 1.0_wp / emt_att%xm(ispec) ) * & !< in mole/kg 1476 conv_to_ratio(k,j,i) * & !< in m^3/mole 1477 ratio2ppm * & !< in ppm 1478 rho_air(k) !< in kg/m^3 1479 1480 ENDIF 1481 1482 ENDIF 1483 1484 ENDIF 1485 1486 ENDDO 1487 1488 ENDIF 1489 1490 ! 1491 !-- USM surfaces 1492 IF ( surf_usm_h%ns > 0 ) THEN 1493 1494 1495 DO m = 1, surf_usm_h%ns 1496 1497 i = surf_usm_h%i(m) 1498 j = surf_usm_h%j(m) 1499 k = surf_usm_h%k(m) 1500 1501 IF ( emis_distribution(1,j,i,ispec) > 0.0_wp ) THEN 1502 1503 ! 1504 !-- PMs 1505 IF ( TRIM( spc_names(match_spec_model(ispec)) ) == "PM1" & 1506 .OR. TRIM( spc_names(match_spec_model(ispec)) ) == "PM25" & 1507 .OR. TRIM( spc_names(match_spec_model(ispec)) ) == "PM10" ) THEN 1508 1509 ! 1510 !-- kg/(m^2*s) *kg/m^3 kg/(m^2*s) 1511 surf_usm_h%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec)* & 1512 rho_air(k) !< in kg/m^3 1513 1514 1515 ELSE 1516 1517 ! 1518 !-- VOCs 1519 IF ( len_index_voc > 0 .AND. emt_att%species_name(match_spec_input(ispec)) == "VOC" ) THEN 1520 ! 1521 !-- (ppm/s) * m * kg/m^3 mole/(m^2/s) 1522 surf_usm_h%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec) * & 1523 conv_to_ratio(k,j,i) * & !< in m^3/mole 1524 ratio2ppm * & !< in ppm 1525 rho_air(k) !< in kg/m^3 1526 1527 ! 1528 !-- Other species 1529 ELSE 1530 1531 ! 1532 !-- (ppm/s) * m * kg/m^3 kg/(m^2/s) 1533 surf_usm_h%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec) * & 1534 ( 1.0_wp / emt_att%xm(ispec) ) * & !< in mole/kg 1535 conv_to_ratio(k,j,i) * & !< in m^3/mole 1536 ratio2ppm* & !< in ppm 1537 rho_air(k) !< in kg/m^3 1538 1539 1540 ENDIF 1541 1542 ENDIF 1543 1544 ENDIF 1545 1546 ENDDO 1547 1548 ENDIF 1543 ENDIF 1544 1545 ENDDO 1549 1546 1550 1547 ENDDO -
palm/trunk/SOURCE/surface_mod.f90
r3767 r3772 26 26 ! ----------------- 27 27 ! $Id$ 28 ! small change in the todo's 29 ! 30 ! 3767 2019-02-27 08:18:02Z raasch 28 31 ! unused variables removed from rrd-subroutine parameter list 29 32 ! … … 259 262 !> default type 260 263 !> @todo Clean up urban-surface variables (some of them are not used any more) 261 !> @todo Revise chemistry surface flux part (reduce loops?!)264 !> @todo Revise initialization of surface fluxes (especially for chemistry) 262 265 !> @todo Get rid-off deallocation routines in restarts 263 266 !------------------------------------------------------------------------------!
Note: See TracChangeset
for help on using the changeset viewer.