Index: /palm/trunk/SCRIPTS/.csd.config.default
===================================================================
--- /palm/trunk/SCRIPTS/.csd.config.default	(revision 4640)
+++ /palm/trunk/SCRIPTS/.csd.config.default	(revision 4641)
@@ -20,9 +20,13 @@
 # Current revisions:
 # -----------------
-# 
-# 
+#
+#
 # Former revisions:
 # -----------------
 # $Id$
+# Change default values for some global attributes to be compatible with
+# (UC)2 data standard
+# 
+# 4481 2020-03-31 18:55:54Z maronga
 # Updated configuration
 # 
@@ -42,15 +46,15 @@
 acronym = LUHimuk
 comment = created with palm_csd
-data_content = text
-dependencies = text
-keywords = text
-source = text
-campaign = text
-location = Berlin
+data_content = 
+dependencies = 
+keywords = 
+source = 
+campaign = 
+location = B
 site = Berlin Mitte
-institution = Institute of Meteorology and Climatology, Leibniz University Hannover
+institution = Leibniz University Hannover, Institute of Meterology and Climatology
 palm_version = 6.0
 rotation_angle = 0.0
-references = text
+references = 
 
 
Index: /palm/trunk/SCRIPTS/.cvd.config.default
===================================================================
--- /palm/trunk/SCRIPTS/.cvd.config.default	(revision 4640)
+++ /palm/trunk/SCRIPTS/.cvd.config.default	(revision 4641)
@@ -21,9 +21,13 @@
 # Current revisions:
 # -----------------
-# 
-# 
+#
+#
 # Former revisions:
 # -----------------
 # $Id$
+# Change default values for some global attributes to be compatible with
+# (UC)2 data standard
+# 
+# 4400 2020-02-10 20:32:41Z suehring
 # Initial revision
 # 
@@ -47,15 +51,15 @@
 contact_person = Suehring, Matthias, suehring@muk.uni-hannover.de
 acronym = LUHimuk
-comment = created with palm_cvd
+comment = 
 data_content = measurement coordinates
-dependencies = none
+dependencies = 
 keywords = virtual measurement setup file
-source = none
+source = 
 campaign = winter iop 1
-location = Berlin
+location = B
 site = Ernst Reuter Platz
-institution = Institute of Meteorology and Climatology, Leibniz University Hannover
+institution = Leibniz UniversitÃ€t Hannover, Institute of Meterology and Climatology # for (UC)2 conform in/output please follow guidelines in table A3
 palm_version = 6.0
-references = none
+references = 
 
 # Section for observational input data. If non observational input data is available
Index: /palm/trunk/SCRIPTS/palm_csd_files/palm_csd_netcdf_interface.py
===================================================================
--- /palm/trunk/SCRIPTS/palm_csd_files/palm_csd_netcdf_interface.py	(revision 4640)
+++ /palm/trunk/SCRIPTS/palm_csd_files/palm_csd_netcdf_interface.py	(revision 4641)
@@ -20,9 +20,12 @@
 # Current revisions:
 # -----------------
-# 
-# 
+#
+#
 # Former revisions:
 # -----------------
 # $Id: palm_csd_netcdf_interface.py 3668 2019-01-14 12:49:24Z maronga $
+# Correct wrong false_easting attribute in crs variable
+# 
+# 3668 2019-01-14 12:49:24Z maronga
 # Some improvements and new routines
 # 
@@ -334,5 +337,5 @@
    temp.scale_factor_at_central_meridian = 0.9996
    temp.latitude_of_projection_origin = 0.0
-   temp.false_easting = 50000.0
+   temp.false_easting = 500000.0
    temp.false_northing = 0.0
    temp.units = "m"
Index: /palm/trunk/SOURCE/netcdf_data_input_mod.f90
===================================================================
--- /palm/trunk/SOURCE/netcdf_data_input_mod.f90	(revision 4640)
+++ /palm/trunk/SOURCE/netcdf_data_input_mod.f90	(revision 4641)
@@ -20,9 +20,12 @@
 ! Current revisions:
 ! -----------------
-! 
-! 
+!
+!
 ! Former revisions:
 ! -----------------
 ! $Id$
+! To follow (UC)2 standard, change default of attribute data_content
+! 
+! 4507 2020-04-22 18:21:45Z gronemeier
 ! - bugfix: check terrain height for fill values directly after reading
 ! - changes: 
@@ -520,50 +523,50 @@
 !-- attribute.
     TYPE global_atts_type
-       CHARACTER(LEN=200) ::  acronym = ' '                      !< acronym of institution
-       CHARACTER(LEN=7)   ::  acronym_char = 'acronym'           !< name of attribute
-       CHARACTER(LEN=200) ::  author  = ' '                      !< first name, last name, email adress
-       CHARACTER(LEN=6)   ::  author_char = 'author'             !< name of attribute
-       CHARACTER(LEN=200) ::  campaign = 'PALM-4U'               !< name of campaign
-       CHARACTER(LEN=8)   ::  campaign_char = 'campaign'         !< name of attribute
-       CHARACTER(LEN=200) ::  comment = ' '                      !< comment to data
-       CHARACTER(LEN=7)   ::  comment_char = 'comment'           !< name of attribute
-       CHARACTER(LEN=200) ::  contact_person = ' '               !< first name, last name, email adress
+       CHARACTER(LEN=200) ::  acronym = ' '                           !< acronym of institution
+       CHARACTER(LEN=7)   ::  acronym_char = 'acronym'                !< name of attribute
+       CHARACTER(LEN=200) ::  author  = ' '                           !< first name, last name, email adress
+       CHARACTER(LEN=6)   ::  author_char = 'author'                  !< name of attribute
+       CHARACTER(LEN=200) ::  campaign = 'PALM-4U'                    !< name of campaign
+       CHARACTER(LEN=8)   ::  campaign_char = 'campaign'              !< name of attribute
+       CHARACTER(LEN=200) ::  comment = ' '                           !< comment to data
+       CHARACTER(LEN=7)   ::  comment_char = 'comment'                !< name of attribute
+       CHARACTER(LEN=200) ::  contact_person = ' '                    !< first name, last name, email adress
        CHARACTER(LEN=14)  ::  contact_person_char = 'contact_person'  !< name of attribute
-       CHARACTER(LEN=200) ::  conventions = 'CF-1.7'             !< netCDF convention
-       CHARACTER(LEN=11)  ::  conventions_char = 'Conventions'   !< name of attribute
-       CHARACTER(LEN=23 ) ::  creation_time = ' '                !< creation time of data set
-       CHARACTER(LEN=13)  ::  creation_time_char = 'creation_time'  !< name of attribute
-       CHARACTER(LEN=200) ::  data_content = ' '                 !< content of data set
-       CHARACTER(LEN=12)  ::  data_content_char = 'data_content' !< name of attribute
-       CHARACTER(LEN=200) ::  dependencies = ' '                 !< dependencies of data set
-       CHARACTER(LEN=12)  ::  dependencies_char = 'dependencies' !< name of attribute
-       CHARACTER(LEN=200) ::  history = ' '                      !< information about data processing
-       CHARACTER(LEN=7)   ::  history_char = 'history'           !< name of attribute
-       CHARACTER(LEN=200) ::  institution = ' '                  !< name of responsible institution
-       CHARACTER(LEN=11)  ::  institution_char = 'institution'   !< name of attribute
-       CHARACTER(LEN=200) ::  keywords = ' '                     !< keywords of data set
-       CHARACTER(LEN=8)   ::  keywords_char = 'keywords'         !< name of attribute
-       CHARACTER(LEN=200) ::  licence = ' '                      !< licence of data set
-       CHARACTER(LEN=7)   ::  licence_char = 'licence'           !< name of attribute
-       CHARACTER(LEN=200) ::  location = ' '                     !< place which refers to data set
-       CHARACTER(LEN=8)   ::  location_char = 'location'         !< name of attribute
-       CHARACTER(LEN=10)  ::  origin_lat_char = 'origin_lat'     !< name of attribute
-       CHARACTER(LEN=10)  ::  origin_lon_char = 'origin_lon'     !< name of attribute
-       CHARACTER(LEN=23 ) ::  origin_time = '2000-01-01 00:00:00 +00'  !< reference time
-       CHARACTER(LEN=11)  ::  origin_time_char = 'origin_time'   !< name of attribute
-       CHARACTER(LEN=8)   ::  origin_x_char = 'origin_x'         !< name of attribute
-       CHARACTER(LEN=8)   ::  origin_y_char = 'origin_y'         !< name of attribute
-       CHARACTER(LEN=8)   ::  origin_z_char = 'origin_z'         !< name of attribute
-       CHARACTER(LEN=12)  ::  palm_version_char = 'palm_version' !< name of attribute
-       CHARACTER(LEN=200) ::  references = ' '                   !< literature referring to data set
-       CHARACTER(LEN=10)  ::  references_char = 'references'     !< name of attribute
+       CHARACTER(LEN=200) ::  conventions = 'CF-1.7'                  !< netCDF convention
+       CHARACTER(LEN=11)  ::  conventions_char = 'Conventions'        !< name of attribute
+       CHARACTER(LEN=23 ) ::  creation_time = ' '                     !< creation time of data set
+       CHARACTER(LEN=13)  ::  creation_time_char = 'creation_time'    !< name of attribute
+       CHARACTER(LEN=200) ::  data_content = 'airmeteo'               !< content of data set
+       CHARACTER(LEN=12)  ::  data_content_char = 'data_content'      !< name of attribute
+       CHARACTER(LEN=200) ::  dependencies = ' '                      !< dependencies of data set
+       CHARACTER(LEN=12)  ::  dependencies_char = 'dependencies'      !< name of attribute
+       CHARACTER(LEN=200) ::  history = ' '                           !< information about data processing
+       CHARACTER(LEN=7)   ::  history_char = 'history'                !< name of attribute
+       CHARACTER(LEN=200) ::  institution = ' '                       !< name of responsible institution
+       CHARACTER(LEN=11)  ::  institution_char = 'institution'        !< name of attribute
+       CHARACTER(LEN=200) ::  keywords = ' '                          !< keywords of data set
+       CHARACTER(LEN=8)   ::  keywords_char = 'keywords'              !< name of attribute
+       CHARACTER(LEN=200) ::  licence = ' '                           !< licence of data set
+       CHARACTER(LEN=7)   ::  licence_char = 'licence'                !< name of attribute
+       CHARACTER(LEN=200) ::  location = ' '                          !< place which refers to data set
+       CHARACTER(LEN=8)   ::  location_char = 'location'              !< name of attribute
+       CHARACTER(LEN=10)  ::  origin_lat_char = 'origin_lat'          !< name of attribute
+       CHARACTER(LEN=10)  ::  origin_lon_char = 'origin_lon'          !< name of attribute
+       CHARACTER(LEN=23 ) ::  origin_time = '2000-01-01 00:00:00 +00' !< reference time
+       CHARACTER(LEN=11)  ::  origin_time_char = 'origin_time'        !< name of attribute
+       CHARACTER(LEN=8)   ::  origin_x_char = 'origin_x'              !< name of attribute
+       CHARACTER(LEN=8)   ::  origin_y_char = 'origin_y'              !< name of attribute
+       CHARACTER(LEN=8)   ::  origin_z_char = 'origin_z'              !< name of attribute
+       CHARACTER(LEN=12)  ::  palm_version_char = 'palm_version'      !< name of attribute
+       CHARACTER(LEN=200) ::  references = ' '                        !< literature referring to data set
+       CHARACTER(LEN=10)  ::  references_char = 'references'          !< name of attribute
        CHARACTER(LEN=14)  ::  rotation_angle_char = 'rotation_angle'  !< name of attribute
-       CHARACTER(LEN=200) ::  site = ' '                         !< name of model domain
-       CHARACTER(LEN=4)   ::  site_char = 'site'                 !< name of attribute
-       CHARACTER(LEN=200) ::  source = ' '                       !< source of data set
-       CHARACTER(LEN=6)   ::  source_char = 'source'             !< name of attribute
-       CHARACTER(LEN=200) ::  title = ' '                        !< title of data set
-       CHARACTER(LEN=5)   ::  title_char = 'title'               !< name of attribute
-       CHARACTER(LEN=7)   ::  version_char = 'version'           !< name of attribute
+       CHARACTER(LEN=200) ::  site = ' '                              !< name of model domain
+       CHARACTER(LEN=4)   ::  site_char = 'site'                      !< name of attribute
+       CHARACTER(LEN=200) ::  source = ' '                            !< source of data set
+       CHARACTER(LEN=6)   ::  source_char = 'source'                  !< name of attribute
+       CHARACTER(LEN=200) ::  title = ' '                             !< title of data set
+       CHARACTER(LEN=5)   ::  title_char = 'title'                    !< name of attribute
+       CHARACTER(LEN=7)   ::  version_char = 'version'                !< name of attribute
 
        INTEGER(iwp) ::  version              !< version of data set
Index: /palm/trunk/SOURCE/virtual_measurement_mod.f90
===================================================================
--- /palm/trunk/SOURCE/virtual_measurement_mod.f90	(revision 4640)
+++ /palm/trunk/SOURCE/virtual_measurement_mod.f90	(revision 4641)
@@ -20,9 +20,14 @@
 ! Current revisions:
 ! -----------------
-! 
-! 
+!
+!
 ! Former revisions:
 ! -----------------
 ! $Id$
+! - To be in agreement with (UC)2 data standard do not list the measured variables in attribute
+!   data_content but simply set 'airmeteo'
+! - Bugfix in setting long_name attribute for variable t_va and for global attribute creation_time
+! 
+! 4536 2020-05-17 17:24:13Z raasch
 ! bugfix: preprocessor directive adjusted
 !
@@ -542,5 +547,5 @@
           output_variable%units         = 'degree_C'
 
-       CASE ( 'tva' )
+       CASE ( 't_va' )
           output_variable%long_name     = 'virtual acoustic temperature'
           output_variable%units         = 'K'
@@ -769,4 +774,9 @@
           output_variable%standard_name = 'mole_fraction_of_nitrogen_dioxide_in_air'
           output_variable%units         = 'ppm' !'mol mol-1'
+
+       CASE ( 'ncaa' )
+          output_variable%long_name     = 'number concentration of ambient aerosol particles in air'
+          output_variable%standard_name = 'number_concentration_of_ambient_aerosol_particles_in_air'
+          output_variable%units         = 'm-3' !'mol mol-1'
 
        CASE ( 'tro3'  )
@@ -984,6 +994,6 @@
           vmea(l)%var_atts(ll)%name = TRIM( measured_variables(ll) )
 
-          vmea(l)%data_content = TRIM( vmea(l)%data_content ) // " " //                            &
-                                 TRIM( vmea(l)%var_atts(ll)%name )
+!           vmea(l)%data_content = TRIM( vmea(l)%data_content ) // " " //                            &
+!                                  TRIM( vmea(l)%var_atts(ll)%name )
        ENDDO
 !
@@ -1397,5 +1407,5 @@
                                    value = input_file_atts%author )
        return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'contact_person',         &
-                                   value = input_file_atts%contact_person )
+                                   value = input_file_atts%author )
        return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'iop',                    &
                                    value = input_file_atts%campaign )
@@ -1424,6 +1434,4 @@
                                    value = input_file_atts%creation_time )
        return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'version', value = 1 ) !input_file_atts%version
-       return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'creation_time',          &
-                                   value = TRIM( vmea(l)%site ) )
        return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'Conventions',            &
                                    value = input_file_atts%conventions )
@@ -1932,4 +1940,6 @@
     INTEGER(iwp)       ::  t_ind         !< time index
 
+    REAL(wp), DIMENSION(:), ALLOCATABLE           ::  dum_lat                   !< transformed geographical coordinate (latitude)
+    REAL(wp), DIMENSION(:), ALLOCATABLE           ::  dum_lon                   !< transformed geographical coordinate (longitude)
     REAL(wp), DIMENSION(:), ALLOCATABLE           ::  oro_rel                   !< relative altitude of model surface
     REAL(wp), DIMENSION(:), POINTER               ::  output_values_1d_pointer  !< pointer for 1d output array
@@ -1977,4 +1987,39 @@
                                         bounds_start = (/vmea(l)%start_coord_a/),                  &
                                         bounds_end   = (/vmea(l)%end_coord_a  /) )
+!
+!--       Output of longitude and latitude coordinate. Before output, convert it.
+          ALLOCATE( dum_lat(1:vmea(l)%ns) )
+          ALLOCATE( dum_lon(1:vmea(l)%ns) )
+
+          DO  n = 1, vmea(l)%ns
+             CALL convert_utm_to_geographic( crs_list,                                             &
+                                             init_model%origin_x                                   &
+                                           + REAL( vmea(l)%i(n) + 0.5_wp, KIND = wp ) * dx         &
+                                           * COS( init_model%rotation_angle * pi / 180.0_wp )      &
+                                           + REAL( vmea(l)%j(n) + 0.5_wp, KIND = wp ) * dy         &
+                                           * SIN( init_model%rotation_angle * pi / 180.0_wp ),     &
+                                             init_model%origin_y                                   &
+                                           - REAL( vmea(l)%i(n) + 0.5_wp, KIND = wp ) * dx         &
+                                           * SIN( init_model%rotation_angle * pi / 180.0_wp )      &
+                                           + REAL( vmea(l)%j(n) + 0.5_wp, KIND = wp ) * dy         &
+                                           * COS( init_model%rotation_angle * pi / 180.0_wp ),     &
+                                             dum_lon(n), dum_lat(n) )
+          ENDDO
+
+          output_values_1d_target = dum_lat
+          output_values_1d_pointer => output_values_1d_target
+          return_value = dom_write_var( vmea(l)%nc_filename, 'lat',                                &
+                                        values_realwp_1d = output_values_1d_pointer,               &
+                                        bounds_start = (/vmea(l)%start_coord_a/),                  &
+                                        bounds_end   = (/vmea(l)%end_coord_a  /) )
+
+          output_values_1d_target = dum_lon
+          output_values_1d_pointer => output_values_1d_target
+          return_value = dom_write_var( vmea(l)%nc_filename, 'lon',                                &
+                                        values_realwp_1d = output_values_1d_pointer,               &
+                                        bounds_start = (/vmea(l)%start_coord_a/),                  &
+                                        bounds_end   = (/vmea(l)%end_coord_a  /) )
+          DEALLOCATE( dum_lat )
+          DEALLOCATE( dum_lon )
 !
 !--       Output of relative height coordinate.
@@ -2046,7 +2091,7 @@
 !--          Output of Northing coordinate. Before output, recalculate NUTM.
              output_values_1d_target = init_model%origin_y                                         &
-               - REAL( vmea(l)%i(1:vmea(l)%ns_soil) + 0.5_wp, KIND = wp ) * dx                     &
+               - REAL( vmea(l)%i_soil(1:vmea(l)%ns_soil) + 0.5_wp, KIND = wp ) * dx                &
                * SIN( init_model%rotation_angle * pi / 180.0_wp )                                  &
-               + REAL( vmea(l)%j(1:vmea(l)%ns_soil) + 0.5_wp, KIND = wp ) * dy                     &
+               + REAL( vmea(l)%j_soil(1:vmea(l)%ns_soil) + 0.5_wp, KIND = wp ) * dy                &
                * COS( init_model%rotation_angle * pi / 180.0_wp )
 
@@ -2056,4 +2101,39 @@
                                            bounds_start = (/vmea(l)%start_coord_s/),               &
                                            bounds_end   = (/vmea(l)%end_coord_s  /) )
+!
+!--          Output of longitude and latitude coordinate. Before output, convert it.
+             ALLOCATE( dum_lat(1:vmea(l)%ns_soil) )
+             ALLOCATE( dum_lon(1:vmea(l)%ns_soil) )
+
+             DO  n = 1, vmea(l)%ns_soil
+                CALL convert_utm_to_geographic( crs_list,                                          &
+                                                init_model%origin_x                                &
+                                              + REAL( vmea(l)%i_soil(n) + 0.5_wp, KIND = wp ) * dx &
+                                              * COS( init_model%rotation_angle * pi / 180.0_wp )   &
+                                              + REAL( vmea(l)%j_soil(n) + 0.5_wp, KIND = wp ) * dy &
+                                              * SIN( init_model%rotation_angle * pi / 180.0_wp ),  &
+                                                init_model%origin_y                                &
+                                              - REAL( vmea(l)%i_soil(n) + 0.5_wp, KIND = wp ) * dx &
+                                              * SIN( init_model%rotation_angle * pi / 180.0_wp )   &
+                                              + REAL( vmea(l)%j_soil(n) + 0.5_wp, KIND = wp ) * dy &
+                                              * COS( init_model%rotation_angle * pi / 180.0_wp ),  &
+                                                dum_lon(n), dum_lat(n) )
+             ENDDO
+
+             output_values_1d_target = dum_lat
+             output_values_1d_pointer => output_values_1d_target
+             return_value = dom_write_var( vmea(l)%nc_filename, 'lat_soil',                        &
+                                           values_realwp_1d = output_values_1d_pointer,            &
+                                           bounds_start = (/vmea(l)%start_coord_s/),               &
+                                           bounds_end   = (/vmea(l)%end_coord_s  /) )
+
+             output_values_1d_target = dum_lon
+             output_values_1d_pointer => output_values_1d_target
+             return_value = dom_write_var( vmea(l)%nc_filename, 'lon_soil',                        &
+                                           values_realwp_1d = output_values_1d_pointer,            &
+                                           bounds_start = (/vmea(l)%start_coord_s/),               &
+                                           bounds_end   = (/vmea(l)%end_coord_s  /) )
+             DEALLOCATE( dum_lat )
+             DEALLOCATE( dum_lon )
 !
 !--          Output of relative height coordinate.
@@ -2856,5 +2936,5 @@
 !
 !--           More will follow ...
-
+              CASE ( 'ncaa' )
 !
 !--           No match found - just set a fill value
