Ignore:
Timestamp:
Jul 31, 2019 12:56:07 PM (5 years ago)
Author:
gronemeier
Message:

changes in surface_data_output_mod:

  • bugfix: corrected loop over horizontal default surfaces
  • change default setting of to_vtk and to_netcdf to FALSE and check that at least one of them is set to true by the user if output is requested
File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/surface_data_output_mod.f90

    r4029 r4129  
    2525! -----------------
    2626! $Id$
     27! - bugfix: corrected loop over horizontal default surfaces
     28! - change default setting of to_vtk and to_netcdf
     29!
     30! 4029 2019-06-14 14:04:35Z raasch
    2731! netcdf variable NF90_NOFILL is used as argument instead of "1" in call to NF90_DEF_VAR_FILL
    28 ! 
     32!
    2933! 3881 2019-04-10 09:31:22Z suehring
    30 ! Check for zero output timestep (not allowed in parallel NetCDF output mode) 
    31 ! 
     34! Check for zero output timestep (not allowed in parallel NetCDF output mode)
     35!
    3236! 3817 2019-03-26 13:53:57Z suehring
    3337! Correct output coordinates of vertical surface elements
    34 ! 
     38!
    3539! 3766 2019-02-26 16:23:41Z raasch
    3640! bugfix in surface_data_output_rrd_local (variable k removed)
    37 ! 
     41!
    3842! 3762 2019-02-25 16:54:16Z suehring
    39 ! Remove unused variables and add preprocessor directives for variables that 
    40 ! are used only when netcdf4 is defined 
    41 ! 
     43! Remove unused variables and add preprocessor directives for variables that
     44! are used only when netcdf4 is defined
     45!
    4246! 3745 2019-02-15 18:57:56Z suehring
    4347! Output of waste_heat and innermost wall flux from indoor model
    44 ! 
     48!
    4549! 3744 2019-02-15 18:38:58Z suehring
    46 ! Add azimuth and zenith to output file; set long-name attributes; 
     50! Add azimuth and zenith to output file; set long-name attributes;
    4751! clean-up coding layout
    48 ! 
     52!
    4953! 3735 2019-02-12 09:52:40Z suehring
    5054! - Split initialization into initialization of arrays and further initialization
     
    196200
    197201   LOGICAL :: first_output(0:1) = .FALSE.                 !< true if first output was already called
    198    LOGICAL :: to_netcdf = .TRUE.                          !< flag indicating parallel NetCDF output
    199    LOGICAL :: to_vtk = .TRUE.                             !< flag indicating binary surface-data output that can be further
     202   LOGICAL :: to_netcdf = .FALSE.                         !< flag indicating parallel NetCDF output
     203   LOGICAL :: to_vtk = .FALSE.                            !< flag indicating binary surface-data output that can be further
    200204                                                          !< processed to VTK format
    201205
     
    323327
    324328      IMPLICIT NONE
    325      
     329
    326330#if defined( __netcdf4_parallel )
    327331      CHARACTER (LEN=100)  :: filename            !< name of output file
     
    600604
    601605         DO  l = 0, 1
    602             DO  m = 1, surf_def_h(0)%ns
     606            DO  m = 1, surf_def_h(l)%ns
    603607!
    604608!--            Determine the indices of the respective grid cell inside the
    605609!--            topography.
    606                i = surf_def_h(0)%i(m) + surf_def_h(0)%ioff
    607                j = surf_def_h(0)%j(m) + surf_def_h(0)%joff
    608                k = surf_def_h(0)%k(m) + surf_def_h(0)%koff
     610               i = surf_def_h(l)%i(m) + surf_def_h(l)%ioff
     611               j = surf_def_h(l)%j(m) + surf_def_h(l)%joff
     612               k = surf_def_h(l)%k(m) + surf_def_h(l)%koff
    609613!
    610614!--            Check if the vertices that define the surface element are
     
    28022806
    28032807               ENDIF
    2804                
     2808
    28052809            CASE ( 'uvw1' )
    28062810!
     
    37893793                                           surf_lsm_v(3)%uvw_abs,              &
    37903794                                           surf_usm_v(3)%uvw_abs, n_out )
    3791                                            
     3795
    37923796            CASE ( 'waste_heat' )
    37933797               CALL surface_data_output_sum_up( surf_def_h(0)%waste_heat,      &
     
    38073811                                           surf_lsm_v(3)%waste_heat,           &
    38083812                                           surf_usm_v(3)%waste_heat, n_out )
    3809                                            
     3813
    38103814            CASE ( 'im_hf' )
    38113815               CALL surface_data_output_sum_up( surf_def_h(0)%iwghf_eb,        &
     
    42944298       INTEGER(iwp) ::  ilen  !< string length
    42954299       INTEGER(iwp) ::  n_out !< running index for number of output variables
    4296 
     4300!
     4301!--    Check if any output file type is selected
     4302       IF ( .NOT. to_vtk  .AND.  .NOT. to_netcdf )  THEN
     4303          WRITE( message_string, * )                                     &
     4304             'no output file type selected for surface-data output!&' // &
     4305             'Set at least either "to_vtk" or "to_netcdf" to .TRUE.'
     4306          CALL message( 'surface_data_output_check_parameters',          &
     4307                        'PA0662', 1, 2, 0, 6, 0 )
     4308       ENDIF
    42974309!
    42984310!--    Check the average interval
     
    43244336!
    43254337!--    In case of parallel NetCDF output the output timestep must not be zero.
    4326 !--    This is because the number of requiered output timesteps is 
    4327 !--    pre-calculated, which is not possible with zero output timestep. 
     4338!--    This is because the number of requiered output timesteps is
     4339!--    pre-calculated, which is not possible with zero output timestep.
    43284340       IF ( netcdf_data_format > 4 )  THEN
    43294341          IF ( dt_dosurf == 0.0_wp )  THEN
     
    43344346                           1, 2, 0, 6, 0 )
    43354347          ENDIF
    4336          
     4348
    43374349          IF ( dt_dosurf_av == 0.0_wp )  THEN
    43384350             message_string = 'dt_dosurf_av = 0.0 while using a ' //          &
     
    44344446            CASE ( 'r_a', 'r_canopy', 'r_soil', 'r_s' )
    44354447               unit = 's/m'
    4436                
     4448
    44374449            CASE ( 'waste_heat', 'im_hf' )
    44384450               IF ( .NOT. indoor_model )  THEN
     
    44424454                             'PA0588', 1, 2, 0, 6, 0 )
    44434455               ENDIF
    4444            
     4456
    44454457               unit = 'W/m2'
    44464458
Note: See TracChangeset for help on using the changeset viewer.