Ignore:
Timestamp:
Apr 30, 2019 1:08:30 PM (5 years ago)
Author:
kanani
Message:

Fix too short driver attribute lengths, and individualize error messages (netcdf_data_input_mod, netcdf_interface_mod)

File:
1 edited

Legend:

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

    r3766 r3942  
    2525! -----------------
    2626! $Id$
     27! Add specifier to netcdf_handle_error to simplify identification of attribute
     28! causing the error
     29!
     30! 3766 2019-02-26 16:23:41Z raasch
    2731! bugfix in im_define_netcdf_grid argument list
    2832!
     
    71017105#if defined( __netcdf )
    71027106    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'title', TRIM( title ) )
    7103     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7107    CALL netcdf_handle_error( 'netcdf_create_global_atts 1', error_no )
    71047108    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'Conventions', 'CF-1.7' )
    7105     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7109    CALL netcdf_handle_error( 'netcdf_create_global_atts 2', error_no )
    71067110    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'creation_time', TRIM( run_date )//' '//TRIM( run_time )//' '//run_zone(1:3) )
    7107     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7111    CALL netcdf_handle_error( 'netcdf_create_global_atts 3', error_no )
    71087112    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'data_content', TRIM(data_content) )
    7109     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7113    CALL netcdf_handle_error( 'netcdf_create_global_atts 4', error_no )
    71107114    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'version', runnr+1 )
    7111     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7115    CALL netcdf_handle_error( 'netcdf_create_global_atts 5', error_no )
    71127116
    71137117    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'origin_time', init_model%origin_time )
    7114     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7118    CALL netcdf_handle_error( 'netcdf_create_global_atts 6', error_no )
    71157119    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'origin_lat', init_model%latitude )
    7116     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7120    CALL netcdf_handle_error( 'netcdf_create_global_atts 7', error_no )
    71177121    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'origin_lon', init_model%longitude )
    7118     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7122    CALL netcdf_handle_error( 'netcdf_create_global_atts 8', error_no )
    71197123    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'origin_x', init_model%origin_x )
    7120     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7124    CALL netcdf_handle_error( 'netcdf_create_global_atts 9', error_no )
    71217125    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'origin_y', init_model%origin_y )
    7122     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7126    CALL netcdf_handle_error( 'netcdf_create_global_atts 10', error_no )
    71237127    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'origin_z', init_model%origin_z )
    7124     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7128    CALL netcdf_handle_error( 'netcdf_create_global_atts 11', error_no )
    71257129    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'rotation_angle', init_model%rotation_angle )
    7126     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7130    CALL netcdf_handle_error( 'netcdf_create_global_atts 12', error_no )
    71277131
    71287132    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'dependencies', '' )
    7129     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7133    CALL netcdf_handle_error( 'netcdf_create_global_atts 13', error_no )
    71307134    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'history', '' )
    7131     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7135    CALL netcdf_handle_error( 'netcdf_create_global_atts 14', error_no )
    71327136
    71337137    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, TRIM( input_file_atts%author_char ), TRIM( input_file_atts%author ) )
    7134     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7138    CALL netcdf_handle_error( 'netcdf_create_global_atts 15', error_no )
    71357139    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, TRIM( input_file_atts%contact_person_char ), TRIM( input_file_atts%contact_person ) )
    7136     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7140    CALL netcdf_handle_error( 'netcdf_create_global_atts 16', error_no )
    71377141    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, TRIM( input_file_atts%institution_char ), TRIM( input_file_atts%institution ) )
    7138     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7142    CALL netcdf_handle_error( 'netcdf_create_global_atts 17', error_no )
    71397143    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, TRIM( input_file_atts%acronym_char ), TRIM( input_file_atts%acronym ) )
    7140     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7144    CALL netcdf_handle_error( 'netcdf_create_global_atts 18', error_no )
    71417145
    71427146    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, TRIM( input_file_atts%campaign_char ), TRIM( input_file_atts%campaign ) )
    7143     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7147    CALL netcdf_handle_error( 'netcdf_create_global_atts 19', error_no )
    71447148    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, TRIM( input_file_atts%location_char ), TRIM( input_file_atts%location ) )
    7145     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7149    CALL netcdf_handle_error( 'netcdf_create_global_atts 20', error_no )
    71467150    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, TRIM( input_file_atts%site_char ), TRIM( input_file_atts%site ) )
    7147     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7151    CALL netcdf_handle_error( 'netcdf_create_global_atts 21', error_no )
    71487152
    71497153    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'source', TRIM( version )//' '//TRIM( revision ) )
    7150     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7154    CALL netcdf_handle_error( 'netcdf_create_global_atts 22', error_no )
    71517155    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, TRIM( input_file_atts%references_char ), TRIM( input_file_atts%references ) )
    7152     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7156    CALL netcdf_handle_error( 'netcdf_create_global_atts 23', error_no )
    71537157    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, TRIM( input_file_atts%keywords_char ), TRIM( input_file_atts%keywords ) )
    7154     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7158    CALL netcdf_handle_error( 'netcdf_create_global_atts 24', error_no )
    71557159    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, TRIM( input_file_atts%licence_char ), TRIM( input_file_atts%licence ) )
    7156     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7160    CALL netcdf_handle_error( 'netcdf_create_global_atts 25', error_no )
    71577161    nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, TRIM( input_file_atts%comment_char ), TRIM( input_file_atts%comment ) )
    7158     CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
     7162    CALL netcdf_handle_error( 'netcdf_create_global_atts 26', error_no )
    71597163
    71607164#endif
Note: See TracChangeset for help on using the changeset viewer.