Changeset 72 for trunk/mesoscale/LMD_MM_MARS/SRC/PREP_MARS
- Timestamp:
- Feb 19, 2011, 5:36:31 PM (14 years ago)
- Location:
- trunk/mesoscale/LMD_MM_MARS/SRC/PREP_MARS
- Files:
-
- 1 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/mesoscale/LMD_MM_MARS/SRC/PREP_MARS/readmeteo.F90
r69 r72 21 21 ! 12/2007 : include co2ice and emissivity ! 22 22 ! 02/2008 : include water vapor and ice ! 23 ! 01/2010 : possible use of diagsoil for new physics ! 24 ! 02/2011 : add dust tracers, correct surface ! 23 25 ! ! 24 26 ! spiga@lmd.jussieu.fr ! … … 71 73 72 74 !! Intermediate data arrays 73 integer :: k,l 74 real, dimension(:), allocatable :: lat,lon,time,alt,aps,bps,levels 75 integer :: k,l,m,n,p 76 real, dimension(:), allocatable :: lat,lon,time,alt,aps,bps,levels,dsoilvert 75 77 real, dimension(:,:), allocatable :: vide,ones,ghtsfile 76 78 real, dimension(:,:), allocatable :: interm … … 81 83 real, dimension(:,:,:,:), allocatable :: tfile,ufile,vfile,rfile,hfile 82 84 real, dimension(:,:,:,:), allocatable :: eta_gcm 83 real, dimension(:,:,:,:), allocatable :: tfileorig,ufileorig,vfileorig84 real, dimension(:,:,:,:), allocatable :: tsoilfile 85 !real, dimension(:,:,:,:), allocatable :: tfileorig,ufileorig,vfileorig 86 real, dimension(:,:,:,:), allocatable :: tsoilfile, dsoilfile, isoilfile 85 87 real, dimension(:,:,:,:), allocatable :: waterfile, watericefile 86 real, dimension(:,:,:), allocatable :: swaterfile, swatericefile 88 real, dimension(:,:,:), allocatable :: swatericefile!, swaterfile 89 real, dimension(:,:,:,:), allocatable :: dustfile,dustnfile 87 90 88 91 !! Reading the parameter file … … 202 205 allocate(tfile(lonlen,latlen,altlen,timelen)) 203 206 allocate(tsoilfile(lonlen,latlen,altlen,timelen)) 204 allocate(tfileorig(lonlen,latlen,altlen,timelen)) 207 allocate(dsoilfile(lonlen,latlen,altlen,timelen)) 208 allocate(isoilfile(lonlen,latlen,altlen,timelen)) 209 allocate(dsoilvert(altlen)) 210 !allocate(tfileorig(lonlen,latlen,altlen,timelen)) 205 211 allocate(ufile(lonlen,latlen,altlen,timelen)) 206 allocate(ufileorig(lonlen,latlen,altlen,timelen))212 !allocate(ufileorig(lonlen,latlen,altlen,timelen)) 207 213 allocate(vfile(lonlen,latlen,altlen,timelen)) 208 allocate(vfileorig(lonlen,latlen,altlen,timelen))214 !allocate(vfileorig(lonlen,latlen,altlen,timelen)) 209 215 allocate(rfile(lonlen,latlen,altlen,timelen)) 210 216 allocate(hfile(lonlen,latlen,altlen,timelen)) 211 217 allocate(waterfile(lonlen,latlen,altlen,timelen)) 212 218 allocate(watericefile(lonlen,latlen,altlen,timelen)) 213 allocate(swaterfile(lonlen,latlen,timelen))219 !allocate(swaterfile(lonlen,latlen,timelen)) 214 220 allocate(swatericefile(lonlen,latlen,timelen)) 221 allocate(dustfile(lonlen,latlen,altlen,timelen)) 222 allocate(dustnfile(lonlen,latlen,altlen,timelen)) 215 223 allocate(psfile(lonlen,latlen,timelen)) 216 224 allocate(tsfile(lonlen,latlen,timelen)) … … 230 238 tfile(:,:,:,:)=0 231 239 tsoilfile(:,:,:,:)=0 232 tfileorig(:,:,:,:)=0 233 ufileorig(:,:,:,:)=0 234 vfileorig(:,:,:,:)=0 240 isoilfile(:,:,:,:)=0 241 dsoilfile(:,:,:,:)=0 242 dsoilvert(:)=0. 243 !tfileorig(:,:,:,:)=0 244 !ufileorig(:,:,:,:)=0 245 !vfileorig(:,:,:,:)=0 235 246 ufile(:,:,:,:)=0 236 247 vfile(:,:,:,:)=0 … … 239 250 waterfile(:,:,:,:)=0 240 251 watericefile(:,:,:,:)=0 241 swaterfile(:,:,:)=0252 !swaterfile(:,:,:)=0 242 253 swatericefile(:,:,:)=0 254 dustfile(:,:,:,:)=0 255 dustnfile(:,:,:,:)=0 243 256 psfile(:,:,:)=0 244 257 tsfile(:,:,:)=0 … … 366 379 ierr = NF_INQ_VARID (nid,"emis",nvarid) 367 380 IF (ierr .NE. NF_NOERR) THEN 368 381 PRINT *, '...warning: not found in diagfi !' 369 382 PRINT *, '...will be filled with a prescribed value', emiss_prescribed 370 emissfile(:,:,:)=emiss_prescribed 383 emissfile(:,:,:)=emiss_prescribed 371 384 ELSE 372 385 #ifdef NC_DOUBLE 373 386 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, emissfile) 374 387 #else 375 388 ierr = NF_GET_VAR_REAL(nid, nvarid, emissfile) 376 389 #endif 377 390 ENDIF … … 380 393 ierr = NF_INQ_VARID (nid,"co2ice",nvarid) 381 394 IF (ierr .NE. NF_NOERR) THEN 382 383 384 co2icefile(:,:,:)=co2ice_prescribed 395 PRINT *, '...warning: not found in diagfi !' 396 PRINT *, '...will be filled with a prescribed value', co2ice_prescribed 397 co2icefile(:,:,:)=co2ice_prescribed 385 398 ELSE 386 399 #ifdef NC_DOUBLE 387 400 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, co2icefile) 388 401 #else 389 402 ierr = NF_GET_VAR_REAL(nid, nvarid, co2icefile) 390 403 #endif 391 404 ENDIF … … 418 431 419 432 420 !! "atmospheric" surface temperature is taken421 !! from original diagfi.nc first level422 !! ... level is ~3-5 meters423 print *,'Near-Surface Temperature'424 ierr = NF_INQ_VARID (nid,"temp",nvarid)425 IF (ierr .NE. NF_NOERR) THEN426 ierr = NF_INQ_VARID (nid,"t",nvarid)427 IF (ierr .NE. NF_NOERR) THEN428 PRINT *, "Error: Readmeteo <temp> not found"429 stop430 ENDIF431 ENDIF432 #ifdef NC_DOUBLE433 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, tfileorig)434 #else435 ierr = NF_GET_VAR_REAL(nid, nvarid, tfileorig)436 #endif437 tnsfile=tfileorig(:,:,1,:)438 439 !! "atmospheric" surface u is taken440 !! from original diagfi.nc first level441 !! ... level is ~3-5 meters442 print *,'Near-Surface Zonal Wind'443 ierr = NF_INQ_VARID (nid,"u",nvarid)444 IF (ierr .NE. NF_NOERR) THEN445 PRINT *, "Error: Readmeteo <u> not found"446 stop447 ENDIF448 #ifdef NC_DOUBLE449 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, ufileorig)450 #else451 ierr = NF_GET_VAR_REAL(nid, nvarid, ufileorig)452 #endif453 unsfile=ufileorig(:,:,1,:)454 455 !! "atmospheric" surface v is taken456 !! from original diagfi.nc first level457 !! ... level is ~3-5 meters458 print *,'Near-Surface Meridional Wind'459 ierr = NF_INQ_VARID (nid,"v",nvarid)460 IF (ierr .NE. NF_NOERR) THEN461 PRINT *, "Error: Readmeteo <v> not found"462 stop463 ENDIF464 #ifdef NC_DOUBLE465 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, vfileorig)466 #else467 ierr = NF_GET_VAR_REAL(nid, nvarid, vfileorig)468 #endif469 vnsfile=vfileorig(:,:,1,:)433 !!!"atmospheric" surface temperature is taken 434 !!!from original diagfi.nc first level 435 !!!... level is ~3-5 meters 436 !print *,'Near-Surface Temperature' 437 ! ierr = NF_INQ_VARID (nid,"temp",nvarid) 438 ! IF (ierr .NE. NF_NOERR) THEN 439 ! ierr = NF_INQ_VARID (nid,"t",nvarid) 440 ! IF (ierr .NE. NF_NOERR) THEN 441 ! PRINT *, "Error: Readmeteo <temp> not found" 442 ! stop 443 ! ENDIF 444 ! ENDIF 445 !#ifdef NC_DOUBLE 446 ! ierr = NF_GET_VAR_DOUBLE(nid, nvarid, tfileorig) 447 !#else 448 ! ierr = NF_GET_VAR_REAL(nid, nvarid, tfileorig) 449 !#endif 450 ! tnsfile=tfileorig(:,:,1,:) 451 452 !!!"atmospheric" surface u is taken 453 !!!from original diagfi.nc first level 454 !!!... level is ~3-5 meters 455 !print *,'Near-Surface Zonal Wind' 456 ! ierr = NF_INQ_VARID (nid,"u",nvarid) 457 ! IF (ierr .NE. NF_NOERR) THEN 458 ! PRINT *, "Error: Readmeteo <u> not found" 459 ! stop 460 ! ENDIF 461 !#ifdef NC_DOUBLE 462 ! ierr = NF_GET_VAR_DOUBLE(nid, nvarid, ufileorig) 463 !#else 464 ! ierr = NF_GET_VAR_REAL(nid, nvarid, ufileorig) 465 !#endif 466 ! unsfile=ufileorig(:,:,1,:) 467 468 !!!"atmospheric" surface v is taken 469 !!!from original diagfi.nc first level 470 !!!... level is ~3-5 meters 471 !print *,'Near-Surface Meridional Wind' 472 ! ierr = NF_INQ_VARID (nid,"v",nvarid) 473 ! IF (ierr .NE. NF_NOERR) THEN 474 ! PRINT *, "Error: Readmeteo <v> not found" 475 ! stop 476 ! ENDIF 477 !#ifdef NC_DOUBLE 478 ! ierr = NF_GET_VAR_DOUBLE(nid, nvarid, vfileorig) 479 !#else 480 ! ierr = NF_GET_VAR_REAL(nid, nvarid, vfileorig) 481 !#endif 482 ! vnsfile=vfileorig(:,:,1,:) 470 483 471 484 SELECT CASE(ident) … … 520 533 ierr = NF_GET_VAR_REAL(nid, nvarid, tfile) 521 534 #endif 535 tnsfile=tfile(:,:,1,:) 522 536 523 537 print *,'Zonal wind' … … 532 546 ierr = NF_GET_VAR_REAL(nid, nvarid, ufile) 533 547 #endif 548 unsfile=ufile(:,:,1,:) 534 549 535 550 print *,'Meridional wind' … … 544 559 ierr = NF_GET_VAR_REAL(nid, nvarid, vfile) 545 560 #endif 561 vnsfile=ufile(:,:,1,:) 546 562 547 563 … … 554 570 write(*,*) "...No q02 - Water vapor set to 0" 555 571 waterfile(:,:,:,:)=0. 556 endif 557 ierr=NF_GET_VAR_REAL(nid,nvarid,waterfile) 572 else 573 ierr=NF_GET_VAR_REAL(nid,nvarid,waterfile) 574 endif 558 575 559 576 print *,'Water ice' … … 562 579 write(*,*) "...No q01 - Water ice set to 0" 563 580 watericefile(:,:,:,:)=0. 581 else 582 ierr=NF_GET_VAR_REAL(nid,nvarid,watericefile) 564 583 endif 565 ierr=NF_GET_VAR_REAL(nid,nvarid,watericefile) 566 567 print *,'Surface Water vapor' 568 ierr=NF_INQ_VARID(nid,"qsurf02",nvarid) 569 if (ierr.ne.NF_NOERR) then 570 write(*,*) "...No qsurf02 - surface Water vapor set to 0" 571 swaterfile(:,:,:)=0. 572 endif 573 ierr=NF_GET_VAR_REAL(nid,nvarid,swaterfile) 584 ! print *,'Surface Water vapor' 585 ! ierr=NF_INQ_VARID(nid,"qsurf02",nvarid) 586 ! if (ierr.ne.NF_NOERR) then 587 ! write(*,*) "...No qsurf02 - surface Water vapor set to 0" 588 ! swaterfile(:,:,:)=0. 589 ! endif 590 ! ierr=NF_GET_VAR_REAL(nid,nvarid,swaterfile) 574 591 575 592 print *,'Surface Water ice' … … 578 595 write(*,*) "...No qsurf01 - surface Water ice set to 0" 579 596 swatericefile(:,:,:)=0. 597 else 598 ierr=NF_GET_VAR_REAL(nid,nvarid,swatericefile) 580 599 endif 581 ierr=NF_GET_VAR_REAL(nid,nvarid,swatericefile)582 600 !!------------------------ 583 601 !! special water stuff 602 !!------------------------ 603 604 !!------------------------ 605 !! special dust stuff 606 !!------------------------ 607 print *,'Dust mass' 608 ierr=NF_INQ_VARID(nid,"dustq",nvarid) 609 if (ierr.ne.NF_NOERR) then 610 write(*,*) "...No dustq - Dust mass set to 0" 611 dustfile(:,:,:,:)=0. 612 else 613 ierr=NF_GET_VAR_REAL(nid,nvarid,dustfile) 614 endif 615 616 print *,'Dust number' 617 ierr=NF_INQ_VARID(nid,"dustN",nvarid) 618 if (ierr.ne.NF_NOERR) then 619 write(*,*) "...No dustN - Dust number set to 0" 620 dustnfile(:,:,:,:)=0. 621 else 622 ierr=NF_GET_VAR_REAL(nid,nvarid,dustnfile) 623 endif 624 !!------------------------ 625 !! special dust stuff 584 626 !!------------------------ 585 627 … … 595 637 tsoilfile(:,:,l,:)=tsfile(:,:,:) 596 638 ENDDO 639 else 640 ierr=NF_GET_VAR_REAL(nid,nvarid,tsoilfile) 597 641 endif 598 ierr=NF_GET_VAR_REAL(nid,nvarid,tsoilfile) 642 643 !!!!!!!! 644 !!!!!!!! new physics (but still compatible with old physics) 645 print *,'Soil depths' 646 ierr=NF_INQ_VARID(nid,"soildepth",nvarid) 647 if (ierr.ne.NF_NOERR) then 648 write(*,*) "...No soildepth - Set to -999" !!! see soil_settings in LMD physics 649 DO l=1,altlen 650 dsoilvert(l)=-999. 651 ENDDO 652 else 653 ierr=NF_GET_VAR_REAL(nid,nvarid,dsoilvert) 654 endif 655 print *, 'wait a minute' !! AS: I know this could be better 656 DO m=1,lonlen 657 DO n=1,latlen 658 DO p=1,timelen 659 dsoilfile(m,n,:,p) = dsoilvert(:) 660 ENDDO 661 ENDDO 662 ENDDO 663 DEALLOCATE(vertdsoil) 664 665 print *,'Soil thermal inertia' 666 ierr=NF_INQ_VARID(nid,"inertiedat",nvarid) 667 if (ierr.ne.NF_NOERR) then 668 write(*,*) "...No soil therm. inert. - Set to -999" 669 DO l=1,altlen 670 isoilfile(:,:,l,:)=-999. 671 ENDDO 672 else 673 ierr=NF_GET_VAR_REAL(nid,nvarid,isoilfile) 674 endif 675 !!!!!!!! 676 !!!!!!!! new physics 599 677 600 678 … … 625 703 ENDIF 626 704 627 628 705 !!----------------------------- 629 706 !! Loop on the written files … … 666 743 !! 1. Surface data 667 744 !!--------------------------------------------- 745 !! 746 !! a mettre pour tous sinon 747 !! WRF_DEBUG: Warning DIM 4 , NAME num_metgrid_levels REDIFINED by 748 !! var DUSTN 26 25 in wrf_io.F90 line 2349 749 !! 668 750 669 751 ! … … 701 783 DESC='Atmospheric temperature' 702 784 XLVL=200100. 703 !SLAB=tsfile(:,:,time_out(l))704 !SLAB=tfileorig(:,:,1,time_out(l))705 785 SLAB=tnsfile(:,:,time_out(l)) 706 786 ! And now put everything in the destination file … … 721 801 DESC='Zonal wind' 722 802 XLVL=200100. 723 !SLAB=ufile(:,:,1,time_out(l))724 !SLAB=ufileorig(:,:,1,time_out(l))725 803 SLAB=unsfile(:,:,time_out(l)) 726 804 ! And now put everything in the destination file … … 741 819 DESC='Meridional wind' 742 820 XLVL=200100. 743 !SLAB=vfile(:,:,1,time_out(l))744 !SLAB=vfileorig(:,:,1,time_out(l))745 821 SLAB=vnsfile(:,:,time_out(l)) 746 822 ! And now put everything in the destination file … … 761 837 DESC='Customized 2D static field' 762 838 XLVL=200100. 763 !SLAB=co2icefile(:,:,time_out(l))764 839 SLAB=vide(:,:) 765 !SLAB=vide(:,:)+ptop766 840 ! And now put everything in the destination file 767 841 ! ... Header … … 853 927 DESC='ZMEA' 854 928 XLVL=200100. 855 !SLAB=vide(:,:)856 929 SLAB=gwparam(:,:,1) 857 930 ! And now put everything in the destination file … … 872 945 DESC='ZSTD' 873 946 XLVL=200100. 874 !SLAB=vide(:,:)875 947 SLAB=gwparam(:,:,2) 876 948 ! And now put everything in the destination file … … 909 981 DESC='Ground temperature' 910 982 XLVL=200100. 911 !SLAB=vide(:,:)912 983 SLAB=tsfile(:,:,time_out(l)) 913 984 ! And now put everything in the destination file … … 928 999 DESC='ZSIG' 929 1000 XLVL=200100. 930 !SLAB=vide(:,:)931 1001 SLAB=gwparam(:,:,3) 932 1002 ! And now put everything in the destination file … … 947 1017 DESC='ZGAM' 948 1018 XLVL=200100. 949 !SLAB=vide(:,:)950 1019 SLAB=gwparam(:,:,4) 951 1020 ! And now put everything in the destination file … … 966 1035 DESC='ZTHE' 967 1036 XLVL=200100. 968 !SLAB=vide(:,:)969 1037 SLAB=gwparam(:,:,5) 970 1038 ! And now put everything in the destination file … … 982 1050 !------------------------! 983 1051 FIELD='SM100200' 984 UNITS=' fraction'985 DESC=' Relative humidity'986 XLVL=200100. 987 SLAB= vide(:,:)1052 UNITS='kg/kg' 1053 DESC='Surf water ice' 1054 XLVL=200100. 1055 SLAB=swatericefile(:,:,time_out(l)) 988 1056 ! And now put everything in the destination file 989 1057 ! ... Header … … 1004 1072 DESC='Water vapor' 1005 1073 XLVL=200100. 1006 !SLAB=waterfile(:,:,1,time_out(l)) 1007 SLAB=swaterfile(:,:,time_out(l)) 1074 SLAB=waterfile(:,:,1,time_out(l)) 1008 1075 ! And now put everything in the destination file 1009 1076 ! ... Header … … 1023 1090 DESC='Water ice' 1024 1091 XLVL=200100. 1025 !SLAB=watericefile(:,:,1,time_out(l)) 1026 SLAB=swatericefile(:,:,time_out(l)) 1092 SLAB=watericefile(:,:,1,time_out(l)) 1027 1093 ! And now put everything in the destination file 1028 1094 ! ... Header … … 1052 1118 !print *,'The field '//DESC//' was written to '//output 1053 1119 1120 !------------------------! 1121 ! >>> Write a variable ! 1122 ! ... Copy&Paste part ! 1123 !------------------------! 1124 FIELD='DSOIL' 1125 UNITS='m' 1126 DESC='Soil depths' 1127 XLVL=200100. 1128 SLAB=dsoilfile(:,:,1,time_out(l)) 1129 ! And now put everything in the destination file 1130 ! ... Header 1131 write(1) IFV 1132 write(1) HDATE,XFCST,SOURCE,FIELD,UNITS,DESC,XLVL,NX,NY,IPROJ 1133 write(1) STARTLOC,STARTLAT,STARTLON,DELTALAT,DELTALON 1134 ! ... Data 1135 write(1) SLAB 1136 !print *,'The field '//DESC//' was written to '//output 1137 1138 !------------------------! 1139 ! >>> Write a variable ! 1140 ! ... Copy&Paste part ! 1141 !------------------------! 1142 FIELD='ISOIL' 1143 UNITS='tiu' 1144 DESC='Soil thermal inertia' 1145 XLVL=200100. 1146 SLAB=isoilfile(:,:,1,time_out(l)) 1147 ! And now put everything in the destination file 1148 ! ... Header 1149 write(1) IFV 1150 write(1) HDATE,XFCST,SOURCE,FIELD,UNITS,DESC,XLVL,NX,NY,IPROJ 1151 write(1) STARTLOC,STARTLAT,STARTLON,DELTALAT,DELTALON 1152 ! ... Data 1153 write(1) SLAB 1154 !print *,'The field '//DESC//' was written to '//output 1155 1156 !------------------------! 1157 ! >>> Write a variable ! 1158 ! ... Copy&Paste part ! 1159 !------------------------! 1160 FIELD='DUSTQ' 1161 UNITS='kg/kg' 1162 DESC='Dust mixing ratio' 1163 XLVL=200100. 1164 SLAB=dustfile(:,:,1,time_out(l)) 1165 ! And now put everything in the destination file 1166 ! ... Header 1167 write(1) IFV 1168 write(1) HDATE,XFCST,SOURCE,FIELD,UNITS,DESC,XLVL,NX,NY,IPROJ 1169 write(1) STARTLOC,STARTLAT,STARTLON,DELTALAT,DELTALON 1170 ! ... Data 1171 write(1) SLAB 1172 !print *,'The field '//DESC//' was written to '//output 1173 1174 !------------------------! 1175 ! >>> Write a variable ! 1176 ! ... Copy&Paste part ! 1177 !------------------------! 1178 FIELD='DUSTN' 1179 UNITS='part/kg' 1180 DESC='Dust number density' 1181 XLVL=200100. 1182 SLAB=dustnfile(:,:,1,time_out(l)) 1183 ! And now put everything in the destination file 1184 ! ... Header 1185 write(1) IFV 1186 write(1) HDATE,XFCST,SOURCE,FIELD,UNITS,DESC,XLVL,NX,NY,IPROJ 1187 write(1) STARTLOC,STARTLAT,STARTLON,DELTALAT,DELTALON 1188 ! ... Data 1189 write(1) SLAB 1190 !print *,'The field '//DESC//' was written to '//output 1054 1191 1055 1192 … … 1237 1374 !print *,'The field '//DESC//' was written to '//output 1238 1375 1376 !------------------------! 1377 ! >>> Write a variable ! 1378 ! ... Copy&Paste part ! 1379 !------------------------! 1380 FIELD='DSOIL' 1381 UNITS='m' 1382 DESC='Soil depths' 1383 DO k = 1,altlen 1384 XLVL=levels(k) 1385 SLAB=dsoilfile(:,:,k,time_out(l)) 1386 ! And now put everything in the destination file 1387 ! ... Header 1388 write(1) IFV 1389 write(1) HDATE,XFCST,SOURCE,FIELD,UNITS,DESC,XLVL,NX,NY,IPROJ 1390 write(1) STARTLOC,STARTLAT,STARTLON,DELTALAT,DELTALON 1391 ! ... Data 1392 write(1) SLAB 1393 END DO 1394 !print *,'The field '//DESC//' was written to '//output 1395 1396 !------------------------! 1397 ! >>> Write a variable ! 1398 ! ... Copy&Paste part ! 1399 !------------------------! 1400 FIELD='ISOIL' 1401 UNITS='tiu' 1402 DESC='Soil thermal inertia' 1403 DO k = 1,altlen 1404 XLVL=levels(k) 1405 SLAB=isoilfile(:,:,k,time_out(l)) 1406 ! And now put everything in the destination file 1407 ! ... Header 1408 write(1) IFV 1409 write(1) HDATE,XFCST,SOURCE,FIELD,UNITS,DESC,XLVL,NX,NY,IPROJ 1410 write(1) STARTLOC,STARTLAT,STARTLON,DELTALAT,DELTALON 1411 ! ... Data 1412 write(1) SLAB 1413 END DO 1414 !print *,'The field '//DESC//' was written to '//output 1415 1416 !------------------------! 1417 ! >>> Write a variable ! 1418 ! ... Copy&Paste part ! 1419 !------------------------! 1420 FIELD='DUSTQ' 1421 UNITS='kg/kg' 1422 DESC='Dust mixing ratio' 1423 DO k = 1,altlen 1424 XLVL=levels(k) 1425 SLAB=dustfile(:,:,k,time_out(l)) 1426 ! And now put everything in the destination file 1427 ! ... Header 1428 write(1) IFV 1429 write(1) HDATE,XFCST,SOURCE,FIELD,UNITS,DESC,XLVL,NX,NY,IPROJ 1430 write(1) STARTLOC,STARTLAT,STARTLON,DELTALAT,DELTALON 1431 ! ... Data 1432 write(1) SLAB 1433 END DO 1434 !print *,'The field '//DESC//' was written to '//output 1435 1436 !------------------------! 1437 ! >>> Write a variable ! 1438 ! ... Copy&Paste part ! 1439 !------------------------! 1440 FIELD='DUSTN' 1441 UNITS='part/kg' 1442 DESC='Dust number density' 1443 DO k = 1,altlen 1444 XLVL=levels(k) 1445 SLAB=dustnfile(:,:,k,time_out(l)) 1446 ! And now put everything in the destination file 1447 ! ... Header 1448 write(1) IFV 1449 write(1) HDATE,XFCST,SOURCE,FIELD,UNITS,DESC,XLVL,NX,NY,IPROJ 1450 write(1) STARTLOC,STARTLAT,STARTLON,DELTALAT,DELTALON 1451 ! ... Data 1452 write(1) SLAB 1453 END DO 1454 !print *,'The field '//DESC//' was written to '//output 1239 1455 1240 1456 print *,'****done file '//output, int(100.*float(l)/float(FILES)), ' % ' … … 1252 1468 deallocate(tfile) 1253 1469 deallocate(tsoilfile) 1254 deallocate(tfileorig) 1470 deallocate(isoilfile) 1471 deallocate(dsoilfile) 1472 !deallocate(dsoilvert) 1473 !deallocate(tfileorig) 1255 1474 deallocate(ufile) 1256 deallocate(ufileorig)1475 !deallocate(ufileorig) 1257 1476 deallocate(vfile) 1258 deallocate(vfileorig)1477 !deallocate(vfileorig) 1259 1478 deallocate(rfile) 1260 1479 deallocate(hfile) 1261 1480 deallocate(waterfile) 1262 1481 deallocate(watericefile) 1263 deallocate(swaterfile)1482 !deallocate(swaterfile) 1264 1483 deallocate(swatericefile) 1484 deallocate(dustfile) 1485 deallocate(dustnfile) 1265 1486 deallocate(psfile) 1266 1487 deallocate(tsfile)
Note: See TracChangeset
for help on using the changeset viewer.