<p><b>dwj07@fsu.edu</b> 2012-12-18 15:32:41 -0700 (Tue, 18 Dec 2012)</p><p><br>
        -- BRANCH COMMIT --<br>
<br>
        Fixing bugs.<br>
        Now runs on bluefire with coupling.<br>
        Coupling has not been verified to be correct yet.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/generic_forcing/src/Makefile.in.CESM_OCN
===================================================================
--- branches/ocean_projects/generic_forcing/src/Makefile.in.CESM_OCN        2012-12-18 20:56:51 UTC (rev 2360)
+++ branches/ocean_projects/generic_forcing/src/Makefile.in.CESM_OCN        2012-12-18 22:32:41 UTC (rev 2361)
@@ -20,10 +20,10 @@
         CPPFLAGS="$(CPPFLAGS)" CPPINCLUDES="$(CPPINCLUDES)" FCINCLUDES="$(FCINCLUDES)" )
mpas: reg_includes externals frame ops dycore drver
-        ar ru lib$(CORE).a framework/*.o
-        ar ru lib$(CORE).a operators/*.o
-        ar ru lib$(CORE).a core_$(CORE)/*.o
-        ar ru lib$(CORE).a $(CORE)_cesm_driver/*.o
+        ar ru libocn.a framework/*.o
+        ar ru libocn.a operators/*.o
+        ar ru libocn.a core_$(CORE)/*.o
+        ar ru libocn.a $(CORE)_cesm_driver/*.o
externals:
Modified: branches/ocean_projects/generic_forcing/src/core_ocean/Makefile
===================================================================
--- branches/ocean_projects/generic_forcing/src/core_ocean/Makefile        2012-12-18 20:56:51 UTC (rev 2360)
+++ branches/ocean_projects/generic_forcing/src/core_ocean/Makefile        2012-12-18 22:32:41 UTC (rev 2361)
@@ -79,7 +79,7 @@
mpas_ocn_time_integration_split.o:
-mpas_ocn_tendency.o: mpas_ocn_time_average.o
+mpas_ocn_tendency.o: mpas_ocn_time_average.o mpas_ocn_tracer_short_wave_absorption.o
mpas_ocn_global_diagnostics.o:
Modified: branches/ocean_projects/generic_forcing/src/core_ocean/Registry
===================================================================
--- branches/ocean_projects/generic_forcing/src/core_ocean/Registry        2012-12-18 20:56:51 UTC (rev 2360)
+++ branches/ocean_projects/generic_forcing/src/core_ocean/Registry        2012-12-18 22:32:41 UTC (rev 2361)
@@ -119,7 +119,7 @@
dim vertexDegree vertexDegree
dim nVertLevels nVertLevels
dim nVertLevelsP1 nVertLevels+1
-dim nForcing nForcing
+dim nForcing 1
%
% var persistence type name_in_file ( dims ) time_levs iro- name_in_code struct super-array array_class
@@ -221,12 +221,12 @@
var persistent integer cellMask ( nVertLevels nCells ) 0 o cellMask mesh - -
% Forcing variables.
-var persistent real windStress ( nVertLevels nEdges ) 0 ir windStress mesh - -
-var persistent real temperatureRestore ( nCells ) 0 ir temperatureRestore mesh - -
-var persistent real salinityRestore ( nCells ) 0 ir salinityRestore mesh - -
-var persistent real windStressInput ( nForcing nEdges ) 0 ir windStressInput mesh - -
-var persistent real temperatureRestoreInput ( nForcing nCells ) 0 ir temperatureRestoreInput mesh - -
-var persistent real salinityRestoreInput ( nForcing nCells ) 0 ir salinityRestoreInput mesh - -
+var persistent real windStress ( nVertLevels nEdges ) 0 - windStress mesh - -
+var persistent real temperatureRestore ( nCells ) 0 - temperatureRestore mesh - -
+var persistent real salinityRestore ( nCells ) 0 - salinityRestore mesh - -
+var persistent real windStressInput ( nForcing nEdges ) 0 - windStressInput mesh - -
+var persistent real temperatureRestoreInput ( nForcing nCells ) 0 - temperatureRestoreInput mesh - -
+var persistent real salinityRestoreInput ( nForcing nCells ) 0 - salinityRestoreInput mesh - -
% Prognostic variables: read from input, saved in restart, and written to output
var persistent real u ( nVertLevels nEdges Time ) 2 ir u state - -
@@ -330,7 +330,7 @@
var persistent integer kiteIndexOnCell ( maxEdges nCells ) 0 - kiteIndexOnCell mesh - -
% Surface flux fields, for coupled runs
-var persistent real surfaceMassFlux ( nCells ) 0 - surfaceMassFlux mesh - forcing
+var persistent real surfaceMassFlux ( nCells ) 0 - surfaceMassFlux mesh - -
var persistent real temperatureFlux ( nCells ) 0 - temperatureFlux mesh surfaceTracerFlux forcing
var persistent real salinityFlux ( nCells ) 0 - salinityFlux mesh surfaceTracerFlux forcing
var persistent real tracer1Flux ( nCells ) 0 - tracer1Flux mesh surfaceTracerFlux forcing
Modified: branches/ocean_projects/generic_forcing/src/core_ocean/mpas_ocn_constants.F
===================================================================
--- branches/ocean_projects/generic_forcing/src/core_ocean/mpas_ocn_constants.F        2012-12-18 20:56:51 UTC (rev 2360)
+++ branches/ocean_projects/generic_forcing/src/core_ocean/mpas_ocn_constants.F        2012-12-18 22:32:41 UTC (rev 2361)
@@ -123,9 +123,6 @@
#ifdef MPAS_CESM
T0_Kelvin = SHR_CONST_TKFRZ ! zero point for Celsius
- grav = SHR_CONST_G ! m/s^2
- omega = SHR_CONST_OMEGA ! rad/s
- radius = SHR_CONST_REARTH ! m
cp_sw = SHR_CONST_CPSW ! erg/g/K
cp_air = SHR_CONST_CPDAIR ! J/kg/K
rho_air = SHR_CONST_RHODAIR ! kg/m^3
Modified: branches/ocean_projects/generic_forcing/src/core_ocean/mpas_ocn_forcing_coupled.F
===================================================================
--- branches/ocean_projects/generic_forcing/src/core_ocean/mpas_ocn_forcing_coupled.F        2012-12-18 20:56:51 UTC (rev 2360)
+++ branches/ocean_projects/generic_forcing/src/core_ocean/mpas_ocn_forcing_coupled.F        2012-12-18 22:32:41 UTC (rev 2361)
@@ -99,22 +99,22 @@
!-----------------------------------------------------------------
integer :: iEdge, cell1, cell2
- integer :: iCell
+ integer :: iCell, k
integer :: index_temperature_flux, index_salinity_flux
integer, dimension(:,:), pointer :: cellsOnEdge
- real :: meridionalAverage, zonalAverage
- real, dimension(:), pointer :: windStress, angleEdge
- real, dimension(:), pointer :: zonalWindStress, meridionalWindStress
- real, dimension(:), pointer :: latentHeatFlux, sensibleHeatFlux, longWaveHeatFluxUp, longWaveHeatFluxDown, evaportationFlux, seaIceHeatFlux, snowFlux
- real, dimension(:), pointer :: seaIceFreshWaterFlux, seaIceSalinityFlux, riverRunoffFlux, iceRunoffFlux
+ real (kind=RKIND) :: meridionalAverage, zonalAverage
+ real (kind=RKIND), dimension(:), pointer :: angleEdge
+ real (kind=RKIND), dimension(:), pointer :: zonalWindStress, meridionalWindStress
+ real (kind=RKIND), dimension(:), pointer :: latentHeatFlux, sensibleHeatFlux, longWaveHeatFluxUp, longWaveHeatFluxDown, evaporationFlux, seaIceHeatFlux, snowFlux
+ real (kind=RKIND), dimension(:), pointer :: seaIceFreshWaterFlux, seaIceSalinityFlux, riverRunoffFlux, iceRunoffFlux
- real, dimension(:), pointer :: rainFlux
- real, dimension(:), pointer :: seaLevelPressure, iceFraction
+ real (kind=RKIND), dimension(:), pointer :: rainFlux
+ real (kind=RKIND), dimension(:), pointer :: seaLevelPressure, iceFraction
- real, dimension(:), pointer :: surfaceMassFlux
- real, dimension(:,:), pointer :: surfaceTracerFlux
+ real (kind=RKIND), dimension(:), pointer :: surfaceMassFlux
+ real (kind=RKIND), dimension(:,:), pointer :: surfaceTracerFlux, windStress
#ifdef MPAS_CESM
@@ -144,7 +144,7 @@
rainFlux => grid % rainFlux % array
seaLevelPressure => grid % seaLevelPressure % array
- iceFraction => grid % iceFration % array
+ iceFraction => grid % iceFraction % array
surfaceMassFlux => grid % surfaceMassFlux % array
surfaceTracerFlux => grid % surfaceTracerFlux % array
@@ -157,7 +157,7 @@
zonalAverage = 0.5 * (zonalWindStress(cell1) + zonalWindStress(cell2))
meridionalAverage = 0.5 * (meridionalWindStress(cell1) + meridionalWindStress(cell2))
- windStress(iEdge) = cos(angleEdge(iEdge)) * zonalAverage + sin(angleEdge(iEdge)) * meridionalAverage
+ windStress(k, iEdge) = cos(angleEdge(iEdge)) * zonalAverage + sin(angleEdge(iEdge)) * meridionalAverage
end do
@@ -169,7 +169,7 @@
+ seaIceHeatFlux(iCell) - (snowFlux(iCell) + iceRunoffFlux(iCell)) * latent_heat_fusion_mks) * hflux_factor
if(config_use_virtual_salinity_flux) then
- surfaceTracerFlux(index_salinity_flux, iCell) = (rainFlux(iCell) + snowFlux(iCell) + evaportationFlux(iCell) + seaIceFreshWaterFlux(iCell) + riverRunoffFlux(iCell) + iceRunOffFlux(iCell)) * salinity_factor &
+ surfaceTracerFlux(index_salinity_flux, iCell) = (rainFlux(iCell) + snowFlux(iCell) + evaporationFlux(iCell) + seaIceFreshWaterFlux(iCell) + riverRunoffFlux(iCell) + iceRunOffFlux(iCell)) * salinity_factor &
+ seaIceSalinityFlux(iCell) * sflux_factor
surfaceMassFlux(iCell) = 0.0_RKIND
else
Modified: branches/ocean_projects/generic_forcing/src/core_ocean/mpas_ocn_forcing_monthly.F
===================================================================
--- branches/ocean_projects/generic_forcing/src/core_ocean/mpas_ocn_forcing_monthly.F        2012-12-18 20:56:51 UTC (rev 2360)
+++ branches/ocean_projects/generic_forcing/src/core_ocean/mpas_ocn_forcing_monthly.F        2012-12-18 22:32:41 UTC (rev 2361)
@@ -113,7 +113,8 @@
nCells = grid % nCells
nEdges = grid % nEdges
- nForcing = grid % nForcing
+! nForcing = grid % nForcing
+ nForcing = 1
temperatureRestore => grid % temperatureRestore % array
salinityRestore => grid % salinityRestore % array
Modified: branches/ocean_projects/generic_forcing/src/core_ocean/mpas_ocn_tendency.F
===================================================================
--- branches/ocean_projects/generic_forcing/src/core_ocean/mpas_ocn_tendency.F        2012-12-18 20:56:51 UTC (rev 2360)
+++ branches/ocean_projects/generic_forcing/src/core_ocean/mpas_ocn_tendency.F        2012-12-18 22:32:41 UTC (rev 2361)
@@ -38,6 +38,7 @@
use ocn_tracer_vadv
use ocn_tracer_hmix
use ocn_tracer_surface_flux
+ use ocn_tracer_short_wave_absorption
use ocn_restoring
use ocn_equation_of_state
@@ -389,7 +390,7 @@
#ifdef MPAS_CESM
call mpas_timer_start("short wave", .false.)
- call ocn_tracer_short_wave_absorption_tend(grid, tend_tr % index_temperature, h, shortWaveHeatFlux, tend_tr, err)
+ call ocn_tracer_short_wave_absorption_tend(grid, s % index_temperature, h, shortWaveHeatFlux, tend_tr, err)
call mpas_timer_stop("short wave")
#endif
Modified: branches/ocean_projects/generic_forcing/src/core_ocean/mpas_ocn_tracer_short_wave_absorption.F
===================================================================
--- branches/ocean_projects/generic_forcing/src/core_ocean/mpas_ocn_tracer_short_wave_absorption.F        2012-12-18 20:56:51 UTC (rev 2360)
+++ branches/ocean_projects/generic_forcing/src/core_ocean/mpas_ocn_tracer_short_wave_absorption.F        2012-12-18 22:32:41 UTC (rev 2361)
@@ -73,7 +73,7 @@
type (mesh_type), intent(in) :: &
grid !< Input: grid information
- real (kind=RKIND), dimension(:,:), intent(in) :: &
+ real (kind=RKIND), dimension(:), intent(in) :: &
shortWaveHeatFlux !< Input: short wave heat flux
real (kind=RKIND), dimension(:,:), intent(in) :: h !< Input: Layer thicknesses
@@ -106,7 +106,7 @@
err = 0
if(useJerlov) then
- call mpas_ocn_tracer_short_wave_absorption_jerlov_tend(grid, index_temperature, h, shortWaveHeatFlux, tend, err)
+ call ocn_tracer_short_wave_absorption_jerlov_tend(grid, index_temperature, h, shortWaveHeatFlux, tend, err)
end if
!--------------------------------------------------------------------
@@ -142,7 +142,7 @@
return
else if(trim(config_sw_absorption_type) == 'jerlov') then
useJerlov = .true.
- call mpas_ocn_tracer_short_wave_absorption_jerlov_init(err)
+ call ocn_tracer_short_wave_absorption_jerlov_init(err)
end if
Modified: branches/ocean_projects/generic_forcing/src/core_ocean/mpas_ocn_tracer_short_wave_absorption_jerlov.F
===================================================================
--- branches/ocean_projects/generic_forcing/src/core_ocean/mpas_ocn_tracer_short_wave_absorption_jerlov.F        2012-12-18 20:56:51 UTC (rev 2360)
+++ branches/ocean_projects/generic_forcing/src/core_ocean/mpas_ocn_tracer_short_wave_absorption_jerlov.F        2012-12-18 22:32:41 UTC (rev 2361)
@@ -177,13 +177,10 @@
!
!-----------------------------------------------------------------------
- subroutine ocn_tracer_short_wave_absorption_jerlov_init(grid, err)!{{{
+ subroutine ocn_tracer_short_wave_absorption_jerlov_init(err)!{{{
!--------------------------------------------------------------------
- type (mesh_type), intent(in) :: &
- grid !< Input: grid information
-
integer, intent(out) :: err !< Output: error flag
err = 0
Modified: branches/ocean_projects/generic_forcing/src/ocean_cesm_driver/ocn_comp_mct.F
===================================================================
--- branches/ocean_projects/generic_forcing/src/ocean_cesm_driver/ocn_comp_mct.F        2012-12-18 20:56:51 UTC (rev 2360)
+++ branches/ocean_projects/generic_forcing/src/ocean_cesm_driver/ocn_comp_mct.F        2012-12-18 22:32:41 UTC (rev 2361)
@@ -994,7 +994,7 @@
!
!-----------------------------------------------------------------------
- errorCode = POP_Success
+ errorCode = 0
!-----------------------------------------------------------------------
!
@@ -1006,7 +1006,7 @@
n = 0
block_ptr => domain % blocklist
do while(associated(block_ptr))
- do i = block_ptr % mesh % nCellsSolve
+ do i = 1, block_ptr % mesh % nCellsSolve
n = n + 1
block_ptr % mesh % zonalWindStress % array(n) = x2o_o % rAttr(index_x2o_Foxx_taux, n)
block_ptr % mesh % meridionalWindStress % array(n) = x2o_o % rAttr(index_x2o_Foxx_tauy, n)
</font>
</pre>