Changeset 1972 for palm/trunk/SOURCE/land_surface_model_mod.f90
- Timestamp:
- Jul 26, 2016 7:52:02 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/land_surface_model_mod.f90
r1967 r1972 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! Further modularization: output of cross sections and 3D data is now done in this 22 ! module. Moreover, restart data is written and read directly within this module. 23 ! 22 24 ! 23 25 ! Former revisions: … … 549 551 !-- Public functions 550 552 PUBLIC lsm_check_data_output, lsm_check_data_output_pr, & 551 lsm_check_parameters, lsm_energy_balance, lsm_header, lsm_init, & 552 lsm_init_arrays, lsm_parin, lsm_soil_model, lsm_swap_timelevel 553 lsm_check_parameters, lsm_define_netcdf_grid, lsm_3d_data_averaging,& 554 lsm_data_output_2d, lsm_data_output_3d, lsm_energy_balance, & 555 lsm_header, lsm_init, lsm_init_arrays, lsm_parin, lsm_soil_model, & 556 lsm_swap_timelevel, lsm_read_restart_data, lsm_last_actions 553 557 ! 554 558 !-- Public parameters, constants and initial values … … 561 565 ! 562 566 !-- Public 2D output variables 563 PUBLIC c_liq, c_liq_av, c_soil_av, c_veg, c_veg_av, ghf_eb, ghf_eb_av, & 564 lai, lai_av, qsws_eb, qsws_eb_av, qsws_liq_eb, qsws_liq_eb_av, & 565 qsws_soil_eb, qsws_soil_eb_av, qsws_veg_eb, qsws_veg_eb_av, & 566 r_a, r_a_av, r_s, r_s_av, shf_eb, shf_eb_av 567 PUBLIC ghf_eb, qsws_eb, qsws_liq_eb, qsws_soil_eb,qsws_veg_eb, r_a, r_s, & 568 shf_eb 567 569 568 570 ! 569 571 !-- Public prognostic variables 570 PUBLIC m_ liq_eb, m_liq_eb_av, m_soil, m_soil_av, t_soil, t_soil_av572 PUBLIC m_soil, t_soil 571 573 572 574 … … 583 585 END INTERFACE lsm_check_parameters 584 586 587 INTERFACE lsm_3d_data_averaging 588 MODULE PROCEDURE lsm_3d_data_averaging 589 END INTERFACE lsm_3d_data_averaging 590 591 INTERFACE lsm_data_output_2d 592 MODULE PROCEDURE lsm_data_output_2d 593 END INTERFACE lsm_data_output_2d 594 595 INTERFACE lsm_data_output_3d 596 MODULE PROCEDURE lsm_data_output_3d 597 END INTERFACE lsm_data_output_3d 598 599 INTERFACE lsm_define_netcdf_grid 600 MODULE PROCEDURE lsm_define_netcdf_grid 601 END INTERFACE lsm_define_netcdf_grid 602 585 603 INTERFACE lsm_energy_balance 586 604 MODULE PROCEDURE lsm_energy_balance … … 611 629 END INTERFACE lsm_swap_timelevel 612 630 631 INTERFACE lsm_read_restart_data 632 MODULE PROCEDURE lsm_read_restart_data 633 END INTERFACE lsm_read_restart_data 634 635 636 INTERFACE lsm_last_actions 637 MODULE PROCEDURE lsm_last_actions 638 END INTERFACE lsm_last_actions 639 613 640 CONTAINS 614 641 … … 627 654 628 655 CHARACTER (LEN=*) :: unit !< 629 CHARACTER (LEN=*) :: var 656 CHARACTER (LEN=*) :: var !< 630 657 631 658 INTEGER(iwp) :: i … … 2415 2442 2416 2443 2444 2445 2446 !------------------------------------------------------------------------------! 2447 ! 2448 ! Description: 2449 ! ------------ 2450 !> Soubroutine for averaging 3D data 2451 !------------------------------------------------------------------------------! 2452 SUBROUTINE lsm_3d_data_averaging( mode, variable ) 2453 2454 2455 USE control_parameters 2456 2457 USE indices 2458 2459 USE kinds 2460 2461 IMPLICIT NONE 2462 2463 CHARACTER (LEN=*) :: mode !< 2464 CHARACTER (LEN=*) :: variable !< 2465 2466 INTEGER(iwp) :: i !< 2467 INTEGER(iwp) :: j !< 2468 INTEGER(iwp) :: k !< 2469 2470 IF ( mode == 'allocate' ) THEN 2471 2472 SELECT CASE ( TRIM( variable ) ) 2473 2474 CASE ( 'c_liq*' ) 2475 IF ( .NOT. ALLOCATED( c_liq_av ) ) THEN 2476 ALLOCATE( c_liq_av(nysg:nyng,nxlg:nxrg) ) 2477 ENDIF 2478 c_liq_av = 0.0_wp 2479 2480 CASE ( 'c_soil*' ) 2481 IF ( .NOT. ALLOCATED( c_soil_av ) ) THEN 2482 ALLOCATE( c_soil_av(nysg:nyng,nxlg:nxrg) ) 2483 ENDIF 2484 c_soil_av = 0.0_wp 2485 2486 CASE ( 'c_veg*' ) 2487 IF ( .NOT. ALLOCATED( c_veg_av ) ) THEN 2488 ALLOCATE( c_veg_av(nysg:nyng,nxlg:nxrg) ) 2489 ENDIF 2490 c_veg_av = 0.0_wp 2491 2492 CASE ( 'ghf_eb*' ) 2493 IF ( .NOT. ALLOCATED( ghf_eb_av ) ) THEN 2494 ALLOCATE( ghf_eb_av(nysg:nyng,nxlg:nxrg) ) 2495 ENDIF 2496 ghf_eb_av = 0.0_wp 2497 2498 CASE ( 'lai*' ) 2499 IF ( .NOT. ALLOCATED( lai_av ) ) THEN 2500 ALLOCATE( lai_av(nysg:nyng,nxlg:nxrg) ) 2501 ENDIF 2502 lai_av = 0.0_wp 2503 2504 CASE ( 'm_liq_eb*' ) 2505 IF ( .NOT. ALLOCATED( m_liq_eb_av ) ) THEN 2506 ALLOCATE( m_liq_eb_av(nysg:nyng,nxlg:nxrg) ) 2507 ENDIF 2508 m_liq_eb_av = 0.0_wp 2509 2510 CASE ( 'm_soil' ) 2511 IF ( .NOT. ALLOCATED( m_soil_av ) ) THEN 2512 ALLOCATE( m_soil_av(nzb_soil:nzt_soil,nysg:nyng,nxlg:nxrg) ) 2513 ENDIF 2514 m_soil_av = 0.0_wp 2515 2516 CASE ( 'qsws_eb*' ) 2517 IF ( .NOT. ALLOCATED( qsws_eb_av ) ) THEN 2518 ALLOCATE( qsws_eb_av(nysg:nyng,nxlg:nxrg) ) 2519 ENDIF 2520 qsws_eb_av = 0.0_wp 2521 2522 CASE ( 'qsws_liq_eb*' ) 2523 IF ( .NOT. ALLOCATED( qsws_liq_eb_av ) ) THEN 2524 ALLOCATE( qsws_liq_eb_av(nysg:nyng,nxlg:nxrg) ) 2525 ENDIF 2526 qsws_liq_eb_av = 0.0_wp 2527 2528 CASE ( 'qsws_soil_eb*' ) 2529 IF ( .NOT. ALLOCATED( qsws_soil_eb_av ) ) THEN 2530 ALLOCATE( qsws_soil_eb_av(nysg:nyng,nxlg:nxrg) ) 2531 ENDIF 2532 qsws_soil_eb_av = 0.0_wp 2533 2534 CASE ( 'qsws_veg_eb*' ) 2535 IF ( .NOT. ALLOCATED( qsws_veg_eb_av ) ) THEN 2536 ALLOCATE( qsws_veg_eb_av(nysg:nyng,nxlg:nxrg) ) 2537 ENDIF 2538 qsws_veg_eb_av = 0.0_wp 2539 2540 CASE ( 'r_a*' ) 2541 IF ( .NOT. ALLOCATED( r_a_av ) ) THEN 2542 ALLOCATE( r_a_av(nysg:nyng,nxlg:nxrg) ) 2543 ENDIF 2544 r_a_av = 0.0_wp 2545 2546 CASE ( 'r_s*' ) 2547 IF ( .NOT. ALLOCATED( r_s_av ) ) THEN 2548 ALLOCATE( r_s_av(nysg:nyng,nxlg:nxrg) ) 2549 ENDIF 2550 r_s_av = 0.0_wp 2551 2552 CASE ( 'shf_eb*' ) 2553 IF ( .NOT. ALLOCATED( shf_eb_av ) ) THEN 2554 ALLOCATE( shf_eb_av(nysg:nyng,nxlg:nxrg) ) 2555 ENDIF 2556 shf_eb_av = 0.0_wp 2557 2558 CASE ( 't_soil' ) 2559 IF ( .NOT. ALLOCATED( t_soil_av ) ) THEN 2560 ALLOCATE( t_soil_av(nzb_soil:nzt_soil,nysg:nyng,nxlg:nxrg) ) 2561 ENDIF 2562 t_soil_av = 0.0_wp 2563 2564 CASE DEFAULT 2565 CONTINUE 2566 2567 END SELECT 2568 2569 ELSEIF ( mode == 'sum' ) THEN 2570 2571 SELECT CASE ( TRIM( variable ) ) 2572 2573 CASE ( 'c_liq*' ) 2574 DO i = nxlg, nxrg 2575 DO j = nysg, nyng 2576 c_liq_av(j,i) = c_liq_av(j,i) + c_liq(j,i) 2577 ENDDO 2578 ENDDO 2579 2580 CASE ( 'c_soil*' ) 2581 DO i = nxlg, nxrg 2582 DO j = nysg, nyng 2583 c_soil_av(j,i) = c_soil_av(j,i) + (1.0 - c_veg(j,i)) 2584 ENDDO 2585 ENDDO 2586 2587 CASE ( 'c_veg*' ) 2588 DO i = nxlg, nxrg 2589 DO j = nysg, nyng 2590 c_veg_av(j,i) = c_veg_av(j,i) + c_veg(j,i) 2591 ENDDO 2592 ENDDO 2593 2594 CASE ( 'ghf_eb*' ) 2595 DO i = nxlg, nxrg 2596 DO j = nysg, nyng 2597 ghf_eb_av(j,i) = ghf_eb_av(j,i) + ghf_eb(j,i) 2598 ENDDO 2599 ENDDO 2600 2601 CASE ( 'lai*' ) 2602 DO i = nxlg, nxrg 2603 DO j = nysg, nyng 2604 lai_av(j,i) = lai_av(j,i) + lai(j,i) 2605 ENDDO 2606 ENDDO 2607 2608 CASE ( 'm_liq_eb*' ) 2609 DO i = nxlg, nxrg 2610 DO j = nysg, nyng 2611 m_liq_eb_av(j,i) = m_liq_eb_av(j,i) + m_liq_eb(j,i) 2612 ENDDO 2613 ENDDO 2614 2615 CASE ( 'm_soil' ) 2616 DO i = nxlg, nxrg 2617 DO j = nysg, nyng 2618 DO k = nzb_soil, nzt_soil 2619 m_soil_av(k,j,i) = m_soil_av(k,j,i) + m_soil(k,j,i) 2620 ENDDO 2621 ENDDO 2622 ENDDO 2623 2624 CASE ( 'qsws_eb*' ) 2625 DO i = nxlg, nxrg 2626 DO j = nysg, nyng 2627 qsws_eb_av(j,i) = qsws_eb_av(j,i) + qsws_eb(j,i) 2628 ENDDO 2629 ENDDO 2630 2631 CASE ( 'qsws_liq_eb*' ) 2632 DO i = nxlg, nxrg 2633 DO j = nysg, nyng 2634 qsws_liq_eb_av(j,i) = qsws_liq_eb_av(j,i) + qsws_liq_eb(j,i) 2635 ENDDO 2636 ENDDO 2637 2638 CASE ( 'qsws_soil_eb*' ) 2639 DO i = nxlg, nxrg 2640 DO j = nysg, nyng 2641 qsws_soil_eb_av(j,i) = qsws_soil_eb_av(j,i) + qsws_soil_eb(j,i) 2642 ENDDO 2643 ENDDO 2644 2645 CASE ( 'qsws_veg_eb*' ) 2646 DO i = nxlg, nxrg 2647 DO j = nysg, nyng 2648 qsws_veg_eb_av(j,i) = qsws_veg_eb_av(j,i) + qsws_veg_eb(j,i) 2649 ENDDO 2650 ENDDO 2651 2652 CASE ( 'r_a*' ) 2653 DO i = nxlg, nxrg 2654 DO j = nysg, nyng 2655 r_a_av(j,i) = r_a_av(j,i) + r_a(j,i) 2656 ENDDO 2657 ENDDO 2658 2659 CASE ( 'r_s*' ) 2660 DO i = nxlg, nxrg 2661 DO j = nysg, nyng 2662 r_s_av(j,i) = r_s_av(j,i) + r_s(j,i) 2663 ENDDO 2664 ENDDO 2665 2666 CASE ( 'shf_eb*' ) 2667 DO i = nxlg, nxrg 2668 DO j = nysg, nyng 2669 shf_eb_av(j,i) = shf_eb_av(j,i) + shf_eb(j,i) 2670 ENDDO 2671 ENDDO 2672 2673 CASE ( 't_soil' ) 2674 DO i = nxlg, nxrg 2675 DO j = nysg, nyng 2676 DO k = nzb_soil, nzt_soil 2677 t_soil_av(k,j,i) = t_soil_av(k,j,i) + t_soil(k,j,i) 2678 ENDDO 2679 ENDDO 2680 ENDDO 2681 2682 CASE DEFAULT 2683 CONTINUE 2684 2685 END SELECT 2686 2687 ELSEIF ( mode == 'average' ) THEN 2688 2689 SELECT CASE ( TRIM( variable ) ) 2690 2691 CASE ( 'c_liq*' ) 2692 DO i = nxlg, nxrg 2693 DO j = nysg, nyng 2694 c_liq_av(j,i) = c_liq_av(j,i) / REAL( average_count_3d, KIND=wp ) 2695 ENDDO 2696 ENDDO 2697 2698 CASE ( 'c_soil*' ) 2699 DO i = nxlg, nxrg 2700 DO j = nysg, nyng 2701 c_soil_av(j,i) = c_soil_av(j,i) / REAL( average_count_3d, KIND=wp ) 2702 ENDDO 2703 ENDDO 2704 2705 CASE ( 'c_veg*' ) 2706 DO i = nxlg, nxrg 2707 DO j = nysg, nyng 2708 c_veg_av(j,i) = c_veg_av(j,i) / REAL( average_count_3d, KIND=wp ) 2709 ENDDO 2710 ENDDO 2711 2712 CASE ( 'ghf_eb*' ) 2713 DO i = nxlg, nxrg 2714 DO j = nysg, nyng 2715 ghf_eb_av(j,i) = ghf_eb_av(j,i) / REAL( average_count_3d, KIND=wp ) 2716 ENDDO 2717 ENDDO 2718 2719 CASE ( 'lai*' ) 2720 DO i = nxlg, nxrg 2721 DO j = nysg, nyng 2722 lai_av(j,i) = lai_av(j,i) / REAL( average_count_3d, KIND=wp ) 2723 ENDDO 2724 ENDDO 2725 2726 CASE ( 'm_liq_eb*' ) 2727 DO i = nxlg, nxrg 2728 DO j = nysg, nyng 2729 m_liq_eb_av(j,i) = m_liq_eb_av(j,i) / REAL( average_count_3d, KIND=wp ) 2730 ENDDO 2731 ENDDO 2732 2733 CASE ( 'm_soil' ) 2734 DO i = nxlg, nxrg 2735 DO j = nysg, nyng 2736 DO k = nzb_soil, nzt_soil 2737 m_soil_av(k,j,i) = m_soil_av(k,j,i) / REAL( average_count_3d, KIND=wp ) 2738 ENDDO 2739 ENDDO 2740 ENDDO 2741 2742 CASE ( 'qsws_eb*' ) 2743 DO i = nxlg, nxrg 2744 DO j = nysg, nyng 2745 qsws_eb_av(j,i) = qsws_eb_av(j,i) / REAL( average_count_3d, KIND=wp ) 2746 ENDDO 2747 ENDDO 2748 2749 CASE ( 'qsws_liq_eb*' ) 2750 DO i = nxlg, nxrg 2751 DO j = nysg, nyng 2752 qsws_liq_eb_av(j,i) = qsws_liq_eb_av(j,i) / REAL( average_count_3d, KIND=wp ) 2753 ENDDO 2754 ENDDO 2755 2756 CASE ( 'qsws_soil_eb*' ) 2757 DO i = nxlg, nxrg 2758 DO j = nysg, nyng 2759 qsws_soil_eb_av(j,i) = qsws_soil_eb_av(j,i) / REAL( average_count_3d, KIND=wp ) 2760 ENDDO 2761 ENDDO 2762 2763 CASE ( 'qsws_veg_eb*' ) 2764 DO i = nxlg, nxrg 2765 DO j = nysg, nyng 2766 qsws_veg_eb_av(j,i) = qsws_veg_eb_av(j,i) / REAL( average_count_3d, KIND=wp ) 2767 ENDDO 2768 ENDDO 2769 2770 CASE ( 'r_a*' ) 2771 DO i = nxlg, nxrg 2772 DO j = nysg, nyng 2773 r_a_av(j,i) = r_a_av(j,i) / REAL( average_count_3d, KIND=wp ) 2774 ENDDO 2775 ENDDO 2776 2777 CASE ( 'r_s*' ) 2778 DO i = nxlg, nxrg 2779 DO j = nysg, nyng 2780 r_s_av(j,i) = r_s_av(j,i) / REAL( average_count_3d, KIND=wp ) 2781 ENDDO 2782 ENDDO 2783 2784 CASE ( 't_soil' ) 2785 DO i = nxlg, nxrg 2786 DO j = nysg, nyng 2787 DO k = nzb_soil, nzt_soil 2788 t_soil_av(k,j,i) = t_soil_av(k,j,i) / REAL( average_count_3d, KIND=wp ) 2789 ENDDO 2790 ENDDO 2791 ENDDO 2792 2793 END SELECT 2794 2795 ENDIF 2796 2797 END SUBROUTINE lsm_3d_data_averaging 2798 2799 2800 !------------------------------------------------------------------------------! 2801 ! 2802 ! Description: 2803 ! ------------ 2804 !> Soubroutine defines appropriate grid for netcdf variables. 2805 !> It is called out from subroutine netcdf. 2806 !------------------------------------------------------------------------------! 2807 SUBROUTINE lsm_define_netcdf_grid( var, found, grid_x, grid_y, grid_z ) 2808 2809 IMPLICIT NONE 2810 2811 CHARACTER (LEN=*), INTENT(IN) :: var !< 2812 LOGICAL, INTENT(OUT) :: found !< 2813 CHARACTER (LEN=*), INTENT(OUT) :: grid_x !< 2814 CHARACTER (LEN=*), INTENT(OUT) :: grid_y !< 2815 CHARACTER (LEN=*), INTENT(OUT) :: grid_z !< 2816 2817 2818 2819 ! 2820 !-- Check for the grid 2821 SELECT CASE ( TRIM( var ) ) 2822 2823 CASE ( 'm_soil', 't_soil' ) 2824 found = .TRUE. 2825 grid_x = 'x' 2826 grid_y = 'y' 2827 grid_z = 'zs' 2828 2829 CASE DEFAULT 2830 found = .FALSE. 2831 grid_x = 'none' 2832 grid_y = 'none' 2833 grid_z = 'none' 2834 END SELECT 2835 2836 END SUBROUTINE lsm_define_netcdf_grid 2837 2838 !------------------------------------------------------------------------------! 2839 ! 2840 ! Description: 2841 ! ------------ 2842 !> Soubroutine defines 3D output variables 2843 !------------------------------------------------------------------------------! 2844 SUBROUTINE lsm_data_output_2d( av, variable, found, grid, mode, local_pf, & 2845 two_d, nzb_do, nzt_do ) 2846 2847 2848 USE indices 2849 2850 USE kinds 2851 2852 USE user 2853 2854 IMPLICIT NONE 2855 2856 CHARACTER (LEN=*) :: grid !< 2857 CHARACTER (LEN=*) :: mode !< 2858 CHARACTER (LEN=*) :: variable !< 2859 2860 INTEGER(iwp) :: av !< 2861 INTEGER(iwp) :: i !< 2862 INTEGER(iwp) :: j !< 2863 INTEGER(iwp) :: k !< 2864 INTEGER(iwp) :: nzb_do !< 2865 INTEGER(iwp) :: nzt_do !< 2866 2867 LOGICAL :: found !< 2868 LOGICAL :: two_d !< flag parameter that indicates 2D variables (horizontal cross sections) 2869 2870 REAL(wp), DIMENSION(nxlg:nxrg,nysg:nyng,nzb:nzt+1) :: local_pf !< 2871 2872 found = .TRUE. 2873 2874 SELECT CASE ( TRIM( variable ) ) 2875 2876 2877 CASE ( 'c_liq*_xy' ) ! 2d-array 2878 IF ( av == 0 ) THEN 2879 DO i = nxlg, nxrg 2880 DO j = nysg, nyng 2881 local_pf(i,j,nzb+1) = c_liq(j,i) * c_veg(j,i) 2882 ENDDO 2883 ENDDO 2884 ELSE 2885 DO i = nxlg, nxrg 2886 DO j = nysg, nyng 2887 local_pf(i,j,nzb+1) = c_liq_av(j,i) 2888 ENDDO 2889 ENDDO 2890 ENDIF 2891 2892 two_d = .TRUE. 2893 grid = 'zu1' 2894 2895 CASE ( 'c_soil*_xy' ) ! 2d-array 2896 IF ( av == 0 ) THEN 2897 DO i = nxlg, nxrg 2898 DO j = nysg, nyng 2899 local_pf(i,j,nzb+1) = 1.0_wp - c_veg(j,i) 2900 ENDDO 2901 ENDDO 2902 ELSE 2903 DO i = nxlg, nxrg 2904 DO j = nysg, nyng 2905 local_pf(i,j,nzb+1) = c_soil_av(j,i) 2906 ENDDO 2907 ENDDO 2908 ENDIF 2909 2910 two_d = .TRUE. 2911 grid = 'zu1' 2912 2913 CASE ( 'c_veg*_xy' ) ! 2d-array 2914 IF ( av == 0 ) THEN 2915 DO i = nxlg, nxrg 2916 DO j = nysg, nyng 2917 local_pf(i,j,nzb+1) = c_veg(j,i) 2918 ENDDO 2919 ENDDO 2920 ELSE 2921 DO i = nxlg, nxrg 2922 DO j = nysg, nyng 2923 local_pf(i,j,nzb+1) = c_veg_av(j,i) 2924 ENDDO 2925 ENDDO 2926 ENDIF 2927 2928 two_d = .TRUE. 2929 grid = 'zu1' 2930 2931 CASE ( 'ghf_eb*_xy' ) ! 2d-array 2932 IF ( av == 0 ) THEN 2933 DO i = nxlg, nxrg 2934 DO j = nysg, nyng 2935 local_pf(i,j,nzb+1) = ghf_eb(j,i) 2936 ENDDO 2937 ENDDO 2938 ELSE 2939 DO i = nxlg, nxrg 2940 DO j = nysg, nyng 2941 local_pf(i,j,nzb+1) = ghf_eb_av(j,i) 2942 ENDDO 2943 ENDDO 2944 ENDIF 2945 2946 two_d = .TRUE. 2947 grid = 'zu1' 2948 2949 CASE ( 'lai*_xy' ) ! 2d-array 2950 IF ( av == 0 ) THEN 2951 DO i = nxlg, nxrg 2952 DO j = nysg, nyng 2953 local_pf(i,j,nzb+1) = lai(j,i) 2954 ENDDO 2955 ENDDO 2956 ELSE 2957 DO i = nxlg, nxrg 2958 DO j = nysg, nyng 2959 local_pf(i,j,nzb+1) = lai_av(j,i) 2960 ENDDO 2961 ENDDO 2962 ENDIF 2963 2964 two_d = .TRUE. 2965 grid = 'zu1' 2966 2967 CASE ( 'm_liq_eb*_xy' ) ! 2d-array 2968 IF ( av == 0 ) THEN 2969 DO i = nxlg, nxrg 2970 DO j = nysg, nyng 2971 local_pf(i,j,nzb+1) = m_liq_eb(j,i) 2972 ENDDO 2973 ENDDO 2974 ELSE 2975 DO i = nxlg, nxrg 2976 DO j = nysg, nyng 2977 local_pf(i,j,nzb+1) = m_liq_eb_av(j,i) 2978 ENDDO 2979 ENDDO 2980 ENDIF 2981 2982 two_d = .TRUE. 2983 grid = 'zu1' 2984 2985 CASE ( 'm_soil_xy', 'm_soil_xz', 'm_soil_yz' ) 2986 IF ( av == 0 ) THEN 2987 DO i = nxlg, nxrg 2988 DO j = nysg, nyng 2989 DO k = nzb_soil, nzt_soil 2990 local_pf(i,j,k) = m_soil(k,j,i) 2991 ENDDO 2992 ENDDO 2993 ENDDO 2994 ELSE 2995 DO i = nxlg, nxrg 2996 DO j = nysg, nyng 2997 DO k = nzb_soil, nzt_soil 2998 local_pf(i,j,k) = m_soil_av(k,j,i) 2999 ENDDO 3000 ENDDO 3001 ENDDO 3002 ENDIF 3003 3004 nzb_do = nzb_soil 3005 nzt_do = nzt_soil 3006 3007 IF ( mode == 'xy' ) grid = 'zs' 3008 3009 CASE ( 'qsws_eb*_xy' ) ! 2d-array 3010 IF ( av == 0 ) THEN 3011 DO i = nxlg, nxrg 3012 DO j = nysg, nyng 3013 local_pf(i,j,nzb+1) = qsws_eb(j,i) 3014 ENDDO 3015 ENDDO 3016 ELSE 3017 DO i = nxlg, nxrg 3018 DO j = nysg, nyng 3019 local_pf(i,j,nzb+1) = qsws_eb_av(j,i) 3020 ENDDO 3021 ENDDO 3022 ENDIF 3023 3024 two_d = .TRUE. 3025 grid = 'zu1' 3026 3027 CASE ( 'qsws_liq_eb*_xy' ) ! 2d-array 3028 IF ( av == 0 ) THEN 3029 DO i = nxlg, nxrg 3030 DO j = nysg, nyng 3031 local_pf(i,j,nzb+1) = qsws_liq_eb(j,i) 3032 ENDDO 3033 ENDDO 3034 ELSE 3035 DO i = nxlg, nxrg 3036 DO j = nysg, nyng 3037 local_pf(i,j,nzb+1) = qsws_liq_eb_av(j,i) 3038 ENDDO 3039 ENDDO 3040 ENDIF 3041 3042 two_d = .TRUE. 3043 grid = 'zu1' 3044 3045 CASE ( 'qsws_soil_eb*_xy' ) ! 2d-array 3046 IF ( av == 0 ) THEN 3047 DO i = nxlg, nxrg 3048 DO j = nysg, nyng 3049 local_pf(i,j,nzb+1) = qsws_soil_eb(j,i) 3050 ENDDO 3051 ENDDO 3052 ELSE 3053 DO i = nxlg, nxrg 3054 DO j = nysg, nyng 3055 local_pf(i,j,nzb+1) = qsws_soil_eb_av(j,i) 3056 ENDDO 3057 ENDDO 3058 ENDIF 3059 3060 two_d = .TRUE. 3061 grid = 'zu1' 3062 3063 CASE ( 'qsws_veg_eb*_xy' ) ! 2d-array 3064 IF ( av == 0 ) THEN 3065 DO i = nxlg, nxrg 3066 DO j = nysg, nyng 3067 local_pf(i,j,nzb+1) = qsws_veg_eb(j,i) 3068 ENDDO 3069 ENDDO 3070 ELSE 3071 DO i = nxlg, nxrg 3072 DO j = nysg, nyng 3073 local_pf(i,j,nzb+1) = qsws_veg_eb_av(j,i) 3074 ENDDO 3075 ENDDO 3076 ENDIF 3077 3078 two_d = .TRUE. 3079 grid = 'zu1' 3080 3081 3082 CASE ( 'r_a*_xy' ) ! 2d-array 3083 IF ( av == 0 ) THEN 3084 DO i = nxlg, nxrg 3085 DO j = nysg, nyng 3086 local_pf(i,j,nzb+1) = r_a(j,i) 3087 ENDDO 3088 ENDDO 3089 ELSE 3090 DO i = nxlg, nxrg 3091 DO j = nysg, nyng 3092 local_pf(i,j,nzb+1) = r_a_av(j,i) 3093 ENDDO 3094 ENDDO 3095 ENDIF 3096 3097 two_d = .TRUE. 3098 grid = 'zu1' 3099 3100 CASE ( 'r_s*_xy' ) ! 2d-array 3101 IF ( av == 0 ) THEN 3102 DO i = nxlg, nxrg 3103 DO j = nysg, nyng 3104 local_pf(i,j,nzb+1) = r_s(j,i) 3105 ENDDO 3106 ENDDO 3107 ELSE 3108 DO i = nxlg, nxrg 3109 DO j = nysg, nyng 3110 local_pf(i,j,nzb+1) = r_s_av(j,i) 3111 ENDDO 3112 ENDDO 3113 ENDIF 3114 3115 two_d = .TRUE. 3116 grid = 'zu1' 3117 3118 CASE ( 'shf_eb*_xy' ) ! 2d-array 3119 IF ( av == 0 ) THEN 3120 DO i = nxlg, nxrg 3121 DO j = nysg, nyng 3122 local_pf(i,j,nzb+1) = shf_eb(j,i) 3123 ENDDO 3124 ENDDO 3125 ELSE 3126 DO i = nxlg, nxrg 3127 DO j = nysg, nyng 3128 local_pf(i,j,nzb+1) = shf_eb_av(j,i) 3129 ENDDO 3130 ENDDO 3131 ENDIF 3132 3133 two_d = .TRUE. 3134 grid = 'zu1' 3135 3136 CASE ( 't_soil_xy', 't_soil_xz', 't_soil_yz' ) 3137 IF ( av == 0 ) THEN 3138 DO i = nxlg, nxrg 3139 DO j = nysg, nyng 3140 DO k = nzb_soil, nzt_soil 3141 local_pf(i,j,k) = t_soil(k,j,i) 3142 ENDDO 3143 ENDDO 3144 ENDDO 3145 ELSE 3146 DO i = nxlg, nxrg 3147 DO j = nysg, nyng 3148 DO k = nzb_soil, nzt_soil 3149 local_pf(i,j,k) = t_soil_av(k,j,i) 3150 ENDDO 3151 ENDDO 3152 ENDDO 3153 ENDIF 3154 3155 nzb_do = nzb_soil 3156 nzt_do = nzt_soil 3157 3158 IF ( mode == 'xy' ) grid = 'zs' 3159 3160 CASE DEFAULT 3161 found = .FALSE. 3162 grid = 'none' 3163 3164 END SELECT 3165 3166 END SUBROUTINE lsm_data_output_2d 3167 3168 3169 !------------------------------------------------------------------------------! 3170 ! 3171 ! Description: 3172 ! ------------ 3173 !> Soubroutine defines 3D output variables 3174 !------------------------------------------------------------------------------! 3175 SUBROUTINE lsm_data_output_3d( av, variable, found, local_pf ) 3176 3177 3178 USE indices 3179 3180 USE kinds 3181 3182 3183 IMPLICIT NONE 3184 3185 CHARACTER (LEN=*) :: variable !< 3186 3187 INTEGER(iwp) :: av !< 3188 INTEGER(iwp) :: i !< 3189 INTEGER(iwp) :: j !< 3190 INTEGER(iwp) :: k !< 3191 3192 LOGICAL :: found !< 3193 3194 REAL(sp), DIMENSION(nxlg:nxrg,nysg:nyng,nzb_soil:nzt_soil) :: local_pf !< 3195 3196 3197 found = .TRUE. 3198 3199 3200 SELECT CASE ( TRIM( variable ) ) 3201 3202 3203 CASE ( 'm_soil' ) 3204 3205 IF ( av == 0 ) THEN 3206 DO i = nxlg, nxrg 3207 DO j = nysg, nyng 3208 DO k = nzb_soil, nzt_soil 3209 local_pf(i,j,k) = m_soil(k,j,i) 3210 ENDDO 3211 ENDDO 3212 ENDDO 3213 ELSE 3214 DO i = nxlg, nxrg 3215 DO j = nysg, nyng 3216 DO k = nzb_soil, nzt_soil 3217 local_pf(i,j,k) = m_soil_av(k,j,i) 3218 ENDDO 3219 ENDDO 3220 ENDDO 3221 ENDIF 3222 3223 CASE ( 't_soil' ) 3224 3225 IF ( av == 0 ) THEN 3226 DO i = nxlg, nxrg 3227 DO j = nysg, nyng 3228 DO k = nzb_soil, nzt_soil 3229 local_pf(i,j,k) = t_soil(k,j,i) 3230 ENDDO 3231 ENDDO 3232 ENDDO 3233 ELSE 3234 DO i = nxlg, nxrg 3235 DO j = nysg, nyng 3236 DO k = nzb_soil, nzt_soil 3237 local_pf(i,j,k) = t_soil_av(k,j,i) 3238 ENDDO 3239 ENDDO 3240 ENDDO 3241 ENDIF 3242 3243 3244 CASE DEFAULT 3245 found = .FALSE. 3246 3247 END SELECT 3248 3249 3250 END SUBROUTINE lsm_data_output_3d 3251 3252 3253 !------------------------------------------------------------------------------! 3254 ! 3255 ! Description: 3256 ! ------------ 3257 !> Write restart data for land surface model 3258 !------------------------------------------------------------------------------! 3259 SUBROUTINE lsm_last_actions 3260 3261 3262 USE control_parameters 3263 3264 USE kinds 3265 3266 IMPLICIT NONE 3267 3268 IF ( write_binary(1:4) == 'true' ) THEN 3269 IF ( ALLOCATED( c_liq_av ) ) THEN 3270 WRITE ( 14 ) 'c_liq_av '; WRITE ( 14 ) c_liq_av 3271 ENDIF 3272 IF ( ALLOCATED( c_soil_av ) ) THEN 3273 WRITE ( 14 ) 'c_soil_av '; WRITE ( 14 ) c_soil_av 3274 ENDIF 3275 IF ( ALLOCATED( c_veg_av ) ) THEN 3276 WRITE ( 14 ) 'c_veg_av '; WRITE ( 14 ) c_veg_av 3277 ENDIF 3278 IF ( ALLOCATED( ghf_eb_av ) ) THEN 3279 WRITE ( 14 ) 'ghf_eb_av '; WRITE ( 14 ) ghf_eb_av 3280 ENDIF 3281 IF ( ALLOCATED( lai_av ) ) THEN 3282 WRITE ( 14 ) 'lai_av '; WRITE ( 14 ) lai_av 3283 ENDIF 3284 WRITE ( 14 ) 'm_liq_eb '; WRITE ( 14 ) m_liq_eb 3285 IF ( ALLOCATED( m_liq_eb_av ) ) THEN 3286 WRITE ( 14 ) 'm_liq_eb_av '; WRITE ( 14 ) m_liq_eb_av 3287 ENDIF 3288 WRITE ( 14 ) 'm_soil '; WRITE ( 14 ) m_soil 3289 IF ( ALLOCATED( m_soil_av ) ) THEN 3290 WRITE ( 14 ) 'm_soil_av '; WRITE ( 14 ) m_soil_av 3291 ENDIF 3292 IF ( ALLOCATED( qsws_eb_av ) ) THEN 3293 WRITE ( 14 ) 'qsws_eb_av '; WRITE ( 14 ) qsws_eb_av 3294 ENDIF 3295 IF ( ALLOCATED( qsws_liq_eb_av ) ) THEN 3296 WRITE ( 14 ) 'qsws_liq_eb_av '; WRITE ( 14 ) qsws_liq_eb_av 3297 ENDIF 3298 IF ( ALLOCATED( qsws_soil_eb_av ) ) THEN 3299 WRITE ( 14 ) 'qsws_soil_eb_av '; WRITE ( 14 ) qsws_soil_eb_av 3300 ENDIF 3301 IF ( ALLOCATED( qsws_veg_eb_av ) ) THEN 3302 WRITE ( 14 ) 'qsws_veg_eb_av '; WRITE ( 14 ) qsws_veg_eb_av 3303 ENDIF 3304 IF ( ALLOCATED( shf_eb_av ) ) THEN 3305 WRITE ( 14 ) 'shf_eb_av '; WRITE ( 14 ) shf_eb_av 3306 ENDIF 3307 WRITE ( 14 ) 't_soil '; WRITE ( 14 ) t_soil 3308 IF ( ALLOCATED( t_soil_av ) ) THEN 3309 WRITE ( 14 ) 't_soil_av '; WRITE ( 14 ) t_soil_av 3310 ENDIF 3311 3312 WRITE ( 14 ) '*** end lsm *** ' 3313 3314 ENDIF 3315 3316 END SUBROUTINE lsm_last_actions 3317 3318 3319 SUBROUTINE lsm_read_restart_data( i, nxlfa, nxl_on_file, nxrfa, nxr_on_file, & 3320 nynfa, nyn_on_file, nysfa, nys_on_file, & 3321 offset_xa, offset_ya, overlap_count, & 3322 tmp_2d ) 3323 3324 3325 USE control_parameters 3326 3327 USE indices 3328 3329 USE kinds 3330 3331 USE pegrid 3332 3333 IMPLICIT NONE 3334 3335 CHARACTER (LEN=20) :: field_char !< 3336 3337 INTEGER(iwp) :: i !< 3338 INTEGER(iwp) :: k !< 3339 INTEGER(iwp) :: nxlc !< 3340 INTEGER(iwp) :: nxlf !< 3341 INTEGER(iwp) :: nxl_on_file !< 3342 INTEGER(iwp) :: nxrc !< 3343 INTEGER(iwp) :: nxrf !< 3344 INTEGER(iwp) :: nxr_on_file !< 3345 INTEGER(iwp) :: nync !< 3346 INTEGER(iwp) :: nynf !< 3347 INTEGER(iwp) :: nyn_on_file !< 3348 INTEGER(iwp) :: nysc !< 3349 INTEGER(iwp) :: nysf !< 3350 INTEGER(iwp) :: nys_on_file !< 3351 INTEGER(iwp) :: overlap_count !< 3352 3353 INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) :: nxlfa !< 3354 INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) :: nxrfa !< 3355 INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) :: nynfa !< 3356 INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) :: nysfa !< 3357 INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) :: offset_xa !< 3358 INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) :: offset_ya !< 3359 3360 REAL(wp), & 3361 DIMENSION(nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) ::& 3362 tmp_2d !< 3363 3364 REAL(wp), & 3365 DIMENSION(nzb_soil:nzt_soil+1,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) ::& 3366 tmp_3d !< 3367 3368 REAL(wp), & 3369 DIMENSION(nzb_soil:nzt_soil,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) ::& 3370 tmp_3d2 !< 3371 3372 3373 IF ( initializing_actions == 'read_restart_data' ) THEN 3374 READ ( 13 ) field_char 3375 3376 DO WHILE ( TRIM( field_char ) /= '*** end lsm ***' ) 3377 3378 DO k = 1, overlap_count 3379 3380 nxlf = nxlfa(i,k) 3381 nxlc = nxlfa(i,k) + offset_xa(i,k) 3382 nxrf = nxrfa(i,k) 3383 nxrc = nxrfa(i,k) + offset_xa(i,k) 3384 nysf = nysfa(i,k) 3385 nysc = nysfa(i,k) + offset_ya(i,k) 3386 nynf = nynfa(i,k) 3387 nync = nynfa(i,k) + offset_ya(i,k) 3388 3389 3390 SELECT CASE ( TRIM( field_char ) ) 3391 3392 CASE ( 'c_liq_av' ) 3393 IF ( .NOT. ALLOCATED( c_liq_av ) ) THEN 3394 ALLOCATE( c_liq_av(nysg:nyng,nxlg:nxrg) ) 3395 ENDIF 3396 IF ( k == 1 ) READ ( 13 ) tmp_2d 3397 c_liq_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 3398 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3399 3400 CASE ( 'c_soil_av' ) 3401 IF ( .NOT. ALLOCATED( c_soil_av ) ) THEN 3402 ALLOCATE( c_soil_av(nysg:nyng,nxlg:nxrg) ) 3403 ENDIF 3404 IF ( k == 1 ) READ ( 13 ) tmp_2d 3405 c_soil_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 3406 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3407 3408 CASE ( 'c_veg_av' ) 3409 IF ( .NOT. ALLOCATED( c_veg_av ) ) THEN 3410 ALLOCATE( c_veg_av(nysg:nyng,nxlg:nxrg) ) 3411 ENDIF 3412 IF ( k == 1 ) READ ( 13 ) tmp_2d 3413 c_veg_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 3414 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3415 3416 CASE ( 'ghf_eb_av' ) 3417 IF ( .NOT. ALLOCATED( ghf_eb_av ) ) THEN 3418 ALLOCATE( ghf_eb_av(nysg:nyng,nxlg:nxrg) ) 3419 ENDIF 3420 IF ( k == 1 ) READ ( 13 ) tmp_2d 3421 ghf_eb_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 3422 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3423 3424 CASE ( 'm_liq_eb' ) 3425 IF ( k == 1 ) READ ( 13 ) tmp_2d 3426 m_liq_eb(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 3427 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3428 3429 CASE ( 'lai_av' ) 3430 IF ( .NOT. ALLOCATED( lai_av ) ) THEN 3431 ALLOCATE( lai_av(nysg:nyng,nxlg:nxrg) ) 3432 ENDIF 3433 IF ( k == 1 ) READ ( 13 ) tmp_2d 3434 lai_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 3435 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3436 3437 CASE ( 'm_liq_eb_av' ) 3438 IF ( .NOT. ALLOCATED( m_liq_eb_av ) ) THEN 3439 ALLOCATE( m_liq_eb_av(nysg:nyng,nxlg:nxrg) ) 3440 ENDIF 3441 IF ( k == 1 ) READ ( 13 ) tmp_2d 3442 m_liq_eb_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 3443 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3444 3445 CASE ( 'm_soil' ) 3446 IF ( k == 1 ) READ ( 13 ) tmp_3d2(:,:,:) 3447 m_soil(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 3448 tmp_3d2(nzb_soil:nzt_soil,nysf-nbgp:nynf & 3449 +nbgp,nxlf-nbgp:nxrf+nbgp) 3450 3451 CASE ( 'm_soil_av' ) 3452 IF ( .NOT. ALLOCATED( m_soil_av ) ) THEN 3453 ALLOCATE( m_soil_av(nzb_soil:nzt_soil,nysg:nyng,nxlg:nxrg) ) 3454 ENDIF 3455 IF ( k == 1 ) READ ( 13 ) tmp_3d2(:,:,:) 3456 m_soil_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 3457 tmp_3d2(nzb_soil:nzt_soil,nysf & 3458 -nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3459 3460 CASE ( 'qsws_eb_av' ) 3461 IF ( .NOT. ALLOCATED( qsws_eb_av ) ) THEN 3462 ALLOCATE( qsws_eb_av(nysg:nyng,nxlg:nxrg) ) 3463 ENDIF 3464 IF ( k == 1 ) READ ( 13 ) tmp_2d 3465 qsws_eb_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 3466 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3467 3468 CASE ( 'qsws_liq_eb_av' ) 3469 IF ( .NOT. ALLOCATED( qsws_liq_eb_av ) ) THEN 3470 ALLOCATE( qsws_liq_eb_av(nysg:nyng,nxlg:nxrg) ) 3471 ENDIF 3472 IF ( k == 1 ) READ ( 13 ) tmp_2d 3473 qsws_liq_eb_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 3474 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3475 CASE ( 'qsws_soil_eb_av' ) 3476 IF ( .NOT. ALLOCATED( qsws_soil_eb_av ) ) THEN 3477 ALLOCATE( qsws_soil_eb_av(nysg:nyng,nxlg:nxrg) ) 3478 ENDIF 3479 IF ( k == 1 ) READ ( 13 ) tmp_2d 3480 qsws_soil_eb_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 3481 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3482 3483 CASE ( 'qsws_veg_eb_av' ) 3484 IF ( .NOT. ALLOCATED( qsws_veg_eb_av ) ) THEN 3485 ALLOCATE( qsws_veg_eb_av(nysg:nyng,nxlg:nxrg) ) 3486 ENDIF 3487 IF ( k == 1 ) READ ( 13 ) tmp_2d 3488 qsws_veg_eb_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 3489 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3490 3491 CASE ( 'shf_eb_av' ) 3492 IF ( .NOT. ALLOCATED( shf_eb_av ) ) THEN 3493 ALLOCATE( shf_eb_av(nysg:nyng,nxlg:nxrg) ) 3494 ENDIF 3495 IF ( k == 1 ) READ ( 13 ) tmp_2d 3496 shf_eb_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 3497 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3498 3499 CASE ( 't_soil' ) 3500 IF ( k == 1 ) READ ( 13 ) tmp_3d 3501 t_soil(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 3502 tmp_3d(:,nysf-nbgp:nynf+nbgp, & 3503 nxlf-nbgp:nxrf+nbgp) 3504 3505 CASE ( 't_soil_av' ) 3506 IF ( .NOT. ALLOCATED( t_soil_av ) ) THEN 3507 ALLOCATE( t_soil_av(nzb_soil:nzt_soil,nysg:nyng,nxlg:nxrg) ) 3508 ENDIF 3509 IF ( k == 1 ) READ ( 13 ) tmp_3d2(:,:,:) 3510 t_soil_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 3511 tmp_3d(:,nysf-nbgp:nynf+nbgp, & 3512 nxlf-nbgp:nxrf+nbgp) 3513 3514 3515 CASE DEFAULT 3516 WRITE( message_string, * ) 'unknown variable named "', & 3517 TRIM( field_char ), '" found in', & 3518 '&data from prior run on PE ', myid 3519 CALL message( 'lsm_read_restart_data', 'PA0441', 1, 2, 0, 6, & 3520 0 ) 3521 3522 END SELECT 3523 3524 ENDDO 3525 3526 READ ( 13 ) field_char 3527 3528 ENDDO 3529 ENDIF 3530 3531 END SUBROUTINE lsm_read_restart_data 3532 2417 3533 !------------------------------------------------------------------------------! 2418 3534 ! Description:
Note: See TracChangeset
for help on using the changeset viewer.