Changeset 1894
- Timestamp:
- Jan 15, 2018, 12:08:11 PM (7 years ago)
- Location:
- trunk/LMDZ.TITAN
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.TITAN/README
r1893 r1894 1343 1343 Big modifs of the tracer gestion/init in the physiq with a new query by names (see tracer_h ) 1344 1344 1345 == 20/12/2017 - ... : r1871-86-87-91 ... == JVO1345 == 20/12/2017 - ... : r1871-86-87-91-94 ... == JVO 1346 1346 Management of the chemistry within startfi. Open the way to : 1347 1347 1) run with chemistry in another resolution than 32x48 ! … … 1354 1354 + Added a comchem_h.F90 module for all the stuff related to chemistry in the GCM and 1355 1355 specific comchem_newstart_h.F90 for the chemistry management in newstart 1356 + Hardcoded names and mmol for chemistry moved from tracer_h to comchem_h 1356 1357 + In newstart we calculate the pressure grid above GCM top using Vervack profile 1357 1358 with the introduction of gr_kim_vervack.F90 routine 1359 + For initialisation and loading of chemistry fields in phyetat0 -> chem_settings.F90 1358 1360 + ... 1359 1361 -
trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/comchem_newstart_h.F90
r1892 r1894 25 25 REAL,ALLOCATABLE :: ykim_upoldS(:,:,:,:) 26 26 27 28 CONTAINS29 30 31 SUBROUTINE read_startarch_kim(nid,start,count)32 33 ! Purpose : * Read by ther names, upper chemsitry fields present34 ! in start_archive.nc as physical variables35 ! * H_up field is read before, as the 1st one36 ! we perform sanity check on it37 ! * We assume a given order of the 44 tracers (cf comchem_h)38 39 IMPLICIT NONE40 41 include "netcdf.inc"42 43 INTEGER, INTENT(IN) :: nid ! "start_archive.nc" NetCDF file ID44 INTEGER, DIMENSION(4), INTENT(IN) :: start, count45 46 INTEGER :: varid, nvarid, ierr47 48 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!49 50 ierr=NF_INQ_VARID(nid,"H2_up",nvarid)51 IF (ierr .NE. NF_NOERR) THEN52 PRINT*, "lect_start_archive: Le champ <H2_up> est absent..."53 CALL abort54 ENDIF55 #ifdef NC_DOUBLE56 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(2,:,:,:))57 #else58 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(2,:,:,:))59 #endif60 IF (ierr .NE. NF_NOERR) THEN61 PRINT*, "lect_start_archive: Lecture echouee pour <H2_up>"62 CALL abort63 ENDIF64 65 ! --------------------------------66 67 ierr=NF_INQ_VARID(nid,"CH_up",nvarid)68 IF (ierr .NE. NF_NOERR) THEN69 PRINT*, "lect_start_archive: Le champ <CH_up> est absent..."70 CALL abort71 ENDIF72 #ifdef NC_DOUBLE73 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(3,:,:,:))74 #else75 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(3,:,:,:))76 #endif77 IF (ierr .NE. NF_NOERR) THEN78 PRINT*, "lect_start_archive: Lecture echouee pour <CH_up>"79 CALL abort80 ENDIF81 82 ! --------------------------------83 84 ierr=NF_INQ_VARID(nid,"CH2s_up",nvarid)85 IF (ierr .NE. NF_NOERR) THEN86 PRINT*, "lect_start_archive: Le champ <CH2s_up> est absent..."87 CALL abort88 ENDIF89 #ifdef NC_DOUBLE90 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(4,:,:,:))91 #else92 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(4,:,:,:))93 #endif94 IF (ierr .NE. NF_NOERR) THEN95 PRINT*, "lect_start_archive: Lecture echouee pour <CH2s_up>"96 CALL abort97 ENDIF98 99 ! --------------------------------100 101 ierr=NF_INQ_VARID(nid,"CH2_up",nvarid)102 IF (ierr .NE. NF_NOERR) THEN103 PRINT*, "lect_start_archive: Le champ <CH2_up> est absent..."104 CALL abort105 ENDIF106 #ifdef NC_DOUBLE107 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(5,:,:,:))108 #else109 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(5,:,:,:))110 #endif111 IF (ierr .NE. NF_NOERR) THEN112 PRINT*, "lect_start_archive: Lecture echouee pour <CH2_up>"113 CALL abort114 ENDIF115 116 ! --------------------------------117 118 ierr=NF_INQ_VARID(nid,"CH3_up",nvarid)119 IF (ierr .NE. NF_NOERR) THEN120 PRINT*, "lect_start_archive: Le champ <CH3_up> est absent..."121 CALL abort122 ENDIF123 #ifdef NC_DOUBLE124 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(6,:,:,:))125 #else126 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(6,:,:,:))127 #endif128 IF (ierr .NE. NF_NOERR) THEN129 PRINT*, "lect_start_archive: Lecture echouee pour <CH3_up>"130 CALL abort131 ENDIF132 133 ! --------------------------------134 135 ierr=NF_INQ_VARID(nid,"CH4_up",nvarid)136 IF (ierr .NE. NF_NOERR) THEN137 PRINT*, "lect_start_archive: Le champ <CH4_up> est absent..."138 CALL abort139 ENDIF140 #ifdef NC_DOUBLE141 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(7,:,:,:))142 #else143 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(7,:,:,:))144 #endif145 IF (ierr .NE. NF_NOERR) THEN146 PRINT*, "lect_start_archive: Lecture echouee pour <CH4_up>"147 CALL abort148 ENDIF149 150 ! --------------------------------151 152 ierr=NF_INQ_VARID(nid,"C2_up",nvarid)153 IF (ierr .NE. NF_NOERR) THEN154 PRINT*, "lect_start_archive: Le champ <C2_up> est absent..."155 CALL abort156 ENDIF157 #ifdef NC_DOUBLE158 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(8,:,:,:))159 #else160 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(8,:,:,:))161 #endif162 IF (ierr .NE. NF_NOERR) THEN163 PRINT*, "lect_start_archive: Lecture echouee pour <C2_up>"164 CALL abort165 ENDIF166 167 ! --------------------------------168 169 ierr=NF_INQ_VARID(nid,"C2H_up",nvarid)170 IF (ierr .NE. NF_NOERR) THEN171 PRINT*, "lect_start_archive: Le champ <C2H_up> est absent..."172 CALL abort173 ENDIF174 #ifdef NC_DOUBLE175 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(9,:,:,:))176 #else177 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(9,:,:,:))178 #endif179 IF (ierr .NE. NF_NOERR) THEN180 PRINT*, "lect_start_archive: Lecture echouee pour <C2H_up>"181 CALL abort182 ENDIF183 184 ! --------------------------------185 186 ierr=NF_INQ_VARID(nid,"C2H2_up",nvarid)187 IF (ierr .NE. NF_NOERR) THEN188 PRINT*, "lect_start_archive: Le champ <C2H2_up> est absent..."189 CALL abort190 ENDIF191 #ifdef NC_DOUBLE192 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(10,:,:,:))193 #else194 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(10,:,:,:))195 #endif196 IF (ierr .NE. NF_NOERR) THEN197 PRINT*, "lect_start_archive: Lecture echouee pour <C2H2_up>"198 CALL abort199 ENDIF200 201 ! --------------------------------202 203 ierr=NF_INQ_VARID(nid,"C2H3_up",nvarid)204 IF (ierr .NE. NF_NOERR) THEN205 PRINT*, "lect_start_archive: Le champ <C2H3_up> est absent..."206 CALL abort207 ENDIF208 #ifdef NC_DOUBLE209 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(11,:,:,:))210 #else211 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(11,:,:,:))212 #endif213 IF (ierr .NE. NF_NOERR) THEN214 PRINT*, "lect_start_archive: Lecture echouee pour <C2H3_up>"215 CALL abort216 ENDIF217 218 ! --------------------------------219 220 ierr=NF_INQ_VARID(nid,"C2H4_up",nvarid)221 IF (ierr .NE. NF_NOERR) THEN222 PRINT*, "lect_start_archive: Le champ <C2H4_up> est absent..."223 CALL abort224 ENDIF225 #ifdef NC_DOUBLE226 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(12,:,:,:))227 #else228 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(12,:,:,:))229 #endif230 IF (ierr .NE. NF_NOERR) THEN231 PRINT*, "lect_start_archive: Lecture echouee pour <C2H4_up>"232 CALL abort233 ENDIF234 235 ! --------------------------------236 237 ierr=NF_INQ_VARID(nid,"C2H5_up",nvarid)238 IF (ierr .NE. NF_NOERR) THEN239 PRINT*, "lect_start_archive: Le champ <C2H5_up> est absent..."240 CALL abort241 ENDIF242 #ifdef NC_DOUBLE243 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(13,:,:,:))244 #else245 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(13,:,:,:))246 #endif247 IF (ierr .NE. NF_NOERR) THEN248 PRINT*, "lect_start_archive: Lecture echouee pour <C2H5_up>"249 CALL abort250 ENDIF251 252 ! --------------------------------253 254 ierr=NF_INQ_VARID(nid,"C2H6_up",nvarid)255 IF (ierr .NE. NF_NOERR) THEN256 PRINT*, "lect_start_archive: Le champ <C2H6_up> est absent..."257 CALL abort258 ENDIF259 #ifdef NC_DOUBLE260 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(14,:,:,:))261 #else262 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(14,:,:,:))263 #endif264 IF (ierr .NE. NF_NOERR) THEN265 PRINT*, "lect_start_archive: Lecture echouee pour <C2H6_up>"266 CALL abort267 ENDIF268 269 ! --------------------------------270 271 ierr=NF_INQ_VARID(nid,"C3H3_up",nvarid)272 IF (ierr .NE. NF_NOERR) THEN273 PRINT*, "lect_start_archive: Le champ <C3H3_up> est absent..."274 CALL abort275 ENDIF276 #ifdef NC_DOUBLE277 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(15,:,:,:))278 #else279 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(15,:,:,:))280 #endif281 IF (ierr .NE. NF_NOERR) THEN282 PRINT*, "lect_start_archive: Lecture echouee pour <C3H3_up>"283 CALL abort284 ENDIF285 286 ! --------------------------------287 288 ierr=NF_INQ_VARID(nid,"C3H5_up",nvarid)289 IF (ierr .NE. NF_NOERR) THEN290 PRINT*, "lect_start_archive: Le champ <C3H5_up> est absent..."291 CALL abort292 ENDIF293 #ifdef NC_DOUBLE294 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(16,:,:,:))295 #else296 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(16,:,:,:))297 #endif298 IF (ierr .NE. NF_NOERR) THEN299 PRINT*, "lect_start_archive: Lecture echouee pour <C3H5_up>"300 CALL abort301 ENDIF302 303 ! --------------------------------304 305 ierr=NF_INQ_VARID(nid,"C3H6_up",nvarid)306 IF (ierr .NE. NF_NOERR) THEN307 PRINT*, "lect_start_archive: Le champ <C3H6_up> est absent..."308 CALL abort309 ENDIF310 #ifdef NC_DOUBLE311 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(17,:,:,:))312 #else313 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(17,:,:,:))314 #endif315 IF (ierr .NE. NF_NOERR) THEN316 PRINT*, "lect_start_archive: Lecture echouee pour <C3H6_up>"317 CALL abort318 ENDIF319 320 ! --------------------------------321 322 ierr=NF_INQ_VARID(nid,"C3H7_up",nvarid)323 IF (ierr .NE. NF_NOERR) THEN324 PRINT*, "lect_start_archive: Le champ <C3H7_up> est absent..."325 CALL abort326 ENDIF327 #ifdef NC_DOUBLE328 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(18,:,:,:))329 #else330 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(18,:,:,:))331 #endif332 IF (ierr .NE. NF_NOERR) THEN333 PRINT*, "lect_start_archive: Lecture echouee pour <C3H7_up>"334 CALL abort335 ENDIF336 337 ! --------------------------------338 339 ierr=NF_INQ_VARID(nid,"C4H_up",nvarid)340 IF (ierr .NE. NF_NOERR) THEN341 PRINT*, "lect_start_archive: Le champ <C4H_up> est absent..."342 CALL abort343 ENDIF344 #ifdef NC_DOUBLE345 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(19,:,:,:))346 #else347 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(19,:,:,:))348 #endif349 IF (ierr .NE. NF_NOERR) THEN350 PRINT*, "lect_start_archive: Lecture echouee pour <C4H_up>"351 CALL abort352 ENDIF353 354 ! --------------------------------355 356 ierr=NF_INQ_VARID(nid,"C4H3_up",nvarid)357 IF (ierr .NE. NF_NOERR) THEN358 PRINT*, "lect_start_archive: Le champ <C4H3_up> est absent..."359 CALL abort360 ENDIF361 #ifdef NC_DOUBLE362 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(20,:,:,:))363 #else364 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(20,:,:,:))365 #endif366 IF (ierr .NE. NF_NOERR) THEN367 PRINT*, "lect_start_archive: Lecture echouee pour <C4H3_up>"368 CALL abort369 ENDIF370 371 ! --------------------------------372 373 ierr=NF_INQ_VARID(nid,"C4H4_up",nvarid)374 IF (ierr .NE. NF_NOERR) THEN375 PRINT*, "lect_start_archive: Le champ <C4H4_up> est absent..."376 CALL abort377 ENDIF378 #ifdef NC_DOUBLE379 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(21,:,:,:))380 #else381 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(21,:,:,:))382 #endif383 IF (ierr .NE. NF_NOERR) THEN384 PRINT*, "lect_start_archive: Lecture echouee pour <C4H4_up>"385 CALL abort386 ENDIF387 388 ! --------------------------------389 390 ierr=NF_INQ_VARID(nid,"C4H2s_up",nvarid)391 IF (ierr .NE. NF_NOERR) THEN392 PRINT*, "lect_start_archive: Le champ <C4H2s_up> est absent..."393 CALL abort394 ENDIF395 #ifdef NC_DOUBLE396 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(22,:,:,:))397 #else398 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(22,:,:,:))399 #endif400 IF (ierr .NE. NF_NOERR) THEN401 PRINT*, "lect_start_archive: Lecture echouee pour <C4H2s_up>"402 CALL abort403 ENDIF404 405 ! --------------------------------406 407 ierr=NF_INQ_VARID(nid,"CH2CCH2_up",nvarid)408 IF (ierr .NE. NF_NOERR) THEN409 PRINT*, "lect_start_archive: Le champ <CH2CCH2_up> est absent..."410 CALL abort411 ENDIF412 #ifdef NC_DOUBLE413 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(23,:,:,:))414 #else415 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(23,:,:,:))416 #endif417 IF (ierr .NE. NF_NOERR) THEN418 PRINT*, "lect_start_archive: Lecture echouee pour <CH2CCH2_up>"419 CALL abort420 ENDIF421 422 ! --------------------------------423 424 ierr=NF_INQ_VARID(nid,"CH3CCH_up",nvarid)425 IF (ierr .NE. NF_NOERR) THEN426 PRINT*, "lect_start_archive: Le champ <CH3CCH_up> est absent..."427 CALL abort428 ENDIF429 #ifdef NC_DOUBLE430 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(24,:,:,:))431 #else432 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(24,:,:,:))433 #endif434 IF (ierr .NE. NF_NOERR) THEN435 PRINT*, "lect_start_archive: Lecture echouee pour <CH3CCH_up>"436 CALL abort437 ENDIF438 439 ! --------------------------------440 441 ierr=NF_INQ_VARID(nid,"C3H8_up",nvarid)442 IF (ierr .NE. NF_NOERR) THEN443 PRINT*, "lect_start_archive: Le champ <C3H8_up> est absent..."444 CALL abort445 ENDIF446 #ifdef NC_DOUBLE447 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(25,:,:,:))448 #else449 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(25,:,:,:))450 #endif451 IF (ierr .NE. NF_NOERR) THEN452 PRINT*, "lect_start_archive: Lecture echouee pour <C3H8_up>"453 CALL abort454 ENDIF455 456 ! --------------------------------457 458 ierr=NF_INQ_VARID(nid,"C4H2_up",nvarid)459 IF (ierr .NE. NF_NOERR) THEN460 PRINT*, "lect_start_archive: Le champ <C4H2_up> est absent..."461 CALL abort462 ENDIF463 #ifdef NC_DOUBLE464 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(26,:,:,:))465 #else466 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(26,:,:,:))467 #endif468 IF (ierr .NE. NF_NOERR) THEN469 PRINT*, "lect_start_archive: Lecture echouee pour <C4H2_up>"470 CALL abort471 ENDIF472 473 ! --------------------------------474 475 ierr=NF_INQ_VARID(nid,"C4H6_up",nvarid)476 IF (ierr .NE. NF_NOERR) THEN477 PRINT*, "lect_start_archive: Le champ <C4H6_up> est absent..."478 CALL abort479 ENDIF480 #ifdef NC_DOUBLE481 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(27,:,:,:))482 #else483 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(27,:,:,:))484 #endif485 IF (ierr .NE. NF_NOERR) THEN486 PRINT*, "lect_start_archive: Lecture echouee pour <C4H6_up>"487 CALL abort488 ENDIF489 490 ! --------------------------------491 492 ierr=NF_INQ_VARID(nid,"C4H10_up",nvarid)493 IF (ierr .NE. NF_NOERR) THEN494 PRINT*, "lect_start_archive: Le champ <C4H10_up> est absent..."495 CALL abort496 ENDIF497 #ifdef NC_DOUBLE498 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(28,:,:,:))499 #else500 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(28,:,:,:))501 #endif502 IF (ierr .NE. NF_NOERR) THEN503 PRINT*, "lect_start_archive: Lecture echouee pour <C4H10_up>"504 CALL abort505 ENDIF506 507 ! --------------------------------508 509 ierr=NF_INQ_VARID(nid,"AC6H6_up",nvarid)510 IF (ierr .NE. NF_NOERR) THEN511 PRINT*, "lect_start_archive: Le champ <AC6H6_up> est absent..."512 CALL abort513 ENDIF514 #ifdef NC_DOUBLE515 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(29,:,:,:))516 #else517 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(29,:,:,:))518 #endif519 IF (ierr .NE. NF_NOERR) THEN520 PRINT*, "lect_start_archive: Lecture echouee pour <AC6H6_up>"521 CALL abort522 ENDIF523 524 ! --------------------------------525 526 ierr=NF_INQ_VARID(nid,"C3H2_up",nvarid)527 IF (ierr .NE. NF_NOERR) THEN528 PRINT*, "lect_start_archive: Le champ <C3H2_up> est absent..."529 CALL abort530 ENDIF531 #ifdef NC_DOUBLE532 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(30,:,:,:))533 #else534 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(30,:,:,:))535 #endif536 IF (ierr .NE. NF_NOERR) THEN537 PRINT*, "lect_start_archive: Lecture echouee pour <C3H2_up>"538 CALL abort539 ENDIF540 541 ! --------------------------------542 543 ierr=NF_INQ_VARID(nid,"C4H5_up",nvarid)544 IF (ierr .NE. NF_NOERR) THEN545 PRINT*, "lect_start_archive: Le champ <C4H5_up> est absent..."546 CALL abort547 ENDIF548 #ifdef NC_DOUBLE549 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(31,:,:,:))550 #else551 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(31,:,:,:))552 #endif553 IF (ierr .NE. NF_NOERR) THEN554 PRINT*, "lect_start_archive: Lecture echouee pour <C4H5_up>"555 CALL abort556 ENDIF557 558 ! --------------------------------559 560 ierr=NF_INQ_VARID(nid,"AC6H5_up",nvarid)561 IF (ierr .NE. NF_NOERR) THEN562 PRINT*, "lect_start_archive: Le champ <AC6H5_up> est absent..."563 CALL abort564 ENDIF565 #ifdef NC_DOUBLE566 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(32,:,:,:))567 #else568 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(32,:,:,:))569 #endif570 IF (ierr .NE. NF_NOERR) THEN571 PRINT*, "lect_start_archive: Lecture echouee pour <AC6H5_up>"572 CALL abort573 ENDIF574 575 ! --------------------------------576 577 ierr=NF_INQ_VARID(nid,"N2_up",nvarid)578 IF (ierr .NE. NF_NOERR) THEN579 PRINT*, "lect_start_archive: Le champ <N2_up> est absent..."580 CALL abort581 ENDIF582 #ifdef NC_DOUBLE583 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(33,:,:,:))584 #else585 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(33,:,:,:))586 #endif587 IF (ierr .NE. NF_NOERR) THEN588 PRINT*, "lect_start_archive: Lecture echouee pour <N2_up>"589 CALL abort590 ENDIF591 592 ! --------------------------------593 594 ierr=NF_INQ_VARID(nid,"N4S_up",nvarid)595 IF (ierr .NE. NF_NOERR) THEN596 PRINT*, "lect_start_archive: Le champ <N4S_up> est absent..."597 CALL abort598 ENDIF599 #ifdef NC_DOUBLE600 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(34,:,:,:))601 #else602 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(34,:,:,:))603 #endif604 IF (ierr .NE. NF_NOERR) THEN605 PRINT*, "lect_start_archive: Lecture echouee pour <N4S_up>"606 CALL abort607 ENDIF608 609 ! --------------------------------610 611 ierr=NF_INQ_VARID(nid,"CN_up",nvarid)612 IF (ierr .NE. NF_NOERR) THEN613 PRINT*, "lect_start_archive: Le champ <CN_up> est absent..."614 CALL abort615 ENDIF616 #ifdef NC_DOUBLE617 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(35,:,:,:))618 #else619 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(35,:,:,:))620 #endif621 IF (ierr .NE. NF_NOERR) THEN622 PRINT*, "lect_start_archive: Lecture echouee pour <CN_up>"623 CALL abort624 ENDIF625 626 ! --------------------------------627 628 ierr=NF_INQ_VARID(nid,"HCN_up",nvarid)629 IF (ierr .NE. NF_NOERR) THEN630 PRINT*, "lect_start_archive: Le champ <HCN_up> est absent..."631 CALL abort632 ENDIF633 #ifdef NC_DOUBLE634 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(36,:,:,:))635 #else636 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(36,:,:,:))637 #endif638 IF (ierr .NE. NF_NOERR) THEN639 PRINT*, "lect_start_archive: Lecture echouee pour <HCN_up>"640 CALL abort641 ENDIF642 643 ! --------------------------------644 645 ierr=NF_INQ_VARID(nid,"H2CN_up",nvarid)646 IF (ierr .NE. NF_NOERR) THEN647 PRINT*, "lect_start_archive: Le champ <H2CN_up> est absent..."648 CALL abort649 ENDIF650 #ifdef NC_DOUBLE651 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(37,:,:,:))652 #else653 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(37,:,:,:))654 #endif655 IF (ierr .NE. NF_NOERR) THEN656 PRINT*, "lect_start_archive: Lecture echouee pour <H2CN_up>"657 CALL abort658 ENDIF659 660 ! --------------------------------661 662 ierr=NF_INQ_VARID(nid,"CHCN_up",nvarid)663 IF (ierr .NE. NF_NOERR) THEN664 PRINT*, "lect_start_archive: Le champ <CHCN_up> est absent..."665 CALL abort666 ENDIF667 #ifdef NC_DOUBLE668 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(38,:,:,:))669 #else670 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(38,:,:,:))671 #endif672 IF (ierr .NE. NF_NOERR) THEN673 PRINT*, "lect_start_archive: Lecture echouee pour <CHCN_up>"674 CALL abort675 ENDIF676 677 ! --------------------------------678 679 ierr=NF_INQ_VARID(nid,"CH2CN_up",nvarid)680 IF (ierr .NE. NF_NOERR) THEN681 PRINT*, "lect_start_archive: Le champ <CH2CN_up> est absent..."682 CALL abort683 ENDIF684 #ifdef NC_DOUBLE685 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(39,:,:,:))686 #else687 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(39,:,:,:))688 #endif689 IF (ierr .NE. NF_NOERR) THEN690 PRINT*, "lect_start_archive: Lecture echouee pour <CH2CN_up>"691 CALL abort692 ENDIF693 694 ! --------------------------------695 696 ierr=NF_INQ_VARID(nid,"CH3CN_up",nvarid)697 IF (ierr .NE. NF_NOERR) THEN698 PRINT*, "lect_start_archive: Le champ <CH3CN_up> est absent..."699 CALL abort700 ENDIF701 #ifdef NC_DOUBLE702 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(40,:,:,:))703 #else704 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(40,:,:,:))705 #endif706 IF (ierr .NE. NF_NOERR) THEN707 PRINT*, "lect_start_archive: Lecture echouee pour <CH3CN_up>"708 CALL abort709 ENDIF710 711 ! --------------------------------712 713 ierr=NF_INQ_VARID(nid,"C3N_up",nvarid)714 IF (ierr .NE. NF_NOERR) THEN715 PRINT*, "lect_start_archive: Le champ <C3N_up> est absent..."716 CALL abort717 ENDIF718 #ifdef NC_DOUBLE719 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(41,:,:,:))720 #else721 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(41,:,:,:))722 #endif723 IF (ierr .NE. NF_NOERR) THEN724 PRINT*, "lect_start_archive: Lecture echouee pour <C3N_up>"725 CALL abort726 ENDIF727 728 ! --------------------------------729 730 ierr=NF_INQ_VARID(nid,"HC3N_up",nvarid)731 IF (ierr .NE. NF_NOERR) THEN732 PRINT*, "lect_start_archive: Le champ <HC3N_up> est absent..."733 CALL abort734 ENDIF735 #ifdef NC_DOUBLE736 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(42,:,:,:))737 #else738 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(42,:,:,:))739 #endif740 IF (ierr .NE. NF_NOERR) THEN741 PRINT*, "lect_start_archive: Lecture echouee pour <HC3N_up>"742 CALL abort743 ENDIF744 745 ! --------------------------------746 747 ierr=NF_INQ_VARID(nid,"NCCN_up",nvarid)748 IF (ierr .NE. NF_NOERR) THEN749 PRINT*, "lect_start_archive: Le champ <NCCN_up> est absent..."750 CALL abort751 ENDIF752 #ifdef NC_DOUBLE753 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(43,:,:,:))754 #else755 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(43,:,:,:))756 #endif757 IF (ierr .NE. NF_NOERR) THEN758 PRINT*, "lect_start_archive: Lecture echouee pour <NCCN_up>"759 CALL abort760 ENDIF761 762 ! --------------------------------763 764 ierr=NF_INQ_VARID(nid,"C4N2_up",nvarid)765 IF (ierr .NE. NF_NOERR) THEN766 PRINT*, "lect_start_archive: Le champ <C4N2_up> est absent..."767 CALL abort768 ENDIF769 #ifdef NC_DOUBLE770 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,ykim_upoldS(44,:,:,:))771 #else772 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,ykim_upoldS(44,:,:,:))773 #endif774 IF (ierr .NE. NF_NOERR) THEN775 PRINT*, "lect_start_archive: Lecture echouee pour <C4N2_up>"776 CALL abort777 ENDIF778 779 WRITE(*,*)780 781 END SUBROUTINE read_startarch_kim782 783 27 END MODULE comchem_newstart_h -
trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/lect_start_archive.F
r1892 r1894 5 5 6 6 ! USE surfdat_h 7 USE comchem_h, only : cnames 7 8 USE comchem_newstart_h 8 9 USE comsoil_h, ONLY: nsoilmx, layer, mlayer, volcapa, inertiedat … … 843 844 ierr=NF_INQ_VARID(nid,"H_up",nvarid) 844 845 845 IF (ierr .NE. NF_NOERR) THEN 846 IF (ierr .NE. NF_NOERR) THEN ! H_up not found 846 847 847 848 PRINT*, "lect_start_archive: Le champ <H_up> est absent..." … … 856 857 ENDIF 857 858 858 ELSE 859 ELSE ! H_up found 859 860 860 861 IF (.not.callchim) THEN … … 874 875 PRINT*, "lect_start_archive: Lecture echouee pour <H_up>" 875 876 CALL abort 876 ENDIF 877 ENDIF 878 877 879 ! Then read all the others by their name if needed 878 CALL read_startarch_kim(nid,start,count) 879 ENDIF 880 DO iq=2,44 881 ierr=NF_INQ_VARID(nid,trim(cnames(iq))//"_up",nvarid) 882 IF (ierr .NE. NF_NOERR) THEN 883 PRINT*, "lect_start_archive: Le champ <" 884 &//trim(cnames(iq))//"_up> est absent..." 885 CALL abort 886 ENDIF 887 #ifdef NC_DOUBLE 888 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count, 889 & ykim_upoldS(iq,:,:,:)) 890 #else 891 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count, 892 & ykim_upoldS(iq,:,:,:)) 893 #endif 894 IF (ierr .NE. NF_NOERR) THEN 895 PRINT*, "lect_start_archive: Lecture echouee pour <" 896 &//trim(cnames(iq))//"_up>" 897 CALL abort 898 ENDIF 899 ENDDO 900 901 WRITE(*,*) 902 903 ENDIF ! if callchim 880 904 881 905 ENDIF ! if ierr.ne.nf_no_err -
trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/newstart.F
r1892 r1894 1085 1085 WRITE(*,*) " Number of upper chemistry layers =", nlaykim_up 1086 1086 1087 ! Regriding is then done, if needed 1088 1089 IF (callchim .and. nlaykimold.ne.nlaykim_up) THEN 1090 1091 WRITE(*,*) " Warning, nlaykimold=", nlaykimold 1092 WRITE(*,*) ' which implies that a vertical regriding on upper 1087 IF (callchim) THEN 1088 1089 IF (.NOT.allocated(ykim_up)) THEN 1090 ALLOCATE(ykim_up(44,ngridmx,nlaykim_up)) 1091 ENDIF 1092 1093 ! Regriding if needed 1094 1095 IF (nlaykimold.ne.nlaykim_up) THEN 1096 1097 WRITE(*,*) " Warning, nlaykimold=", nlaykimold 1098 WRITE(*,*) ' which implies that a vertical regriding on upper 1093 1099 &chemistry fields will be performed.' 1094 WRITE(*,*)1100 WRITE(*,*) 1095 1101 1096 ! CALL vert_regrid_kim(ngridmx) 1102 ! CALL vert_regrid_kim(ngridmx) 1103 1104 ENDIF 1097 1105 1098 1106 ENDIF -
trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/start2archive.F
r1891 r1894 21 21 use infotrac, only: infotrac_init, nqtot, tname 22 22 USE comsoil_h 23 USE comchem_h, only : nlaykim_up, preskim23 USE comchem_h, only : cnames, nlaykim_up, preskim, ykim_up 24 24 ! USE comgeomfi_h, ONLY: lati, long, area 25 25 ! use control_mod … … 83 83 c Added by JVO for Titan specifities 84 84 REAL tankCH4(ngridmx) ! Depth of surface methane tank 85 86 REAL,ALLOCATABLE :: ykim_up(:,:,:) ! Upper chemistry fields87 85 88 86 c Variable naturelle / grille scalaire … … 221 219 222 220 ! Allocate other arrays of nlaykim_up size, only if they're present 223 ! The test is on H CNbut could be on any as we assume we can't do incomplete chemistry224 225 ierr = NF_INQ_VARID(nid1,'H CN_up',varid)221 ! The test is on H but could be on any as we assume we can't do incomplete chemistry 222 223 ierr = NF_INQ_VARID(nid1,'H_up',varid) 226 224 IF (ierr .NE. NF_NOERR) THEN 227 225 PRINT*, "start2archive: Missing field(s) for upper chemistry ... … … 268 266 269 267 270 271 268 ! load 'controle' array from physics start file 272 269 … … 292 289 ENDIF 293 290 294 ! load upper chemistry pressure grid from physics start file295 296 ierr = NF_INQ_VARID (nid1, "preskim", varid)297 IF (ierr .NE. NF_NOERR) THEN298 PRINT*, "start2archive: Le champ <preskim> est absent"299 CALL abort300 ENDIF301 #ifdef NC_DOUBLE302 ierr = NF_GET_VAR_DOUBLE(nid1, varid, preskim)303 #else304 ierr = NF_GET_VAR_REAL(nid1, varid, preskim)305 #endif306 IF (ierr .NE. NF_NOERR) THEN307 PRINT*, "start2archive: Lecture echoue pour <preskim>"308 CALL abort309 ENDIF310 311 291 ierr = NF_CLOSE(nid1) 312 292 … … 374 354 c qsurf --> qsurfS 375 355 c tankCH4 --> tankCH4S 376 c + all 44 chemistry fields356 c ykim_up --> ykim_upS ( 44 upper chemistry fields ) 377 357 c 378 358 c----------------------------------------------------------------------- … … 388 368 389 369 IF (kim) THEN ! NB : fields are in comchem_startarch_h 390 DO i =1,44391 call gr_fi_dyn(nlaykim_up,ngridmx,iip1,jjp1,ykim_up(i ,:,:),392 & ykim_upS(i ,:,:))370 DO iq=1,44 371 call gr_fi_dyn(nlaykim_up,ngridmx,iip1,jjp1,ykim_up(iq,:,:), 372 & ykim_upS(iq,:,:)) 393 373 ENDDO 394 374 ENDIF … … 539 519 c----------------------------------------------------------------- 540 520 c Ecriture des champs upper_chemistry 541 c NB : We assume a given order of the 44 chemistry tracers ! !542 c ( H=1, H2=2 ..., C4N2=44) 521 c NB : We assume a given order of the 44 chemistry tracers ! 522 c ( H=1, H2=2 ..., C4N2=44) -> hardcoded in comchem_h. 543 523 c----------------------------------------------------------------- 544 524 545 525 IF (kim) THEN 546 call write_archive(nid,ntime,'H_up', 547 . 'H in upper atmosphere','kg/kg',4,ykim_upS(1,:,:)) 548 call write_archive(nid,ntime,'H2_up', 549 . 'H2 in upper atmosphere','kg/kg',4,ykim_upS(2,:,:)) 550 call write_archive(nid,ntime,'CH_up', 551 . 'CH in upper atmosphere','kg/kg',4,ykim_upS(3,:,:)) 552 call write_archive(nid,ntime,'CH2s_up', 553 . 'CH2s in upper atmosphere','kg/kg',4,ykim_upS(4,:,:)) 554 call write_archive(nid,ntime,'CH2_up', 555 . 'CH2 in upper atmosphere','kg/kg',4,ykim_upS(5,:,:)) 556 call write_archive(nid,ntime,'CH3_up', 557 . 'CH3 in upper atmosphere','kg/kg',4,ykim_upS(6,:,:)) 558 call write_archive(nid,ntime,'CH4_up', 559 . 'CH4 in upper atmosphere','kg/kg',4,ykim_upS(7,:,:)) 560 call write_archive(nid,ntime,'C2_up', 561 . 'C2 in upper atmosphere','kg/kg',4,ykim_upS(8,:,:)) 562 call write_archive(nid,ntime,'C2H_up', 563 . 'C2H in upper atmosphere','kg/kg',4,ykim_upS(9,:,:)) 564 call write_archive(nid,ntime,'C2H2_up', 565 . 'C2H2 in upper atmosphere','kg/kg',4,ykim_upS(10,:,:)) 566 call write_archive(nid,ntime,'C2H3_up', 567 . 'C2H3 in upper atmosphere','kg/kg',4,ykim_upS(11,:,:)) 568 call write_archive(nid,ntime,'C2H4_up', 569 . 'C2H4 in upper atmosphere','kg/kg',4,ykim_upS(12,:,:)) 570 call write_archive(nid,ntime,'C2H5_up', 571 . 'C2H5 in upper atmosphere','kg/kg',4,ykim_upS(13,:,:)) 572 call write_archive(nid,ntime,'C2H6_up', 573 . 'C2H6 in upper atmosphere','kg/kg',4,ykim_upS(14,:,:)) 574 call write_archive(nid,ntime,'C3H3_up', 575 . 'C3H3 in upper atmosphere','kg/kg',4,ykim_upS(15,:,:)) 576 call write_archive(nid,ntime,'C3H5_up', 577 . 'C3H5 in upper atmosphere','kg/kg',4,ykim_upS(16,:,:)) 578 call write_archive(nid,ntime,'C3H6_up', 579 . 'C3H6 in upper atmosphere','kg/kg',4,ykim_upS(17,:,:)) 580 call write_archive(nid,ntime,'C3H7_up', 581 . 'C3H7 in upper atmosphere','kg/kg',4,ykim_upS(18,:,:)) 582 call write_archive(nid,ntime,'C4H_up', 583 . 'C4H in upper atmosphere','kg/kg',4,ykim_upS(19,:,:)) 584 call write_archive(nid,ntime,'C4H3_up', 585 . 'C4H3 in upper atmosphere','kg/kg',4,ykim_upS(20,:,:)) 586 call write_archive(nid,ntime,'C4H4_up', 587 . 'C4H4 in upper atmosphere','kg/kg',4,ykim_upS(21,:,:)) 588 call write_archive(nid,ntime,'C4H2s_up', 589 . 'C4H2s in upper atmosphere','kg/kg',4,ykim_upS(22,:,:)) 590 call write_archive(nid,ntime,'CH2CCH2_up', 591 . 'CH2CCH2 in upper atmosphere','kg/kg',4,ykim_upS(23,:,:)) 592 call write_archive(nid,ntime,'CH3CCH_up', 593 . 'CH3CCH in upper atmosphere','kg/kg',4,ykim_upS(24,:,:)) 594 call write_archive(nid,ntime,'C3H8_up', 595 . 'C3H8 in upper atmosphere','kg/kg',4,ykim_upS(25,:,:)) 596 call write_archive(nid,ntime,'C4H2_up', 597 . 'C4H2 in upper atmosphere','kg/kg',4,ykim_upS(26,:,:)) 598 call write_archive(nid,ntime,'C4H6_up', 599 . 'C4H6 in upper atmosphere','kg/kg',4,ykim_upS(27,:,:)) 600 call write_archive(nid,ntime,'C4H10_up', 601 . 'C4H10 in upper atmosphere','kg/kg',4,ykim_upS(28,:,:)) 602 call write_archive(nid,ntime,'AC6H6_up', 603 . 'AC6H6 in upper atmosphere','kg/kg',4,ykim_upS(29,:,:)) 604 call write_archive(nid,ntime,'C3H2_up', 605 . 'C3H2 in upper atmosphere','kg/kg',4,ykim_upS(30,:,:)) 606 call write_archive(nid,ntime,'C4H5_up', 607 . 'C4H5 in upper atmosphere','kg/kg',4,ykim_upS(31,:,:)) 608 call write_archive(nid,ntime,'AC6H5_up', 609 . 'AC6H5 in upper atmosphere','kg/kg',4,ykim_upS(32,:,:)) 610 call write_archive(nid,ntime,'N2_up', 611 . 'N2 in upper atmosphere','kg/kg',4,ykim_upS(33,:,:)) 612 call write_archive(nid,ntime,'N4S_up', 613 . 'N4S in upper atmosphere','kg/kg',4,ykim_upS(34,:,:)) 614 call write_archive(nid,ntime,'CN_up', 615 . 'CN in upper atmosphere','kg/kg',4,ykim_upS(35,:,:)) 616 call write_archive(nid,ntime,'HCN_up', 617 . 'HCN in upper atmosphere','kg/kg',4,ykim_upS(36,:,:)) 618 call write_archive(nid,ntime,'H2CN_up', 619 . 'H2CN in upper atmosphere','kg/kg',4,ykim_upS(37,:,:)) 620 call write_archive(nid,ntime,'CHCN_up', 621 . 'CHCN in upper atmosphere','kg/kg',4,ykim_upS(38,:,:)) 622 call write_archive(nid,ntime,'CH2CN_up', 623 . 'CH2CN in upper atmosphere','kg/kg',4,ykim_upS(39,:,:)) 624 call write_archive(nid,ntime,'CH3CN_up', 625 . 'CH3CN in upper atmosphere','kg/kg',4,ykim_upS(40,:,:)) 626 call write_archive(nid,ntime,'C3N_up', 627 . 'C3N in upper atmosphere','kg/kg',4,ykim_upS(41,:,:)) 628 call write_archive(nid,ntime,'HC3N_up', 629 . 'HC3N in upper atmosphere','kg/kg',4,ykim_upS(42,:,:)) 630 call write_archive(nid,ntime,'NCCN_up', 631 . 'NCCN in upper atmosphere','kg/kg',4,ykim_upS(43,:,:)) 632 call write_archive(nid,ntime,'C4N2_up', 633 . 'C4N2 in upper atmosphere','kg/kg',4,ykim_upS(44,:,:)) 526 DO iq=1,44 527 call write_archive(nid,ntime,trim(cnames(iq))//'_up', 528 . trim(cnames(iq))//' in upper atmosphere', 529 . 'kg/kg',4,ykim_upS(iq,:,:)) 530 ENDDO 634 531 ENDIF 635 532 -
trunk/LMDZ.TITAN/libf/phytitan/comchem_h.F90
r1892 r1894 1 1 MODULE comchem_h 2 2 3 ! ----------------------------------------------------------------------- 4 ! Purpose : Stores data relative to upper chemistry in the GCM 5 ! ------- For newstart there is a specific comchem_newstart_h module. 3 ! ---------------------------------------------------------------------------- 4 ! Purpose : Stores data relative to chemistry in the GCM and upper chemistry 5 ! ------- 6 ! NB : For newstart there is a specific comchem_newstart_h module. 6 7 ! 7 ! Author : Jan Vatant d'Ollone (2017 )8 ! Author : Jan Vatant d'Ollone (2017-18) 8 9 ! ------ 9 10 ! … … 14 15 ! N4S, CN, HCN, H2CN, CHCN, CH2CN, CH3CN, C3N, HC3N, NCCN, C4N2 15 16 16 ! -------------------------------------------------------------------------- 17 ! ---------------------------------------------------------------------------- 17 18 18 19 IMPLICIT NONE 19 20 INTEGER :: nlaykim_up ! Number of upper atm. layers for chemistry from GCM top to 4.5E-5 Pa (1300km) 21 INTEGER :: nlaykim_tot ! Number of total layers for chemistry from surface to 4.5E-5 Pa (1300km) 20 21 !! Hard-coded chemical species for Titan chemistry 22 CHARACTER(len=10), DIMENSION(44), PARAMETER :: cnames = & 23 (/"H ", "H2 ", "CH ", "CH2s ", "CH2 ", "CH3 ", & 24 "CH4 ", "C2 ", "C2H ", "C2H2 ", "C2H3 ", "C2H4 ", & 25 "C2H5 ", "C2H6 ", "C3H3 ", "C3H5 ", "C3H6 ", "C3H7 ", & 26 "C4H ", "C4H3 ", "C4H4 ", "C4H2s ", "CH2CCH2 ", "CH3CCH ", & 27 "C3H8 ", "C4H2 ", "C4H6 ", "C4H10 ", "AC6H6 ", "C3H2 ", & 28 "C4H5 ", "AC6H5 ", "N2 ", "N4S ", "CN ", "HCN ", & 29 "H2CN ", "CHCN ", "CH2CN ", "CH3CN ", "C3N ", "HC3N ", & 30 "NCCN ", "C4N2 "/) 31 !! Hard-coded chemical species molar mass (g.mol-1), shares the same indexing than cnames. 32 REAL, DIMENSION(44), PARAMETER :: cmmol = (/ & 33 1.01 , 2.0158, 13.02, 14.03, 14.03, 15.03, 16.04 , 24.02, 25.03, 26.04 , 27.05 , & 34 28.05 , 29.06 , 30.07, 39.06, 41.07, 42.08, 43.09 , 49.05, 51.07, 52.08 , 50.06 , & 35 40.07 , 40.07 , 44.11, 50.06, 54.09, 58.13, 78.1136, 38.05, 53.07, 77.1136, 28.0134, & 36 14.01 , 26.02 , 27.04, 28.05, 39.05, 40.04, 41.05 , 50.04, 51.05, 52.04 , 76.1 /) 37 38 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 39 ! Upper chemistry 40 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 41 42 INTEGER, SAVE :: nlaykim_up ! Number of upper atm. layers for chemistry from GCM top to 4.5E-5 Pa (1300km) 43 INTEGER, SAVE :: nlaykim_tot ! Number of total layers for chemistry from surface to 4.5E-5 Pa (1300km) 22 44 !$OMP_THREADPRIVATE(nlaykim_up,nlay_kim_tot) 23 45 … … 33 55 !$OMP_THREADPRIVATE(ykim_up) 34 56 57 CONTAINS 58 59 SUBROUTINE ini_comchem_h(ngrid) 60 61 IMPLICIT NONE 62 63 include "dimensions.h" 64 65 INTEGER,INTENT(IN) :: ngrid ! number of atmospheric columns 66 67 nlaykim_tot = nlaykim_up + llm 68 69 IF (.NOT.allocated(preskim)) ALLOCATE(preskim(nlaykim_up)) 70 IF (.NOT.allocated(zlay_kim)) ALLOCATE(zlay_kim(ngrid,nlaykim_tot)) 71 IF (.NOT.allocated(ykim_up)) ALLOCATE(ykim_up(44,ngrid,nlaykim_up)) 72 73 END SUBROUTINE ini_comchem_h 74 75 35 76 END MODULE comchem_h -
trunk/LMDZ.TITAN/libf/phytitan/phyetat0_mod.F90
r1789 r1894 264 264 endif ! of if (nq.ge.1) 265 265 266 267 266 if (startphy_file) then 268 267 ! Call to soil_settings, in order to read soil temperatures, … … 270 269 call soil_settings(nid_start,ngrid,nsoil,tsurf,tsoil,indextime) 271 270 endif ! of if (startphy_file) 271 272 ! Upper chemistry 273 if (startphy_file) then 274 ! Call to soil_settings, in order to read upper chemistry 275 ! pressure grid as well as composition fields 276 call chem_settings(nid_start,ngrid,indextime) 277 endif ! of if (startphy_file) 278 272 279 ! 273 280 ! close file: -
trunk/LMDZ.TITAN/libf/phytitan/phyredem.F90
r1889 r1894 143 143 use iostart, only : open_restartphy, close_restartphy, & 144 144 put_var, put_field 145 use comchem_h, only: cnames, ykim_up 145 146 use tracer_h, only: noms 147 use callkeys_mod, only: callchim 146 148 147 149 implicit none … … 185 187 call put_field("tankCH4","Depth of methane tank",tankCH4) 186 188 187 ! tracers189 ! Tracers 188 190 if (nq>0) then 189 191 do iq=1,nq … … 191 193 enddo 192 194 endif ! of if (nq>0) 193 195 196 ! Upper chemistry 197 if (callchim) then 198 do iq=1,44 199 call put_field(trim(cnames(iq))//"_up",trim(cnames(iq))//" in upper atmosphere",ykim_up(iq,:,:)) 200 enddo 201 endif ! of if callchim 202 194 203 ! close file 195 204 CALL close_restartphy -
trunk/LMDZ.TITAN/libf/phytitan/tracer_h.F90
r1843 r1894 68 68 USE callkeys_mod 69 69 USE comcstfi_mod, only: mugaz 70 USE comchem_h, only: cnames, cmmol 70 71 IMPLICIT NONE 71 72 … … 76 77 LOGICAL :: verb,found 77 78 CHARACTER(len=20) :: str 78 !! Hard-coded chemical species for Titan chemistry79 CHARACTER(len=10), DIMENSION(44), PARAMETER :: cnames = &80 (/"H ", "H2 ", "CH ", "CH2s ", "CH2 ", "CH3 ", &81 "CH4 ", "C2 ", "C2H ", "C2H2 ", "C2H3 ", "C2H4 ", &82 "C2H5 ", "C2H6 ", "C3H3 ", "C3H5 ", "C3H6 ", "C3H7 ", &83 "C4H ", "C4H3 ", "C4H4 ", "C4H2s ", "CH2CCH2 ", "CH3CCH ", &84 "C3H8 ", "C4H2 ", "C4H6 ", "C4H10 ", "AC6H6 ", "C3H2 ", &85 "C4H5 ", "AC6H5 ", "N2 ", "N4S ", "CN ", "HCN ", &86 "H2CN ", "CHCN ", "CH2CN ", "CH3CN ", "C3N ", "HC3N ", &87 "NCCN ", "C4N2 "/)88 !! Hard-coded chemical species molar mass (g.mol-1), shares the same indexing than cnames.89 REAL, DIMENSION(44), PARAMETER :: cmmol = (/ &90 1.01 , 2.0158, 13.02, 14.03, 14.03, 15.03, 16.04 , 24.02, 25.03, 26.04 , 27.05 , &91 28.05 , 29.06 , 30.07, 39.06, 41.07, 42.08, 43.09 , 49.05, 51.07, 52.08 , 50.06 , &92 40.07 , 40.07 , 44.11, 50.06, 54.09, 58.13, 78.1136, 38.05, 53.07, 77.1136, 28.0134, &93 14.01 , 26.02 , 27.04, 28.05, 39.05, 40.04, 41.05 , 50.04, 51.05, 52.04 , 76.1 /)94 79 95 80 INTEGER :: i,j,n
Note: See TracChangeset
for help on using the changeset viewer.