Changeset 4360 for palm/trunk/SOURCE/land_surface_model_mod.f90
- Timestamp:
- Jan 7, 2020 11:25:50 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/land_surface_model_mod.f90
r4356 r4360 15 15 ! PALM. If not, see <http://www.gnu.org/licenses/>. 16 16 ! 17 ! Copyright 1997-20 19Leibniz Universitaet Hannover17 ! Copyright 1997-2020 Leibniz Universitaet Hannover 18 18 !------------------------------------------------------------------------------! 19 19 ! … … 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Fix wrong location string in message call 28 ! 29 ! 4356 2019-12-20 17:09:33Z suehring 27 30 ! Correct single message calls, local checks must be given by the respective 28 31 ! mpi rank. … … 1525 1528 message_string = 'invalid soil layer configuration found ' // & 1526 1529 '(dz_soil_center(k) <= 0.0)' 1527 CALL message( 'lsm_ rrd_local', 'PA0140', 1, 2, 0, 6, 0 )1530 CALL message( 'lsm_check_parameters', 'PA0140', 1, 2, 0, 6, 0 ) 1528 1531 ENDIF 1529 1532 ENDDO … … 4860 4863 message_string = 'For non-pavement surfaces the combination ' // & 4861 4864 ' lai = 0.0 and c_veg = 1.0 is not allowed.' 4862 CALL message( 'lsm_ rrd_local', 'PA0671', 2, 2, myid, 6, 0 )4865 CALL message( 'lsm_init', 'PA0671', 2, 2, myid, 6, 0 ) 4863 4866 ENDIF 4864 4867 … … 4869 4872 message_string = 'For non-pavement surfaces the combination ' // & 4870 4873 ' lai = 0.0 and c_veg = 1.0 is not allowed.' 4871 CALL message( 'lsm_ rrd_local', 'PA0671', 2, 2, myid, 6, 0 )4874 CALL message( 'lsm_init', 'PA0671', 2, 2, myid, 6, 0 ) 4872 4875 ENDIF 4873 4876 ENDDO … … 6590 6593 !> Soubroutine reads lsm data from restart file(s) 6591 6594 !------------------------------------------------------------------------------! 6592 SUBROUTINE lsm_rrd_local( k, nxlf, nxlc, nxl_on_file, nxrf, nxrc, &6595 SUBROUTINE lsm_rrd_local( k, nxlf, nxlc, nxl_on_file, nxrf, nxrc, & 6593 6596 nxr_on_file, nynf, nync, nyn_on_file, nysf, nysc, & 6594 6597 nys_on_file, tmp_2d, found ) … … 6643 6646 6644 6647 6645 SELECT CASE ( restart_string(1:length) ) 6646 6647 CASE ( 'ns_h_on_file_lsm' ) 6648 IF ( k == 1 ) THEN 6649 READ ( 13 ) ns_h_on_file_lsm 6650 6651 IF ( ALLOCATED( tmp_walltype_h_1d%var_1d ) ) & 6652 DEALLOCATE( tmp_walltype_h_1d%var_1d ) 6653 IF ( ALLOCATED( tmp_walltype_h_2d%var_2d ) ) & 6654 DEALLOCATE( tmp_walltype_h_2d%var_2d ) 6655 IF ( ALLOCATED( tmp_walltype_h_2d2%var_2d ) ) & 6656 DEALLOCATE( tmp_walltype_h_2d2%var_2d ) 6657 6658 ! 6659 !-- Allocate temporary arrays to store surface data 6660 ALLOCATE( tmp_walltype_h_1d%var_1d(1:ns_h_on_file_lsm) ) 6661 ALLOCATE( tmp_walltype_h_2d%var_2d(nzb_soil:nzt_soil+1, & 6662 1:ns_h_on_file_lsm) ) 6663 ALLOCATE( tmp_walltype_h_2d2%var_2d(nzb_soil:nzt_soil, & 6664 1:ns_h_on_file_lsm) ) 6665 6666 ENDIF 6667 6668 CASE ( 'ns_v_on_file_lsm' ) 6669 IF ( k == 1 ) THEN 6670 READ ( 13 ) ns_v_on_file_lsm 6671 6672 DO l = 0, 3 6673 IF ( ALLOCATED( tmp_walltype_v_1d(l)%var_1d ) ) & 6674 DEALLOCATE( tmp_walltype_v_1d(l)%var_1d ) 6675 IF ( ALLOCATED( tmp_walltype_v_2d(l)%var_2d ) ) & 6676 DEALLOCATE( tmp_walltype_v_2d(l)%var_2d ) 6677 IF ( ALLOCATED( tmp_walltype_v_2d2(l)%var_2d ) ) & 6678 DEALLOCATE( tmp_walltype_v_2d2(l)%var_2d ) 6679 ENDDO 6680 6681 ! 6682 !-- Allocate temporary arrays to store surface data 6683 DO l = 0, 3 6684 ALLOCATE( tmp_walltype_v_1d(l) & 6685 %var_1d(1:ns_v_on_file_lsm(l)) ) 6686 ALLOCATE( tmp_walltype_v_2d(l) & 6687 %var_2d(nzb_soil:nzt_soil+1, & 6688 1:ns_v_on_file_lsm(l)) ) 6689 ALLOCATE( tmp_walltype_v_2d2(l) & 6690 %var_2d(nzb_soil:nzt_soil, & 6691 1:ns_v_on_file_lsm(l)) ) 6692 ENDDO 6693 6694 ENDIF 6695 6696 6697 CASE ( 'c_liq_av' ) 6698 IF ( .NOT. ALLOCATED( c_liq_av ) ) THEN 6699 ALLOCATE( c_liq_av(nysg:nyng,nxlg:nxrg) ) 6700 ENDIF 6701 IF ( k == 1 ) READ ( 13 ) tmp_2d 6702 c_liq_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 6703 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 6704 6705 CASE ( 'c_soil_av' ) 6706 IF ( .NOT. ALLOCATED( c_soil_av ) ) THEN 6707 ALLOCATE( c_soil_av(nysg:nyng,nxlg:nxrg) ) 6708 ENDIF 6709 IF ( k == 1 ) READ ( 13 ) tmp_2d 6710 c_soil_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 6711 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 6712 6713 CASE ( 'c_veg_av' ) 6714 IF ( .NOT. ALLOCATED( c_veg_av ) ) THEN 6715 ALLOCATE( c_veg_av(nysg:nyng,nxlg:nxrg) ) 6716 ENDIF 6717 IF ( k == 1 ) READ ( 13 ) tmp_2d 6718 c_veg_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 6719 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 6720 6721 CASE ( 'lai_av' ) 6722 IF ( .NOT. ALLOCATED( lai_av ) ) THEN 6723 ALLOCATE( lai_av(nysg:nyng,nxlg:nxrg) ) 6724 ENDIF 6725 IF ( k == 1 ) READ ( 13 ) tmp_2d 6726 lai_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 6727 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 6728 6729 CASE ( 'm_liq_av' ) 6730 IF ( .NOT. ALLOCATED( m_liq_av ) ) THEN 6731 ALLOCATE( m_liq_av(nysg:nyng,nxlg:nxrg) ) 6732 ENDIF 6733 IF ( k == 1 ) READ ( 13 ) tmp_2d 6734 m_liq_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 6735 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 6736 6737 CASE ( 'm_soil_av' ) 6738 IF ( .NOT. ALLOCATED( m_soil_av ) ) THEN 6739 ALLOCATE( m_soil_av(nzb_soil:nzt_soil,nysg:nyng,nxlg:nxrg) ) 6740 ENDIF 6741 IF ( k == 1 ) READ ( 13 ) tmp_3d(:,:,:) 6742 m_soil_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 6743 tmp_3d(nzb_soil:nzt_soil,nysf & 6744 -nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 6745 6746 CASE ( 'qsws_liq_av' ) 6747 IF ( .NOT. ALLOCATED( qsws_liq_av ) ) THEN 6748 ALLOCATE( qsws_liq_av(nysg:nyng,nxlg:nxrg) ) 6749 ENDIF 6750 IF ( k == 1 ) READ ( 13 ) tmp_2d 6751 qsws_liq_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 6752 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 6753 CASE ( 'qsws_soil_av' ) 6754 IF ( .NOT. ALLOCATED( qsws_soil_av ) ) THEN 6755 ALLOCATE( qsws_soil_av(nysg:nyng,nxlg:nxrg) ) 6756 ENDIF 6757 IF ( k == 1 ) READ ( 13 ) tmp_2d 6758 qsws_soil_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 6759 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 6760 6761 CASE ( 'qsws_veg_av' ) 6762 IF ( .NOT. ALLOCATED( qsws_veg_av ) ) THEN 6763 ALLOCATE( qsws_veg_av(nysg:nyng,nxlg:nxrg) ) 6764 ENDIF 6765 IF ( k == 1 ) READ ( 13 ) tmp_2d 6766 qsws_veg_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 6767 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 6768 6769 CASE ( 't_soil_av' ) 6770 IF ( .NOT. ALLOCATED( t_soil_av ) ) THEN 6771 ALLOCATE( t_soil_av(nzb_soil:nzt_soil,nysg:nyng,nxlg:nxrg) ) 6772 ENDIF 6773 IF ( k == 1 ) READ ( 13 ) tmp_3d(:,:,:) 6774 t_soil_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 6775 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 6776 6777 CASE ( 'lsm_start_index_h', 'lsm_start_index_v' ) 6778 IF ( k == 1 ) THEN 6779 6780 IF ( ALLOCATED( start_index_on_file ) ) & 6781 DEALLOCATE( start_index_on_file ) 6782 6783 ALLOCATE ( start_index_on_file(nys_on_file:nyn_on_file, & 6784 nxl_on_file:nxr_on_file) ) 6785 6786 READ ( 13 ) start_index_on_file 6787 6788 ENDIF 6789 6790 CASE ( 'lsm_end_index_h', 'lsm_end_index_v' ) 6791 IF ( k == 1 ) THEN 6792 6793 IF ( ALLOCATED( end_index_on_file ) ) & 6794 DEALLOCATE( end_index_on_file ) 6795 6796 ALLOCATE ( end_index_on_file(nys_on_file:nyn_on_file, & 6797 nxl_on_file:nxr_on_file) ) 6798 6799 READ ( 13 ) end_index_on_file 6800 6801 ENDIF 6802 6803 CASE ( 't_soil_h' ) 6804 6805 IF ( k == 1 ) THEN 6806 IF ( .NOT. ALLOCATED( t_soil_h%var_2d ) ) & 6807 ALLOCATE( t_soil_h%var_2d(nzb_soil:nzt_soil+1, & 6808 1:surf_lsm_h%ns) ) 6809 READ ( 13 ) tmp_walltype_h_2d%var_2d 6810 ENDIF 6811 CALL surface_restore_elements( & 6812 t_soil_h%var_2d, & 6813 tmp_walltype_h_2d%var_2d, & 6814 surf_lsm_h%start_index, & 6815 start_index_on_file, & 6816 end_index_on_file, & 6817 nxlc, nysc, & 6818 nxlf, nxrf, nysf, nynf, & 6819 nys_on_file, nyn_on_file, & 6820 nxl_on_file,nxr_on_file ) 6821 6822 CASE ( 't_soil_v(0)' ) 6823 6824 IF ( k == 1 ) THEN 6825 IF ( .NOT. ALLOCATED( t_soil_v(0)%var_2d ) ) & 6826 ALLOCATE( t_soil_v(0)%var_2d(nzb_soil:nzt_soil+1, & 6827 1:surf_lsm_v(0)%ns) ) 6828 READ ( 13 ) tmp_walltype_v_2d(0)%var_2d 6829 ENDIF 6830 CALL surface_restore_elements( & 6831 t_soil_v(0)%var_2d, & 6832 tmp_walltype_v_2d(0)%var_2d, & 6833 surf_lsm_v(0)%start_index, & 6834 start_index_on_file, & 6835 end_index_on_file, & 6836 nxlc, nysc, & 6837 nxlf, nxrf, nysf, nynf, & 6838 nys_on_file, nyn_on_file, & 6839 nxl_on_file,nxr_on_file ) 6840 6841 CASE ( 't_soil_v(1)' ) 6842 6843 IF ( k == 1 ) THEN 6844 IF ( .NOT. ALLOCATED( t_soil_v(1)%var_2d ) ) & 6845 ALLOCATE( t_soil_v(1)%var_2d(nzb_soil:nzt_soil+1, & 6846 1:surf_lsm_v(1)%ns) ) 6847 READ ( 13 ) tmp_walltype_v_2d(1)%var_2d 6848 ENDIF 6849 CALL surface_restore_elements( & 6850 t_soil_v(1)%var_2d, & 6851 tmp_walltype_v_2d(1)%var_2d, & 6852 surf_lsm_v(1)%start_index, & 6853 start_index_on_file, & 6854 end_index_on_file, & 6855 nxlc, nysc, & 6856 nxlf, nxrf, nysf, nynf, & 6857 nys_on_file, nyn_on_file, & 6858 nxl_on_file,nxr_on_file ) 6859 6860 CASE ( 't_soil_v(2)' ) 6861 6862 IF ( k == 1 ) THEN 6863 IF ( .NOT. ALLOCATED( t_soil_v(2)%var_2d ) ) & 6864 ALLOCATE( t_soil_v(2)%var_2d(nzb_soil:nzt_soil+1, & 6865 1:surf_lsm_v(2)%ns) ) 6866 READ ( 13 ) tmp_walltype_v_2d(2)%var_2d 6867 ENDIF 6868 CALL surface_restore_elements( & 6869 t_soil_v(2)%var_2d, & 6870 tmp_walltype_v_2d(2)%var_2d, & 6871 surf_lsm_v(2)%start_index, & 6872 start_index_on_file, & 6873 end_index_on_file, & 6874 nxlc, nysc, & 6875 nxlf, nxrf, nysf, nynf, & 6876 nys_on_file, nyn_on_file, & 6877 nxl_on_file,nxr_on_file ) 6878 6879 CASE ( 't_soil_v(3)' ) 6880 6881 IF ( k == 1 ) THEN 6882 IF ( .NOT. ALLOCATED( t_soil_v(3)%var_2d ) ) & 6883 ALLOCATE( t_soil_v(1)%var_2d(nzb_soil:nzt_soil+1, & 6884 1:surf_lsm_v(3)%ns) ) 6885 READ ( 13 ) tmp_walltype_v_2d(3)%var_2d 6886 ENDIF 6887 CALL surface_restore_elements( & 6888 t_soil_v(3)%var_2d, & 6889 tmp_walltype_v_2d(3)%var_2d, & 6890 surf_lsm_v(3)%start_index, & 6891 start_index_on_file, & 6892 end_index_on_file, & 6893 nxlc, nysc, & 6894 nxlf, nxrf, nysf, nynf, & 6895 nys_on_file, nyn_on_file, & 6896 nxl_on_file,nxr_on_file ) 6897 6898 CASE ( 'm_soil_h' ) 6899 6900 IF ( k == 1 ) THEN 6901 IF ( .NOT. ALLOCATED( m_soil_h%var_2d ) ) & 6902 ALLOCATE( m_soil_h%var_2d(nzb_soil:nzt_soil+1, & 6903 1:surf_lsm_h%ns) ) 6904 READ ( 13 ) tmp_walltype_h_2d2%var_2d 6905 ENDIF 6906 CALL surface_restore_elements( & 6907 m_soil_h%var_2d, & 6908 tmp_walltype_h_2d2%var_2d, & 6909 surf_lsm_h%start_index, & 6910 start_index_on_file, & 6911 end_index_on_file, & 6912 nxlc, nysc, & 6913 nxlf, nxrf, nysf, nynf, & 6914 nys_on_file, nyn_on_file, & 6915 nxl_on_file,nxr_on_file ) 6916 6917 CASE ( 'm_soil_v(0)' ) 6918 6919 IF ( k == 1 ) THEN 6920 IF ( .NOT. ALLOCATED( m_soil_v(0)%var_2d ) ) & 6921 ALLOCATE( m_soil_v(0)%var_2d(nzb_soil:nzt_soil+1, & 6922 1:surf_lsm_v(0)%ns) ) 6923 READ ( 13 ) tmp_walltype_v_2d2(0)%var_2d 6924 ENDIF 6925 CALL surface_restore_elements( & 6926 m_soil_v(0)%var_2d, & 6927 tmp_walltype_v_2d2(0)%var_2d, & 6928 surf_lsm_v(0)%start_index, & 6648 SELECT CASE ( restart_string(1:length) ) 6649 6650 CASE ( 'ns_h_on_file_lsm' ) 6651 IF ( k == 1 ) THEN 6652 READ ( 13 ) ns_h_on_file_lsm 6653 6654 IF ( ALLOCATED( tmp_walltype_h_1d%var_1d ) ) & 6655 DEALLOCATE( tmp_walltype_h_1d%var_1d ) 6656 IF ( ALLOCATED( tmp_walltype_h_2d%var_2d ) ) & 6657 DEALLOCATE( tmp_walltype_h_2d%var_2d ) 6658 IF ( ALLOCATED( tmp_walltype_h_2d2%var_2d ) ) & 6659 DEALLOCATE( tmp_walltype_h_2d2%var_2d ) 6660 6661 ! 6662 !-- Allocate temporary arrays to store surface data 6663 ALLOCATE( tmp_walltype_h_1d%var_1d(1:ns_h_on_file_lsm) ) 6664 ALLOCATE( tmp_walltype_h_2d%var_2d(nzb_soil:nzt_soil+1, & 6665 1:ns_h_on_file_lsm) ) 6666 ALLOCATE( tmp_walltype_h_2d2%var_2d(nzb_soil:nzt_soil, & 6667 1:ns_h_on_file_lsm) ) 6668 6669 ENDIF 6670 6671 CASE ( 'ns_v_on_file_lsm' ) 6672 IF ( k == 1 ) THEN 6673 READ ( 13 ) ns_v_on_file_lsm 6674 6675 DO l = 0, 3 6676 IF ( ALLOCATED( tmp_walltype_v_1d(l)%var_1d ) ) & 6677 DEALLOCATE( tmp_walltype_v_1d(l)%var_1d ) 6678 IF ( ALLOCATED( tmp_walltype_v_2d(l)%var_2d ) ) & 6679 DEALLOCATE( tmp_walltype_v_2d(l)%var_2d ) 6680 IF ( ALLOCATED( tmp_walltype_v_2d2(l)%var_2d ) ) & 6681 DEALLOCATE( tmp_walltype_v_2d2(l)%var_2d ) 6682 ENDDO 6683 6684 ! 6685 !-- Allocate temporary arrays to store surface data 6686 DO l = 0, 3 6687 ALLOCATE( tmp_walltype_v_1d(l) & 6688 %var_1d(1:ns_v_on_file_lsm(l)) ) 6689 ALLOCATE( tmp_walltype_v_2d(l) & 6690 %var_2d(nzb_soil:nzt_soil+1, & 6691 1:ns_v_on_file_lsm(l)) ) 6692 ALLOCATE( tmp_walltype_v_2d2(l) & 6693 %var_2d(nzb_soil:nzt_soil, & 6694 1:ns_v_on_file_lsm(l)) ) 6695 ENDDO 6696 6697 ENDIF 6698 6699 6700 CASE ( 'c_liq_av' ) 6701 IF ( .NOT. ALLOCATED( c_liq_av ) ) THEN 6702 ALLOCATE( c_liq_av(nysg:nyng,nxlg:nxrg) ) 6703 ENDIF 6704 IF ( k == 1 ) READ ( 13 ) tmp_2d 6705 c_liq_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 6706 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 6707 6708 CASE ( 'c_soil_av' ) 6709 IF ( .NOT. ALLOCATED( c_soil_av ) ) THEN 6710 ALLOCATE( c_soil_av(nysg:nyng,nxlg:nxrg) ) 6711 ENDIF 6712 IF ( k == 1 ) READ ( 13 ) tmp_2d 6713 c_soil_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 6714 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 6715 6716 CASE ( 'c_veg_av' ) 6717 IF ( .NOT. ALLOCATED( c_veg_av ) ) THEN 6718 ALLOCATE( c_veg_av(nysg:nyng,nxlg:nxrg) ) 6719 ENDIF 6720 IF ( k == 1 ) READ ( 13 ) tmp_2d 6721 c_veg_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 6722 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 6723 6724 CASE ( 'lai_av' ) 6725 IF ( .NOT. ALLOCATED( lai_av ) ) THEN 6726 ALLOCATE( lai_av(nysg:nyng,nxlg:nxrg) ) 6727 ENDIF 6728 IF ( k == 1 ) READ ( 13 ) tmp_2d 6729 lai_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 6730 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 6731 6732 CASE ( 'm_liq_av' ) 6733 IF ( .NOT. ALLOCATED( m_liq_av ) ) THEN 6734 ALLOCATE( m_liq_av(nysg:nyng,nxlg:nxrg) ) 6735 ENDIF 6736 IF ( k == 1 ) READ ( 13 ) tmp_2d 6737 m_liq_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 6738 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 6739 6740 CASE ( 'm_soil_av' ) 6741 IF ( .NOT. ALLOCATED( m_soil_av ) ) THEN 6742 ALLOCATE( m_soil_av(nzb_soil:nzt_soil,nysg:nyng,nxlg:nxrg) ) 6743 ENDIF 6744 IF ( k == 1 ) READ ( 13 ) tmp_3d(:,:,:) 6745 m_soil_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 6746 tmp_3d(nzb_soil:nzt_soil,nysf & 6747 -nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 6748 6749 CASE ( 'qsws_liq_av' ) 6750 IF ( .NOT. ALLOCATED( qsws_liq_av ) ) THEN 6751 ALLOCATE( qsws_liq_av(nysg:nyng,nxlg:nxrg) ) 6752 ENDIF 6753 IF ( k == 1 ) READ ( 13 ) tmp_2d 6754 qsws_liq_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 6755 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 6756 CASE ( 'qsws_soil_av' ) 6757 IF ( .NOT. ALLOCATED( qsws_soil_av ) ) THEN 6758 ALLOCATE( qsws_soil_av(nysg:nyng,nxlg:nxrg) ) 6759 ENDIF 6760 IF ( k == 1 ) READ ( 13 ) tmp_2d 6761 qsws_soil_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 6762 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 6763 6764 CASE ( 'qsws_veg_av' ) 6765 IF ( .NOT. ALLOCATED( qsws_veg_av ) ) THEN 6766 ALLOCATE( qsws_veg_av(nysg:nyng,nxlg:nxrg) ) 6767 ENDIF 6768 IF ( k == 1 ) READ ( 13 ) tmp_2d 6769 qsws_veg_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 6770 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 6771 6772 CASE ( 't_soil_av' ) 6773 IF ( .NOT. ALLOCATED( t_soil_av ) ) THEN 6774 ALLOCATE( t_soil_av(nzb_soil:nzt_soil,nysg:nyng,nxlg:nxrg) ) 6775 ENDIF 6776 IF ( k == 1 ) READ ( 13 ) tmp_3d(:,:,:) 6777 t_soil_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 6778 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 6779 6780 CASE ( 'lsm_start_index_h', 'lsm_start_index_v' ) 6781 IF ( k == 1 ) THEN 6782 6783 IF ( ALLOCATED( start_index_on_file ) ) & 6784 DEALLOCATE( start_index_on_file ) 6785 6786 ALLOCATE ( start_index_on_file(nys_on_file:nyn_on_file, & 6787 nxl_on_file:nxr_on_file) ) 6788 6789 READ ( 13 ) start_index_on_file 6790 6791 ENDIF 6792 6793 CASE ( 'lsm_end_index_h', 'lsm_end_index_v' ) 6794 IF ( k == 1 ) THEN 6795 6796 IF ( ALLOCATED( end_index_on_file ) ) & 6797 DEALLOCATE( end_index_on_file ) 6798 6799 ALLOCATE ( end_index_on_file(nys_on_file:nyn_on_file, & 6800 nxl_on_file:nxr_on_file) ) 6801 6802 READ ( 13 ) end_index_on_file 6803 6804 ENDIF 6805 6806 CASE ( 't_soil_h' ) 6807 6808 IF ( k == 1 ) THEN 6809 IF ( .NOT. ALLOCATED( t_soil_h%var_2d ) ) & 6810 ALLOCATE( t_soil_h%var_2d(nzb_soil:nzt_soil+1, & 6811 1:surf_lsm_h%ns) ) 6812 READ ( 13 ) tmp_walltype_h_2d%var_2d 6813 ENDIF 6814 CALL surface_restore_elements( & 6815 t_soil_h%var_2d, & 6816 tmp_walltype_h_2d%var_2d, & 6817 surf_lsm_h%start_index, & 6929 6818 start_index_on_file, & 6930 6819 end_index_on_file, & … … 6932 6821 nxlf, nxrf, nysf, nynf, & 6933 6822 nys_on_file, nyn_on_file, & 6934 nxl_on_file,nxr_on_file ) 6935 6936 CASE ( 'm_soil_v(1)' ) 6937 6938 IF ( k == 1 ) THEN 6939 IF ( .NOT. ALLOCATED( m_soil_v(1)%var_2d ) ) & 6940 ALLOCATE( m_soil_v(1)%var_2d(nzb_soil:nzt_soil+1, & 6941 1:surf_lsm_v(1)%ns) ) 6942 READ ( 13 ) tmp_walltype_v_2d2(1)%var_2d 6943 ENDIF 6944 CALL surface_restore_elements( & 6945 m_soil_v(1)%var_2d, & 6946 tmp_walltype_v_2d2(1)%var_2d, & 6947 surf_lsm_v(1)%start_index, & 6823 nxl_on_file,nxr_on_file ) 6824 6825 CASE ( 't_soil_v(0)' ) 6826 6827 IF ( k == 1 ) THEN 6828 IF ( .NOT. ALLOCATED( t_soil_v(0)%var_2d ) ) & 6829 ALLOCATE( t_soil_v(0)%var_2d(nzb_soil:nzt_soil+1, & 6830 1:surf_lsm_v(0)%ns) ) 6831 READ ( 13 ) tmp_walltype_v_2d(0)%var_2d 6832 ENDIF 6833 CALL surface_restore_elements( & 6834 t_soil_v(0)%var_2d, & 6835 tmp_walltype_v_2d(0)%var_2d, & 6836 surf_lsm_v(0)%start_index, & 6837 start_index_on_file, & 6838 end_index_on_file, & 6839 nxlc, nysc, & 6840 nxlf, nxrf, nysf, nynf, & 6841 nys_on_file, nyn_on_file, & 6842 nxl_on_file,nxr_on_file ) 6843 6844 CASE ( 't_soil_v(1)' ) 6845 6846 IF ( k == 1 ) THEN 6847 IF ( .NOT. ALLOCATED( t_soil_v(1)%var_2d ) ) & 6848 ALLOCATE( t_soil_v(1)%var_2d(nzb_soil:nzt_soil+1, & 6849 1:surf_lsm_v(1)%ns) ) 6850 READ ( 13 ) tmp_walltype_v_2d(1)%var_2d 6851 ENDIF 6852 CALL surface_restore_elements( & 6853 t_soil_v(1)%var_2d, & 6854 tmp_walltype_v_2d(1)%var_2d, & 6855 surf_lsm_v(1)%start_index, & 6856 start_index_on_file, & 6857 end_index_on_file, & 6858 nxlc, nysc, & 6859 nxlf, nxrf, nysf, nynf, & 6860 nys_on_file, nyn_on_file, & 6861 nxl_on_file,nxr_on_file ) 6862 6863 CASE ( 't_soil_v(2)' ) 6864 6865 IF ( k == 1 ) THEN 6866 IF ( .NOT. ALLOCATED( t_soil_v(2)%var_2d ) ) & 6867 ALLOCATE( t_soil_v(2)%var_2d(nzb_soil:nzt_soil+1, & 6868 1:surf_lsm_v(2)%ns) ) 6869 READ ( 13 ) tmp_walltype_v_2d(2)%var_2d 6870 ENDIF 6871 CALL surface_restore_elements( & 6872 t_soil_v(2)%var_2d, & 6873 tmp_walltype_v_2d(2)%var_2d, & 6874 surf_lsm_v(2)%start_index, & 6875 start_index_on_file, & 6876 end_index_on_file, & 6877 nxlc, nysc, & 6878 nxlf, nxrf, nysf, nynf, & 6879 nys_on_file, nyn_on_file, & 6880 nxl_on_file,nxr_on_file ) 6881 6882 CASE ( 't_soil_v(3)' ) 6883 6884 IF ( k == 1 ) THEN 6885 IF ( .NOT. ALLOCATED( t_soil_v(3)%var_2d ) ) & 6886 ALLOCATE( t_soil_v(1)%var_2d(nzb_soil:nzt_soil+1, & 6887 1:surf_lsm_v(3)%ns) ) 6888 READ ( 13 ) tmp_walltype_v_2d(3)%var_2d 6889 ENDIF 6890 CALL surface_restore_elements( & 6891 t_soil_v(3)%var_2d, & 6892 tmp_walltype_v_2d(3)%var_2d, & 6893 surf_lsm_v(3)%start_index, & 6894 start_index_on_file, & 6895 end_index_on_file, & 6896 nxlc, nysc, & 6897 nxlf, nxrf, nysf, nynf, & 6898 nys_on_file, nyn_on_file, & 6899 nxl_on_file,nxr_on_file ) 6900 6901 CASE ( 'm_soil_h' ) 6902 6903 IF ( k == 1 ) THEN 6904 IF ( .NOT. ALLOCATED( m_soil_h%var_2d ) ) & 6905 ALLOCATE( m_soil_h%var_2d(nzb_soil:nzt_soil+1, & 6906 1:surf_lsm_h%ns) ) 6907 READ ( 13 ) tmp_walltype_h_2d2%var_2d 6908 ENDIF 6909 CALL surface_restore_elements( & 6910 m_soil_h%var_2d, & 6911 tmp_walltype_h_2d2%var_2d, & 6912 surf_lsm_h%start_index, & 6913 start_index_on_file, & 6914 end_index_on_file, & 6915 nxlc, nysc, & 6916 nxlf, nxrf, nysf, nynf, & 6917 nys_on_file, nyn_on_file, & 6918 nxl_on_file,nxr_on_file ) 6919 6920 CASE ( 'm_soil_v(0)' ) 6921 6922 IF ( k == 1 ) THEN 6923 IF ( .NOT. ALLOCATED( m_soil_v(0)%var_2d ) ) & 6924 ALLOCATE( m_soil_v(0)%var_2d(nzb_soil:nzt_soil+1, & 6925 1:surf_lsm_v(0)%ns) ) 6926 READ ( 13 ) tmp_walltype_v_2d2(0)%var_2d 6927 ENDIF 6928 CALL surface_restore_elements( & 6929 m_soil_v(0)%var_2d, & 6930 tmp_walltype_v_2d2(0)%var_2d, & 6931 surf_lsm_v(0)%start_index, & 6932 start_index_on_file, & 6933 end_index_on_file, & 6934 nxlc, nysc, & 6935 nxlf, nxrf, nysf, nynf, & 6936 nys_on_file, nyn_on_file, & 6937 nxl_on_file,nxr_on_file ) 6938 6939 CASE ( 'm_soil_v(1)' ) 6940 6941 IF ( k == 1 ) THEN 6942 IF ( .NOT. ALLOCATED( m_soil_v(1)%var_2d ) ) & 6943 ALLOCATE( m_soil_v(1)%var_2d(nzb_soil:nzt_soil+1, & 6944 1:surf_lsm_v(1)%ns) ) 6945 READ ( 13 ) tmp_walltype_v_2d2(1)%var_2d 6946 ENDIF 6947 CALL surface_restore_elements( & 6948 m_soil_v(1)%var_2d, & 6949 tmp_walltype_v_2d2(1)%var_2d, & 6950 surf_lsm_v(1)%start_index, & 6951 start_index_on_file, & 6952 end_index_on_file, & 6953 nxlc, nysc, & 6954 nxlf, nxrf, nysf, nynf, & 6955 nys_on_file, nyn_on_file, & 6956 nxl_on_file,nxr_on_file ) 6957 6958 6959 CASE ( 'm_soil_v(2)' ) 6960 6961 IF ( k == 1 ) THEN 6962 IF ( .NOT. ALLOCATED( m_soil_v(2)%var_2d ) ) & 6963 ALLOCATE( m_soil_v(2)%var_2d(nzb_soil:nzt_soil+1, & 6964 1:surf_lsm_v(2)%ns) ) 6965 READ ( 13 ) tmp_walltype_v_2d2(2)%var_2d 6966 ENDIF 6967 CALL surface_restore_elements( & 6968 m_soil_v(2)%var_2d, & 6969 tmp_walltype_v_2d2(2)%var_2d, & 6970 surf_lsm_v(2)%start_index, & 6971 start_index_on_file, & 6972 end_index_on_file, & 6973 nxlc, nysc, & 6974 nxlf, nxrf, nysf, nynf, & 6975 nys_on_file, nyn_on_file, & 6976 nxl_on_file,nxr_on_file ) 6977 6978 6979 CASE ( 'm_soil_v(3)' ) 6980 6981 IF ( k == 1 ) THEN 6982 IF ( .NOT. ALLOCATED( m_soil_v(3)%var_2d ) ) & 6983 ALLOCATE( m_soil_v(1)%var_2d(nzb_soil:nzt_soil+1, & 6984 1:surf_lsm_v(3)%ns) ) 6985 READ ( 13 ) tmp_walltype_v_2d2(3)%var_2d 6986 ENDIF 6987 CALL surface_restore_elements( & 6988 m_soil_v(3)%var_2d, & 6989 tmp_walltype_v_2d2(3)%var_2d, & 6990 surf_lsm_v(3)%start_index, & 6991 start_index_on_file, & 6992 end_index_on_file, & 6993 nxlc, nysc, & 6994 nxlf, nxrf, nysf, nynf, & 6995 nys_on_file, nyn_on_file, & 6996 nxl_on_file,nxr_on_file ) 6997 6998 6999 CASE ( 'm_liq_h' ) 7000 7001 IF ( k == 1 ) THEN 7002 IF ( .NOT. ALLOCATED( m_liq_h%var_1d ) ) & 7003 ALLOCATE( m_liq_h%var_1d(1:surf_lsm_h%ns) ) 7004 READ ( 13 ) tmp_walltype_h_1d%var_1d 7005 ENDIF 7006 CALL surface_restore_elements( & 7007 m_liq_h%var_1d, & 7008 tmp_walltype_h_1d%var_1d, & 7009 surf_lsm_h%start_index, & 6948 7010 start_index_on_file, & 6949 7011 end_index_on_file, & … … 6951 7013 nxlf, nxrf, nysf, nynf, & 6952 7014 nys_on_file, nyn_on_file, & 6953 nxl_on_file,nxr_on_file ) 6954 6955 6956 CASE ( 'm_soil_v(2)' ) 6957 6958 IF ( k == 1 ) THEN 6959 IF ( .NOT. ALLOCATED( m_soil_v(2)%var_2d ) ) & 6960 ALLOCATE( m_soil_v(2)%var_2d(nzb_soil:nzt_soil+1, & 6961 1:surf_lsm_v(2)%ns) ) 6962 READ ( 13 ) tmp_walltype_v_2d2(2)%var_2d 6963 ENDIF 6964 CALL surface_restore_elements( & 6965 m_soil_v(2)%var_2d, & 6966 tmp_walltype_v_2d2(2)%var_2d, & 6967 surf_lsm_v(2)%start_index, & 7015 nxl_on_file,nxr_on_file ) 7016 7017 7018 CASE ( 'm_liq_v(0)' ) 7019 7020 IF ( k == 1 ) THEN 7021 IF ( .NOT. ALLOCATED( m_liq_v(0)%var_1d ) ) & 7022 ALLOCATE( m_liq_v(0)%var_1d(1:surf_lsm_v(0)%ns) ) 7023 READ ( 13 ) tmp_walltype_v_1d(0)%var_1d 7024 ENDIF 7025 CALL surface_restore_elements( & 7026 m_liq_v(0)%var_1d, & 7027 tmp_walltype_v_1d(0)%var_1d, & 7028 surf_lsm_v(0)%start_index, & 7029 start_index_on_file, & 7030 end_index_on_file, & 7031 nxlc, nysc, & 7032 nxlf, nxrf, nysf, nynf, & 7033 nys_on_file, nyn_on_file, & 7034 nxl_on_file,nxr_on_file ) 7035 7036 7037 CASE ( 'm_liq_v(1)' ) 7038 7039 IF ( k == 1 ) THEN 7040 IF ( .NOT. ALLOCATED( m_liq_v(1)%var_1d ) ) & 7041 ALLOCATE( m_liq_v(1)%var_1d(1:surf_lsm_v(1)%ns) ) 7042 READ ( 13 ) tmp_walltype_v_1d(1)%var_1d 7043 ENDIF 7044 CALL surface_restore_elements( & 7045 m_liq_v(1)%var_1d, & 7046 tmp_walltype_v_1d(1)%var_1d, & 7047 surf_lsm_v(1)%start_index, & 7048 start_index_on_file, & 7049 end_index_on_file, & 7050 nxlc, nysc, & 7051 nxlf, nxrf, nysf, nynf, & 7052 nys_on_file, nyn_on_file, & 7053 nxl_on_file,nxr_on_file ) 7054 7055 7056 CASE ( 'm_liq_v(2)' ) 7057 7058 IF ( k == 1 ) THEN 7059 IF ( .NOT. ALLOCATED( m_liq_v(2)%var_1d ) ) & 7060 ALLOCATE( m_liq_v(2)%var_1d(1:surf_lsm_v(2)%ns) ) 7061 READ ( 13 ) tmp_walltype_v_1d(2)%var_1d 7062 ENDIF 7063 CALL surface_restore_elements( & 7064 m_liq_v(2)%var_1d, & 7065 tmp_walltype_v_1d(2)%var_1d, & 7066 surf_lsm_v(2)%start_index, & 7067 start_index_on_file, & 7068 end_index_on_file, & 7069 nxlc, nysc, & 7070 nxlf, nxrf, nysf, nynf, & 7071 nys_on_file, nyn_on_file, & 7072 nxl_on_file,nxr_on_file ) 7073 7074 CASE ( 'm_liq_v(3)' ) 7075 7076 IF ( k == 1 ) THEN 7077 IF ( .NOT. ALLOCATED( m_liq_v(3)%var_1d ) ) & 7078 ALLOCATE( m_liq_v(3)%var_1d(1:surf_lsm_v(3)%ns) ) 7079 READ ( 13 ) tmp_walltype_v_1d(3)%var_1d 7080 ENDIF 7081 CALL surface_restore_elements( & 7082 m_liq_v(3)%var_1d, & 7083 tmp_walltype_v_1d(3)%var_1d, & 7084 surf_lsm_v(3)%start_index, & 7085 start_index_on_file, & 7086 end_index_on_file, & 7087 nxlc, nysc, & 7088 nxlf, nxrf, nysf, nynf, & 7089 nys_on_file, nyn_on_file, & 7090 nxl_on_file,nxr_on_file ) 7091 7092 7093 CASE ( 't_surface_h' ) 7094 7095 IF ( k == 1 ) THEN 7096 IF ( .NOT. ALLOCATED( t_surface_h%var_1d ) ) & 7097 ALLOCATE( t_surface_h%var_1d(1:surf_lsm_h%ns) ) 7098 READ ( 13 ) tmp_walltype_h_1d%var_1d 7099 ENDIF 7100 CALL surface_restore_elements( & 7101 t_surface_h%var_1d, & 7102 tmp_walltype_h_1d%var_1d, & 7103 surf_lsm_h%start_index, & 6968 7104 start_index_on_file, & 6969 7105 end_index_on_file, & … … 6971 7107 nxlf, nxrf, nysf, nynf, & 6972 7108 nys_on_file, nyn_on_file, & 6973 nxl_on_file,nxr_on_file ) 6974 6975 6976 CASE ( 'm_soil_v(3)' ) 6977 6978 IF ( k == 1 ) THEN 6979 IF ( .NOT. ALLOCATED( m_soil_v(3)%var_2d ) ) & 6980 ALLOCATE( m_soil_v(1)%var_2d(nzb_soil:nzt_soil+1, & 6981 1:surf_lsm_v(3)%ns) ) 6982 READ ( 13 ) tmp_walltype_v_2d2(3)%var_2d 6983 ENDIF 6984 CALL surface_restore_elements( & 6985 m_soil_v(3)%var_2d, & 6986 tmp_walltype_v_2d2(3)%var_2d, & 6987 surf_lsm_v(3)%start_index, & 6988 start_index_on_file, & 6989 end_index_on_file, & 6990 nxlc, nysc, & 6991 nxlf, nxrf, nysf, nynf, & 6992 nys_on_file, nyn_on_file, & 6993 nxl_on_file,nxr_on_file ) 6994 6995 6996 CASE ( 'm_liq_h' ) 6997 6998 IF ( k == 1 ) THEN 6999 IF ( .NOT. ALLOCATED( m_liq_h%var_1d ) ) & 7000 ALLOCATE( m_liq_h%var_1d(1:surf_lsm_h%ns) ) 7001 READ ( 13 ) tmp_walltype_h_1d%var_1d 7002 ENDIF 7003 CALL surface_restore_elements( & 7004 m_liq_h%var_1d, & 7005 tmp_walltype_h_1d%var_1d, & 7006 surf_lsm_h%start_index, & 7007 start_index_on_file, & 7008 end_index_on_file, & 7009 nxlc, nysc, & 7010 nxlf, nxrf, nysf, nynf, & 7011 nys_on_file, nyn_on_file, & 7012 nxl_on_file,nxr_on_file ) 7013 7014 7015 CASE ( 'm_liq_v(0)' ) 7016 7017 IF ( k == 1 ) THEN 7018 IF ( .NOT. ALLOCATED( m_liq_v(0)%var_1d ) ) & 7019 ALLOCATE( m_liq_v(0)%var_1d(1:surf_lsm_v(0)%ns) ) 7020 READ ( 13 ) tmp_walltype_v_1d(0)%var_1d 7021 ENDIF 7022 CALL surface_restore_elements( & 7023 m_liq_v(0)%var_1d, & 7024 tmp_walltype_v_1d(0)%var_1d, & 7025 surf_lsm_v(0)%start_index, & 7026 start_index_on_file, & 7027 end_index_on_file, & 7028 nxlc, nysc, & 7029 nxlf, nxrf, nysf, nynf, & 7030 nys_on_file, nyn_on_file, & 7031 nxl_on_file,nxr_on_file ) 7032 7033 7034 CASE ( 'm_liq_v(1)' ) 7035 7036 IF ( k == 1 ) THEN 7037 IF ( .NOT. ALLOCATED( m_liq_v(1)%var_1d ) ) & 7038 ALLOCATE( m_liq_v(1)%var_1d(1:surf_lsm_v(1)%ns) ) 7039 READ ( 13 ) tmp_walltype_v_1d(1)%var_1d 7040 ENDIF 7041 CALL surface_restore_elements( & 7042 m_liq_v(1)%var_1d, & 7043 tmp_walltype_v_1d(1)%var_1d, & 7044 surf_lsm_v(1)%start_index, & 7045 start_index_on_file, & 7046 end_index_on_file, & 7047 nxlc, nysc, & 7048 nxlf, nxrf, nysf, nynf, & 7049 nys_on_file, nyn_on_file, & 7050 nxl_on_file,nxr_on_file ) 7051 7052 7053 CASE ( 'm_liq_v(2)' ) 7054 7055 IF ( k == 1 ) THEN 7056 IF ( .NOT. ALLOCATED( m_liq_v(2)%var_1d ) ) & 7057 ALLOCATE( m_liq_v(2)%var_1d(1:surf_lsm_v(2)%ns) ) 7058 READ ( 13 ) tmp_walltype_v_1d(2)%var_1d 7059 ENDIF 7060 CALL surface_restore_elements( & 7061 m_liq_v(2)%var_1d, & 7062 tmp_walltype_v_1d(2)%var_1d, & 7063 surf_lsm_v(2)%start_index, & 7064 start_index_on_file, & 7065 end_index_on_file, & 7066 nxlc, nysc, & 7067 nxlf, nxrf, nysf, nynf, & 7068 nys_on_file, nyn_on_file, & 7069 nxl_on_file,nxr_on_file ) 7070 7071 CASE ( 'm_liq_v(3)' ) 7072 7073 IF ( k == 1 ) THEN 7074 IF ( .NOT. ALLOCATED( m_liq_v(3)%var_1d ) ) & 7075 ALLOCATE( m_liq_v(3)%var_1d(1:surf_lsm_v(3)%ns) ) 7076 READ ( 13 ) tmp_walltype_v_1d(3)%var_1d 7077 ENDIF 7078 CALL surface_restore_elements( & 7079 m_liq_v(3)%var_1d, & 7080 tmp_walltype_v_1d(3)%var_1d, & 7081 surf_lsm_v(3)%start_index, & 7082 start_index_on_file, & 7083 end_index_on_file, & 7084 nxlc, nysc, & 7085 nxlf, nxrf, nysf, nynf, & 7086 nys_on_file, nyn_on_file, & 7087 nxl_on_file,nxr_on_file ) 7088 7089 7090 CASE ( 't_surface_h' ) 7091 7092 IF ( k == 1 ) THEN 7093 IF ( .NOT. ALLOCATED( t_surface_h%var_1d ) ) & 7094 ALLOCATE( t_surface_h%var_1d(1:surf_lsm_h%ns) ) 7095 READ ( 13 ) tmp_walltype_h_1d%var_1d 7096 ENDIF 7097 CALL surface_restore_elements( & 7098 t_surface_h%var_1d, & 7099 tmp_walltype_h_1d%var_1d, & 7100 surf_lsm_h%start_index, & 7101 start_index_on_file, & 7102 end_index_on_file, & 7103 nxlc, nysc, & 7104 nxlf, nxrf, nysf, nynf, & 7105 nys_on_file, nyn_on_file, & 7106 nxl_on_file,nxr_on_file ) 7107 7108 CASE ( 't_surface_v(0)' ) 7109 7110 IF ( k == 1 ) THEN 7111 IF ( .NOT. ALLOCATED( t_surface_v(0)%var_1d ) ) & 7112 ALLOCATE( t_surface_v(0)%var_1d(1:surf_lsm_v(0)%ns) ) 7113 READ ( 13 ) tmp_walltype_v_1d(0)%var_1d 7114 ENDIF 7115 CALL surface_restore_elements( & 7116 t_surface_v(0)%var_1d, & 7117 tmp_walltype_v_1d(0)%var_1d, & 7118 surf_lsm_v(0)%start_index, & 7119 start_index_on_file, & 7120 end_index_on_file, & 7121 nxlc, nysc, & 7122 nxlf, nxrf, nysf, nynf, & 7123 nys_on_file, nyn_on_file, & 7124 nxl_on_file,nxr_on_file ) 7125 7126 CASE ( 't_surface_v(1)' ) 7127 7128 IF ( k == 1 ) THEN 7129 IF ( .NOT. ALLOCATED( t_surface_v(1)%var_1d ) ) & 7130 ALLOCATE( t_surface_v(1)%var_1d(1:surf_lsm_v(1)%ns) ) 7131 READ ( 13 ) tmp_walltype_v_1d(1)%var_1d 7132 ENDIF 7133 CALL surface_restore_elements( & 7134 t_surface_v(1)%var_1d, & 7135 tmp_walltype_v_1d(1)%var_1d, & 7136 surf_lsm_v(1)%start_index, & 7137 start_index_on_file, & 7138 end_index_on_file, & 7139 nxlc, nysc, & 7140 nxlf, nxrf, nysf, nynf, & 7141 nys_on_file, nyn_on_file, & 7142 nxl_on_file,nxr_on_file ) 7143 7144 CASE ( 't_surface_v(2)' ) 7145 7146 IF ( k == 1 ) THEN 7147 IF ( .NOT. ALLOCATED( t_surface_v(2)%var_1d ) ) & 7148 ALLOCATE( t_surface_v(2)%var_1d(1:surf_lsm_v(2)%ns) ) 7149 READ ( 13 ) tmp_walltype_v_1d(2)%var_1d 7150 ENDIF 7151 CALL surface_restore_elements( & 7152 t_surface_v(2)%var_1d, & 7153 tmp_walltype_v_1d(2)%var_1d, & 7154 surf_lsm_v(2)%start_index, & 7155 start_index_on_file, & 7156 end_index_on_file, & 7157 nxlc, nysc, & 7158 nxlf, nxrf, nysf, nynf, & 7159 nys_on_file, nyn_on_file, & 7160 nxl_on_file,nxr_on_file ) 7161 7162 CASE ( 't_surface_v(3)' ) 7163 7164 IF ( k == 1 ) THEN 7165 IF ( .NOT. ALLOCATED( t_surface_v(3)%var_1d ) ) & 7166 ALLOCATE( t_surface_v(3)%var_1d(1:surf_lsm_v(3)%ns) ) 7167 READ ( 13 ) tmp_walltype_v_1d(3)%var_1d 7168 ENDIF 7169 CALL surface_restore_elements( & 7170 t_surface_v(3)%var_1d, & 7171 tmp_walltype_v_1d(3)%var_1d, & 7172 surf_lsm_v(3)%start_index, & 7173 start_index_on_file, & 7174 end_index_on_file, & 7175 nxlc, nysc, & 7176 nxlf, nxrf, nysf, nynf, & 7177 nys_on_file, nyn_on_file, & 7178 nxl_on_file,nxr_on_file ) 7179 7180 CASE DEFAULT 7181 7182 found = .FALSE. 7183 7184 END SELECT 7109 nxl_on_file,nxr_on_file ) 7110 7111 CASE ( 't_surface_v(0)' ) 7112 7113 IF ( k == 1 ) THEN 7114 IF ( .NOT. ALLOCATED( t_surface_v(0)%var_1d ) ) & 7115 ALLOCATE( t_surface_v(0)%var_1d(1:surf_lsm_v(0)%ns) ) 7116 READ ( 13 ) tmp_walltype_v_1d(0)%var_1d 7117 ENDIF 7118 CALL surface_restore_elements( & 7119 t_surface_v(0)%var_1d, & 7120 tmp_walltype_v_1d(0)%var_1d, & 7121 surf_lsm_v(0)%start_index, & 7122 start_index_on_file, & 7123 end_index_on_file, & 7124 nxlc, nysc, & 7125 nxlf, nxrf, nysf, nynf, & 7126 nys_on_file, nyn_on_file, & 7127 nxl_on_file,nxr_on_file ) 7128 7129 CASE ( 't_surface_v(1)' ) 7130 7131 IF ( k == 1 ) THEN 7132 IF ( .NOT. ALLOCATED( t_surface_v(1)%var_1d ) ) & 7133 ALLOCATE( t_surface_v(1)%var_1d(1:surf_lsm_v(1)%ns) ) 7134 READ ( 13 ) tmp_walltype_v_1d(1)%var_1d 7135 ENDIF 7136 CALL surface_restore_elements( & 7137 t_surface_v(1)%var_1d, & 7138 tmp_walltype_v_1d(1)%var_1d, & 7139 surf_lsm_v(1)%start_index, & 7140 start_index_on_file, & 7141 end_index_on_file, & 7142 nxlc, nysc, & 7143 nxlf, nxrf, nysf, nynf, & 7144 nys_on_file, nyn_on_file, & 7145 nxl_on_file,nxr_on_file ) 7146 7147 CASE ( 't_surface_v(2)' ) 7148 7149 IF ( k == 1 ) THEN 7150 IF ( .NOT. ALLOCATED( t_surface_v(2)%var_1d ) ) & 7151 ALLOCATE( t_surface_v(2)%var_1d(1:surf_lsm_v(2)%ns) ) 7152 READ ( 13 ) tmp_walltype_v_1d(2)%var_1d 7153 ENDIF 7154 CALL surface_restore_elements( & 7155 t_surface_v(2)%var_1d, & 7156 tmp_walltype_v_1d(2)%var_1d, & 7157 surf_lsm_v(2)%start_index, & 7158 start_index_on_file, & 7159 end_index_on_file, & 7160 nxlc, nysc, & 7161 nxlf, nxrf, nysf, nynf, & 7162 nys_on_file, nyn_on_file, & 7163 nxl_on_file,nxr_on_file ) 7164 7165 CASE ( 't_surface_v(3)' ) 7166 7167 IF ( k == 1 ) THEN 7168 IF ( .NOT. ALLOCATED( t_surface_v(3)%var_1d ) ) & 7169 ALLOCATE( t_surface_v(3)%var_1d(1:surf_lsm_v(3)%ns) ) 7170 READ ( 13 ) tmp_walltype_v_1d(3)%var_1d 7171 ENDIF 7172 CALL surface_restore_elements( & 7173 t_surface_v(3)%var_1d, & 7174 tmp_walltype_v_1d(3)%var_1d, & 7175 surf_lsm_v(3)%start_index, & 7176 start_index_on_file, & 7177 end_index_on_file, & 7178 nxlc, nysc, & 7179 nxlf, nxrf, nysf, nynf, & 7180 nys_on_file, nyn_on_file, & 7181 nxl_on_file,nxr_on_file ) 7182 7183 CASE DEFAULT 7184 7185 found = .FALSE. 7186 7187 END SELECT 7185 7188 7186 7189
Note: See TracChangeset
for help on using the changeset viewer.