<p><b>duda</b> 2013-03-11 14:54:13 -0600 (Mon, 11 Mar 2013)</p><p>BRANCH COMMIT<br>
<br>
Undo the change made in revision 2574: The allocation of the maskslab<br>
array must be done inside the do-loop after we've read a LANDSEA field,<br>
else the dimensions of the maskslab array aren't known.<br>
<br>
<br>
M    src/core_init_nhyd_atmos/mpas_init_atm_surface.F<br>
</p><hr noshade><pre><font color="gray">Modified: branches/atmos_physics/src/core_init_nhyd_atmos/mpas_init_atm_surface.F
===================================================================
--- branches/atmos_physics/src/core_init_nhyd_atmos/mpas_init_atm_surface.F        2013-03-11 18:20:33 UTC (rev 2584)
+++ branches/atmos_physics/src/core_init_nhyd_atmos/mpas_init_atm_surface.F        2013-03-11 20:54:13 UTC (rev 2585)
@@ -117,11 +117,11 @@
     write(0,*) 'Processing file ',trim(config_sfc_prefix)//':'//timeString(1:13)
  endif
 
- if(.not.allocated(maskslab)) allocate(maskslab(-2:field % nx+3, field % ny))
 !scan through all fields in the file, looking for the LANDSEA field:
  call read_next_met_field(field,istatus)
  do while (istatus == 0)
     if(index(field % field, 'LANDSEA') /= 0) then
+       if(.not.allocated(maskslab)) allocate(maskslab(-2:field % nx+3, field % ny))
        maskslab(1:field % nx, 1:field % ny) = field % slab(1:field % nx, 1:field % ny)
        maskslab(0, 1:field % ny)  = field % slab(field % nx, 1:field % ny)
        maskslab(-1, 1:field % ny) = field % slab(field % nx-1, 1:field % ny)

</font>
</pre>