Index: palm/trunk/SOURCE/netcdf_data_input_mod.f90
===================================================================
--- palm/trunk/SOURCE/netcdf_data_input_mod.f90	(revision 2951)
+++ palm/trunk/SOURCE/netcdf_data_input_mod.f90	(revision 2953)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Bugfix in checks for initialization data
+! 
+! 2947 2018-04-04 18:01:41Z suehring
 ! Checks for dynamic input revised
 ! 
@@ -1982,4 +1985,6 @@
        INTEGER(iwp) ::  off_j      !< offset in y-direction used for reading the v-component
 
+       LOGICAL      ::  check_passed !< flag indicating if a check passed 
+
 !
 !--    Skip routine if no input file with dynamic input data is available.
@@ -2344,7 +2349,16 @@
        ENDDO
 !
-!--    Finally, check if the input data has any fill values.
+!--    Finally, check if the input data has any fill values. Please note, 
+!--    checks depend on the LOD of the input data.
        IF ( init_3d%from_file_u )  THEN
-          IF ( ANY( u(nzb+1:nzt+1,nys:nyn,nxlu:nxr) == init_3d%fill_u ) )  THEN
+          check_passed = .TRUE.
+          IF ( init_3d%lod_u == 1 )  THEN
+             IF ( ANY( init_3d%u_init(nzb+1:nzt+1) == init_3d%fill_u ) )       &
+                check_passed = .FALSE.
+          ELSEIF ( init_3d%lod_u == 2 )  THEN
+             IF ( ANY( u(nzb+1:nzt+1,nys:nyn,nxlu:nxr) == init_3d%fill_u ) )   &
+                check_passed = .FALSE.
+          ENDIF
+          IF ( .NOT. check_passed )  THEN
              message_string = 'NetCDF input for u_init must not contain ' //   &
                               'any _FillValues'
@@ -2352,6 +2366,15 @@
           ENDIF
        ENDIF
+
        IF ( init_3d%from_file_v )  THEN
-          IF ( ANY( v(nzb+1:nzt+1,nysv:nyn,nxl:nxr) == init_3d%fill_v ) )  THEN
+          check_passed = .TRUE.
+          IF ( init_3d%lod_v == 1 )  THEN
+             IF ( ANY( init_3d%v_init(nzb+1:nzt+1) == init_3d%fill_v ) )       &
+                check_passed = .FALSE.
+          ELSEIF ( init_3d%lod_v == 2 )  THEN
+             IF ( ANY( v(nzb+1:nzt+1,nysv:nyn,nxl:nxr) == init_3d%fill_v ) )   &
+                check_passed = .FALSE.
+          ENDIF
+          IF ( .NOT. check_passed )  THEN
              message_string = 'NetCDF input for v_init must not contain ' //   &
                               'any _FillValues'
@@ -2359,6 +2382,15 @@
           ENDIF
        ENDIF
+
        IF ( init_3d%from_file_w )  THEN
-          IF ( ANY( w(nzb+1:nzt,nys:nyn,nxl:nxr) == init_3d%fill_w ) )  THEN
+          check_passed = .TRUE.
+          IF ( init_3d%lod_w == 1 )  THEN
+             IF ( ANY( init_3d%w_init(nzb+1:nzt) == init_3d%fill_w ) )         &
+                check_passed = .FALSE.
+          ELSEIF ( init_3d%lod_w == 2 )  THEN
+             IF ( ANY( w(nzb+1:nzt,nys:nyn,nxl:nxr) == init_3d%fill_w ) )      &
+                check_passed = .FALSE.
+          ENDIF
+          IF ( .NOT. check_passed )  THEN
              message_string = 'NetCDF input for w_init must not contain ' //   &
                               'any _FillValues'
@@ -2366,6 +2398,15 @@
           ENDIF
        ENDIF
+
        IF ( init_3d%from_file_pt )  THEN
-          IF ( ANY( pt(nzb+1:nzt+1,nys:nyn,nxl:nxr) == init_3d%fill_pt ) )  THEN
+          check_passed = .TRUE.
+          IF ( init_3d%lod_pt == 1 )  THEN
+             IF ( ANY( init_3d%pt_init(nzb+1:nzt+1) == init_3d%fill_pt ) )     &
+                check_passed = .FALSE.
+          ELSEIF ( init_3d%lod_pt == 2 )  THEN
+             IF ( ANY( pt(nzb+1:nzt+1,nys:nyn,nxl:nxr) == init_3d%fill_pt ) )  &
+                check_passed = .FALSE.
+          ENDIF
+          IF ( .NOT. check_passed )  THEN
              message_string = 'NetCDF input for pt_init must not contain ' //  &
                               'any _FillValues'
@@ -2373,6 +2414,15 @@
           ENDIF
        ENDIF
+
        IF ( init_3d%from_file_q )  THEN
-          IF ( ANY( q(nzb+1:nzt+1,nys:nyn,nxl:nxr) == init_3d%fill_q ) )  THEN
+          check_passed = .TRUE.
+          IF ( init_3d%lod_q == 1 )  THEN
+             IF ( ANY( init_3d%q_init(nzb+1:nzt+1) == init_3d%fill_q ) )       &
+                check_passed = .FALSE.
+          ELSEIF ( init_3d%lod_q == 2 )  THEN
+             IF ( ANY( q(nzb+1:nzt+1,nys:nyn,nxl:nxr) == init_3d%fill_q ) )    &
+                check_passed = .FALSE.
+          ENDIF
+          IF ( .NOT. check_passed )  THEN
              message_string = 'NetCDF input for q_init must not contain ' //   &
                               'any _FillValues'
