Index: palm/trunk/SOURCE/boundary_conds.f90
===================================================================
--- palm/trunk/SOURCE/boundary_conds.f90	(revision 3716)
+++ palm/trunk/SOURCE/boundary_conds.f90	(revision 3717)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! Bugfix, do not set boundary conditions for potential temperature in neutral
+! runs.
+! 
+! 3655 2019-01-07 16:51:22Z knoop
 ! OpenACC port for SPEC
 ! 
@@ -235,6 +239,6 @@
                humidity, ibc_pt_b, ibc_pt_t, ibc_q_b, ibc_q_t, ibc_s_b,        &
                ibc_s_t, ibc_uv_b, ibc_uv_t, intermediate_timestep_count,       &
-               nesting_offline, nudging, ocean_mode, passive_scalar, rans_mode,&
-               rans_tke_e, tsc, salsa, use_cmax
+               nesting_offline, neutral, nudging, ocean_mode, passive_scalar,  &
+               rans_mode, rans_tke_e, tsc, salsa, use_cmax
 
     USE grid_variables,                                                        &
@@ -328,54 +332,56 @@
 !-- the sea surface temperature of the coupled ocean model.
 !-- Dirichlet
-    IF ( ibc_pt_b == 0 )  THEN
-       DO  l = 0, 1
-!
-!--       Set kb, for upward-facing surfaces value at topography top (k-1) is set,
-!--       for downward-facing surfaces at topography bottom (k+1). 
-          kb = MERGE( -1, 1, l == 0 )
-          !$OMP PARALLEL DO PRIVATE( i, j, k )
-          DO  m = 1, bc_h(l)%ns
-             i = bc_h(l)%i(m)            
-             j = bc_h(l)%j(m)
-             k = bc_h(l)%k(m)
-             pt_p(k+kb,j,i) = pt(k+kb,j,i)
-          ENDDO
-       ENDDO
-!
-!-- Neumann, zero-gradient
-    ELSEIF ( ibc_pt_b == 1 )  THEN
-       DO  l = 0, 1
-!
-!--       Set kb, for upward-facing surfaces value at topography top (k-1) is set,
-!--       for downward-facing surfaces at topography bottom (k+1). 
-          kb = MERGE( -1, 1, l == 0 )
-          !$OMP PARALLEL DO PRIVATE( i, j, k )
-          !$ACC PARALLEL LOOP PRIVATE(i, j, k) &
-          !$ACC PRESENT(bc_h, pt_p)
-          DO  m = 1, bc_h(l)%ns
-             i = bc_h(l)%i(m)            
-             j = bc_h(l)%j(m)
-             k = bc_h(l)%k(m)
-             pt_p(k+kb,j,i) = pt_p(k,j,i)
-          ENDDO
-       ENDDO
-    ENDIF
-
-!
-!-- Temperature at top boundary
-    IF ( ibc_pt_t == 0 )  THEN
-        pt_p(nzt+1,:,:) = pt(nzt+1,:,:)
-!
-!--     In case of nudging adjust top boundary to pt which is
-!--     read in from NUDGING-DATA
-        IF ( nudging )  THEN
-           pt_p(nzt+1,:,:) = pt_init(nzt+1)
-        ENDIF
-    ELSEIF ( ibc_pt_t == 1 )  THEN
-        pt_p(nzt+1,:,:) = pt_p(nzt,:,:)
-    ELSEIF ( ibc_pt_t == 2 )  THEN
-        !$ACC KERNELS PRESENT(pt_p, dzu)
-        pt_p(nzt+1,:,:) = pt_p(nzt,:,:) + bc_pt_t_val * dzu(nzt+1)
-        !$ACC END KERNELS
+    IF ( .NOT. neutral )  THEN
+       IF ( ibc_pt_b == 0 )  THEN
+          DO  l = 0, 1
+!      
+!--          Set kb, for upward-facing surfaces value at topography top (k-1)
+!--          is set, for downward-facing surfaces at topography bottom (k+1). 
+             kb = MERGE( -1, 1, l == 0 )
+             !$OMP PARALLEL DO PRIVATE( i, j, k )
+             DO  m = 1, bc_h(l)%ns
+                i = bc_h(l)%i(m)            
+                j = bc_h(l)%j(m)
+                k = bc_h(l)%k(m)
+                pt_p(k+kb,j,i) = pt(k+kb,j,i)
+             ENDDO
+          ENDDO
+!      
+!--    Neumann, zero-gradient
+       ELSEIF ( ibc_pt_b == 1 )  THEN
+          DO  l = 0, 1
+!      
+!--          Set kb, for upward-facing surfaces value at topography top (k-1) 
+!--          is set, for downward-facing surfaces at topography bottom (k+1). 
+             kb = MERGE( -1, 1, l == 0 )
+             !$OMP PARALLEL DO PRIVATE( i, j, k )
+             !$ACC PARALLEL LOOP PRIVATE(i, j, k) &
+             !$ACC PRESENT(bc_h, pt_p)
+             DO  m = 1, bc_h(l)%ns
+                i = bc_h(l)%i(m)            
+                j = bc_h(l)%j(m)
+                k = bc_h(l)%k(m)
+                pt_p(k+kb,j,i) = pt_p(k,j,i)
+             ENDDO
+          ENDDO
+       ENDIF
+       
+!      
+!--    Temperature at top boundary
+       IF ( ibc_pt_t == 0 )  THEN
+           pt_p(nzt+1,:,:) = pt(nzt+1,:,:)
+!      
+!--        In case of nudging adjust top boundary to pt which is
+!--        read in from NUDGING-DATA
+           IF ( nudging )  THEN
+              pt_p(nzt+1,:,:) = pt_init(nzt+1)
+           ENDIF
+       ELSEIF ( ibc_pt_t == 1 )  THEN
+           pt_p(nzt+1,:,:) = pt_p(nzt,:,:)
+       ELSEIF ( ibc_pt_t == 2 )  THEN
+           !$ACC KERNELS PRESENT(pt_p, dzu)
+           pt_p(nzt+1,:,:) = pt_p(nzt,:,:) + bc_pt_t_val * dzu(nzt+1)
+           !$ACC END KERNELS
+       ENDIF
     ENDIF
 
Index: palm/trunk/SOURCE/module_interface.f90
===================================================================
--- palm/trunk/SOURCE/module_interface.f90	(revision 3716)
+++ palm/trunk/SOURCE/module_interface.f90	(revision 3717)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Add check_parameters routine for virtual measurements
+! 
+! 3711 2019-01-31 13:44:26Z knoop
 ! Introduced module_interface_init_checks for post-init checks
 ! 
@@ -297,5 +300,6 @@
 
    USE virtual_measurement_mod,                                                &
-       ONLY:  vm_init,                                                         &
+       ONLY:  vm_check_parameters,                                             &
+              vm_init,                                                         &
               vm_last_actions,                                                 &
               vm_parin
@@ -492,4 +496,5 @@
    IF ( syn_turb_gen )         CALL stg_check_parameters
    IF ( urban_surface )        CALL usm_check_parameters
+   IF ( virtual_measurement )  CALL vm_check_parameters
    IF ( wind_turbine )         CALL wtm_check_parameters
    IF ( user_module_enabled )  CALL user_check_parameters
Index: palm/trunk/SOURCE/virtual_measurement_mod.f90
===================================================================
--- palm/trunk/SOURCE/virtual_measurement_mod.f90	(revision 3716)
+++ palm/trunk/SOURCE/virtual_measurement_mod.f90	(revision 3717)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Additional check + error numbers adjusted
+! 
+! 3706 2019-01-29 20:02:26Z suehring
 ! unused variables removed
 ! 
@@ -313,8 +316,15 @@
  
     USE netcdf_data_input_mod,                                                 &
-        ONLY:  input_pids_static
+        ONLY:  input_pids_static, input_pids_vm
         
     IMPLICIT NONE
-    
+
+!
+!-- Virtual measurements require a setup file. 
+    IF ( virtual_measurement  .AND.  .NOT. input_pids_vm )  THEN
+       message_string = 'If virtual measurements are taken, a setup input ' // &
+                        'file for the site locations is mandatory.'
+       CALL message( 'vm_check_parameters', 'PA0533', 1, 2, 0, 6, 0 )
+    ENDIF   
 !
 !-- In case virtual measurements are taken, a static input file is required.
@@ -325,5 +335,5 @@
        message_string = 'If virtual measurements are taken, a static input ' //&
                         'file is mandatory.'
-       CALL message( 'vm_check_parameters', 'PA0000', 1, 2, 0, 6, 0 )
+       CALL message( 'vm_check_parameters', 'PA0534', 1, 2, 0, 6, 0 )
     ENDIF
  
@@ -522,5 +532,5 @@
                            TRIM( vmea(l)%feature_type ) //                     &
                            ' is not allowed.' 
-          CALL message( 'vm_init', 'PA0000', 1, 2, 0, 6, 0 )
+          CALL message( 'vm_init', 'PA0535', 1, 2, 0, 6, 0 )
        ENDIF
 !
