Changeset 324 for trunk/MESOSCALE/LMD_MM_MARS/SRC/PREP_MARS
- Timestamp:
- Oct 21, 2011, 11:31:28 AM (14 years ago)
- Location:
- trunk/MESOSCALE/LMD_MM_MARS/SRC/PREP_MARS
- Files:
-
- 2 edited
-
compile_pgf (modified) (1 diff)
-
readmeteo.F90 (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/MESOSCALE/LMD_MM_MARS/SRC/PREP_MARS/compile_pgf
r235 r324 8 8 -L$NETCDF/lib -lnetcdf \ 9 9 -I$NETCDF/include \ 10 -o readmeteo.exe 10 -o readmeteo.exe #-DPHOTOCHEM 11 11 12 12 pgf90 create_readmeteo.F90 \ 13 13 -L$NETCDF/lib -lnetcdf \ 14 14 -I$NETCDF/include \ 15 -o create_readmeteo.exe 15 -o create_readmeteo.exe #-DPHOTOCHEM \ 16 16 17 17 \rm fix_no_info.inc 2> /dev/null -
trunk/MESOSCALE/LMD_MM_MARS/SRC/PREP_MARS/readmeteo.F90
r73 r324 98 98 character*13, dimension(:), allocatable :: date_out 99 99 character*19, dimension(:), allocatable :: date_out2 100 101 #ifdef PHOTOCHEM 102 real, dimension(:,:,:,:,:), allocatable :: chemtrac 103 integer :: nchemtrac,i 104 CHARACTER*20,DIMENSION(:),ALLOCATABLE :: wtnom 105 #endif 106 107 100 108 !*************************************************************************** 101 109 !*************************************************************************** … … 230 238 allocate(interm(lonlen,latlen)) 231 239 allocate(gwparam(lonlen,latlen,5)) 232 allocate(ghtsfile(lonlen,latlen)) !! no scan axis240 allocate(ghtsfile(lonlen,latlen)) !! no scan axis 233 241 allocate(vide(lonlen,latlen)) 234 242 allocate(ones(lonlen,latlen)) 235 243 allocate(lat(latlen), lon(lonlen), alt(altlen), time(timelen)) 236 244 allocate(aps(altlen),bps(altlen),levels(altlen)) 245 #ifdef PHOTOCHEM 246 nchemtrac = 14 247 allocate(wtnom(nchemtrac)) 248 wtnom(1) = "c_co2" 249 wtnom(2) = "c_co" 250 wtnom(3) = "c_o" 251 wtnom(4) = "c_o1d" 252 wtnom(5) = "c_o2" 253 wtnom(6) = "c_o3" 254 wtnom(7) = "c_h" 255 wtnom(8) = "c_h2" 256 wtnom(9) = "c_oh" 257 wtnom(10) = "c_ho2" 258 wtnom(11) = "c_h2o2" 259 wtnom(12) = "c_ch4" 260 wtnom(13) = "c_n2" 261 wtnom(14) = "c_ar" 262 allocate(chemtrac(lonlen,latlen,altlen,timelen,nchemtrac)) 263 chemtrac(:,:,:,:,:)=0 264 #endif 237 265 238 266 tfile(:,:,:,:)=0 … … 523 551 IF (ierr .NE. NF_NOERR) THEN 524 552 ierr = NF_INQ_VARID (nid,"t",nvarid) 525 IF (ierr .NE. NF_NOERR) THEN553 IF (ierr .NE. NF_NOERR) THEN 526 554 PRINT *, "Error: Readmeteo <t> not found" 527 555 stop 528 ENDIF556 ENDIF 529 557 ENDIF 530 558 #ifdef NC_DOUBLE … … 627 655 !! special dust stuff 628 656 !!------------------------ 629 630 657 631 658 !SELECT CASE(ident) … … 677 704 !!!!!!!! 678 705 !!!!!!!! new physics 706 707 708 !!!!!!!!!!!!!!!!!!!!!!!!NEW PHYSICS + PHOTOCHEM 709 !!!!!!!!!!!!!!!!!!!!!!!!NEW PHYSICS + PHOTOCHEM 710 #ifdef PHOTOCHEM 711 print *,'photochem' 712 DO i=1,nchemtrac 713 print *,wtnom(i) 714 ierr=NF_INQ_VARID(nid,wtnom(i),nvarid) 715 if (ierr.ne.NF_NOERR) then 716 write(*,*) "...No ",wtnom(i), " - set to 0" 717 chemtrac(:,:,:,:,i)=0. 718 else 719 ierr=NF_GET_VAR_REAL(nid,nvarid,chemtrac(:,:,:,:,i)) 720 endif 721 ENDDO 722 #endif 723 !!!!!!!!!!!!!!!!!!!!!!!!NEW PHYSICS + PHOTOCHEM 724 !!!!!!!!!!!!!!!!!!!!!!!!NEW PHYSICS + PHOTOCHEM 725 679 726 680 727 … … 1192 1239 !print *,'The field '//DESC//' was written to '//output 1193 1240 1241 !------------------------! 1242 ! >>> Write a variable ! 1243 ! PHOTOCHEMISTRY ! 1244 !------------------------! 1245 #ifdef PHOTOCHEM 1246 DO i=1,nchemtrac 1247 FIELD=wtnom(i) 1248 UNITS='units' 1249 DESC='desc' 1250 XLVL=200100. 1251 SLAB=chemtrac(:,:,1,time_out(l),i) 1252 ! And now put everything in the destination file 1253 ! ... Header 1254 write(1) IFV 1255 write(1) HDATE,XFCST,SOURCE,FIELD,UNITS,DESC,XLVL,NX,NY,IPROJ 1256 write(1) STARTLOC,STARTLAT,STARTLON,DELTALAT,DELTALON 1257 ! ... Data 1258 write(1) SLAB 1259 ENDDO 1260 #endif 1194 1261 1195 1262 !!---------------------------------------------------- … … 1455 1522 END DO 1456 1523 !print *,'The field '//DESC//' was written to '//output 1524 1525 1526 !------------------------! 1527 ! >>> Write a variable ! 1528 ! PHOTOCHEMISTRY ! 1529 !------------------------! 1530 #ifdef PHOTOCHEM 1531 DO i=1,nchemtrac 1532 FIELD=wtnom(i) 1533 UNITS='units' 1534 DESC='desc' 1535 DO k = 1,altlen 1536 XLVL=levels(k) 1537 SLAB=chemtrac(:,:,k,time_out(l),i) 1538 ! And now put everything in the destination file 1539 ! ... Header 1540 write(1) IFV 1541 write(1) HDATE,XFCST,SOURCE,FIELD,UNITS,DESC,XLVL,NX,NY,IPROJ 1542 write(1) STARTLOC,STARTLAT,STARTLON,DELTALAT,DELTALON 1543 ! ... Data 1544 write(1) SLAB 1545 END DO 1546 ENDDO 1547 #endif 1457 1548 1458 1549 print *,'****done file '//output, int(100.*float(l)/float(FILES)), ' % ' … … 1498 1589 deallocate(aps,bps,levels) 1499 1590 1591 #ifdef PHOTOCHEM 1592 deallocate(chemtrac) 1593 deallocate(wtnom) 1594 #endif 1500 1595 1501 1596 print *, '------------------------'
Note: See TracChangeset
for help on using the changeset viewer.
