Index: palm/trunk/SOURCE/netcdf_data_input_mod.f90
===================================================================
--- palm/trunk/SOURCE/netcdf_data_input_mod.f90	(revision 2746)
+++ palm/trunk/SOURCE/netcdf_data_input_mod.f90	(revision 2772)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Initialization of simulation independent on land-surface model.
+! 
+! 2746 2018-01-15 12:06:04Z suehring
 ! Read plant-canopy variables independently on land-surface model usage
 ! 
@@ -549,5 +552,4 @@
                 CALL inquire_variable_names( id_surf, var_names )
 
-
 !
 !--             Read leaf area density - resolved vegetation
@@ -567,11 +569,11 @@
                                                    nys:nyn,nxl:nxr) )
 
-                      DO  i = nxl, nxr
-                         DO  j = nys, nyn
-                            CALL get_variable( id_surf, 'leaf_area_density',   &
-                                               i, j,                           &
-                                               leaf_area_density_f%var(:,j,i) ) 
-                         ENDDO
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         CALL get_variable( id_surf, 'leaf_area_density',      &
+                                            i, j,                              &
+                                            leaf_area_density_f%var(:,j,i) ) 
                       ENDDO
+                   ENDDO
                 ELSE
                    leaf_area_density_f%from_file = .FALSE. 
@@ -1882,6 +1884,6 @@
 
        USE control_parameters,                                                 &
-           ONLY:  bc_lr_cyc, bc_ns_cyc, forcing, humidity, message_string,     &
-                  neutral, surface_pressure
+           ONLY:  bc_lr_cyc, bc_ns_cyc, forcing, humidity, land_surface,       &
+                  message_string, neutral, surface_pressure
 
        USE indices,                                                            &
@@ -2167,60 +2169,66 @@
 !
 !--          Read soil moisture
-             IF ( check_existence( var_names, 'init_soil_m' ) )  THEN
-!
-!--             Read attributes for the fill value and level-of-detail
-                CALL get_attribute( id_dynamic, char_fill, init_3d%fill_msoil, &
-                                    .FALSE., 'init_soil_m' )
-                CALL get_attribute( id_dynamic, char_lod, init_3d%lod_msoil,   &
-                                    .FALSE., 'init_soil_m' )
-!
-!--             level-of-detail 1 - read initialization profile
-                IF ( init_3d%lod_msoil == 1 )  THEN
-                   ALLOCATE( init_3d%msoil_init(0:init_3d%nzs-1) )
-
-                   CALL get_variable( id_dynamic, 'init_soil_m',               &
-                                      init_3d%msoil_init(0:init_3d%nzs-1) )
-!
-!--             level-of-detail 2 - read 3D initialization data
-                ELSEIF ( init_3d%lod_msoil == 2 )  THEN  ! need to be corrected
-                   ALLOCATE ( init_3d%msoil(0:init_3d%nzs-1,nys:nyn,nxl:nxr) )
-                   DO  i = nxl, nxr
-                      DO  j = nys, nyn
-                         CALL get_variable( id_dynamic, 'init_soil_m', i, j,   &
-                                            init_3d%msoil(0:init_3d%nzs-1,j,i) )
+             IF ( land_surface )  THEN
+                IF ( check_existence( var_names, 'init_soil_m' ) )  THEN
+!
+!--                Read attributes for the fill value and level-of-detail
+                   CALL get_attribute( id_dynamic, char_fill,                  &
+                                       init_3d%fill_msoil,                     &
+                                       .FALSE., 'init_soil_m' )
+                   CALL get_attribute( id_dynamic, char_lod,                   &
+                                       init_3d%lod_msoil,                      &
+                                       .FALSE., 'init_soil_m' )
+!
+!--                level-of-detail 1 - read initialization profile
+                   IF ( init_3d%lod_msoil == 1 )  THEN
+                      ALLOCATE( init_3d%msoil_init(0:init_3d%nzs-1) )
+
+                      CALL get_variable( id_dynamic, 'init_soil_m',            &
+                                         init_3d%msoil_init(0:init_3d%nzs-1) )
+!
+!--                level-of-detail 2 - read 3D initialization data
+                   ELSEIF ( init_3d%lod_msoil == 2 )  THEN  ! need to be corrected
+                      ALLOCATE ( init_3d%msoil(0:init_3d%nzs-1,nys:nyn,nxl:nxr) )
+                      DO  i = nxl, nxr
+                         DO  j = nys, nyn
+                            CALL get_variable( id_dynamic, 'init_soil_m', i, j,&
+                                               init_3d%msoil(0:init_3d%nzs-1,j,i) )
+                         ENDDO
                       ENDDO
-                   ENDDO
-                ENDIF
-                init_3d%from_file_msoil = .TRUE.
-             ENDIF
-!
-!--          Read soil temperature
-             IF ( check_existence( var_names, 'init_soil_t' ) )  THEN
-!
-!--             Read attributes for the fill value and level-of-detail
-                CALL get_attribute( id_dynamic, char_fill, init_3d%fill_tsoil, &
-                                    .FALSE., 'init_soil_t' )
-                CALL get_attribute( id_dynamic, char_lod, init_3d%lod_tsoil,   &
-                                    .FALSE., 'init_soil_t' )
-!
-!--             level-of-detail 1 - read initialization profile
-                IF ( init_3d%lod_tsoil == 1 )  THEN
-                   ALLOCATE( init_3d%tsoil_init(0:init_3d%nzs-1) )
-
-                   CALL get_variable( id_dynamic, 'init_soil_t',               &
-                                      init_3d%tsoil_init(0:init_3d%nzs-1) )
-
-!
-!--             level-of-detail 2 - read 3D initialization data
-                ELSEIF ( init_3d%lod_tsoil == 2 )  THEN  ! need to be corrected
-                   ALLOCATE ( init_3d%tsoil(0:init_3d%nzs-1,nys:nyn,nxl:nxr) )
-                   DO  i = nxl, nxr
-                      DO  j = nys, nyn
-                         CALL get_variable( id_dynamic, 'init_soil_t', i, j,   &
-                                            init_3d%tsoil(0:init_3d%nzs-1,j,i) )
+                   ENDIF
+                   init_3d%from_file_msoil = .TRUE.
+                ENDIF
+!
+!--             Read soil temperature
+                IF ( check_existence( var_names, 'init_soil_t' ) )  THEN
+!
+!--                Read attributes for the fill value and level-of-detail
+                   CALL get_attribute( id_dynamic, char_fill,                  &
+                                       init_3d%fill_tsoil,                     &
+                                       .FALSE., 'init_soil_t' )
+                   CALL get_attribute( id_dynamic, char_lod,                   &
+                                       init_3d%lod_tsoil,                      &
+                                       .FALSE., 'init_soil_t' )
+!
+!--                level-of-detail 1 - read initialization profile
+                   IF ( init_3d%lod_tsoil == 1 )  THEN
+                      ALLOCATE( init_3d%tsoil_init(0:init_3d%nzs-1) )
+
+                      CALL get_variable( id_dynamic, 'init_soil_t',            &
+                                         init_3d%tsoil_init(0:init_3d%nzs-1) )
+
+!
+!--                level-of-detail 2 - read 3D initialization data
+                   ELSEIF ( init_3d%lod_tsoil == 2 )  THEN  ! need to be corrected
+                      ALLOCATE ( init_3d%tsoil(0:init_3d%nzs-1,nys:nyn,nxl:nxr) )
+                      DO  i = nxl, nxr
+                         DO  j = nys, nyn
+                            CALL get_variable( id_dynamic, 'init_soil_t', i, j,&
+                                               init_3d%tsoil(0:init_3d%nzs-1,j,i) )
+                         ENDDO
                       ENDDO
-                   ENDDO
-                ENDIF
-                init_3d%from_file_tsoil = .TRUE.
+                   ENDIF
+                   init_3d%from_file_tsoil = .TRUE.
+                ENDIF
              ENDIF
 !
