Changeset 802 for trunk/MESOSCALE/LMD_MM_MARS/SRC/PREP_MARS
- Timestamp:
- Oct 5, 2012, 2:52:43 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MESOSCALE/LMD_MM_MARS/SRC/PREP_MARS/readmeteo.F90
r665 r802 88 88 real, dimension(:,:,:), allocatable :: swatericefile!, swaterfile 89 89 real, dimension(:,:,:,:), allocatable :: dustfile,dustnfile 90 real, dimension(:,:,:,:), allocatable :: co2file 90 91 real, dimension(:,:,:,:), allocatable :: ccnfile,ccnnfile 91 92 … … 230 231 allocate(dustfile(lonlen,latlen,altlen,timelen)) 231 232 allocate(dustnfile(lonlen,latlen,altlen,timelen)) 233 allocate(co2file(lonlen,latlen,altlen,timelen)) 232 234 allocate(ccnfile(lonlen,latlen,altlen,timelen)) 233 235 allocate(ccnnfile(lonlen,latlen,altlen,timelen)) … … 285 287 dustfile(:,:,:,:)=0 286 288 dustnfile(:,:,:,:)=0 289 co2file(:,:,:,:)=0 287 290 ccnfile(:,:,:,:)=0 288 291 ccnnfile(:,:,:,:)=0 … … 636 639 !! special water stuff 637 640 !!------------------------ 641 642 print *,'CO2 mass mixing ratio' 643 ierr=NF_INQ_VARID(nid,"co2",nvarid) 644 if (ierr.ne.NF_NOERR) then 645 write(*,*) "...No co2 - co2 mixing ratio set to 0.95" 646 co2file(:,:,:,:)=0.95 647 else 648 ierr=NF_GET_VAR_REAL(nid,nvarid,co2file) 649 endif 638 650 639 651 !!------------------------ … … 1230 1242 ! ... Copy&Paste part ! 1231 1243 !------------------------! 1244 FIELD='CO2' 1245 UNITS='kg/kg' 1246 DESC='CO2 mixing ratio' 1247 XLVL=200100. 1248 SLAB=co2file(:,:,1,time_out(l)) 1249 ! And now put everything in the destination file 1250 ! ... Header 1251 write(1) IFV 1252 write(1) HDATE,XFCST,SOURCE,FIELD,UNITS,DESC,XLVL,NX,NY,IPROJ 1253 write(1) STARTLOC,STARTLAT,STARTLON,DELTALAT,DELTALON 1254 ! ... Data 1255 write(1) SLAB 1256 !print *,'The field '//DESC//' was written to '//output 1257 1258 !------------------------! 1259 ! >>> Write a variable ! 1260 ! ... Copy&Paste part ! 1261 !------------------------! 1232 1262 FIELD='DUSTQ' 1233 1263 UNITS='kg/kg' … … 1533 1563 XLVL=levels(k) 1534 1564 SLAB=isoilfile(:,:,k,time_out(l)) 1565 ! And now put everything in the destination file 1566 ! ... Header 1567 write(1) IFV 1568 write(1) HDATE,XFCST,SOURCE,FIELD,UNITS,DESC,XLVL,NX,NY,IPROJ 1569 write(1) STARTLOC,STARTLAT,STARTLON,DELTALAT,DELTALON 1570 ! ... Data 1571 write(1) SLAB 1572 END DO 1573 !print *,'The field '//DESC//' was written to '//output 1574 1575 !------------------------! 1576 ! >>> Write a variable ! 1577 ! ... Copy&Paste part ! 1578 !------------------------! 1579 FIELD='CO2' 1580 UNITS='kg/kg' 1581 DESC='CO2 mixing ratio' 1582 DO k = 1,altlen 1583 XLVL=levels(k) 1584 SLAB=co2file(:,:,k,time_out(l)) 1535 1585 ! And now put everything in the destination file 1536 1586 ! ... Header … … 1676 1726 deallocate(dustfile) 1677 1727 deallocate(dustnfile) 1728 deallocate(co2file) 1678 1729 deallocate(ccnfile) 1679 1730 deallocate(ccnnfile)
Note: See TracChangeset
for help on using the changeset viewer.