- Timestamp:
- May 9, 2019 12:54:44 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/netcdf_interface_mod.f90
r3954 r3966 25 25 ! ----------------- 26 26 ! $Id$ 27 ! remove origin time from time unit, compose origin_time_string within 28 ! subroutine netcdf_create_global_atts 29 ! 30 ! 3954 2019-05-06 12:49:42Z gronemeier 27 31 ! bugfix: corrected format for date_time_string 28 32 ! … … 499 503 CHARACTER(LEN=20), DIMENSION(11) :: netcdf_precision = ' ' 500 504 CHARACTER(LEN=40) :: netcdf_data_format_string 501 CHARACTER(LEN=23) :: origin_time_string !< string containing date and time of origin502 505 503 506 INTEGER(iwp) :: id_dim_agtnum, id_dim_time_agt, & … … 689 692 skip_time_do3d, topography, num_leg, num_var_fl, & 690 693 urban_surface 691 692 USE date_and_time_mod, &693 ONLY: day_of_year_init, time_utc_init694 694 695 695 USE grid_variables, & … … 914 914 ENDIF 915 915 ! 916 !-- Compose date-time string for origin_time917 origin_time_string = date_time_string( day_of_year_init, time_utc_init )918 !919 916 !-- Convert coord_ref_sys into vector (used for lat/lon calculation) 920 917 crs_list = (/ coord_ref_sys%semi_major_axis, & … … 975 972 (/ id_dim_time_mask(mid,av) /), 'time', & 976 973 NF90_DOUBLE, id_var_time_mask(mid,av), & 977 'seconds since '//origin_time_string, 'time', 468, 469, 000 )974 'seconds', 'time', 468, 469, 000 ) 978 975 CALL netcdf_create_att( id_set_mask(mid,av), id_var_time_mask(mid,av), 'standard_name', 'time', 000) 979 976 CALL netcdf_create_att( id_set_mask(mid,av), id_var_time_mask(mid,av), 'axis', 'T', 000) … … 1758 1755 CALL netcdf_create_var( id_set_3d(av), (/ id_dim_time_3d(av) /), & 1759 1756 'time', NF90_DOUBLE, id_var_time_3d(av), & 1760 'seconds since '//origin_time_string, 'time', 65, 66, 00 )1757 'seconds', 'time', 65, 66, 00 ) 1761 1758 CALL netcdf_create_att( id_set_3d(av), id_var_time_3d(av), 'standard_name', 'time', 000) 1762 1759 CALL netcdf_create_att( id_set_3d(av), id_var_time_3d(av), 'axis', 'T', 000) … … 2564 2561 2565 2562 CALL netcdf_create_var( id_set_agt, (/ id_dim_time_agt /), 'time', & 2566 NF90_REAL4, id_var_time_agt, 'seconds since '//origin_time_string, 'time', &2563 NF90_REAL4, id_var_time_agt, 'seconds', 'time', & 2567 2564 332, 333, 000 ) 2568 2565 CALL netcdf_create_att( id_set_agt, id_var_time_agt, 'standard_name', 'time', 000) … … 2702 2699 CALL netcdf_create_var( id_set_xy(av), (/ id_dim_time_xy(av) /), & 2703 2700 'time', NF90_DOUBLE, id_var_time_xy(av), & 2704 'seconds since '//origin_time_string, 'time', 100, 101, 000 )2701 'seconds', 'time', 100, 101, 000 ) 2705 2702 CALL netcdf_create_att( id_set_xy(av), id_var_time_xy(av), 'standard_name', 'time', 000) 2706 2703 CALL netcdf_create_att( id_set_xy(av), id_var_time_xy(av), 'axis', 'T', 000) … … 3656 3653 CALL netcdf_create_var( id_set_xz(av), (/ id_dim_time_xz(av) /), & 3657 3654 'time', NF90_DOUBLE, id_var_time_xz(av), & 3658 'seconds since '//origin_time_string, 'time', 143, 144, 000 )3655 'seconds', 'time', 143, 144, 000 ) 3659 3656 CALL netcdf_create_att( id_set_xz(av), id_var_time_xz(av), 'standard_name', 'time', 000) 3660 3657 CALL netcdf_create_att( id_set_xz(av), id_var_time_xz(av), 'axis', 'T', 000) … … 4514 4511 CALL netcdf_create_var( id_set_yz(av), (/ id_dim_time_yz(av) /), & 4515 4512 'time', NF90_DOUBLE, id_var_time_yz(av), & 4516 'seconds since '//origin_time_string, 'time', 182, 183, 000 )4513 'seconds', 'time', 182, 183, 000 ) 4517 4514 CALL netcdf_create_att( id_set_yz(av), id_var_time_yz(av), 'standard_name', 'time', 000) 4518 4515 CALL netcdf_create_att( id_set_yz(av), id_var_time_yz(av), 'axis', 'T', 000) … … 5495 5492 id_dim_time_pr, 220 ) 5496 5493 CALL netcdf_create_var( id_set_pr, (/ id_dim_time_pr /), 'time', & 5497 NF90_DOUBLE, id_var_time_pr, 'seconds since '//origin_time_string, 'time', &5494 NF90_DOUBLE, id_var_time_pr, 'seconds', 'time', & 5498 5495 221, 222, 000 ) 5499 5496 CALL netcdf_create_att( id_set_pr, id_var_time_pr, 'standard_name', 'time', 000) … … 5748 5745 id_dim_time_ts, 250 ) 5749 5746 CALL netcdf_create_var( id_set_ts, (/ id_dim_time_ts /), 'time', & 5750 NF90_DOUBLE, id_var_time_ts, 'seconds since '//origin_time_string, 'time', &5747 NF90_DOUBLE, id_var_time_ts, 'seconds', 'time', & 5751 5748 251, 252, 000 ) 5752 5749 CALL netcdf_create_att( id_set_ts, id_var_time_ts, 'standard_name', 'time', 000) … … 5945 5942 id_dim_time_sp, 270 ) 5946 5943 CALL netcdf_create_var( id_set_sp, (/ id_dim_time_sp /), 'time', & 5947 NF90_DOUBLE, id_var_time_sp, 'seconds since '//origin_time_string, 'time', &5944 NF90_DOUBLE, id_var_time_sp, 'seconds', 'time', & 5948 5945 271, 272, 000 ) 5949 5946 CALL netcdf_create_att( id_set_sp, id_var_time_sp, 'standard_name', 'time', 000) … … 6438 6435 id_dim_time_pts, 397 ) 6439 6436 CALL netcdf_create_var( id_set_pts, (/ id_dim_time_pts /), 'time', & 6440 NF90_DOUBLE, id_var_time_pts, 'seconds since '//origin_time_string, 'time', &6437 NF90_DOUBLE, id_var_time_pts, 'seconds', 'time', & 6441 6438 398, 399, 000 ) 6442 6439 CALL netcdf_create_att( id_set_pts, id_var_time_pts, 'standard_name', 'time', 000) … … 6636 6633 id_dim_time_fl, 250 ) 6637 6634 CALL netcdf_create_var( id_set_fl, (/ id_dim_time_fl /), 'time', & 6638 NF90_DOUBLE, id_var_time_fl, 'seconds since '//origin_time_string, 'time', &6635 NF90_DOUBLE, id_var_time_fl, 'seconds', 'time', & 6639 6636 251, 252, 000 ) 6640 6637 CALL netcdf_create_att( id_set_fl, id_var_time_fl, 'standard_name', 'time', 000) … … 7102 7099 SUBROUTINE netcdf_create_global_atts( ncid, data_content, title, error_no ) 7103 7100 7104 USE control_parameters, &7101 USE control_parameters, & 7105 7102 ONLY: revision, run_date, run_time, run_zone, runnr, version 7106 7107 USE netcdf_data_input_mod, & 7103 7104 USE date_and_time_mod, & 7105 ONLY: day_of_year_init, time_utc_init 7106 7107 USE netcdf_data_input_mod, & 7108 7108 ONLY: input_file_atts 7109 7109 7110 7110 IMPLICIT NONE 7111 7112 CHARACTER(LEN=23) :: origin_time_string !< string containing date and time of origin 7111 7113 7112 7114 CHARACTER(LEN=*), INTENT(IN) :: data_content !< describes the type of data in file … … 7115 7117 INTEGER, INTENT(IN) :: error_no !< error number 7116 7118 INTEGER, INTENT(IN) :: ncid !< file id 7119 ! 7120 !-- Compose date-time string for origin_time 7121 origin_time_string = date_time_string( day_of_year_init, time_utc_init ) 7117 7122 7118 7123 #if defined( __netcdf )
Note: See TracChangeset
for help on using the changeset viewer.