source: palm/trunk/SOURCE/data_output_3d.f90 @ 1585

Last change on this file since 1585 was 1585, checked in by maronga, 9 years ago

Added support for RRTMG radiation code

  • Property svn:keywords set to Id
File size: 22.8 KB
Line 
1 SUBROUTINE data_output_3d( av )
2
3!--------------------------------------------------------------------------------!
4! This file is part of PALM.
5!
6! PALM is free software: you can redistribute it and/or modify it under the terms
7! of the GNU General Public License as published by the Free Software Foundation,
8! either version 3 of the License, or (at your option) any later 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/>.
16!
17! Copyright 1997-2014 Leibniz Universitaet Hannover
18!--------------------------------------------------------------------------------!
19!
20! Current revisions:
21! ------------------
22! Added support for RRTMG
23!
24! Former revisions:
25! -----------------
26! $Id: data_output_3d.f90 1585 2015-04-30 07:05:52Z maronga $
27!
28! 1551 2015-03-03 14:18:16Z maronga
29! Added suppport for land surface model and radiation model output. In the course
30! of this action, the limits for vertical loops have been changed (from nzb and
31! nzt+1 to nzb_do and nzt_do, respectively in order to allow soil model output).
32! Moreover, a new vertical grid zs was introduced.
33!
34! 1359 2014-04-11 17:15:14Z hoffmann
35! New particle structure integrated.
36!
37! 1353 2014-04-08 15:21:23Z heinze
38! REAL constants provided with KIND-attribute
39!
40! 1327 2014-03-21 11:00:16Z raasch
41! parts concerning avs output removed,
42! -netcdf output queries
43!
44! 1320 2014-03-20 08:40:49Z raasch
45! ONLY-attribute added to USE-statements,
46! kind-parameters added to all INTEGER and REAL declaration statements,
47! kinds are defined in new module kinds,
48! old module precision_kind is removed,
49! revision history before 2012 removed,
50! comment fields (!:) to be used for variable explanations added to
51! all variable declaration statements
52!
53! 1318 2014-03-17 13:35:16Z raasch
54! barrier argument removed from cpu_log,
55! module interfaces removed
56!
57! 1308 2014-03-13 14:58:42Z fricke
58! Check, if the limit of the time dimension is exceeded for parallel output
59! To increase the performance for parallel output, the following is done:
60! - Update of time axis is only done by PE0
61!
62! 1244 2013-10-31 08:16:56Z raasch
63! Bugfix for index bounds in case of 3d-parallel output
64!
65! 1115 2013-03-26 18:16:16Z hoffmann
66! ql is calculated by calc_liquid_water_content
67!
68! 1106 2013-03-04 05:31:38Z raasch
69! array_kind renamed precision_kind
70!
71! 1076 2012-12-05 08:30:18Z hoffmann
72! Bugfix in output of ql
73!
74! 1053 2012-11-13 17:11:03Z hoffmann
75! +nr, qr, prr, qc and averaged quantities
76!
77! 1036 2012-10-22 13:43:42Z raasch
78! code put under GPL (PALM 3.9)
79!
80! 1031 2012-10-19 14:35:30Z raasch
81! netCDF4 without parallel file support implemented
82!
83! 1007 2012-09-19 14:30:36Z franke
84! Bugfix: missing calculation of ql_vp added
85!
86! Revision 1.1  1997/09/03 06:29:36  raasch
87! Initial revision
88!
89!
90! Description:
91! ------------
92! Output of the 3D-arrays in netCDF and/or AVS format.
93!------------------------------------------------------------------------------!
94
95    USE arrays_3d,                                                             &
96        ONLY:  e, nr, p, pt, q, qc, ql, ql_c, ql_v, qr, rho, sa, tend, u, v,   &
97               vpt, w
98       
99    USE averaging
100       
101    USE cloud_parameters,                                                      &
102        ONLY:  l_d_cp, prr, pt_d_t
103       
104    USE control_parameters,                                                    &
105        ONLY:  avs_data_file, cloud_physics, do3d, do3d_avs_n,                 &
106               do3d_no, do3d_time_count, io_blocks, io_group,                  &
107               message_string, netcdf_data_format, ntdim_3d,                   &
108               nz_do3d, plot_3d_precision, psolver, simulated_time,            &
109               simulated_time_chr, skip_do_avs, time_since_reference_point
110       
111    USE cpulog,                                                                &
112        ONLY:  log_point, cpu_log
113       
114    USE indices,                                                               &
115        ONLY:  nbgp, nx, nxl, nxlg, nxr, nxrg, ny, nyn, nyng, nys, nysg, nzt,  &
116               nzb
117       
118    USE kinds
119   
120    USE land_surface_model_mod,                                                &
121        ONLY: m_soil, m_soil_av, nzb_soil, nzt_soil, t_soil, t_soil_av
122
123    USE netcdf_control
124       
125    USE particle_attributes,                                                   &
126        ONLY:  grid_particles, number_of_particles, particles,                 &
127               particle_advection_start, prt_count
128       
129    USE pegrid
130
131    USE radiation_model_mod,                                                   &
132        ONLY:  rad_lw_in, rad_lw_in_av, rad_lw_out, rad_lw_out_av,             &
133               rad_sw_in, rad_sw_in_av, rad_sw_out, rad_sw_out_av
134
135
136    IMPLICIT NONE
137
138    CHARACTER (LEN=9) ::  simulated_time_mod  !:
139
140    INTEGER(iwp) ::  av        !:
141    INTEGER(iwp) ::  i         !:
142    INTEGER(iwp) ::  if        !:
143    INTEGER(iwp) ::  j         !:
144    INTEGER(iwp) ::  k         !:
145    INTEGER(iwp) ::  n         !:
146    INTEGER(iwp) ::  nzb_do    !: vertical lower limit for data output
147    INTEGER(iwp) ::  nzt_do    !: vertical upper limit for data output
148    INTEGER(iwp) ::  pos       !:
149    INTEGER(iwp) ::  prec      !:
150    INTEGER(iwp) ::  psi       !:
151
152    LOGICAL      ::  found     !:
153    LOGICAL      ::  resorted  !:
154
155    REAL(wp)     ::  mean_r    !:
156    REAL(wp)     ::  s_r2      !:
157    REAL(wp)     ::  s_r3      !:
158
159    REAL(sp), DIMENSION(:,:,:), ALLOCATABLE ::  local_pf  !:
160
161    REAL(wp), DIMENSION(:,:,:), POINTER ::  to_be_resorted  !:
162
163!
164!-- Return, if nothing to output
165    IF ( do3d_no(av) == 0 )  RETURN
166!
167!-- For parallel netcdf output the time axis must be limited. Return, if this
168!-- limit is exceeded. This could be the case, if the simulated time exceeds
169!-- the given end time by the length of the given output interval.
170    IF ( netcdf_data_format > 4 )  THEN
171       IF ( do3d_time_count(av) + 1 > ntdim_3d(av) )  THEN
172          WRITE ( message_string, * ) 'Output of 3d data is not given at t=',  &
173                                      simulated_time, '&because the maximum ', & 
174                                      'number of output time levels is ',      &
175                                      'exceeded.'
176          CALL message( 'data_output_3d', 'PA0387', 0, 1, 0, 6, 0 )         
177          RETURN
178       ENDIF
179    ENDIF
180
181    CALL cpu_log (log_point(14),'data_output_3d','start')
182
183!
184!-- Open output file.
185!-- Also creates coordinate and fld-file for AVS.
186!-- For classic or 64bit netCDF output or output of other (old) data formats,
187!-- for a run on more than one PE, each PE opens its own file and
188!-- writes the data of its subdomain in binary format (regardless of the format
189!-- the user has requested). After the run, these files are combined to one
190!-- file by combine_plot_fields in the format requested by the user (netcdf
191!-- and/or avs).
192!-- For netCDF4/HDF5 output, data is written in parallel into one file.
193    IF ( netcdf_data_format < 5 )  THEN
194       CALL check_open( 30 )
195       IF ( myid == 0 )  CALL check_open( 106+av*10 )
196    ELSE
197       CALL check_open( 106+av*10 )
198    ENDIF
199
200!
201!-- Update the netCDF time axis
202!-- In case of parallel output, this is only done by PE0 to increase the
203!-- performance.
204#if defined( __netcdf )
205    do3d_time_count(av) = do3d_time_count(av) + 1
206    IF ( myid == 0 )  THEN
207       nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_time_3d(av),           &
208                               (/ time_since_reference_point /),            &
209                               start = (/ do3d_time_count(av) /),           &
210                               count = (/ 1 /) )
211       CALL handle_netcdf_error( 'data_output_3d', 376 )
212    ENDIF
213#endif
214
215!
216!-- Loop over all variables to be written.
217    if = 1
218
219    DO  WHILE ( do3d(av,if)(1:1) /= ' ' )
220!
221!--    Store the array chosen on the temporary array.
222       resorted = .FALSE.
223       nzb_do = nzb
224       nzt_do = nz_do3d
225
226!
227!--    Allocate a temporary array with the desired output dimensions.
228       ALLOCATE( local_pf(nxlg:nxrg,nysg:nyng,nzb_do:nzt_do) )
229
230       SELECT CASE ( TRIM( do3d(av,if) ) )
231
232          CASE ( 'e' )
233             IF ( av == 0 )  THEN
234                to_be_resorted => e
235             ELSE
236                to_be_resorted => e_av
237             ENDIF
238
239          CASE ( 'lpt' )
240             IF ( av == 0 )  THEN
241                to_be_resorted => pt
242             ELSE
243                to_be_resorted => lpt_av
244             ENDIF
245
246          CASE ( 'm_soil' )
247             nzb_do = nzb_soil
248             nzt_do = nzt_soil
249!
250!--          For soil model quantities, it is required to re-allocate local_pf
251             DEALLOCATE ( local_pf )
252             ALLOCATE( local_pf(nxlg:nxrg,nysg:nyng,nzb_do:nzt_do) )
253
254             IF ( av == 0 )  THEN
255                to_be_resorted => m_soil
256             ELSE
257                to_be_resorted => m_soil_av
258             ENDIF
259
260          CASE ( 'nr' )
261             IF ( av == 0 )  THEN
262                to_be_resorted => nr
263             ELSE
264                to_be_resorted => nr_av
265             ENDIF
266
267          CASE ( 'p' )
268             IF ( av == 0 )  THEN
269                IF ( psolver /= 'sor' )  CALL exchange_horiz( p, nbgp )
270                to_be_resorted => p
271             ELSE
272                IF ( psolver /= 'sor' )  CALL exchange_horiz( p_av, nbgp )
273                to_be_resorted => p_av
274             ENDIF
275
276          CASE ( 'pc' )  ! particle concentration (requires ghostpoint exchange)
277             IF ( av == 0 )  THEN
278                IF ( simulated_time >= particle_advection_start )  THEN
279                   tend = prt_count
280                   CALL exchange_horiz( tend, nbgp )
281                ELSE
282                   tend = 0.0_wp
283                ENDIF
284                DO  i = nxlg, nxrg
285                   DO  j = nysg, nyng
286                      DO  k = nzb_do, nzt_do
287                         local_pf(i,j,k) = tend(k,j,i)
288                      ENDDO
289                   ENDDO
290                ENDDO
291                resorted = .TRUE.
292             ELSE
293                CALL exchange_horiz( pc_av, nbgp )
294                to_be_resorted => pc_av
295             ENDIF
296
297          CASE ( 'pr' )  ! mean particle radius (effective radius)
298             IF ( av == 0 )  THEN
299                IF ( simulated_time >= particle_advection_start )  THEN
300                   DO  i = nxl, nxr
301                      DO  j = nys, nyn
302                         DO  k = nzb_do, nzt_do
303                            number_of_particles = prt_count(k,j,i)
304                            IF (number_of_particles <= 0)  CYCLE
305                            particles => grid_particles(k,j,i)%particles(1:number_of_particles)
306                            s_r2 = 0.0_wp
307                            s_r3 = 0.0_wp
308                            DO  n = 1, number_of_particles
309                               IF ( particles(n)%particle_mask )  THEN
310                                  s_r2 = s_r2 + particles(n)%radius**2 * &
311                                         particles(n)%weight_factor
312                                  s_r3 = s_r3 + particles(n)%radius**3 * &
313                                         particles(n)%weight_factor
314                               ENDIF
315                            ENDDO
316                            IF ( s_r2 > 0.0_wp )  THEN
317                               mean_r = s_r3 / s_r2
318                            ELSE
319                               mean_r = 0.0_wp
320                            ENDIF
321                            tend(k,j,i) = mean_r
322                         ENDDO
323                      ENDDO
324                   ENDDO
325                   CALL exchange_horiz( tend, nbgp )
326                ELSE
327                   tend = 0.0_wp
328                ENDIF
329                DO  i = nxlg, nxrg
330                   DO  j = nysg, nyng
331                      DO  k = nzb_do, nzt_do
332                         local_pf(i,j,k) = tend(k,j,i)
333                      ENDDO
334                   ENDDO
335                ENDDO
336                resorted = .TRUE.
337             ELSE
338                CALL exchange_horiz( pr_av, nbgp )
339                to_be_resorted => pr_av
340             ENDIF
341
342          CASE ( 'prr' )
343             IF ( av == 0 )  THEN
344                CALL exchange_horiz( prr, nbgp )
345                DO  i = nxlg, nxrg
346                   DO  j = nysg, nyng
347                      DO  k = nzb, nzt+1
348                         local_pf(i,j,k) = prr(k,j,i)
349                      ENDDO
350                   ENDDO
351                ENDDO
352             ELSE
353                CALL exchange_horiz( prr_av, nbgp )
354                DO  i = nxlg, nxrg
355                   DO  j = nysg, nyng
356                      DO  k = nzb, nzt+1
357                         local_pf(i,j,k) = prr_av(k,j,i)
358                      ENDDO
359                   ENDDO
360                ENDDO
361             ENDIF
362             resorted = .TRUE.
363
364          CASE ( 'pt' )
365             IF ( av == 0 )  THEN
366                IF ( .NOT. cloud_physics ) THEN
367                   to_be_resorted => pt
368                ELSE
369                   DO  i = nxlg, nxrg
370                      DO  j = nysg, nyng
371                         DO  k = nzb_do, nzt_do
372                            local_pf(i,j,k) = pt(k,j,i) + l_d_cp *             &
373                                                          pt_d_t(k) *          &
374                                                          ql(k,j,i)
375                         ENDDO
376                      ENDDO
377                   ENDDO
378                   resorted = .TRUE.
379                ENDIF
380             ELSE
381                to_be_resorted => pt_av
382             ENDIF
383
384          CASE ( 'q' )
385             IF ( av == 0 )  THEN
386                to_be_resorted => q
387             ELSE
388                to_be_resorted => q_av
389             ENDIF
390
391          CASE ( 'qc' )
392             IF ( av == 0 )  THEN
393                to_be_resorted => qc
394             ELSE
395                to_be_resorted => qc_av
396             ENDIF
397
398          CASE ( 'ql' )
399             IF ( av == 0 )  THEN
400                to_be_resorted => ql
401             ELSE
402                to_be_resorted => ql_av
403             ENDIF
404
405          CASE ( 'ql_c' )
406             IF ( av == 0 )  THEN
407                to_be_resorted => ql_c
408             ELSE
409                to_be_resorted => ql_c_av
410             ENDIF
411
412          CASE ( 'ql_v' )
413             IF ( av == 0 )  THEN
414                to_be_resorted => ql_v
415             ELSE
416                to_be_resorted => ql_v_av
417             ENDIF
418
419          CASE ( 'ql_vp' )
420             IF ( av == 0 )  THEN
421                IF ( simulated_time >= particle_advection_start )  THEN
422                   DO  i = nxl, nxr
423                      DO  j = nys, nyn
424                         DO  k = nzb_do, nzt_do
425                            number_of_particles = prt_count(k,j,i)
426                            IF (number_of_particles <= 0)  CYCLE
427                            particles => grid_particles(k,j,i)%particles(1:number_of_particles)
428                            DO  n = 1, number_of_particles
429                               IF ( particles(n)%particle_mask )  THEN
430                                  tend(k,j,i) =  tend(k,j,i) +                 &
431                                                 particles(n)%weight_factor /  &
432                                                 prt_count(k,j,i)
433                               ENDIF
434                            ENDDO
435                         ENDDO
436                      ENDDO
437                   ENDDO
438                   CALL exchange_horiz( tend, nbgp )
439                ELSE
440                   tend = 0.0_wp
441                ENDIF
442                DO  i = nxlg, nxrg
443                   DO  j = nysg, nyng
444                      DO  k = nzb_do, nzt_do
445                         local_pf(i,j,k) = tend(k,j,i)
446                      ENDDO
447                   ENDDO
448                ENDDO
449                resorted = .TRUE.
450             ELSE
451                CALL exchange_horiz( ql_vp_av, nbgp )
452                to_be_resorted => ql_vp_av
453             ENDIF
454
455          CASE ( 'qr' )
456             IF ( av == 0 )  THEN
457                to_be_resorted => qr
458             ELSE
459                to_be_resorted => qr_av
460             ENDIF
461
462          CASE ( 'qv' )
463             IF ( av == 0 )  THEN
464                DO  i = nxlg, nxrg
465                   DO  j = nysg, nyng
466                      DO  k = nzb_do, nzt_do
467                         local_pf(i,j,k) = q(k,j,i) - ql(k,j,i)
468                      ENDDO
469                   ENDDO
470                ENDDO
471                resorted = .TRUE.
472             ELSE
473                to_be_resorted => qv_av
474             ENDIF
475
476          CASE ( 'rad_sw_in' )
477             IF ( av == 0 )  THEN
478                to_be_resorted => rad_sw_in
479             ELSE
480                to_be_resorted => rad_sw_in_av
481             ENDIF
482
483          CASE ( 'rad_sw_out' )
484             IF ( av == 0 )  THEN
485                to_be_resorted => rad_sw_out
486             ELSE
487                to_be_resorted => rad_sw_out_av
488             ENDIF
489
490          CASE ( 'rad_lw_in' )
491             IF ( av == 0 )  THEN
492                to_be_resorted => rad_lw_in
493             ELSE
494                to_be_resorted => rad_lw_in_av
495             ENDIF
496
497          CASE ( 'rad_lw_out' )
498             IF ( av == 0 )  THEN
499                to_be_resorted => rad_lw_out
500             ELSE
501                to_be_resorted => rad_lw_out_av
502             ENDIF
503
504          CASE ( 'rho' )
505             IF ( av == 0 )  THEN
506                to_be_resorted => rho
507             ELSE
508                to_be_resorted => rho_av
509             ENDIF
510
511          CASE ( 's' )
512             IF ( av == 0 )  THEN
513                to_be_resorted => q
514             ELSE
515                to_be_resorted => s_av
516             ENDIF
517
518          CASE ( 'sa' )
519             IF ( av == 0 )  THEN
520                to_be_resorted => sa
521             ELSE
522                to_be_resorted => sa_av
523             ENDIF
524
525          CASE ( 't_soil' )
526             nzb_do = nzb_soil
527             nzt_do = nzt_soil
528!
529!--          For soil model quantities, it is required to re-allocate local_pf
530             DEALLOCATE ( local_pf )
531             ALLOCATE( local_pf(nxlg:nxrg,nysg:nyng,nzb_do:nzt_do) )
532
533             IF ( av == 0 )  THEN
534                to_be_resorted => t_soil
535             ELSE
536                to_be_resorted => t_soil_av
537             ENDIF
538
539          CASE ( 'u' )
540             IF ( av == 0 )  THEN
541                to_be_resorted => u
542             ELSE
543                to_be_resorted => u_av
544             ENDIF
545
546          CASE ( 'v' )
547             IF ( av == 0 )  THEN
548                to_be_resorted => v
549             ELSE
550                to_be_resorted => v_av
551             ENDIF
552
553          CASE ( 'vpt' )
554             IF ( av == 0 )  THEN
555                to_be_resorted => vpt
556             ELSE
557                to_be_resorted => vpt_av
558             ENDIF
559
560          CASE ( 'w' )
561             IF ( av == 0 )  THEN
562                to_be_resorted => w
563             ELSE
564                to_be_resorted => w_av
565             ENDIF
566
567          CASE DEFAULT
568!
569!--          User defined quantity
570             CALL user_data_output_3d( av, do3d(av,if), found, local_pf,       &
571                                       nzb_do, nzt_do )
572             resorted = .TRUE.
573
574             IF ( .NOT. found )  THEN
575                message_string =  'no output available for: ' //               &
576                                  TRIM( do3d(av,if) )
577                CALL message( 'data_output_3d', 'PA0182', 0, 0, 0, 6, 0 )
578             ENDIF
579
580       END SELECT
581
582!
583!--    Resort the array to be output, if not done above
584       IF ( .NOT. resorted )  THEN
585          DO  i = nxlg, nxrg
586             DO  j = nysg, nyng
587                DO  k = nzb_do, nzt_do
588                   local_pf(i,j,k) = to_be_resorted(k,j,i)
589                ENDDO
590             ENDDO
591          ENDDO
592       ENDIF
593
594!
595!--    Output of the 3D-array
596#if defined( __parallel )
597       IF ( netcdf_data_format < 5 )  THEN
598!
599!--       Non-parallel netCDF output. Data is output in parallel in
600!--       FORTRAN binary format here, and later collected into one file by
601!--       combine_plot_fields
602          IF ( myid == 0 )  THEN
603             WRITE ( 30 )  time_since_reference_point,                   &
604                           do3d_time_count(av), av
605          ENDIF
606          DO  i = 0, io_blocks-1
607             IF ( i == io_group )  THEN
608                WRITE ( 30 )  nxlg, nxrg, nysg, nyng, nzb_do, nzt_do
609                WRITE ( 30 )  local_pf(:,:,nzb_do:nzt_do)
610             ENDIF
611#if defined( __parallel )
612             CALL MPI_BARRIER( comm2d, ierr )
613#endif
614          ENDDO
615
616       ELSE
617#if defined( __netcdf )
618!
619!--       Parallel output in netCDF4/HDF5 format.
620!--       Do not output redundant ghost point data except for the
621!--       boundaries of the total domain.
622          IF ( nxr == nx  .AND.  nyn /= ny )  THEN
623             nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,if),  &
624                               local_pf(nxl:nxr+1,nys:nyn,nzb_do:nzt_do),    &
625                start = (/ nxl+1, nys+1, nzb_do+1, do3d_time_count(av) /),  &
626                count = (/ nxr-nxl+2, nyn-nys+1, nzt_do-nzb_do+1, 1 /) )
627          ELSEIF ( nxr /= nx  .AND.  nyn == ny )  THEN
628             nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,if),  &
629                               local_pf(nxl:nxr,nys:nyn+1,nzb_do:nzt_do),    &
630                start = (/ nxl+1, nys+1, nzb_do+1, do3d_time_count(av) /),  &
631                count = (/ nxr-nxl+1, nyn-nys+2, nzt_do-nzb_do+1, 1 /) )
632          ELSEIF ( nxr == nx  .AND.  nyn == ny )  THEN
633             nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,if),  &
634                             local_pf(nxl:nxr+1,nys:nyn+1,nzb_do:nzt_do  ),  &
635                start = (/ nxl+1, nys+1, nzb_do+1, do3d_time_count(av) /),  &
636                count = (/ nxr-nxl+2, nyn-nys+2, nzt_do-nzb_do+1, 1 /) )
637          ELSE
638             nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,if),  &
639                                 local_pf(nxl:nxr,nys:nyn,nzb_do:nzt_do),    &
640                start = (/ nxl+1, nys+1, nzb_do+1, do3d_time_count(av) /),  &
641                count = (/ nxr-nxl+1, nyn-nys+1, nzt_do-nzb_do+1, 1 /) )
642          ENDIF
643          CALL handle_netcdf_error( 'data_output_3d', 386 )
644#endif
645       ENDIF
646#else
647#if defined( __netcdf )
648       nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,if),        &
649                         local_pf(nxl:nxr+1,nys:nyn+1,nzb_do:nzt_do),        &
650                         start = (/ 1, 1, 1, do3d_time_count(av) /),     &
651                         count = (/ nx+2, ny+2, nzt_do-nzb_do+1, 1 /) )
652       CALL handle_netcdf_error( 'data_output_3d', 446 )
653#endif
654#endif
655
656       if = if + 1
657
658!
659!--    Deallocate temporary array
660       DEALLOCATE ( local_pf )
661
662    ENDDO
663
664    CALL cpu_log( log_point(14), 'data_output_3d', 'stop' )
665
666!
667!-- Formats.
6683300 FORMAT ('variable ',I4,'  file=',A,'  filetype=unformatted  skip=',I12/   &
669             'label = ',A,A)
670
671 END SUBROUTINE data_output_3d
Note: See TracBrowser for help on using the repository browser.