Index: palm/trunk/SOURCE/netcdf_interface_mod.f90
===================================================================
--- palm/trunk/SOURCE/netcdf_interface_mod.f90	(revision 3766)
+++ 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
