Ignore:
Timestamp:
Mar 1, 2010 8:30:24 AM (12 years ago)
Author:
raasch
Message:

New:
---
Output in NetCDF4-format. New d3par-parameter netcdf_data_format.

(check_open, check_parameters, close_file, data_output_2d, data_output_3d, header, modules, netcdf, parin)

Modules to be loaded for compilation (mbuild) or job execution (mrun)
can be given in the configuration file using variable modules. Example:

%modules ifort/11.0.069:netcdf lcsgih parallel

This method replaces the (undocumented) mpilib-variable.

WARNING: All fixed settings of modules in the scripts mbuild, mrun, and subjob
have been removed! Please set the modules variable appropriately in your
configuration file. (mbuild, mrun, subjob)

Changed:


Parameters netcdf_64bit and netcdf_64bit_3d have been removed. Use
netcdf_data_format = 2 for choosing the classic 64bit-offset format (this is
the default). The offset-format can not be set independently for the
3d-output-data any more.

Parameters netcdf_format_mask, netcdf_format_mask_av, and variables
nc_format_mask, format_parallel_io removed. They are replaced by the new
parameter netcdf_data_format. (check_open, close_file,
data_output_mask, header, init_masks, modules, parin)

Errors:


bugfix in trunk/UTIL/Makefile: forgot to compile for interpret_config

Bugfix: timeseries data have to be collected by PE0 (user_statistics)

File:
1 edited

Legend:

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

    r392 r493  
    7676!-- Open output file.
    7777!-- Also creates coordinate and fld-file for AVS.
    78 !-- In case of a run on more than one PE, each PE opens its own file and
     78!-- For classic or 64bit NetCDF output or output of other (old) data formats,
     79!-- for a run on more than one PE, each PE opens its own file and
    7980!-- writes the data of its subdomain in binary format (regardless of the format
    8081!-- the user has requested). After the run, these files are combined to one
    8182!-- file by combine_plot_fields in the format requested by the user (netcdf
    82 !-- and/or avs).
    83     IF ( avs_output  .OR.  ( numprocs > 1 ) )  CALL check_open( 30 )
    84 
    85 #if defined( __netcdf )
    86     IF ( myid == 0  .AND.  netcdf_output )  CALL check_open( 106+av*10 )
    87 #endif
     83!-- and/or avs).
     84!-- For NetCDF4/HDF5 output, data is written in parallel into one file.
     85    IF ( netcdf_output )  THEN
     86       IF ( netcdf_data_format < 3 )  THEN
     87          CALL check_open( 30 )
     88          IF ( myid == 0 )  CALL check_open( 106+av*10 )
     89       ELSE
     90          CALL check_open( 106+av*10 )
     91       ENDIF
     92    ELSE
     93       IF ( avs_output  .OR.  ( numprocs > 1 ) )  CALL check_open( 30 )
     94    ENDIF
    8895
    8996!
     
    94101!-- Update the NetCDF time axis
    95102#if defined( __netcdf )
    96     do3d_time_count(av) = do3d_time_count(av) + 1
    97     IF ( myid == 0  .AND.  netcdf_output )  THEN
    98        nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_time_3d(av), &
    99                                (/ time_since_reference_point /),  &
    100                                start = (/ do3d_time_count(av) /), &
    101                                count = (/ 1 /) )
    102        CALL handle_netcdf_error( 'data_output_3d', 376 )
     103    IF ( myid == 0  .OR.  netcdf_data_format > 2 )  THEN
     104       do3d_time_count(av) = do3d_time_count(av) + 1
     105       IF ( netcdf_output )  THEN
     106          nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_time_3d(av), &
     107                                  (/ time_since_reference_point /),  &
     108                                  start = (/ do3d_time_count(av) /), &
     109                                  count = (/ 1 /) )
     110          CALL handle_netcdf_error( 'data_output_3d', 376 )
     111       ENDIF
    103112    ENDIF
    104113#endif
     
    376385!--       Uncompressed output.
    377386#if defined( __parallel )
    378           IF ( netcdf_output  .AND.  myid == 0 )  THEN
    379              WRITE ( 30 )  simulated_time, do3d_time_count(av), av
     387          IF ( netcdf_output )  THEN
     388             IF ( netcdf_data_format < 3 )  THEN
     389!
     390!--             Classic or 64bit format. Data is output in parallel in FORTRAN
     391!--             binary format here, and later collected into one file by
     392!--             combine_plot_fields
     393                IF ( myid == 0 )  THEN
     394                   WRITE ( 30 )  simulated_time, do3d_time_count(av), av
     395                ENDIF
     396                WRITE ( 30 )  nxl-1, nxr+1, nys-1, nyn+1, nzb, nz_do3d
     397                WRITE ( 30 )  local_pf
     398
     399             ELSE
     400!
     401!--             Output in NetCDF4/HDF5 format.
     402!--             Do not output redundant ghost point data except for the
     403!--             boundaries of the total domain.
     404                IF ( nxr == nx  .AND.  nyn /= ny )  THEN
     405                   nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,if), &
     406                                  local_pf(nxl:nxr+1,nys:nyn,nzb:nz_do3d),    &
     407                      start = (/ nxl+1, nys+1, nzb+1, do3d_time_count(av) /), &
     408                      count = (/ nxr-nxl+2, nyn-nys+1, nz_do3d-nzb+1, 1 /) )
     409                ELSEIF ( nxr /= nx  .AND.  nyn == ny )  THEN
     410                   nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,if), &
     411                                  local_pf(nxl:nxr,nys:nyn+1,nzb:nz_do3d),    &
     412                      start = (/ nxl+1, nys+1, nzb+1, do3d_time_count(av) /), &
     413                      count = (/ nxr-nxl+1, nyn-nys+2, nz_do3d-nzb+1, 1 /) )
     414                ELSEIF ( nxr == nx  .AND.  nyn == ny )  THEN
     415                   nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,if), &
     416                                  local_pf(nxl:nxr+1,nys:nyn+1,nzb:nz_do3d),  &
     417                      start = (/ nxl+1, nys+1, nzb+1, do3d_time_count(av) /), &
     418                      count = (/ nxr-nxl+2, nyn-nys+2, nz_do3d-nzb+1, 1 /) )
     419                ELSE
     420                   nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,if), &
     421                                  local_pf(nxl:nxr,nys:nyn,nzb:nz_do3d),      &
     422                      start = (/ nxl+1, nys+1, nzb+1, do3d_time_count(av) /), &
     423                      count = (/ nxr-nxl+1, nyn-nys+1, nz_do3d-nzb+1, 1 /) )
     424                ENDIF
     425                CALL handle_netcdf_error( 'data_output_3d', 386 )
     426             ENDIF
    380427          ENDIF
    381           WRITE ( 30 )  nxl-1, nxr+1, nys-1, nyn+1, nzb, nz_do3d
    382           WRITE ( 30 )  local_pf
    383428#else
    384429          IF ( avs_output )  THEN
     
    387432#if defined( __netcdf )
    388433          IF ( netcdf_output )  THEN
    389              nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,if),       &
    390                                   local_pf(nxl:nxr+1,nys:nyn+1,nzb:nz_do3d),  &
    391                                   start = (/ 1, 1, 1, do3d_time_count(av) /), &
    392                                   count = (/ nx+2, ny+2, nz_do3d-nzb+1, 1 /) )
    393              CALL handle_netcdf_error( 'data_output_3d', 386 )
     434
     435             nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,if),    &
     436                               local_pf(nxl:nxr+1,nys:nyn+1,nzb:nz_do3d),  &
     437                               start = (/ 1, 1, 1, do3d_time_count(av) /), &
     438                               count = (/ nx+2, ny+2, nz_do3d-nzb+1, 1 /) )
     439             CALL handle_netcdf_error( 'data_output_3d', 446 )
     440
    394441          ENDIF
    395442#endif
Note: See TracChangeset for help on using the changeset viewer.