<p><b>mhoffman@lanl.gov</b> 2012-08-01 08:46:05 -0600 (Wed, 01 Aug 2012)</p><p>BRANCH COMMIT - land ice<br>
Fixes for restarts for the ice2sea elevation feedback experiments.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/land_ice_projects/ice2sea_elev_feedback/src/core_land_ice/mpas_land_ice_annual_forcing.F
===================================================================
--- branches/land_ice_projects/ice2sea_elev_feedback/src/core_land_ice/mpas_land_ice_annual_forcing.F        2012-07-31 13:31:48 UTC (rev 2074)
+++ branches/land_ice_projects/ice2sea_elev_feedback/src/core_land_ice/mpas_land_ice_annual_forcing.F        2012-08-01 14:46:05 UTC (rev 2075)
@@ -41,7 +41,7 @@
! Private module variables
!
!--------------------------------------------------------------------
- integer :: iYearPrevious, smb_counter
+ integer :: iYearPrevious
!***********************************************************************
@@ -58,7 +58,6 @@
subroutine land_ice_assign_annual_forcing_init()
iYearPrevious = -999
- smb_counter = 0
end subroutine land_ice_assign_annual_forcing_init
@@ -112,7 +111,7 @@
!-----------------------------------------------------------------
real (kind=RKIND), dimension(:,:), pointer :: sfcMassBalTimeSeries, sfcAirTempTimeSeries, betaTimeSeries, basalHeatFluxTimeSeries, SMB_adjusted10
real (kind=RKIND), dimension(:), pointer :: sfcMassBal, sfcAirTemp, beta, basalHeatFlux, SMB_reference
- integer :: iYear, ierr, nCells, i
+ integer :: iYear, ierr, nCells, i, smb_counter
real b
@@ -175,7 +174,7 @@
enddo
! Calculate new SMB reference value
- smb_counter = smb_counter + 1
+ smb_counter = iYear ! THIS ASSUMES THAT YOU START FROM YEAR 0
if( smb_counter <= 10 )then
SMB_adjusted10(smb_counter,:) = sfcMassBal ! if less then first 10 yrs, keep storing
SMB_reference = sum( SMB_adjusted10, dim=1) / real(smb_counter)
Modified: branches/land_ice_projects/ice2sea_elev_feedback/src/core_land_ice/mpas_land_ice_mpas_core.F
===================================================================
--- branches/land_ice_projects/ice2sea_elev_feedback/src/core_land_ice/mpas_land_ice_mpas_core.F        2012-07-31 13:31:48 UTC (rev 2074)
+++ branches/land_ice_projects/ice2sea_elev_feedback/src/core_land_ice/mpas_land_ice_mpas_core.F        2012-08-01 14:46:05 UTC (rev 2075)
@@ -220,8 +220,10 @@
call mpas_timer_stop("initial velocity calculation")
- ! ice2sea - make a copy of the initial upper Surface field
- mesh % upperSurfaceIC % array = state % upperSurface % array
+ ! ice2sea - make a copy of the initial upper Surface field - only do this on initial start - don't do it on a restart because it will be read in from the restart file.
+ if (maxval(mesh % upperSurfaceIC % array) .eq. 0) then
+ mesh % upperSurfaceIC % array = state % upperSurface % array
+ endif
if(err == 1) then
</font>
</pre>