Changeset 2964 for palm/trunk
- Timestamp:
- Apr 12, 2018 4:04:03 PM (7 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/check_open.f90
r2957 r2964 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Error message moved to radiation_model_mod 28 ! 29 ! 2957 2018-04-11 08:48:06Z Giersch 27 30 ! Error message has been corrected in case of writing sky view factors 28 31 ! … … 167 170 168 171 USE control_parameters, & 169 ONLY: coupling_char, data_output_2d_on_each_pe, max_masks,&170 m essage_string, mid, nz_do3d, openfile, run_description_header,&171 run nr172 ONLY: coupling_char, data_output_2d_on_each_pe, & 173 max_masks, message_string, mid, nz_do3d, openfile, & 174 run_description_header, runnr 172 175 173 176 USE grid_variables, & … … 546 549 CASE ( 88 ) 547 550 548 IF (numprocs_previous_run /= numprocs) THEN549 WRITE( message_string, * ) 'A different number of processors', &550 ' between the run that has written', &551 ' the svf data and the one that will ',&552 ' read it is not allowed'553 CALL message( 'check_open', 'PA0484', 1, 2, 0, 6, 0 )554 ENDIF555 556 551 IF ( myid_char == '' ) THEN 557 552 OPEN ( 88, FILE='SVFIN'//TRIM( coupling_char )//myid_char, & … … 887 882 !-- actual run. 888 883 INQUIRE( FILE=filename, EXIST=netcdf_extend ) 889 890 884 IF ( netcdf_extend ) THEN 891 885 ! -
palm/trunk/SOURCE/check_parameters.f90
r2938 r2964 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Calculation of fixed number of output time levels for parallel netcdf output 28 ! has been revised (based on calculations in netcdf_interface_mod) 29 ! 30 ! 2938 2018-03-27 15:52:42Z suehring 27 31 ! - Revise start and end indices for imposing random disturbances in case of 28 32 ! nesting or large-scale forcing. … … 3689 3693 CALL check_dt_do( dt_do2d_yz, 'dt_do2d_yz' ) 3690 3694 3691 ntdim_3d(0) = CEILING( ( end_time - skip_time_do3d ) / dt_do3d ) 3695 !-- Set needed time levels (ntdim) to 3696 !-- saved time levels + to be saved time levels. 3697 ntdim_3d(0) = do3d_time_count(0) + CEILING( & 3698 ( end_time - MAX( skip_time_do3d, & 3699 simulated_time_at_begin ) & 3700 ) / dt_do3d ) 3692 3701 IF ( do3d_at_begin ) ntdim_3d(0) = ntdim_3d(0) + 1 3693 ntdim_3d(1) = CEILING( ( end_time - skip_time_data_output_av ) & 3694 / dt_data_output_av ) 3695 ntdim_2d_xy(0) = CEILING( ( end_time - skip_time_do2d_xy ) / dt_do2d_xy ) 3696 ntdim_2d_xz(0) = CEILING( ( end_time - skip_time_do2d_xz ) / dt_do2d_xz ) 3697 ntdim_2d_yz(0) = CEILING( ( end_time - skip_time_do2d_yz ) / dt_do2d_yz ) 3702 3703 ntdim_3d(1) = do3d_time_count(1) + CEILING( & 3704 ( end_time - MAX( skip_time_data_output_av, & 3705 simulated_time_at_begin ) & 3706 ) / dt_data_output_av ) 3707 3708 ntdim_2d_xy(0) = do2d_xy_time_count(0) + CEILING( & 3709 ( end_time - MAX( skip_time_do2d_xy, & 3710 simulated_time_at_begin ) & 3711 ) / dt_do2d_xy ) 3712 3713 ntdim_2d_xz(0) = do2d_xz_time_count(0) + CEILING( & 3714 ( end_time - MAX( skip_time_do2d_xz, & 3715 simulated_time_at_begin ) & 3716 ) / dt_do2d_xz ) 3717 3718 ntdim_2d_yz(0) = do2d_yz_time_count(0) + CEILING( & 3719 ( end_time - MAX( skip_time_do2d_yz, & 3720 simulated_time_at_begin ) & 3721 ) / dt_do2d_yz ) 3722 3698 3723 IF ( do2d_at_begin ) THEN 3699 3724 ntdim_2d_xy(0) = ntdim_2d_xy(0) + 1 … … 3701 3726 ntdim_2d_yz(0) = ntdim_2d_yz(0) + 1 3702 3727 ENDIF 3703 ntdim_2d_xy(1) = ntdim_3d(1) 3704 ntdim_2d_xz(1) = ntdim_3d(1) 3705 ntdim_2d_yz(1) = ntdim_3d(1) 3728 3729 ntdim_2d_xy(1) = do2d_xy_time_count(1) + CEILING( & 3730 ( end_time - MAX( skip_time_data_output_av, & 3731 simulated_time_at_begin ) & 3732 ) / dt_data_output_av ) 3733 3734 ntdim_2d_xz(1) = do2d_xz_time_count(1) + CEILING( & 3735 ( end_time - MAX( skip_time_data_output_av, & 3736 simulated_time_at_begin ) & 3737 ) / dt_data_output_av ) 3738 3739 ntdim_2d_yz(1) = do2d_yz_time_count(1) + CEILING( & 3740 ( end_time - MAX( skip_time_data_output_av, & 3741 simulated_time_at_begin ) & 3742 ) / dt_data_output_av ) 3706 3743 3707 3744 ENDIF -
palm/trunk/SOURCE/modules.f90
r2918 r2964 25 25 ! ----------------- 26 26 ! $Id$ 27 ! *_time_count variables are all initialized with zero now 28 ! 29 ! 2918 2018-03-21 15:52:14Z gronemeier 27 30 ! -l_grid, -l_wall 28 31 ! … … 1182 1185 INTEGER(iwp) :: dist_nys(0:1) !< south boundary of disturbance region 1183 1186 INTEGER(iwp) :: do2d_no(0:1) = 0 !< number of 2d output quantities 1184 INTEGER(iwp) :: do2d_xy_time_count(0:1) 1185 INTEGER(iwp) :: do2d_xz_time_count(0:1) 1186 INTEGER(iwp) :: do2d_yz_time_count(0:1) 1187 INTEGER(iwp) :: do2d_xy_time_count(0:1) = 0 !< number of output intervals for 2d data (xy) 1188 INTEGER(iwp) :: do2d_xz_time_count(0:1) = 0 !< number of output intervals for 2d data (xz) 1189 INTEGER(iwp) :: do2d_yz_time_count(0:1) = 0 !< number of output intervals for 2d data (yz) 1187 1190 INTEGER(iwp) :: do3d_no(0:1) = 0 !< number of 3d output quantities 1188 INTEGER(iwp) :: do3d_time_count(0:1) 1191 INTEGER(iwp) :: do3d_time_count(0:1) = 0 !< number of output intervals for 3d data 1189 1192 INTEGER(iwp) :: domask_no(max_masks,0:1) = 0 !< number of masked output quantities 1190 1193 INTEGER(iwp) :: domask_time_count(max_masks,0:1) !< number of output intervals for masked data -
palm/trunk/SOURCE/netcdf_interface_mod.f90
r2932 r2964 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Calculation of fixed number of output time levels for parallel netcdf output 28 ! has been moved completely to check_parameters 29 ! 30 ! 2932 2018-03-26 09:39:22Z maronga 27 31 ! Renamed inipar to initialization_parameters. 28 32 ! … … 1830 1834 IF ( netcdf_data_format > 4 ) THEN 1831 1835 ! 1832 !-- Set needed time levels (ntdim) to1833 !-- saved time levels + to be saved time levels.1834 IF ( av == 0 ) THEN1835 ntdim_3d(0) = do3d_time_count(0) + CEILING( &1836 ( end_time - MAX( skip_time_do3d, &1837 simulated_time_at_begin ) &1838 ) / dt_do3d )1839 IF ( do3d_at_begin ) ntdim_3d(0) = ntdim_3d(0) + 11840 ELSE1841 ntdim_3d(1) = do3d_time_count(1) + CEILING( &1842 ( end_time - MAX( skip_time_data_output_av, &1843 simulated_time_at_begin ) &1844 ) / dt_data_output_av )1845 ENDIF1846 1847 !1848 1836 !-- Check if the needed number of output time levels is increased 1849 1837 !-- compared to the number of time levels in the existing file. … … 2606 2594 IF ( netcdf_data_format > 4 ) THEN 2607 2595 ! 2608 !-- Set needed time levels (ntdim) to2609 !-- saved time levels + to be saved time levels.2610 IF ( av == 0 ) THEN2611 ntdim_2d_xy(0) = do2d_xy_time_count(0) + CEILING( &2612 ( end_time - MAX( skip_time_do2d_xy, &2613 simulated_time_at_begin ) &2614 ) / dt_do2d_xy )2615 IF ( do2d_at_begin ) ntdim_2d_xy(0) = ntdim_2d_xy(0) + 12616 ELSE2617 ntdim_2d_xy(1) = do2d_xy_time_count(1) + CEILING( &2618 ( end_time - MAX( skip_time_data_output_av, &2619 simulated_time_at_begin ) &2620 ) / dt_data_output_av )2621 ENDIF2622 2623 !2624 2596 !-- Check if the needed number of output time levels is increased 2625 2597 !-- compared to the number of time levels in the existing file. … … 3265 3237 IF ( netcdf_data_format > 4 ) THEN 3266 3238 ! 3267 !-- Set needed time levels (ntdim) to3268 !-- saved time levels + to be saved time levels.3269 IF ( av == 0 ) THEN3270 ntdim_2d_xz(0) = do2d_xz_time_count(0) + CEILING( &3271 ( end_time - MAX( skip_time_do2d_xz, &3272 simulated_time_at_begin ) &3273 ) / dt_do2d_xz )3274 IF ( do2d_at_begin ) ntdim_2d_xz(0) = ntdim_2d_xz(0) + 13275 ELSE3276 ntdim_2d_xz(1) = do2d_xz_time_count(1) + CEILING( &3277 ( end_time - MAX( skip_time_data_output_av, &3278 simulated_time_at_begin ) &3279 ) / dt_data_output_av )3280 ENDIF3281 3282 !3283 3239 !-- Check if the needed number of output time levels is increased 3284 3240 !-- compared to the number of time levels in the existing file. … … 3927 3883 IF ( netcdf_data_format > 4 ) THEN 3928 3884 ! 3929 !-- Set needed time levels (ntdim) to3930 !-- saved time levels + to be saved time levels.3931 IF ( av == 0 ) THEN3932 ntdim_2d_yz(0) = do2d_yz_time_count(0) + CEILING( &3933 ( end_time - MAX( skip_time_do2d_yz, &3934 simulated_time_at_begin ) &3935 ) / dt_do2d_yz )3936 IF ( do2d_at_begin ) ntdim_2d_yz(0) = ntdim_2d_yz(0) + 13937 ELSE3938 ntdim_2d_yz(1) = do2d_yz_time_count(1) + CEILING( &3939 ( end_time - MAX( skip_time_data_output_av, &3940 simulated_time_at_begin ) &3941 ) / dt_data_output_av )3942 ENDIF3943 3944 !3945 3885 !-- Check if the needed number of output time levels is increased 3946 3886 !-- compared to the number of time levels in the existing file. -
palm/trunk/SOURCE/radiation_model_mod.f90
r2963 r2964 28 28 ! ----------------- 29 29 ! $Id$ 30 ! Error message PA0491 has been introduced which could be previously found in 31 ! check_open. The variable numprocs_previous_run is only known in case of 32 ! initializing_actions == read_restart_data 33 ! 34 ! 2963 2018-04-12 14:47:44Z suehring 30 35 ! - Introduce index for vegetation/wall, pavement/green-wall and water/window 31 36 ! surfaces, for clearer access of surface fraction, albedo, emissivity, etc. . … … 6693 6698 6694 6699 DO i = 0, io_blocks-1 6695 IF ( i == io_group ) THEN 6696 6697 ! 6698 !-- Open binary file 6699 CALL check_open( fsvf ) 6700 6701 !-- read and check version 6702 READ ( fsvf ) rad_version_field 6703 IF ( TRIM(rad_version_field) /= TRIM(rad_version) ) THEN 6704 WRITE( message_string, * ) 'Version of binary SVF file "', & 6705 TRIM(rad_version_field), '" does not match ', & 6706 'the version of model "', TRIM(rad_version), '"' 6707 CALL message( 'radiation_read_svf', 'PA0482', 1, 2, 0, 6, 0 ) 6708 ENDIF 6709 6710 !-- read nsvfl, ncsfl 6711 READ ( fsvf ) nsvfl, ncsfl, nsurfl_from_file 6712 IF ( nsvfl <= 0 .OR. ncsfl < 0 ) THEN 6713 WRITE( message_string, * ) 'Wrong number of SVF or CSF' 6714 CALL message( 'radiation_read_svf', 'PA0483', 1, 2, 0, 6, 0 ) 6715 ELSE 6716 WRITE(message_string,*) ' Number of SVF, CSF, and nsurfl to read '& 6717 , nsvfl, ncsfl, nsurfl 6718 CALL location_message( message_string, .TRUE. ) 6719 ENDIF 6720 IF ( nsurfl_from_file /= nsurfl ) THEN 6721 WRITE( message_string, * ) 'nsurfl from SVF file does not ', & 6722 'match calculated nsurfl from ', & 6723 'radiation_interaction_init' 6724 CALL message( 'radiation_read_svf', 'PA0490', 1, 2, 0, 6, 0 ) 6725 ENDIF 6726 6727 IF ( .NOT. ALLOCATED( skyvf ) ) ALLOCATE( skyvf(nsurfl) ) 6728 IF ( .NOT. ALLOCATED( skyvft ) ) ALLOCATE( skyvft(nsurfl) ) 6729 IF ( .NOT. ALLOCATED( svf ) ) ALLOCATE( svf(ndsvf,nsvfl) ) 6730 IF ( .NOT. ALLOCATED( svfsurf ) ) ALLOCATE( svfsurf(idsvf,nsvfl) ) 6731 READ(fsvf) skyvf 6732 READ(fsvf) skyvft 6733 READ(fsvf) svf 6734 READ(fsvf) svfsurf 6735 IF ( plant_canopy ) THEN 6736 IF ( .NOT. ALLOCATED( csf ) ) ALLOCATE( csf(ndcsf,ncsfl) ) 6737 IF ( .NOT. ALLOCATED( csfsurf ) ) ALLOCATE( csfsurf(idcsf,ncsfl) ) 6738 READ(fsvf) csf 6739 READ(fsvf) csfsurf 6740 ENDIF 6741 READ ( fsvf ) svf_code_field 6742 6743 IF ( TRIM(svf_code_field) /= TRIM(svf_code) ) THEN 6744 WRITE( message_string, * ) 'Wrong structure of binary svf file' 6745 CALL message( 'radiation_read_svf', 'PA0484', 1, 2, 0, 6, 0 ) 6746 ENDIF 6700 IF ( i == io_group ) THEN 6701 6702 IF ( initializing_actions == 'read_restart_data' ) THEN 6703 6704 IF ( numprocs_previous_run /= numprocs ) THEN 6705 WRITE( message_string, * ) 'A different number of processors', & 6706 ' between the run that has written', & 6707 ' the svf data and the one that will', & 6708 ' read it is not allowed' 6709 CALL message( 'check_open', 'PA0491', 1, 2, 0, 6, 0 ) 6710 ENDIF 6711 6712 ENDIF 6713 ! 6714 !-- Open binary file 6715 CALL check_open( fsvf ) 6716 6717 !-- read and check version 6718 READ ( fsvf ) rad_version_field 6719 IF ( TRIM(rad_version_field) /= TRIM(rad_version) ) THEN 6720 WRITE( message_string, * ) 'Version of binary SVF file "', & 6721 TRIM(rad_version_field), '" does not match ', & 6722 'the version of model "', TRIM(rad_version), '"' 6723 CALL message( 'radiation_read_svf', 'PA0482', 1, 2, 0, 6, 0 ) 6724 ENDIF 6725 6726 !-- read nsvfl, ncsfl 6727 READ ( fsvf ) nsvfl, ncsfl, nsurfl_from_file 6728 IF ( nsvfl <= 0 .OR. ncsfl < 0 ) THEN 6729 WRITE( message_string, * ) 'Wrong number of SVF or CSF' 6730 CALL message( 'radiation_read_svf', 'PA0483', 1, 2, 0, 6, 0 ) 6731 ELSE 6732 WRITE(message_string,*) ' Number of SVF, CSF, and nsurfl to read '& 6733 , nsvfl, ncsfl, nsurfl 6734 CALL location_message( message_string, .TRUE. ) 6735 ENDIF 6736 IF ( nsurfl_from_file /= nsurfl ) THEN 6737 WRITE( message_string, * ) 'nsurfl from SVF file does not ', & 6738 'match calculated nsurfl from ', & 6739 'radiation_interaction_init' 6740 CALL message( 'radiation_read_svf', 'PA0490', 1, 2, 0, 6, 0 ) 6741 ENDIF 6742 6743 IF ( .NOT. ALLOCATED( skyvf ) ) ALLOCATE( skyvf(nsurfl) ) 6744 IF ( .NOT. ALLOCATED( skyvft ) ) ALLOCATE( skyvft(nsurfl) ) 6745 IF ( .NOT. ALLOCATED( svf ) ) ALLOCATE( svf(ndsvf,nsvfl) ) 6746 IF ( .NOT. ALLOCATED( svfsurf ) ) ALLOCATE( svfsurf(idsvf,nsvfl) ) 6747 READ(fsvf) skyvf 6748 READ(fsvf) skyvft 6749 READ(fsvf) svf 6750 READ(fsvf) svfsurf 6751 IF ( plant_canopy ) THEN 6752 IF ( .NOT. ALLOCATED( csf ) ) ALLOCATE( csf(ndcsf,ncsfl) ) 6753 IF ( .NOT. ALLOCATED( csfsurf ) ) ALLOCATE( csfsurf(idcsf,ncsfl) ) 6754 READ(fsvf) csf 6755 READ(fsvf) csfsurf 6756 ENDIF 6757 READ ( fsvf ) svf_code_field 6758 6759 IF ( TRIM(svf_code_field) /= TRIM(svf_code) ) THEN 6760 WRITE( message_string, * ) 'Wrong structure of binary svf file' 6761 CALL message( 'radiation_read_svf', 'PA0484', 1, 2, 0, 6, 0 ) 6762 ENDIF 6747 6763 ! 6748 6764 !-- Close binary file 6749 6765 CALL close_file( fsvf ) 6750 6766 6751 6767 ENDIF 6752 6768 #if defined( __parallel ) 6753 6769 CALL MPI_BARRIER( comm2d, ierr )
Note: See TracChangeset
for help on using the changeset viewer.