Changeset 3942
- Timestamp:
- Apr 30, 2019 1:08:30 PM (6 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/netcdf_data_input_mod.f90
r3941 r3942 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Fix: increase LEN of all NetCDF attribute values (caused crash in 28 ! netcdf_create_global_atts due to insufficient length) 29 ! 30 ! 3941 2019-04-30 09:48:33Z suehring 27 31 ! Move check for grid dimension to an earlier point in time when first array 28 32 ! is read. … … 638 642 !-- attribute. 639 643 TYPE global_atts_type 640 CHARACTER(LEN= 12 ) :: acronym!< acronym of institution644 CHARACTER(LEN=200) :: acronym = ' ' !< acronym of institution 641 645 CHARACTER(LEN=7) :: acronym_char = 'acronym' !< name of attribute 642 CHARACTER(LEN=200) :: author 646 CHARACTER(LEN=200) :: author = ' ' !< first name, last name, email adress 643 647 CHARACTER(LEN=6) :: author_char = 'author' !< name of attribute 644 CHARACTER(LEN= 12) :: campaign = 'PALM-4U' !< name of campaign648 CHARACTER(LEN=200) :: campaign = 'PALM-4U' !< name of campaign 645 649 CHARACTER(LEN=8) :: campaign_char = 'campaign' !< name of attribute 646 CHARACTER(LEN=200) :: comment 650 CHARACTER(LEN=200) :: comment = ' ' !< comment to data 647 651 CHARACTER(LEN=7) :: comment_char = 'comment' !< name of attribute 648 CHARACTER(LEN=200) :: contact_person 652 CHARACTER(LEN=200) :: contact_person = ' ' !< first name, last name, email adress 649 653 CHARACTER(LEN=14) :: contact_person_char = 'contact_person' !< name of attribute 650 654 CHARACTER(LEN=200) :: conventions = 'CF-1.7' !< netCDF convention 651 655 CHARACTER(LEN=11) :: conventions_char = 'Conventions' !< name of attribute 652 CHARACTER(LEN=23 ) :: creation_time 656 CHARACTER(LEN=23 ) :: creation_time = ' ' !< creation time of data set 653 657 CHARACTER(LEN=13) :: creation_time_char = 'creation_time' !< name of attribute 654 CHARACTER(LEN= 16 ) :: data_content!< content of data set658 CHARACTER(LEN=200) :: data_content = ' ' !< content of data set 655 659 CHARACTER(LEN=12) :: data_content_char = 'data_content' !< name of attribute 656 CHARACTER(LEN=200) :: dependencies 660 CHARACTER(LEN=200) :: dependencies = ' ' !< dependencies of data set 657 661 CHARACTER(LEN=12) :: dependencies_char = 'dependencies' !< name of attribute 658 CHARACTER(LEN=200) :: history 662 CHARACTER(LEN=200) :: history = ' ' !< information about data processing 659 663 CHARACTER(LEN=7) :: history_char = 'history' !< name of attribute 660 CHARACTER(LEN=200) :: institution 664 CHARACTER(LEN=200) :: institution = ' ' !< name of responsible institution 661 665 CHARACTER(LEN=11) :: institution_char = 'institution' !< name of attribute 662 CHARACTER(LEN=200) :: keywords 666 CHARACTER(LEN=200) :: keywords = ' ' !< keywords of data set 663 667 CHARACTER(LEN=8) :: keywords_char = 'keywords' !< name of attribute 664 CHARACTER(LEN=200) :: licence 668 CHARACTER(LEN=200) :: licence = ' ' !< licence of data set 665 669 CHARACTER(LEN=7) :: licence_char = 'licence' !< name of attribute 666 CHARACTER(LEN=200) :: location 670 CHARACTER(LEN=200) :: location = ' ' !< place which refers to data set 667 671 CHARACTER(LEN=8) :: location_char = 'location' !< name of attribute 668 672 CHARACTER(LEN=10) :: origin_lat_char = 'origin_lat' !< name of attribute … … 674 678 CHARACTER(LEN=8) :: origin_z_char = 'origin_z' !< name of attribute 675 679 CHARACTER(LEN=12) :: palm_version_char = 'palm_version' !< name of attribute 676 CHARACTER(LEN=200) :: references 680 CHARACTER(LEN=200) :: references = ' ' !< literature referring to data set 677 681 CHARACTER(LEN=10) :: references_char = 'references' !< name of attribute 678 682 CHARACTER(LEN=14) :: rotation_angle_char = 'rotation_angle' !< name of attribute 679 CHARACTER(LEN= 12 ) :: site!< name of model domain683 CHARACTER(LEN=200) :: site = ' ' !< name of model domain 680 684 CHARACTER(LEN=4) :: site_char = 'site' !< name of attribute 681 CHARACTER(LEN=200) :: source 685 CHARACTER(LEN=200) :: source = ' ' !< source of data set 682 686 CHARACTER(LEN=6) :: source_char = 'source' !< name of attribute 683 CHARACTER(LEN=200) :: title 687 CHARACTER(LEN=200) :: title = ' ' !< title of data set 684 688 CHARACTER(LEN=5) :: title_char = 'title' !< name of attribute 685 689 CHARACTER(LEN=7) :: version_char = 'version' !< name of attribute -
palm/trunk/SOURCE/netcdf_interface_mod.f90
r3766 r3942 25 25 ! ----------------- 26 26 ! $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 27 31 ! bugfix in im_define_netcdf_grid argument list 28 32 ! … … 7101 7105 #if defined( __netcdf ) 7102 7106 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 ) 7104 7108 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 ) 7106 7110 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 ) 7108 7112 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 ) 7110 7114 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 ) 7112 7116 7113 7117 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 ) 7115 7119 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 ) 7117 7121 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 ) 7119 7123 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 ) 7121 7125 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 ) 7123 7127 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 ) 7125 7129 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 ) 7127 7131 7128 7132 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 ) 7130 7134 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 ) 7132 7136 7133 7137 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 ) 7135 7139 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 ) 7137 7141 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 ) 7139 7143 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 ) 7141 7145 7142 7146 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 ) 7144 7148 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 ) 7146 7150 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 ) 7148 7152 7149 7153 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 ) 7151 7155 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 ) 7153 7157 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 ) 7155 7159 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 ) 7157 7161 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 ) 7159 7163 7160 7164 #endif
Note: See TracChangeset
for help on using the changeset viewer.