<p><b>mpetersen@lanl.gov</b> 2012-04-27 14:47:21 -0600 (Fri, 27 Apr 2012)</p><p>BRANCH COMMIT, monthly_forcing: This version compiles but does not read in the monthly forcing fields from the netcdf file correctly.  I still get an error MPAS IO Error: Inconsistent redefinition of dimension.<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 20:30:47 UTC (rev 1830)
+++ branches/ocean_projects/monthly_forcing/src/core_ocean/Registry        2012-04-27 20:47:21 UTC (rev 1831)
@@ -82,10 +82,10 @@
 namelist real      advection config_coef_3rd_order      0.25
 namelist logical   advection config_monotonic           false
 namelist logical   advection config_check_monotonicity  false
-namelist logical   forcing   config_restoreTS           false
-namelist real      forcing   config_restoreT_timescale  90.0
-namelist real      forcing   config_restoreS_timescale  90.0
-namelist logical   forcing   config_use_monthly_forcing false
+namelist logical   restore   config_restoreTS           false
+namelist real      restore   config_restoreT_timescale  90.0
+namelist real      restore   config_restoreS_timescale  90.0
+namelist logical   restore   config_use_monthly_forcing false
 
 %
 % dim  type  name_in_file  name_in_code
@@ -103,7 +103,7 @@
 dim vertexDegree vertexDegree
 dim nVertLevels nVertLevels
 dim nVertLevelsP1 nVertLevels+1
-dim nMonths 12
+dim nMonths nMonths
 
 %
 % var persistence type  name_in_file  ( dims )  time_levs iro-  name_in_code struct super-array array_class
@@ -202,13 +202,15 @@
 var persistent integer edgeMask ( nVertLevels nEdges ) 0 o edgeMask mesh - -
 var persistent integer vertexMask ( nVertLevels nVertices ) 0 o vertexMask mesh - -
 var persistent integer cellMask ( nVertLevels nCells ) 0 o cellMask mesh - -
-var persistent real    u_src ( nVertLevels nEdges ) 0 ir u_src mesh - -
-var persistent real    temperatureRestore ( nCells ) 0 ir temperatureRestore mesh - -
-var persistent real    salinityRestore ( nCells ) 0 ir salinityRestore mesh - -
-var persistent real    u_src_monthly ( nVertLevels nEdges nMonths ) 0 ir u_src_monthly mesh - -
-var persistent real    temperatureRestoreMonthly ( nCells nMonths ) 0 ir temperatureRestoreMonthly mesh - -
-var persistent real    salinityRestoreMonthly ( nCells nMonths ) 0 ir salinityRestoreMonthly mesh - -
+var persistent real    u_src ( nVertLevels nEdges ) 0 iro u_src mesh - -
+var persistent real    temperatureRestore ( nCells ) 0 iro temperatureRestore mesh - -
+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 - -
+
 % Prognostic variables: read from input, saved in restart, and written to output
 var persistent real    u ( nVertLevels nEdges Time ) 2 ir u state - -
 var persistent real    h ( nVertLevels nCells Time ) 2 iro h state - -
@@ -296,5 +298,5 @@
 var persistent real    acc_uReconstructMeridional ( nVertLevels nCells Time ) 2 o acc_uReconstructMeridional state - -
 var persistent real    acc_uReconstructZonalVar ( nVertLevels nCells Time ) 2 o acc_uReconstructZonalVar state - -
 var persistent real    acc_uReconstructMeridionalVar ( nVertLevels nCells Time ) 2 o acc_uReconstructMeridionalVar state - -
-var persistent real           acc_u ( nVertLevels nEdges Time ) 2 o acc_u state - -
-var persistent real           acc_uVar ( nVertLevels nEdges Time ) 2 o acc_uVar state - -
+var persistent real    acc_u ( nVertLevels nEdges Time ) 2 o acc_u state - -
+var persistent real    acc_uVar ( nVertLevels nEdges Time ) 2 o acc_uVar 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 20:30:47 UTC (rev 1830)
+++ branches/ocean_projects/monthly_forcing/src/core_ocean/mpas_ocn_monthly_forcing.F        2012-04-27 20:47:21 UTC (rev 1831)
@@ -99,10 +99,10 @@
 
       real (kind=RKIND), dimension(:,:), pointer :: temperatureRestoreMonthly 
       real (kind=RKIND), dimension(:,:), pointer :: salinityRestoreMonthly 
-      real (kind=RKIND), dimension(:,:,:), pointer :: windStressMonthly 
+      real (kind=RKIND), dimension(:,:), pointer :: surfaceWindStressMonthly 
       real (kind=RKIND), dimension(:), pointer :: temperatureRestore 
       real (kind=RKIND), dimension(:), pointer :: salinityRestore 
-      real (kind=RKIND), dimension(:,:), pointer :: windStress 
+      real (kind=RKIND), dimension(:,:), pointer :: u_src
       integer :: iCell, iEdge, nCells, nEdges, nMonths, k
       integer :: iMonth, iMonthP1, iDayInMonth, ierr
       real (kind=RKIND) :: data, dataP1, weight, weightP1
@@ -117,11 +117,11 @@
 
       temperatureRestore =&gt; grid % temperatureRestore % array
       salinityRestore =&gt; grid % salinityRestore % array
-      windStress =&gt; grid % u_src % array
+      u_src =&gt; grid % u_src % array
 
       temperatureRestoreMonthly =&gt; grid % temperatureRestoreMonthly % array
       salinityRestoreMonthly =&gt; grid % salinityRestoreMonthly % array
-      windStressMonthly =&gt; grid % u_src_monthly % array
+      surfaceWindStressMonthly =&gt; grid % surfaceWindStressMonthly % array
 
       call mpas_get_time(timeStamp, MM = iMonth, DD = iDayInMonth, ierr = ierr)
 
@@ -144,11 +144,19 @@
 
       do iEdge=1,nEdges
         ! Interpolate between iMonth and iMonthP1 records, using iDayInMonth
-        data = windStressMonthly(1,iEdge,iMonth)
-        dataP1 = windStressMonthly(1,iEdge,iMonthP1)
-        windStress(1,iEdge) = data * weight + dataP1 * weightP1
+        data = surfaceWindStressMonthly(iEdge,iMonth)
+        dataP1 = surfaceWindStressMonthly(iEdge,iMonthP1)
+        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 20:30:47 UTC (rev 1830)
+++ branches/ocean_projects/monthly_forcing/src/core_ocean/mpas_ocn_restoring.F        2012-04-27 20:47:21 UTC (rev 1831)
@@ -137,6 +137,11 @@
 
       enddo
 
+! mrp testing
+print '(a,100f6.2)','tR ',temperatureRestore(1:10)
+print '(a,100f6.2)','sR ',salinityRestore(1:10)
+
+
    !--------------------------------------------------------------------
 
    end subroutine ocn_restoring_tend!}}}

</font>
</pre>