<p><b>mpetersen@lanl.gov</b> 2012-04-27 15:47:38 -0600 (Fri, 27 Apr 2012)</p><p>BRANCH COMMIT monthly_forcing<br>
<br>
This version now reads in files correctly.  With 12 monthly fields<br>
identical to yearly forcing, I get bit-for-bit match to old yearly<br>
forced run for 120km.  The problem was that the variable parsed <br>
among processors must be LAST in the Registry file:<br>
<br>
WRONG:   surfaceWindStressMonthly ( nEdges nMonths )<br>
CORRECT: surfaceWindStressMonthly ( nMonths nEdges )<br>
<br>
In the first case, mpas produces the error<br>
MPAS IO Error: Inconsistent redefinition of dimension<br>
and ignores that variable for i/o purposes.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/monthly_forcing/src/core_ocean/Registry
===================================================================
--- branches/ocean_projects/monthly_forcing/src/core_ocean/Registry        2012-04-27 21:09:34 UTC (rev 1832)
+++ branches/ocean_projects/monthly_forcing/src/core_ocean/Registry        2012-04-27 21:47:38 UTC (rev 1833)
@@ -207,9 +207,9 @@
 var persistent real    salinityRestore ( nCells ) 0 iro salinityRestore mesh - -
 
 % mrp trying to figure out why these do not appear
-var persistent real    surfaceWindStressMonthly ( nEdges nMonths ) 0 iro surfaceWindStressMonthly mesh - -
-var persistent real    temperatureRestoreMonthly ( nCells nMonths ) 0 iro temperatureRestoreMonthly mesh - -
-var persistent real    salinityRestoreMonthly ( nCells nMonths ) 0 iro salinityRestoreMonthly mesh - -
+var persistent real    windStressMonthly ( nMonths nEdges ) 0 iro windStressMonthly mesh - -
+var persistent real    temperatureRestoreMonthly ( nMonths nCells ) 0 iro temperatureRestoreMonthly mesh - -
+var persistent real    salinityRestoreMonthly ( nMonths nCells ) 0 iro salinityRestoreMonthly mesh - -
 
 % Prognostic variables: read from input, saved in restart, and written to output
 var persistent real    u ( nVertLevels nEdges Time ) 2 ir u state - -

Modified: branches/ocean_projects/monthly_forcing/src/core_ocean/mpas_ocn_monthly_forcing.F
===================================================================
--- branches/ocean_projects/monthly_forcing/src/core_ocean/mpas_ocn_monthly_forcing.F        2012-04-27 21:09:34 UTC (rev 1832)
+++ branches/ocean_projects/monthly_forcing/src/core_ocean/mpas_ocn_monthly_forcing.F        2012-04-27 21:47:38 UTC (rev 1833)
@@ -99,7 +99,7 @@
 
       real (kind=RKIND), dimension(:,:), pointer :: temperatureRestoreMonthly 
       real (kind=RKIND), dimension(:,:), pointer :: salinityRestoreMonthly 
-      real (kind=RKIND), dimension(:,:), pointer :: surfaceWindStressMonthly 
+      real (kind=RKIND), dimension(:,:), pointer :: windStressMonthly 
       real (kind=RKIND), dimension(:), pointer :: temperatureRestore 
       real (kind=RKIND), dimension(:), pointer :: salinityRestore 
       real (kind=RKIND), dimension(:,:), pointer :: u_src
@@ -121,7 +121,7 @@
 
       temperatureRestoreMonthly =&gt; grid % temperatureRestoreMonthly % array
       salinityRestoreMonthly =&gt; grid % salinityRestoreMonthly % array
-      surfaceWindStressMonthly =&gt; grid % surfaceWindStressMonthly % array
+      windStressMonthly =&gt; grid % windStressMonthly % array
 
       call mpas_get_time(timeStamp, MM = iMonth, DD = iDayInMonth, ierr = ierr)
 
@@ -134,29 +134,21 @@
 
       do iCell=1,nCells
         ! Interpolate between iMonth and iMonthP1 records, using iDayInMonth
-        data = temperatureRestoreMonthly(iCell,iMonth)
-        dataP1 = temperatureRestoreMonthly(iCell,iMonthP1)
+        data = temperatureRestoreMonthly(iMonth,iCell)
+        dataP1 = temperatureRestoreMonthly(iMonthP1,iCell)
         temperatureRestore(iCell) = data * weight + dataP1 * weightP1
-        data = salinityRestoreMonthly(iCell,iMonth)
-        dataP1 = salinityRestoreMonthly(iCell,iMonthP1)
+        data = salinityRestoreMonthly(iMonth,iCell)
+        dataP1 = salinityRestoreMonthly(iMonthP1,iCell)
         salinityRestore(iCell) = data * weight + dataP1 * weightP1
       end do
 
       do iEdge=1,nEdges
         ! Interpolate between iMonth and iMonthP1 records, using iDayInMonth
-        data = surfaceWindStressMonthly(iEdge,iMonth)
-        dataP1 = surfaceWindStressMonthly(iEdge,iMonthP1)
+        data = windStressMonthly(iMonth,iEdge)
+        dataP1 = windStressMonthly(iMonthP1,iEdge)
         u_src(1,iEdge) = data * weight + dataP1 * weightP1
       end do
 
-! mrp testing
-print *, 'weight, weightP1,iMonth, iMonthP1,iDayInMonth,nMonths',weight, weightP1,iMonth, iMonthP1,iDayInMonth,nMonths
- do iMonth = 1,12
-   iMonthP1 = mod(iMonth, nMonths) +1
-   print '(a,2i3,100f6.2)','tMo',iMonth,iMonthP1,temperatureRestoreMonthly(1:10,iMonth)
- enddo
-
-
    !--------------------------------------------------------------------
 
    end subroutine ocn_build_forcing_arrays!}}}

Modified: branches/ocean_projects/monthly_forcing/src/core_ocean/mpas_ocn_restoring.F
===================================================================
--- branches/ocean_projects/monthly_forcing/src/core_ocean/mpas_ocn_restoring.F        2012-04-27 21:09:34 UTC (rev 1832)
+++ branches/ocean_projects/monthly_forcing/src/core_ocean/mpas_ocn_restoring.F        2012-04-27 21:47:38 UTC (rev 1833)
@@ -137,11 +137,6 @@
 
       enddo
 
-! mrp testing
-print '(a,100f6.2)','tR ',temperatureRestore(1:10)
-print '(a,100f6.2)','sR ',salinityRestore(1:10)
-
-
    !--------------------------------------------------------------------
 
    end subroutine ocn_restoring_tend!}}}

Modified: branches/ocean_projects/monthly_forcing/src/framework/mpas_io.F
===================================================================
--- branches/ocean_projects/monthly_forcing/src/framework/mpas_io.F        2012-04-27 21:09:34 UTC (rev 1832)
+++ branches/ocean_projects/monthly_forcing/src/framework/mpas_io.F        2012-04-27 21:47:38 UTC (rev 1833)
@@ -435,6 +435,7 @@
       do while (associated(dim_cursor))
          if (trim(dimname) == trim(dim_cursor % dimhandle % dimname)) then
             if (dimsize /= dim_cursor % dimhandle % dimsize) then
+ print *, 'dimsize dim_cursor % dimhandle % dimsize',dimsize, dim_cursor % dimhandle % dimsize
                if (present(ierr)) ierr = MPAS_IO_ERR_REDEF_DIM
             end if
             return

</font>
</pre>