<p><b>duda</b> 2012-06-06 11:10:44 -0600 (Wed, 06 Jun 2012)</p><p>BRANCH COMMIT<br>
<br>
Allow the PIO format -- either serial netCDF or pnetCDF -- to be selected via a namelist variable.<br>
<br>
<br>
M    namelist.input.nhyd_atmos_squall<br>
M    namelist.input.hyd_atmos<br>
M    namelist.input.init_nhyd_atmos<br>
M    namelist.input.sw<br>
M    src/core_hyd_atmos/Registry<br>
M    src/core_init_nhyd_atmos/Registry<br>
M    src/core_sw/Registry<br>
M    src/core_nhyd_atmos/Registry<br>
M    src/core_ocean/Registry<br>
M    src/framework/mpas_io_input.F<br>
M    src/framework/mpas_io_output.F<br>
M    namelist.input.nhyd_atmos<br>
M    namelist.input.nhyd_atmos_jw<br>
M    namelist.input.nhyd_atmos_mtn_wave<br>
M    namelist.input.ocean<br>
</p><hr noshade><pre><font color="gray">Modified: branches/cam_mpas_nh/namelist.input.hyd_atmos
===================================================================
--- branches/cam_mpas_nh/namelist.input.hyd_atmos        2012-06-06 17:06:53 UTC (rev 1968)
+++ branches/cam_mpas_nh/namelist.input.hyd_atmos        2012-06-06 17:10:44 UTC (rev 1969)
@@ -28,6 +28,7 @@
    config_frames_per_outfile = 0
    config_pio_num_iotasks = 0
    config_pio_stride      = 1
+   config_pio_format      = 'pnetcdf'
 /
 
 &amp;decomposition

Modified: branches/cam_mpas_nh/namelist.input.init_nhyd_atmos
===================================================================
--- branches/cam_mpas_nh/namelist.input.init_nhyd_atmos        2012-06-06 17:06:53 UTC (rev 1968)
+++ branches/cam_mpas_nh/namelist.input.init_nhyd_atmos        2012-06-06 17:10:44 UTC (rev 1969)
@@ -37,6 +37,7 @@
    config_output_name        = 'x1.40962.init.2010-10-23.nc'
    config_pio_num_iotasks    = 0
    config_pio_stride         = 1
+   config_pio_format         = 'pnetcdf'
 /
 
 &amp;decomposition

Modified: branches/cam_mpas_nh/namelist.input.nhyd_atmos
===================================================================
--- branches/cam_mpas_nh/namelist.input.nhyd_atmos        2012-06-06 17:06:53 UTC (rev 1968)
+++ branches/cam_mpas_nh/namelist.input.nhyd_atmos        2012-06-06 17:10:44 UTC (rev 1969)
@@ -47,6 +47,7 @@
    config_frames_per_outfile = 1
    config_pio_num_iotasks = 0
    config_pio_stride      = 1
+   config_pio_format      = 'pnetcdf'
 /
    config_sfc_update_name = 'sfc_update.nc'
 

Modified: branches/cam_mpas_nh/namelist.input.nhyd_atmos_jw
===================================================================
--- branches/cam_mpas_nh/namelist.input.nhyd_atmos_jw        2012-06-06 17:06:53 UTC (rev 1968)
+++ branches/cam_mpas_nh/namelist.input.nhyd_atmos_jw        2012-06-06 17:10:44 UTC (rev 1969)
@@ -44,6 +44,7 @@
    config_restart_name = 'restart.nc'
    config_pio_num_iotasks = 0
    config_pio_stride      = 1
+   config_pio_format      = 'pnetcdf'
 /
 
 &amp;decomposition

Modified: branches/cam_mpas_nh/namelist.input.nhyd_atmos_mtn_wave
===================================================================
--- branches/cam_mpas_nh/namelist.input.nhyd_atmos_mtn_wave        2012-06-06 17:06:53 UTC (rev 1968)
+++ branches/cam_mpas_nh/namelist.input.nhyd_atmos_mtn_wave        2012-06-06 17:10:44 UTC (rev 1969)
@@ -40,6 +40,7 @@
    config_frames_per_outfile = 0
    config_pio_num_iotasks = 0
    config_pio_stride      = 1
+   config_pio_format      = 'pnetcdf'
 /
 
 &amp;decomposition

Modified: branches/cam_mpas_nh/namelist.input.nhyd_atmos_squall
===================================================================
--- branches/cam_mpas_nh/namelist.input.nhyd_atmos_squall        2012-06-06 17:06:53 UTC (rev 1968)
+++ branches/cam_mpas_nh/namelist.input.nhyd_atmos_squall        2012-06-06 17:10:44 UTC (rev 1969)
@@ -40,6 +40,7 @@
    config_frames_per_outfile = 0
    config_pio_num_iotasks = 0
    config_pio_stride      = 1
+   config_pio_format      = 'pnetcdf'
 /
 
 &amp;decomposition

Modified: branches/cam_mpas_nh/namelist.input.ocean
===================================================================
--- branches/cam_mpas_nh/namelist.input.ocean        2012-06-06 17:06:53 UTC (rev 1968)
+++ branches/cam_mpas_nh/namelist.input.ocean        2012-06-06 17:10:44 UTC (rev 1969)
@@ -15,6 +15,7 @@
    config_frames_per_outfile = 1000000
    config_pio_num_iotasks = 0
    config_pio_stride      = 1
+   config_pio_format      = 'pnetcdf'
 /
 &amp;decomposition
    config_number_of_blocks = 0

Modified: branches/cam_mpas_nh/namelist.input.sw
===================================================================
--- branches/cam_mpas_nh/namelist.input.sw        2012-06-06 17:06:53 UTC (rev 1968)
+++ branches/cam_mpas_nh/namelist.input.sw        2012-06-06 17:10:44 UTC (rev 1969)
@@ -27,6 +27,7 @@
    config_frames_per_outfile = 0
    config_pio_num_iotasks = 0
    config_pio_stride      = 1
+   config_pio_format      = 'pnetcdf'
 /
 &amp;decomposition
    config_number_of_blocks = 0

Modified: branches/cam_mpas_nh/src/core_hyd_atmos/Registry
===================================================================
--- branches/cam_mpas_nh/src/core_hyd_atmos/Registry        2012-06-06 17:06:53 UTC (rev 1968)
+++ branches/cam_mpas_nh/src/core_hyd_atmos/Registry        2012-06-06 17:10:44 UTC (rev 1969)
@@ -29,6 +29,7 @@
 namelist integer   io       config_frames_per_outfile   0
 namelist integer   io       config_pio_num_iotasks      0 
 namelist integer   io       config_pio_stride           1
+namelist character io       config_pio_format           pnetcdf
 namelist character decomposition config_block_decomp_file_prefix  graph.info.part.
 namelist integer   decomposition config_number_of_blocks          0
 namelist logical   decomposition config_explicit_proc_decomp      .false.

Modified: branches/cam_mpas_nh/src/core_init_nhyd_atmos/Registry
===================================================================
--- branches/cam_mpas_nh/src/core_init_nhyd_atmos/Registry        2012-06-06 17:06:53 UTC (rev 1968)
+++ branches/cam_mpas_nh/src/core_init_nhyd_atmos/Registry        2012-06-06 17:10:44 UTC (rev 1969)
@@ -31,6 +31,7 @@
 namelist integer   io         config_frames_per_outfile   0
 namelist integer   io         config_pio_num_iotasks      0 
 namelist integer   io         config_pio_stride           1
+namelist character io         config_pio_format           pnetcdf
 namelist character decomposition config_block_decomp_file_prefix  graph.info.part.
 namelist integer   decomposition config_number_of_blocks          0
 namelist logical   decomposition config_explicit_proc_decomp      .false.

Modified: branches/cam_mpas_nh/src/core_nhyd_atmos/Registry
===================================================================
--- branches/cam_mpas_nh/src/core_nhyd_atmos/Registry        2012-06-06 17:06:53 UTC (rev 1968)
+++ branches/cam_mpas_nh/src/core_nhyd_atmos/Registry        2012-06-06 17:10:44 UTC (rev 1969)
@@ -46,6 +46,7 @@
 namelist integer   io         config_frames_per_outfile   0
 namelist integer   io         config_pio_num_iotasks      0 
 namelist integer   io         config_pio_stride           1
+namelist character io         config_pio_format           pnetcdf
 namelist character decomposition config_block_decomp_file_prefix  graph.info.part.
 namelist integer   decomposition config_number_of_blocks          0
 namelist logical   decomposition config_explicit_proc_decomp      .false.

Modified: branches/cam_mpas_nh/src/core_ocean/Registry
===================================================================
--- branches/cam_mpas_nh/src/core_ocean/Registry        2012-06-06 17:06:53 UTC (rev 1968)
+++ branches/cam_mpas_nh/src/core_ocean/Registry        2012-06-06 17:10:44 UTC (rev 1969)
@@ -18,8 +18,9 @@
 namelist character io       config_restart_name        restart.nc
 namelist character io       config_output_interval     24:00:00
 namelist integer   io       config_frames_per_outfile  0
-namelist integer   io       config_pio_num_iotasks      0 
-namelist integer   io       config_pio_stride           1
+namelist integer   io       config_pio_num_iotasks     0 
+namelist integer   io       config_pio_stride          1
+namelist character io       config_pio_format          pnetcdf
 namelist character decomposition config_block_decomp_file_prefix  graph.info.part.
 namelist integer   decomposition config_number_of_blocks          0
 namelist logical   decomposition config_explicit_proc_decomp      .false.

Modified: branches/cam_mpas_nh/src/core_sw/Registry
===================================================================
--- branches/cam_mpas_nh/src/core_sw/Registry        2012-06-06 17:06:53 UTC (rev 1968)
+++ branches/cam_mpas_nh/src/core_sw/Registry        2012-06-06 17:10:44 UTC (rev 1969)
@@ -28,6 +28,7 @@
 namelist integer     io        config_frames_per_outfile    0
 namelist integer     io        config_pio_num_iotasks       0 
 namelist integer     io        config_pio_stride            1
+namelist character   io        config_pio_format            pnetcdf
 namelist character   decomposition config_block_decomp_file_prefix  graph.info.part.
 namelist integer     decomposition config_number_of_blocks          0
 namelist logical     decomposition config_explicit_proc_decomp      .false.

Modified: branches/cam_mpas_nh/src/framework/mpas_io_input.F
===================================================================
--- branches/cam_mpas_nh/src/framework/mpas_io_input.F        2012-06-06 17:06:53 UTC (rev 1968)
+++ branches/cam_mpas_nh/src/framework/mpas_io_input.F        2012-06-06 17:10:44 UTC (rev 1969)
@@ -149,7 +149,11 @@
          input_obj % filename = trim(config_input_name)
          input_obj % stream = STREAM_INPUT
       end if
-      inputHandle = MPAS_io_open(trim(input_obj % filename), MPAS_IO_READ, MPAS_IO_PNETCDF, ierr)
+      if (trim(config_pio_format) == 'pnetcdf') then
+         inputHandle = MPAS_io_open(trim(input_obj % filename), MPAS_IO_READ, MPAS_IO_PNETCDF, ierr)
+      else
+         inputHandle = MPAS_io_open(trim(input_obj % filename), MPAS_IO_READ, MPAS_IO_NETCDF, ierr)
+      end if
       if (ierr /= MPAS_IO_NOERR) then
          write(0,*) ' '
          if (input_obj % stream == STREAM_RESTART) then
@@ -1318,7 +1322,11 @@
  
       integer :: nferr
  
-      call MPAS_createStream(input_obj % io_stream, trim(input_obj % filename), MPAS_IO_PNETCDF, MPAS_IO_READ, 1, nferr)
+      if (trim(config_pio_format) == 'pnetcdf') then
+         call MPAS_createStream(input_obj % io_stream, trim(input_obj % filename), MPAS_IO_PNETCDF, MPAS_IO_READ, 1, nferr)
+      else
+         call MPAS_createStream(input_obj % io_stream, trim(input_obj % filename), MPAS_IO_NETCDF, MPAS_IO_READ, 1, nferr)
+      end if
       if (nferr /= MPAS_STREAM_NOERR) then
          write(0,*) ' '
          if (input_obj % stream == STREAM_RESTART) then

Modified: branches/cam_mpas_nh/src/framework/mpas_io_output.F
===================================================================
--- branches/cam_mpas_nh/src/framework/mpas_io_output.F        2012-06-06 17:06:53 UTC (rev 1968)
+++ branches/cam_mpas_nh/src/framework/mpas_io_output.F        2012-06-06 17:10:44 UTC (rev 1969)
@@ -249,7 +249,11 @@
       integer :: nferr, ierr
       integer, dimension(10) :: dimlist
  
-      call MPAS_createStream(output_obj % io_stream, trim(output_obj % filename), MPAS_IO_PNETCDF, MPAS_IO_WRITE, 1, nferr)
+      if (trim(config_pio_format) == 'pnetcdf') then
+         call MPAS_createStream(output_obj % io_stream, trim(output_obj % filename), MPAS_IO_PNETCDF, MPAS_IO_WRITE, 1, nferr)
+      else
+         call MPAS_createStream(output_obj % io_stream, trim(output_obj % filename), MPAS_IO_NETCDF, MPAS_IO_WRITE, 1, nferr)
+      end if
 
 #include &quot;add_output_fields.inc&quot;
 

</font>
</pre>