Changeset 549 for trunk/MESOSCALE/LMD_MM_MARS/SRC/PREP_MARS
- Timestamp:
- Mar 1, 2012, 12:57:47 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MESOSCALE/LMD_MM_MARS/SRC/PREP_MARS/readmeteo.F90
r324 r549 88 88 real, dimension(:,:,:), allocatable :: swatericefile!, swaterfile 89 89 real, dimension(:,:,:,:), allocatable :: dustfile,dustnfile 90 real, dimension(:,:,:,:), allocatable :: ccnfile,ccnnfile 90 91 91 92 !! Reading the parameter file … … 229 230 allocate(dustfile(lonlen,latlen,altlen,timelen)) 230 231 allocate(dustnfile(lonlen,latlen,altlen,timelen)) 232 allocate(ccnfile(lonlen,latlen,altlen,timelen)) 233 allocate(ccnnfile(lonlen,latlen,altlen,timelen)) 231 234 allocate(psfile(lonlen,latlen,timelen)) 232 235 allocate(tsfile(lonlen,latlen,timelen)) … … 282 285 dustfile(:,:,:,:)=0 283 286 dustnfile(:,:,:,:)=0 287 ccnfile(:,:,:,:)=0 288 ccnnfile(:,:,:,:)=0 284 289 psfile(:,:,:)=0 285 290 tsfile(:,:,:)=0 … … 651 656 else 652 657 ierr=NF_GET_VAR_REAL(nid,nvarid,dustnfile) 658 endif 659 660 print *,'CCN mass' 661 ierr=NF_INQ_VARID(nid,"ccn",nvarid) 662 if (ierr.ne.NF_NOERR) then 663 write(*,*) "...No ccn - CCN mass set to 0" 664 dustfile(:,:,:,:)=0. 665 else 666 ierr=NF_GET_VAR_REAL(nid,nvarid,ccnfile) 667 endif 668 669 print *,'CCN number' 670 ierr=NF_INQ_VARID(nid,"ccnN",nvarid) 671 if (ierr.ne.NF_NOERR) then 672 write(*,*) "...No ccnN - CCN number set to 0" 673 dustnfile(:,:,:,:)=0. 674 else 675 ierr=NF_GET_VAR_REAL(nid,nvarid,ccnnfile) 653 676 endif 654 677 !!------------------------ … … 1241 1264 !------------------------! 1242 1265 ! >>> Write a variable ! 1266 ! ... Copy&Paste part ! 1267 !------------------------! 1268 FIELD='CCNQ' 1269 UNITS='kg/kg' 1270 DESC='CCN mixing ratio' 1271 XLVL=200100. 1272 SLAB=ccnfile(:,:,1,time_out(l)) 1273 ! And now put everything in the destination file 1274 ! ... Header 1275 write(1) IFV 1276 write(1) HDATE,XFCST,SOURCE,FIELD,UNITS,DESC,XLVL,NX,NY,IPROJ 1277 write(1) STARTLOC,STARTLAT,STARTLON,DELTALAT,DELTALON 1278 ! ... Data 1279 write(1) SLAB 1280 !print *,'The field '//DESC//' was written to '//output 1281 1282 !------------------------! 1283 ! >>> Write a variable ! 1284 ! ... Copy&Paste part ! 1285 !------------------------! 1286 FIELD='CCNN' 1287 UNITS='part/kg' 1288 DESC='CCN number density' 1289 XLVL=200100. 1290 SLAB=ccnnfile(:,:,1,time_out(l)) 1291 ! And now put everything in the destination file 1292 ! ... Header 1293 write(1) IFV 1294 write(1) HDATE,XFCST,SOURCE,FIELD,UNITS,DESC,XLVL,NX,NY,IPROJ 1295 write(1) STARTLOC,STARTLAT,STARTLON,DELTALAT,DELTALON 1296 ! ... Data 1297 write(1) SLAB 1298 !print *,'The field '//DESC//' was written to '//output 1299 1300 1301 !------------------------! 1302 ! >>> Write a variable ! 1243 1303 ! PHOTOCHEMISTRY ! 1244 1304 !------------------------! … … 1513 1573 XLVL=levels(k) 1514 1574 SLAB=dustnfile(:,:,k,time_out(l)) 1575 ! And now put everything in the destination file 1576 ! ... Header 1577 write(1) IFV 1578 write(1) HDATE,XFCST,SOURCE,FIELD,UNITS,DESC,XLVL,NX,NY,IPROJ 1579 write(1) STARTLOC,STARTLAT,STARTLON,DELTALAT,DELTALON 1580 ! ... Data 1581 write(1) SLAB 1582 END DO 1583 !print *,'The field '//DESC//' was written to '//output 1584 1585 !------------------------! 1586 ! >>> Write a variable ! 1587 ! ... Copy&Paste part ! 1588 !------------------------! 1589 FIELD='CCNQ' 1590 UNITS='kg/kg' 1591 DESC='CCN mixing ratio' 1592 DO k = 1,altlen 1593 XLVL=levels(k) 1594 SLAB=ccnfile(:,:,k,time_out(l)) 1595 ! And now put everything in the destination file 1596 ! ... Header 1597 write(1) IFV 1598 write(1) HDATE,XFCST,SOURCE,FIELD,UNITS,DESC,XLVL,NX,NY,IPROJ 1599 write(1) STARTLOC,STARTLAT,STARTLON,DELTALAT,DELTALON 1600 ! ... Data 1601 write(1) SLAB 1602 END DO 1603 !print *,'The field '//DESC//' was written to '//output 1604 1605 !------------------------! 1606 ! >>> Write a variable ! 1607 ! ... Copy&Paste part ! 1608 !------------------------! 1609 FIELD='CCNN' 1610 UNITS='part/kg' 1611 DESC='CCN number density' 1612 DO k = 1,altlen 1613 XLVL=levels(k) 1614 SLAB=ccnnfile(:,:,k,time_out(l)) 1515 1615 ! And now put everything in the destination file 1516 1616 ! ... Header … … 1576 1676 deallocate(dustfile) 1577 1677 deallocate(dustnfile) 1678 deallocate(ccnfile) 1679 deallocate(ccnnfile) 1578 1680 deallocate(psfile) 1579 1681 deallocate(tsfile)
Note: See TracChangeset
for help on using the changeset viewer.