Changeset 55 for trunk/mesoscale/LMD_MM_MARS/SRC/PREP_MARS
- Timestamp:
- Feb 4, 2011, 1:46:39 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mesoscale/LMD_MM_MARS/SRC/PREP_MARS/readmeteo_newphys.F90
r31 r55 22 22 ! 02/2008 : include water vapor and ice ! 23 23 ! 01/2010 : possible use of diagsoil for new physics ! 24 ! 02/2011 : add dust tracers ! 24 25 ! ! 25 26 ! spiga@lmd.jussieu.fr ! … … 85 86 real, dimension(:,:,:,:), allocatable :: tsoilfile, dsoilfile, isoilfile 86 87 real, dimension(:,:,:,:), allocatable :: waterfile, watericefile 88 real, dimension(:,:,:,:), allocatable :: dustfile,dustnfile 87 89 88 90 !! Reading the parameter file … … 213 215 allocate(waterfile(lonlen,latlen,altlen,timelen)) 214 216 allocate(watericefile(lonlen,latlen,altlen,timelen)) 217 allocate(dustfile(lonlen,latlen,altlen,timelen)) 218 allocate(dustnfile(lonlen,latlen,altlen,timelen)) 215 219 allocate(psfile(lonlen,latlen,timelen)) 216 220 allocate(tsfile(lonlen,latlen,timelen)) … … 241 245 waterfile(:,:,:,:)=0 242 246 watericefile(:,:,:,:)=0 247 dustfile(:,:,:,:)=0 248 dustnfile(:,:,:,:)=0 243 249 psfile(:,:,:)=0 244 250 tsfile(:,:,:)=0 … … 568 574 !!------------------------ 569 575 576 !!------------------------ 577 !! special dust stuff 578 !!------------------------ 579 print *,'Dust mass' 580 ierr=NF_INQ_VARID(nid,"dustq",nvarid) 581 if (ierr.ne.NF_NOERR) then 582 write(*,*) "...No dustq - Dust mass set to 0" 583 dustfile(:,:,:,:)=0. 584 endif 585 ierr=NF_GET_VAR_REAL(nid,nvarid,dustfile) 586 587 print *,'Dust number' 588 ierr=NF_INQ_VARID(nid,"dustN",nvarid) 589 if (ierr.ne.NF_NOERR) then 590 write(*,*) "...No dustN - Dust number set to 0" 591 dustnfile(:,:,:,:)=0. 592 endif 593 ierr=NF_GET_VAR_REAL(nid,nvarid,dustnfile) 594 !!------------------------ 595 !! special dust stuff 596 !!------------------------ 597 570 598 571 599 !SELECT CASE(ident) … … 684 712 !! 1. Surface data 685 713 !!--------------------------------------------- 714 !! 715 !! a mettre pour tous sinon 716 !! WRF_DEBUG: Warning DIM 4 , NAME num_metgrid_levels REDIFINED by 717 !! var DUSTN 26 25 in wrf_io.F90 line 2349 718 !! 686 719 687 720 ! … … 1104 1137 !print *,'The field '//DESC//' was written to '//output 1105 1138 1139 !------------------------! 1140 ! >>> Write a variable ! 1141 ! ... Copy&Paste part ! 1142 !------------------------! 1143 FIELD='DUSTQ' 1144 UNITS='kg/kg' 1145 DESC='Dust mixing ratio' 1146 XLVL=200100. 1147 SLAB=dustfile(:,:,1,time_out(l)) 1148 ! And now put everything in the destination file 1149 ! ... Header 1150 write(1) IFV 1151 write(1) HDATE,XFCST,SOURCE,FIELD,UNITS,DESC,XLVL,NX,NY,IPROJ 1152 write(1) STARTLOC,STARTLAT,STARTLON,DELTALAT,DELTALON 1153 ! ... Data 1154 write(1) SLAB 1155 !print *,'The field '//DESC//' was written to '//output 1156 1157 !------------------------! 1158 ! >>> Write a variable ! 1159 ! ... Copy&Paste part ! 1160 !------------------------! 1161 FIELD='DUSTN' 1162 UNITS='part/kg' 1163 DESC='Dust number density' 1164 XLVL=200100. 1165 SLAB=dustnfile(:,:,1,time_out(l)) 1166 ! And now put everything in the destination file 1167 ! ... Header 1168 write(1) IFV 1169 write(1) HDATE,XFCST,SOURCE,FIELD,UNITS,DESC,XLVL,NX,NY,IPROJ 1170 write(1) STARTLOC,STARTLAT,STARTLON,DELTALAT,DELTALON 1171 ! ... Data 1172 write(1) SLAB 1173 !print *,'The field '//DESC//' was written to '//output 1174 1106 1175 1107 1176 !!---------------------------------------------------- … … 1328 1397 !print *,'The field '//DESC//' was written to '//output 1329 1398 1399 !------------------------! 1400 ! >>> Write a variable ! 1401 ! ... Copy&Paste part ! 1402 !------------------------! 1403 FIELD='DUSTQ' 1404 UNITS='kg/kg' 1405 DESC='Dust mixing ratio' 1406 DO k = 1,altlen 1407 XLVL=levels(k) 1408 SLAB=dustfile(:,:,k,time_out(l)) 1409 ! And now put everything in the destination file 1410 ! ... Header 1411 write(1) IFV 1412 write(1) HDATE,XFCST,SOURCE,FIELD,UNITS,DESC,XLVL,NX,NY,IPROJ 1413 write(1) STARTLOC,STARTLAT,STARTLON,DELTALAT,DELTALON 1414 ! ... Data 1415 write(1) SLAB 1416 END DO 1417 !print *,'The field '//DESC//' was written to '//output 1418 1419 !------------------------! 1420 ! >>> Write a variable ! 1421 ! ... Copy&Paste part ! 1422 !------------------------! 1423 FIELD='DUSTN' 1424 UNITS='part/kg' 1425 DESC='Dust number density' 1426 DO k = 1,altlen 1427 XLVL=levels(k) 1428 SLAB=dustnfile(:,:,k,time_out(l)) 1429 ! And now put everything in the destination file 1430 ! ... Header 1431 write(1) IFV 1432 write(1) HDATE,XFCST,SOURCE,FIELD,UNITS,DESC,XLVL,NX,NY,IPROJ 1433 write(1) STARTLOC,STARTLAT,STARTLON,DELTALAT,DELTALON 1434 ! ... Data 1435 write(1) SLAB 1436 END DO 1437 !print *,'The field '//DESC//' was written to '//output 1438 1330 1439 print *,'****done file '//output, int(100.*float(l)/float(FILES)), ' % ' 1331 1440 close(1) … … 1353 1462 deallocate(waterfile) 1354 1463 deallocate(watericefile) 1464 deallocate(dustfile) 1465 deallocate(dustnfile) 1355 1466 deallocate(psfile) 1356 1467 deallocate(tsfile)
Note: See TracChangeset
for help on using the changeset viewer.
