Changeset 2475 for palm/trunk
- Timestamp:
- Sep 18, 2017 7:42:36 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/land_surface_model_mod.f90
r2354 r2475 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Bugfix: setting of vegetation_pars for bare soil corrected. 28 ! 29 ! 2354 2017-08-17 10:49:36Z schwenkel 27 30 ! minor bugfixes 28 31 ! … … 278 281 279 282 USE radiation_model_mod, & 280 ONLY: albedo, albedo_type, emissivity, force_radiation_call, rad_net, 283 ONLY: albedo, albedo_type, emissivity, force_radiation_call, rad_net, & 281 284 rad_sw_in, rad_lw_out, rad_lw_out_change_0, radiation_scheme, & 282 285 unscheduled_radiation_calls … … 399 402 400 403 401 REAL(wp), DIMENSION(0:20) :: root_fraction = 9999999.9_wp, 402 soil_moisture = 0.0_wp, 403 soil_temperature = 300.0_wp, 404 dz_soil = 9999999.9_wp, 405 zs_layer = 9999999.9_wp 404 REAL(wp), DIMENSION(0:20) :: root_fraction = 9999999.9_wp, & !< (NAMELIST) distribution of root surface area to the individual soil layers 405 soil_moisture = 0.0_wp, & !< NAMELIST soil moisture content (m3/m3) 406 soil_temperature = 300.0_wp, & !< NAMELIST soil temperature (K) +1 407 dz_soil = 9999999.9_wp, & !< (NAMELIST) soil layer depths (spacing) 408 zs_layer = 9999999.9_wp !< soil layer depths (edge) 406 409 407 410 #if defined( __nopointer ) … … 412 415 413 416 TYPE(surf_type_lsm), DIMENSION(0:3), TARGET :: & 414 t_soil_v, & !< Soil temperature (K), vertical surface elements415 t_soil_v_p, & !< Prog. soil temperature (K), vertical surface elements416 m_soil_v, & !< Soil moisture (m3/m3), vertical surface elements417 m_soil_v_p !< Prog. soil moisture (m3/m3), vertical surface elements417 t_soil_v, & !< Soil temperature (K), vertical surface elements 418 t_soil_v_p, & !< Prog. soil temperature (K), vertical surface elements 419 m_soil_v, & !< Soil moisture (m3/m3), vertical surface elements 420 m_soil_v_p !< Prog. soil moisture (m3/m3), vertical surface elements 418 421 #else 419 422 TYPE(surf_type_lsm), POINTER :: t_soil_h, & !< Soil temperature (K), horizontal surface elements … … 449 452 t_surface_v, & !< surface temperature (K), vertical surface elements 450 453 t_surface_v_p, & !< progn. surface temperature (K), vertical surface elements 451 m_liq_v, & !< liquid water reservoir (m), vertical surface elements452 m_liq_v_p !< progn. liquid water reservoir (m), vertical surface elements454 m_liq_v, & !< liquid water reservoir (m), vertical surface elements 455 m_liq_v_p !< progn. liquid water reservoir (m), vertical surface elements 453 456 #else 454 457 TYPE(surf_type_lsm), POINTER :: t_surface_h, & !< surface temperature (K), horizontal surface elements 455 458 t_surface_h_p, & !< progn. surface temperature (K), horizontal surface elements 456 m_liq_h, & !< liquid water reservoir (m), horizontal surface elements457 m_liq_h_p !< progn. liquid water reservoir (m), horizontal surface elements459 m_liq_h, & !< liquid water reservoir (m), horizontal surface elements 460 m_liq_h_p !< progn. liquid water reservoir (m), horizontal surface elements 458 461 459 462 TYPE(surf_type_lsm), TARGET :: t_surface_h_1, & !< 460 463 t_surface_h_2, & !< 461 m_liq_h_1, & !<462 m_liq_h_2 !<464 m_liq_h_1, & !< 465 m_liq_h_2 !< 463 466 464 467 TYPE(surf_type_lsm), DIMENSION(:), POINTER :: & 465 468 t_surface_v, & !< surface temperature (K), vertical surface elements 466 469 t_surface_v_p, & !< progn. surface temperature (K), vertical surface elements 467 m_liq_v, & !< liquid water reservoir (m), vertical surface elements468 m_liq_v_p !< progn. liquid water reservoir (m), vertical surface elements470 m_liq_v, & !< liquid water reservoir (m), vertical surface elements 471 m_liq_v_p !< progn. liquid water reservoir (m), vertical surface elements 469 472 470 473 TYPE(surf_type_lsm), DIMENSION(0:3), TARGET :: & 471 474 t_surface_v_1, & !< 472 475 t_surface_v_2, & !< 473 m_liq_v_1, & !<474 m_liq_v_2 !<476 m_liq_v_1, & !< 477 m_liq_v_2 !< 475 478 #endif 476 479 … … 489 492 #endif 490 493 491 TYPE(surf_type_lsm), TARGET :: tm_liq_h_m !< liquid water reservoir tendency (m), horizontal surface elements494 TYPE(surf_type_lsm), TARGET :: tm_liq_h_m !< liquid water reservoir tendency (m), horizontal surface elements 492 495 TYPE(surf_type_lsm), TARGET :: tt_surface_h_m !< surface temperature tendency (K), horizontal surface elements 493 496 TYPE(surf_type_lsm), TARGET :: tt_soil_h_m !< t_soil storage array, horizontal surface elements 494 497 TYPE(surf_type_lsm), TARGET :: tm_soil_h_m !< m_soil storage array, horizontal surface elements 495 498 496 TYPE(surf_type_lsm), DIMENSION(0:3), TARGET :: tm_liq_v_m !< liquid water reservoir tendency (m), vertical surface elements499 TYPE(surf_type_lsm), DIMENSION(0:3), TARGET :: tm_liq_v_m !< liquid water reservoir tendency (m), vertical surface elements 497 500 TYPE(surf_type_lsm), DIMENSION(0:3), TARGET :: tt_surface_v_m !< surface temperature tendency (K), vertical surface elements 498 501 TYPE(surf_type_lsm), DIMENSION(0:3), TARGET :: tt_soil_v_m !< t_soil storage array, vertical surface elements … … 502 505 !-- Energy balance variables 503 506 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: & 504 c_liq_av, 505 c_soil_av, 506 c_veg_av, 507 ghf_av, 508 lai_av, 509 qsws_liq_av, 510 qsws_soil_av, 511 qsws_veg_av, 512 r_a_av, 513 r_s_av 507 c_liq_av, & !< average of c_liq 508 c_soil_av, & !< average of c_soil 509 c_veg_av, & !< average of c_veg 510 ghf_av, & !< average of ghf 511 lai_av, & !< average of lai 512 qsws_liq_av, & !< average of qsws_liq 513 qsws_soil_av, & !< average of qsws_soil 514 qsws_veg_av, & !< average of qsws_veg 515 r_a_av, & !< average of r_a 516 r_s_av !< average of r_s 514 517 515 518 … … 517 520 !-- Predefined Land surface classes (vegetation_type) 518 521 CHARACTER(26), DIMENSION(0:18), PARAMETER :: vegetation_type_name = (/ & 519 'user defined ', 520 'bare soil ', 521 'crops, mixed farming ', 522 'short grass ', 523 'evergreen needleleaf trees', 524 'deciduous needleleaf trees', 525 'evergreen broadleaf trees ', 526 'deciduous broadleaf trees ', 527 'tall grass ', 528 'desert ', 529 'tundra ', 530 'irrigated crops ', 531 'semidesert ', 532 'ice caps and glaciers ', 533 'bogs and marshes ', 534 'evergreen shrubs ', 535 'deciduous shrubs ', 536 'mixed forest/woodland ', 537 'interrupted forest ' 522 'user defined ', & ! 0 523 'bare soil ', & ! 1 524 'crops, mixed farming ', & ! 2 525 'short grass ', & ! 3 526 'evergreen needleleaf trees', & ! 4 527 'deciduous needleleaf trees', & ! 5 528 'evergreen broadleaf trees ', & ! 6 529 'deciduous broadleaf trees ', & ! 7 530 'tall grass ', & ! 8 531 'desert ', & ! 9 532 'tundra ', & ! 10 533 'irrigated crops ', & ! 11 534 'semidesert ', & ! 12 535 'ice caps and glaciers ', & ! 13 536 'bogs and marshes ', & ! 14 537 'evergreen shrubs ', & ! 15 538 'deciduous shrubs ', & ! 16 539 'mixed forest/woodland ', & ! 17 540 'interrupted forest ' & ! 18 538 541 /) 539 542 … … 541 544 !-- Soil model classes (soil_type) 542 545 CHARACTER(12), DIMENSION(0:6), PARAMETER :: soil_type_name = (/ & 543 'user defined', 544 'coarse ', 545 'medium ', 546 'medium-fine ', 547 'fine ', 548 'very fine ', 549 'organic ' 546 'user defined', & ! 0 547 'coarse ', & ! 1 548 'medium ', & ! 2 549 'medium-fine ', & ! 3 550 'fine ', & ! 4 551 'very fine ', & ! 5 552 'organic ' & ! 6 550 553 /) 551 554 … … 553 556 !-- Pavement classes 554 557 CHARACTER(20), DIMENSION(0:7), PARAMETER :: pavement_type_name = (/ & 555 'user defined ', 556 'asphalt ', 557 'concrete ', 558 'asphalt/concrete mix', 559 'brick pavers ', 560 'cobblestone pavers ', 561 'sett pavers ', 562 'gravel pavers ' 558 'user defined ', & ! 0 559 'asphalt ', & ! 1 560 'concrete ', & ! 2 561 'asphalt/concrete mix', & ! 3 562 'brick pavers ', & ! 4 563 'cobblestone pavers ', & ! 5 564 'sett pavers ', & ! 6 565 'gravel pavers ' & ! 7 563 566 /) 564 567 … … 566 569 !-- Water classes 567 570 CHARACTER(12), DIMENSION(0:5), PARAMETER :: water_type_name = (/ & 568 'user defined', 569 'lake ', 570 'river ', 571 'ocean ', 572 'pond ', 573 'fountain ' 571 'user defined', & ! 0 572 'lake ', & ! 1 573 'river ', & ! 2 574 'ocean ', & ! 3 575 'pond ', & ! 4 576 'fountain ' & ! 5 574 577 /) 575 578 … … 581 584 !-- r_canopy_min, lai, c_veg, g_d z0, z0h, lambda_s_s, lambda_s_u, f_sw_in, c_surface, albedo_type, emissivity 582 585 REAL(wp), DIMENSION(0:11,1:18), PARAMETER :: vegetation_pars = RESHAPE( (/ & 583 0.0_wp, 0.00_wp, 1.00_wp, 0.00_wp, 0.005_wp, 0.5E-4_wp, 0.0_wp, 0.0_wp, 0.00_wp, 0.00_wp, 0.0_wp, 0.94_wp, & ! 1586 0.0_wp, 0.00_wp, 0.00_wp, 0.00_wp, 0.005_wp, 0.5E-4_wp, 0.0_wp, 0.0_wp, 0.00_wp, 0.00_wp, 18.0_wp, 0.94_wp, & ! 1 584 587 180.0_wp, 3.00_wp, 1.00_wp, 0.00_wp, 0.10_wp, 0.001_wp, 10.0_wp, 10.0_wp, 0.05_wp, 0.00_wp, 2.0_wp, 0.95_wp, & ! 2 585 588 110.0_wp, 2.00_wp, 1.00_wp, 0.00_wp, 0.03_wp, 0.3E-4_wp, 10.0_wp, 10.0_wp, 0.05_wp, 0.00_wp, 2.0_wp, 0.95_wp, & ! 3 … … 606 609 !-- level 1 - level 4 according to zs_ref 607 610 REAL(wp), DIMENSION(0:3,1:18), PARAMETER :: root_distribution = RESHAPE( (/ & 608 1.00_wp, 0.00_wp, 0.00_wp, 0.00_wp, 609 0.24_wp, 0.41_wp, 0.31_wp, 0.04_wp, 610 0.35_wp, 0.38_wp, 0.23_wp, 0.04_wp, 611 0.26_wp, 0.39_wp, 0.29_wp, 0.06_wp, 612 0.26_wp, 0.38_wp, 0.29_wp, 0.07_wp, 613 0.24_wp, 0.38_wp, 0.31_wp, 0.07_wp, 614 0.25_wp, 0.34_wp, 0.27_wp, 0.14_wp, 615 0.27_wp, 0.27_wp, 0.27_wp, 0.09_wp, 616 1.00_wp, 0.00_wp, 0.00_wp, 0.00_wp, 617 0.47_wp, 0.45_wp, 0.08_wp, 0.00_wp, 618 0.24_wp, 0.41_wp, 0.31_wp, 0.04_wp, 619 0.17_wp, 0.31_wp, 0.33_wp, 0.19_wp, 620 0.00_wp, 0.00_wp, 0.00_wp, 0.00_wp, 621 0.25_wp, 0.34_wp, 0.27_wp, 0.11_wp, 622 0.23_wp, 0.36_wp, 0.30_wp, 0.11_wp, 623 0.23_wp, 0.36_wp, 0.30_wp, 0.11_wp, 624 0.19_wp, 0.35_wp, 0.36_wp, 0.10_wp, 625 0.19_wp, 0.35_wp, 0.36_wp, 0.10_wp 611 1.00_wp, 0.00_wp, 0.00_wp, 0.00_wp, & ! 1 612 0.24_wp, 0.41_wp, 0.31_wp, 0.04_wp, & ! 2 613 0.35_wp, 0.38_wp, 0.23_wp, 0.04_wp, & ! 3 614 0.26_wp, 0.39_wp, 0.29_wp, 0.06_wp, & ! 4 615 0.26_wp, 0.38_wp, 0.29_wp, 0.07_wp, & ! 5 616 0.24_wp, 0.38_wp, 0.31_wp, 0.07_wp, & ! 6 617 0.25_wp, 0.34_wp, 0.27_wp, 0.14_wp, & ! 7 618 0.27_wp, 0.27_wp, 0.27_wp, 0.09_wp, & ! 8 619 1.00_wp, 0.00_wp, 0.00_wp, 0.00_wp, & ! 9 620 0.47_wp, 0.45_wp, 0.08_wp, 0.00_wp, & ! 10 621 0.24_wp, 0.41_wp, 0.31_wp, 0.04_wp, & ! 11 622 0.17_wp, 0.31_wp, 0.33_wp, 0.19_wp, & ! 12 623 0.00_wp, 0.00_wp, 0.00_wp, 0.00_wp, & ! 13 624 0.25_wp, 0.34_wp, 0.27_wp, 0.11_wp, & ! 14 625 0.23_wp, 0.36_wp, 0.30_wp, 0.11_wp, & ! 15 626 0.23_wp, 0.36_wp, 0.30_wp, 0.11_wp, & ! 16 627 0.19_wp, 0.35_wp, 0.36_wp, 0.10_wp, & ! 17 628 0.19_wp, 0.35_wp, 0.36_wp, 0.10_wp & ! 18 626 629 /), (/ 4, 18 /) ) 627 630 … … 630 633 631 634 ! 632 !-- Soil parameters 635 !-- Soil parameters alpha_vg, l_vg, n_vg, gamma_w_sat, m_sat, m_fc, m_wilt, m_res 633 636 REAL(wp), DIMENSION(0:7,1:6), PARAMETER :: soil_pars = RESHAPE( (/ & 634 635 636 637 638 639 640 /), (/ 8, 6 /) )637 3.83_wp, 1.250_wp, 1.38_wp, 6.94E-6_wp, 0.403_wp, 0.244_wp, 0.059_wp, 0.025_wp,& ! 1 638 3.14_wp, -2.342_wp, 1.28_wp, 1.16E-6_wp, 0.439_wp, 0.347_wp, 0.151_wp, 0.010_wp,& ! 2 639 0.83_wp, -0.588_wp, 1.25_wp, 0.26E-6_wp, 0.430_wp, 0.383_wp, 0.133_wp, 0.010_wp,& ! 3 640 3.67_wp, -1.977_wp, 1.10_wp, 2.87E-6_wp, 0.520_wp, 0.448_wp, 0.279_wp, 0.010_wp,& ! 4 641 2.65_wp, 2.500_wp, 1.10_wp, 1.74E-6_wp, 0.614_wp, 0.541_wp, 0.335_wp, 0.010_wp,& ! 5 642 1.30_wp, 0.400_wp, 1.20_wp, 0.93E-6_wp, 0.766_wp, 0.663_wp, 0.267_wp, 0.010_wp & ! 6 643 /), (/ 8, 6 /) ) 641 644 642 645 ! … … 644 647 !-- Pavement parameters depth, z0, z0h, lambda_h, rho_c, albedo_type, emissivity 645 648 REAL(wp), DIMENSION(0:6,1:7), PARAMETER :: pavement_pars = RESHAPE( (/ & 646 0.050_wp, 1.0E-4_wp, 1.0E-5_wp, 1.00_wp, 1.94E6_wp, 17.0_wp, 0.97_wp, & ! 1649 0.050_wp, 1.0E-4_wp, 1.0E-5_wp, 1.00_wp, 1.94E6_wp, 17.0_wp, 0.97_wp, & ! 1 647 650 0.050_wp, 1.0E-4_wp, 1.0E-5_wp, 1.00_wp, 1.94E6_wp, 18.0_wp, 0.94_wp, & ! 2 648 651 0.050_wp, 1.0E-4_wp, 1.0E-5_wp, 1.00_wp, 1.94E6_wp, 19.0_wp, 0.98_wp, & ! 3 … … 650 653 0.050_wp, 1.0E-4_wp, 1.0E-5_wp, 1.00_wp, 1.94E6_wp, 21.0_wp, 0.97_wp, & ! 5 651 654 0.050_wp, 1.0E-4_wp, 1.0E-5_wp, 1.00_wp, 1.94E6_wp, 22.0_wp, 0.97_wp, & ! 6 652 0.050_wp, 1.0E-4_wp, 1.0E-5_wp, 1.00_wp, 1.94E6_wp, 23.0_wp, 0.97_wp & ! 7655 0.050_wp, 1.0E-4_wp, 1.0E-5_wp, 1.00_wp, 1.94E6_wp, 23.0_wp, 0.97_wp & ! 7 653 656 /), (/ 7, 7 /) ) 654 657 655 658 ! 656 659 !-- TO BE FILLED 657 !-- Water parameters 660 !-- Water parameters temperature, z0, z0h, albedo_type, emissivity, 658 661 REAL(wp), DIMENSION(0:4,1:5), PARAMETER :: water_pars = RESHAPE( (/ & 659 660 661 662 663 662 283.0_wp, 0.01_wp, 0.001_wp, 1.0_wp, 0.99_wp, & ! 1 663 283.0_wp, 0.01_wp, 0.001_wp, 1.0_wp, 0.99_wp, & ! 2 664 283.0_wp, 0.01_wp, 0.001_wp, 1.0_wp, 0.99_wp, & ! 3 665 283.0_wp, 0.01_wp, 0.001_wp, 1.0_wp, 0.99_wp, & ! 4 666 283.0_wp, 0.01_wp, 0.001_wp, 1.0_wp, 0.99_wp & ! 5 664 667 /), (/ 5, 5 /) ) 665 668 … … 764 767 765 768 766 USE control_parameters, &769 USE control_parameters, & 767 770 ONLY: data_output, message_string 768 771 769 772 IMPLICIT NONE 770 773 771 CHARACTER (LEN=*) :: unit 772 CHARACTER (LEN=*) :: var !<774 CHARACTER (LEN=*) :: unit !< 775 CHARACTER (LEN=*) :: var !< 773 776 774 777 INTEGER(iwp) :: i … … 780 783 CASE ( 'm_soil' ) 781 784 IF ( .NOT. land_surface ) THEN 782 message_string = 'output of "' // TRIM( var ) // '" requi' // &785 message_string = 'output of "' // TRIM( var ) // '" requi' // & 783 786 'res land_surface = .TRUE.' 784 787 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 ) … … 788 791 CASE ( 't_soil' ) 789 792 IF ( .NOT. land_surface ) THEN 790 message_string = 'output of "' // TRIM( var ) // '" requi' // &793 message_string = 'output of "' // TRIM( var ) // '" requi' // & 791 794 'res land_surface = .TRUE.' 792 795 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 ) … … 794 797 unit = 'K' 795 798 796 CASE ( 'lai*', 'c_liq*', 'c_soil*', 'c_veg*', 'ghf*', 'm_liq*', &797 'qsws_liq*', 'qsws_soil*', 'qsws_veg*', &799 CASE ( 'lai*', 'c_liq*', 'c_soil*', 'c_veg*', 'ghf*', 'm_liq*', & 800 'qsws_liq*', 'qsws_soil*', 'qsws_veg*', & 798 801 'r_a*', 'r_s*' ) 799 802 IF ( k == 0 .OR. data_output(i)(ilen-2:ilen) /= '_xy' ) THEN 800 message_string = 'illegal value for data_output: "' // &801 TRIM( var ) // '" & only 2d-horizontal ' // &803 message_string = 'illegal value for data_output: "' // & 804 TRIM( var ) // '" & only 2d-horizontal ' // & 802 805 'cross sections are allowed for this value' 803 806 CALL message( 'check_parameters', 'PA0111', 1, 2, 0, 6, 0 ) 804 807 ENDIF 805 808 IF ( TRIM( var ) == 'lai*' .AND. .NOT. land_surface ) THEN 806 message_string = 'output of "' // TRIM( var ) // '" requi' // &809 message_string = 'output of "' // TRIM( var ) // '" requi' // & 807 810 'res land_surface = .TRUE.' 808 811 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 ) 809 812 ENDIF 810 813 IF ( TRIM( var ) == 'c_liq*' .AND. .NOT. land_surface ) THEN 811 message_string = 'output of "' // TRIM( var ) // '" requi' // &814 message_string = 'output of "' // TRIM( var ) // '" requi' // & 812 815 'res land_surface = .TRUE.' 813 816 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 ) 814 817 ENDIF 815 818 IF ( TRIM( var ) == 'c_soil*' .AND. .NOT. land_surface ) THEN 816 message_string = 'output of "' // TRIM( var ) // '" requi' // &819 message_string = 'output of "' // TRIM( var ) // '" requi' // & 817 820 'res land_surface = .TRUE.' 818 821 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 ) 819 822 ENDIF 820 823 IF ( TRIM( var ) == 'c_veg*' .AND. .NOT. land_surface ) THEN 821 message_string = 'output of "' // TRIM( var ) // '" requi' // &824 message_string = 'output of "' // TRIM( var ) // '" requi' // & 822 825 'res land_surface = .TRUE.' 823 826 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 ) 824 827 ENDIF 825 828 IF ( TRIM( var ) == 'ghf*' .AND. .NOT. land_surface ) THEN 826 message_string = 'output of "' // TRIM( var ) // '" requi' // &829 message_string = 'output of "' // TRIM( var ) // '" requi' // & 827 830 'res land_surface = .TRUE.' 828 831 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 ) 829 832 ENDIF 830 833 IF ( TRIM( var ) == 'm_liq*' .AND. .NOT. land_surface ) THEN 831 message_string = 'output of "' // TRIM( var ) // '" requi' // &834 message_string = 'output of "' // TRIM( var ) // '" requi' // & 832 835 'res land_surface = .TRUE.' 833 836 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 ) 834 837 ENDIF 835 IF ( TRIM( var ) == 'qsws_liq*' .AND. .NOT. land_surface ) &838 IF ( TRIM( var ) == 'qsws_liq*' .AND. .NOT. land_surface ) & 836 839 THEN 837 message_string = 'output of "' // TRIM( var ) // '" requi' // &840 message_string = 'output of "' // TRIM( var ) // '" requi' // & 838 841 'res land_surface = .TRUE.' 839 842 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 ) 840 843 ENDIF 841 IF ( TRIM( var ) == 'qsws_soil*' .AND. .NOT. land_surface ) &844 IF ( TRIM( var ) == 'qsws_soil*' .AND. .NOT. land_surface ) & 842 845 THEN 843 message_string = 'output of "' // TRIM( var ) // '" requi' // &846 message_string = 'output of "' // TRIM( var ) // '" requi' // & 844 847 'res land_surface = .TRUE.' 845 848 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 ) 846 849 ENDIF 847 IF ( TRIM( var ) == 'qsws_veg*' .AND. .NOT. land_surface ) &850 IF ( TRIM( var ) == 'qsws_veg*' .AND. .NOT. land_surface ) & 848 851 THEN 849 message_string = 'output of "' // TRIM( var ) // '" requi' // &852 message_string = 'output of "' // TRIM( var ) // '" requi' // & 850 853 'res land_surface = .TRUE.' 851 854 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 ) 852 855 ENDIF 853 IF ( TRIM( var ) == 'r_a*' .AND. .NOT. land_surface ) &856 IF ( TRIM( var ) == 'r_a*' .AND. .NOT. land_surface ) & 854 857 THEN 855 message_string = 'output of "' // TRIM( var ) // '" requi' // &858 message_string = 'output of "' // TRIM( var ) // '" requi' // & 856 859 'res land_surface = .TRUE.' 857 860 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 ) 858 861 ENDIF 859 IF ( TRIM( var ) == 'r_s*' .AND. .NOT. land_surface ) &862 IF ( TRIM( var ) == 'r_s*' .AND. .NOT. land_surface ) & 860 863 THEN 861 message_string = 'output of "' // TRIM( var ) // '" requi' // &864 message_string = 'output of "' // TRIM( var ) // '" requi' // & 862 865 'res land_surface = .TRUE.' 863 866 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 ) 864 867 ENDIF 865 868 866 IF ( TRIM( var ) == 'lai*' ) unit = 'none'867 IF ( TRIM( var ) == 'c_liq*' ) unit = 'none'868 IF ( TRIM( var ) == 'c_soil*') unit = 'none'869 IF ( TRIM( var ) == 'c_veg*' ) unit = 'none'870 IF ( TRIM( var ) == 'ghf*') unit = 'W/m2'869 IF ( TRIM( var ) == 'lai*' ) unit = 'none' 870 IF ( TRIM( var ) == 'c_liq*' ) unit = 'none' 871 IF ( TRIM( var ) == 'c_soil*') unit = 'none' 872 IF ( TRIM( var ) == 'c_veg*' ) unit = 'none' 873 IF ( TRIM( var ) == 'ghf*') unit = 'W/m2' 871 874 IF ( TRIM( var ) == 'm_liq*' ) unit = 'm' 872 IF ( TRIM( var ) == 'qsws_liq*' ) unit = 'W/m2'873 IF ( TRIM( var ) == 'qsws_soil*' ) unit = 'W/m2'874 IF ( TRIM( var ) == 'qsws_veg*' ) unit = 'W/m2'875 IF ( TRIM( var ) == 'r_a*') unit = 's/m'876 IF ( TRIM( var ) == 'r_s*') unit = 's/m'875 IF ( TRIM( var ) == 'qsws_liq*' ) unit = 'W/m2' 876 IF ( TRIM( var ) == 'qsws_soil*' ) unit = 'W/m2' 877 IF ( TRIM( var ) == 'qsws_veg*' ) unit = 'W/m2' 878 IF ( TRIM( var ) == 'r_a*') unit = 's/m' 879 IF ( TRIM( var ) == 'r_s*') unit = 's/m' 877 880 878 881 CASE DEFAULT … … 892 895 SUBROUTINE lsm_check_data_output_pr( variable, var_count, unit, dopr_unit ) 893 896 894 USE control_parameters, &897 USE control_parameters, & 895 898 ONLY: data_output_pr, message_string 896 899 … … 914 917 CASE ( 't_soil', '#t_soil' ) 915 918 IF ( .NOT. land_surface ) THEN 916 message_string = 'data_output_pr = ' // &917 TRIM( data_output_pr(var_count) ) // ' is' // &919 message_string = 'data_output_pr = ' // & 920 TRIM( data_output_pr(var_count) ) // ' is' // & 918 921 'not implemented for land_surface = .FALSE.' 919 922 CALL message( 'check_parameters', 'PA0402', 1, 2, 0, 6, 0 ) … … 932 935 CASE ( 'm_soil', '#m_soil' ) 933 936 IF ( .NOT. land_surface ) THEN 934 message_string = 'data_output_pr = ' // &935 TRIM( data_output_pr(var_count) ) // ' is' // &937 message_string = 'data_output_pr = ' // & 938 TRIM( data_output_pr(var_count) ) // ' is' // & 936 939 ' not implemented for land_surface = .FALSE.' 937 940 CALL message( 'check_parameters', 'PA0402', 1, 2, 0, 6, 0 ) … … 983 986 TRIM( surface_type ) /= 'pavement' .AND. & 984 987 TRIM( surface_type ) /= 'water' .AND. & 985 TRIM( surface_type ) /= 'netcdf' ) THEN 986 message_string = 'unknown surface type surface_type = "' // &988 TRIM( surface_type ) /= 'netcdf' ) THEN 989 message_string = 'unknown surface type surface_type = "' // & 987 990 TRIM( surface_type ) // '"' 988 991 CALL message( 'check_parameters', 'PA0019', 1, 2, 0, 6, 0 ) … … 1010 1013 IF ( vegetation_type == 0 ) THEN 1011 1014 IF ( min_canopy_resistance == 9999999.9_wp ) THEN 1012 message_string = 'vegetation_type = 0 (user defined)'// 1013 'requires setting of min_canopy_resistance'// 1015 message_string = 'vegetation_type = 0 (user defined)'// & 1016 'requires setting of min_canopy_resistance'// & 1014 1017 '/= 9999999.9' 1015 1018 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) … … 1017 1020 1018 1021 IF ( leaf_area_index == 9999999.9_wp ) THEN 1019 message_string = 'vegetation_type = 0 (user_defined)'// 1020 'requires setting of leaf_area_index'// 1022 message_string = 'vegetation_type = 0 (user_defined)'// & 1023 'requires setting of leaf_area_index'// & 1021 1024 '/= 9999999.9' 1022 1025 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) … … 1024 1027 1025 1028 IF ( vegetation_coverage == 9999999.9_wp ) THEN 1026 message_string = 'vegetation_type = 0 (user_defined)'// 1027 'requires setting of vegetation_coverage'// 1029 message_string = 'vegetation_type = 0 (user_defined)'// & 1030 'requires setting of vegetation_coverage'// & 1028 1031 '/= 9999999.9' 1029 1032 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) … … 1031 1034 1032 1035 IF ( canopy_resistance_coefficient == 9999999.9_wp) THEN 1033 message_string = 'vegetation_type = 0 (user_defined)'// 1034 'requires setting of'// 1036 message_string = 'vegetation_type = 0 (user_defined)'// & 1037 'requires setting of'// & 1035 1038 'canopy_resistance_coefficient /= 9999999.9' 1036 1039 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) … … 1038 1041 1039 1042 IF ( lambda_surface_stable == 9999999.9_wp ) THEN 1040 message_string = 'vegetation_type = 0 (user_defined)'// 1041 'requires setting of lambda_surface_stable'// 1043 message_string = 'vegetation_type = 0 (user_defined)'// & 1044 'requires setting of lambda_surface_stable'// & 1042 1045 '/= 9999999.9' 1043 1046 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) … … 1045 1048 1046 1049 IF ( lambda_surface_unstable == 9999999.9_wp ) THEN 1047 message_string = 'vegetation_type = 0 (user_defined)'// 1048 'requires setting of lambda_surface_unstable'// 1050 message_string = 'vegetation_type = 0 (user_defined)'// & 1051 'requires setting of lambda_surface_unstable'// & 1049 1052 '/= 9999999.9' 1050 1053 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) … … 1052 1055 1053 1056 IF ( f_shortwave_incoming == 9999999.9_wp ) THEN 1054 message_string = 'vegetation_type = 0 (user_defined)'// 1055 'requires setting of f_shortwave_incoming'// 1057 message_string = 'vegetation_type = 0 (user_defined)'// & 1058 'requires setting of f_shortwave_incoming'// & 1056 1059 '/= 9999999.9' 1057 1060 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) … … 1059 1062 1060 1063 IF ( z0_vegetation == 9999999.9_wp ) THEN 1061 message_string = 'vegetation_type = 0 (user_defined)'// 1062 'requires setting of z0_vegetation'// 1064 message_string = 'vegetation_type = 0 (user_defined)'// & 1065 'requires setting of z0_vegetation'// & 1063 1066 '/= 9999999.9' 1064 1067 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) … … 1066 1069 1067 1070 IF ( z0h_vegetation == 9999999.9_wp ) THEN 1068 message_string = 'vegetation_type = 0 (user_defined)'// 1069 'requires setting of z0h_vegetation'// 1071 message_string = 'vegetation_type = 0 (user_defined)'// & 1072 'requires setting of z0h_vegetation'// & 1070 1073 '/= 9999999.9' 1071 1074 CALL message( 'check_parameters', 'PA0401', 1, 2, 0, 6, 0 ) 1072 1075 ENDIF 1073 1076 ENDIF 1074 1077 1078 IF ( vegetation_type == 1 ) THEN 1079 IF ( vegetation_coverage /= 9999999.9_wp .AND. vegetation_coverage & 1080 /= 0.0_wp ) THEN 1081 message_string = 'vegetation_type = 1 (bare soil)'// & 1082 ' requires vegetation_coverage = 0'// & 1083 CALL message( 'check_parameters', 'PA0471', 1, 2, 0, 6, 0 ) 1084 ENDIF 1085 1075 1086 ENDIF 1076 1087 … … 1165 1176 1166 1177 IF ( alpha_vangenuchten == 9999999.9_wp ) THEN 1167 message_string = 'soil_type = 0 (user_defined)'// &1168 'requires setting of alpha_vangenuchten'// &1178 message_string = 'soil_type = 0 (user_defined)'// & 1179 'requires setting of alpha_vangenuchten'// & 1169 1180 '/= 9999999.9' 1170 1181 CALL message( 'check_parameters', 'PA0403', 1, 2, 0, 6, 0 ) … … 1172 1183 1173 1184 IF ( l_vangenuchten == 9999999.9_wp ) THEN 1174 message_string = 'soil_type = 0 (user_defined)'// &1175 'requires setting of l_vangenuchten'// &1185 message_string = 'soil_type = 0 (user_defined)'// & 1186 'requires setting of l_vangenuchten'// & 1176 1187 '/= 9999999.9' 1177 1188 CALL message( 'check_parameters', 'PA0403', 1, 2, 0, 6, 0 ) … … 1179 1190 1180 1191 IF ( n_vangenuchten == 9999999.9_wp ) THEN 1181 message_string = 'soil_type = 0 (user_defined)'// &1182 'requires setting of n_vangenuchten'// &1192 message_string = 'soil_type = 0 (user_defined)'// & 1193 'requires setting of n_vangenuchten'// & 1183 1194 '/= 9999999.9' 1184 1195 CALL message( 'check_parameters', 'PA0403', 1, 2, 0, 6, 0 ) … … 1186 1197 1187 1198 IF ( hydraulic_conductivity == 9999999.9_wp ) THEN 1188 message_string = 'soil_type = 0 (user_defined)'// &1189 'requires setting of hydraulic_conductivity'// &1199 message_string = 'soil_type = 0 (user_defined)'// & 1200 'requires setting of hydraulic_conductivity'// & 1190 1201 '/= 9999999.9' 1191 1202 CALL message( 'check_parameters', 'PA0403', 1, 2, 0, 6, 0 ) … … 1193 1204 1194 1205 IF ( saturation_moisture == 9999999.9_wp ) THEN 1195 message_string = 'soil_type = 0 (user_defined)'// &1196 'requires setting of saturation_moisture'// &1206 message_string = 'soil_type = 0 (user_defined)'// & 1207 'requires setting of saturation_moisture'// & 1197 1208 '/= 9999999.9' 1198 1209 CALL message( 'check_parameters', 'PA0403', 1, 2, 0, 6, 0 ) … … 1200 1211 1201 1212 IF ( field_capacity == 9999999.9_wp ) THEN 1202 message_string = 'soil_type = 0 (user_defined)'// &1203 'requires setting of field_capacity'// &1213 message_string = 'soil_type = 0 (user_defined)'// & 1214 'requires setting of field_capacity'// & 1204 1215 '/= 9999999.9' 1205 1216 CALL message( 'check_parameters', 'PA0403', 1, 2, 0, 6, 0 ) … … 1207 1218 1208 1219 IF ( wilting_point == 9999999.9_wp ) THEN 1209 message_string = 'soil_type = 0 (user_defined)'// &1210 'requires setting of wilting_point'// &1220 message_string = 'soil_type = 0 (user_defined)'// & 1221 'requires setting of wilting_point'// & 1211 1222 '/= 9999999.9' 1212 1223 CALL message( 'check_parameters', 'PA0403', 1, 2, 0, 6, 0 ) … … 1214 1225 1215 1226 IF ( residual_moisture == 9999999.9_wp ) THEN 1216 message_string = 'soil_type = 0 (user_defined)'// &1217 'requires setting of residual_moisture'// &1227 message_string = 'soil_type = 0 (user_defined)'// & 1228 'requires setting of residual_moisture'// & 1218 1229 '/= 9999999.9' 1219 1230 CALL message( 'check_parameters', 'PA0403', 1, 2, 0, 6, 0 ) … … 1255 1266 DO k = nzb_soil, nzt_soil 1256 1267 IF ( soil_moisture(k) > saturation_moisture ) THEN 1257 message_string = 'soil_moisture must not exceed its saturation' // &1268 message_string = 'soil_moisture must not exceed its saturation' // & 1258 1269 ' value' 1259 1270 CALL message( 'check_parameters', 'PA0458', 1, 2, 0, 6, 0 ) … … 1286 1297 dz_soil_center(k) = zs(k+1) - zs(k) 1287 1298 IF ( dz_soil_center(k) == 0.0_wp ) THEN 1288 message_string = 'invalid soil layer configuration found ' // &1299 message_string = 'invalid soil layer configuration found ' // & 1289 1300 '(dz_soil_center(k) = 0.0)' 1290 1301 CALL message( 'lsm_read_restart_data', 'PA0140', 1, 2, 0, 6, 0 ) … … 1363 1374 IF ( horizontal ) THEN 1364 1375 surf => surf_lsm_h 1365 1366 1376 surf_t_surface => t_surface_h 1367 1377 surf_t_surface_p => t_surface_h_p 1368 1378 surf_tt_surface_m => tt_surface_h_m 1369 surf_m_liq => m_liq_h1370 surf_m_liq_p => m_liq_h_p1371 surf_tm_liq_m => tm_liq_h_m1379 surf_m_liq => m_liq_h 1380 surf_m_liq_p => m_liq_h_p 1381 surf_tm_liq_m => tm_liq_h_m 1372 1382 surf_m_soil => m_soil_h 1373 1383 surf_t_soil => t_soil_h … … 1378 1388 ELSE 1379 1389 surf => surf_lsm_v(l) 1380 1381 1390 surf_t_surface => t_surface_v(l) 1382 1391 surf_t_surface_p => t_surface_v_p(l) 1383 1392 surf_tt_surface_m => tt_surface_v_m(l) 1384 surf_m_liq => m_liq_v(l)1385 surf_m_liq_p => m_liq_v_p(l)1386 surf_tm_liq_m => tm_liq_v_m(l)1393 surf_m_liq => m_liq_v(l) 1394 surf_m_liq_p => m_liq_v_p(l) 1395 surf_tm_liq_m => tm_liq_v_m(l) 1387 1396 surf_m_soil => m_soil_v(l) 1388 1397 surf_t_soil => t_soil_v(l) … … 1519 1528 !-- f1: correction for incoming shortwave radiation (stomata close at 1520 1529 !-- night) 1521 f1 = MIN( 1.0_wp, ( 0.004_wp * rad_sw_in(k_rad,j+j_off,i+i_off) + 0.05_wp ) /&1522 (0.81_wp * (0.004_wp * rad_sw_in(k_rad,j+j_off,i+i_off)&1523 1530 f1 = MIN( 1.0_wp, ( 0.004_wp * rad_sw_in(k_rad,j+j_off,i+i_off) & 1531 + 0.05_wp ) / (0.81_wp * (0.004_wp & 1532 * rad_sw_in(k_rad,j+j_off,i+i_off) + 1.0_wp)) ) 1524 1533 ! 1525 1534 !-- f2: correction for soil moisture availability to plants (the … … 1571 1580 1572 1581 1573 f2 = ( surf_m_soil%var_2d(nzb_soil,m) - m_min ) / ( surf%m_fc(nzb_soil,m) - m_min ) 1582 f2 = ( surf_m_soil%var_2d(nzb_soil,m) - m_min ) & 1583 / ( surf%m_fc(nzb_soil,m) - m_min ) 1574 1584 f2 = MAX( f2, 1.0E-20_wp ) 1575 1585 f2 = MIN( f2, 1.0_wp ) … … 1586 1596 IF ( surf%pavement_surface(m) ) THEN 1587 1597 m_liq_max = m_max_depth * 5.0_wp 1588 surf%c_liq(m) = MIN( 1.0_wp, ( 1598 surf%c_liq(m) = MIN( 1.0_wp, (surf_m_liq%var_1d(m) / m_liq_max)**0.67 ) 1589 1599 ELSE 1590 1600 m_liq_max = m_max_depth * ( surf%c_veg(m) * surf%lai(m) & … … 1706 1716 !-- often reached, when no oscillations would occur (causes immense 1707 1717 !-- computing time for the radiation code). 1708 IF ( ABS( surf_t_surface_p%var_1d(m) - surf_t_surface%var_1d(m) ) > 0.2_wp .AND.&1709 unscheduled_radiation_calls ) THEN1718 IF ( ABS( surf_t_surface_p%var_1d(m) - surf_t_surface%var_1d(m) ) & 1719 > 0.2_wp .AND. unscheduled_radiation_calls ) THEN 1710 1720 force_radiation_call_l = .TRUE. 1711 1721 ENDIF … … 1725 1735 ( surf_t_surface_p%var_1d(m) - surf_t_surface%var_1d(m) ) 1726 1736 1727 surf%ghf(m) = lambda_surface * ( surf_t_surface_p%var_1d(m) &1737 surf%ghf(m) = lambda_surface * ( surf_t_surface_p%var_1d(m) & 1728 1738 - surf_t_soil%var_2d(nzb_soil,m) ) 1729 1739 … … 1732 1742 1733 1743 IF ( humidity ) THEN 1734 surf%qsws(m) = - f_qsws * ( qv1 - q_s + dq_s_dt &1744 surf%qsws(m) = - f_qsws * ( qv1 - q_s + dq_s_dt & 1735 1745 * surf_t_surface%var_1d(m) - dq_s_dt * & 1736 1746 surf_t_surface_p%var_1d(m) ) 1737 1747 1738 surf%qsws_veg(m) = - f_qsws_veg * ( qv1 - q_s &1748 surf%qsws_veg(m) = - f_qsws_veg * ( qv1 - q_s & 1739 1749 + dq_s_dt * surf_t_surface%var_1d(m) - dq_s_dt & 1740 1750 * surf_t_surface_p%var_1d(m) ) 1741 1751 1742 surf%qsws_soil(m) = - f_qsws_soil * ( qv1 - q_s &1752 surf%qsws_soil(m) = - f_qsws_soil * ( qv1 - q_s & 1743 1753 + dq_s_dt * surf_t_surface%var_1d(m) - dq_s_dt & 1744 1754 * surf_t_surface_p%var_1d(m) ) 1745 1755 1746 surf%qsws_liq(m) = - f_qsws_liq * ( qv1 - q_s &1756 surf%qsws_liq(m) = - f_qsws_liq * ( qv1 - q_s & 1747 1757 + dq_s_dt * surf_t_surface%var_1d(m) - dq_s_dt & 1748 1758 * surf_t_surface_p%var_1d(m) ) … … 1776 1786 !-- as runoff as qsws_soil is then not used in the soil model 1777 1787 IF ( surf_m_liq%var_1d(m) /= m_liq_max ) THEN 1778 surf%qsws_liq(m) = surf%qsws_liq(m) &1788 surf%qsws_liq(m) = surf%qsws_liq(m) & 1779 1789 + surf%c_veg(m) * prr(k+k_off,j+j_off,i+i_off)& 1780 1790 * hyrho(k+k_off) & 1781 1791 * 0.001_wp * rho_l * l_v 1782 1792 ELSE 1783 surf%qsws_soil(m) = surf%qsws_soil(m) &1793 surf%qsws_soil(m) = surf%qsws_soil(m) & 1784 1794 + surf%c_veg(m) * prr(k+k_off,j+j_off,i+i_off)& 1785 1795 * hyrho(k+k_off) & … … 1789 1799 !-- Add precipitation to bare soil according to the bare soil 1790 1800 !-- coverage. 1791 surf%qsws_soil(m) = surf%qsws_soil(m) + ( 1.0_wp &1801 surf%qsws_soil(m) = surf%qsws_soil(m) + ( 1.0_wp & 1792 1802 - surf%c_veg(m) ) * prr(k+k_off,j+j_off,i+i_off)& 1793 1803 * hyrho(k+k_off) & … … 1822 1832 1823 1833 tend = - surf%qsws_liq(m) * drho_l_lv 1824 surf_m_liq_p%var_1d(m) = surf_m_liq%var_1d(m) + dt_3d * &1834 surf_m_liq_p%var_1d(m) = surf_m_liq%var_1d(m) + dt_3d * & 1825 1835 ( tsc(2) * tend + & 1826 1836 tsc(3) * surf_tm_liq_m%var_1d(m) ) … … 1841 1851 ELSEIF ( intermediate_timestep_count < & 1842 1852 intermediate_timestep_count_max ) THEN 1843 surf_tm_liq_m%var_1d(m) = -9.5625_wp * tend + &1853 surf_tm_liq_m%var_1d(m) = -9.5625_wp * tend + & 1844 1854 5.3125_wp * surf_tm_liq_m%var_1d(m) 1845 1855 ENDIF … … 2404 2414 t_soil_h%var_2d(nzt_soil+1,m) = soil_temperature(nzt_soil+1) 2405 2415 surf_lsm_h%lambda_surface_s(m) = pavement_heat_conduct & 2406 * ddz_soil(nzb_soil) &2416 * ddz_soil(nzb_soil) & 2407 2417 * 2.0_wp 2408 2418 surf_lsm_h%lambda_surface_u(m) = surf_lsm_h%lambda_surface_s(m) 2409 2419 surf_lsm_h%c_surface(m) = pavement_heat_capacity & 2410 * dz_soil(nzb_soil) &2420 * dz_soil(nzb_soil) & 2411 2421 * 0.25_wp 2412 2422 surf_lsm_h%lambda_h_def(m) = pavement_heat_conduct … … 2455 2465 2456 2466 surf_lsm_h%us(m) = 0.1_wp 2457 surf_lsm_h%ts(m) = ( pt1 - surf_lsm_h%pt_surface(m) ) / surf_lsm_h%r_a(m) 2458 surf_lsm_h%shf(m) = - surf_lsm_h%us(m) * surf_lsm_h%ts(m) * rho_surface 2467 surf_lsm_h%ts(m) = ( pt1 - surf_lsm_h%pt_surface(m) ) & 2468 / surf_lsm_h%r_a(m) 2469 surf_lsm_h%shf(m) = - surf_lsm_h%us(m) * surf_lsm_h%ts(m) & 2470 * rho_surface 2459 2471 2460 2472 ENDDO … … 2491 2503 ENDDO 2492 2504 t_soil_v(l)%var_2d(nzt_soil+1,m) = soil_temperature(nzt_soil+1) 2493 surf_lsm_v(l)%lambda_surface_s(m) = pavement_heat_conduct 2494 * ddz_soil(nzb_soil) &2505 surf_lsm_v(l)%lambda_surface_s(m) = pavement_heat_conduct & 2506 * ddz_soil(nzb_soil) & 2495 2507 * 2.0_wp 2496 2508 surf_lsm_v(l)%lambda_surface_u(m) = surf_lsm_v(l)%lambda_surface_s(m) 2497 2509 surf_lsm_v(l)%c_surface(m) = pavement_heat_capacity & 2498 * dz_soil(nzb_soil) &2510 * dz_soil(nzb_soil) & 2499 2511 * 0.25_wp 2500 2512 surf_lsm_v(l)%lambda_h_def(m) = pavement_heat_conduct … … 2765 2777 ! 2766 2778 !-- Horizontal surfaces 2767 ALLOCATE ( m_liq_h%var_1d(1:surf_lsm_h%ns) )2768 ALLOCATE ( m_liq_h_p%var_1d(1:surf_lsm_h%ns) )2779 ALLOCATE ( m_liq_h%var_1d(1:surf_lsm_h%ns) ) 2780 ALLOCATE ( m_liq_h_p%var_1d(1:surf_lsm_h%ns) ) 2769 2781 ALLOCATE ( t_surface_h%var_1d(1:surf_lsm_h%ns) ) 2770 2782 ALLOCATE ( t_surface_h_p%var_1d(1:surf_lsm_h%ns) ) … … 2777 2789 !-- Vertical surfaces 2778 2790 DO l = 0, 3 2779 ALLOCATE ( m_liq_v(l)%var_1d(1:surf_lsm_v(l)%ns) )2780 ALLOCATE ( m_liq_v_p(l)%var_1d(1:surf_lsm_v(l)%ns) )2791 ALLOCATE ( m_liq_v(l)%var_1d(1:surf_lsm_v(l)%ns) ) 2792 ALLOCATE ( m_liq_v_p(l)%var_1d(1:surf_lsm_v(l)%ns) ) 2781 2793 ALLOCATE ( t_surface_v(l)%var_1d(1:surf_lsm_v(l)%ns) ) 2782 2794 ALLOCATE ( t_surface_v_p(l)%var_1d(1:surf_lsm_v(l)%ns) ) … … 2789 2801 ! 2790 2802 !-- Horizontal surfaces 2791 ALLOCATE ( m_liq_h_1%var_1d(1:surf_lsm_h%ns) )2792 ALLOCATE ( m_liq_h_2%var_1d(1:surf_lsm_h%ns) )2803 ALLOCATE ( m_liq_h_1%var_1d(1:surf_lsm_h%ns) ) 2804 ALLOCATE ( m_liq_h_2%var_1d(1:surf_lsm_h%ns) ) 2793 2805 ALLOCATE ( t_surface_h_1%var_1d(1:surf_lsm_h%ns) ) 2794 2806 ALLOCATE ( t_surface_h_2%var_1d(1:surf_lsm_h%ns) ) … … 2800 2812 !-- Vertical surfaces 2801 2813 DO l = 0, 3 2802 ALLOCATE ( m_liq_v_1(l)%var_1d(1:surf_lsm_v(l)%ns) )2803 ALLOCATE ( m_liq_v_2(l)%var_1d(1:surf_lsm_v(l)%ns) )2814 ALLOCATE ( m_liq_v_1(l)%var_1d(1:surf_lsm_v(l)%ns) ) 2815 ALLOCATE ( m_liq_v_2(l)%var_1d(1:surf_lsm_v(l)%ns) ) 2804 2816 ALLOCATE ( t_surface_v_1(l)%var_1d(1:surf_lsm_v(l)%ns) ) 2805 2817 ALLOCATE ( t_surface_v_2(l)%var_1d(1:surf_lsm_v(l)%ns) ) … … 2814 2826 !-- Allocate intermediate timestep arrays 2815 2827 !-- Horizontal surfaces 2816 ALLOCATE ( tm_liq_h_m%var_1d(1:surf_lsm_h%ns) )2828 ALLOCATE ( tm_liq_h_m%var_1d(1:surf_lsm_h%ns) ) 2817 2829 ALLOCATE ( tt_surface_h_m%var_1d(1:surf_lsm_h%ns) ) 2818 2830 ALLOCATE ( tm_soil_h_m%var_2d(nzb_soil:nzt_soil,1:surf_lsm_h%ns) ) … … 2821 2833 !-- Horizontal surfaces 2822 2834 DO l = 0, 3 2823 ALLOCATE ( tm_liq_v_m(l)%var_1d(1:surf_lsm_v(l)%ns) )2835 ALLOCATE ( tm_liq_v_m(l)%var_1d(1:surf_lsm_v(l)%ns) ) 2824 2836 ALLOCATE ( tt_surface_v_m(l)%var_1d(1:surf_lsm_v(l)%ns) ) 2825 2837 ALLOCATE ( tm_soil_v_m(l)%var_2d(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns) ) … … 2873 2885 ALLOCATE ( surf_lsm_v(l)%c_veg(1:surf_lsm_v(l)%ns) ) 2874 2886 ALLOCATE ( surf_lsm_v(l)%f_sw_in(1:surf_lsm_v(l)%ns) ) 2875 ALLOCATE ( surf_lsm_v(l)%ghf(1:surf_lsm_v(l)%ns) 2887 ALLOCATE ( surf_lsm_v(l)%ghf(1:surf_lsm_v(l)%ns) ) 2876 2888 ALLOCATE ( surf_lsm_v(l)%g_d(1:surf_lsm_v(l)%ns) ) 2877 2889 ALLOCATE ( surf_lsm_v(l)%lai(1:surf_lsm_v(l)%ns) ) … … 2907 2919 t_surface_h => t_surface_h_1; t_surface_h_p => t_surface_h_2 2908 2920 m_soil_h => m_soil_h_1; m_soil_h_p => m_soil_h_2 2909 m_liq_h => m_liq_h_1; m_liq_h_p=> m_liq_h_22921 m_liq_h => m_liq_h_1; m_liq_h_p => m_liq_h_2 2910 2922 ! 2911 2923 !-- Vertical surfaces … … 2913 2925 t_surface_v => t_surface_v_1; t_surface_v_p => t_surface_v_2 2914 2926 m_soil_v => m_soil_v_1; m_soil_v_p => m_soil_v_2 2915 m_liq_v => m_liq_v_1; m_liq_v_p=> m_liq_v_22927 m_liq_v => m_liq_v_1; m_liq_v_p => m_liq_v_2 2916 2928 #endif 2917 2929 … … 3029 3041 IF ( horizontal ) THEN 3030 3042 surf => surf_lsm_h 3031 3032 3043 surf_m_soil => m_soil_h 3033 3044 surf_m_soil_p => m_soil_h_p … … 3038 3049 ELSE 3039 3050 surf => surf_lsm_v(l) 3040 3041 3051 surf_m_soil => m_soil_v(l) 3042 3052 surf_m_soil_p => m_soil_v_p(l) … … 3061 3071 !-- Calculate volumetric heat capacity of the soil, taking 3062 3072 !-- into account water content 3063 surf%rho_c_total(k,m) = (rho_c_soil * &3064 ( 1.0_wp - surf%m_sat(k,m) ) &3073 surf%rho_c_total(k,m) = (rho_c_soil * & 3074 ( 1.0_wp - surf%m_sat(k,m) ) & 3065 3075 + rho_c_water * surf_m_soil%var_2d(k,m) ) 3066 3076 … … 3068 3078 !-- Calculate soil heat conductivity at the center of the soil 3069 3079 !-- layers 3070 lambda_h_sat = lambda_h_sm**(1.0_wp - surf%m_sat(k,m)) * 3080 lambda_h_sat = lambda_h_sm**(1.0_wp - surf%m_sat(k,m)) * & 3071 3081 lambda_h_water ** surf_m_soil%var_2d(k,m) 3072 3082 … … 3087 3097 .AND. zs(k+1) > pavement_depth ) & 3088 3098 THEN 3089 surf%lambda_h(k,m) = ( pavement_depth - zs(k) ) * ddz_soil_center(k+1)&3090 * lambda_temp(k)&3091 + ( zs(k+1) - pavement_depth ) * ddz_soil_center(k+1)&3092 * lambda_temp(k+1)3099 surf%lambda_h(k,m) = ( pavement_depth - zs(k) ) & 3100 * ddz_soil_center(k+1) * lambda_temp(k) & 3101 + ( zs(k+1) - pavement_depth ) & 3102 * ddz_soil_center(k+1) * lambda_temp(k+1) 3093 3103 ELSE 3094 3104 surf%lambda_h(k,m) = ( lambda_temp(k+1) + lambda_temp(k) ) & … … 3103 3113 tend(:) = 0.0_wp 3104 3114 3105 tend(nzb_soil) = ( 1.0_wp / surf%rho_c_total(nzb_soil,m) ) * & 3106 ( surf%lambda_h(nzb_soil,m) * ( surf_t_soil%var_2d(nzb_soil+1,m) & 3107 - surf_t_soil%var_2d(nzb_soil,m) ) * ddz_soil_center(nzb_soil) & 3108 + surf%ghf(m) ) * ddz_soil(nzb_soil) 3115 tend(nzb_soil) = ( 1.0_wp / surf%rho_c_total(nzb_soil,m) ) * & 3116 ( surf%lambda_h(nzb_soil,m) & 3117 * ( surf_t_soil%var_2d(nzb_soil+1,m) & 3118 - surf_t_soil%var_2d(nzb_soil,m) ) & 3119 * ddz_soil_center(nzb_soil) + surf%ghf(m) ) & 3120 * ddz_soil(nzb_soil) 3109 3121 3110 3122 DO k = nzb_soil+1, nzt_soil 3111 tend(k) = ( 1.0_wp / surf%rho_c_total(k,m) ) & 3112 * ( surf%lambda_h(k,m) & 3113 * ( surf_t_soil%var_2d(k+1,m) - surf_t_soil%var_2d(k,m) ) & 3114 * ddz_soil_center(k) & 3115 - surf%lambda_h(k-1,m) & 3116 * ( surf_t_soil%var_2d(k,m) - surf_t_soil%var_2d(k-1,m) ) & 3117 * ddz_soil_center(k-1) & 3118 ) * ddz_soil(k) 3119 3120 ENDDO 3121 3122 surf_t_soil_p%var_2d(nzb_soil:nzt_soil,m) = surf_t_soil%var_2d(nzb_soil:nzt_soil,m) & 3123 + dt_3d * ( tsc(2) & 3124 * tend(nzb_soil:nzt_soil) & 3125 + tsc(3) & 3126 * surf_tt_soil_m%var_2d(nzb_soil:nzt_soil,m) ) 3123 tend(k) = ( 1.0_wp / surf%rho_c_total(k,m) ) & 3124 * ( surf%lambda_h(k,m) & 3125 * ( surf_t_soil%var_2d(k+1,m) - surf_t_soil%var_2d(k,m) ) & 3126 * ddz_soil_center(k) - surf%lambda_h(k-1,m) & 3127 * ( surf_t_soil%var_2d(k,m) - surf_t_soil%var_2d(k-1,m) ) & 3128 * ddz_soil_center(k-1) ) * ddz_soil(k) 3129 3130 ENDDO 3131 3132 surf_t_soil_p%var_2d(nzb_soil:nzt_soil,m) = & 3133 surf_t_soil%var_2d(nzb_soil:nzt_soil,m) & 3134 + dt_3d * ( tsc(2) & 3135 * tend(nzb_soil:nzt_soil) + tsc(3) & 3136 * surf_tt_soil_m%var_2d(nzb_soil:nzt_soil,m) ) 3127 3137 3128 3138 ! … … 3136 3146 intermediate_timestep_count_max ) THEN 3137 3147 DO k = nzb_soil, nzt_soil 3138 surf_tt_soil_m%var_2d(k,m) = -9.5625_wp * tend(k) + 5.3125_wp & 3139 * surf_tt_soil_m%var_2d(k,m) 3148 surf_tt_soil_m%var_2d(k,m) = -9.5625_wp * tend(k) & 3149 + 5.3125_wp & 3150 * surf_tt_soil_m%var_2d(k,m) 3140 3151 ENDDO 3141 3152 ENDIF … … 3148 3159 !-- Calculate soil diffusivity at the center of the soil layers 3149 3160 lambda_temp(k) = (- b_ch * surf%gamma_w_sat(k,m) * psi_sat & 3150 / surf%m_sat(k,m) ) * ( MAX( surf_m_soil%var_2d(k,m), & 3151 surf%m_wilt(k,m) ) / surf%m_sat(k,m) )**(& 3152 b_ch + 2.0_wp ) 3161 / surf%m_sat(k,m) ) * ( & 3162 MAX( surf_m_soil%var_2d(k,m), & 3163 surf%m_wilt(k,m) ) / surf%m_sat(k,m) )**( & 3164 b_ch + 2.0_wp ) 3153 3165 3154 3166 ! 3155 3167 !-- Parametrization of Van Genuchten 3156 3168 !-- Calculate the hydraulic conductivity after Van Genuchten (1980) 3157 h_vg = ( ( ( surf%m_res(k,m) - surf%m_sat(k,m) ) / & 3158 ( surf%m_res(k,m) - & 3159 MAX( surf_m_soil%var_2d(k,m), surf%m_wilt(k,m) ) & 3160 ) & 3161 )**( & 3162 surf%n_vg(k,m) / ( surf%n_vg(k,m) - 1.0_wp ) & 3163 ) - 1.0_wp & 3169 h_vg = ( ( ( surf%m_res(k,m) - surf%m_sat(k,m) ) / & 3170 ( surf%m_res(k,m) - & 3171 MAX( surf_m_soil%var_2d(k,m), surf%m_wilt(k,m) ) & 3172 ) & 3173 )**( surf%n_vg(k,m) / ( surf%n_vg(k,m) - 1.0_wp ) & 3174 ) - 1.0_wp & 3164 3175 )**( 1.0_wp / surf%n_vg(k,m) ) / surf%alpha_vg(k,m) 3165 3176 3166 gamma_temp(k) = surf%gamma_w_sat(k,m) * ( ( ( 1.0_wp + & 3167 ( surf%alpha_vg(k,m) * h_vg )**surf%n_vg(k,m)& 3168 )**( & 3169 1.0_wp - 1.0_wp / surf%n_vg(k,m)) - ( & 3170 surf%alpha_vg(k,m) * h_vg )**( surf%n_vg(k,m)& 3171 - 1.0_wp) )**2 ) & 3172 / ( ( 1.0_wp + ( surf%alpha_vg(k,m) * h_vg & 3173 )**surf%n_vg(k,m) )**( ( 1.0_wp - 1.0_wp & 3174 / surf%n_vg(k,m) ) * & 3175 ( surf%l_vg(k,m) + 2.0_wp) ) ) 3177 gamma_temp(k) = surf%gamma_w_sat(k,m) * ( ( ( 1.0_wp + & 3178 ( surf%alpha_vg(k,m) * h_vg )**surf%n_vg(k,m) & 3179 )**( 1.0_wp - 1.0_wp / surf%n_vg(k,m) ) & 3180 - ( surf%alpha_vg(k,m) * h_vg )**( surf%n_vg(k,m) & 3181 - 1.0_wp) )**2 ) / ( ( 1.0_wp + ( surf%alpha_vg(k,m) & 3182 * h_vg )**surf%n_vg(k,m) )**( ( 1.0_wp - 1.0_wp & 3183 / surf%n_vg(k,m) ) * ( surf%l_vg(k,m) + 2.0_wp) ) ) 3176 3184 3177 3185 ENDDO … … 3198 3206 DO k = nzb_soil, nzt_soil-1 3199 3207 3200 surf%lambda_w(k,m) = ( lambda_temp(k+1) + &3208 surf%lambda_w(k,m) = ( lambda_temp(k+1) + & 3201 3209 lambda_temp(k) ) * 0.5_wp 3202 surf%gamma_w(k,m) = ( gamma_temp(k+1) + &3210 surf%gamma_w(k,m) = ( gamma_temp(k+1) + & 3203 3211 gamma_temp(k) ) * 0.5_wp 3204 3212 … … 3232 3240 DO k = nzb_soil, nzt_soil 3233 3241 IF ( surf_m_soil%var_2d(k,m) > surf%m_wilt(k,m) ) THEN 3234 m_total = m_total + surf%root_fr(k,m) * surf_m_soil%var_2d(k,m) 3242 m_total = m_total + surf%root_fr(k,m) & 3243 * surf_m_soil%var_2d(k,m) 3235 3244 ENDIF 3236 3245 ENDDO … … 3238 3247 DO k = nzb_soil, nzt_soil 3239 3248 IF ( surf_m_soil%var_2d(k,m) > surf%m_wilt(k,m) ) THEN 3240 root_extr(k) = surf%root_fr(k,m) * surf_m_soil%var_2d(k,m)&3241 3249 root_extr(k) = surf%root_fr(k,m) & 3250 * surf_m_soil%var_2d(k,m) / m_total 3242 3251 ELSE 3243 3252 root_extr(k) = 0.0_wp … … 3249 3258 tend(:) = 0.0_wp 3250 3259 3251 tend(nzb_soil) = ( surf%lambda_w(nzb_soil,m) * ( &3252 surf_m_soil%var_2d(nzb_soil+1,m) - surf_m_soil%var_2d(nzb_soil,m) )&3253 * ddz_soil_center(nzb_soil) - surf%gamma_w(nzb_soil,m) -&3254 (&3255 root_extr(nzb_soil) * surf%qsws_veg(m)&3256 + surf%qsws_soil(m) ) * drho_l_lv ) &3260 tend(nzb_soil) = ( surf%lambda_w(nzb_soil,m) * ( & 3261 surf_m_soil%var_2d(nzb_soil+1,m) & 3262 - surf_m_soil%var_2d(nzb_soil,m) ) & 3263 * ddz_soil_center(nzb_soil) - surf%gamma_w(nzb_soil,m)& 3264 - ( root_extr(nzb_soil) * surf%qsws_veg(m) & 3265 + surf%qsws_soil(m) ) * drho_l_lv ) & 3257 3266 * ddz_soil(nzb_soil) 3258 3267 3259 3268 DO k = nzb_soil+1, nzt_soil-1 3260 tend(k) = ( surf%lambda_w(k,m) * ( surf_m_soil%var_2d(k+1,m) 3261 - surf_m_soil%var_2d(k,m) ) * ddz_soil_center(k) 3262 - surf%gamma_w(k,m) &3263 - surf%lambda_w(k-1,m) * ( surf_m_soil%var_2d(k,m) -&3264 surf_m_soil%var_2d(k-1,m)) * ddz_soil_center(k-1)&3265 + surf%gamma_w(k-1,m) - (root_extr(k) &3266 * surf%qsws_veg(m) * drho_l_lv) &3269 tend(k) = ( surf%lambda_w(k,m) * ( surf_m_soil%var_2d(k+1,m) & 3270 - surf_m_soil%var_2d(k,m) ) * ddz_soil_center(k) & 3271 - surf%gamma_w(k,m) & 3272 - surf%lambda_w(k-1,m) * ( surf_m_soil%var_2d(k,m) & 3273 - surf_m_soil%var_2d(k-1,m)) * ddz_soil_center(k-1) & 3274 + surf%gamma_w(k-1,m) - (root_extr(k) & 3275 * surf%qsws_veg(m) * drho_l_lv) & 3267 3276 ) * ddz_soil(k) 3268 3277 ENDDO 3269 tend(nzt_soil) = ( - surf%gamma_w(nzt_soil,m) &3270 - surf%lambda_w(nzt_soil-1,m)&3271 * ( surf_m_soil%var_2d(nzt_soil,m)&3272 - surf_m_soil%var_2d(nzt_soil-1,m))&3273 * ddz_soil_center(nzt_soil-1)&3274 + surf%gamma_w(nzt_soil-1,m) - (&3275 root_extr(nzt_soil)&3276 * surf%qsws_veg(m) * drho_l_lv )&3278 tend(nzt_soil) = ( - surf%gamma_w(nzt_soil,m) & 3279 - surf%lambda_w(nzt_soil-1,m) & 3280 * ( surf_m_soil%var_2d(nzt_soil,m) & 3281 - surf_m_soil%var_2d(nzt_soil-1,m)) & 3282 * ddz_soil_center(nzt_soil-1) & 3283 + surf%gamma_w(nzt_soil-1,m) - ( & 3284 root_extr(nzt_soil) & 3285 * surf%qsws_veg(m) * drho_l_lv ) & 3277 3286 ) * ddz_soil(nzt_soil) 3278 3287 3279 surf_m_soil_p%var_2d(nzb_soil:nzt_soil,m) = surf_m_soil%var_2d(nzb_soil:nzt_soil,m) & 3280 + dt_3d * ( tsc(2) * tend(:) & 3281 + tsc(3) * surf_tm_soil_m%var_2d(:,m) ) 3288 surf_m_soil_p%var_2d(nzb_soil:nzt_soil,m) = & 3289 surf_m_soil%var_2d(nzb_soil:nzt_soil,m) & 3290 + dt_3d * ( tsc(2) * tend(:) & 3291 + tsc(3) * surf_tm_soil_m%var_2d(:,m) ) 3282 3292 3283 3293 ! … … 3297 3307 intermediate_timestep_count_max ) THEN 3298 3308 DO k = nzb_soil, nzt_soil 3299 surf_tm_soil_m%var_2d(k,m) = -9.5625_wp * tend(k) + 5.3125_wp & 3300 * surf_tm_soil_m%var_2d(k,m) 3309 surf_tm_soil_m%var_2d(k,m) = -9.5625_wp * tend(k) & 3310 + 5.3125_wp & 3311 * surf_tm_soil_m%var_2d(k,m) 3301 3312 ENDDO 3302 3313 ENDIF … … 3350 3361 t_soil_h => t_soil_h_1; t_soil_h_p => t_soil_h_2 3351 3362 IF ( humidity ) THEN 3352 m_soil_h => m_soil_h_1; m_soil_h_p=> m_soil_h_23353 m_liq_h => m_liq_h_1; m_liq_h_p=> m_liq_h_23363 m_soil_h => m_soil_h_1; m_soil_h_p => m_soil_h_2 3364 m_liq_h => m_liq_h_1; m_liq_h_p => m_liq_h_2 3354 3365 ENDIF 3355 3366 ! … … 3358 3369 t_soil_v => t_soil_v_1; t_soil_v_p => t_soil_v_2 3359 3370 IF ( humidity ) THEN 3360 m_soil_v => m_soil_v_1; m_soil_v_p=> m_soil_v_23361 m_liq_v => m_liq_v_1; m_liq_v_p=> m_liq_v_23371 m_soil_v => m_soil_v_1; m_soil_v_p => m_soil_v_2 3372 m_liq_v => m_liq_v_1; m_liq_v_p => m_liq_v_2 3362 3373 ENDIF 3363 3374 … … 3370 3381 t_soil_h => t_soil_h_2; t_soil_h_p => t_soil_h_1 3371 3382 IF ( humidity ) THEN 3372 m_soil_h => m_soil_h_2; m_soil_h_p=> m_soil_h_13373 m_liq_h => m_liq_h_2; m_liq_h_p=> m_liq_h_13383 m_soil_h => m_soil_h_2; m_soil_h_p => m_soil_h_1 3384 m_liq_h => m_liq_h_2; m_liq_h_p => m_liq_h_1 3374 3385 ENDIF 3375 3386 ! … … 3378 3389 t_soil_v => t_soil_v_2; t_soil_v_p => t_soil_v_1 3379 3390 IF ( humidity ) THEN 3380 m_soil_v => m_soil_v_2; m_soil_v_p=> m_soil_v_13381 m_liq_v => m_liq_v_2; m_liq_v_p=> m_liq_v_13391 m_soil_v => m_soil_v_2; m_soil_v_p => m_soil_v_1 3392 m_liq_v => m_liq_v_2; m_liq_v_p => m_liq_v_1 3382 3393 ENDIF 3383 3394 … … 3561 3572 i = surf_lsm_h%i(m) 3562 3573 j = surf_lsm_h%j(m) 3563 qsws_liq_av(j,i) = qsws_liq_av(j,i) + &3574 qsws_liq_av(j,i) = qsws_liq_av(j,i) + & 3564 3575 surf_lsm_h%qsws_liq(m) 3565 3576 ENDDO … … 3569 3580 i = surf_lsm_h%i(m) 3570 3581 j = surf_lsm_h%j(m) 3571 qsws_soil_av(j,i) = qsws_soil_av(j,i) + &3582 qsws_soil_av(j,i) = qsws_soil_av(j,i) + & 3572 3583 surf_lsm_h%qsws_soil(m) 3573 3584 ENDDO … … 3577 3588 i = surf_lsm_h%i(m) 3578 3589 j = surf_lsm_h%j(m) 3579 qsws_veg_av(j,i) = qsws_veg_av(j,i) + &3590 qsws_veg_av(j,i) = qsws_veg_av(j,i) + & 3580 3591 surf_lsm_h%qsws_veg(m) 3581 3592 ENDDO … … 3616 3627 DO i = nxl, nxr 3617 3628 DO j = nys, nyn 3618 c_liq_av(j,i) = c_liq_av(j,i) / REAL( average_count_3d, KIND=wp ) 3629 c_liq_av(j,i) = c_liq_av(j,i) & 3630 / REAL( average_count_3d, KIND=wp ) 3619 3631 ENDDO 3620 3632 ENDDO … … 3623 3635 DO i = nxl, nxr 3624 3636 DO j = nys, nyn 3625 c_soil_av(j,i) = c_soil_av(j,i) / REAL( average_count_3d, KIND=wp ) 3637 c_soil_av(j,i) = c_soil_av(j,i) & 3638 / REAL( average_count_3d, KIND=wp ) 3626 3639 ENDDO 3627 3640 ENDDO … … 3630 3643 DO i = nxl, nxr 3631 3644 DO j = nys, nyn 3632 c_veg_av(j,i) = c_veg_av(j,i) / REAL( average_count_3d, KIND=wp ) 3645 c_veg_av(j,i) = c_veg_av(j,i) & 3646 / REAL( average_count_3d, KIND=wp ) 3633 3647 ENDDO 3634 3648 ENDDO … … 3637 3651 DO i = nxl, nxr 3638 3652 DO j = nys, nyn 3639 ghf_av(j,i) = ghf_av(j,i) / REAL( average_count_3d, KIND=wp ) 3653 ghf_av(j,i) = ghf_av(j,i) & 3654 / REAL( average_count_3d, KIND=wp ) 3640 3655 ENDDO 3641 3656 ENDDO … … 3644 3659 DO i = nxl, nxr 3645 3660 DO j = nys, nyn 3646 lai_av(j,i) = lai_av(j,i) / REAL( average_count_3d, KIND=wp ) 3661 lai_av(j,i) = lai_av(j,i) & 3662 / REAL( average_count_3d, KIND=wp ) 3647 3663 ENDDO 3648 3664 ENDDO … … 3651 3667 DO i = nxl, nxr 3652 3668 DO j = nys, nyn 3653 m_liq_av(j,i) = m_liq_av(j,i) / REAL( average_count_3d, KIND=wp ) 3669 m_liq_av(j,i) = m_liq_av(j,i) & 3670 / REAL( average_count_3d, KIND=wp ) 3654 3671 ENDDO 3655 3672 ENDDO … … 3659 3676 DO j = nys, nyn 3660 3677 DO k = nzb_soil, nzt_soil 3661 m_soil_av(k,j,i) = m_soil_av(k,j,i) / REAL( average_count_3d, KIND=wp ) 3678 m_soil_av(k,j,i) = m_soil_av(k,j,i) & 3679 / REAL( average_count_3d, KIND=wp ) 3662 3680 ENDDO 3663 3681 ENDDO … … 3667 3685 DO i = nxl, nxr 3668 3686 DO j = nys, nyn 3669 qsws_liq_av(j,i) = qsws_liq_av(j,i) / REAL( average_count_3d, KIND=wp ) 3687 qsws_liq_av(j,i) = qsws_liq_av(j,i) & 3688 / REAL( average_count_3d, KIND=wp ) 3670 3689 ENDDO 3671 3690 ENDDO … … 3674 3693 DO i = nxl, nxr 3675 3694 DO j = nys, nyn 3676 qsws_soil_av(j,i) = qsws_soil_av(j,i) / REAL( average_count_3d, KIND=wp ) 3695 qsws_soil_av(j,i) = qsws_soil_av(j,i) & 3696 / REAL( average_count_3d, KIND=wp ) 3677 3697 ENDDO 3678 3698 ENDDO … … 3681 3701 DO i = nxl, nxr 3682 3702 DO j = nys, nyn 3683 qsws_veg_av(j,i) = qsws_veg_av(j,i) / REAL( average_count_3d, KIND=wp ) 3703 qsws_veg_av(j,i) = qsws_veg_av(j,i) & 3704 / REAL( average_count_3d, KIND=wp ) 3684 3705 ENDDO 3685 3706 ENDDO … … 3703 3724 DO j = nys, nyn 3704 3725 DO k = nzb_soil, nzt_soil 3705 t_soil_av(k,j,i) = t_soil_av(k,j,i) / REAL( average_count_3d, KIND=wp ) 3726 t_soil_av(k,j,i) = t_soil_av(k,j,i) & 3727 / REAL( average_count_3d, KIND=wp ) 3706 3728 ENDDO 3707 3729 ENDDO … … 4239 4261 4240 4262 REAL(wp), & 4241 DIMENSION(nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) :: &4263 DIMENSION(nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) :: & 4242 4264 tmp_2d !< 4243 4265 4244 4266 REAL(wp), & 4245 DIMENSION(nzb_soil:nzt_soil+1,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) :: &4267 DIMENSION(nzb_soil:nzt_soil+1,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) :: & 4246 4268 tmp_3d !< 4247 4269 4248 4270 REAL(wp), & 4249 DIMENSION(nzb_soil:nzt_soil,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) :: &4271 DIMENSION(nzb_soil:nzt_soil,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) :: & 4250 4272 tmp_3d2 !< 4251 4273 4252 4274 REAL(wp), & 4253 DIMENSION(1:surf_lsm_h%ns) :: &4275 DIMENSION(1:surf_lsm_h%ns) :: & 4254 4276 tmp_walltype_1d !< 4255 4277 4256 4278 REAL(wp), & 4257 DIMENSION(nzb_soil:nzt_soil+1,1:surf_lsm_h%ns) :: &4279 DIMENSION(nzb_soil:nzt_soil+1,1:surf_lsm_h%ns) :: & 4258 4280 tmp_walltype_2d !< 4259 4281 4260 4282 REAL(wp), & 4261 DIMENSION(nzb_soil:nzt_soil,1:surf_lsm_h%ns) :: &4283 DIMENSION(nzb_soil:nzt_soil,1:surf_lsm_h%ns) :: & 4262 4284 tmp_walltype_2d2 !< 4263 4285 … … 4332 4354 ENDIF 4333 4355 IF ( k == 1 ) READ ( 13 ) tmp_2d 4334 m_liq_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = &4356 m_liq_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 4335 4357 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 4336 4358 … … 4354 4376 ENDIF 4355 4377 IF ( k == 1 ) READ ( 13 ) tmp_2d 4356 qsws_liq_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = &4378 qsws_liq_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 4357 4379 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 4358 4380 CASE ( 'qsws_soil_av' ) … … 4361 4383 ENDIF 4362 4384 IF ( k == 1 ) READ ( 13 ) tmp_2d 4363 qsws_soil_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = &4385 qsws_soil_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 4364 4386 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 4365 4387 … … 4369 4391 ENDIF 4370 4392 IF ( k == 1 ) READ ( 13 ) tmp_2d 4371 qsws_veg_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = &4393 qsws_veg_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 4372 4394 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 4373 4395
Note: See TracChangeset
for help on using the changeset viewer.