Ignore:
Timestamp:
Jun 11, 2020 8:51:48 AM (4 years ago)
Author:
raasch
Message:

files re-formatted to follow the PALM coding standard

File:
1 edited

Legend:

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

    r4457 r4559  
    11!> @file data_output_3d.f90
    2 !------------------------------------------------------------------------------!
     2!--------------------------------------------------------------------------------------------------!
    33! This file is part of the PALM model system.
    44!
    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/>.
    1615!
    1716! Copyright 1997-2020 Leibniz Universitaet Hannover
    18 !------------------------------------------------------------------------------!
     17!--------------------------------------------------------------------------------------------------!
    1918!
    2019! Current revisions:
     
    2524! -----------------
    2625! $Id$
     26! file re-formatted to follow the PALM coding standard
     27!
     28! 4457 2020-03-11 14:20:43Z raasch
    2729! use statement for exchange horiz added
    28 ! 
     30!
    2931! 4444 2020-03-05 15:59:50Z raasch
    3032! bugfix: cpp-directives for serial mode added
    31 ! 
     33!
    3234! 4360 2020-01-07 11:25:50Z suehring
    33 ! Introduction of wall_flags_total_0, which currently sets bits based on static
    34 ! topography information used in wall_flags_static_0
    35 ! 
     35! Introduction of wall_flags_total_0, which currently sets bits based on static topography
     36! information used in wall_flags_static_0
     37!
    3638! 4329 2019-12-10 15:46:36Z motisi
    3739! Renamed wall_flags_0 to wall_flags_static_0
    38 ! 
     40!
    3941! 4182 2019-08-22 15:20:23Z scharf
    4042! Corrected "Former revisions" section
    41 ! 
     43!
    4244! 4162 2019-08-16 05:54:29Z raasch
    4345! bugfix for r4155
    44 ! 
     46!
    4547! 4155 2019-08-14 06:25:18Z raasch
    4648! bugfix for 3d-output in serial mode (ghost points must not be written)
    47 ! 
     49!
    4850! 4127 2019-07-30 14:47:10Z suehring
    49 ! Adjustment for top boundary index for plant-canopy model outputs
    50 ! (merge from branch resler)
    51 !
     51! Adjustment for top boundary index for plant-canopy model outputs (merge from branch resler)
     52!
    5253! 4048 2019-06-21 21:00:21Z knoop
    5354! Moved tcm_data_output_3d to module_interface
    54 ! 
     55!
    5556! 4039 2019-06-18 10:32:41Z suehring
    5657! modularize diagnostic output
    57 ! 
     58!
    5859! 3994 2019-05-22 18:08:09Z suehring
    5960! output of turbulence intensity added
    60 ! 
     61!
    6162! 3987 2019-05-22 09:52:13Z kanani
    6263! Introduce alternative switch for debug output during timestepping
    63 ! 
     64!
    6465! 3885 2019-04-11 11:29:34Z kanani
    65 ! Changes related to global restructuring of location messages and introduction
    66 ! of additional debug messages
    67 ! 
     66! Changes related to global restructuring of location messages and introduction of additional debug
     67! messages
     68!
    6869! 3814 2019-03-26 08:40:31Z pavelkrc
    6970! unused variables removed
    70 ! 
     71!
    7172! 3655 2019-01-07 16:51:22Z knoop
    72 ! Bugfix: use time_since_reference_point instead of simulated_time (relevant
    73 ! when using wall/soil spinup)
     73! Bugfix: use time_since_reference_point instead of simulated_time (relevant when using wall/soil
     74!         spinup)
    7475!
    7576! Revision 1.1  1997/09/03 06:29:36  raasch
     
    8081! ------------
    8182!> Output of the 3D-arrays in netCDF and/or AVS format.
    82 !------------------------------------------------------------------------------!
     83!--------------------------------------------------------------------------------------------------!
    8384 SUBROUTINE data_output_3d( av )
    84  
    85 
    86     USE arrays_3d,                                                             &
     85
     86
     87    USE arrays_3d,                                                                                 &
    8788        ONLY:  d_exner, e, p, pt, q, ql, ql_c, ql_v, s, tend, u, v, vpt, w
    8889
    8990    USE averaging
    9091
    91     USE basic_constants_and_equations_mod,                                     &
     92    USE basic_constants_and_equations_mod,                                                         &
    9293        ONLY:  lv_d_cp
    9394
    94     USE bulk_cloud_model_mod,                                                  &
     95    USE bulk_cloud_model_mod,                                                                      &
    9596        ONLY:  bulk_cloud_model
    9697
    97     USE control_parameters,                                                    &
    98         ONLY:  debug_output_timestep, do3d, do3d_no, do3d_time_count,          &
    99                land_surface, message_string, ntdim_3d, nz_do3d, plant_canopy,  &
    100                psolver, time_since_reference_point, urban_surface,             &
     98    USE control_parameters,                                                                        &
     99        ONLY:  debug_output_timestep, do3d, do3d_no, do3d_time_count, land_surface, message_string,&
     100               ntdim_3d, nz_do3d, plant_canopy, psolver, time_since_reference_point, urban_surface,&
    101101               varnamelength
    102102
    103103#if defined( __parallel )
    104     USE control_parameters,                                                    &
     104    USE control_parameters,                                                                        &
    105105        ONLY:  io_blocks, io_group
    106106#endif
    107107
    108     USE cpulog,                                                                &
    109         ONLY:  log_point, cpu_log
    110 
    111     USE exchange_horiz_mod,                                                    &
     108    USE cpulog,                                                                                    &
     109        ONLY: cpu_log, log_point
     110
     111    USE exchange_horiz_mod,                                                                        &
    112112        ONLY:  exchange_horiz
    113113
    114     USE indices,                                                               &
    115         ONLY:  nbgp, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt,     &
    116                wall_flags_total_0
     114    USE indices,                                                                                   &
     115        ONLY:  nbgp, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt, wall_flags_total_0
    117116
    118117#if ! defined( __parallel )
    119     USE indices,                                                               &
     118    USE indices,                                                                                   &
    120119        ONLY:  nx, ny
    121120#endif
     
    123122    USE kinds
    124123
    125     USE land_surface_model_mod,                                                &
     124    USE land_surface_model_mod,                                                                    &
    126125        ONLY: lsm_data_output_3d, nzb_soil, nzt_soil
    127126
    128     USE module_interface,                                                      &
     127    USE module_interface,                                                                          &
    129128        ONLY:  module_interface_data_output_3d
    130129
     
    133132#endif
    134133
    135     USE netcdf_interface,                                                      &
    136         ONLY:  fill_value, id_set_3d, id_var_do3d, id_var_time_3d, nc_stat,    &
    137                netcdf_data_format, netcdf_handle_error
    138 
    139     USE particle_attributes,                                                   &
    140         ONLY:  grid_particles, number_of_particles, particles,                 &
    141                particle_advection_start, prt_count
     134    USE netcdf_interface,                                                                          &
     135        ONLY:  fill_value, id_set_3d, id_var_do3d, id_var_time_3d, nc_stat, netcdf_data_format,    &
     136               netcdf_handle_error
     137
     138    USE particle_attributes,                                                                       &
     139        ONLY:  grid_particles, number_of_particles, particles, particle_advection_start, prt_count
    142140
    143141    USE pegrid
    144142
    145     USE plant_canopy_model_mod,                                                &
     143    USE plant_canopy_model_mod,                                                                    &
    146144        ONLY:  pch_index
    147145
    148     USE radiation_model_mod,                                                   &
     146    USE radiation_model_mod,                                                                       &
    149147        ONLY:  nz_urban_b, nz_urban_t
    150148
    151     USE urban_surface_mod,                                                     &
     149    USE urban_surface_mod,                                                                         &
    152150        ONLY:  usm_data_output_3d
    153151
     
    174172    REAL(sp), DIMENSION(:,:,:), ALLOCATABLE ::  local_pf  !< output array
    175173
    176     REAL(wp), DIMENSION(:,:,:), POINTER ::  to_be_resorted  !< pointer to array which shall be output
     174    REAL(wp), DIMENSION(:,:,:), POINTER ::  to_be_resorted  !< pointer to array which shall be
     175                                                            !< output
    177176
    178177    CHARACTER (LEN=varnamelength) ::  trimvar  !< TRIM of output-variable string
     
    188187!
    189188!-- Open output file.
    190 !-- For classic or 64bit netCDF output on more than one PE, each PE opens its
    191 !-- own file and writes the data of its subdomain in binary format. After the
    192 !-- run, these files are combined to one NetCDF file by combine_plot_fields.
     189!-- For classic or 64bit netCDF output on more than one PE, each PE opens its own file and writes
     190!-- the data of its subdomain in binary format. After the run, these files are combined to one
     191!-- NetCDF file by combine_plot_fields.
    193192!-- For netCDF4/HDF5 output, data is written in parallel into one file.
    194193    IF ( netcdf_data_format < 5 )  THEN
     
    202201
    203202!
    204 !-- For parallel netcdf output the time axis must be limited. Return, if this
    205 !-- limit is exceeded. This could be the case, if the simulated time exceeds
    206 !-- the given end time by the length of the given output interval.
     203!-- For parallel netcdf output the time axis must be limited. Return, if this limit is exceeded.
     204!-- This could be the case, if the simulated time exceeds the given end time by the length of the
     205!-- given output interval.
    207206    IF ( netcdf_data_format > 4 )  THEN
    208207       IF ( do3d_time_count(av) + 1 > ntdim_3d(av) )  THEN
    209           WRITE ( message_string, * ) 'Output of 3d data is not given at t=',               &
    210                                       time_since_reference_point, 's because the maximum ', &
    211                                       'number of output time levels is ',                   &
     208          WRITE ( message_string, * ) 'Output of 3d data is not given at t=',                      &
     209                                      time_since_reference_point, 's because the maximum ',        &
     210                                      'number of output time levels is ',                          &
    212211                                      'exceeded.'
    213212          CALL message( 'data_output_3d', 'PA0387', 0, 1, 0, 6, 0 )
     
    218217
    219218!
    220 !-- Update the netCDF time axis
    221 !-- In case of parallel output, this is only done by PE0 to increase the
    222 !-- performance.
     219!-- Update the netCDF time axis.
     220!-- In case of parallel output, this is only done by PE0 to increase the performance.
    223221#if defined( __netcdf )
    224222    do3d_time_count(av) = do3d_time_count(av) + 1
    225223    IF ( myid == 0 )  THEN
    226        nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_time_3d(av),           &
    227                                (/ time_since_reference_point /),            &
    228                                start = (/ do3d_time_count(av) /),           &
     224       nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_time_3d(av),                                  &
     225                               (/ time_since_reference_point /),                                   &
     226                               start = (/ do3d_time_count(av) /),                                  &
    229227                               count = (/ 1 /) )
    230228       CALL netcdf_handle_error( 'data_output_3d', 376 )
     
    245243
    246244!
    247 !--    Temporary solution to account for data output within the new urban
    248 !--    surface model (urban_surface_mod.f90), see also SELECT CASE ( trimvar ).
     245!--    Temporary solution to account for data output within the new urban surface model
     246!--    (urban_surface_mod.f90), see also SELECT CASE ( trimvar ).
    249247!--    Store the array chosen on the temporary array.
    250248       nzb_do   = nzb
    251249!
    252 !--    Set top index for 3D output. Note in case of plant-canopy model
    253 !--    these index is determined by pch_index.
     250!--    Set top index for 3D output. Note in case of plant-canopy model these index is determined by
     251!--    pch_index.
    254252       IF ( plant_canopy  .AND.  trimvar(1:4) == 'pcm_' )  THEN
    255253          nzt_do   = pch_index
     
    274272                to_be_resorted => e
    275273             ELSE
    276                 IF ( .NOT. ALLOCATED( e_av ) ) THEN
     274                IF ( .NOT. ALLOCATED( e_av ) )  THEN
    277275                   ALLOCATE( e_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
    278276                   e_av = REAL( fill_value, KIND = wp )
     
    285283                to_be_resorted => pt
    286284             ELSE
    287                 IF ( .NOT. ALLOCATED( lpt_av ) ) THEN
     285                IF ( .NOT. ALLOCATED( lpt_av ) )  THEN
    288286                   ALLOCATE( lpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
    289287                   lpt_av = REAL( fill_value, KIND = wp )
     
    297295                to_be_resorted => p
    298296             ELSE
    299                 IF ( .NOT. ALLOCATED( p_av ) ) THEN
     297                IF ( .NOT. ALLOCATED( p_av ) )  THEN
    300298                   ALLOCATE( p_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
    301299                   p_av = REAL( fill_value, KIND = wp )
     
    321319                resorted = .TRUE.
    322320             ELSE
    323                 IF ( .NOT. ALLOCATED( pc_av ) ) THEN
     321                IF ( .NOT. ALLOCATED( pc_av ) )  THEN
    324322                   ALLOCATE( pc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
    325323                   pc_av = REAL( fill_value, KIND = wp )
     
    335333                         DO  k = nzb_do, nzt_do
    336334                            number_of_particles = prt_count(k,j,i)
    337                             IF (number_of_particles <= 0)  CYCLE
     335                            IF ( number_of_particles <= 0 )  CYCLE
    338336                            particles => grid_particles(k,j,i)%particles(1:number_of_particles)
    339337                            s_r2 = 0.0_wp
     
    341339                            DO  n = 1, number_of_particles
    342340                               IF ( particles(n)%particle_mask )  THEN
    343                                   s_r2 = s_r2 + particles(n)%radius**2 * &
    344                                          particles(n)%weight_factor
    345                                   s_r3 = s_r3 + particles(n)%radius**3 * &
    346                                          particles(n)%weight_factor
     341                                  s_r2 = s_r2 + particles(n)%radius**2 * particles(n)%weight_factor
     342                                  s_r3 = s_r3 + particles(n)%radius**3 * particles(n)%weight_factor
    347343                               ENDIF
    348344                            ENDDO
     
    368364                resorted = .TRUE.
    369365             ELSE
    370                 IF ( .NOT. ALLOCATED( pr_av ) ) THEN
     366                IF ( .NOT. ALLOCATED( pr_av ) )  THEN
    371367                   ALLOCATE( pr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
    372368                   pr_av = REAL( fill_value, KIND = wp )
     
    377373          CASE ( 'theta' )
    378374             IF ( av == 0 )  THEN
    379                 IF ( .NOT. bulk_cloud_model ) THEN
     375                IF ( .NOT. bulk_cloud_model )  THEN
    380376                   to_be_resorted => pt
    381377                ELSE
     
    383379                      DO  j = nys, nyn
    384380                         DO  k = nzb_do, nzt_do
    385                             local_pf(i,j,k) = pt(k,j,i) + lv_d_cp *            &
    386                                                           d_exner(k) *         &
    387                                                           ql(k,j,i)
     381                            local_pf(i,j,k) = pt(k,j,i) + lv_d_cp * d_exner(k) * ql(k,j,i)
    388382                         ENDDO
    389383                      ENDDO
     
    392386                ENDIF
    393387             ELSE
    394                 IF ( .NOT. ALLOCATED( pt_av ) ) THEN
     388                IF ( .NOT. ALLOCATED( pt_av ) )  THEN
    395389                   ALLOCATE( pt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
    396390                   pt_av = REAL( fill_value, KIND = wp )
     
    403397                to_be_resorted => q
    404398             ELSE
    405                 IF ( .NOT. ALLOCATED( q_av ) ) THEN
     399                IF ( .NOT. ALLOCATED( q_av ) )  THEN
    406400                   ALLOCATE( q_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
    407401                   q_av = REAL( fill_value, KIND = wp )
     
    414408                to_be_resorted => ql
    415409             ELSE
    416                 IF ( .NOT. ALLOCATED( ql_av ) ) THEN
     410                IF ( .NOT. ALLOCATED( ql_av ) )  THEN
    417411                   ALLOCATE( ql_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
    418412                   ql_av = REAL( fill_value, KIND = wp )
     
    425419                to_be_resorted => ql_c
    426420             ELSE
    427                 IF ( .NOT. ALLOCATED( ql_c_av ) ) THEN
     421                IF ( .NOT. ALLOCATED( ql_c_av ) )  THEN
    428422                   ALLOCATE( ql_c_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
    429423                   ql_c_av = REAL( fill_value, KIND = wp )
     
    436430                to_be_resorted => ql_v
    437431             ELSE
    438                 IF ( .NOT. ALLOCATED( ql_v_av ) ) THEN
     432                IF ( .NOT. ALLOCATED( ql_v_av ) )  THEN
    439433                   ALLOCATE( ql_v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
    440434                   ql_v_av = REAL( fill_value, KIND = wp )
     
    454448                            DO  n = 1, number_of_particles
    455449                               IF ( particles(n)%particle_mask )  THEN
    456                                   tend(k,j,i) =  tend(k,j,i) +                 &
    457                                                  particles(n)%weight_factor /  &
    458                                                  prt_count(k,j,i)
     450                                  tend(k,j,i) =  tend(k,j,i) +                                     &
     451                                                 particles(n)%weight_factor / prt_count(k,j,i)
    459452                               ENDIF
    460453                            ENDDO
     
    474467                resorted = .TRUE.
    475468             ELSE
    476                 IF ( .NOT. ALLOCATED( ql_vp_av ) ) THEN
     469                IF ( .NOT. ALLOCATED( ql_vp_av ) )  THEN
    477470                   ALLOCATE( ql_vp_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
    478471                   ql_vp_av = REAL( fill_value, KIND = wp )
     
    492485                resorted = .TRUE.
    493486             ELSE
    494                 IF ( .NOT. ALLOCATED( qv_av ) ) THEN
     487                IF ( .NOT. ALLOCATED( qv_av ) )  THEN
    495488                   ALLOCATE( qv_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
    496489                   qv_av = REAL( fill_value, KIND = wp )
     
    503496                to_be_resorted => s
    504497             ELSE
    505                 IF ( .NOT. ALLOCATED( s_av ) ) THEN
     498                IF ( .NOT. ALLOCATED( s_av ) )  THEN
    506499                   ALLOCATE( s_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
    507500                   s_av = REAL( fill_value, KIND = wp )
     
    515508                to_be_resorted => u
    516509             ELSE
    517                 IF ( .NOT. ALLOCATED( u_av ) ) THEN
     510                IF ( .NOT. ALLOCATED( u_av ) )  THEN
    518511                   ALLOCATE( u_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
    519512                   u_av = REAL( fill_value, KIND = wp )
     
    527520                to_be_resorted => v
    528521             ELSE
    529                 IF ( .NOT. ALLOCATED( v_av ) ) THEN
     522                IF ( .NOT. ALLOCATED( v_av ) )  THEN
    530523                   ALLOCATE( v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
    531524                   v_av = REAL( fill_value, KIND = wp )
     
    538531                to_be_resorted => vpt
    539532             ELSE
    540                 IF ( .NOT. ALLOCATED( vpt_av ) ) THEN
     533                IF ( .NOT. ALLOCATED( vpt_av ) )  THEN
    541534                   ALLOCATE( vpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
    542535                   vpt_av = REAL( fill_value, KIND = wp )
     
    550543                to_be_resorted => w
    551544             ELSE
    552                 IF ( .NOT. ALLOCATED( w_av ) ) THEN
     545                IF ( .NOT. ALLOCATED( w_av ) )  THEN
    553546                   ALLOCATE( w_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
    554547                   w_av = REAL( fill_value, KIND = wp )
     
    561554!--          Quantities of other modules
    562555             IF ( .NOT. found )  THEN
    563                 CALL module_interface_data_output_3d(                          &
    564                         av, trimvar, found, local_pf,                          &
    565                         fill_value, resorted, nzb_do, nzt_do                   &
    566                      )
     556                CALL module_interface_data_output_3d( av, trimvar, found, local_pf, fill_value,    &
     557                                                      resorted, nzb_do, nzt_do                     &
     558                                                    )
    567559             ENDIF
    568560
     
    579571                local_pf = fill_value
    580572
    581                 CALL usm_data_output_3d( av, trimvar, found, local_pf,         &
    582                                          nzb_do, nzt_do )
     573                CALL usm_data_output_3d( av, trimvar, found, local_pf, nzb_do, nzt_do )
    583574                resorted = .TRUE.
    584575
     
    623614
    624615             IF ( .NOT. found )  THEN
    625                 message_string =  'no output available for: ' //               &
    626                                   TRIM( do3d(av,ivar) )
     616                message_string =  'no output available for: ' // TRIM( do3d(av,ivar) )
    627617                CALL message( 'data_output_3d', 'PA0182', 0, 0, 0, 6, 0 )
    628618             ENDIF
     
    636626             DO  j = nys, nyn
    637627                DO  k = nzb_do, nzt_do
    638                    local_pf(i,j,k) = MERGE(                                    &
    639                                       to_be_resorted(k,j,i),                   &
    640                                       REAL( fill_value, KIND = wp ),           &
    641                                       BTEST( wall_flags_total_0(k,j,i), flag_nr ) )
     628                   local_pf(i,j,k) = MERGE( to_be_resorted(k,j,i),                                 &
     629                                            REAL( fill_value, KIND = wp ),                         &
     630                                            BTEST( wall_flags_total_0(k,j,i), flag_nr ) )
    642631                ENDDO
    643632             ENDDO
     
    650639       IF ( netcdf_data_format < 5 )  THEN
    651640!
    652 !--       Non-parallel netCDF output. Data is output in parallel in
    653 !--       FORTRAN binary format here, and later collected into one file by
    654 !--       combine_plot_fields
     641!--       Non-parallel netCDF output. Data is output in parallel in FORTRAN binary format here, and
     642!--       later collected into one file by combine_plot_fields
    655643          IF ( myid == 0 )  THEN
    656              WRITE ( 30 )  time_since_reference_point,                   &
    657                            do3d_time_count(av), av
     644             WRITE ( 30 )  time_since_reference_point, do3d_time_count(av), av
    658645          ENDIF
    659646          DO  i = 0, io_blocks-1
     
    687674!                count = (/ nxr-nxl+2, nyn-nys+2, nzt_do-nzb_do+1, 1 /) )
    688675!          ELSE
    689              nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,ivar),  &
    690                                  local_pf(nxl:nxr,nys:nyn,nzb_do:nzt_do),    &
    691                 start = (/ nxl+1, nys+1, nzb_do+1, do3d_time_count(av) /),  &
    692                 count = (/ nxr-nxl+1, nyn-nys+1, nzt_do-nzb_do+1, 1 /) )
     676             nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,ivar),                          &
     677                                     local_pf(nxl:nxr,nys:nyn,nzb_do:nzt_do),                      &
     678                                     start = (/ nxl+1, nys+1, nzb_do+1, do3d_time_count(av) /),    &
     679                                     count = (/ nxr-nxl+1, nyn-nys+1, nzt_do-nzb_do+1, 1 /)        &
     680                                   )
    693681!          ENDIF
    694682          CALL netcdf_handle_error( 'data_output_3d', 386 )
     
    697685#else
    698686#if defined( __netcdf )
    699        nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,ivar),        &
    700                          local_pf(nxl:nxr,nys:nyn,nzb_do:nzt_do),          &
    701                          start = (/ 1, 1, 1, do3d_time_count(av) /),       &
    702                          count = (/ nx+1, ny+1, nzt_do-nzb_do+1, 1 /) )
     687       nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,ivar),                                &
     688                               local_pf(nxl:nxr,nys:nyn,nzb_do:nzt_do),                            &
     689                               start = (/ 1, 1, 1, do3d_time_count(av) /),                         &
     690                               count = (/ nx+1, ny+1, nzt_do-nzb_do+1, 1 /) )
    703691       CALL netcdf_handle_error( 'data_output_3d', 446 )
    704692#endif
Note: See TracChangeset for help on using the changeset viewer.