<p><b>duda</b> 2011-07-20 17:31:21 -0600 (Wed, 20 Jul 2011)</p><p>BRANCH COMMIT<br>
<br>
Enable the outputting of fields on the 's' stream. Writing 's' stream fields<br>
is accomplished in essentially the same way as writing 'o' stream variables;<br>
for example:<br>
<br>
   type (io_output_object) :: sfc_update_obj<br>
<br>
   sfc_update_obj % time = 1<br>
   sfc_update_obj % filename = 'mgd_sst.nc'<br>
<br>
   call output_state_init(sfc_update_obj, domain, &quot;SFC&quot;)<br>
<br>
   call output_state_for_domain(sfc_update_obj, domain, sfc_update_obj % time)<br>
<br>
   call output_state_finalize(sfc_update_obj, dminfo)<br>
<br>
<br>
M    src/registry/gen_inc.c<br>
M    src/framework/module_io_output.F<br>
</p><hr noshade><pre><font color="gray">Modified: branches/atmos_physics/src/framework/module_io_output.F
===================================================================
--- branches/atmos_physics/src/framework/module_io_output.F        2011-07-20 21:54:34 UTC (rev 925)
+++ branches/atmos_physics/src/framework/module_io_output.F        2011-07-20 23:31:21 UTC (rev 926)
@@ -7,6 +7,7 @@
 
    integer, parameter :: OUTPUT = 1
    integer, parameter :: RESTART = 2
+   integer, parameter :: SFC = 3
  
    type io_output_object
       integer :: wr_ncid
@@ -82,6 +83,9 @@
       else if (trim(stream) == 'RESTART') then
          output_obj % filename = trim(config_restart_name)
          output_obj % stream = RESTART
+      else if (trim(stream) == 'SFC') then
+         ! Keep filename as whatever was set by the user
+         output_obj % stream = SFC
       end if
 
       ! For now, we assume that a domain consists only of one block,

Modified: branches/atmos_physics/src/registry/gen_inc.c
===================================================================
--- branches/atmos_physics/src/registry/gen_inc.c        2011-07-20 21:54:34 UTC (rev 925)
+++ branches/atmos_physics/src/registry/gen_inc.c        2011-07-20 23:31:21 UTC (rev 926)
@@ -1716,6 +1716,7 @@
       fortprintf(fd, &quot;      if (.false. &amp;</font>
<font color="black">&quot;);
       if (var_ptr-&gt;iostreams &amp; RESTART0) fortprintf(fd, &quot;          .or. output_obj %% stream == RESTART &amp;</font>
<font color="black">&quot;);
       if (var_ptr-&gt;iostreams &amp; OUTPUT0)  fortprintf(fd, &quot;          .or. output_obj %% stream == OUTPUT &amp;</font>
<font color="blue">&quot;);
+      if (var_ptr-&gt;iostreams &amp; SFC0)     fortprintf(fd, &quot;          .or. output_obj %% stream == SFC &amp;</font>
<font color="black">&quot;);
       fortprintf(fd, &quot;      ) then</font>
<font color="gray">&quot;);
       dimlist_ptr = var_ptr-&gt;dimlist;
       i = 1;
@@ -1783,11 +1784,13 @@
    
          if (strncmp(var_ptr-&gt;super_array, &quot;-&quot;, 1024) != 0) {
             fortprintf(fd, &quot;      if ((%s %% %s %% ioinfo %% output .and. output_obj %% stream == OUTPUT) .or. &amp;</font>
<font color="red">&quot;, struct_deref, var_ptr-&gt;super_array);
-            fortprintf(fd, &quot;          (%s %% %s %% ioinfo %% restart .and. output_obj %% stream == RESTART)) then</font>
<font color="blue">&quot;, struct_deref, var_ptr-&gt;super_array);
+            fortprintf(fd, &quot;          (%s %% %s %% ioinfo %% restart .and. output_obj %% stream == RESTART) .or. &amp;</font>
<font color="blue">&quot;, struct_deref, var_ptr-&gt;super_array);
+            fortprintf(fd, &quot;          (%s %% %s %% ioinfo %% sfc .and. output_obj %% stream == SFC)) then</font>
<font color="black">&quot;, struct_deref, var_ptr-&gt;super_array);
          }
          else {
             fortprintf(fd, &quot;      if ((%s %% %s %% ioinfo %% output .and. output_obj %% stream == OUTPUT) .or. &amp;</font>
<font color="red">&quot;, struct_deref, var_ptr-&gt;name_in_code);
-            fortprintf(fd, &quot;          (%s %% %s %% ioinfo %% restart .and. output_obj %% stream == RESTART)) then</font>
<font color="blue">&quot;, struct_deref, var_ptr-&gt;name_in_code);
+            fortprintf(fd, &quot;          (%s %% %s %% ioinfo %% restart .and. output_obj %% stream == RESTART) .or. &amp;</font>
<font color="blue">&quot;, struct_deref, var_ptr-&gt;name_in_code);
+            fortprintf(fd, &quot;          (%s %% %s %% ioinfo %% sfc .and. output_obj %% stream == SFC)) then</font>
<font color="black">&quot;, struct_deref, var_ptr-&gt;name_in_code);
          }
    
          if (var_ptr-&gt;ndims &gt; 0) {

</font>
</pre>