Index: /palm/trunk/SOURCE/netcdf_data_input_mod.f90
===================================================================
--- /palm/trunk/SOURCE/netcdf_data_input_mod.f90	(revision 3941)
+++ /palm/trunk/SOURCE/netcdf_data_input_mod.f90	(revision 3942)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! Fix: increase LEN of all NetCDF attribute values (caused crash in 
+! netcdf_create_global_atts due to insufficient length)
+! 
+! 3941 2019-04-30 09:48:33Z suehring
 ! Move check for grid dimension to an earlier point in time when first array
 ! is read.
@@ -638,31 +642,31 @@
 !-- attribute.
     TYPE global_atts_type
-       CHARACTER(LEN=12 ) ::  acronym                            !< acronym of institution
+       CHARACTER(LEN=200) ::  acronym = ' '                      !< acronym of institution
        CHARACTER(LEN=7)   ::  acronym_char = 'acronym'           !< name of attribute
-       CHARACTER(LEN=200) ::  author                             !< first name, last name, email adress
+       CHARACTER(LEN=200) ::  author  = ' '                      !< first name, last name, email adress
        CHARACTER(LEN=6)   ::  author_char = 'author'             !< name of attribute
-       CHARACTER(LEN=12 ) ::  campaign = 'PALM-4U'               !< name of campaign
+       CHARACTER(LEN=200) ::  campaign = 'PALM-4U'               !< name of campaign
        CHARACTER(LEN=8)   ::  campaign_char = 'campaign'         !< name of attribute
-       CHARACTER(LEN=200) ::  comment                            !< comment to data
+       CHARACTER(LEN=200) ::  comment = ' '                      !< comment to data
        CHARACTER(LEN=7)   ::  comment_char = 'comment'           !< name of attribute
-       CHARACTER(LEN=200) ::  contact_person                     !< first name, last name, email adress
+       CHARACTER(LEN=200) ::  contact_person = ' '               !< first name, last name, email adress
        CHARACTER(LEN=14)  ::  contact_person_char = 'contact_person'  !< name of attribute
        CHARACTER(LEN=200) ::  conventions = 'CF-1.7'             !< netCDF convention
        CHARACTER(LEN=11)  ::  conventions_char = 'Conventions'   !< name of attribute
-       CHARACTER(LEN=23 ) ::  creation_time                      !< creation time of data set
+       CHARACTER(LEN=23 ) ::  creation_time = ' '                !< creation time of data set
        CHARACTER(LEN=13)  ::  creation_time_char = 'creation_time'  !< name of attribute
-       CHARACTER(LEN=16 ) ::  data_content                       !< content of data set
+       CHARACTER(LEN=200) ::  data_content = ' '                 !< content of data set
        CHARACTER(LEN=12)  ::  data_content_char = 'data_content' !< name of attribute
-       CHARACTER(LEN=200) ::  dependencies                       !< dependencies of data set
+       CHARACTER(LEN=200) ::  dependencies = ' '                 !< dependencies of data set
        CHARACTER(LEN=12)  ::  dependencies_char = 'dependencies' !< name of attribute
-       CHARACTER(LEN=200) ::  history                            !< information about data processing
+       CHARACTER(LEN=200) ::  history = ' '                      !< information about data processing
        CHARACTER(LEN=7)   ::  history_char = 'history'           !< name of attribute
-       CHARACTER(LEN=200) ::  institution                        !< name of responsible institution
+       CHARACTER(LEN=200) ::  institution = ' '                  !< name of responsible institution
        CHARACTER(LEN=11)  ::  institution_char = 'institution'   !< name of attribute
-       CHARACTER(LEN=200) ::  keywords                           !< keywords of data set
+       CHARACTER(LEN=200) ::  keywords = ' '                     !< keywords of data set
        CHARACTER(LEN=8)   ::  keywords_char = 'keywords'         !< name of attribute
-       CHARACTER(LEN=200) ::  licence                            !< licence of data set
+       CHARACTER(LEN=200) ::  licence = ' '                      !< licence of data set
        CHARACTER(LEN=7)   ::  licence_char = 'licence'           !< name of attribute
-       CHARACTER(LEN=200) ::  location                           !< place which refers to data set
+       CHARACTER(LEN=200) ::  location = ' '                     !< place which refers to data set
        CHARACTER(LEN=8)   ::  location_char = 'location'         !< name of attribute
        CHARACTER(LEN=10)  ::  origin_lat_char = 'origin_lat'     !< name of attribute
@@ -674,12 +678,12 @@
        CHARACTER(LEN=8)   ::  origin_z_char = 'origin_z'         !< name of attribute
        CHARACTER(LEN=12)  ::  palm_version_char = 'palm_version' !< name of attribute
-       CHARACTER(LEN=200) ::  references                         !< literature referring to data set
+       CHARACTER(LEN=200) ::  references = ' '                   !< literature referring to data set
        CHARACTER(LEN=10)  ::  references_char = 'references'     !< name of attribute
        CHARACTER(LEN=14)  ::  rotation_angle_char = 'rotation_angle'  !< name of attribute
-       CHARACTER(LEN=12 ) ::  site                               !< name of model domain
+       CHARACTER(LEN=200) ::  site = ' '                         !< name of model domain
        CHARACTER(LEN=4)   ::  site_char = 'site'                 !< name of attribute
-       CHARACTER(LEN=200) ::  source                             !< source of data set
+       CHARACTER(LEN=200) ::  source = ' '                       !< source of data set
        CHARACTER(LEN=6)   ::  source_char = 'source'             !< name of attribute
-       CHARACTER(LEN=200) ::  title                              !< title of data set
+       CHARACTER(LEN=200) ::  title = ' '                        !< title of data set
        CHARACTER(LEN=5)   ::  title_char = 'title'               !< name of attribute
        CHARACTER(LEN=7)   ::  version_char = 'version'           !< name of attribute
Index: /palm/trunk/SOURCE/netcdf_interface_mod.f90
===================================================================
--- /palm/trunk/SOURCE/netcdf_interface_mod.f90	(revision 3941)
+++ /palm/trunk/SOURCE/netcdf_interface_mod.f90	(revision 3942)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! Add specifier to netcdf_handle_error to simplify identification of attribute
+! causing the error
+! 
+! 3766 2019-02-26 16:23:41Z raasch
 ! bugfix in im_define_netcdf_grid argument list
 ! 
@@ -7101,60 +7105,60 @@
 #if defined( __netcdf )
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'title', TRIM( title ) )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 1', error_no )
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'Conventions', 'CF-1.7' )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 2', error_no )
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'creation_time', TRIM( run_date )//' '//TRIM( run_time )//' '//run_zone(1:3) )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 3', error_no )
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'data_content', TRIM(data_content) )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 4', error_no )
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'version', runnr+1 )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 5', error_no )
 
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'origin_time', init_model%origin_time )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 6', error_no )
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'origin_lat', init_model%latitude )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 7', error_no )
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'origin_lon', init_model%longitude )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 8', error_no )
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'origin_x', init_model%origin_x )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 9', error_no )
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'origin_y', init_model%origin_y )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 10', error_no )
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'origin_z', init_model%origin_z )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 11', error_no )
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'rotation_angle', init_model%rotation_angle )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 12', error_no )
 
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'dependencies', '' )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 13', error_no )
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'history', '' )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 14', error_no )
 
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, TRIM( input_file_atts%author_char ), TRIM( input_file_atts%author ) )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 15', error_no )
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, TRIM( input_file_atts%contact_person_char ), TRIM( input_file_atts%contact_person ) )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 16', error_no )
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, TRIM( input_file_atts%institution_char ), TRIM( input_file_atts%institution ) )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 17', error_no )
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, TRIM( input_file_atts%acronym_char ), TRIM( input_file_atts%acronym ) )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 18', error_no )
 
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, TRIM( input_file_atts%campaign_char ), TRIM( input_file_atts%campaign ) )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 19', error_no )
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, TRIM( input_file_atts%location_char ), TRIM( input_file_atts%location ) )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 20', error_no )
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, TRIM( input_file_atts%site_char ), TRIM( input_file_atts%site ) )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 21', error_no )
 
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, 'source', TRIM( version )//' '//TRIM( revision ) )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 22', error_no )
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, TRIM( input_file_atts%references_char ), TRIM( input_file_atts%references ) )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 23', error_no )
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, TRIM( input_file_atts%keywords_char ), TRIM( input_file_atts%keywords ) )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 24', error_no )
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, TRIM( input_file_atts%licence_char ), TRIM( input_file_atts%licence ) )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 25', error_no )
     nc_stat = NF90_PUT_ATT( ncid, NF90_GLOBAL, TRIM( input_file_atts%comment_char ), TRIM( input_file_atts%comment ) )
-    CALL netcdf_handle_error( 'netcdf_create_global_atts', error_no )
+    CALL netcdf_handle_error( 'netcdf_create_global_atts 26', error_no )
 
 #endif
