[2630] | 1 | SUBROUTINE condsurfc_new(jour,lmt_bcff, lmt_bcnff, |
---|
| 2 | . lmt_bcbbl,lmt_bcbbh, lmt_bcba, |
---|
| 3 | . lmt_omff,lmt_omnff,lmt_ombbl,lmt_ombbh, |
---|
| 4 | . lmt_omnat, lmt_omba) |
---|
| 5 | USE mod_grid_phy_lmdz |
---|
| 6 | USE mod_phys_lmdz_para |
---|
| 7 | USE dimphy |
---|
| 8 | IMPLICIT none |
---|
| 9 | c |
---|
| 10 | c Lire les conditions aux limites du modele pour la chimie. |
---|
| 11 | c -------------------------------------------------------- |
---|
| 12 | c |
---|
| 13 | #include "dimensions.h" |
---|
| 14 | #include "netcdf.inc" |
---|
| 15 | REAL lmt_bcff(klon), lmt_bcnff(klon), lmt_bcba(klon) |
---|
| 16 | REAL lmt_omff(klon), lmt_omnff(klon), lmt_ombb(klon) |
---|
| 17 | REAL lmt_bcbbl(klon), lmt_bcbbh(klon) |
---|
| 18 | REAL lmt_ombbl(klon), lmt_ombbh(klon) |
---|
| 19 | REAL lmt_omnat(klon), lmt_omba(klon) |
---|
| 20 | REAL lmt_terp(klon) |
---|
| 21 | c |
---|
| 22 | REAL lmt_bcff_glo(klon_glo), lmt_bcnff_glo(klon_glo) |
---|
| 23 | REAL lmt_bcba_glo(klon_glo) |
---|
| 24 | REAL lmt_omff_glo(klon_glo), lmt_omnff_glo(klon_glo) |
---|
| 25 | REAL lmt_ombb_glo(klon_glo) |
---|
| 26 | REAL lmt_bcbbl_glo(klon_glo), lmt_bcbbh_glo(klon_glo) |
---|
| 27 | REAL lmt_ombbl_glo(klon_glo), lmt_ombbh_glo(klon_glo) |
---|
| 28 | REAL lmt_omnat_glo(klon_glo), lmt_omba_glo(klon_glo) |
---|
| 29 | REAL lmt_terp_glo(klon_glo) |
---|
| 30 | ! |
---|
| 31 | INTEGER jour, i |
---|
| 32 | INTEGER ierr |
---|
| 33 | INTEGER nid1,nvarid |
---|
| 34 | INTEGER debut(2),epais(2) |
---|
| 35 | c |
---|
| 36 | ! IF (jour.LT.0 .OR. jour.GT.(366-1)) THEN |
---|
| 37 | IF (jour.LT.0 .OR. jour.GT.366) THEN |
---|
| 38 | PRINT*,'Le jour demande n est pas correcte:', jour |
---|
| 39 | print *,'JE: FORCED TO CONTINUE (emissions have |
---|
| 40 | . to be longer than 1 year!!!! )' |
---|
| 41 | !JE CALL ABORT |
---|
| 42 | ENDIF |
---|
| 43 | |
---|
| 44 | !$OMP MASTER |
---|
| 45 | IF (is_mpi_root .AND. is_omp_root) THEN |
---|
| 46 | ! |
---|
| 47 | ! Tranche a lire: |
---|
| 48 | debut(1) = 1 |
---|
| 49 | debut(2) = jour |
---|
| 50 | epais(1) = klon_glo |
---|
| 51 | ! epais(1) = klon |
---|
| 52 | epais(2) = 1 |
---|
| 53 | ! |
---|
| 54 | !======================================================================= |
---|
| 55 | ! BC EMISSIONS |
---|
| 56 | !======================================================================= |
---|
| 57 | ! |
---|
| 58 | ierr = NF_OPEN ("carbon_emissions.nc", NF_NOWRITE, nid1) |
---|
| 59 | if (ierr.ne.NF_NOERR) then |
---|
| 60 | write(6,*)' Pb d''ouverture du fichier limitbc.nc' |
---|
| 61 | write(6,*)' ierr = ', ierr |
---|
| 62 | call exit(1) |
---|
| 63 | endif |
---|
| 64 | ! |
---|
| 65 | ! BC emissions from fossil fuel combustion |
---|
| 66 | ! |
---|
| 67 | ierr = NF_INQ_VARID (nid1, "BCFF", nvarid) |
---|
| 68 | ierr = NF_GET_VARA_DOUBLE (nid1, nvarid, debut, epais, |
---|
| 69 | . lmt_bcff_glo) |
---|
| 70 | IF (ierr .NE. NF_NOERR) THEN |
---|
| 71 | PRINT*, 'Pb de lecture pour les sources BC' |
---|
| 72 | CALL exit(1) |
---|
| 73 | ENDIF |
---|
| 74 | !print *,'lmt_bcff = ',lmt_bcff |
---|
| 75 | !stop |
---|
| 76 | ! |
---|
| 77 | ! BC emissions from non fossil fuel combustion |
---|
| 78 | ! |
---|
| 79 | ierr = NF_INQ_VARID (nid1, "BCNFF", nvarid) |
---|
| 80 | ierr = NF_GET_VARA_DOUBLE (nid1, nvarid, debut, epais, |
---|
| 81 | . lmt_bcnff_glo) |
---|
| 82 | IF (ierr .NE. NF_NOERR) THEN |
---|
| 83 | PRINT*, 'Pb de lecture pour les sources BC' |
---|
| 84 | CALL exit(1) |
---|
| 85 | ENDIF |
---|
| 86 | ! |
---|
| 87 | ! Low BC emissions from biomass burning |
---|
| 88 | ! |
---|
| 89 | ierr = NF_INQ_VARID (nid1, "BCBBL", nvarid) |
---|
| 90 | ierr = NF_GET_VARA_DOUBLE (nid1, nvarid, debut, epais, |
---|
| 91 | . lmt_bcbbl_glo) |
---|
| 92 | IF (ierr .NE. NF_NOERR) THEN |
---|
| 93 | PRINT*, 'Pb de lecture pour les sources BC low' |
---|
| 94 | CALL exit(1) |
---|
| 95 | ENDIF |
---|
| 96 | ! |
---|
| 97 | ! High BC emissions from biomass burning |
---|
| 98 | ! |
---|
| 99 | ierr = NF_INQ_VARID (nid1, "BCBBH", nvarid) |
---|
| 100 | ierr = NF_GET_VARA_DOUBLE (nid1, nvarid, debut, epais, |
---|
| 101 | . lmt_bcbbh_glo) |
---|
| 102 | IF (ierr .NE. NF_NOERR) THEN |
---|
| 103 | PRINT*, 'Pb de lecture pour les sources BC high' |
---|
| 104 | CALL exit(1) |
---|
| 105 | ENDIF |
---|
| 106 | ! |
---|
| 107 | ! BC emissions from ship transport |
---|
| 108 | ! |
---|
| 109 | ierr = NF_INQ_VARID (nid1, "BCBA", nvarid) |
---|
| 110 | ierr = NF_GET_VARA_DOUBLE (nid1, nvarid, debut, epais, |
---|
| 111 | . lmt_bcba_glo) |
---|
| 112 | IF (ierr .NE. NF_NOERR) THEN |
---|
| 113 | PRINT*, 'Pb de lecture pour les sources BC' |
---|
| 114 | CALL exit(1) |
---|
| 115 | ENDIF |
---|
| 116 | ! |
---|
| 117 | !======================================================================= |
---|
| 118 | ! OM EMISSIONS |
---|
| 119 | !======================================================================= |
---|
| 120 | ! |
---|
| 121 | |
---|
| 122 | ! |
---|
| 123 | ! OM emissions from fossil fuel combustion |
---|
| 124 | ! |
---|
| 125 | ierr = NF_INQ_VARID (nid1, "OMFF", nvarid) |
---|
| 126 | ierr = NF_GET_VARA_DOUBLE (nid1, nvarid, debut, epais, |
---|
| 127 | . lmt_omff_glo) |
---|
| 128 | IF (ierr .NE. NF_NOERR) THEN |
---|
| 129 | PRINT*, 'Pb de lecture pour les sources OM' |
---|
| 130 | CALL exit(1) |
---|
| 131 | ENDIF |
---|
| 132 | ! |
---|
| 133 | ! OM emissions from non fossil fuel combustion |
---|
| 134 | ! |
---|
| 135 | ierr = NF_INQ_VARID (nid1, "OMNFF", nvarid) |
---|
| 136 | ierr = NF_GET_VARA_DOUBLE (nid1, nvarid, debut, epais, |
---|
| 137 | . lmt_omnff_glo) |
---|
| 138 | IF (ierr .NE. NF_NOERR) THEN |
---|
| 139 | PRINT*, 'Pb de lecture pour les sources OM' |
---|
| 140 | CALL exit(1) |
---|
| 141 | ENDIF |
---|
| 142 | ! |
---|
| 143 | ! Low OM emissions from biomass burning - low |
---|
| 144 | ! |
---|
| 145 | ierr = NF_INQ_VARID (nid1, "OMBBL", nvarid) |
---|
| 146 | ierr = NF_GET_VARA_DOUBLE (nid1, nvarid, debut, epais, |
---|
| 147 | . lmt_ombbl_glo) |
---|
| 148 | IF (ierr .NE. NF_NOERR) THEN |
---|
| 149 | PRINT*, 'Pb de lecture pour les sources OM low' |
---|
| 150 | CALL exit(1) |
---|
| 151 | ENDIF |
---|
| 152 | ! |
---|
| 153 | ! High OM emissions from biomass burning - high |
---|
| 154 | ! |
---|
| 155 | ierr = NF_INQ_VARID (nid1, "OMBBH", nvarid) |
---|
| 156 | ierr = NF_GET_VARA_DOUBLE (nid1, nvarid, debut, epais, |
---|
| 157 | . lmt_ombbh_glo) |
---|
| 158 | IF (ierr .NE. NF_NOERR) THEN |
---|
| 159 | PRINT*, 'Pb de lecture pour les sources OM high' |
---|
| 160 | CALL exit(1) |
---|
| 161 | ENDIF |
---|
| 162 | ! |
---|
| 163 | ! High OM emissions from ship |
---|
| 164 | ! |
---|
| 165 | ierr = NF_INQ_VARID (nid1, "OMBA", nvarid) |
---|
| 166 | ierr = NF_GET_VARA_DOUBLE (nid1, nvarid, debut, epais, |
---|
| 167 | . lmt_omba_glo) |
---|
| 168 | IF (ierr .NE. NF_NOERR) THEN |
---|
| 169 | PRINT*, 'Pb de lecture pour les sources OM ship' |
---|
| 170 | CALL exit(1) |
---|
| 171 | ENDIF |
---|
| 172 | ! |
---|
| 173 | ! Natural Terpene emissions => Natural OM emissions |
---|
| 174 | ! |
---|
| 175 | ierr = NF_INQ_VARID (nid1, "TERP", nvarid) |
---|
| 176 | ierr = NF_GET_VARA_DOUBLE (nid1, nvarid, debut, epais, |
---|
| 177 | . lmt_terp_glo) |
---|
| 178 | IF (ierr .NE. NF_NOERR) THEN |
---|
| 179 | PRINT*, 'Pb de lecture pour les sources Terpene' |
---|
| 180 | CALL exit(1) |
---|
| 181 | ENDIF |
---|
| 182 | ! |
---|
| 183 | DO i=1,klon_glo |
---|
| 184 | lmt_omnat_glo(i) = lmt_terp_glo(i)*0.11*1.4 !-- 11% Terpene is OC |
---|
| 185 | ENDDO |
---|
| 186 | |
---|
| 187 | ierr = NF_CLOSE(nid1) |
---|
| 188 | ! |
---|
| 189 | PRINT*, 'Carbon sources lues pour jour: ', jour |
---|
| 190 | ! lmt_bcff(klon)=0.0 |
---|
| 191 | ! lmt_bcnff(klon)=0.0 |
---|
| 192 | ! lmt_omff(klon)=0.0 |
---|
| 193 | ! lmt_omnff(klon)=0.0 |
---|
| 194 | ! lmt_ombb(klon)=0.0 |
---|
| 195 | ! lmt_bcbbl(klon)=0.0 |
---|
| 196 | ! lmt_bcbbh(klon)=0.0 |
---|
| 197 | ! lmt_ombbl(klon)=0.0 |
---|
| 198 | ! lmt_ombbh(klon)=0.0 |
---|
| 199 | ! lmt_omnat(klon)=0.0 |
---|
| 200 | ! lmt_omba(klon)=0.0 |
---|
| 201 | ! lmt_terp(klon)=0.0 |
---|
| 202 | |
---|
| 203 | |
---|
| 204 | ENDIF |
---|
| 205 | !$OMP END MASTER |
---|
| 206 | !$OMP BARRIER |
---|
| 207 | call scatter( lmt_bcff_glo , lmt_bcff ) |
---|
| 208 | call scatter( lmt_bcnff_glo , lmt_bcnff ) |
---|
| 209 | call scatter( lmt_bcbbl_glo , lmt_bcbbl ) |
---|
| 210 | call scatter( lmt_bcbbh_glo , lmt_bcbbh ) |
---|
| 211 | call scatter( lmt_bcba_glo , lmt_bcba ) |
---|
| 212 | call scatter( lmt_omff_glo , lmt_omff ) |
---|
| 213 | call scatter( lmt_omnff_glo , lmt_omnff ) |
---|
| 214 | call scatter( lmt_ombbl_glo , lmt_ombbl ) |
---|
| 215 | call scatter( lmt_ombbh_glo , lmt_ombbh ) |
---|
| 216 | call scatter( lmt_omba_glo , lmt_omba ) |
---|
| 217 | call scatter( lmt_terp_glo , lmt_terp ) |
---|
| 218 | call scatter( lmt_omnat_glo , lmt_omnat ) |
---|
| 219 | |
---|
| 220 | |
---|
| 221 | |
---|
| 222 | |
---|
| 223 | |
---|
| 224 | RETURN |
---|
| 225 | END |
---|