<p><b>laura@ucar.edu</b> 2013-03-12 11:59:39 -0600 (Tue, 12 Mar 2013)</p><p>Corrected the calculation of the diurnal variation of the sea-surface temperature when config_sstdiurn_update is set to .true.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/atmos_physics/src/core_atmos_physics/mpas_atmphys_update_surface.F
===================================================================
--- branches/atmos_physics/src/core_atmos_physics/mpas_atmphys_update_surface.F        2013-03-12 17:56:42 UTC (rev 2588)
+++ branches/atmos_physics/src/core_atmos_physics/mpas_atmphys_update_surface.F        2013-03-12 17:59:39 UTC (rev 2589)
@@ -239,22 +239,25 @@
  real(kind=RKIND):: fs, con1, con2, con3, con4, con5, zlan, q2, ts, phi, qn1
  real(kind=RKIND):: usw, qo, swo, us, tb, dtc, dtw, alw, dtwo, delt, f1
 
- real(kind=RKIND),dimension(:),pointer:: tsk,xland
+ real(kind=RKIND),dimension(:),pointer:: sst,tsk,xland
  real(kind=RKIND),dimension(:),pointer:: glw,gsw
- real(kind=RKIND),dimension(:),pointer:: hfx,qfx,sstsk
- real(kind=RKIND),dimension(:),pointer:: dtw1,emiss,ust
+ real(kind=RKIND),dimension(:),pointer:: hfx,qfx
+ real(kind=RKIND),dimension(:),pointer:: emiss,ust
+ real(kind=RKIND),dimension(:),pointer:: sstsk,dtc1,dtw1
 
 !---------------------------------------------------------------------------------------------
-!write(0,*)
-!write(0,*) '--- enter subroutine physics_update_sstskin:'
+ write(0,*)
+ write(0,*) '--- enter subroutine physics_update_sstskin:'
 
  nCellsSolve = mesh % nCellsSolve
 
  tsk   =&gt; sfc_input % skintemp % array
+ sst   =&gt; sfc_input % sst      % array
  xland =&gt; sfc_input % xland    % array
 
- dtw1  =&gt; diag_physics % sstsk_diur % array
  sstsk =&gt; diag_physics % sstsk      % array
+ dtc1  =&gt; diag_physics % sstsk_dtc  % array
+ dtw1  =&gt; diag_physics % sstsk_dtw  % array
  emiss =&gt; diag_physics % sfc_emiss  % array
  glw   =&gt; diag_physics % glw        % array
  gsw   =&gt; diag_physics % gsw        % array
@@ -265,8 +268,14 @@
  skinmax = -9999.
  skinmin =  9999.
 
+!first, restore the surface temperature to the sea-surface temperature:
  do iCell = 1, nCellsSolve
+    if(xland(iCell) .ge. 1.5) tsk(iCell) = sst(iCell)
+ enddo
 
+!calculate the skin sea-surface temperature: 
+ do iCell = 1, nCellsSolve
+
     if(xland(iCell) .ge. 1.5) then
 
        qo   = glw(iCell)-emiss(iCell)*stbolt*(sstsk(iCell)**4)-2.5e6*qfx(iCell)-hfx(iCell)
@@ -327,19 +336,20 @@
        skinmax = amax1(skinmax,ts-tb)
        skinmin = amin1(skinmin,ts-tb)
        sstsk(iCell) = ts+273.15                ! convert ts (in C) to sstsk (in K)
+       dtc1(iCell)  = dtc                      ! dtc always in C
        dtw1(iCell)  = dtw                      ! dtw always in C
 
     endif
 
  enddo
 
-!update the skin temperature:
+!update the surface temperature over the oceans:
  do iCell = 1, nCellsSolve
     if(xland(iCell) .gt. 1.5) tsk(iCell) = sstsk(iCell)
  enddo
 
- write(0,*) 'check skin sst skinmax = ', skinmax, '  skinmin = ', skinmin

+ write(0,*) 'check skin sst skinmax = ', skinmax
+ write(0,*) 'check skin sst skinmin = ', skinmin
 
  end subroutine physics_update_sstskin
 

</font>
</pre>