Index: palm/trunk/SOURCE/nesting_offl_mod.f90
===================================================================
--- palm/trunk/SOURCE/nesting_offl_mod.f90	(revision 3655)
+++ palm/trunk/SOURCE/nesting_offl_mod.f90	(revision 3704)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! ------------------
-! 
+! Formatting adjustments
 ! 
 ! Former revisions:
@@ -623,60 +623,64 @@
        ENDIF
 #else
-    u_ref  = u_ref_l
-    v_ref  = v_ref_l
-    IF ( humidity )       q_ref  = q_ref_l
-    IF ( .NOT. neutral )  pt_ref = pt_ref_l
+       u_ref  = u_ref_l
+       v_ref  = v_ref_l
+       IF ( humidity )       q_ref  = q_ref_l
+       IF ( .NOT. neutral )  pt_ref = pt_ref_l
 #endif
 !
-!-- Average data. Note, reference profiles up to nzt are derived from lateral
-!-- boundaries, at the model top it is derived from the top boundary. Thus,
-!-- number of input data is different from nzb:nzt compared to nzt+1. 
-!-- Derived from lateral boundaries. 
-    u_ref(nzb:nzt) = u_ref(nzb:nzt) / REAL( 2.0_wp * ( ny + 1 + nx     ),      &
-                                            KIND = wp )  
-    v_ref(nzb:nzt) = v_ref(nzb:nzt) / REAL( 2.0_wp * ( ny   + nx + 1   ),      &
-                                            KIND = wp )
-    IF ( humidity )                                                            &
-       q_ref(nzb:nzt) = q_ref(nzb:nzt)   / REAL( 2.0_wp * ( ny + 1 + nx + 1 ), &
-                                                 KIND = wp )
-    IF ( .NOT. neutral )                                                       &
-       pt_ref(nzb:nzt) = pt_ref(nzb:nzt) / REAL( 2.0_wp * ( ny + 1 + nx + 1 ), &
-                                           KIND = wp )
-!
-!-- Derived from top boundary.    
-    u_ref(nzt+1) = u_ref(nzt+1) / REAL( ( ny + 1 ) * ( nx     ), KIND = wp ) 
-    v_ref(nzt+1) = v_ref(nzt+1) / REAL( ( ny     ) * ( nx + 1 ), KIND = wp )
-    IF ( humidity )                                                            &
-       q_ref(nzt+1) = q_ref(nzt+1)   / REAL( ( ny + 1 ) * ( nx + 1 ), KIND = wp )
-    IF ( .NOT. neutral )                                                       &
-       pt_ref(nzt+1) = pt_ref(nzt+1) / REAL( ( ny + 1 ) * ( nx + 1 ), KIND = wp )
-!
-!-- Write onto init profiles, which are used for damping
-    u_init = u_ref
-    v_init = v_ref
-    IF ( humidity      )  q_init  = q_ref
-    IF ( .NOT. neutral )  pt_init = pt_ref
-!
-!-- Set bottom boundary condition
-    IF ( humidity      )  q_init(nzb)  = q_init(nzb+1)
-    IF ( .NOT. neutral )  pt_init(nzb) = pt_init(nzb+1)
-!
-!-- Further, adjust Rayleigh damping height in case of time-changing conditions.
-!-- Therefore, calculate boundary-layer depth first. 
-    CALL calc_zi
-    CALL adjust_sponge_layer 
-    
-!
-!-- Update geostrophic wind components from dynamic input file. 
-    DO  k = nzb+1, nzt
-       ug(k) = interpolate_in_time( nest_offl%ug(0,k), nest_offl%ug(1,k),      &
-                                    fac_dt )
-       vg(k) = interpolate_in_time( nest_offl%vg(0,k), nest_offl%vg(1,k),      &
-                                    fac_dt )
-    ENDDO
-    ug(nzt+1) = ug(nzt)
-    vg(nzt+1) = vg(nzt)
-    
-    CALL  cpu_log( log_point(58), 'offline nesting', 'stop' )
+!--    Average data. Note, reference profiles up to nzt are derived from lateral
+!--    boundaries, at the model top it is derived from the top boundary. Thus,
+!--    number of input data is different from nzb:nzt compared to nzt+1. 
+!--    Derived from lateral boundaries. 
+       u_ref(nzb:nzt) = u_ref(nzb:nzt) / REAL( 2.0_wp * ( ny + 1 + nx     ),   &
+                                               KIND = wp )  
+       v_ref(nzb:nzt) = v_ref(nzb:nzt) / REAL( 2.0_wp * ( ny   + nx + 1   ),   &
+                                               KIND = wp )
+       IF ( humidity )                                                         &
+          q_ref(nzb:nzt) = q_ref(nzb:nzt)   / REAL( 2.0_wp *                   &
+                                                          ( ny + 1 + nx + 1 ), &
+                                                    KIND = wp )
+       IF ( .NOT. neutral )                                                    &
+          pt_ref(nzb:nzt) = pt_ref(nzb:nzt) / REAL( 2.0_wp *                   &
+                                                          ( ny + 1 + nx + 1 ), &
+                                              KIND = wp )
+!
+!--    Derived from top boundary.    
+       u_ref(nzt+1) = u_ref(nzt+1) / REAL( ( ny + 1 ) * ( nx     ), KIND = wp ) 
+       v_ref(nzt+1) = v_ref(nzt+1) / REAL( ( ny     ) * ( nx + 1 ), KIND = wp )
+       IF ( humidity )                                                         &
+          q_ref(nzt+1) = q_ref(nzt+1)   / REAL( ( ny + 1 ) * ( nx + 1 ),       &
+                                                KIND = wp )
+       IF ( .NOT. neutral )                                                    &
+          pt_ref(nzt+1) = pt_ref(nzt+1) / REAL( ( ny + 1 ) * ( nx + 1 ),       &
+                                                KIND = wp )
+!
+!--    Write onto init profiles, which are used for damping
+       u_init = u_ref
+       v_init = v_ref
+       IF ( humidity      )  q_init  = q_ref
+       IF ( .NOT. neutral )  pt_init = pt_ref
+!
+!--    Set bottom boundary condition
+       IF ( humidity      )  q_init(nzb)  = q_init(nzb+1)
+       IF ( .NOT. neutral )  pt_init(nzb) = pt_init(nzb+1)
+!
+!--    Further, adjust Rayleigh damping height in case of time-changing conditions.
+!--    Therefore, calculate boundary-layer depth first. 
+       CALL calc_zi
+       CALL adjust_sponge_layer 
+    
+!
+!--    Update geostrophic wind components from dynamic input file. 
+       DO  k = nzb+1, nzt
+          ug(k) = interpolate_in_time( nest_offl%ug(0,k), nest_offl%ug(1,k),   &
+                                       fac_dt )
+          vg(k) = interpolate_in_time( nest_offl%vg(0,k), nest_offl%vg(1,k),   &
+                                       fac_dt )
+       ENDDO
+       ug(nzt+1) = ug(nzt)
+       vg(nzt+1) = vg(nzt)
+    
+       CALL  cpu_log( log_point(58), 'offline nesting', 'stop' )
 
     END SUBROUTINE nesting_offl_bc
