Changeset 2614
- Timestamp:
- Jan 18, 2022, 4:00:44 PM (3 years ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/README
r2613 r2614 3590 3590 == 18/01/2022 == RV 3591 3591 Open_MP files reading for PHOTOCHEMISTRY : photochem = .true. 3592 3593 == 18/01/2022 == RV 3594 Open_MP Correction for previous commit: commision of photolysis_mod -
trunk/LMDZ.MARS/libf/aeronomars/photolysis_mod.F90
r2489 r2614 7 7 integer, save :: nphot = 13 ! number of photolysis 8 8 ! is incremented by +2 in calchim if deuterium chemisty) 9 10 !$OMP THREADPRIVATE(nphot) 11 9 12 integer, parameter :: nabs = 10 ! number of absorbing gases 10 13 … … 14 17 integer, save :: mopt ! high-res/low-res switch 15 18 19 !$OMP THREADPRIVATE(mopt) 20 16 21 real, dimension(nw), save :: wl, wc, wu ! lower, center, upper wavelength for each interval 22 23 !$OMP THREADPRIVATE(wl, wc, wu) 17 24 18 25 ! solar flux … … 40 47 real, dimension(nw), save :: xshdo ! hdo absorption cross-section (cm2) 41 48 real, dimension(nw), save :: albedo ! surface albedo 49 50 !$OMP THREADPRIVATE(f,xsco2_195, xsco2_295, xsco2_370,yieldco2,xso2_150, xso2_200, xso2_250, xso2_300,yieldo2,xso3_218, xso3_298,xsh2o,xsh2o2,xsho2,xsh2,yieldh2,xsno2, xsno2_220, xsno2_294,yldno2_248,yldno2_298) 51 !$OMP THREADPRIVATE(xsno,yieldno,xsn2,yieldn2,xshdo,albedo) 42 52 43 53 contains … … 362 372 363 373 use datafile_mod, only: datadir 374 USE mod_phys_lmdz_para, ONLY: is_master 375 USE mod_phys_lmdz_transfert_para, ONLY: bcast 364 376 365 377 implicit none … … 399 411 fil = trim(datadir)//'/solar_fluxes/atlas3_thuillier_tuv.txt' 400 412 print*, 'solar flux : ', fil 413 414 if(is_master) then 415 401 416 open(kin, file=fil, status='old', iostat=ierr) 402 417 … … 440 455 ! write(25,*) iw, wc(iw), f(iw) 441 456 ENDDO 457 458 endif !is_master 459 call bcast(f) 442 460 443 461 end if … … 717 735 718 736 use datafile_mod, only: datadir 737 USE mod_phys_lmdz_para, ONLY: is_master 738 USE mod_phys_lmdz_transfert_para, ONLY: bcast 719 739 720 740 implicit none … … 771 791 print*, 'section efficace CO2 195K: ', fil 772 792 793 if(is_master) then 794 773 795 OPEN(UNIT=kin,FILE=fil,STATUS='old') 774 796 DO i = 1,11 … … 795 817 END DO 796 818 819 endif !is_master 820 821 call bcast(xsco2_195) 822 797 823 ! 295K: 798 824 799 825 fil = trim(datadir)//'/cross_sections/co2_euv_uv_2018_295k.txt' 800 826 print*, 'section efficace CO2 295K: ', fil 827 828 if(is_master) then 801 829 802 830 OPEN(UNIT=kin,FILE=fil,STATUS='old') … … 824 852 END DO 825 853 854 endif !is_master 855 856 call bcast(xsco2_295) 857 826 858 ! 370K: 827 859 828 860 fil = trim(datadir)//'/cross_sections/co2_euv_uv_2018_370k.txt' 829 861 print*, 'section efficace CO2 370K: ', fil 862 863 if(is_master) then 830 864 831 865 OPEN(UNIT=kin,FILE=fil,STATUS='old') … … 853 887 END DO 854 888 889 endif !is_master 890 891 call bcast(xsco2_370) 892 855 893 ! photodissociation yield: 856 894 857 895 fil = trim(datadir)//'/cross_sections/efdis_co2-o2_schunkandnagy2000.txt' 858 896 print*, 'photodissociation yield CO2: ', fil 897 898 if(is_master) then 859 899 860 900 OPEN(UNIT=kin,FILE=fil,STATUS='old') … … 882 922 ENDIF 883 923 924 endif !is_master 925 926 call bcast(yieldco2) 927 884 928 ! DO l = 1, nw-1 885 929 ! write(kout,*) wl(l), xsco2_195(l), … … 908 952 909 953 use datafile_mod, only: datadir 954 USE mod_phys_lmdz_para, ONLY: is_master 955 USE mod_phys_lmdz_transfert_para, ONLY: bcast 910 956 911 957 implicit none … … 942 988 fil = trim(datadir)//'/cross_sections/o2_composite_2018_150K.txt' 943 989 print*, 'section efficace O2 150K: ', fil 990 991 if(is_master) then 992 944 993 open(kin, file=fil, status='old', iostat=ierr) 945 994 … … 975 1024 ENDIF 976 1025 1026 endif !is_master 1027 1028 call bcast(xso2_150) 1029 977 1030 fil = trim(datadir)//'/cross_sections/o2_composite_2018_200K.txt' 978 1031 print*, 'section efficace O2 200K: ', fil 1032 1033 if(is_master) then 1034 979 1035 OPEN(UNIT=kin,FILE=fil,STATUS='old') 980 1036 … … 999 1055 ENDIF 1000 1056 1057 endif !is_master 1058 1059 call bcast(xso2_200) 1060 1001 1061 fil = trim(datadir)//'/cross_sections/o2_composite_2018_250K.txt' 1002 1062 print*, 'section efficace O2 250K: ', fil 1063 1064 if(is_master) then 1065 1003 1066 OPEN(UNIT=kin,FILE=fil,STATUS='old') 1004 1067 … … 1023 1086 ENDIF 1024 1087 1088 endif !is_master 1089 1090 call bcast(xso2_250) 1091 1025 1092 fil = trim(datadir)//'/cross_sections/o2_composite_2018_300K.txt' 1026 1093 print*, 'section efficace O2 300K: ', fil 1094 1095 if(is_master) then 1096 1027 1097 OPEN(UNIT=kin,FILE=fil,STATUS='old') 1028 1098 … … 1047 1117 ENDIF 1048 1118 1119 endif !is_master 1120 1121 call bcast(xso2_300) 1122 1049 1123 ! photodissociation yield 1050 1124 1051 1125 fil = trim(datadir)//'/cross_sections/efdis_co2-o2_schunkandnagy2000.txt' 1126 1127 if(is_master) then 1128 1052 1129 OPEN(UNIT=kin,FILE=fil,STATUS='old') 1053 1130 … … 1073 1150 STOP 1074 1151 ENDIF 1152 1153 endif !is_master 1154 1155 call bcast(yieldo2) 1075 1156 1076 1157 end subroutine rdxso2 … … 1097 1178 1098 1179 use datafile_mod, only: datadir 1180 USE mod_phys_lmdz_para, ONLY: is_master 1181 USE mod_phys_lmdz_transfert_para, ONLY: bcast 1099 1182 1100 1183 implicit none … … 1129 1212 print*, 'section efficace O3 218K: ', fil 1130 1213 1214 if(is_master) then 1215 1131 1216 OPEN(UNIT=kin,FILE=fil,STATUS='old') 1132 1217 n1 = 167 … … 1151 1236 END DO 1152 1237 1238 endif !is_master 1239 1240 call bcast(xso3_218) 1241 1153 1242 ! JPL 2006 298 K 1154 1243 1155 1244 fil = trim(datadir)//'/cross_sections/o3_cross-sections_jpl_2006_298K.txt' 1156 1245 print*, 'section efficace O3 298K: ', fil 1246 1247 if(is_master) then 1157 1248 1158 1249 OPEN(UNIT=kin,FILE=fil,STATUS='old') … … 1177 1268 xso3_298(iw) = yg(iw) 1178 1269 END DO 1270 1271 endif !is_master 1272 1273 call bcast(xso3_298) 1179 1274 1180 1275 end subroutine rdxso3 … … 1199 1294 1200 1295 use datafile_mod, only: datadir 1296 USE mod_phys_lmdz_para, ONLY: is_master 1297 USE mod_phys_lmdz_transfert_para, ONLY: bcast 1201 1298 1202 1299 IMPLICIT NONE … … 1227 1324 print*, 'section efficace H2O: ', fil 1228 1325 1326 if(is_master) then 1327 1229 1328 OPEN(UNIT=kin,FILE=fil,STATUS='old') 1230 1329 … … 1248 1347 STOP 1249 1348 ENDIF 1349 1350 endif !is_master 1351 1352 call bcast(yg) 1250 1353 1251 1354 end subroutine rdxsh2o … … 1270 1373 1271 1374 use datafile_mod, only: datadir 1375 USE mod_phys_lmdz_para, ONLY: is_master 1376 USE mod_phys_lmdz_transfert_para, ONLY: bcast 1272 1377 1273 1378 IMPLICIT NONE … … 1298 1403 print*, 'section efficace HDO: ', fil 1299 1404 1405 if(is_master) then 1406 1300 1407 OPEN(UNIT=kin,FILE=fil,STATUS='old') 1301 1408 … … 1319 1426 STOP 1320 1427 ENDIF 1428 1429 endif !is_master 1430 1431 call bcast(yg) 1321 1432 1322 1433 end subroutine rdxshdo … … 1341 1452 1342 1453 use datafile_mod, only: datadir 1454 USE mod_phys_lmdz_para, ONLY: is_master 1455 USE mod_phys_lmdz_transfert_para, ONLY: bcast 1343 1456 1344 1457 implicit none … … 1369 1482 fil = trim(datadir)//'/cross_sections/h2o2_composite.txt' 1370 1483 print*, 'section efficace H2O2: ', fil 1484 1485 if(is_master) then 1371 1486 1372 1487 OPEN(kin,FILE=fil,STATUS='OLD') … … 1394 1509 END DO 1395 1510 1511 endif !is_master 1512 1513 call bcast(xsh2o2) 1514 1396 1515 end subroutine rdxsh2o2 1397 1516 … … 1411 1530 1412 1531 use datafile_mod, only: datadir 1532 USE mod_phys_lmdz_para, ONLY: is_master 1533 USE mod_phys_lmdz_transfert_para, ONLY: bcast 1413 1534 1414 1535 IMPLICIT NONE … … 1439 1560 print*, 'section efficace HO2: ', fil 1440 1561 1562 if(is_master) then 1563 1441 1564 OPEN(kin,FILE=fil,STATUS='OLD') 1442 1565 READ(kin,*) n … … 1457 1580 STOP 1458 1581 ENDIF 1582 1583 endif !is_master 1584 1585 call bcast(yg) 1459 1586 1460 1587 end subroutine rdxsho2 … … 1474 1601 1475 1602 use datafile_mod, only: datadir 1603 USE mod_phys_lmdz_para, ONLY: is_master 1604 USE mod_phys_lmdz_transfert_para, ONLY: bcast 1476 1605 1477 1606 implicit none … … 1504 1633 print*, 'section efficace H2: ', fil 1505 1634 1635 if(is_master) then 1636 1506 1637 OPEN(kin,FILE=fil,STATUS='OLD') 1507 1638 … … 1523 1654 STOP 1524 1655 ENDIF 1656 1657 endif !is_master 1658 1659 call bcast(yg) 1525 1660 1526 1661 ! photodissociation yield 1527 1662 1528 1663 fil = trim(datadir)//'/cross_sections/h2_ionef_schunknagy2000.txt' 1664 1665 if(is_master) then 1666 1529 1667 OPEN(UNIT=kin,FILE=fil,STATUS='old') 1530 1668 … … 1547 1685 STOP 1548 1686 ENDIF 1687 1688 endif !is_master 1689 1690 call bcast(yieldh2) 1549 1691 1550 1692 end subroutine rdxsh2 … … 1573 1715 1574 1716 use datafile_mod, only: datadir 1717 USE mod_phys_lmdz_para, ONLY: is_master 1718 USE mod_phys_lmdz_transfert_para, ONLY: bcast 1575 1719 1576 1720 implicit none … … 1606 1750 print*, 'section efficace NO2: ', fil 1607 1751 1752 if(is_master) then 1753 1608 1754 OPEN(UNIT=kin,FILE=fil,status='old') 1609 1755 DO i = 1, 3 … … 1621 1767 CALL inter2(nw,wl,yg1,n1,x1,y1,ierr) 1622 1768 1769 endif !is_master 1770 1771 call bcast(yg1) 1772 1623 1773 fil = trim(datadir)//'/cross_sections/no2_xs_vandaele_294K.txt' 1624 1774 print*, 'section efficace NO2: ', fil 1775 1776 if(is_master) then 1625 1777 1626 1778 OPEN(UNIT=kin,FILE=fil,status='old') … … 1639 1791 CALL inter2(nw,wl,yg2,n2,x2,y2,ierr) 1640 1792 1793 endif !is_master 1794 1795 call bcast(yg2) 1796 1641 1797 fil = trim(datadir)//'/cross_sections/no2_xs_vandaele_220K.txt' 1642 1798 print*, 'section efficace NO2: ', fil 1799 1800 if(is_master) then 1643 1801 1644 1802 OPEN(UNIT=kin,FILE=fil,status='old') … … 1663 1821 end do 1664 1822 1823 endif !is_master 1824 1825 call bcast(yg3) 1826 call bcast(xsno2) 1827 call bcast(xsno2_294) 1828 call bcast(xsno2_220) 1829 1665 1830 ! photodissociation efficiency from jpl 2006 1666 1831 1667 1832 fil = trim(datadir)//'/cross_sections/no2_yield_jpl2006.txt' 1668 1833 print*, 'quantum yield NO2: ', fil 1834 1835 if(is_master) then 1669 1836 1670 1837 OPEN(UNIT=kin,FILE=fil,STATUS='old') … … 1691 1858 ENDIF 1692 1859 1860 endif !is_master 1861 1862 call bcast(yg4) 1863 1864 if(is_master) then 1865 1693 1866 CALL addpnt(x5,y5,kdata,n5,x5(1)*(1.-deltax),y5(1)) 1694 1867 CALL addpnt(x5,y5,kdata,n5, 0.,y5(1)) … … 1705 1878 yldno2_248(iw) = yg5(iw) 1706 1879 end do 1880 1881 endif !is_master 1882 1883 call bcast(yg5) 1884 call bcast(yldno2_298) 1885 call bcast(yldno2_248) 1707 1886 1708 1887 end subroutine rdxsno2 … … 1723 1902 1724 1903 use datafile_mod, only: datadir 1904 USE mod_phys_lmdz_para, ONLY: is_master 1905 USE mod_phys_lmdz_transfert_para, ONLY: bcast 1725 1906 1726 1907 implicit none … … 1751 1932 fil = trim(datadir)//'/cross_sections/no_xs_francisco.txt' 1752 1933 print*, 'section efficace NO: ', fil 1934 1935 if(is_master) then 1936 1753 1937 OPEN(kin,FILE=fil,STATUS='OLD') 1754 1938 … … 1769 1953 STOP 1770 1954 ENDIF 1955 1956 endif !is_master 1957 1958 call bcast(yg) 1771 1959 1772 1960 ! photodissociation yield 1773 1961 1774 1962 fil = trim(datadir)//'/cross_sections/noefdis.txt' 1963 1964 if(is_master) then 1965 1775 1966 OPEN(UNIT=kin,FILE=fil,STATUS='old') 1776 1967 … … 1791 1982 ENDIF 1792 1983 1984 endif !is_master 1985 1986 call bcast(yieldno) 1987 1793 1988 end subroutine rdxsno 1794 1989 … … 1807 2002 1808 2003 use datafile_mod, only: datadir 2004 USE mod_phys_lmdz_para, ONLY: is_master 2005 USE mod_phys_lmdz_transfert_para, ONLY: bcast 1809 2006 1810 2007 implicit none … … 1836 2033 fil = trim(datadir)//'/cross_sections/n2secef_01nm.txt' 1837 2034 print*, 'section efficace N2: ', fil 2035 2036 if(is_master) then 2037 1838 2038 OPEN(kin,FILE=fil,STATUS='OLD') 1839 2039 … … 1855 2055 STOP 1856 2056 ENDIF 2057 2058 endif !is_master 2059 2060 call bcast(yg) 1857 2061 1858 2062 ! photodissociation yield 1859 2063 1860 2064 fil = trim(datadir)//'/cross_sections/n2_ionef_schunknagy2000.txt' 2065 2066 if(is_master) then 2067 1861 2068 OPEN(UNIT=kin,FILE=fil,STATUS='old') 1862 2069 … … 1880 2087 ENDIF 1881 2088 2089 endif !is_master 2090 2091 call bcast(yieldn2) 2092 1882 2093 end subroutine rdxsn2 1883 2094
Note: See TracChangeset
for help on using the changeset viewer.