Ignore:
Timestamp:
Aug 19, 2009 4:56:44 PM (15 years ago)
Author:
letzel
Message:
  • Bugfix for extended NetCDF files: In order to avoid 'data mode' errors if updated attributes are larger than their original size, NF90_PUT_ATT is called in 'define mode' enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible performance loss; an alternative strategy would be to ensure equal attribute size in a job chain. (netcdf)
  • Changed: For extended NetCDF files, the updated title attribute includes an update of time_average_text where appropriate. (netcdf)
  • Bugfix: correction of initial volume flow for non-flat topography (init_3d_model)
  • Bugfix: zero initialization of arrays within buildings for 'cyclic_fill' (init_3d_model)
  • New: MPI debug option (mrun)
  • Documentation updates:
    • topography file format (chapter 3.5.4)
    • NC identifier range expanded to 444 (appendix_a)
File:
1 edited

Legend:

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

    r292 r359  
    77! Current revisions:
    88! ------------------
     9! For extended NetCDF files, the updated title attribute includes an update of
     10! time_average_text where appropriate.
     11! Bugfix for extended NetCDF files: In order to avoid 'data mode' errors if
     12! updated attributes are larger than their original size, NF90_PUT_ATT is called
     13! in 'define mode' enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a
     14! possible performance loss; an alternative strategy would be to ensure equal
     15! attribute size in a job chain.
    916! NetCDF unit attribute in timeseries output in case of statistic
    1017! regions added.
     
    650657
    651658!
    652 !--       Change the title attribute on file
     659!--       Update the title attribute on file
     660!--       In order to avoid 'data mode' errors if updated attributes are larger
     661!--       than their original size, NF90_PUT_ATT is called in 'define mode'
     662!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible
     663!--       performance loss due to data copying; an alternative strategy would be
     664!--       to ensure equal attribute size. Maybe revise later.
     665          IF ( av == 0 )  THEN
     666             time_average_text = ' '
     667          ELSE
     668             WRITE (time_average_text, '('', '',F7.1,'' s average'')') &
     669                                                            averaging_interval
     670          ENDIF
     671          nc_stat = NF90_REDEF( id_set_3d(av) )
     672          CALL handle_netcdf_error( 'netcdf', 429 )
    653673          nc_stat = NF90_PUT_ATT( id_set_3d(av), NF90_GLOBAL, 'title', &
    654                                   TRIM( run_description_header ) )
     674                                  TRIM( run_description_header ) //    &
     675                                  TRIM( time_average_text ) )
    655676          CALL handle_netcdf_error( 'netcdf', 96 )
     677          nc_stat = NF90_ENDDEF( id_set_3d(av) )
     678          CALL handle_netcdf_error( 'netcdf', 430 )
    656679          message_string = 'NetCDF file for volume data ' //             &
    657680                           TRIM( var ) // ' from previous run found.' // &
     
    12761299
    12771300!
    1278 !--       Change the title attribute on file
     1301!--       Update the title attribute on file
     1302!--       In order to avoid 'data mode' errors if updated attributes are larger
     1303!--       than their original size, NF90_PUT_ATT is called in 'define mode'
     1304!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible
     1305!--       performance loss due to data copying; an alternative strategy would be
     1306!--       to ensure equal attribute size in a job chain. Maybe revise later.
     1307          IF ( av == 0 )  THEN
     1308             time_average_text = ' '
     1309          ELSE
     1310             WRITE (time_average_text, '('', '',F7.1,'' s average'')') &
     1311                                                            averaging_interval
     1312          ENDIF
     1313          nc_stat = NF90_REDEF( id_set_xy(av) )
     1314          CALL handle_netcdf_error( 'netcdf', 431 )
    12791315          nc_stat = NF90_PUT_ATT( id_set_xy(av), NF90_GLOBAL, 'title', &
    1280                                   TRIM( run_description_header ) )
     1316                                  TRIM( run_description_header ) //    &
     1317                                  TRIM( time_average_text ) )
    12811318          CALL handle_netcdf_error( 'netcdf', 139 )
     1319          nc_stat = NF90_ENDDEF( id_set_xy(av) )
     1320          CALL handle_netcdf_error( 'netcdf', 432 )
    12821321          message_string = 'NetCDF file for cross-sections ' //           &
    12831322                            TRIM( var ) // ' from previous run found.' // &
     
    17981837
    17991838!
    1800 !--       Change the title attribute on file
     1839!--       Update the title attribute on file
     1840!--       In order to avoid 'data mode' errors if updated attributes are larger
     1841!--       than their original size, NF90_PUT_ATT is called in 'define mode'
     1842!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible
     1843!--       performance loss due to data copying; an alternative strategy would be
     1844!--       to ensure equal attribute size in a job chain. Maybe revise later.
     1845          IF ( av == 0 )  THEN
     1846             time_average_text = ' '
     1847          ELSE
     1848             WRITE (time_average_text, '('', '',F7.1,'' s average'')') &
     1849                                                            averaging_interval
     1850          ENDIF
     1851          nc_stat = NF90_REDEF( id_set_xz(av) )
     1852          CALL handle_netcdf_error( 'netcdf', 433 )
    18011853          nc_stat = NF90_PUT_ATT( id_set_xz(av), NF90_GLOBAL, 'title', &
    1802                                   TRIM( run_description_header ) )
     1854                                  TRIM( run_description_header ) //    &
     1855                                  TRIM( time_average_text ) )
    18031856          CALL handle_netcdf_error( 'netcdf', 178 )
     1857          nc_stat = NF90_ENDDEF( id_set_xz(av) )
     1858          CALL handle_netcdf_error( 'netcdf', 434 )
    18041859          message_string = 'NetCDF file for cross-sections ' //           &
    18051860                            TRIM( var ) // ' from previous run found.' // &
     
    23182373
    23192374!
    2320 !--       Change the title attribute on file
     2375!--       Update the title attribute on file
     2376!--       In order to avoid 'data mode' errors if updated attributes are larger
     2377!--       than their original size, NF90_PUT_ATT is called in 'define mode'
     2378!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible
     2379!--       performance loss due to data copying; an alternative strategy would be
     2380!--       to ensure equal attribute size in a job chain. Maybe revise later.
     2381          IF ( av == 0 )  THEN
     2382             time_average_text = ' '
     2383          ELSE
     2384             WRITE (time_average_text, '('', '',F7.1,'' s average'')') &
     2385                                                            averaging_interval
     2386          ENDIF
     2387          nc_stat = NF90_REDEF( id_set_yz(av) )
     2388          CALL handle_netcdf_error( 'netcdf', 435 )
    23212389          nc_stat = NF90_PUT_ATT( id_set_yz(av), NF90_GLOBAL, 'title', &
    2322                                   TRIM( run_description_header ) )
     2390                                  TRIM( run_description_header ) //    &
     2391                                  TRIM( time_average_text ) )
    23232392          CALL handle_netcdf_error( 'netcdf', 217 )
     2393          nc_stat = NF90_ENDDEF( id_set_yz(av) )
     2394          CALL handle_netcdf_error( 'netcdf', 436 )
    23242395          message_string = 'NetCDF file for cross-sections ' //           &
    23252396                            TRIM( var ) // ' from previous run found.' // &
     
    26112682
    26122683!
    2613 !--       Change the title attribute on file
     2684!--       Update the title attribute on file
     2685!--       In order to avoid 'data mode' errors if updated attributes are larger
     2686!--       than their original size, NF90_PUT_ATT is called in 'define mode'
     2687!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible
     2688!--       performance loss due to data copying; an alternative strategy would be
     2689!--       to ensure equal attribute size in a job chain. Maybe revise later.
     2690          IF ( averaging_interval_pr == 0.0 )  THEN
     2691             time_average_text = ' '
     2692          ELSE
     2693             WRITE (time_average_text, '('', '',F7.1,'' s average'')') &
     2694                                                            averaging_interval_pr
     2695          ENDIF
     2696          nc_stat = NF90_REDEF( id_set_pr )
     2697          CALL handle_netcdf_error( 'netcdf', 437 )
    26142698          nc_stat = NF90_PUT_ATT( id_set_pr, NF90_GLOBAL, 'title', &
    2615                                   TRIM( run_description_header ) )
     2699                                  TRIM( run_description_header ) //    &
     2700                                  TRIM( time_average_text ) )
    26162701          CALL handle_netcdf_error( 'netcdf', 248 )
     2702          nc_stat = NF90_ENDDEF( id_set_pr )
     2703          CALL handle_netcdf_error( 'netcdf', 438 )
    26172704          message_string = 'NetCDF file for vertical profiles ' // &
    26182705                           'from previous run found.' //           &
     
    28172904
    28182905!
    2819 !--       Change the title attribute on file
     2906!--       Update the title attribute on file
     2907!--       In order to avoid 'data mode' errors if updated attributes are larger
     2908!--       than their original size, NF90_PUT_ATT is called in 'define mode'
     2909!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible
     2910!--       performance loss due to data copying; an alternative strategy would be
     2911!--       to ensure equal attribute size in a job chain. Maybe revise later.
     2912          nc_stat = NF90_REDEF( id_set_ts )
     2913          CALL handle_netcdf_error( 'netcdf', 439 )
    28202914          nc_stat = NF90_PUT_ATT( id_set_ts, NF90_GLOBAL, 'title', &
    28212915                                  TRIM( run_description_header ) )
    28222916          CALL handle_netcdf_error( 'netcdf', 267 )
     2917          nc_stat = NF90_ENDDEF( id_set_ts )
     2918          CALL handle_netcdf_error( 'netcdf', 440 )
    28232919          message_string = 'NetCDF file for time series ' // &
    28242920                           'from previous run found.' //     &
     
    32303326
    32313327!
    3232 !--       Change the title attribute on file
     3328!--       Update the title attribute on file
     3329!--       In order to avoid 'data mode' errors if updated attributes are larger
     3330!--       than their original size, NF90_PUT_ATT is called in 'define mode'
     3331!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible
     3332!--       performance loss due to data copying; an alternative strategy would be
     3333!--       to ensure equal attribute size in a job chain. Maybe revise later.
     3334          nc_stat = NF90_REDEF( id_set_sp )
     3335          CALL handle_netcdf_error( 'netcdf', 441 )
    32333336          IF ( averaging_interval_sp /= 0.0 )  THEN
    32343337             WRITE (time_average_text,'('', '',F7.1,'' s average'')') &
     
    32473350          ENDIF
    32483351          CALL handle_netcdf_error( 'netcdf', 309 )
     3352          nc_stat = NF90_ENDDEF( id_set_sp )
     3353          CALL handle_netcdf_error( 'netcdf', 442 )
    32493354          message_string = 'NetCDF file for spectra ' //     &
    32503355                           'from previous run found.' //     &
     
    35863691
    35873692!
    3588 !--       Change the title attribute on file
     3693!--       Update the title attribute on file
     3694!--       In order to avoid 'data mode' errors if updated attributes are larger
     3695!--       than their original size, NF90_PUT_ATT is called in 'define mode'
     3696!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible
     3697!--       performance loss due to data copying; an alternative strategy would be
     3698!--       to ensure equal attribute size in a job chain. Maybe revise later.
     3699          nc_stat = NF90_REDEF( id_set_pts )
     3700          CALL handle_netcdf_error( 'netcdf', 443 )
    35893701          nc_stat = NF90_PUT_ATT( id_set_pts, NF90_GLOBAL, 'title', &
    35903702                                  TRIM( run_description_header ) )
    35913703          CALL handle_netcdf_error( 'netcdf', 411 )
     3704          nc_stat = NF90_ENDDEF( id_set_pts )
     3705          CALL handle_netcdf_error( 'netcdf', 444 )
    35923706          message_string = 'NetCDF file for particle time series ' // &
    35933707                           'from previous run found.' //              &
Note: See TracChangeset for help on using the changeset viewer.