Changeset 4577 for palm/trunk/SOURCE/data_output_spectra.f90
- Timestamp:
- Jun 25, 2020 9:53:58 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/data_output_spectra.f90
r4360 r4577 1 1 !> @file data_output_spectra.f90 2 !------------------------------------------------------------------------------ !2 !--------------------------------------------------------------------------------------------------! 3 3 ! This file is part of the PALM model system. 4 4 ! 5 ! PALM is free software: you can redistribute it and/or modify it under the 6 ! terms of the GNU General Public License as published by the Free Software 7 ! Foundation, either version 3 of the License, or (at your option) any later 8 ! version. 9 ! 10 ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY 11 ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 12 ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. 13 ! 14 ! You should have received a copy of the GNU General Public License along with 15 ! PALM. If not, see <http://www.gnu.org/licenses/>. 5 ! PALM is free software: you can redistribute it and/or modify it under the terms of the GNU General 6 ! Public License as published by the Free Software Foundation, either version 3 of the License, or 7 ! (at your option) any later version. 8 ! 9 ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the 10 ! implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 11 ! Public License for more details. 12 ! 13 ! You should have received a copy of the GNU General Public License along with PALM. If not, see 14 ! <http://www.gnu.org/licenses/>. 16 15 ! 17 16 ! Copyright 1997-2020 Leibniz Universitaet Hannover 18 !------------------------------------------------------------------------------ !17 !--------------------------------------------------------------------------------------------------! 19 18 ! 20 19 ! Current revisions: … … 25 24 ! ----------------- 26 25 ! $Id$ 26 ! file re-formatted to follow the PALM coding standard 27 ! 28 ! 4360 2020-01-07 11:25:50Z suehring 27 29 ! Corrected "Former revisions" section 28 ! 30 ! 29 31 ! 3655 2019-01-07 16:51:22Z knoop 30 32 ! variables documented … … 38 40 !> Writing spectra data on file, using a special format which allows 39 41 !> plotting of these data with PROFIL-graphic-software 40 !------------------------------------------------------------------------------ !42 !--------------------------------------------------------------------------------------------------! 41 43 SUBROUTINE data_output_spectra 42 44 43 45 #if defined( __netcdf ) 44 USE control_parameters, &46 USE control_parameters, & 45 47 ONLY: message_string, time_since_reference_point 46 48 47 USE cpulog, &49 USE cpulog, & 48 50 ONLY: cpu_log, log_point 49 51 … … 52 54 USE NETCDF 53 55 54 USE netcdf_interface, &56 USE netcdf_interface, & 55 57 ONLY: id_set_sp, id_var_time_sp, nc_stat, netcdf_handle_error 56 58 57 59 USE pegrid 58 60 59 USE spectra_mod, & 60 ONLY: average_count_sp, averaging_interval_sp, comp_spectra_level, & 61 data_output_sp, dosp_time_count, spectra_direction, spectrum_x, & 62 spectrum_y 61 USE spectra_mod, & 62 ONLY: average_count_sp, averaging_interval_sp, comp_spectra_level, data_output_sp, & 63 dosp_time_count, spectra_direction, spectrum_x, spectrum_y 63 64 64 65 … … 67 68 INTEGER(iwp) :: m !< running index over spectra output 68 69 INTEGER(iwp) :: pr !< index used to assign default quantities to data output 69 70 70 71 CALL cpu_log( log_point(31), 'data_output_spectra', 'start' ) 71 72 … … 88 89 ! 89 90 !-- Update the spectra time axis 90 nc_stat = NF90_PUT_VAR( id_set_sp, id_var_time_sp, &91 (/ time_since_reference_point /), &91 nc_stat = NF90_PUT_VAR( id_set_sp, id_var_time_sp, & 92 (/ time_since_reference_point /), & 92 93 start = (/ dosp_time_count /), count = (/ 1 /) ) 93 94 CALL netcdf_handle_error( 'data_output_spectra', 47 ) … … 96 97 !-- If necessary, calculate time average and reset average counter 97 98 IF ( average_count_sp == 0 ) THEN 98 99 99 message_string = 'no spectra data available' 100 CALL message( 'data_output_spectra', 'PA0186', 0, 0, 0, 6, 0 ) 100 101 ENDIF 101 102 IF ( average_count_sp /= 1 ) THEN … … 132 133 CASE DEFAULT 133 134 ! 134 !-- The DEFAULT case is reached either if the parameter 135 !-- data_output_sp(m) contains a wrong character string or if the 136 !-- user has coded a special case in the user interface. There, the 137 !-- subroutine user_spectra checks which of these two conditions 135 !-- The DEFAULT case is reached either if the parameter data_output_sp(m) contains a 136 !-- wrong character string or if the user has coded a special case in the user 137 !-- interface. There, the subroutine user_spectra checks which of these two conditions 138 138 !-- applies. 139 139 CALL user_spectra( 'data_output', m, pr ) … … 175 175 176 176 177 !------------------------------------------------------------------------------ !177 !--------------------------------------------------------------------------------------------------! 178 178 ! Description: 179 179 ! ------------ 180 180 !> @todo Missing subroutine description. 181 !------------------------------------------------------------------------------ !181 !--------------------------------------------------------------------------------------------------! 182 182 SUBROUTINE output_spectra_netcdf( nsp, direction ) 183 183 #if defined( __netcdf ) 184 184 185 USE basic_constants_and_equations_mod, &185 USE basic_constants_and_equations_mod, & 186 186 ONLY: pi 187 187 188 USE grid_variables, &188 USE grid_variables, & 189 189 ONLY: dx, dy 190 190 191 USE indices, &191 USE indices, & 192 192 ONLY: nx, ny 193 193 … … 196 196 USE NETCDF 197 197 198 USE netcdf_interface, & 199 ONLY: id_set_sp, id_var_dospx, id_var_dospy, nc_stat, & 200 netcdf_handle_error 201 202 USE spectra_mod, & 198 USE netcdf_interface, & 199 ONLY: id_set_sp, id_var_dospx, id_var_dospy, nc_stat, netcdf_handle_error 200 201 USE spectra_mod, & 203 202 ONLY: dosp_time_count, n_sp_x, n_sp_y, spectrum_x, spectrum_y 204 203 … … 228 227 ENDDO 229 228 230 nc_stat = NF90_PUT_VAR( id_set_sp, id_var_dospx(nsp), netcdf_data_x, &231 start = (/ 1, k, dosp_time_count /), &229 nc_stat = NF90_PUT_VAR( id_set_sp, id_var_dospx(nsp), netcdf_data_x, & 230 start = (/ 1, k, dosp_time_count /), & 232 231 count = (/ nx/2, 1, 1 /) ) 233 232 CALL netcdf_handle_error( 'data_output_spectra', 348 ) … … 246 245 ENDDO 247 246 248 nc_stat = NF90_PUT_VAR( id_set_sp, id_var_dospy(nsp), netcdf_data_y, &249 start = (/ 1, k, dosp_time_count /), &247 nc_stat = NF90_PUT_VAR( id_set_sp, id_var_dospy(nsp), netcdf_data_y, & 248 start = (/ 1, k, dosp_time_count /), & 250 249 count = (/ ny/2, 1, 1 /) ) 251 250 CALL netcdf_handle_error( 'data_output_spectra', 349 )
Note: See TracChangeset
for help on using the changeset viewer.