Index: palm/trunk/SOURCE/netcdf_interface_mod.f90
===================================================================
--- palm/trunk/SOURCE/netcdf_interface_mod.f90	(revision 3954)
+++ palm/trunk/SOURCE/netcdf_interface_mod.f90	(revision 3966)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! remove origin time from time unit, compose origin_time_string within
+! subroutine netcdf_create_global_atts
+! 
+! 3954 2019-05-06 12:49:42Z gronemeier
 ! bugfix: corrected format for date_time_string
 ! 
@@ -499,5 +503,4 @@
     CHARACTER(LEN=20), DIMENSION(11) ::  netcdf_precision = ' '
     CHARACTER(LEN=40) ::  netcdf_data_format_string
-    CHARACTER(LEN=23) ::  origin_time_string  !< string containing date and time of origin
 
     INTEGER(iwp) ::  id_dim_agtnum, id_dim_time_agt,                           &
@@ -689,7 +692,4 @@
                skip_time_do3d, topography, num_leg, num_var_fl,                &
                urban_surface
-
-    USE date_and_time_mod,                                                     &
-       ONLY:   day_of_year_init, time_utc_init
 
     USE grid_variables,                                                        &
@@ -914,7 +914,4 @@
     ENDIF
 !
-!-- Compose date-time string for origin_time
-    origin_time_string = date_time_string( day_of_year_init, time_utc_init )
-!
 !-- Convert coord_ref_sys into vector (used for lat/lon calculation)
     crs_list = (/ coord_ref_sys%semi_major_axis,                  &
@@ -975,5 +972,5 @@
                                   (/ id_dim_time_mask(mid,av) /), 'time',      &
                                   NF90_DOUBLE, id_var_time_mask(mid,av),       &
-                                 'seconds since '//origin_time_string, 'time', 468, 469, 000 )
+                                 'seconds', 'time', 468, 469, 000 )
           CALL netcdf_create_att( id_set_mask(mid,av), id_var_time_mask(mid,av), 'standard_name', 'time', 000)
           CALL netcdf_create_att( id_set_mask(mid,av), id_var_time_mask(mid,av), 'axis', 'T', 000)
@@ -1758,5 +1755,5 @@
           CALL netcdf_create_var( id_set_3d(av), (/ id_dim_time_3d(av) /),     &
                                   'time', NF90_DOUBLE, id_var_time_3d(av),     &
-                                  'seconds since '//origin_time_string, 'time', 65, 66, 00 )
+                                  'seconds', 'time', 65, 66, 00 )
           CALL netcdf_create_att( id_set_3d(av), id_var_time_3d(av), 'standard_name', 'time', 000)
           CALL netcdf_create_att( id_set_3d(av), id_var_time_3d(av), 'axis', 'T', 000)
@@ -2564,5 +2561,5 @@
 
           CALL netcdf_create_var( id_set_agt, (/ id_dim_time_agt /), 'time',   &
-                                  NF90_REAL4, id_var_time_agt, 'seconds since '//origin_time_string, 'time',  &
+                                  NF90_REAL4, id_var_time_agt, 'seconds', 'time',  &
                                   332, 333, 000 )
           CALL netcdf_create_att( id_set_agt, id_var_time_agt, 'standard_name', 'time', 000)
@@ -2702,5 +2699,5 @@
           CALL netcdf_create_var( id_set_xy(av), (/ id_dim_time_xy(av) /),     &
                                   'time', NF90_DOUBLE, id_var_time_xy(av),     &
-                                  'seconds since '//origin_time_string, 'time', 100, 101, 000 )
+                                  'seconds', 'time', 100, 101, 000 )
           CALL netcdf_create_att( id_set_xy(av), id_var_time_xy(av), 'standard_name', 'time', 000)
           CALL netcdf_create_att( id_set_xy(av), id_var_time_xy(av), 'axis', 'T', 000)
@@ -3656,5 +3653,5 @@
           CALL netcdf_create_var( id_set_xz(av), (/ id_dim_time_xz(av) /),     &
                                   'time', NF90_DOUBLE, id_var_time_xz(av),     &
-                                  'seconds since '//origin_time_string, 'time', 143, 144, 000 )
+                                  'seconds', 'time', 143, 144, 000 )
           CALL netcdf_create_att( id_set_xz(av), id_var_time_xz(av), 'standard_name', 'time', 000)
           CALL netcdf_create_att( id_set_xz(av), id_var_time_xz(av), 'axis', 'T', 000)
@@ -4514,5 +4511,5 @@
           CALL netcdf_create_var( id_set_yz(av), (/ id_dim_time_yz(av) /),     &
                                   'time', NF90_DOUBLE, id_var_time_yz(av),     &
-                                  'seconds since '//origin_time_string, 'time', 182, 183, 000 )
+                                  'seconds', 'time', 182, 183, 000 )
           CALL netcdf_create_att( id_set_yz(av), id_var_time_yz(av), 'standard_name', 'time', 000)
           CALL netcdf_create_att( id_set_yz(av), id_var_time_yz(av), 'axis', 'T', 000)
@@ -5495,5 +5492,5 @@
                                   id_dim_time_pr, 220 )
           CALL netcdf_create_var( id_set_pr, (/ id_dim_time_pr /), 'time',     &
-                                  NF90_DOUBLE, id_var_time_pr, 'seconds since '//origin_time_string, 'time',  &
+                                  NF90_DOUBLE, id_var_time_pr, 'seconds', 'time',  &
                                   221, 222, 000 )
           CALL netcdf_create_att( id_set_pr, id_var_time_pr, 'standard_name', 'time', 000)
@@ -5748,5 +5745,5 @@
                                   id_dim_time_ts, 250 )
           CALL netcdf_create_var( id_set_ts, (/ id_dim_time_ts /), 'time',     &
-                                  NF90_DOUBLE, id_var_time_ts, 'seconds since '//origin_time_string, 'time',  &
+                                  NF90_DOUBLE, id_var_time_ts, 'seconds', 'time',  &
                                   251, 252, 000 )
           CALL netcdf_create_att( id_set_ts, id_var_time_ts, 'standard_name', 'time', 000)
@@ -5945,5 +5942,5 @@
                                   id_dim_time_sp, 270 )
           CALL netcdf_create_var( id_set_sp, (/ id_dim_time_sp /), 'time',     &
-                                  NF90_DOUBLE, id_var_time_sp, 'seconds since '//origin_time_string, 'time',  &
+                                  NF90_DOUBLE, id_var_time_sp, 'seconds', 'time',  &
                                   271, 272, 000 )
           CALL netcdf_create_att( id_set_sp, id_var_time_sp, 'standard_name', 'time', 000)
@@ -6438,5 +6435,5 @@
                                   id_dim_time_pts, 397 )
           CALL netcdf_create_var( id_set_pts, (/ id_dim_time_pts /), 'time',   &
-                                  NF90_DOUBLE, id_var_time_pts, 'seconds since '//origin_time_string, 'time', &
+                                  NF90_DOUBLE, id_var_time_pts, 'seconds', 'time', &
                                   398, 399, 000 )
           CALL netcdf_create_att( id_set_pts, id_var_time_pts, 'standard_name', 'time', 000)
@@ -6636,5 +6633,5 @@
                                   id_dim_time_fl, 250 )
           CALL netcdf_create_var( id_set_fl, (/ id_dim_time_fl /), 'time',     &
-                                  NF90_DOUBLE, id_var_time_fl, 'seconds since '//origin_time_string, 'time',  &
+                                  NF90_DOUBLE, id_var_time_fl, 'seconds', 'time',  &
                                   251, 252, 000 )
           CALL netcdf_create_att( id_set_fl, id_var_time_fl, 'standard_name', 'time', 000)
@@ -7102,11 +7099,16 @@
  SUBROUTINE netcdf_create_global_atts( ncid, data_content, title, error_no )
 
-    USE control_parameters,  &
+    USE control_parameters,                                                    &
         ONLY:  revision, run_date, run_time, run_zone, runnr, version
-        
-    USE netcdf_data_input_mod,  &
+
+    USE date_and_time_mod,                                                     &
+       ONLY:   day_of_year_init, time_utc_init
+
+    USE netcdf_data_input_mod,                                                 &
         ONLY:  input_file_atts
 
     IMPLICIT NONE
+
+    CHARACTER(LEN=23) ::  origin_time_string  !< string containing date and time of origin
 
     CHARACTER(LEN=*), INTENT(IN)  ::  data_content  !< describes the type of data in file
@@ -7115,4 +7117,7 @@
     INTEGER, INTENT(IN)  ::  error_no  !< error number
     INTEGER, INTENT(IN)  ::  ncid      !< file id
+!
+!-- Compose date-time string for origin_time
+    origin_time_string = date_time_string( day_of_year_init, time_utc_init )
 
 #if defined( __netcdf )
