Changeset 3529 for palm/trunk/SOURCE/netcdf_data_input_mod.f90
- Timestamp:
- Nov 15, 2018 9:03:15 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/netcdf_data_input_mod.f90
r3518 r3529 25 25 ! ----------------- 26 26 ! $Id$ 27 ! - read optional attributes from file 28 ! - set default origin_time 29 ! 30 ! 3518 2018-11-12 18:10:23Z suehring 27 31 ! Additional checks 28 32 ! … … 341 345 TYPE init_type 342 346 343 CHARACTER(LEN=23) :: origin_time !< reference time of input data347 CHARACTER(LEN=23) :: origin_time = '2000-01-01 00:00:00 +00' !< reference time of input data 344 348 345 349 INTEGER(iwp) :: lod_msoil !< level of detail - soil moisture … … 566 570 CHARACTER(LEN=200) :: author !< first name, last name, email adress 567 571 CHARACTER(LEN=6) :: author_char = 'author' !< name of attribute 568 CHARACTER(LEN=12 ) :: campaign 572 CHARACTER(LEN=12 ) :: campaign = 'PALM-4U' !< name of campaign 569 573 CHARACTER(LEN=8) :: campaign_char = 'campaign' !< name of attribute 570 574 CHARACTER(LEN=200) :: comment !< comment to data … … 586 590 CHARACTER(LEN=200) :: keywords !< keywords of data set 587 591 CHARACTER(LEN=8) :: keywords_char = 'keywords' !< name of attribute 588 CHARACTER(LEN=200) :: licen se !< license of data set589 CHARACTER(LEN=7) :: licen se_char = 'license' !< name of attribute592 CHARACTER(LEN=200) :: licence !< licence of data set 593 CHARACTER(LEN=7) :: licence_char = 'licence' !< name of attribute 590 594 CHARACTER(LEN=200) :: location !< place which refers to data set 591 595 CHARACTER(LEN=8) :: location_char = 'location' !< name of attribute 592 596 CHARACTER(LEN=10) :: origin_lat_char = 'origin_lat' !< name of attribute 593 597 CHARACTER(LEN=10) :: origin_lon_char = 'origin_lon' !< name of attribute 594 CHARACTER(LEN=23 ) :: origin_time 598 CHARACTER(LEN=23 ) :: origin_time = '2000-01-01 00:00:00 +00' !< reference time 595 599 CHARACTER(LEN=11) :: origin_time_char = 'origin_time' !< name of attribute 596 600 CHARACTER(LEN=8) :: origin_x_char = 'origin_x' !< name of attribute … … 823 827 chem_emis, chem_emis_att, chem_emis_att_type, chem_emis_val_type, & 824 828 coord_ref_sys, & 825 init_3d, init_model, input_file_static, input_pids_static, & 829 init_3d, init_model, input_file_atts, input_file_static, & 830 input_pids_static, & 826 831 input_pids_dynamic, input_pids_vm, input_file_vm, & 827 832 leaf_area_density_f, nest_offl, & … … 932 937 CALL get_attribute( id_mod, input_file_atts%rotation_angle_char, & 933 938 input_file_atts%rotation_angle, .TRUE. ) 939 940 CALL get_attribute( id_mod, input_file_atts%author_char, input_file_atts%author, .TRUE., no_abort=.FALSE. ) 941 CALL get_attribute( id_mod, input_file_atts%contact_person_char, input_file_atts%contact_person, .TRUE., no_abort=.FALSE. ) 942 CALL get_attribute( id_mod, input_file_atts%institution_char, input_file_atts%institution, .TRUE., no_abort=.FALSE. ) 943 CALL get_attribute( id_mod, input_file_atts%acronym_char, input_file_atts%acronym, .TRUE., no_abort=.FALSE. ) 944 945 CALL get_attribute( id_mod, input_file_atts%campaign_char, input_file_atts%campaign, .TRUE., no_abort=.FALSE. ) 946 CALL get_attribute( id_mod, input_file_atts%location_char, input_file_atts%location, .TRUE., no_abort=.FALSE. ) 947 CALL get_attribute( id_mod, input_file_atts%site_char, input_file_atts%site, .TRUE., no_abort=.FALSE. ) 948 949 CALL get_attribute( id_mod, input_file_atts%source_char, input_file_atts%source, .TRUE., no_abort=.FALSE. ) 950 CALL get_attribute( id_mod, input_file_atts%references_char, input_file_atts%references, .TRUE., no_abort=.FALSE. ) 951 CALL get_attribute( id_mod, input_file_atts%keywords_char, input_file_atts%keywords, .TRUE., no_abort=.FALSE. ) 952 CALL get_attribute( id_mod, input_file_atts%licence_char, input_file_atts%licence, .TRUE., no_abort=.FALSE. ) 953 CALL get_attribute( id_mod, input_file_atts%comment_char, input_file_atts%comment, .TRUE., no_abort=.FALSE. ) 934 954 ! 935 955 !-- Read coordinate reference system if available … … 4925 4945 !------------------------------------------------------------------------------! 4926 4946 SUBROUTINE get_attribute_string( id, attribute_name, value, global, & 4927 variable_name )4947 variable_name, no_abort ) 4928 4948 4929 4949 USE pegrid … … 4938 4958 INTEGER(iwp) :: id_var !< variable id 4939 4959 4960 LOGICAL :: check_error !< flag indicating if handle_error shall be checked 4940 4961 LOGICAL, INTENT(IN) :: global !< flag indicating global attribute 4962 LOGICAL, INTENT(IN), OPTIONAL :: no_abort !< flag indicating if errors should be checked 4941 4963 #if defined( __netcdf ) 4942 4964 4965 IF ( PRESENT( no_abort ) ) THEN 4966 check_error = no_abort 4967 ELSE 4968 check_error = .TRUE. 4969 ENDIF 4943 4970 ! 4944 4971 !-- Read global attribute 4945 4972 IF ( global ) THEN 4946 4973 nc_stat = NF90_GET_ATT( id, NF90_GLOBAL, TRIM( attribute_name ), value ) 4947 CALL handle_error( 'get_attribute_string global', 525, attribute_name )4974 IF ( check_error) CALL handle_error( 'get_attribute_string global', 525, attribute_name ) 4948 4975 ! 4949 4976 !-- Read attributes referring to a single variable. Therefore, first inquire … … 4951 4978 ELSE 4952 4979 nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var ) 4953 CALL handle_error( 'get_attribute_string', 525, attribute_name )4980 IF ( check_error) CALL handle_error( 'get_attribute_string', 525, attribute_name ) 4954 4981 4955 4982 nc_stat = NF90_GET_ATT( id, id_var, TRIM( attribute_name ), value ) 4956 CALL handle_error( 'get_attribute_string',525, attribute_name )4983 IF ( check_error) CALL handle_error( 'get_attribute_string',525, attribute_name ) 4957 4984 4958 4985 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.