Changeset 3966 for palm/trunk


Ignore:
Timestamp:
May 9, 2019 12:54:44 PM (5 years ago)
Author:
gronemeier
Message:

remove origin time from time unit; compose origin_time within subroutine netcdf_create_global_atts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/netcdf_interface_mod.f90

    r3954 r3966  
    2525! -----------------
    2626! $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
    2731! bugfix: corrected format for date_time_string
    2832!
     
    499503    CHARACTER(LEN=20), DIMENSION(11) ::  netcdf_precision = ' '
    500504    CHARACTER(LEN=40) ::  netcdf_data_format_string
    501     CHARACTER(LEN=23) ::  origin_time_string  !< string containing date and time of origin
    502505
    503506    INTEGER(iwp) ::  id_dim_agtnum, id_dim_time_agt,                           &
     
    689692               skip_time_do3d, topography, num_leg, num_var_fl,                &
    690693               urban_surface
    691 
    692     USE date_and_time_mod,                                                     &
    693        ONLY:   day_of_year_init, time_utc_init
    694694
    695695    USE grid_variables,                                                        &
     
    914914    ENDIF
    915915!
    916 !-- Compose date-time string for origin_time
    917     origin_time_string = date_time_string( day_of_year_init, time_utc_init )
    918 !
    919916!-- Convert coord_ref_sys into vector (used for lat/lon calculation)
    920917    crs_list = (/ coord_ref_sys%semi_major_axis,                  &
     
    975972                                  (/ id_dim_time_mask(mid,av) /), 'time',      &
    976973                                  NF90_DOUBLE, id_var_time_mask(mid,av),       &
    977                                  'seconds since '//origin_time_string, 'time', 468, 469, 000 )
     974                                 'seconds', 'time', 468, 469, 000 )
    978975          CALL netcdf_create_att( id_set_mask(mid,av), id_var_time_mask(mid,av), 'standard_name', 'time', 000)
    979976          CALL netcdf_create_att( id_set_mask(mid,av), id_var_time_mask(mid,av), 'axis', 'T', 000)
     
    17581755          CALL netcdf_create_var( id_set_3d(av), (/ id_dim_time_3d(av) /),     &
    17591756                                  'time', NF90_DOUBLE, id_var_time_3d(av),     &
    1760                                   'seconds since '//origin_time_string, 'time', 65, 66, 00 )
     1757                                  'seconds', 'time', 65, 66, 00 )
    17611758          CALL netcdf_create_att( id_set_3d(av), id_var_time_3d(av), 'standard_name', 'time', 000)
    17621759          CALL netcdf_create_att( id_set_3d(av), id_var_time_3d(av), 'axis', 'T', 000)
     
    25642561
    25652562          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',  &
    25672564                                  332, 333, 000 )
    25682565          CALL netcdf_create_att( id_set_agt, id_var_time_agt, 'standard_name', 'time', 000)
     
    27022699          CALL netcdf_create_var( id_set_xy(av), (/ id_dim_time_xy(av) /),     &
    27032700                                  'time', NF90_DOUBLE, id_var_time_xy(av),     &
    2704                                   'seconds since '//origin_time_string, 'time', 100, 101, 000 )
     2701                                  'seconds', 'time', 100, 101, 000 )
    27052702          CALL netcdf_create_att( id_set_xy(av), id_var_time_xy(av), 'standard_name', 'time', 000)
    27062703          CALL netcdf_create_att( id_set_xy(av), id_var_time_xy(av), 'axis', 'T', 000)
     
    36563653          CALL netcdf_create_var( id_set_xz(av), (/ id_dim_time_xz(av) /),     &
    36573654                                  'time', NF90_DOUBLE, id_var_time_xz(av),     &
    3658                                   'seconds since '//origin_time_string, 'time', 143, 144, 000 )
     3655                                  'seconds', 'time', 143, 144, 000 )
    36593656          CALL netcdf_create_att( id_set_xz(av), id_var_time_xz(av), 'standard_name', 'time', 000)
    36603657          CALL netcdf_create_att( id_set_xz(av), id_var_time_xz(av), 'axis', 'T', 000)
     
    45144511          CALL netcdf_create_var( id_set_yz(av), (/ id_dim_time_yz(av) /),     &
    45154512                                  'time', NF90_DOUBLE, id_var_time_yz(av),     &
    4516                                   'seconds since '//origin_time_string, 'time', 182, 183, 000 )
     4513                                  'seconds', 'time', 182, 183, 000 )
    45174514          CALL netcdf_create_att( id_set_yz(av), id_var_time_yz(av), 'standard_name', 'time', 000)
    45184515          CALL netcdf_create_att( id_set_yz(av), id_var_time_yz(av), 'axis', 'T', 000)
     
    54955492                                  id_dim_time_pr, 220 )
    54965493          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',  &
    54985495                                  221, 222, 000 )
    54995496          CALL netcdf_create_att( id_set_pr, id_var_time_pr, 'standard_name', 'time', 000)
     
    57485745                                  id_dim_time_ts, 250 )
    57495746          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',  &
    57515748                                  251, 252, 000 )
    57525749          CALL netcdf_create_att( id_set_ts, id_var_time_ts, 'standard_name', 'time', 000)
     
    59455942                                  id_dim_time_sp, 270 )
    59465943          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',  &
    59485945                                  271, 272, 000 )
    59495946          CALL netcdf_create_att( id_set_sp, id_var_time_sp, 'standard_name', 'time', 000)
     
    64386435                                  id_dim_time_pts, 397 )
    64396436          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', &
    64416438                                  398, 399, 000 )
    64426439          CALL netcdf_create_att( id_set_pts, id_var_time_pts, 'standard_name', 'time', 000)
     
    66366633                                  id_dim_time_fl, 250 )
    66376634          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',  &
    66396636                                  251, 252, 000 )
    66406637          CALL netcdf_create_att( id_set_fl, id_var_time_fl, 'standard_name', 'time', 000)
     
    71027099 SUBROUTINE netcdf_create_global_atts( ncid, data_content, title, error_no )
    71037100
    7104     USE control_parameters,  &
     7101    USE control_parameters,                                                    &
    71057102        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,                                                 &
    71087108        ONLY:  input_file_atts
    71097109
    71107110    IMPLICIT NONE
     7111
     7112    CHARACTER(LEN=23) ::  origin_time_string  !< string containing date and time of origin
    71117113
    71127114    CHARACTER(LEN=*), INTENT(IN)  ::  data_content  !< describes the type of data in file
     
    71157117    INTEGER, INTENT(IN)  ::  error_no  !< error number
    71167118    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 )
    71177122
    71187123#if defined( __netcdf )
Note: See TracChangeset for help on using the changeset viewer.