Changeset 152 for palm/trunk/SOURCE
 Timestamp:
 Mar 7, 2008 5:13:10 PM (15 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

palm/trunk/SOURCE/init_3d_model.f90
r151 r152 755 755 756 756 ! 757 ! Calculate the initial volume flow at the right and north boundary 758 IF ( conserve_volume_flow ) THEN 759 760 volume_flow_initial_l = 0.0 761 volume_flow_area_l = 0.0 762 763 IF ( nxr == nx ) THEN 764 DO j = nys, nyn 765 DO k = nzb_2d(j,nx) + 1, nzt 766 volume_flow_initial_l(1) = volume_flow_initial_l(1) + & 767 u(k,j,nx) * dzu(k) 768 volume_flow_area_l(1) = volume_flow_area_l(1) + dzu(k) 769 ENDDO 770 ! 771 ! Correction if velocity at nzb+1 has been set zero further above 772 volume_flow_initial_l(1) = volume_flow_initial_l(1) + & 773 u_nzb_p1_for_vfc(j) 774 ENDDO 775 ENDIF 776 777 IF ( nyn == ny ) THEN 778 DO i = nxl, nxr 779 DO k = nzb_2d(ny,i) + 1, nzt 780 volume_flow_initial_l(2) = volume_flow_initial_l(2) + & 781 v(k,ny,i) * dzu(k) 782 volume_flow_area_l(2) = volume_flow_area_l(2) + dzu(k) 783 ENDDO 784 ! 785 ! Correction if velocity at nzb+1 has been set zero further above 786 volume_flow_initial_l(2) = volume_flow_initial_l(2) + & 787 v_nzb_p1_for_vfc(i) 788 ENDDO 789 ENDIF 790 791 #if defined( __parallel ) 792 CALL MPI_ALLREDUCE( volume_flow_initial_l(1), volume_flow_initial(1),& 793 2, MPI_REAL, MPI_SUM, comm2d, ierr ) 794 CALL MPI_ALLREDUCE( volume_flow_area_l(1), volume_flow_area(1), & 795 2, MPI_REAL, MPI_SUM, comm2d, ierr ) 796 #else 797 volume_flow_initial = volume_flow_initial_l 798 volume_flow_area = volume_flow_area_l 799 #endif 800 ENDIF 801 802 ! 757 803 ! For the moment, perturbation pressure and vertical velocity are zero 758 804 p = 0.0; w = 0.0 … … 918 964 ENDIF 919 965 920 921 !922 ! Read binary data from restart file923 WRITE (9,*) 'before read_3d_binary'924 CALL local_flush( 9 )925 CALL read_3d_binary926 WRITE (9,*) 'after read_3d_binary'927 CALL local_flush( 9 )928 929 !930 ! Calculate initial temperature field and other constants used in case931 ! of a sloping surface932 IF ( sloping_surface ) CALL init_slope933 934 !935 ! Initialize new time levels (only done in order to set boundary values936 ! including ghost points)937 e_p = e; pt_p = pt; u_p = u; v_p = v; w_p = w938 IF ( humidity .OR. passive_scalar ) q_p = q939 IF ( ocean ) sa_p = sa940 941 ELSE942 !943 ! Actually this part of the programm should not be reached944 IF ( myid == 0 ) PRINT*,'+++ init_3d_model: unknown initializing ', &945 'problem'946 CALL local_stop947 ENDIF948 949 950 IF ( TRIM( initializing_actions ) /= 'read_restart_data' ) THEN951 !952 ! Initialize old timelevels needed for radiation boundary conditions953 IF ( outflow_l ) THEN954 u_m_l(:,:,:) = u(:,:,1:2)955 v_m_l(:,:,:) = v(:,:,0:1)956 w_m_l(:,:,:) = w(:,:,0:1)957 ENDIF958 IF ( outflow_r ) THEN959 u_m_r(:,:,:) = u(:,:,nx1:nx)960 v_m_r(:,:,:) = v(:,:,nx1:nx)961 w_m_r(:,:,:) = w(:,:,nx1:nx)962 ENDIF963 IF ( outflow_s ) THEN964 u_m_s(:,:,:) = u(:,0:1,:)965 v_m_s(:,:,:) = v(:,1:2,:)966 w_m_s(:,:,:) = w(:,0:1,:)967 ENDIF968 IF ( outflow_n ) THEN969 u_m_n(:,:,:) = u(:,ny1:ny,:)970 v_m_n(:,:,:) = v(:,ny1:ny,:)971 w_m_n(:,:,:) = w(:,ny1:ny,:)972 ENDIF973 974 966 ! 975 967 ! Calculate the initial volume flow at the right and north boundary … … 1016 1008 volume_flow_area = volume_flow_area_l 1017 1009 #endif 1010 ENDIF 1011 1012 1013 ! 1014 ! Read binary data from restart file 1015 WRITE (9,*) 'before read_3d_binary' 1016 CALL local_flush( 9 ) 1017 CALL read_3d_binary 1018 WRITE (9,*) 'after read_3d_binary' 1019 CALL local_flush( 9 ) 1020 1021 ! 1022 ! Calculate initial temperature field and other constants used in case 1023 ! of a sloping surface 1024 IF ( sloping_surface ) CALL init_slope 1025 1026 ! 1027 ! Initialize new time levels (only done in order to set boundary values 1028 ! including ghost points) 1029 e_p = e; pt_p = pt; u_p = u; v_p = v; w_p = w 1030 IF ( humidity .OR. passive_scalar ) q_p = q 1031 IF ( ocean ) sa_p = sa 1032 1033 ELSE 1034 ! 1035 ! Actually this part of the programm should not be reached 1036 IF ( myid == 0 ) PRINT*,'+++ init_3d_model: unknown initializing ', & 1037 'problem' 1038 CALL local_stop 1039 ENDIF 1040 1041 1042 IF ( TRIM( initializing_actions ) /= 'read_restart_data' ) THEN 1043 ! 1044 ! Initialize old timelevels needed for radiation boundary conditions 1045 IF ( outflow_l ) THEN 1046 u_m_l(:,:,:) = u(:,:,1:2) 1047 v_m_l(:,:,:) = v(:,:,0:1) 1048 w_m_l(:,:,:) = w(:,:,0:1) 1049 ENDIF 1050 IF ( outflow_r ) THEN 1051 u_m_r(:,:,:) = u(:,:,nx1:nx) 1052 v_m_r(:,:,:) = v(:,:,nx1:nx) 1053 w_m_r(:,:,:) = w(:,:,nx1:nx) 1054 ENDIF 1055 IF ( outflow_s ) THEN 1056 u_m_s(:,:,:) = u(:,0:1,:) 1057 v_m_s(:,:,:) = v(:,1:2,:) 1058 w_m_s(:,:,:) = w(:,0:1,:) 1059 ENDIF 1060 IF ( outflow_n ) THEN 1061 u_m_n(:,:,:) = u(:,ny1:ny,:) 1062 v_m_n(:,:,:) = v(:,ny1:ny,:) 1063 w_m_n(:,:,:) = w(:,ny1:ny,:) 1018 1064 ENDIF 1019 1065
Note: See TracChangeset
for help on using the changeset viewer.