Changeset 1551 for palm/trunk/SOURCE/data_output_2d.f90
 Timestamp:
 Mar 3, 2015 2:18:16 PM (7 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

palm/trunk/SOURCE/data_output_2d.f90
r1360 r1551 20 20 ! Current revisions: 21 21 !  22 ! 22 ! Added suppport for land surface model and radiation model output. In the course 23 ! of this action, the limits for vertical loops have been changed (from nzb and 24 ! nzt+1 to nzb_do and nzt_do, respectively in order to allow soil model output). 25 ! Moreover, a new vertical grid zs was introduced. 23 26 ! 24 27 ! Former revisions: … … 127 130 128 131 USE kinds 129 132 133 USE land_surface_model_mod, & 134 ONLY: c_liq, c_liq_av, c_soil_av, c_veg, c_veg_av, ghf_eb, & 135 ghf_eb_av, lai, lai_av, m_liq_eb, m_liq_eb_av, m_soil, & 136 m_soil_av, nzb_soil, nzt_soil, qsws_eb, qsws_eb_av, & 137 qsws_liq_eb, qsws_liq_eb_av, qsws_soil_eb, qsws_soil_eb_av, & 138 qsws_veg_eb, qsws_veg_eb_av, shf_eb, shf_eb_av, t_soil, & 139 t_soil_av, zs 140 130 141 USE netcdf_control 131 142 … … 135 146 136 147 USE pegrid 148 149 USE radiation_model_mod, & 150 ONLY: rad_net, rad_net_av, rad_sw_in, rad_sw_in_av 137 151 138 152 IMPLICIT NONE … … 157 171 INTEGER(iwp) :: n !: 158 172 INTEGER(iwp) :: ns !: 173 INTEGER(iwp) :: nzb_do !: lower limit of the data field (usually nzb) 174 INTEGER(iwp) :: nzt_do !: upper limit of the data field (usually nzt+1) 159 175 INTEGER(iwp) :: psi !: 160 176 INTEGER(iwp) :: s !: … … 343 359 344 360 IF ( do2d_mode == mode ) THEN 361 362 nzb_do = nzb 363 nzt_do = nzt+1 345 364 ! 346 365 ! Store the array chosen on the temporary array. … … 356 375 IF ( mode == 'xy' ) level_z = zu 357 376 377 CASE ( 'c_liq*_xy' ) ! 2darray 378 IF ( av == 0 ) THEN 379 DO i = nxlg, nxrg 380 DO j = nysg, nyng 381 local_pf(i,j,nzb+1) = c_liq(j,i) * c_veg(j,i) 382 ENDDO 383 ENDDO 384 ELSE 385 DO i = nxlg, nxrg 386 DO j = nysg, nyng 387 local_pf(i,j,nzb+1) = c_liq_av(j,i) 388 ENDDO 389 ENDDO 390 ENDIF 391 resorted = .TRUE. 392 two_d = .TRUE. 393 level_z(nzb+1) = zu(nzb+1) 394 395 CASE ( 'c_soil*_xy' ) ! 2darray 396 IF ( av == 0 ) THEN 397 DO i = nxlg, nxrg 398 DO j = nysg, nyng 399 local_pf(i,j,nzb+1) = 1.0_wp  c_veg(j,i) 400 ENDDO 401 ENDDO 402 ELSE 403 DO i = nxlg, nxrg 404 DO j = nysg, nyng 405 local_pf(i,j,nzb+1) = c_soil_av(j,i) 406 ENDDO 407 ENDDO 408 ENDIF 409 resorted = .TRUE. 410 two_d = .TRUE. 411 level_z(nzb+1) = zu(nzb+1) 412 413 CASE ( 'c_veg*_xy' ) ! 2darray 414 IF ( av == 0 ) THEN 415 DO i = nxlg, nxrg 416 DO j = nysg, nyng 417 local_pf(i,j,nzb+1) = c_veg(j,i) 418 ENDDO 419 ENDDO 420 ELSE 421 DO i = nxlg, nxrg 422 DO j = nysg, nyng 423 local_pf(i,j,nzb+1) = c_veg_av(j,i) 424 ENDDO 425 ENDDO 426 ENDIF 427 resorted = .TRUE. 428 two_d = .TRUE. 429 level_z(nzb+1) = zu(nzb+1) 430 431 CASE ( 'ghf_eb*_xy' ) ! 2darray 432 IF ( av == 0 ) THEN 433 DO i = nxlg, nxrg 434 DO j = nysg, nyng 435 local_pf(i,j,nzb+1) = ghf_eb(j,i) 436 ENDDO 437 ENDDO 438 ELSE 439 DO i = nxlg, nxrg 440 DO j = nysg, nyng 441 local_pf(i,j,nzb+1) = ghf_eb_av(j,i) 442 ENDDO 443 ENDDO 444 ENDIF 445 resorted = .TRUE. 446 two_d = .TRUE. 447 level_z(nzb+1) = zu(nzb+1) 448 449 CASE ( 'lai*_xy' ) ! 2darray 450 IF ( av == 0 ) THEN 451 DO i = nxlg, nxrg 452 DO j = nysg, nyng 453 local_pf(i,j,nzb+1) = lai(j,i) 454 ENDDO 455 ENDDO 456 ELSE 457 DO i = nxlg, nxrg 458 DO j = nysg, nyng 459 local_pf(i,j,nzb+1) = lai_av(j,i) 460 ENDDO 461 ENDDO 462 ENDIF 463 resorted = .TRUE. 464 two_d = .TRUE. 465 level_z(nzb+1) = zu(nzb+1) 466 358 467 CASE ( 'lpt_xy', 'lpt_xz', 'lpt_yz' ) 359 468 IF ( av == 0 ) THEN … … 382 491 two_d = .TRUE. 383 492 level_z(nzb+1) = zu(nzb+1) 493 494 CASE ( 'm_liq_eb*_xy' ) ! 2darray 495 IF ( av == 0 ) THEN 496 DO i = nxlg, nxrg 497 DO j = nysg, nyng 498 local_pf(i,j,nzb+1) = m_liq_eb(j,i) 499 ENDDO 500 ENDDO 501 ELSE 502 DO i = nxlg, nxrg 503 DO j = nysg, nyng 504 local_pf(i,j,nzb+1) = m_liq_eb_av(j,i) 505 ENDDO 506 ENDDO 507 ENDIF 508 resorted = .TRUE. 509 two_d = .TRUE. 510 level_z(nzb+1) = zu(nzb+1) 511 512 CASE ( 'm_soil_xy', 'm_soil_xz', 'm_soil_yz' ) 513 nzb_do = nzb_soil 514 nzt_do = nzt_soil 515 IF ( av == 0 ) THEN 516 to_be_resorted => m_soil 517 ELSE 518 to_be_resorted => m_soil_av 519 ENDIF 520 IF ( mode == 'xy' ) level_z = zs 384 521 385 522 CASE ( 'nr_xy', 'nr_xz', 'nr_yz' ) … … 665 802 level_z(nzb+1) = zu(nzb+1) 666 803 804 CASE ( 'qsws_eb*_xy' ) ! 2darray 805 IF ( av == 0 ) THEN 806 DO i = nxlg, nxrg 807 DO j = nysg, nyng 808 local_pf(i,j,nzb+1) = qsws_eb(j,i) 809 ENDDO 810 ENDDO 811 ELSE 812 DO i = nxlg, nxrg 813 DO j = nysg, nyng 814 local_pf(i,j,nzb+1) = qsws_eb_av(j,i) 815 ENDDO 816 ENDDO 817 ENDIF 818 resorted = .TRUE. 819 two_d = .TRUE. 820 level_z(nzb+1) = zu(nzb+1) 821 822 CASE ( 'qsws_liq_eb*_xy' ) ! 2darray 823 IF ( av == 0 ) THEN 824 DO i = nxlg, nxrg 825 DO j = nysg, nyng 826 local_pf(i,j,nzb+1) = qsws_liq_eb(j,i) 827 ENDDO 828 ENDDO 829 ELSE 830 DO i = nxlg, nxrg 831 DO j = nysg, nyng 832 local_pf(i,j,nzb+1) = qsws_liq_eb_av(j,i) 833 ENDDO 834 ENDDO 835 ENDIF 836 resorted = .TRUE. 837 two_d = .TRUE. 838 level_z(nzb+1) = zu(nzb+1) 839 840 CASE ( 'qsws_soil_eb*_xy' ) ! 2darray 841 IF ( av == 0 ) THEN 842 DO i = nxlg, nxrg 843 DO j = nysg, nyng 844 local_pf(i,j,nzb+1) = qsws_soil_eb(j,i) 845 ENDDO 846 ENDDO 847 ELSE 848 DO i = nxlg, nxrg 849 DO j = nysg, nyng 850 local_pf(i,j,nzb+1) = qsws_soil_eb_av(j,i) 851 ENDDO 852 ENDDO 853 ENDIF 854 resorted = .TRUE. 855 two_d = .TRUE. 856 level_z(nzb+1) = zu(nzb+1) 857 858 CASE ( 'qsws_veg_eb*_xy' ) ! 2darray 859 IF ( av == 0 ) THEN 860 DO i = nxlg, nxrg 861 DO j = nysg, nyng 862 local_pf(i,j,nzb+1) = qsws_veg_eb(j,i) 863 ENDDO 864 ENDDO 865 ELSE 866 DO i = nxlg, nxrg 867 DO j = nysg, nyng 868 local_pf(i,j,nzb+1) = qsws_veg_eb_av(j,i) 869 ENDDO 870 ENDDO 871 ENDIF 872 resorted = .TRUE. 873 two_d = .TRUE. 874 level_z(nzb+1) = zu(nzb+1) 875 667 876 CASE ( 'qv_xy', 'qv_xz', 'qv_yz' ) 668 877 IF ( av == 0 ) THEN … … 680 889 IF ( mode == 'xy' ) level_z = zu 681 890 891 CASE ( 'rad_net*_xy' ) ! 2darray 892 IF ( av == 0 ) THEN 893 DO i = nxlg, nxrg 894 DO j = nysg, nyng 895 local_pf(i,j,nzb+1) = rad_net(j,i) 896 ENDDO 897 ENDDO 898 ELSE 899 DO i = nxlg, nxrg 900 DO j = nysg, nyng 901 local_pf(i,j,nzb+1) = rad_net_av(j,i) 902 ENDDO 903 ENDDO 904 ENDIF 905 resorted = .TRUE. 906 two_d = .TRUE. 907 level_z(nzb+1) = zu(nzb+1) 908 909 CASE ( 'rad_sw_in*_xy' ) ! 2darray 910 IF ( av == 0 ) THEN 911 DO i = nxlg, nxrg 912 DO j = nysg, nyng 913 local_pf(i,j,nzb+1) = rad_sw_in(j,i) 914 ENDDO 915 ENDDO 916 ELSE 917 DO i = nxlg, nxrg 918 DO j = nysg, nyng 919 local_pf(i,j,nzb+1) = rad_sw_in_av(j,i) 920 ENDDO 921 ENDDO 922 ENDIF 923 resorted = .TRUE. 924 two_d = .TRUE. 925 level_z(nzb+1) = zu(nzb+1) 926 682 927 CASE ( 'rho_xy', 'rho_xz', 'rho_yz' ) 683 928 IF ( av == 0 ) THEN … … 719 964 level_z(nzb+1) = zu(nzb+1) 720 965 966 CASE ( 'shf_eb*_xy' ) ! 2darray 967 IF ( av == 0 ) THEN 968 DO i = nxlg, nxrg 969 DO j = nysg, nyng 970 local_pf(i,j,nzb+1) = shf_eb(j,i) 971 ENDDO 972 ENDDO 973 ELSE 974 DO i = nxlg, nxrg 975 DO j = nysg, nyng 976 local_pf(i,j,nzb+1) = shf_eb_av(j,i) 977 ENDDO 978 ENDDO 979 ENDIF 980 resorted = .TRUE. 981 two_d = .TRUE. 982 level_z(nzb+1) = zu(nzb+1) 983 721 984 CASE ( 't*_xy' ) ! 2darray 722 985 IF ( av == 0 ) THEN … … 736 999 two_d = .TRUE. 737 1000 level_z(nzb+1) = zu(nzb+1) 1001 1002 CASE ( 't_soil_xy', 't_soil_xz', 't_soil_yz' ) 1003 nzb_do = nzb_soil 1004 nzt_do = nzt_soil 1005 IF ( av == 0 ) THEN 1006 to_be_resorted => t_soil 1007 ELSE 1008 to_be_resorted => t_soil_av 1009 ENDIF 1010 IF ( mode == 'xy' ) level_z = zs 738 1011 739 1012 CASE ( 'u_xy', 'u_xz', 'u_yz' ) … … 839 1112 ! User defined quantity 840 1113 CALL user_data_output_2d( av, do2d(av,if), found, grid, & 841 local_pf, two_d )1114 local_pf, two_d, nzb_do, nzt_do ) 842 1115 resorted = .TRUE. 843 1116 … … 848 1121 ELSEIF ( grid == 'zu1' ) THEN 849 1122 IF ( mode == 'xy' ) level_z(nzb+1) = zu(nzb+1) 1123 ELSEIF ( grid == 'zs' ) THEN 1124 IF ( mode == 'xy' ) level_z = zs 850 1125 ENDIF 851 1126 … … 863 1138 DO i = nxlg, nxrg 864 1139 DO j = nysg, nyng 865 DO k = nzb , nzt+11140 DO k = nzb_do, nzt_do 866 1141 local_pf(i,j,k) = to_be_resorted(k,j,i) 867 1142 ENDDO … … 874 1149 ! section mode chosen. 875 1150 is = 1 876 loop1: DO 1151 loop1: DO WHILE ( section(is,s) /= 9999 .OR. two_d ) 877 1152 878 1153 SELECT CASE ( mode ) … … 885 1160 ELSE 886 1161 layer_xy = section(is,s) 1162 ENDIF 1163 1164 ! 1165 ! Exit the loop for layers beyond the data output domain 1166 ! (used for soil model) 1167 IF ( layer_xy .GT. nzt_do ) THEN 1168 EXIT loop1 887 1169 ENDIF 888 1170 … … 916 1198 ! 917 1199 ! Carry out the averaging (all data are on the PE) 918 DO k = nzb , nzt+11200 DO k = nzb_do, nzt_do 919 1201 DO j = nysg, nyng 920 1202 DO i = nxlg, nxrg … … 924 1206 ENDDO 925 1207 926 local_2d = local_2d / ( nzt nzb + 2.0_wp)1208 local_2d = local_2d / ( nzt_do  nzb_do + 1.0_wp) 927 1209 928 1210 ELSE … … 967 1249 DO i = 0, io_blocks1 968 1250 IF ( i == io_group ) THEN 969 WRITE ( 21 ) nxlg, nxrg, nysg, nyng 1251 WRITE ( 21 ) nxlg, nxrg, nysg, nyng, nysg, nyng 970 1252 WRITE ( 21 ) local_2d 971 1253 ENDIF … … 1103 1385 IF ( section(is,s) == 1 ) THEN 1104 1386 1105 ALLOCATE( local_2d_l(nxlg:nxrg,nzb :nzt+1) )1387 ALLOCATE( local_2d_l(nxlg:nxrg,nzb_do:nzt_do) ) 1106 1388 local_2d_l = 0.0_wp 1107 ngp = ( nxrgnxlg +1 ) * ( nztnzb+2)1389 ngp = ( nxrgnxlg + 1 ) * ( nzt_donzb_do + 1 ) 1108 1390 ! 1109 1391 ! First local averaging on the PE 1110 DO k = nzb , nzt+11392 DO k = nzb_do, nzt_do 1111 1393 DO j = nys, nyn 1112 1394 DO i = nxlg, nxrg … … 1120 1402 ! Now do the averaging over all PEs along y 1121 1403 IF ( collective_wait ) CALL MPI_BARRIER( comm2d, ierr ) 1122 CALL MPI_ALLREDUCE( local_2d_l(nxlg,nzb ), &1123 local_2d(nxlg,nzb ), ngp, MPI_REAL, &1404 CALL MPI_ALLREDUCE( local_2d_l(nxlg,nzb_do), & 1405 local_2d(nxlg,nzb_do), ngp, MPI_REAL, & 1124 1406 MPI_SUM, comm1dy, ierr ) 1125 1407 #else … … 1136 1418 IF ( section(is,s) >= nys .AND. section(is,s) <= nyn ) & 1137 1419 THEN 1138 local_2d = local_pf(:,section(is,s),nzb :nzt+1)1420 local_2d = local_pf(:,section(is,s),nzb_do:nzt_do) 1139 1421 ENDIF 1140 1422 … … 1157 1439 ! output file afterwards to increase the performance. 1158 1440 DO i = nxlg, nxrg 1159 DO k = nzb , nzt+11441 DO k = nzb_do, nzt_do 1160 1442 local_2d_sections_l(i,is,k) = local_2d(i,k) 1161 1443 ENDDO … … 1184 1466 nys1 == 1 ) ) & 1185 1467 THEN 1186 WRITE (22) nxlg, nxrg, nzb , nzt+11468 WRITE (22) nxlg, nxrg, nzb_do, nzt_do, nzb, nzt+1 1187 1469 WRITE (22) local_2d 1188 1470 ELSE 1189 WRITE (22) 1, 1, 1, 1 1471 WRITE (22) 1, 1, 1, 1, 1, 1 1190 1472 ENDIF 1191 1473 ENDIF … … 1203 1485 CALL MPI_BARRIER( comm2d, ierr ) 1204 1486 1205 ngp = ( nxrgnxlg +1 ) * ( nztnzb+2)1487 ngp = ( nxrgnxlg + 1 ) * ( nzt_donzb_do + 1 ) 1206 1488 IF ( myid == 0 ) THEN 1207 1489 ! … … 1211 1493 ( section(is,s) == 1 .AND. nys1 == 1 ) ) & 1212 1494 THEN 1213 total_2d(nxlg:nxrg,nzb :nzt+1) = local_2d1495 total_2d(nxlg:nxrg,nzb_do:nzt_do) = local_2d 1214 1496 ENDIF 1215 1497 ! … … 1240 1522 ! Relocate the local array for the next loop increment 1241 1523 DEALLOCATE( local_2d ) 1242 ALLOCATE( local_2d(nxlg:nxrg,nzb :nzt+1) )1524 ALLOCATE( local_2d(nxlg:nxrg,nzb_do:nzt_do) ) 1243 1525 1244 1526 #if defined( __netcdf ) 1245 1527 nc_stat = NF90_PUT_VAR( id_set_xz(av), & 1246 1528 id_var_do2d(av,if), & 1247 total_2d(0:nx+1,nzb :nzt+1),&1529 total_2d(0:nx+1,nzb_do:nzt_do),& 1248 1530 start = (/ 1, is, 1, do2d_xz_time_count(av) /), & 1249 count = (/ nx+2, 1, nz +2, 1 /) )1531 count = (/ nx+2, 1, nzt_donzb_do+1, 1 /) ) 1250 1532 CALL handle_netcdf_error( 'data_output_2d', 58 ) 1251 1533 #endif … … 1260 1542 THEN 1261 1543 ind(1) = nxlg; ind(2) = nxrg 1262 ind(3) = nzb ; ind(4) = nzt+11544 ind(3) = nzb_do; ind(4) = nzt_do 1263 1545 ELSE 1264 1546 ind(1) = 9999; ind(2) = 9999 … … 1270 1552 ! If applicable, send data to PE0. 1271 1553 IF ( ind(1) /= 9999 ) THEN 1272 CALL MPI_SEND( local_2d(nxlg,nzb ), ngp, &1554 CALL MPI_SEND( local_2d(nxlg,nzb_do), ngp, & 1273 1555 MPI_REAL, 0, 1, comm2d, ierr ) 1274 1556 ENDIF … … 1286 1568 nc_stat = NF90_PUT_VAR( id_set_xz(av), & 1287 1569 id_var_do2d(av,if), & 1288 local_2d(nxl:nxr+1,nzb :nzt+1), &1570 local_2d(nxl:nxr+1,nzb_do:nzt_do), & 1289 1571 start = (/ 1, is, 1, do2d_xz_time_count(av) /), & 1290 count = (/ nx+2, 1, nz +2, 1 /) )1572 count = (/ nx+2, 1, nzt_donzb_do+1, 1 /) ) 1291 1573 CALL handle_netcdf_error( 'data_output_2d', 451 ) 1292 1574 #endif … … 1322 1604 IF ( section(is,s) == 1 ) THEN 1323 1605 1324 ALLOCATE( local_2d_l(nysg:nyng,nzb :nzt+1) )1606 ALLOCATE( local_2d_l(nysg:nyng,nzb_do:nzt_do) ) 1325 1607 local_2d_l = 0.0_wp 1326 ngp = ( nyngnysg+1 ) * ( nzt nzb+2)1608 ngp = ( nyngnysg+1 ) * ( nzt_donzb_do+1 ) 1327 1609 ! 1328 1610 ! First local averaging on the PE 1329 DO k = nzb , nzt+11611 DO k = nzb_do, nzt_do 1330 1612 DO j = nysg, nyng 1331 1613 DO i = nxl, nxr … … 1339 1621 ! Now do the averaging over all PEs along x 1340 1622 IF ( collective_wait ) CALL MPI_BARRIER( comm2d, ierr ) 1341 CALL MPI_ALLREDUCE( local_2d_l(nysg,nzb ), &1342 local_2d(nysg,nzb ), ngp, MPI_REAL, &1623 CALL MPI_ALLREDUCE( local_2d_l(nysg,nzb_do), & 1624 local_2d(nysg,nzb_do), ngp, MPI_REAL, & 1343 1625 MPI_SUM, comm1dx, ierr ) 1344 1626 #else … … 1355 1637 IF ( section(is,s) >= nxl .AND. section(is,s) <= nxr ) & 1356 1638 THEN 1357 local_2d = local_pf(section(is,s),:,nzb :nzt+1)1639 local_2d = local_pf(section(is,s),:,nzb_do:nzt_do) 1358 1640 ENDIF 1359 1641 … … 1376 1658 ! output file afterwards to increase the performance. 1377 1659 DO j = nysg, nyng 1378 DO k = nzb , nzt+11660 DO k = nzb_do, nzt_do 1379 1661 local_2d_sections_l(is,j,k) = local_2d(j,k) 1380 1662 ENDDO … … 1403 1685 nxl1 == 1 ) ) & 1404 1686 THEN 1405 WRITE (23) nysg, nyng, nzb , nzt+11687 WRITE (23) nysg, nyng, nzb_do, nzt_do, nzb, nzt+1 1406 1688 WRITE (23) local_2d 1407 1689 ELSE 1408 WRITE (23) 1, 1, 1, 1 1690 WRITE (23) 1, 1, 1, 1, 1, 1 1409 1691 ENDIF 1410 1692 ENDIF … … 1422 1704 CALL MPI_BARRIER( comm2d, ierr ) 1423 1705 1424 ngp = ( nyngnysg+1 ) * ( nzt nzb+2)1706 ngp = ( nyngnysg+1 ) * ( nzt_donzb_do+1 ) 1425 1707 IF ( myid == 0 ) THEN 1426 1708 ! … … 1430 1712 ( section(is,s) == 1 .AND. nxl1 == 1 ) ) & 1431 1713 THEN 1432 total_2d(nysg:nyng,nzb :nzt+1) = local_2d1714 total_2d(nysg:nyng,nzb_do:nzt_do) = local_2d 1433 1715 ENDIF 1434 1716 ! … … 1459 1741 ! Relocate the local array for the next loop increment 1460 1742 DEALLOCATE( local_2d ) 1461 ALLOCATE( local_2d(nysg:nyng,nzb :nzt+1) )1743 ALLOCATE( local_2d(nysg:nyng,nzb_do:nzt_do) ) 1462 1744 1463 1745 #if defined( __netcdf ) 1464 1746 nc_stat = NF90_PUT_VAR( id_set_yz(av), & 1465 1747 id_var_do2d(av,if), & 1466 total_2d(0:ny+1,nzb :nzt+1),&1748 total_2d(0:ny+1,nzb_do:nzt_do),& 1467 1749 start = (/ is, 1, 1, do2d_yz_time_count(av) /), & 1468 count = (/ 1, ny+2, nz +2, 1 /) )1750 count = (/ 1, ny+2, nzt_donzb_do+1, 1 /) ) 1469 1751 CALL handle_netcdf_error( 'data_output_2d', 61 ) 1470 1752 #endif … … 1479 1761 THEN 1480 1762 ind(1) = nysg; ind(2) = nyng 1481 ind(3) = nzb ; ind(4) = nzt+11763 ind(3) = nzb_do; ind(4) = nzt_do 1482 1764 ELSE 1483 1765 ind(1) = 9999; ind(2) = 9999 … … 1489 1771 ! If applicable, send data to PE0. 1490 1772 IF ( ind(1) /= 9999 ) THEN 1491 CALL MPI_SEND( local_2d(nysg,nzb ), ngp, &1773 CALL MPI_SEND( local_2d(nysg,nzb_do), ngp, & 1492 1774 MPI_REAL, 0, 1, comm2d, ierr ) 1493 1775 ENDIF … … 1505 1787 nc_stat = NF90_PUT_VAR( id_set_yz(av), & 1506 1788 id_var_do2d(av,if), & 1507 local_2d(nys:nyn+1,nzb :nzt+1), &1789 local_2d(nys:nyn+1,nzb_do:nzt_do), & 1508 1790 start = (/ is, 1, 1, do2d_xz_time_count(av) /), & 1509 count = (/ 1, ny+2, nz +2, 1 /) )1791 count = (/ 1, ny+2, nzt_donzb_do+1, 1 /) ) 1510 1792 CALL handle_netcdf_error( 'data_output_2d', 452 ) 1511 1793 #endif … … 1595 1877 ! 1596 1878 ! Distribute data over all PEs along y 1597 ngp = ( nxrgnxlg+1 ) * ( nzt nzb+2) * ns1879 ngp = ( nxrgnxlg+1 ) * ( nzt_donzb_do+1 ) * ns 1598 1880 IF ( collective_wait ) CALL MPI_BARRIER( comm2d, ierr ) 1599 CALL MPI_ALLREDUCE( local_2d_sections_l(nxlg,1,nzb ), &1600 local_2d_sections(nxlg,1,nzb ), &1881 CALL MPI_ALLREDUCE( local_2d_sections_l(nxlg,1,nzb_do), & 1882 local_2d_sections(nxlg,1,nzb_do), & 1601 1883 ngp, MPI_REAL, MPI_SUM, comm1dy, & 1602 1884 ierr ) … … 1612 1894 id_var_do2d(av,if), & 1613 1895 local_2d_sections(nxl:nxr+1,1:ns, & 1614 nzb :nzt+1),&1896 nzb_do:nzt_do), & 1615 1897 start = (/ nxl+1, 1, 1, & 1616 1898 do2d_xz_time_count(av) /), & 1617 count = (/ nxrnxl+2, ns, nzt +2, &1899 count = (/ nxrnxl+2, ns, nzt_donzb_do+1, & 1618 1900 1 /) ) 1619 1901 ELSE … … 1621 1903 id_var_do2d(av,if), & 1622 1904 local_2d_sections(nxl:nxr,1:ns, & 1623 nzb :nzt+1),&1905 nzb_do:nzt_do), & 1624 1906 start = (/ nxl+1, 1, 1, & 1625 1907 do2d_xz_time_count(av) /), & 1626 count = (/ nxrnxl+1, ns, nzt +2, &1908 count = (/ nxrnxl+1, ns, nzt_donzb_do+1, & 1627 1909 1 /) ) 1628 1910 ENDIF … … 1647 1929 ngp = ( nyngnysg+1 ) * ( nztnzb + 2 ) * ns 1648 1930 IF ( collective_wait ) CALL MPI_BARRIER( comm2d, ierr ) 1649 CALL MPI_ALLREDUCE( local_2d_sections_l(1,nysg,nzb ), &1650 local_2d_sections(1,nysg,nzb ), &1931 CALL MPI_ALLREDUCE( local_2d_sections_l(1,nysg,nzb_do), & 1932 local_2d_sections(1,nysg,nzb_do), & 1651 1933 ngp, MPI_REAL, MPI_SUM, comm1dx, & 1652 1934 ierr ) … … 1662 1944 id_var_do2d(av,if), & 1663 1945 local_2d_sections(1:ns, & 1664 nys:nyn+1,nzb :nzt+1),&1946 nys:nyn+1,nzb_do:nzt_do), & 1665 1947 start = (/ 1, nys+1, 1, & 1666 1948 do2d_yz_time_count(av) /), & 1667 1949 count = (/ ns, nynnys+2, & 1668 nzt +2, 1 /) )1950 nzt_donzb_do+1, 1 /) ) 1669 1951 ELSE 1670 1952 nc_stat = NF90_PUT_VAR( id_set_yz(av), & 1671 1953 id_var_do2d(av,if), & 1672 1954 local_2d_sections(1:ns,nys:nyn, & 1673 nzb :nzt+1),&1955 nzb_do:nzt_do), & 1674 1956 start = (/ 1, nys+1, 1, & 1675 1957 do2d_yz_time_count(av) /), & 1676 1958 count = (/ ns, nynnys+1, & 1677 nzt +2, 1 /) )1959 nzt_donzb_do+1, 1 /) ) 1678 1960 ENDIF 1679 1961
Note: See TracChangeset
for help on using the changeset viewer.