<p><b>mhoffman@lanl.gov</b> 2012-03-15 16:11:29 -0600 (Thu, 15 Mar 2012)</p><p>BRANCH COMMIT<br>
Merging trunk into land_ice branch. Updated Registry for calendar type change.<br>
</p><hr noshade><pre><font color="gray">
Property changes on: branches/land_ice_projects/implement_core
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/cam_mpas_nh:1260-1270
/branches/ocean_projects/ale_split_exp:1437-1483
/branches/ocean_projects/ale_vert_coord:1225-1383
/branches/ocean_projects/ale_vert_coord_new:1387-1428
/branches/ocean_projects/gmvar:1214-1494
/branches/ocean_projects/imp_vert_mix_mrp:754-986
/branches/ocean_projects/split_explicit_mrp:1134-1138
/branches/ocean_projects/split_explicit_timestepping:1044-1097
/branches/ocean_projects/vert_adv_mrp:704-745
/branches/source_renaming:1082-1113
/branches/time_manager:924-962
+ /branches/cam_mpas_nh:1260-1270
/branches/ocean_projects/ale_split_exp:1437-1483
/branches/ocean_projects/ale_vert_coord:1225-1383
/branches/ocean_projects/ale_vert_coord_new:1387-1428
/branches/ocean_projects/gmvar:1214-1494
/branches/ocean_projects/imp_vert_mix_mrp:754-986
/branches/ocean_projects/monotonic_advection:1499-1640
/branches/ocean_projects/split_explicit_mrp:1134-1138
/branches/ocean_projects/split_explicit_timestepping:1044-1097
/branches/ocean_projects/vert_adv_mrp:704-745
/branches/source_renaming:1082-1113
/branches/time_manager:924-962
/trunk/mpas:1561-1651
Modified: branches/land_ice_projects/implement_core/Makefile
===================================================================
--- branches/land_ice_projects/implement_core/Makefile        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/Makefile        2012-03-15 22:11:29 UTC (rev 1652)
@@ -14,10 +14,10 @@
dummy:
-        ( make error )
+        ( $(MAKE) error )
xlf:
-        ( make all \
+        ( $(MAKE) all \
        "FC_PARALLEL = mpxlf90" \
        "CC_PARALLEL = mpcc" \
        "FC_SERIAL = xlf90" \
@@ -32,7 +32,7 @@
        "CPPFLAGS = $(MODEL_FORMULATION) $(FILE_OFFSET) $(ZOLTAN_DEFINE)" )
ftn:
-        ( make all \
+        ( $(MAKE) all \
        "FC_PARALLEL = ftn" \
        "CC_PARALLEL = cc" \
        "FC_SERIAL = ftn" \
@@ -47,7 +47,7 @@
        "CPPFLAGS = $(MODEL_FORMULATION) -DUNDERSCORE $(FILE_OFFSET) $(ZOLTAN_DEFINE)" )
pgi:
-        ( make all \
+        ( $(MAKE) all \
        "FC_PARALLEL = mpif90" \
        "CC_PARALLEL = mpicc" \
        "FC_SERIAL = pgf90" \
@@ -65,7 +65,7 @@
        "CPPFLAGS = $(MODEL_FORMULATION) -DUNDERSCORE $(FILE_OFFSET) $(ZOLTAN_DEFINE)" )
pgi-nersc:
-        ( make all \
+        ( $(MAKE) all \
        "FC_PARALLEL = ftn" \
        "CC_PARALLEL = cc" \
        "FC_SERIAL = ftn" \
@@ -80,7 +80,7 @@
        "CPPFLAGS = $(MODEL_FORMULATION) -DUNDERSCORE $(FILE_OFFSET) $(ZOLTAN_DEFINE)" )
pgi-llnl:
-        ( make all \
+        ( $(MAKE) all \
        "FC_PARALLEL = mpipgf90" \
        "CC_PARALLEL = pgcc" \
        "FC_SERIAL = pgf90" \
@@ -95,7 +95,7 @@
        "CPPFLAGS = $(MODEL_FORMULATION) -DUNDERSCORE $(FILE_OFFSET) $(ZOLTAN_DEFINE)" )
ifort:
-        ( make all \
+        ( $(MAKE) all \
        "FC_PARALLEL = mpif90" \
        "CC_PARALLEL = gcc" \
        "FC_SERIAL = ifort" \
@@ -113,7 +113,7 @@
        "CPPFLAGS = $(MODEL_FORMULATION) -DUNDERSCORE -m64 $(FILE_OFFSET) $(ZOLTAN_DEFINE)" )
gfortran:
-        ( make all \
+        ( $(MAKE) all \
        "FC_PARALLEL = mpif90" \
        "CC_PARALLEL = mpicc" \
        "FC_SERIAL = gfortran" \
@@ -131,7 +131,7 @@
        "CPPFLAGS = $(MODEL_FORMULATION) -DUNDERSCORE -m64 $(FILE_OFFSET) $(ZOLTAN_DEFINE)" )
g95:
-        ( make all \
+        ( $(MAKE) all \
        "FC_PARALLEL = mpif90" \
        "CC_PARALLEL = mpicc" \
        "FC_SERIAL = g95" \
@@ -146,7 +146,7 @@
        "CPPFLAGS = $(MODEL_FORMULATION) -DUNDERSCORE $(FILE_OFFSET) $(ZOLTAN_DEFINE)" )
pathscale-nersc:
-        ( make all \
+        ( $(MAKE) all \
        "FC_PARALLEL = ftn" \
        "CC_PARALLEL = cc" \
        "FC_SERIAL = ftn" \
@@ -161,7 +161,7 @@
        "CPPFLAGS = $(MODEL_FORMULATION) -DUNDERSCORE $(FILE_OFFSET) $(ZOLTAN_DEFINE)" )
cray-nersc:
-        ( make all \
+        ( $(MAKE) all \
        "FC_PARALLEL = ftn" \
        "CC_PARALLEL = cc" \
        "FC_SERIAL = ftn" \
@@ -176,7 +176,7 @@
        "CPPFLAGS = $(MODEL_FORMULATION) -DUNDERSCORE $(FILE_OFFSET) $(ZOLTAN_DEFINE)" )
intel-nersc:
-        ( make all \
+        ( $(MAKE) all \
        "FC_PARALLEL = ftn" \
        "CC_PARALLEL = cc" \
        "FC_SERIAL = ftn" \
@@ -227,9 +227,9 @@
        LDFLAGS=$(LDFLAGS_OPT)
        DEBUG_MESSAGE="Debug flags are not defined for this compile group. Defaulting to Optimized flags"
else # FFLAGS_DEBUG IF
-        FFLAGS=$(FFLAGS_DEBUG)
-        CFLAGS=$(CFLAGS_DEBUG)
-        LDFLAGS=$(LDFLAGS_DEBUG)
+        FFLAGS=$(FFLAGS_DEBUG) -DMPAS_DEBUG
+        CFLAGS=$(CFLAGS_DEBUG) -DMPAS_DEBUG
+        LDFLAGS=$(LDFLAGS_DEBUG) -DMPAS_DEBUG
        DEBUG_MESSAGE="Debugging is on."
endif # FFLAGS_DEBUG IF
@@ -264,10 +264,14 @@
        PAPI_MESSAGE="Papi libraries are off."
endif # USE_PAPI IF
+ifneq ($(wildcard $(NETCDF)/lib/libnetcdff.*), ) # CHECK FOR NETCDF4
+        LIBS += -lnetcdff
+endif # CHECK FOR NETCDF4
+
all: mpas_main
mpas_main:
-        cd src; make FC="$(FC)" \
+        cd src; $(MAKE) -j1 FC="$(FC)" \
CC="$(CC)" \
SFC="$(SFC)" \
SCC="$(SCC)" \
@@ -287,7 +291,7 @@
        @echo $(SERIAL_MESSAGE)
        @echo $(PAPI_MESSAGE)
clean:
-        cd src; make clean RM="$(RM)" CORE="$(CORE)"
+        cd src; $(MAKE) clean RM="$(RM)" CORE="$(CORE)"
        $(RM) $(CORE)_model.exe
error: errmsg
@@ -305,7 +309,7 @@
errmsg:
        @echo ""
-        @echo "Usage: make target CORE=[core] [options]"
+        @echo "Usage: $(MAKE) target CORE=[core] [options]"
        @echo ""
        @echo "Example targets:"
        @echo " ifort"
Modified: branches/land_ice_projects/implement_core/namelist.input.ocean
===================================================================
--- branches/land_ice_projects/implement_core/namelist.input.ocean        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/namelist.input.ocean        2012-03-15 22:11:29 UTC (rev 1652)
@@ -1,6 +1,6 @@
&sw_model
config_test_case = 0
- config_time_integration = 'RK4'
+ config_time_integration = 'split_explicit'
config_rk_filter_btr_mode = .false.
config_dt = 100.0
config_start_time = '0000-01-01_00:00:00'
@@ -76,9 +76,8 @@
&advection
config_vert_tracer_adv = 'stencil'
config_vert_tracer_adv_order = 2
- config_tracer_adv_order = 2
+ config_horiz_tracer_adv_order = 2
config_thickness_adv_order = 2
- config_positive_definite = .false.
config_monotonic = .false.
/
&restore
Property changes on: branches/land_ice_projects/implement_core/src
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src:1260-1270
/branches/ocean_projects/ale_split_exp/src:1437-1483
/branches/ocean_projects/ale_vert_coord/src:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src:1387-1428
/branches/ocean_projects/gmvar/src:1214-1494
/branches/ocean_projects/imp_vert_mix_mrp/src:754-986
/branches/ocean_projects/rayleigh/src:1298-1311
/branches/ocean_projects/split_explicit_mrp/src:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src:1044-1097
/branches/ocean_projects/vert_adv_mrp/src:704-745
/branches/source_renaming/src:1082-1113
/branches/time_manager/src:924-962
Modified: branches/land_ice_projects/implement_core/src/Makefile
===================================================================
--- branches/land_ice_projects/implement_core/src/Makefile        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/src/Makefile        2012-03-15 22:11:29 UTC (rev 1652)
@@ -6,35 +6,35 @@
        $(FC) $(LDFLAGS) -o $(CORE)_model.exe driver/*.o -L. -ldycore -lops -lframework $(LIBS) -I./external/esmf_time_f90 -L./external/esmf_time_f90 -lesmf_time
reg_includes:
-        ( cd registry; make CC="$(SCC)" )
+        ( cd registry; $(MAKE) CC="$(SCC)" )
        ( cd inc; $(CPP) ../core_$(CORE)/Registry | ../registry/parse > Registry.processed)
-externals:
-        ( cd external; make FC="$(FC)" SFC="$(SFC)" CC="$(CC)" SCC="$(SCC)" FFLAGS="$(FFLAGS)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" NETCDF="$(NETCDF)" CORE="$(CORE)" )
+externals: reg_includes
+        ( cd external; $(MAKE) FC="$(FC)" SFC="$(SFC)" CC="$(CC)" SCC="$(SCC)" FFLAGS="$(FFLAGS)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" NETCDF="$(NETCDF)" CORE="$(CORE)" )
-frame:
-        ( cd framework; make all )
+frame: reg_includes externals
+        ( cd framework; $(MAKE) all )
        ln -sf framework/libframework.a libframework.a
-ops:
-        ( cd operators; make all )
+ops: reg_includes externals frame
+        ( cd operators; $(MAKE) all )
        ln -sf operators/libops.a libops.a
-dycore:
-        ( cd core_$(CORE); make all )
+dycore: reg_includes externals frame ops
+        ( cd core_$(CORE); $(MAKE) all )
        ln -sf core_$(CORE)/libdycore.a libdycore.a
-drver:
-        ( cd driver; make all )
+drver: reg_includes externals frame ops dycore
+        ( cd driver; $(MAKE) all )
clean:
        $(RM) $(CORE)_model.exe libframework.a libops.a libdycore.a
-        ( cd registry; make clean )
-        ( cd external; make clean )
-        ( cd framework; make clean )
-        ( cd operators; make clean )
+        ( cd registry; $(MAKE) clean )
+        ( cd external; $(MAKE) clean )
+        ( cd framework; $(MAKE) clean )
+        ( cd operators; $(MAKE) clean )
        ( cd inc; rm -f *.inc Registry.processed )
        if [ -d core_$(CORE) ] ; then \
-         ( cd core_$(CORE); make clean ) \
+         ( cd core_$(CORE); $(MAKE) clean ) \
        fi;
-        ( cd driver; make clean )
+        ( cd driver; $(MAKE) clean )
Modified: branches/land_ice_projects/implement_core/src/core_hyd_atmos/Registry
===================================================================
--- branches/land_ice_projects/implement_core/src/core_hyd_atmos/Registry        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/src/core_hyd_atmos/Registry        2012-03-15 22:11:29 UTC (rev 1652)
@@ -4,7 +4,7 @@
namelist integer sw_model config_test_case 5
namelist character sw_model config_time_integration SRK3
namelist real sw_model config_dt 172.8
-namelist integer sw_model config_calendar_type MPAS_360DAY
+namelist character sw_model config_calendar_type 360day
namelist character sw_model config_start_time 0000-01-01_00:00:00
namelist character sw_model config_stop_time none
namelist character sw_model config_run_duration none
Modified: branches/land_ice_projects/implement_core/src/core_init_nhyd_atmos/Registry
===================================================================
--- branches/land_ice_projects/implement_core/src/core_init_nhyd_atmos/Registry        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/src/core_init_nhyd_atmos/Registry        2012-03-15 22:11:29 UTC (rev 1652)
@@ -2,7 +2,7 @@
% namelist type namelist_record name default_value
%
namelist integer nhyd_model config_test_case 7
-namelist integer nhyd_model config_calendar_type MPAS_GREGORIAN
+namelist character nhyd_model config_calendar_type gregorian
namelist character nhyd_model config_start_time none
namelist character nhyd_model config_stop_time none
namelist integer nhyd_model config_theta_adv_order 3
Modified: branches/land_ice_projects/implement_core/src/core_land_ice/Registry
===================================================================
--- branches/land_ice_projects/implement_core/src/core_land_ice/Registry        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/src/core_land_ice/Registry        2012-03-15 22:11:29 UTC (rev 1652)
@@ -6,7 +6,7 @@
namelist integer land_ice_model config_test_case 5
namelist character land_ice_model config_time_integration RK4
namelist real land_ice_model config_dt 172.8
-namelist integer land_ice_model config_calendar_type MPAS_360DAY
+namelist character land_ice_model config_calendar_type MPAS_360DAY
namelist character land_ice_model config_start_time 0000-01-01_00:00:00
namelist character land_ice_model config_stop_time none
namelist character land_ice_model config_run_duration none
Modified: branches/land_ice_projects/implement_core/src/core_nhyd_atmos/Registry
===================================================================
--- branches/land_ice_projects/implement_core/src/core_nhyd_atmos/Registry        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/src/core_nhyd_atmos/Registry        2012-03-15 22:11:29 UTC (rev 1652)
@@ -4,7 +4,7 @@
namelist integer nhyd_model config_test_case 0
namelist character nhyd_model config_time_integration SRK3
namelist real nhyd_model config_dt 600.0
-namelist integer nhyd_model config_calendar_type MPAS_GREGORIAN
+namelist character nhyd_model config_calendar_type gregorian
namelist character nhyd_model config_start_time 0000-01-01_00:00:00
namelist character nhyd_model config_stop_time none
namelist character nhyd_model config_run_duration none
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean:754-986
/branches/ocean_projects/rayleigh/src/core_ocean:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean:704-745
/branches/source_renaming/src/core_ocean:1082-1113
/branches/time_manager/src/core_ocean:924-962
Modified: branches/land_ice_projects/implement_core/src/core_ocean/Makefile
===================================================================
--- branches/land_ice_projects/implement_core/src/core_ocean/Makefile        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/src/core_ocean/Makefile        2012-03-15 22:11:29 UTC (rev 1652)
@@ -36,6 +36,15 @@
         mpas_ocn_vmix_coefs_tanh.o \
         mpas_ocn_restoring.o \
         mpas_ocn_tendency.o \
+         mpas_ocn_tracer_advection.o \
+         mpas_ocn_tracer_advection_std.o \
+         mpas_ocn_tracer_advection_std_hadv.o \
+         mpas_ocn_tracer_advection_std_vadv.o \
+         mpas_ocn_tracer_advection_std_vadv2.o \
+         mpas_ocn_tracer_advection_std_vadv3.o \
+         mpas_ocn_tracer_advection_std_vadv4.o \
+         mpas_ocn_tracer_advection_mono.o \
+         mpas_ocn_tracer_advection_helpers.o \
mpas_ocn_time_integration.o \
mpas_ocn_time_integration_rk4.o \
mpas_ocn_time_integration_split.o \
@@ -120,6 +129,24 @@
mpas_ocn_tracer_hmix_del4.o:
+mpas_ocn_tracer_advection.o: mpas_ocn_tracer_advection_std.o mpas_ocn_tracer_advection_mono.o
+
+mpas_ocn_tracer_advection_std.o: mpas_ocn_tracer_advection_std_hadv.o mpas_ocn_tracer_advection_std_vadv.o
+
+mpas_ocn_tracer_advection_std_hadv.o: mpas_ocn_tracer_advection_helpers.o
+
+mpas_ocn_tracer_advection_std_vadv.o: mpas_ocn_tracer_advection_std_vadv2.o mpas_ocn_tracer_advection_std_vadv3.o mpas_ocn_tracer_advection_std_vadv4.o
+
+mpas_ocn_tracer_advection_std_vadv2.o: mpas_ocn_tracer_advection_helpers.o
+
+mpas_ocn_tracer_advection_std_vadv3.o: mpas_ocn_tracer_advection_helpers.o
+
+mpas_ocn_tracer_advection_std_vadv4.o: mpas_ocn_tracer_advection_helpers.o
+
+mpas_ocn_tracer_advection_mono.o: mpas_ocn_tracer_advection_helpers.o
+
+mpas_ocn_tracer_advection_helpers.o:
+
mpas_ocn_restoring.o:
mpas_ocn_vmix.o: mpas_ocn_vmix_coefs_const.o mpas_ocn_vmix_coefs_rich.o mpas_ocn_vmix_coefs_tanh.o
@@ -170,6 +197,15 @@
                                         mpas_ocn_vmix_coefs_rich.o \
                                         mpas_ocn_vmix_coefs_tanh.o \
                                         mpas_ocn_restoring.o \
+                                         mpas_ocn_tracer_advection.o \
+                                         mpas_ocn_tracer_advection_std.o \
+                                         mpas_ocn_tracer_advection_std_hadv.o \
+                                         mpas_ocn_tracer_advection_std_vadv.o \
+                                         mpas_ocn_tracer_advection_std_vadv2.o \
+                                         mpas_ocn_tracer_advection_std_vadv3.o \
+                                         mpas_ocn_tracer_advection_std_vadv4.o \
+                                         mpas_ocn_tracer_advection_mono.o \
+                                         mpas_ocn_tracer_advection_helpers.o \
                                         mpas_ocn_tendency.o \
                                         mpas_ocn_time_integration.o \
                                         mpas_ocn_time_integration_rk4.o \
Modified: branches/land_ice_projects/implement_core/src/core_ocean/Registry
===================================================================
--- branches/land_ice_projects/implement_core/src/core_ocean/Registry        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/src/core_ocean/Registry        2012-03-15 22:11:29 UTC (rev 1652)
@@ -5,12 +5,14 @@
namelist character sw_model config_time_integration RK4
namelist logical sw_model config_rk_filter_btr_mode false
namelist real sw_model config_dt 172.8
-namelist integer sw_model config_calendar_type MPAS_360DAY
+namelist character sw_model config_calendar_type 360day
namelist character sw_model config_start_time 0000-01-01_00:00:00
namelist character sw_model config_stop_time none
namelist character sw_model config_run_duration none
namelist integer sw_model config_stats_interval 100
namelist logical sw_model config_initial_stats false
+namelist logical sw_model config_prescribe_velocity false
+namelist logical sw_model config_prescribe_thickness false
namelist character io config_input_name grid.nc
namelist character io config_output_name output.nc
namelist character io config_restart_name restart.nc
@@ -44,9 +46,9 @@
namelist logical hmix config_include_KE_vertex false
namelist real hmix config_h_tracer_eddy_diff2 0.0
namelist real hmix config_h_tracer_eddy_diff4 0.0
-namelist real hmix config_apvm_upwinding 0.5
namelist logical hmix config_rayleigh_friction false
namelist real hmix config_rayleigh_damping_coeff 0.0
+namelist real hmix config_apvm_scale_factor 0.0
namelist character vmix config_vert_visc_type const
namelist character vmix config_vert_diff_type const
namelist logical vmix config_implicit_vertical_mix .true.
@@ -66,11 +68,12 @@
namelist real vmix_tanh config_zWidth_tanh 100
namelist character eos config_eos_type linear
namelist character advection config_vert_tracer_adv stencil
-namelist integer advection config_vert_tracer_adv_order 4
-namelist integer advection config_tracer_adv_order 2
+namelist integer advection config_vert_tracer_adv_order 4
+namelist integer advection config_horiz_tracer_adv_order 2
namelist integer advection config_thickness_adv_order 2
-namelist logical advection config_positive_definite false
+namelist real advection config_coef_3rd_order 0.25
namelist logical advection config_monotonic false
+namelist logical advection config_check_monotonicity false
namelist logical restore config_restoreTS false
namelist real restore config_restoreT_timescale 90.0
namelist real restore config_restoreS_timescale 90.0
@@ -82,6 +85,7 @@
dim nEdges nEdges
dim maxEdges maxEdges
dim maxEdges2 maxEdges2
+dim nAdvectionCells maxEdges2+0
dim nVertices nVertices
dim TWO 2
dim R3 3
@@ -149,9 +153,17 @@
var persistent real h_s ( nCells ) 0 iro h_s mesh - -
% Space needed for advection
-var persistent real deriv_two ( FIFTEEN TWO nEdges ) 0 - deriv_two mesh - -
-var persistent integer advCells ( TWENTYONE nCells ) 0 - advCells mesh - -
+var persistent real deriv_two ( maxEdges2 TWO nEdges ) 0 - deriv_two mesh - -
+% Added for monotonic advection scheme
+var persistent real adv_coefs ( nAdvectionCells nEdges ) 0 - adv_coefs mesh - -
+var persistent real adv_coefs_2nd ( nAdvectionCells nEdges ) 0 - adv_coefs_2nd mesh - -
+var persistent real adv_coefs_3rd ( nAdvectionCells nEdges ) 0 - adv_coefs_3rd mesh - -
+var persistent integer advCellsForEdge ( nAdvectionCells nEdges ) 0 - advCellsForEdge mesh - -
+var persistent integer nAdvCellsForEdge ( nEdges ) 0 - nAdvCellsForEdge mesh - -
+var persistent integer highOrderAdvectionMask ( nVertLevels nEdges ) 0 - highOrderAdvectionMask mesh - -
+var persistent integer lowOrderAdvectionMask ( nVertLevels nEdges ) 0 - lowOrderAdvectionMask mesh - -
+
% !! NOTE: the following arrays are needed to allow the use
% !! of the module_advection.F w/o alteration
% Space needed for deformation calculation weights
@@ -213,15 +225,15 @@
var persistent real v ( nVertLevels nEdges Time ) 2 - v state - -
var persistent real divergence ( nVertLevels nCells Time ) 2 o divergence state - -
var persistent real vorticity ( nVertLevels nVertices Time ) 2 o vorticity state - -
-var persistent real pv_edge ( nVertLevels nEdges Time ) 2 - pv_edge state - -
+var persistent real Vor_edge ( nVertLevels nEdges Time ) 2 - Vor_edge state - -
var persistent real h_edge ( nVertLevels nEdges Time ) 2 - h_edge state - -
var persistent real h_vertex ( nVertLevels nVertices Time ) 2 - h_vertex state - -
var persistent real ke ( nVertLevels nCells Time ) 2 o ke state - -
var persistent real kev ( nVertLevels nVertices Time ) 2 o kev state - -
var persistent real kevc ( nVertLevels nCells Time ) 2 o kevc state - -
var persistent real ke_edge ( nVertLevels nEdges Time ) 2 - ke_edge state - -
-var persistent real pv_vertex ( nVertLevels nVertices Time ) 2 - pv_vertex state - -
-var persistent real pv_cell ( nVertLevels nCells Time ) 2 - pv_cell state - -
+var persistent real Vor_vertex ( nVertLevels nVertices Time ) 2 - Vor_vertex state - -
+var persistent real Vor_cell ( nVertLevels nCells Time ) 2 o Vor_cell state - -
var persistent real uReconstructX ( nVertLevels nCells Time ) 2 - uReconstructX state - -
var persistent real uReconstructY ( nVertLevels nCells Time ) 2 - uReconstructY state - -
var persistent real uReconstructZ ( nVertLevels nCells Time ) 2 - uReconstructZ state - -
@@ -235,8 +247,8 @@
% Other diagnostic variables: neither read nor written to any files
var persistent real vh ( nVertLevels nEdges Time ) 2 - vh state - -
var persistent real circulation ( nVertLevels nVertices Time ) 2 - circulation state - -
-var persistent real gradPVt ( nVertLevels nEdges Time ) 2 - gradPVt state - -
-var persistent real gradPVn ( nVertLevels nEdges Time ) 2 - gradPVn state - -
+var persistent real gradVor_t ( nVertLevels nEdges Time ) 2 - gradVor_t state - -
+var persistent real gradVor_n ( nVertLevels nEdges Time ) 2 - gradVor_n state - -
% Globally reduced diagnostic variables: only written to output
var persistent real areaCellGlobal ( Time ) 2 o areaCellGlobal state - -
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/Registry
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/Registry:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/Registry:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/Registry:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/Registry:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/Registry:754-986
/branches/ocean_projects/performance/src/core_ocean/Registry:1120-1372
/branches/ocean_projects/rayleigh/src/core_ocean/Registry:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/Registry:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/Registry:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/Registry:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/Registry:704-745
/branches/source_renaming/src/core_ocean/Registry:1082-1113
/branches/time_manager/src/core_ocean/Registry:924-962
Modified: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_advection.F
===================================================================
--- branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_advection.F        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_advection.F        2012-03-15 22:11:29 UTC (rev 1652)
@@ -9,19 +9,25 @@
contains
- subroutine ocn_initialize_advection_rk( grid )!{{{
+ subroutine ocn_initialize_advection_rk( grid, err )!{{{
!
! compute the cell coefficients for the polynomial fit.
! this is performed during setup for model integration.
! WCS, 31 August 2009
!
+! Described in:
+! Skamarock, W. C., & Gassmann, A. (2011).
+! Conservative Transport Schemes for Spherical Geodesic Grids: High-Order Flux Operators for ODE-Based Time Integration.
+! Monthly Weather Review, 139(9), 2962-2975. doi:10.1175/MWR-D-10-05056.1
+!
implicit none
type (mesh_type), intent(in) :: grid
+ integer, intent(out) :: err
real (kind=RKIND), dimension(:,:,:), pointer :: deriv_two
- integer, dimension(:,:), pointer :: advCells
+ integer, dimension(:), pointer :: advCells
! local variables
@@ -50,9 +56,7 @@
integer :: cell1, cell2
integer, parameter :: polynomial_order = 2
-! logical, parameter :: debug = .true.
logical, parameter :: debug = .false.
-! logical, parameter :: least_squares = .false.
logical, parameter :: least_squares = .true.
logical :: add_the_cell, do_the_cell
@@ -61,11 +65,19 @@
real (kind=RKIND) :: rcell, cos2t, costsint, sin2t
real (kind=RKIND), dimension(grid%maxEdges) :: angle_2d
-!---
+!---
+ err = 0
+ if(polynomial_order > 2) then
+ write (*,*) 'Polynomial for second derivitave can only be 2'
+ err = 1
+ return
+ end if
+
pii = 2.*asin(1.0)
- advCells => grid % advCells % array
+! advCells => grid % advCells % array
+ allocate(advCells(grid % maxEdges2))
deriv_two => grid % deriv_two % array
deriv_two(:,:,:) = 0.
@@ -93,7 +105,7 @@
end do
end if
- advCells(1,iCell) = n
+ advCells(1) = n
! check to see if we are reaching outside the halo
@@ -110,10 +122,10 @@
if ( grid % on_a_sphere ) then
do i=1,n
- advCells(i+1,iCell) = cell_list(i)
- xc(i) = grid % xCell % array(advCells(i+1,iCell))/a
- yc(i) = grid % yCell % array(advCells(i+1,iCell))/a
- zc(i) = grid % zCell % array(advCells(i+1,iCell))/a
+ advCells(i+1) = cell_list(i)
+ xc(i) = grid % xCell % array(advCells(i+1))/a
+ yc(i) = grid % yCell % array(advCells(i+1))/a
+ zc(i) = grid % zCell % array(advCells(i+1))/a
end do
theta_abs(iCell) = pii/2. - sphere_angle( xc(1), yc(1), zc(1), &
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_advection.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_advection.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_advection.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_advection.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_advection.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_advection.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_advection.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_advection.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_advection.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_advection.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_advection.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_advection.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_advection.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_advection.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_equation_of_state.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_equation_of_state.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_equation_of_state.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_equation_of_state.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_equation_of_state.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_equation_of_state.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_equation_of_state.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_equation_of_state.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_equation_of_state.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_equation_of_state.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_equation_of_state.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_equation_of_state.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_equation_of_state.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_equation_of_state.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_equation_of_state_jm.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_equation_of_state_jm.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_equation_of_state_jm.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_equation_of_state_jm.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_equation_of_state_jm.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_equation_of_state_jm.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_equation_of_state_jm.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_equation_of_state_jm.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_equation_of_state_jm.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_equation_of_state_jm.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_equation_of_state_jm.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_equation_of_state_jm.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_equation_of_state_jm.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_equation_of_state_jm.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_equation_of_state_linear.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_equation_of_state_linear.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_equation_of_state_linear.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_equation_of_state_linear.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_equation_of_state_linear.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_equation_of_state_linear.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_equation_of_state_linear.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_equation_of_state_linear.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_equation_of_state_linear.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_equation_of_state_linear.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_equation_of_state_linear.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_equation_of_state_linear.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_equation_of_state_linear.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_equation_of_state_linear.F:924-962
Modified: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_global_diagnostics.F
===================================================================
--- branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_global_diagnostics.F        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_global_diagnostics.F        2012-03-15 22:11:29 UTC (rev 1652)
@@ -46,8 +46,8 @@
real (kind=RKIND) :: volumeCellGlobal, volumeEdgeGlobal, CFLNumberGlobal, localCFL, localSum, areaCellGlobal, areaEdgeGlobal, areaTriangleGlobal
real (kind=RKIND), dimension(:), pointer :: areaCell, dcEdge, dvEdge, areaTriangle, areaEdge
- real (kind=RKIND), dimension(:,:), pointer :: h, u, v, h_edge, circulation, vorticity, ke, pv_edge, pv_vertex, &
- pv_cell, gradPVn, gradPVt, pressure, MontPot, wTop, rho, tracerTemp
+ real (kind=RKIND), dimension(:,:), pointer :: h, u, v, h_edge, circulation, vorticity, ke, Vor_edge, Vor_vertex, &
+ Vor_cell, gradVor_n, gradVor_t, pressure, MontPot, wTop, rho, tracerTemp
real (kind=RKIND), dimension(:,:,:), pointer :: tracers
real (kind=RKIND), dimension(kMaxVariables) :: sums, mins, maxes, averages, verticalSumMins, verticalSumMaxes, reductions
@@ -93,11 +93,11 @@
circulation => state % circulation % array
vorticity => state % vorticity % array
ke => state % ke % array
- pv_edge => state % pv_edge % array
- pv_vertex => state % pv_vertex % array
- pv_cell => state % pv_cell % array
- gradPVn => state % gradPVn % array
- gradPVt => state % gradPVt % array
+ Vor_edge => state % Vor_edge % array
+ Vor_vertex => state % Vor_vertex % array
+ Vor_cell => state % Vor_cell % array
+ gradVor_n => state % gradVor_n % array
+ gradVor_t => state % gradVor_t % array
MontPot => state % MontPot % array
pressure => state % pressure % array
@@ -176,10 +176,10 @@
verticalSumMins(variableIndex) = min(verticalSumMins(variableIndex), verticalSumMins_tmp(variableIndex))
verticalSumMaxes(variableIndex) = max(verticalSumMaxes(variableIndex), verticalSumMaxes_tmp(variableIndex))
- ! pv_edge
+ ! Vor_edge
variableIndex = variableIndex + 1
call ocn_compute_field_volume_weighted_local_stats(dminfo, nVertLevels, nEdgesSolve, areaEdge(1:nEdgesSolve), h_edge(:,1:nEdgesSolve), &
- pv_edge(:,1:nEdgesSolve), sums_tmp(variableIndex), mins_tmp(variableIndex), maxes_tmp(variableIndex), verticalSumMins_tmp(variableIndex), &
+ Vor_edge(:,1:nEdgesSolve), sums_tmp(variableIndex), mins_tmp(variableIndex), maxes_tmp(variableIndex), verticalSumMins_tmp(variableIndex), &
verticalSumMaxes_tmp(variableIndex))
sums(variableIndex) = sums(variableIndex) + sums_tmp(variableIndex)
mins(variableIndex) = min(mins(variableIndex), mins_tmp(variableIndex))
@@ -187,10 +187,10 @@
verticalSumMins(variableIndex) = min(verticalSumMins(variableIndex), verticalSumMins_tmp(variableIndex))
verticalSumMaxes(variableIndex) = max(verticalSumMaxes(variableIndex), verticalSumMaxes_tmp(variableIndex))
- ! pv_vertex
+ ! Vor_vertex
variableIndex = variableIndex + 1
call ocn_compute_field_area_weighted_local_stats(dminfo, nVertLevels, nVerticesSolve, areaTriangle(1:nVerticesSolve), &
- pv_vertex(:,1:nVerticesSolve), sums_tmp(variableIndex), mins_tmp(variableIndex), maxes_tmp(variableIndex), &
+ Vor_vertex(:,1:nVerticesSolve), sums_tmp(variableIndex), mins_tmp(variableIndex), maxes_tmp(variableIndex), &
verticalSumMins_tmp(variableIndex), verticalSumMaxes_tmp(variableIndex))
sums(variableIndex) = sums(variableIndex) + sums_tmp(variableIndex)
mins(variableIndex) = min(mins(variableIndex), mins_tmp(variableIndex))
@@ -198,10 +198,10 @@
verticalSumMins(variableIndex) = min(verticalSumMins(variableIndex), verticalSumMins_tmp(variableIndex))
verticalSumMaxes(variableIndex) = max(verticalSumMaxes(variableIndex), verticalSumMaxes_tmp(variableIndex))
- ! pv_cell
+ ! Vor_cell
variableIndex = variableIndex + 1
call ocn_compute_field_volume_weighted_local_stats(dminfo, nVertLevels, nCellsSolve, areaCell(1:nCellsSolve), h(:,1:nCellsSolve), &
- pv_cell(:,1:nCellsSolve), sums_tmp(variableIndex), mins_tmp(variableIndex), maxes_tmp(variableIndex), verticalSumMins_tmp(variableIndex), &
+ Vor_cell(:,1:nCellsSolve), sums_tmp(variableIndex), mins_tmp(variableIndex), maxes_tmp(variableIndex), verticalSumMins_tmp(variableIndex), &
verticalSumMaxes_tmp(variableIndex))
sums(variableIndex) = sums(variableIndex) + sums_tmp(variableIndex)
mins(variableIndex) = min(mins(variableIndex), mins_tmp(variableIndex))
@@ -209,10 +209,10 @@
verticalSumMins(variableIndex) = min(verticalSumMins(variableIndex), verticalSumMins_tmp(variableIndex))
verticalSumMaxes(variableIndex) = max(verticalSumMaxes(variableIndex), verticalSumMaxes_tmp(variableIndex))
- ! gradPVn
+ ! gradVor_n
variableIndex = variableIndex + 1
call ocn_compute_field_volume_weighted_local_stats(dminfo, nVertLevels, nEdgesSolve, areaEdge(1:nEdgesSolve), h_edge(:,1:nEdgesSolve), &
- gradPVn(:,1:nEdgesSolve), sums_tmp(variableIndex), mins_tmp(variableIndex), maxes_tmp(variableIndex), verticalSumMins_tmp(variableIndex), &
+ gradVor_n(:,1:nEdgesSolve), sums_tmp(variableIndex), mins_tmp(variableIndex), maxes_tmp(variableIndex), verticalSumMins_tmp(variableIndex), &
verticalSumMaxes_tmp(variableIndex))
sums(variableIndex) = sums(variableIndex) + sums_tmp(variableIndex)
mins(variableIndex) = min(mins(variableIndex), mins_tmp(variableIndex))
@@ -220,10 +220,10 @@
verticalSumMins(variableIndex) = min(verticalSumMins(variableIndex), verticalSumMins_tmp(variableIndex))
verticalSumMaxes(variableIndex) = max(verticalSumMaxes(variableIndex), verticalSumMaxes_tmp(variableIndex))
- ! gradPVt
+ ! gradVor_t
variableIndex = variableIndex + 1
call ocn_compute_field_volume_weighted_local_stats(dminfo, nVertLevels, nEdgesSolve, areaEdge(1:nEdgesSolve), h_edge(:,1:nEdgesSolve), &
- gradPVt(:,1:nEdgesSolve), sums_tmp(variableIndex), mins_tmp(variableIndex), maxes_tmp(variableIndex), verticalSumMins_tmp(variableIndex), &
+ gradVor_t(:,1:nEdgesSolve), sums_tmp(variableIndex), mins_tmp(variableIndex), maxes_tmp(variableIndex), verticalSumMins_tmp(variableIndex), &
verticalSumMaxes_tmp(variableIndex))
sums(variableIndex) = sums(variableIndex) + sums_tmp(variableIndex)
mins(variableIndex) = min(mins(variableIndex), mins_tmp(variableIndex))
@@ -374,23 +374,23 @@
variableIndex = variableIndex + 1
averages(variableIndex) = sums(variableIndex)/volumeCellGlobal
- ! pv_edge
+ ! Vor_edge
variableIndex = variableIndex + 1
averages(variableIndex) = sums(variableIndex)/volumeEdgeGlobal
- ! pv_vertex
+ ! Vor_vertex
variableIndex = variableIndex + 1
averages(variableIndex) = sums(variableIndex)/(areaTriangleGlobal*nVertLevels)
- ! pv_cell
+ ! Vor_cell
variableIndex = variableIndex + 1
averages(variableIndex) = sums(variableIndex)/volumeCellGlobal
- ! gradPVn
+ ! gradVor_n
variableIndex = variableIndex + 1
averages(variableIndex) = sums(variableIndex)/volumeEdgeGlobal
- ! gradPVt
+ ! gradVor_t
variableIndex = variableIndex + 1
averages(variableIndex) = sums(variableIndex)/volumeEdgeGlobal
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_global_diagnostics.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_global_diagnostics.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_global_diagnostics.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_global_diagnostics.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_global_diagnostics.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_global_diagnostics.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_global_diagnostics.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_global_diagnostics.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_global_diagnostics.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_global_diagnostics.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_global_diagnostics.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_global_diagnostics.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_global_diagnostics.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_global_diagnostics.F:924-962
Modified: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_mpas_core.F
===================================================================
--- branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_mpas_core.F        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_mpas_core.F        2012-03-15 22:11:29 UTC (rev 1652)
@@ -45,6 +45,7 @@
subroutine mpas_core_init(domain, startTimeStamp)!{{{
use mpas_grid_types
+ use mpas_ocn_tracer_advection
implicit none
@@ -88,6 +89,9 @@
call ocn_tendency_init(err_tmp)
err = ior(err,err_tmp)
+ call mpas_ocn_tracer_advection_init(err_tmp)
+ err = ior(err,err_tmp)
+
call mpas_timer_init(domain)
if(err.eq.1) then
@@ -134,7 +138,10 @@
block => domain % blocklist
do while (associated(block))
- call mpas_init_block(block, block % mesh, dt)
+ call mpas_init_block(block, block % mesh, dt, err)
+ if(err.eq.1) then
+ call mpas_dmpar_abort(dminfo)
+ endif
block % state % time_levs(1) % state % xtime % scalar = startTimeStamp
block => block % next
end do
@@ -213,19 +220,27 @@
end subroutine ocn_simulation_clock_init!}}}
- subroutine mpas_init_block(block, mesh, dt)!{{{
+ subroutine mpas_init_block(block, mesh, dt, err)!{{{
use mpas_grid_types
use mpas_rbf_interpolation
use mpas_vector_reconstruction
+ use mpas_ocn_tracer_advection
+ use ocn_advection
implicit none
type (block_type), intent(inout) :: block
type (mesh_type), intent(inout) :: mesh
real (kind=RKIND), intent(in) :: dt
+ integer, intent(out) :: err
integer :: i, iEdge, iCell, k
+ integer :: err1
+ call ocn_initialize_advection_rk(mesh, err)
+ call mpas_ocn_tracer_advection_coefficients(mesh, err1)
+ err = ior(err, err1)
+
call ocn_time_average_init(block % state % time_levs(1) % state)
call mpas_timer_start("diagnostic solve", .false., initDiagSolveTimer)
@@ -272,29 +287,13 @@
:block % mesh % nVertLevels,iCell) = 0.0
! mrp changed to 0
! :block % mesh % nVertLevels,iCell) = -1e34
-
-! mrp 110516, added just to test for conservation of tracers
- block % state % time_levs(1) % state % tracers % array(block % state % time_levs(1) % state % index_tracer1,:,iCell) = 1.0
-
end do
- if (.not. config_do_restart) then
-
-! mrp 110808 add, so that variables are copied to * variables for split explicit
- do i=2,nTimeLevs
- call mpas_copy_state(block % state % time_levs(i) % state, &
+ do i=2,nTimeLevs
+ call mpas_copy_state(block % state % time_levs(i) % state, &
block % state % time_levs(1) % state)
- end do
-! mrp 110808 add end
+ end do
-
- else
- do i=2,nTimeLevs
- call mpas_copy_state(block % state % time_levs(i) % state, &
- block % state % time_levs(1) % state)
- end do
- endif
-
end subroutine mpas_init_block!}}}
subroutine mpas_core_run(domain, output_obj, output_frame)!{{{
@@ -508,8 +507,8 @@
integer :: iTracer, cell, cell1, cell2
real (kind=RKIND) :: uhSum, hSum, hEdge1
- real (kind=RKIND), dimension(:), pointer :: &
- referenceBottomDepth, referenceBottomDepthTopOfCell
+ real (kind=RKIND), dimension(:), pointer :: referenceBottomDepth, referenceBottomDepthTopOfCell
+
real (kind=RKIND), dimension(:,:), pointer :: h
integer :: nVertLevels
@@ -732,8 +731,12 @@
if (boundaryEdge(k,iEdge).eq.1) then
boundaryCell(k,cellsOnEdge(1,iEdge)) = 1
boundaryCell(k,cellsOnEdge(2,iEdge)) = 1
- cellMask(k,cellsOnEdge(1,iEdge)) = 0
- cellMask(k,cellsOnEdge(2,iEdge)) = 0
+ if(maxLevelCell(cellsOnEdge(1,iEdge)) > k) then
+ cellMask(k, cellsOnEdge(1,iEdge)) = 0
+ end if
+ if(maxLevelCell(cellsOnEdge(2,iEdge)) > k) then
+ cellMask(k, cellsOnEdge(2,iEdge)) = 0
+ end if
boundaryVertex(k,verticesOnEdge(1,iEdge)) = 1
boundaryVertex(k,verticesOnEdge(2,iEdge)) = 1
vertexMask(k,verticesOnEdge(1,iEdge)) = 0
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_mpas_core.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_mpas_core.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_mpas_core.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_mpas_core.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_mpas_core.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_mpas_core.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_mpas_core.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_mpas_core.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_mpas_core.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_mpas_core.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_mpas_core.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_mpas_core.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_mpas_core.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_mpas_core.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_restoring.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_restoring.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_restoring.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_restoring.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_restoring.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_restoring.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_restoring.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_restoring.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_restoring.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_restoring.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_restoring.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_restoring.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_restoring.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_restoring.F:924-962
Modified: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tendency.F
===================================================================
--- branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tendency.F        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tendency.F        2012-03-15 22:11:29 UTC (rev 1652)
@@ -21,6 +21,8 @@
use mpas_constants
use mpas_timer
+ use mpas_ocn_tracer_advection
+
use ocn_thick_hadv
use ocn_thick_vadv
@@ -97,22 +99,12 @@
!
!-----------------------------------------------------------------------
- subroutine ocn_tend_h(tend, s, d, grid)!{{{
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- ! Compute height and normal wind tendencies, as well as diagnostic variables
- !
- ! Input: s - current model state
- ! grid - grid metadata
- !
- ! Output: tend - computed tendencies for prognostic variables
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
+ subroutine ocn_tend_h(tend, s, grid)!{{{
implicit none
- type (tend_type), intent(inout) :: tend
- type (state_type), intent(in) :: s
- type (diagnostics_type), intent(in) :: d
- type (mesh_type), intent(in) :: grid
+ type (tend_type), intent(inout) :: tend !< Input/Output: Tendency structure
+ type (state_type), intent(in) :: s !< Input: State information
+ type (mesh_type), intent(in) :: grid !< Input: Grid information
real (kind=RKIND), dimension(:,:), pointer :: h_edge, u, wTop, tend_h
@@ -166,25 +158,16 @@
!-----------------------------------------------------------------------
subroutine ocn_tend_u(tend, s, d, grid)!{{{
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- ! Compute height and normal wind tendencies, as well as diagnostic variables
- !
- ! Input: s - current model state
- ! grid - grid metadata
- !
- ! Output: tend - computed tendencies for prognostic variables
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
implicit none
- type (tend_type), intent(inout) :: tend
- type (state_type), intent(in) :: s
- type (diagnostics_type), intent(in) :: d
- type (mesh_type), intent(in) :: grid
+ type (tend_type), intent(inout) :: tend !< Input/Output: Tendency structure
+ type (state_type), intent(in) :: s !< Input: State information
+ type (diagnostics_type), intent(in) :: d !< Input: Diagnostic information
+ type (mesh_type), intent(in) :: grid !< Input: Grid information
real (kind=RKIND), dimension(:,:), pointer :: &
h_edge, h, u, rho, zMid, pressure, &
- tend_u, circulation, vorticity, ke, ke_edge, pv_edge, &
+ tend_u, circulation, vorticity, ke, ke_edge, Vor_edge, &
MontPot, wTop, divergence, vertViscTopOfEdge
real (kind=RKIND), dimension(:,:), pointer :: u_src
@@ -202,7 +185,7 @@
divergence => s % divergence % array
ke => s % ke % array
ke_edge => s % ke_edge % array
- pv_edge => s % pv_edge % array
+ Vor_edge => s % Vor_edge % array
MontPot => s % MontPot % array
pressure => s % pressure % array
vertViscTopOfEdge => d % vertViscTopOfEdge % array
@@ -222,7 +205,7 @@
!
call mpas_timer_start("coriolis", .false., velCorTimer)
- call ocn_vel_coriolis_tend(grid, pv_edge, h_edge, u, ke, tend_u, err)
+ call ocn_vel_coriolis_tend(grid, Vor_edge, h_edge, u, ke, tend_u, err)
call mpas_timer_stop("coriolis", velCorTimer)
!
@@ -286,31 +269,21 @@
!> This routine computes the scalar (tracer) tendency for the ocean
!
!-----------------------------------------------------------------------
-
- subroutine ocn_tend_scalar(tend, s, d, grid)!{{{
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !
- ! Input: s - current model state
- ! grid - grid metadata
- ! note: the variable s % tracers really contains the tracers,
- ! not tracers*h
- !
- ! Output: tend - computed scalar tendencies
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
+ subroutine ocn_tend_scalar(tend, s, d, grid, dt)!{{{
implicit none
- type (tend_type), intent(inout) :: tend
- type (state_type), intent(in) :: s
- type (diagnostics_type), intent(in) :: d
- type (mesh_type), intent(in) :: grid
+ type (tend_type), intent(inout) :: tend !< Input/Output: Tendency structure
+ type (state_type), intent(in) :: s !< Input: State information
+ type (diagnostics_type), intent(in) :: d !< Input: Diagnostic information
+ type (mesh_type), intent(in) :: grid !< Input: Grid information
+ real (kind=RKIND), intent(in) :: dt !< Input: Time step
real (kind=RKIND), dimension(:,:), pointer :: &
- u,h,wTop, h_edge, vertDiffTopOfCell
+ u, h,wTop, h_edge, vertDiffTopOfCell, tend_h, uh
real (kind=RKIND), dimension(:,:,:), pointer :: &
tracers, tend_tr
- integer :: err
+ integer :: err, iEdge, k
call mpas_timer_start("ocn_tend_scalar")
@@ -322,7 +295,16 @@
vertDiffTopOfCell => d % vertDiffTopOfCell % array
tend_tr => tend % tracers % array
+ tend_h => tend % h % array
+ allocate(uh(grid % nVertLevels, grid % nEdges+1))
+
+ do iEdge = 1, grid % nEdges
+ do k = 1, grid % nVertLevels
+ uh(k, iEdge) = u(k, iEdge) * h_edge(k, iEdge)
+ end do
+ end do
+
!
! initialize tracer tendency (RHS of tracer equation) to zero.
!
@@ -336,20 +318,13 @@
! and then change maxLevelEdgeTop to maxLevelEdgeBot in the following section.
! tracer_edge at the boundary will also need to be defined for flux boundaries.
- call mpas_timer_start("hadv", .false., tracerHadvTimer)
- call ocn_tracer_hadv_tend(grid, u, h_edge, tracers, tend_tr, err)
- call mpas_timer_stop("hadv", tracerHadvTimer)
+ ! Monotonoic Advection, or standard advection
+ call mpas_timer_start("adv", .false., tracerHadvTimer)
+ call mpas_ocn_tracer_advection_tend(tracers, uh, wTop, h, h, dt, grid, tend_h, tend_tr)
+ call mpas_timer_stop("adv", tracerHadvTimer)
!
- ! tracer tendency: vertical advection term -d/dz( h \phi w)
- !
-
- call mpas_timer_start("vadv", .false., tracerVadvTimer)
- call ocn_tracer_vadv_tend(grid, h, wtop, tracers, tend_tr, err)
- call mpas_timer_stop("vadv", tracerVadvTimer)
-
- !
! tracer tendency: del2 horizontal tracer diffusion, div(h \kappa_2 </font>
<font color="gray">abla \phi)
!
call mpas_timer_start("hmix", .false., tracerHmixTimer)
@@ -391,6 +366,8 @@
10 format(2i8,10e20.10)
call mpas_timer_stop("ocn_tend_scalar")
+ deallocate(uh)
+
end subroutine ocn_tend_scalar!}}}
!***********************************************************************
@@ -407,19 +384,11 @@
!-----------------------------------------------------------------------
subroutine ocn_diagnostic_solve(dt, s, grid)!{{{
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- ! Compute diagnostic fields used in the tendency computations
- !
- ! Input: grid - grid metadata
- !
- ! Output: s - computed diagnostics
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
implicit none
- real (kind=RKIND), intent(in) :: dt
- type (state_type), intent(inout) :: s
- type (mesh_type), intent(in) :: grid
+ real (kind=RKIND), intent(in) :: dt !< Input: Time step
+ type (state_type), intent(inout) :: s !< Input/Output: State information
+ type (mesh_type), intent(in) :: grid !< Input: Grid information
integer :: iEdge, iCell, iVertex, k, cell1, cell2, vertex1, vertex2, eoe, i, j
@@ -441,7 +410,7 @@
real (kind=RKIND), dimension(:,:), pointer :: &
weightsOnEdge, kiteAreasOnVertex, h_edge, h, u, v, pressure,&
circulation, vorticity, ke, ke_edge, MontPot, wTop, zMid, &
- pv_edge, pv_vertex, pv_cell, gradPVn, gradPVt, divergence, &
+ Vor_edge, Vor_vertex, Vor_cell, gradVor_n, gradVor_t, divergence, &
rho, temperature, salinity, kev, kevc
real (kind=RKIND), dimension(:,:,:), pointer :: tracers, deriv_two
real (kind=RKIND), dimension(:,:), allocatable:: div_u
@@ -458,11 +427,11 @@
kev => s % kev % array
kevc => s % kevc % array
ke_edge => s % ke_edge % array
- pv_edge => s % pv_edge % array
- pv_vertex => s % pv_vertex % array
- pv_cell => s % pv_cell % array
- gradPVn => s % gradPVn % array
- gradPVt => s % gradPVt % array
+ Vor_edge => s % Vor_edge % array
+ Vor_vertex => s % Vor_vertex % array
+ Vor_cell => s % Vor_cell % array
+ gradVor_n => s % gradVor_n % array
+ gradVor_t => s % gradVor_t % array
rho => s % rho % array
MontPot => s % MontPot % array
pressure => s % pressure % array
@@ -509,6 +478,7 @@
! initialize h_edge to avoid divide by zero and NaN problems.
h_edge = -1.0e34
+ coef_3rd_order = config_coef_3rd_order
do iEdge=1,nEdges*hadv2nd
cell1 = cellsOnEdge(1,iEdge)
@@ -609,8 +579,9 @@
invAreaTri1 = 1.0 / areaTriangle(vertex1)
invAreaTri2 = 1.0 / areaTriangle(vertex2)
- invAreaCell1 = 1.0 / areaCell(cell1)
- invAreaCell2 = 1.0 / areaCell(cell2)
+ !dwj: 02/23/12 arraCell(nCells+1) is still 0, this is a temporary fix
+ invAreaCell1 = 1.0 / max(areaCell(cell1), 1.0)
+ invAreaCell2 = 1.0 / max(areaCell(cell2), 1.0)
do k=1,maxLevelEdgeBot(iEdge)
! Compute circulation and relative vorticity at each vertex
@@ -663,7 +634,8 @@
do iVertex = 1, nVertices*ke_vertex_flag
do i=1,grid % vertexDegree
iCell = cellsOnVertex(i,iVertex)
- invAreaCell1 = 1.0 / areaCell(iCell)
+ !dwj: 02/23/12 arraCell(nCells+1) is still 0, this is a temporary fix
+ invAreaCell1 = 1.0 / max(areaCell(iCell), 1.0)
do k=1,nVertLevels
kevc(k,iCell) = kevc(k,iCell) + kiteAreasOnVertex(i, iVertex) * kev(k, iVertex) * invAreaCell1
enddo
@@ -694,7 +666,7 @@
!
! Compute height at vertices, pv at vertices, and average pv to edge locations
- ! ( this computes pv_vertex at all vertices bounding real cells and distance-1 ghost cells )
+ ! ( this computes Vor_vertex at all vertices bounding real cells and distance-1 ghost cells )
!
do iVertex = 1,nVertices
invAreaTri1 = 1.0 / areaTriangle(iVertex)
@@ -705,35 +677,36 @@
end do
h_vertex = h_vertex * invAreaTri1
- pv_vertex(k,iVertex) = (fCoef*fVertex(iVertex) + vorticity(k,iVertex)) / h_vertex
+ Vor_vertex(k,iVertex) = (fCoef*fVertex(iVertex) + vorticity(k,iVertex)) / h_vertex
end do
end do
- pv_cell(:,:) = 0.0
- pv_edge(:,:) = 0.0
+ Vor_cell(:,:) = 0.0
+ Vor_edge(:,:) = 0.0
do iVertex = 1,nVertices
do i=1,vertexDegree
iCell = cellsOnVertex(i,iVertex)
iEdge = edgesOnVertex(i,iVertex)
- invAreaCell1 = 1.0 / areaCell(iCell)
+ !dwj: 02/23/12 arraCell(nCells+1) is still 0, this is a temporary fix
+ invAreaCell1 = 1.0 / max(areaCell(iCell), 1.0)
! Compute pv at cell centers
- ! ( this computes pv_cell for all real cells and distance-1 ghost cells )
+ ! ( this computes Vor_cell for all real cells and distance-1 ghost cells )
do k = 1,maxLevelCell(iCell)
- pv_cell(k,iCell) = pv_cell(k,iCell) + kiteAreasOnVertex(i, iVertex) * pv_vertex(k, iVertex) * invAreaCell1
+ Vor_cell(k,iCell) = Vor_cell(k,iCell) + kiteAreasOnVertex(i, iVertex) * Vor_vertex(k, iVertex) * invAreaCell1
enddo
! Compute pv at the edges
- ! ( this computes pv_edge at all edges bounding real cells )
+ ! ( this computes Vor_edge at all edges bounding real cells )
do k=1,maxLevelEdgeBot(iEdge)
- pv_edge(k,iEdge) = pv_edge(k,iEdge) + 0.5 * pv_vertex(k,iVertex)
+ Vor_edge(k,iEdge) = Vor_edge(k,iEdge) + 0.5 * Vor_vertex(k,iVertex)
enddo
enddo
enddo
-! gradPVn(:,:) = 0.0
-! gradPVt(:,:) = 0.0
+! gradVor_n(:,:) = 0.0
+! gradVor_t(:,:) = 0.0
do iEdge = 1,nEdges
cell1 = cellsOnEdge(1, iEdge)
cell2 = cellsOnEdge(2, iEdge)
@@ -742,16 +715,16 @@
invLength = 1.0 / dcEdge(iEdge)
! Compute gradient of PV in normal direction
- ! ( this computes gradPVn for all edges bounding real cells )
+ ! ( this computes gradVor_n for all edges bounding real cells )
do k=1,maxLevelEdgeTop(iEdge)
- gradPVn(k,iEdge) = (pv_cell(k,cell2) - pv_cell(k,cell1)) * invLength
+ gradVor_n(k,iEdge) = (Vor_cell(k,cell2) - Vor_cell(k,cell1)) * invLength
enddo
invLength = 1.0 / dvEdge(iEdge)
! Compute gradient of PV in the tangent direction
- ! ( this computes gradPVt at all edges bounding real cells and distance-1 ghost cells )
+ ! ( this computes gradVor_t at all edges bounding real cells and distance-1 ghost cells )
do k = 1,maxLevelEdgeBot(iEdge)
- gradPVt(k,iEdge) = (pv_vertex(k,vertex2) - pv_vertex(k,vertex1)) * invLength
+ gradVor_t(k,iEdge) = (Vor_vertex(k,vertex2) - Vor_vertex(k,vertex1)) * invLength
enddo
enddo
@@ -761,9 +734,9 @@
!
do iEdge = 1,nEdges
do k = 1,maxLevelEdgeBot(iEdge)
- pv_edge(k,iEdge) = pv_edge(k,iEdge) &
- - 0.5 * dt* ( u(k,iEdge) * gradPVn(k,iEdge) &
- + v(k,iEdge) * gradPVt(k,iEdge) )
+ Vor_edge(k,iEdge) = Vor_edge(k,iEdge) &
+ - config_apvm_scale_factor * dt* ( u(k,iEdge) * gradVor_n(k,iEdge) &
+ + v(k,iEdge) * gradVor_t(k,iEdge) )
enddo
enddo
@@ -872,23 +845,13 @@
!> This routine computes the vertical velocity in the top layer for the ocean
!
!-----------------------------------------------------------------------
-
subroutine ocn_wtop(s1,s2, grid)!{{{
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- ! Compute diagnostic fields used in the tendency computations
- !
- ! Input: grid - grid metadata
- !
- ! Output: s - computed diagnostics
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
implicit none
- type (state_type), intent(inout) :: s1
- type (state_type), intent(inout) :: s2
- type (mesh_type), intent(in) :: grid
+ type (state_type), intent(inout) :: s1 !< Input/Output: State 1 information
+ type (state_type), intent(inout) :: s2 !< Input/Output: State 2 information
+ type (mesh_type), intent(in) :: grid !< Input: Grid information
- ! mrp 110512 could clean this out, remove pointers?
integer :: iEdge, iCell, iVertex, k, cell1, cell2, vertex1, vertex2, eoe, i, j, cov
real (kind=RKIND) :: flux, vorticity_abs, h_vertex, workpv, rho0Inv, hSum
@@ -1062,19 +1025,10 @@
!-----------------------------------------------------------------------
subroutine ocn_fuperp(s, grid)!{{{
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- ! Put f*uBcl^{perp} in u as a work variable
- !
- ! Input: s - current model state
- ! grid - grid metadata
- !
- ! Output: tend - computed tendencies for prognostic variables
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
implicit none
- type (state_type), intent(inout) :: s
- type (mesh_type), intent(in) :: grid
+ type (state_type), intent(inout) :: s !< Input/Output: State information
+ type (mesh_type), intent(in) :: grid !< Input: Grid information
! mrp 110512 I just split compute_tend into compute_tend_u and compute_tend_h.
! Some of these variables can be removed, but at a later time.
@@ -1137,9 +1091,8 @@
!> other tendency routines.
!
!-----------------------------------------------------------------------
-
subroutine ocn_tendency_init(err)!{{{
- integer, intent(out) :: err
+ integer, intent(out) :: err !< Output: Error flag
err = 0
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tendency.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_tendency.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_tendency.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_tendency.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_tendency.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_tendency.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tendency.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_tendency.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_tendency.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_tendency.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_tendency.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_tendency.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_tendency.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_tendency.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_thick_hadv.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_thick_hadv.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_thick_hadv.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_thick_hadv.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_thick_hadv.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_thick_hadv.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_thick_hadv.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_thick_hadv.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_thick_hadv.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_thick_hadv.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_thick_hadv.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_thick_hadv.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_thick_hadv.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_thick_hadv.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_thick_vadv.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_thick_vadv.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_thick_vadv.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_thick_vadv.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_thick_vadv.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_thick_vadv.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_thick_vadv.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_thick_vadv.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_thick_vadv.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_thick_vadv.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_thick_vadv.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_thick_vadv.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_thick_vadv.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_thick_vadv.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_time_integration.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_time_integration.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_time_integration.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_time_integration.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_time_integration.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_time_integration.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_time_integration.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_time_integration.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_time_integration.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_time_integration.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_time_integration.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_time_integration.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_time_integration.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_time_integration.F:924-962
Modified: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_time_integration_rk4.F
===================================================================
--- branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_time_integration_rk4.F        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_time_integration_rk4.F        2012-03-15 22:11:29 UTC (rev 1652)
@@ -144,7 +144,7 @@
call mpas_timer_start("RK4-diagnostic halo update")
block => domain % blocklist
do while (associated(block))
- call mpas_dmpar_exch_halo_field2d_real(domain % dminfo, provis % pv_edge % array(:,:), &
+ call mpas_dmpar_exch_halo_field2d_real(domain % dminfo, provis % Vor_edge % array(:,:), &
block % mesh % nVertLevels, block % mesh % nEdges, &
block % parinfo % edgesToSend, block % parinfo % edgesToRecv)
@@ -173,7 +173,7 @@
if (.not.config_implicit_vertical_mix) then
call ocn_vmix_coefs(block % mesh, provis, block % diagnostics, err)
end if
- call ocn_tend_h(block % tend, provis, block % diagnostics, block % mesh)
+ call ocn_tend_h(block % tend, provis, block % mesh)
call ocn_tend_u(block % tend, provis, block % diagnostics, block % mesh)
! mrp 110718 filter btr mode out of u_tend
@@ -182,7 +182,7 @@
call filter_btr_mode_tend_u(block % tend, provis, block % diagnostics, block % mesh)
endif
- call ocn_tend_scalar(block % tend, provis, block % diagnostics, block % mesh)
+ call ocn_tend_scalar(block % tend, provis, block % diagnostics, block % mesh, dt)
block => block % next
end do
call mpas_timer_stop("RK4-tendency computations")
@@ -231,6 +231,14 @@
provis % u % array(:,:) = block % state % time_levs(1) % state % u % array(:,:)
end if
+ if (config_prescribe_velocity) then
+ provis % u % array(:,:) = block % state % time_levs(1) % state % u % array(:,:)
+ end if
+
+ if (config_prescribe_thickness) then
+ provis % h % array(:,:) = block % state % time_levs(1) % state % h % array(:,:)
+ end if
+
call ocn_diagnostic_solve(dt, provis, block % mesh)
block => block % next
@@ -325,6 +333,14 @@
block % state % time_levs(2) % state % u % array(:,:) = block % state % time_levs(1) % state % u % array(:,:)
end if
+ if (config_prescribe_velocity) then
+ block % state % time_levs(2) % state % u % array(:,:) = block % state % time_levs(1) % state % u % array(:,:)
+ end if
+
+ if (config_prescribe_thickness) then
+ block % state % time_levs(2) % state % h % array(:,:) = block % state % time_levs(1) % state % h % array(:,:)
+ end if
+
call ocn_diagnostic_solve(dt, block % state % time_levs(2) % state, block % mesh)
call mpas_reconstruct(block % mesh, block % state % time_levs(2) % state % u % array, &
@@ -374,7 +390,7 @@
meshScalingDel2, meshScalingDel4
real (kind=RKIND), dimension(:,:), pointer :: &
weightsOnEdge, kiteAreasOnVertex, h_edge, h, u, v, pressure, &
- tend_u, circulation, vorticity, ke, ke_edge, pv_edge, &
+ tend_u, circulation, vorticity, ke, ke_edge, Vor_edge, &
MontPot, wTop, divergence, vertViscTopOfEdge
type (dm_info) :: dminfo
@@ -406,7 +422,7 @@
divergence => s % divergence % array
ke => s % ke % array
ke_edge => s % ke_edge % array
- pv_edge => s % pv_edge % array
+ Vor_edge => s % Vor_edge % array
MontPot => s % MontPot % array
pressure => s % pressure % array
vertViscTopOfEdge => d % vertViscTopOfEdge % array
@@ -489,7 +505,7 @@
meshScalingDel2, meshScalingDel4
real (kind=RKIND), dimension(:,:), pointer :: &
weightsOnEdge, kiteAreasOnVertex, h_edge, h, u, v, pressure, &
- tend_u, circulation, vorticity, ke, ke_edge, pv_edge, &
+ tend_u, circulation, vorticity, ke, ke_edge, Vor_edge, &
MontPot, wTop, divergence, vertViscTopOfEdge
type (dm_info) :: dminfo
@@ -521,7 +537,7 @@
divergence => s % divergence % array
ke => s % ke % array
ke_edge => s % ke_edge % array
- pv_edge => s % pv_edge % array
+ Vor_edge => s % Vor_edge % array
MontPot => s % MontPot % array
pressure => s % pressure % array
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_time_integration_rk4.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_time_integration_rk4.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_time_integration_rk4.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_time_integration_rk4.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_time_integration_rk4.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_time_integration_rk4.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_time_integration_rk4.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_time_integration_rk4.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_time_integration_rk4.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_time_integration_rk4.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_time_integration_rk4.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_time_integration_rk4.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_time_integration_rk4.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_time_integration_rk4.F:924-962
Modified: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_time_integration_split.F
===================================================================
--- branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_time_integration_split.F        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_time_integration_split.F        2012-03-15 22:11:29 UTC (rev 1652)
@@ -167,7 +167,7 @@
do while (associated(block))
call mpas_dmpar_exch_halo_field2d_real(domain % dminfo, &
- block % state % time_levs(2) % state % pv_edge % array(:,:), &
+ block % state % time_levs(2) % state % Vor_edge % array(:,:), &
block % mesh % nVertLevels, block % mesh % nEdges, &
block % parinfo % edgesToSend, block % parinfo % edgesToRecv)
@@ -200,7 +200,7 @@
if (.not.config_implicit_vertical_mix) then
call ocn_vmix_coefs(block % mesh, block % state % time_levs(2) % state, block % diagnostics, err)
end if
- call ocn_tend_u(block % tend, block % state % time_levs(2) % state , block % diagnostics, block % mesh)
+ call ocn_tend_u(block % tend, block % state % time_levs(2) % state, block % diagnostics, block % mesh)
block => block % next
end do
@@ -716,13 +716,12 @@
!TDR: at this point, I am suggesting just pushing some of this code into subroutines.
!TDR: see comments farther down
+ ! dwj: 02/22/12 splitting thickness and tracer tendency computations and halo updates to allow monotonic advection.
block => domain % blocklist
do while (associated(block))
call ocn_wtop(block % state % time_levs(1) % state,block % state % time_levs(2) % state, block % mesh)
- call ocn_tend_h (block % tend, block % state % time_levs(2) % state , block % diagnostics, block % mesh)
- call ocn_tend_scalar(block % tend, block % state % time_levs(2) % state , block % diagnostics, block % mesh)
-
+ call ocn_tend_h(block % tend, block % state % time_levs(2) % state, block % mesh)
block => block % next
end do
@@ -733,14 +732,31 @@
call mpas_dmpar_exch_halo_field2d_real(domain % dminfo, block % tend % h % array(:,:), &
block % mesh % nVertLevels, block % mesh % nCells, &
block % parinfo % cellsToSend, block % parinfo % cellsToRecv)
-
block => block % next
end do
call mpas_timer_stop("se halo h", timer_halo_h)
block => domain % blocklist
do while (associated(block))
+ call ocn_tend_scalar(block % tend, block % state % time_levs(2) % state, block % diagnostics, block % mesh, dt)
+ block => block % next
+ end do
+
+ ! update halo for thickness and tracer tendencies
+ call mpas_timer_start("se halo tracers", .false., timer_halo_tracers)
+ block => domain % blocklist
+ do while (associated(block))
+ call mpas_dmpar_exch_halo_field3d_real(domain % dminfo, block % tend % tracers % array(:,:,:), &
+ block % tend % num_tracers, block % mesh % nVertLevels, block % mesh % nCells, &
+ block % parinfo % cellsToSend, block % parinfo % cellsToRecv)
+ block => block % next
+ end do
+ call mpas_timer_stop("se halo tracers", timer_halo_tracers)
+
+ block => domain % blocklist
+ do while (associated(block))
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! If iterating, reset variables for next iteration
@@ -846,22 +862,8 @@
block => block % next
end do
- ! Boundary update on tracers. This is placed here, rather than
- ! on tend % tracers as in RK4, because I needed to update
- ! afterwards for the del4 diffusion operator.
- call mpas_timer_start("se halo tracers", .false., timer_halo_tracers)
- block => domain % blocklist
- do while (associated(block))
- call mpas_dmpar_exch_halo_field3d_real(domain % dminfo, block % state % time_levs(2) % state % tracers % array(:,:,:), &
- block % tend % num_tracers, block % mesh % nVertLevels, block % mesh % nCells, block % parinfo % cellsToSend, block % parinfo % cellsToRecv)
- block => block % next
- end do
- call mpas_timer_stop("se halo tracers", timer_halo_tracers)
-
-
-
end do ! split_explicit_step = 1, config_n_ts_iter
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! END large iteration loop
@@ -901,6 +903,15 @@
if (config_test_case == 1) then ! For case 1, wind field should be fixed
block % state % time_levs(2) % state % u % array(:,:) = block % state % time_levs(1) % state % u % array(:,:)
end if
+
+ if (config_prescribe_velocity) then
+ block % state % time_levs(2) % state % u % array(:,:) = block % state % time_levs(1) % state % u % array(:,:)
+ end if
+
+ if (config_prescribe_thickness) then
+ block % state % time_levs(2) % state % h % array(:,:) = block % state % time_levs(1) % state % h % array(:,:)
+ end if
+
call ocn_diagnostic_solve(dt, block % state % time_levs(2) % state, block % mesh)
call mpas_reconstruct(block % mesh, block % state % time_levs(2) % state % u % array, &
block % state % time_levs(2) % state % uReconstructX % array, &
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_time_integration_split.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_time_integration_split.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_time_integration_split.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_time_integration_split.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_time_integration_split.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_time_integration_split.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_time_integration_split.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_time_integration_split.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_time_integration_split.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_time_integration_split.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_time_integration_split.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_time_integration_split.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_time_integration_split.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_time_integration_split.F:924-962
Copied: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection.F (from rev 1651, trunk/mpas/src/core_ocean/mpas_ocn_tracer_advection.F)
===================================================================
--- branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection.F         (rev 0)
+++ branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection.F        2012-03-15 22:11:29 UTC (rev 1652)
@@ -0,0 +1,316 @@
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! ocn_tracer_advection
+!
+!> \brief MPAS ocean tracer advection driver
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This module contains driver routine for tracer advection tendencys
+!> as well as the routines for setting up advection coefficients and
+!> initialization of the advection routines.
+!
+!-----------------------------------------------------------------------
+
+module mpas_ocn_tracer_advection
+
+ use mpas_kind_types
+ use mpas_grid_types
+ use mpas_configure
+
+ use mpas_ocn_tracer_advection_std
+ use mpas_ocn_tracer_advection_mono
+
+ implicit none
+ private
+ save
+
+ public :: mpas_ocn_tracer_advection_init, &
+ mpas_ocn_tracer_advection_coefficients, &
+ mpas_ocn_tracer_advection_tend
+
+ logical :: monotonicOn
+
+ contains
+
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! routine mpas_ocn_tracer_advection_coefficients
+!
+!> \brief MPAS ocean tracer advection coefficients
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This routine precomputes the advection coefficients for horizontal
+!> advection of tracers.
+!
+!-----------------------------------------------------------------------
+ subroutine mpas_ocn_tracer_advection_coefficients( grid, err )!{{{
+
+ implicit none
+ type (mesh_type) :: grid !< Input: Grid information
+ integer, intent(out) :: err
+
+ real (kind=RKIND), dimension(:,:,:), pointer :: deriv_two
+ real (kind=RKIND), dimension(:,:), pointer :: adv_coefs, adv_coefs_2nd, adv_coefs_3rd
+ integer, dimension(:,:), pointer :: cellsOnCell, cellsOnEdge, advCellsForEdge, highOrderAdvectionMask, lowOrderAdvectionMask, boundaryCell
+ integer, dimension(:), pointer :: nEdgesOnCell, nAdvCellsForEdge, maxLevelCell
+
+ integer, dimension(:), pointer :: cell_list, ordered_cell_list
+ integer :: cell1, cell2, iEdge, n, i, j, j_in, iCell, k, nVertLevels
+ logical :: addcell, highOrderAdvection
+
+ deriv_two => grid % deriv_two % array
+ adv_coefs => grid % adv_coefs % array
+ adv_coefs_2nd => grid % adv_coefs_2nd % array
+ adv_coefs_3rd => grid % adv_coefs_3rd % array
+ cellsOnCell => grid % cellsOnCell % array
+ cellsOnEdge => grid % cellsOnEdge % array
+ advCellsForEdge => grid % advCellsForEdge % array
+ boundaryCell => grid % boundaryCell % array
+ highOrderAdvectionMask => grid % highOrderAdvectionMask % array
+ lowOrderAdvectionMask => grid % lowOrderAdvectionMask % array
+ nEdgesOnCell => grid % nEdgesOnCell % array
+ maxLevelCell => grid % maxLevelCell % array
+ nAdvCellsForEdge => grid % nAdvCellsForEdge % array
+
+ nVertLevels = grid % nVertLevels
+
+ allocate(cell_list(grid % maxEdges2 + 2))
+ allocate(ordered_cell_list(grid % maxEdges2 + 2))
+
+ err = 0
+
+ highOrderAdvectionMask = 0
+ lowOrderAdvectionMask = 0
+ if(config_horiz_tracer_adv_order == 2) then
+
+ end if
+
+ do iEdge = 1, grid % nEdges
+ nAdvCellsForEdge(iEdge) = 0
+ cell1 = cellsOnEdge(1,iEdge)
+ cell2 = cellsOnEdge(2,iEdge)
+
+
+ do k = 1, nVertLevels
+ if (boundaryCell(k, cell1) == 1 .or. boundaryCell(k, cell2) == 1) then
+ highOrderAdvectionMask(k, iEdge) = 0
+ lowOrderAdvectionMask(k, iEdge) = 1
+ else
+ highOrderAdvectionMask(k, iEdge) = 1
+ lowOrderAdvectionMask(k, iEdge) = 0
+ end if
+ end do
+
+ !
+ ! do only if this edge flux is needed to update owned cells
+ !
+ if (cell1 <= grid%nCells .or. cell2 <= grid%nCells) then
+
+ cell_list(1) = cell1
+ cell_list(2) = cell2
+ n = 2
+
+ ! add cells surrounding cell 1. n is number of cells currently in list
+ do i = 1, nEdgesOnCell(cell1)
+ if(cellsOnCell(i,cell1) /= cell2) then
+ n = n + 1
+ cell_list(n) = cellsOnCell(i,cell1)
+ end if
+ end do
+
+ ! add cells surrounding cell 2 (brute force approach)
+ do iCell = 1, nEdgesOnCell(cell2)
+ addcell = .true.
+ do i=1,n
+ if(cell_list(i) == cellsOnCell(iCell,cell2)) addcell = .false.
+ end do
+ if(addcell) then
+ n = n+1
+ cell_list(n) = cellsOnCell(iCell,cell2)
+ end if
+ end do
+
+ ! order the list by increasing cell number (brute force approach)
+
+ do i=1,n
+ ordered_cell_list(i) = grid % nCells + 2
+ j_in = 1
+ do j=1,n
+ if(ordered_cell_list(i) > cell_list(j) ) then
+ j_in = j
+ ordered_cell_list(i) = cell_list(j)
+ end if
+ end do
+! ordered_cell_list(i) = cell_list(j_in)
+ cell_list(j_in) = grid % nCells + 3
+ end do
+
+ nAdvCellsForEdge(iEdge) = n
+ do iCell = 1, nAdvCellsForEdge(iEdge)
+ advCellsForEdge(iCell,iEdge) = ordered_cell_list(iCell)
+ end do
+
+ ! we have the ordered list, now construct coefficients
+
+ adv_coefs(:,iEdge) = 0.
+ adv_coefs_2nd(:,iEdge) = 0.
+ adv_coefs_3rd(:,iEdge) = 0.
+
+ ! pull together third and fourth order contributions to the flux
+ ! first from cell1
+
+ j_in = 0
+ do j=1, n
+ if( ordered_cell_list(j) == cell1 ) j_in = j
+ end do
+ adv_coefs (j_in,iEdge) = adv_coefs (j_in,iEdge) + deriv_two(1,1,iEdge)
+ adv_coefs_3rd(j_in,iEdge) = adv_coefs_3rd(j_in,iEdge) + deriv_two(1,1,iEdge)
+
+ do iCell = 1, nEdgesOnCell(cell1)
+ j_in = 0
+ do j=1, n
+ if( ordered_cell_list(j) == cellsOnCell(iCell,cell1) ) j_in = j
+ end do
+ adv_coefs (j_in,iEdge) = adv_coefs (j_in,iEdge) + deriv_two(iCell+1,1,iEdge)
+ adv_coefs_3rd(j_in,iEdge) = adv_coefs_3rd(j_in,iEdge) + deriv_two(iCell+1,1,iEdge)
+ end do
+
+ ! pull together third and fourth order contributions to the flux
+ ! now from cell2
+
+ j_in = 0
+ do j=1, n
+ if( ordered_cell_list(j) == cell2 ) j_in = j
+ enddo
+ adv_coefs (j_in,iEdge) = adv_coefs (j_in,iEdge) + deriv_two(1,2,iEdge)
+ adv_coefs_3rd(j_in,iEdge) = adv_coefs_3rd(j_in,iEdge) - deriv_two(1,2,iEdge)
+
+ do iCell = 1, nEdgesOnCell(cell2)
+ j_in = 0
+ do j=1, n
+ if( ordered_cell_list(j) == cellsOnCell(iCell,cell2) ) j_in = j
+ enddo
+ adv_coefs (j_in,iEdge) = adv_coefs (j_in,iEdge) + deriv_two(iCell+1,2,iEdge)
+ adv_coefs_3rd(j_in,iEdge) = adv_coefs_3rd(j_in,iEdge) - deriv_two(iCell+1,2,iEdge)
+ end do
+
+ do j = 1,n
+ adv_coefs (j,iEdge) = - (grid % dcEdge % array (iEdge) **2) * adv_coefs (j,iEdge) / 12.
+ adv_coefs_3rd(j,iEdge) = - (grid % dcEdge % array (iEdge) **2) * adv_coefs_3rd(j,iEdge) / 12.
+ end do
+
+ ! 2nd order centered contribution - place this in the main flux weights
+
+ j_in = 0
+ do j=1, n
+ if( ordered_cell_list(j) == cell1 ) j_in = j
+ enddo
+ adv_coefs(j_in,iEdge) = adv_coefs(j_in,iEdge) + 0.5
+ adv_coefs_2nd(j_in,iEdge) = adv_coefs_2nd(j_in,iEdge) + 0.5
+
+ j_in = 0
+ do j=1, n
+ if( ordered_cell_list(j) == cell2 ) j_in = j
+ enddo
+ adv_coefs(j_in,iEdge) = adv_coefs(j_in,iEdge) + 0.5
+ adv_coefs_2nd(j_in,iEdge) = adv_coefs_2nd(j_in,iEdge) + 0.5
+
+ ! multiply by edge length - thus the flux is just dt*ru times the results of the vector-vector multiply
+
+ do j=1,n
+ adv_coefs (j,iEdge) = grid % dvEdge % array(iEdge) * adv_coefs (j,iEdge)
+ adv_coefs_2nd(j,iEdge) = grid % dvEdge % array(iEdge) * adv_coefs_2nd(j,iEdge)
+ adv_coefs_3rd(j,iEdge) = grid % dvEdge % array(iEdge) * adv_coefs_3rd(j,iEdge)
+ end do
+
+ end if ! only do for edges of owned-cells
+
+ end do ! end loop over edges
+
+ deallocate(cell_list)
+ deallocate(ordered_cell_list)
+
+ ! If 2nd order advection, set masks appropriately.
+ if(config_horiz_tracer_adv_order == 2) then
+ lowOrderAdvectionMask = 1
+ highOrderAdvectionMask = 0
+ end if
+
+ if (maxval(highOrderAdvectionMask+lowOrderAdvectionMask) > 1) then
+ write(*,*) "Masks don't sum to 1."
+ err = 1
+ endif
+
+ end subroutine mpas_ocn_tracer_advection_coefficients!}}}
+
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! routine mpas_ocn_tracer_advection_tend
+!
+!> \brief MPAS ocean tracer advection tendency
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This routine is the driver routine for computing the tendency for
+!> advection of tracers.
+!
+!-----------------------------------------------------------------------
+ subroutine mpas_ocn_tracer_advection_tend(tracers, uh, w, h, verticalCellSize, dt, grid, tend_h, tend)!{{{
+
+ real (kind=RKIND), dimension(:,:,:), intent(inout) :: tend !< Input/Output: tracer tendency
+ real (kind=RKIND), dimension(:,:,:), intent(in) :: tracers !< Input/Output: tracer values
+ real (kind=RKIND), dimension(:,:), intent(in) :: uh !< Input: Thickness weighted horizontal velocity
+ real (kind=RKIND), dimension(:,:), intent(in) :: w !< Input: Vertical velocity
+ real (kind=RKIND), dimension(:,:), intent(in) :: h !< Input: Thickness field
+ real (kind=RKIND), dimension(:,:), intent(in) :: verticalCellSize !< Input: Distance between vertical interfaces of a cell
+ real (kind=RKIND), intent(in) :: dt !< Input: Time step
+ type (mesh_type), intent(in) :: grid !< Input: grid information
+ real (kind=RKIND), dimension(:,:), intent(in) :: tend_h !< Input: Thickness tendency information
+
+ if(monotonicOn) then
+ call mpas_ocn_tracer_advection_mono_tend(tracers, uh, w, h, verticalCellSize, dt, grid, tend_h, tend)
+ else
+ call mpas_ocn_tracer_advection_std_tend(tracers, uh, w, verticalCellSize, grid, tend)
+ endif
+ end subroutine mpas_ocn_tracer_advection_tend!}}}
+
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! routine mpas_ocn_tracer_advection_init
+!
+!> \brief MPAS ocean tracer advection tendency
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This routine is the driver routine for initialization of
+!> the tracer advection routines.
+!
+!-----------------------------------------------------------------------
+ subroutine mpas_ocn_tracer_advection_init(err)!{{{
+
+ integer, intent(inout) :: err !< Input/Output: Error flag
+
+ integer :: err_tmp
+
+ err = 0
+
+ call mpas_ocn_tracer_advection_std_init(err_tmp)
+ call mpas_ocn_tracer_advection_mono_init(err_tmp)
+
+ err = ior(err, err_tmp)
+
+ monotonicOn = .false.
+
+ if(config_monotonic) then
+ monotonicOn = .true.
+ endif
+
+ end subroutine mpas_ocn_tracer_advection_init!}}}
+
+end module mpas_ocn_tracer_advection
Copied: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection_helpers.F (from rev 1651, trunk/mpas/src/core_ocean/mpas_ocn_tracer_advection_helpers.F)
===================================================================
--- branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection_helpers.F         (rev 0)
+++ branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection_helpers.F        2012-03-15 22:11:29 UTC (rev 1652)
@@ -0,0 +1,68 @@
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! ocn_tracer_advection_helpers
+!
+!> \brief MPAS ocean tracer advection helper functions
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This module contains helper functions tracer advection.
+!
+!-----------------------------------------------------------------------
+module mpas_ocn_tracer_advection_helpers
+
+ use mpas_kind_types
+
+ implicit none
+ save
+
+ contains
+
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! function mpas_ocn_tracer_advection_vflux4
+!
+!> \brief MPAS ocean 4th order vertical tracer advection stencil
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This function provides the stencil for 4th order vertical advection of tracers.
+!
+!-----------------------------------------------------------------------
+ real function mpas_ocn_tracer_advection_vflux4(q_im2, q_im1, q_i, q_ip1, w)!{{{
+ real (kind=RKIND), intent(in) :: q_im2 !< Input: Tracer value at index i-2
+ real (kind=RKIND), intent(in) :: q_im1 !< Input: Tracer value at index i-1
+ real (kind=RKIND), intent(in) :: q_i !< Input: Tracer value at index i
+ real (kind=RKIND), intent(in) :: q_ip1 !< Input: Tracer value at index i+1
+ real (kind=RKIND), intent(in) :: w !< Input: vertical veloicity
+ mpas_ocn_tracer_advection_vflux4 = w*( 7.*(q_i + q_im1) - (q_ip1 + q_im2) )/12.0
+ end function!}}}
+
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! function mpas_ocn_tracer_advection_vflux3
+!
+!> \brief MPAS ocean 3rd order vertical tracer advection stencil
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This function provides the stencil for 3rd order vertical advection of tracers.
+!
+!-----------------------------------------------------------------------
+ real function mpas_ocn_tracer_advection_vflux3( q_im2, q_im1, q_i, q_ip1, w, coef)!{{{
+ real (kind=RKIND), intent(in) :: q_im2 !< Input: Tracer value at index i-2
+ real (kind=RKIND), intent(in) :: q_im1 !< Input: Tracer value at index i-1
+ real (kind=RKIND), intent(in) :: q_i !< Input: Tracer value at index i
+ real (kind=RKIND), intent(in) :: q_ip1 !< Input: Tracer value at index i+1
+ real (kind=RKIND), intent(in) :: w !< Input: vertical veloicity
+ real (kind=RKIND), intent(in) :: coef !< Input: Advection coefficient
+
+ !dwj 02/21/12 flux3 is different in ocean and atmosphere
+ !flux3 = (u * (7.0 * (q_i + q_im1) - (q_ip1 + q_im2)) + coef * abs(u) * ((q_ip1 - q_im2) - 3.0*(q_i-q_im1)))/12.0
+ mpas_ocn_tracer_advection_vflux3 = (w * (7.0 * (q_i + q_im1) - (q_ip1 + q_im2)) - coef * abs(w) * ((q_ip1 - q_im2) - 3.0*(q_i-q_im1)))/12.0
+ end function!}}}
+
+end module mpas_ocn_tracer_advection_helpers
Copied: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection_mono.F (from rev 1651, trunk/mpas/src/core_ocean/mpas_ocn_tracer_advection_mono.F)
===================================================================
--- branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection_mono.F         (rev 0)
+++ branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection_mono.F        2012-03-15 22:11:29 UTC (rev 1652)
@@ -0,0 +1,382 @@
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! ocn_tracer_advection_mono
+!
+!> \brief MPAS ocean monotonic tracer advection with FCT
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This module contains routines for monotonic advection of tracers using a FCT
+!
+!-----------------------------------------------------------------------
+module mpas_ocn_tracer_advection_mono
+
+ use mpas_kind_types
+ use mpas_grid_types
+ use mpas_configure
+ use mpas_dmpar
+
+ use mpas_ocn_tracer_advection_helpers
+
+ implicit none
+ private
+ save
+
+ real (kind=RKIND) :: coef_3rd_order
+
+ public :: mpas_ocn_tracer_advection_mono_tend, &
+ mpas_ocn_tracer_advection_mono_init
+
+ contains
+
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! routine mpas_ocn_tracer_advection_mono_tend
+!
+!> \brief MPAS ocean monotonic tracer advection tendency with FCT
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This routine computes the monotonic tracer advection tendencity using a FCT.
+!> Both horizontal and vertical.
+!
+!-----------------------------------------------------------------------
+ subroutine mpas_ocn_tracer_advection_mono_tend(tracers, uh, w, h, verticalCellSize, dt, grid, tend_h, tend)!{{{
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !
+ ! Input: s - current model state
+ ! grid - grid metadata
+ !
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+ real (kind=RKIND), dimension(:,:,:), intent(in) :: tracers !< Input: current tracer values
+ real (kind=RKIND), dimension(:,:), intent(in) :: uh !< Input: Thichness weighted velocitiy
+ real (kind=RKIND), dimension(:,:), intent(in) :: w !< Input: Vertical velocitiy
+ real (kind=RKIND), dimension(:,:), intent(in) :: h !< Input: Thickness
+ real (kind=RKIND), dimension(:,:), intent(in) :: verticalCellSize !< Input: Distance between vertical interfaces of a cell
+ real (kind=RKIND), dimension(:,:), intent(in) :: tend_h !< Input: Tendency for thickness field
+ real (kind=RKIND), intent(in) :: dt !< Input: Timestep
+ type (mesh_type), intent(in) :: grid !< Input: Grid information
+ real (kind=RKIND), dimension(:,:,:), intent(inout) :: tend !< Input/Output: Tracer tendency
+
+ integer :: i, iCell, iEdge, k, iTracer, cell1, cell2
+ integer :: nVertLevels, num_tracers, nCells, nEdges, nCellsSolve
+ integer, dimension(:), pointer :: nAdvCellsForEdge, maxLevelCell, maxLevelEdgeTop, nEdgesOnCell
+ integer, dimension(:,:), pointer :: cellsOnEdge, cellsOnCell, advCellsForEdge, highOrderAdvectionMask, lowOrderAdvectionMask
+
+ real (kind=RKIND) :: flux_upwind, tracer_min_new, tracer_max_new, tracer_upwind_new, scale_factor
+ real (kind=RKIND) :: flux, tracer_weight, invDvEdge, invAreaCell1, invAreaCell2
+ real (kind=RKIND) :: cur_max, cur_min, new_max, new_min
+ real (kind=RKIND) :: verticalWeightK, verticalWeightKm1
+ real (kind=RKIND), dimension(:), pointer :: dvEdge, areaCell
+ real (kind=RKIND), dimension(:,:), pointer :: adv_coefs, adv_coefs_2nd, adv_coefs_3rd
+ real (kind=RKIND), dimension(:,:), pointer :: tracer_cur, tracer_new, upwind_tendency, inv_h_new, tracer_max, tracer_min
+ real (kind=RKIND), dimension(:,:), pointer :: flux_incoming, flux_outgoing, high_order_horiz_flux, high_order_vert_flux
+
+ real (kind=RKIND), parameter :: eps = 1.e-10
+
+ ! Initialize pointers
+ dvEdge => grid % dvEdge % array
+ cellsOnEdge => grid % cellsOnEdge % array
+ cellsOnCell => grid % cellsOnCell % array
+ areaCell => grid % areaCell % array
+
+ nEdgesOnCell => grid % nEdgesOnCell % array
+ nAdvCellsForEdge => grid % nAdvCellsForEdge % array
+ advCellsForEdge => grid % advCellsForEdge % array
+ adv_coefs => grid % adv_coefs % array
+ adv_coefs_2nd => grid % adv_coefs_2nd % array
+ adv_coefs_3rd => grid % adv_coefs_3rd % array
+ maxLevelCell => grid % maxLevelCell % array
+ maxLevelEdgeTop => grid % maxLevelEdgeTop % array
+ highOrderAdvectionMask => grid % highOrderAdvectionMask % array
+ lowOrderAdvectionMask => grid % lowOrderAdvectionMask % array
+
+ nCells = grid % nCells
+ nCellsSolve = grid % nCellsSolve
+ nEdges = grid % nEdges
+ nVertLevels = grid % nVertLevels
+ num_tracers = size(tracers,dim=1)
+
+ ! allocate nCells arrays
+
+ allocate(tracer_new(nVertLevels, nCells))
+ allocate(tracer_cur(nVertLevels, nCells))
+ allocate(upwind_tendency(nVertLevels, nCells))
+ allocate(inv_h_new(nVertLevels, nCells))
+ allocate(tracer_max(nVertLevels, nCells))
+ allocate(tracer_min(nVertLevels, nCells))
+ allocate(flux_incoming(nVertLevels, nCells))
+ allocate(flux_outgoing(nVertLevels, nCells))
+
+ ! allocate nEdges arrays
+ allocate(high_order_horiz_flux(nVertLevels, nEdges))
+
+ ! allocate nVertLevels+1 and nCells arrays
+ allocate(high_order_vert_flux(nVertLevels+1, nCells))
+
+ do iCell = 1, nCells
+ do k=1, maxLevelCell(iCell)
+ inv_h_new(k, iCell) = 1.0 / (h(k, iCell) + dt * tend_h(k, iCell))
+ end do
+ end do
+
+ ! Loop over tracers. One tracer is advected at a time. It is copied into a temporary array in order to improve locality
+ do iTracer = 1, num_tracers
+ ! Initialize variables for use in this iTracer iteration
+ do iCell = 1, nCells
+ do k=1, maxLevelCell(iCell)
+ tracer_cur(k,iCell) = tracers(iTracer,k,iCell)
+ upwind_tendency(k, iCell) = 0.0
+
+ !tracer_new is supposed to be the "new" tracer state. This allows bounds checks.
+ if (config_check_monotonicity) then
+ tracer_new(k,iCell) = 0.0
+ end if
+ end do ! k loop
+ end do ! iCell loop
+
+ high_order_vert_flux = 0.0
+ high_order_horiz_flux = 0.0
+
+ ! Compute the high order vertical flux. Also determine bounds on tracer_cur.
+ do iCell = 1, nCells
+ k = 1
+ tracer_max(k,iCell) = max(tracer_cur(k,iCell),tracer_cur(k+1,iCell))
+ tracer_min(k,iCell) = min(tracer_cur(k,iCell),tracer_cur(k+1,iCell))
+
+ k = 2
+ verticalWeightK = verticalCellSize(k-1, iCell) / (verticalCellSize(k, iCell) + verticalCellSize(k-1, iCell))
+ verticalWeightKm1 = verticalCellSize(k, iCell) / (verticalCellSize(k, iCell) + verticalCellSize(k-1, iCell))
+ high_order_vert_flux(k,iCell) = w(k,iCell)*(verticalWeightK*tracer_cur(k,iCell)+verticalWeightKm1*tracer_cur(k-1,iCell))
+ tracer_max(k,iCell) = max(tracer_cur(k-1,iCell),tracer_cur(k,iCell),tracer_cur(k+1,iCell))
+ tracer_min(k,iCell) = min(tracer_cur(k-1,iCell),tracer_cur(k,iCell),tracer_cur(k+1,iCell))
+
+ do k=3,maxLevelCell(iCell)-1
+ high_order_vert_flux(k,iCell) = mpas_ocn_tracer_advection_vflux3( tracer_cur(k-2,iCell),tracer_cur(k-1,iCell), &
+ tracer_cur(k ,iCell),tracer_cur(k+1,iCell), &
+ w(k,iCell), coef_3rd_order )
+ tracer_max(k,iCell) = max(tracer_cur(k-1,iCell),tracer_cur(k,iCell),tracer_cur(k+1,iCell))
+ tracer_min(k,iCell) = min(tracer_cur(k-1,iCell),tracer_cur(k,iCell),tracer_cur(k+1,iCell))
+ end do
+
+ k = maxLevelCell(iCell)
+ verticalWeightK = verticalCellSize(k-1, iCell) / (verticalCellSize(k, iCell) + verticalCellSize(k-1, iCell))
+ verticalWeightKm1 = verticalCellSize(k, iCell) / (verticalCellSize(k, iCell) + verticalCellSize(k-1, iCell))
+ high_order_vert_flux(k,iCell) = w(k,iCell)*(verticalWeightK*tracer_cur(k,iCell)+verticalWeightKm1*tracer_cur(k-1,iCell))
+ tracer_max(k,iCell) = max(tracer_cur(k,iCell),tracer_cur(k-1,iCell))
+ tracer_min(k,iCell) = min(tracer_cur(k,iCell),tracer_cur(k-1,iCell))
+
+ ! pull tracer_min and tracer_max from the (horizontal) surrounding cells
+ do i = 1, nEdgesOnCell(iCell)
+ do k=1, maxLevelCell(cellsOnCell(i, iCell))
+ tracer_max(k,iCell) = max(tracer_max(k,iCell),tracer_cur(k, cellsOnCell(i,iCell)))
+ tracer_min(k,iCell) = min(tracer_min(k,iCell),tracer_cur(k, cellsOnCell(i,iCell)))
+ end do ! k loop
+ end do ! i loop over nEdgesOnCell
+ end do ! iCell Loop
+
+ ! Compute the high order horizontal flux
+ do iEdge = 1, nEdges
+ do i = 1, nAdvCellsForEdge(iEdge)
+ iCell = advCellsForEdge(i,iEdge)
+ do k = 1, maxLevelCell(iCell)
+ tracer_weight = lowOrderAdvectionMask(k, iEdge) * adv_coefs_2nd(i,iEdge) &
+ + highOrderAdvectionMask(k, iEdge) * (adv_coefs(i,iEdge) + coef_3rd_order*sign(1.,uh(k,iEdge))*adv_coefs_3rd(i,iEdge))
+
+ tracer_weight = uh(k,iEdge)*tracer_weight
+ high_order_horiz_flux(k,iEdge) = high_order_horiz_flux(k,iEdge) + tracer_weight* tracer_cur(k,iCell)
+ end do ! k loop
+ end do ! i loop over nAdvCellsForEdge
+ end do ! iEdge loop
+
+ ! low order upwind vertical flux (monotonic and diffused)
+ ! Remove low order flux from the high order flux.
+ ! Store left over high order flux in high_order_vert_flux array.
+ ! Upwind fluxes are accumulated in upwind_tendency
+ do iCell = 1, nCells
+ do k = 2, maxLevelCell(iCell)
+ ! dwj 02/03/12 Ocean and Atmosphere are different in vertical
+! flux_upwind = max(0.,w(k,iCell))*tracer_cur(k-1,iCell) + min(0.,w(k,iCell))*tracer_cur(k,iCell)
+ flux_upwind = min(0.,w(k,iCell))*tracer_cur(k-1,iCell) + max(0.,w(k,iCell))*tracer_cur(k,iCell)
+ upwind_tendency(k-1,iCell) = upwind_tendency(k-1,iCell) + flux_upwind
+ upwind_tendency(k ,iCell) = upwind_tendency(k ,iCell) - flux_upwind
+ high_order_vert_flux(k,iCell) = high_order_vert_flux(k,iCell) - flux_upwind
+ end do ! k loop
+
+ ! flux_incoming contains the total remaining high order flux into iCell
+ ! it is positive.
+ ! flux_outgoing contains the total remaining high order flux out of iCell
+ ! it is negative
+ do k = 1, maxLevelCell(iCell)
+ ! dwj 02/03/12 Ocean and Atmosphere are different in vertical
+! flux_incoming (k,iCell) = -(min(0.,high_order_vert_flux(k+1,iCell))-max(0.,high_order_vert_flux(k,iCell)))
+! flux_outgoing(k,iCell) = -(max(0.,high_order_vert_flux(k+1,iCell))-min(0.,high_order_vert_flux(k,iCell)))
+
+ flux_incoming (k, iCell) = max(0.0, high_order_vert_flux(k+1, iCell)) - min(0.0, high_order_vert_flux(k, iCell))
+ flux_outgoing(k, iCell) = min(0.0, high_order_vert_flux(k+1, iCell)) - max(0.0, high_order_vert_flux(k, iCell))
+ end do ! k Loop
+ end do ! iCell Loop
+
+ ! low order upwind horizontal flux (monotinc and diffused)
+ ! Remove low order flux from the high order flux
+ ! Store left over high order flux in high_order_horiz_flux array
+ ! Upwind fluxes are accumulated in upwind_tendency
+ do iEdge = 1, nEdges
+ cell1 = cellsOnEdge(1,iEdge)
+ cell2 = cellsOnEdge(2,iEdge)
+
+ invAreaCell1 = 1.0 / areaCell(cell1)
+ invAreaCell2 = 1.0 / areaCell(cell2)
+
+ do k = 1, maxLevelEdgeTop(iEdge)
+ flux_upwind = dvEdge(iEdge) * (max(0.,uh(k,iEdge))*tracer_cur(k,cell1) + min(0.,uh(k,iEdge))*tracer_cur(k,cell2))
+ high_order_horiz_flux(k,iEdge) = high_order_horiz_flux(k,iEdge) - flux_upwind
+
+ upwind_tendency(k,cell1) = upwind_tendency(k,cell1) - flux_upwind * invAreaCell1
+ upwind_tendency(k,cell2) = upwind_tendency(k,cell2) + flux_upwind * invAreaCell2
+
+ ! Accumulate remaining high order fluxes
+ flux_outgoing(k,cell1) = flux_outgoing(k,cell1) - max(0.,high_order_horiz_flux(k,iEdge)) * invAreaCell1
+ flux_incoming (k,cell1) = flux_incoming (k,cell1) - min(0.,high_order_horiz_flux(k,iEdge)) * invAreaCell1
+ flux_outgoing(k,cell2) = flux_outgoing(k,cell2) + min(0.,high_order_horiz_flux(k,iEdge)) * invAreaCell2
+ flux_incoming (k,cell2) = flux_incoming (k,cell2) + max(0.,high_order_horiz_flux(k,iEdge)) * invAreaCell2
+ end do ! k loop
+ end do ! iEdge loop
+
+ ! Build the factors for the FCT
+ ! Computed using the bounds that were computed previously, and the bounds on the newly updated value
+ ! Factors are placed in the flux_incoming and flux_outgoing arrays
+ do iCell = 1, nCells
+ do k = 1, maxLevelCell(iCell)
+ tracer_min_new = (tracer_cur(k,iCell)*h(k,iCell) + dt*(upwind_tendency(k,iCell)+flux_outgoing(k,iCell))) * inv_h_new(k,iCell)
+ tracer_max_new = (tracer_cur(k,iCell)*h(k,iCell) + dt*(upwind_tendency(k,iCell)+flux_incoming(k,iCell))) * inv_h_new(k,iCell)
+ tracer_upwind_new = (tracer_cur(k,iCell)*h(k,iCell) + dt*upwind_tendency(k,iCell)) * inv_h_new(k,iCell)
+
+ scale_factor = (tracer_max(k,iCell)-tracer_upwind_new)/(tracer_max_new-tracer_upwind_new+eps)
+ flux_incoming(k,iCell) = min( 1.0, max( 0.0, scale_factor) )
+
+ scale_factor = (tracer_upwind_new-tracer_min(k,iCell))/(tracer_upwind_new-tracer_min_new+eps)
+ flux_outgoing(k,iCell) = min( 1.0, max( 0.0, scale_factor) )
+ end do ! k loop
+ end do ! iCell loop
+
+ ! rescale the high order horizontal fluxes
+ do iEdge = 1, nEdges
+ cell1 = cellsOnEdge(1,iEdge)
+ cell2 = cellsOnEdge(2,iEdge)
+ do k = 1, maxLevelEdgeTop(iEdge)
+ flux = high_order_horiz_flux(k,iEdge)
+ flux = max(0.,flux) * min(flux_outgoing(k,cell1), flux_incoming(k,cell2)) &
+ + min(0.,flux) * min(flux_incoming(k,cell1), flux_outgoing(k,cell2))
+ high_order_horiz_flux(k,iEdge) = flux
+ end do ! k loop
+ end do ! iEdge loop
+
+ ! rescale the high order vertical flux
+ do iCell = 1, nCellsSolve
+ do k = 2, maxLevelCell(iCell)
+ flux = high_order_vert_flux(k,iCell)
+ ! dwj 02/03/12 Ocean and Atmosphere are different in vertical.
+! flux = max(0.,flux) * min(flux_outgoing(k-1,iCell), flux_incoming(k ,iCell)) &
+! + min(0.,flux) * min(flux_outgoing(k ,iCell), flux_incoming(k-1,iCell))
+ flux = max(0.,flux) * min(flux_outgoing(k ,iCell), flux_incoming(k-1,iCell)) &
+ + min(0.,flux) * min(flux_outgoing(k-1,iCell), flux_incoming(k ,iCell))
+ high_order_vert_flux(k,iCell) = flux
+ end do ! k loop
+ end do ! iCell loop
+
+ ! Accumulate the scaled high order horizontal tendencies
+ do iEdge = 1, nEdges
+ cell1 = cellsOnEdge(1,iEdge)
+ cell2 = cellsOnEdge(2,iEdge)
+
+ invAreaCell1 = 1.0 / areaCell(cell1)
+ invAreaCell2 = 1.0 / areaCell(cell2)
+ do k=1,maxLevelEdgeTop(iEdge)
+ tend(iTracer, k, cell1) = tend(iTracer, k, cell1) - high_order_horiz_flux(k, iEdge) * invAreaCell1
+ tend(iTracer, k, cell2) = tend(iTracer, k, cell2) + high_order_horiz_flux(k, iEdge) * invAreaCell2
+
+ if (config_check_monotonicity) then
+ !tracer_new holds a tendency for now.
+ tracer_new(k, cell1) = tracer_new(k, cell1) - high_order_horiz_flux(k, iEdge) * invAreaCell1
+ tracer_new(k, cell2) = tracer_new(k, cell2) + high_order_horiz_flux(k, iEdge) * invAreaCell2
+ end if
+ end do ! k loop
+ end do ! iEdge loop
+
+ ! Accumulate the scaled high order vertical tendencies, and the upwind tendencies
+ do iCell = 1, nCellsSolve
+ do k = 1,maxLevelCell(iCell)
+ tend(iTracer, k, iCell) = tend(iTracer, k, iCell) + (high_order_vert_flux(k+1, iCell) - high_order_vert_flux(k, iCell)) + upwind_tendency(k,iCell)
+
+ if (config_check_monotonicity) then
+ !tracer_new holds a tendency for now. Only for a check on monotonicity
+ tracer_new(k, iCell) = tracer_new(k, iCell) + (high_order_vert_flux(k+1, iCell) - high_order_vert_flux(k, iCell)) + upwind_tendency(k,iCell)
+
+ !tracer_new is now the new state of the tracer. Only for a check on monotonicity
+ tracer_new(k, iCell) = (tracer_cur(k, iCell)*h(k, iCell) + dt * tracer_new(k, iCell)) * inv_h_new(k, iCell)
+ end if
+ end do ! k loop
+ end do ! iCell loop
+
+ if (config_check_monotonicity) then
+ !build min and max bounds on old and new tracer for check on monotonicity.
+ cur_min = minval(tracer_cur(:,1:nCellsSolve))
+ cur_max = maxval(tracer_cur(:,1:nCellsSolve))
+ new_min = minval(tracer_new(:,1:nCellsSolve))
+ new_max = maxval(tracer_new(:,1:nCellsSolve))
+
+ !check monotonicity
+ if(new_min < cur_min-eps) then
+ write(*,*) 'Minimum out of bounds on tracer ', iTracer, cur_min, new_min
+ end if
+
+ if(new_max > cur_max+eps) then
+ write(*,*) 'Maximum out of bounds on tracer ', iTracer, cur_max, new_max
+ end if
+ end if
+ end do ! iTracer loop
+
+ deallocate(tracer_new)
+ deallocate(tracer_cur)
+ deallocate(upwind_tendency)
+ deallocate(inv_h_new)
+ deallocate(tracer_max)
+ deallocate(tracer_min)
+ deallocate(flux_incoming)
+ deallocate(flux_outgoing)
+ deallocate(high_order_horiz_flux)
+ deallocate(high_order_vert_flux)
+ end subroutine mpas_ocn_tracer_advection_mono_tend!}}}
+
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! routine mpas_ocn_tracer_advection_mono_init
+!
+!> \brief MPAS ocean initialize monotonic tracer advection tendency with FCT
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This routine initializes the monotonic tracer advection tendencity using a FCT.
+!
+!-----------------------------------------------------------------------
+ subroutine mpas_ocn_tracer_advection_mono_init(err)!{{{
+ integer, intent(inout) :: err !< Input: Error Flags
+
+ integer :: err_tmp
+
+ err = 0
+
+ if ( config_horiz_tracer_adv_order == 3) then
+ coef_3rd_order = config_coef_3rd_order
+ else if(config_horiz_tracer_adv_order == 2 .or. config_horiz_tracer_adv_order == 4) then
+ coef_3rd_order = 0.0
+ end if
+
+ end subroutine mpas_ocn_tracer_advection_mono_init!}}}
+
+end module mpas_ocn_tracer_advection_mono
Copied: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection_std.F (from rev 1651, trunk/mpas/src/core_ocean/mpas_ocn_tracer_advection_std.F)
===================================================================
--- branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection_std.F         (rev 0)
+++ branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection_std.F        2012-03-15 22:11:29 UTC (rev 1652)
@@ -0,0 +1,100 @@
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! ocn_tracer_advection_std
+!
+!> \brief MPAS ocean tracer advection driver (non-monotonic/fct)
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This module contains driver routine for tracer advection tendencies
+!> as well as the routines for setting up advection coefficients and
+!> initialization of the advection routines.
+!
+!-----------------------------------------------------------------------
+module mpas_ocn_tracer_advection_std
+
+ use mpas_kind_types
+ use mpas_grid_types
+ use mpas_configure
+ use mpas_dmpar
+ use mpas_timer
+
+ use mpas_ocn_tracer_advection_std_hadv
+ use mpas_ocn_tracer_advection_std_vadv
+
+ implicit none
+ private
+ save
+
+ public :: mpas_ocn_tracer_advection_std_tend, &
+ mpas_ocn_tracer_advection_std_init
+
+ contains
+
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! routine mpas_ocn_tracer_advection_std_tend
+!
+!> \brief MPAS ocean standard tracer advection tendency
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This routine is the driver routine for the standard computation of
+!> tracer advection tendencies.
+!
+!-----------------------------------------------------------------------
+ subroutine mpas_ocn_tracer_advection_std_tend(tracers, uh, w, verticalCellSize, grid, tend)!{{{
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !
+ ! Input: s - current model state
+ ! grid - grid metadata
+ !
+ ! Output: tend - computed scalar tendencies
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+ real (kind=RKIND), dimension(:,:,:), intent(inout) :: tend !< Input/Output: Tracer tendency
+ real (kind=RKIND), dimension(:,:,:), intent(in) :: tracers !< Input: Tracer values
+ real (kind=RKIND), dimension(:,:), intent(in) :: uh !< Input: Thickness weighted horizontal velocity
+ real (kind=RKIND), dimension(:,:), intent(in) :: w !< Input: Vertical Velocity
+ real (kind=RKIND), dimension(:,:), intent(in) :: verticalCellSize !< Input: Distance between vertical interfaces of a cell
+ type (mesh_type), intent(in) :: grid !< Input: Grid information
+
+ call mpas_timer_start("tracer-hadv", .false.)
+ call mpas_ocn_tracer_advection_std_hadv_tend(tracers, uh, grid, tend)
+ call mpas_timer_stop("tracer-hadv")
+ call mpas_timer_start("tracer-vadv", .false.)
+ call mpas_ocn_tracer_advection_std_vadv_tend(tracers, w, verticalCellSize, grid, tend)
+ call mpas_timer_stop("tracer-vadv")
+
+ end subroutine mpas_ocn_tracer_advection_std_tend!}}}
+
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! routine mpas_ocn_tracer_advection_std_init
+!
+!> \brief MPAS ocean standard tracer advection initialization
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This routine is the driver routine for the initializtion of the standard
+!> tracer advection routines.
+!
+!-----------------------------------------------------------------------
+ subroutine mpas_ocn_tracer_advection_std_init(err)!{{{
+ integer, intent(inout) :: err !< Input: Error Flags
+
+ integer :: err_tmp
+
+ err = 0
+
+ call mpas_ocn_tracer_advection_std_hadv_init(err_tmp)
+ err = ior(err, err_tmp)
+ call mpas_ocn_tracer_advection_std_vadv_init(err_tmp)
+ err = ior(err, err_tmp)
+
+ end subroutine mpas_ocn_tracer_advection_std_init!}}}
+
+end module mpas_ocn_tracer_advection_std
Copied: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection_std_hadv.F (from rev 1651, trunk/mpas/src/core_ocean/mpas_ocn_tracer_advection_std_hadv.F)
===================================================================
--- branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection_std_hadv.F         (rev 0)
+++ branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection_std_hadv.F        2012-03-15 22:11:29 UTC (rev 1652)
@@ -0,0 +1,140 @@
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! ocn_tracer_advection_std_hadv
+!
+!> \brief MPAS ocean standard horizontal tracer advection (non-monotonic/fct)
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This module contains routines for horizontal tracer advection tendencies
+!> and initialization of the horizontal advection routines.
+!
+!-----------------------------------------------------------------------
+module mpas_ocn_tracer_advection_std_hadv
+
+ use mpas_kind_types
+ use mpas_grid_types
+ use mpas_configure
+ use mpas_dmpar
+
+ use mpas_ocn_tracer_advection_helpers
+
+ implicit none
+ private
+ save
+
+ public :: mpas_ocn_tracer_advection_std_hadv_tend, &
+ mpas_ocn_tracer_advection_std_hadv_init
+
+ real (kind=RKIND) :: coef_3rd_order
+
+ logical :: hadvOn
+
+ contains
+
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! routine mpas_ocn_tracer_advection_std_hadv_tend
+!
+!> \brief MPAS ocean standard horizontal tracer advection tendency
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This routine computes the tendency for 3rd order horizontal advection of tracers.
+!
+!-----------------------------------------------------------------------
+ subroutine mpas_ocn_tracer_advection_std_hadv_tend(tracers, uh, grid, tend)!{{{
+ real (kind=RKIND), dimension(:,:,:), intent(inout) :: tend !< Input/output: Tracer tendency
+ real (kind=RKIND), dimension(:,:,:), intent(in) :: tracers !< Input: Tracer values
+ real (kind=RKIND), dimension(:,:), intent(in) :: uh !< Input: Thickness weighted horizontal velocity
+ type (mesh_type), intent(in) :: grid !< Input: Grid information
+
+ integer :: i, iCell, iEdge, k, iTracer, cell1, cell2
+ real (kind=RKIND) :: flux, tracer_weight
+
+ real (kind=RKIND), dimension(:), pointer :: areaCell
+ integer, dimension(:,:), pointer :: cellsOnEdge
+
+ integer, dimension(:,:), pointer :: advCellsForEdge, highOrderAdvectionMask, lowOrderAdvectionMask
+ integer, dimension(:), pointer :: nAdvCellsForEdge
+ real (kind=RKIND), dimension(:,:), pointer :: adv_coefs, adv_coefs_2nd, adv_coefs_3rd
+ real (kind=RKIND), dimension(:,:), allocatable :: flux_arr
+ integer :: nVertLevels, num_tracers
+
+ if (.not. hadvOn) return
+
+ cellsOnEdge => grid % cellsOnEdge % array
+ areaCell => grid % areaCell % array
+
+ nAdvCellsForEdge => grid % nAdvCellsForEdge % array
+ advCellsForEdge => grid % advCellsForEdge % array
+ adv_coefs => grid % adv_coefs % array
+ adv_coefs_2nd => grid % adv_coefs_2nd % array
+ adv_coefs_3rd => grid % adv_coefs_3rd % array
+ highOrderAdvectionMask => grid % highOrderAdvectionMask % array
+ lowOrderAdvectionMask => grid % lowOrderAdvectionMask % array
+
+ nVertLevels = grid % nVertLevels
+ num_tracers = size(tracers, dim=1)
+
+ allocate(flux_arr(num_tracers, grid % nVertLevels))
+
+ ! horizontal flux divergence, accumulate in tracer_tend
+ do iEdge=1,grid%nEdges
+ cell1 = cellsOnEdge(1,iEdge)
+ cell2 = cellsOnEdge(2,iEdge)
+ if (cell1 <= grid%nCellsSolve .or. cell2 <= grid%nCellsSolve) then ! only for owned cells
+ flux_arr(:,:) = 0.
+ do i=1,nAdvCellsForEdge(iEdge)
+ iCell = advCellsForEdge(i,iEdge)
+ do k=1,grid % nVertLevels
+ tracer_weight = lowOrderAdvectionMask(k, iEdge) * adv_coefs_2nd(i,iEdge) &
+ + highOrderAdvectionMask(k, iEdge) * (adv_coefs(i,iEdge) + coef_3rd_order*sign(1.,uh(k,iEdge))*adv_coefs_3rd(i,iEdge))
+ do iTracer=1,num_tracers
+ flux_arr(iTracer,k) = flux_arr(iTracer,k) + tracer_weight* tracers(iTracer,k,iCell)
+ end do
+ end do
+ end do
+
+ do k=1,grid % nVertLevels
+ do iTracer=1,num_tracers
+ tend(iTracer,k,cell1) = tend(iTracer,k,cell1) - uh(k,iEdge)*flux_arr(iTracer,k)/areaCell(cell1)
+ tend(iTracer,k,cell2) = tend(iTracer,k,cell2) + uh(k,iEdge)*flux_arr(iTracer,k)/areaCell(cell2)
+ end do
+ end do
+ end if
+ end do
+
+ deallocate(flux_arr)
+
+ end subroutine mpas_ocn_tracer_advection_std_hadv_tend!}}}
+
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! routine mpas_ocn_tracer_advection_std_hadv_init
+!
+!> \brief MPAS ocean standard horizontal tracer advection initialization
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This routine initializes the 3rd order standard horizontal advection of tracers
+!
+!-----------------------------------------------------------------------
+ subroutine mpas_ocn_tracer_advection_std_hadv_init(err)!{{{
+ integer, intent(inout) :: err !< Input/Output: Error flag
+
+ err = 0
+
+ hadvOn =.true.
+
+ if ( config_horiz_tracer_adv_order == 3) then
+ coef_3rd_order = config_coef_3rd_order
+ else if ( config_horiz_tracer_adv_order == 2 .or. config_horiz_tracer_adv_order == 4) then
+ coef_3rd_order = 0.0
+ end if
+ end subroutine mpas_ocn_tracer_advection_std_hadv_init!}}}
+
+end module mpas_ocn_tracer_advection_std_hadv
Copied: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection_std_vadv.F (from rev 1651, trunk/mpas/src/core_ocean/mpas_ocn_tracer_advection_std_vadv.F)
===================================================================
--- branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection_std_vadv.F         (rev 0)
+++ branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection_std_vadv.F        2012-03-15 22:11:29 UTC (rev 1652)
@@ -0,0 +1,103 @@
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! ocn_tracer_advection_std_vadv
+!
+!> \brief MPAS ocean vertical tracer advection driver (non-monotonic/fct)
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This module contains driver routines for vertical tracer advection tendencies
+!> and initialization of the advection routines.
+!
+!-----------------------------------------------------------------------
+module mpas_ocn_tracer_advection_std_vadv
+
+ use mpas_kind_types
+ use mpas_grid_types
+ use mpas_configure
+ use mpas_dmpar
+
+ use mpas_ocn_tracer_advection_std_vadv2
+ use mpas_ocn_tracer_advection_std_vadv3
+ use mpas_ocn_tracer_advection_std_vadv4
+
+ implicit none
+ private
+ save
+
+ public :: mpas_ocn_tracer_advection_std_vadv_tend, &
+ mpas_ocn_tracer_advection_std_vadv_init
+
+ logical :: order2, order3, order4
+
+ contains
+
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! routine mpas_ocn_tracer_advection_std_vadv_tend
+!
+!> \brief MPAS ocean standard vertical tracer advection tendency
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This routine is the driver routine for the standard computation of
+!> vertical tracer advection tendencies.
+!
+!-----------------------------------------------------------------------
+ subroutine mpas_ocn_tracer_advection_std_vadv_tend(tracers, w, verticalCellSize, grid, tend)!{{{
+
+ real (kind=RKIND), dimension(:,:,:), intent(inout) :: tend !< Input/Output: Tracer Tendency
+ real (kind=RKIND), dimension(:,:,:), intent(in) :: tracers !< Input: Tracer Values
+ real (kind=RKIND), dimension(:,:), intent(in) :: w !< Input: Vertical Velocity
+ real (kind=RKIND), dimension(:,:), intent(in) :: verticalCellSize !< Input: Distance between vertical interfaces of cell
+ type (mesh_type), intent(in) :: grid !< Input: Grid information
+
+ if(order2) then
+ call mpas_ocn_tracer_advection_std_vadv2_tend(tracers, w, verticalCellSize, grid, tend)
+ else if(order3) then
+ call mpas_ocn_tracer_advection_std_vadv3_tend(tracers, w, verticalCellSize, grid, tend)
+ else if(order4) then
+ call mpas_ocn_tracer_advection_std_vadv4_tend(tracers, w, verticalCellSize, grid, tend)
+ endif
+
+ end subroutine mpas_ocn_tracer_advection_std_vadv_tend!}}}
+
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! routine mpas_ocn_tracer_advection_std_vadv_init
+!
+!> \brief MPAS ocean standard vertical tracer advection tendency
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This routine initializes the vertical tracer advection tendencies.
+!
+!-----------------------------------------------------------------------
+ subroutine mpas_ocn_tracer_advection_std_vadv_init(err)!{{{
+ integer, intent(inout) :: err !< Input/Output: Error flag
+
+ err = 0
+
+ order2 = .false.
+ order3 = .false.
+ order4 = .false.
+
+ if (config_vert_tracer_adv_order == 2) then
+ order2 = .true.
+ else if (config_vert_tracer_adv_order == 3) then
+ order3 = .true.
+ else if (config_vert_tracer_adv_order == 4) then
+ order4 = .true.
+ else
+ print *, 'invalid value for config_tracer_vadv_order'
+ print *, 'options are 2, 3, or 4'
+ err = 1
+ endif
+
+ end subroutine mpas_ocn_tracer_advection_std_vadv_init!}}}
+
+end module mpas_ocn_tracer_advection_std_vadv
+
Copied: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection_std_vadv2.F (from rev 1651, trunk/mpas/src/core_ocean/mpas_ocn_tracer_advection_std_vadv2.F)
===================================================================
--- branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection_std_vadv2.F         (rev 0)
+++ branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection_std_vadv2.F        2012-03-15 22:11:29 UTC (rev 1652)
@@ -0,0 +1,96 @@
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! ocn_tracer_advection_std_vadv2
+!
+!> \brief MPAS ocean 2nd order vertical tracer advection driver (non-monotonic/fct)
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This module contains routines for 2nd order vertical tracer advection tendencies.
+!
+!-----------------------------------------------------------------------
+module mpas_ocn_tracer_advection_std_vadv2
+
+ use mpas_kind_types
+ use mpas_grid_types
+ use mpas_configure
+ use mpas_dmpar
+
+ use mpas_ocn_tracer_advection_helpers
+
+ implicit none
+ private
+ save
+
+ public :: mpas_ocn_tracer_advection_std_vadv2_tend
+
+ contains
+
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! routine mpas_ocn_tracer_advection_std_vadv2_tend
+!
+!> \brief MPAS ocean 2nd order standard vertical tracer advection tendency
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This routine is the driver routine for the 2nd order standard computation of
+!> vertical tracer advection tendencies.
+!
+!-----------------------------------------------------------------------
+ subroutine mpas_ocn_tracer_advection_std_vadv2_tend(tracers, w, verticalCellSize, grid, tend)!{{{
+ real (kind=RKIND), dimension(:,:,:), intent(inout) :: tend !< Input/Output: tracer tendency
+ real (kind=RKIND), dimension(:,:,:), intent(in) :: tracers !< Input: Tracer values
+ real (kind=RKIND), dimension(:,:), intent(in) :: w !< Input: Vertical Velocity
+ real (kind=RKIND), dimension(:,:), intent(in) :: verticalCellSize !< Input: Distance between vertical interfaces of cell
+ type (mesh_type), intent(in) :: grid !< Input: Grid information
+
+ integer :: i, iCell, iEdge, k, iTracer, cell1, cell2
+ real (kind=RKIND) :: flux, tracer_edge, tracer_weight
+ real (kind=RKIND) :: tracer_weight_cell1, tracer_weight_cell2
+
+
+ real (kind=RKIND), dimension(:,:), allocatable :: vert_flux
+ real (kind=RKIND) :: weightK, weightKm1
+ integer :: nVertLevels, num_tracers
+ integer, dimension(:), pointer :: maxLevelCell
+
+ nVertLevels = grid % nVertLevels
+ num_tracers = size(tracers, dim=1)
+ maxLevelCell => grid % maxLevelCell % array
+
+ allocate(vert_flux(num_tracers, nVertLevels+1))
+
+ !
+ ! vertical flux divergence
+ !
+
+ ! zero fluxes at top and bottom
+
+ vert_flux(:,1) = 0.
+
+ do iCell=1,grid % nCellsSolve
+ do k = 2, maxLevelCell(iCell)
+ do iTracer=1,num_tracers
+ weightK = verticalCellSize(k-1, iCell) / (verticalCellSize(k-1, iCell) + verticalCellSize(k, iCell))
+ weightKm1 = verticalCellSize(k, iCell) / (verticalCellSize(k-1, iCell) + verticalCellSize(k, iCell))
+ vert_flux(iTracer,k) = w(k,iCell)*(weightK*tracers(iTracer,k,iCell)+weightKm1*tracers(iTracer,k-1,iCell))
+ end do
+ end do
+
+ vert_flux(:,maxLevelCell(iCell)+1) = 0
+
+ do k=1,maxLevelCell(iCell)
+ do iTracer=1,num_tracers
+ tend(iTracer, k, iCell) = tend(iTracer, k, iCell) + ( vert_flux(iTracer, k+1) - vert_flux(iTracer, k))
+ end do
+ end do
+ end do
+
+ deallocate(vert_flux)
+
+ end subroutine mpas_ocn_tracer_advection_std_vadv2_tend!}}}
+
+end module mpas_ocn_tracer_advection_std_vadv2
Copied: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection_std_vadv3.F (from rev 1651, trunk/mpas/src/core_ocean/mpas_ocn_tracer_advection_std_vadv3.F)
===================================================================
--- branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection_std_vadv3.F         (rev 0)
+++ branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection_std_vadv3.F        2012-03-15 22:11:29 UTC (rev 1652)
@@ -0,0 +1,106 @@
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! ocn_tracer_advection_std_vadv3
+!
+!> \brief MPAS ocean 3rd order vertical tracer advection driver (non-monotonic/fct)
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This module contains routines for 3rd order vertical tracer advection tendencies.
+!
+!-----------------------------------------------------------------------
+module mpas_ocn_tracer_advection_std_vadv3
+
+ use mpas_kind_types
+ use mpas_grid_types
+ use mpas_configure
+ use mpas_dmpar
+
+ use mpas_ocn_tracer_advection_helpers
+
+ implicit none
+ private
+ save
+
+ public :: mpas_ocn_tracer_advection_std_vadv3_tend
+
+ real (kind=RKIND) :: coef_3rd_order
+
+ contains
+
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! routine mpas_ocn_tracer_advection_std_vadv3_tend
+!
+!> \brief MPAS ocean 3rd order standard vertical tracer advection tendency
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This routine computes the 3rd order vertical tracer advection tendencies.
+!
+!-----------------------------------------------------------------------
+ subroutine mpas_ocn_tracer_advection_std_vadv3_tend(tracers, w, verticalCellSize, grid, tend)!{{{
+ real (kind=RKIND), dimension(:,:,:), intent(inout) :: tend !< Input/Output: Tracer Tendency
+ real (kind=RKIND), dimension(:,:,:), intent(in) :: tracers !< Input: Tracer Values
+ real (kind=RKIND), dimension(:,:), intent(in) :: w !< Input: Vertical Velocity
+ real (kind=RKIND), dimension(:,:), intent(in) :: verticalCellSize !< Input: Distance between vertical interfaces of cell
+ type (mesh_type), intent(in) :: grid !< Input: Grid information
+
+ integer :: i, iCell, iEdge, k, iTracer, cell1, cell2
+
+ real (kind=RKIND), dimension(:,:), allocatable :: vert_flux
+ real (kind=RKIND) :: weightK, weightKm1
+ integer :: nVertLevels, num_tracers
+ integer, dimension(:), pointer :: maxLevelCell
+
+ coef_3rd_order = config_coef_3rd_order
+
+ nVertLevels = grid % nVertLevels
+ num_tracers = size(tracers, dim=1)
+ maxLevelCell => grid % maxLevelCell % array
+
+ allocate(vert_flux(num_tracers, nVertLevels+1))
+
+ vert_flux(:,1) = 0.
+
+ do iCell=1,grid % nCellsSolve
+
+ k = 2
+ do iTracer=1,num_tracers
+ weightK = verticalCellSize(k-1, iCell) / (verticalCellSize(k-1, iCell) + verticalCellSize(k, iCell))
+ weightKm1 = verticalCellSize(k, iCell) / (verticalCellSize(k-1, iCell) + verticalCellSize(k, iCell))
+ vert_flux(iTracer,k) = w(k,iCell)*(weightK*tracers(iTracer,k,iCell)+weightKm1*tracers(iTracer,k-1,iCell))
+ enddo
+
+ do k=3,maxLevelCell(iCell)-1
+ do iTracer=1,num_tracers
+ vert_flux(iTracer,k) = mpas_ocn_tracer_advection_vflux3( tracers(iTracer,k-2,iCell),tracers(iTracer,k-1,iCell), &
+ tracers(iTracer,k ,iCell),tracers(iTracer,k+1,iCell), &
+ w(k,iCell), coef_3rd_order )
+ end do
+ end do
+
+ k = maxLevelCell(iCell)
+
+ do iTracer=1,num_tracers
+ weightK = verticalCellSize(k-1, iCell) / (verticalCellSize(k-1, iCell) + verticalCellSize(k, iCell))
+ weightKm1 = verticalCellSize(k, iCell) / (verticalCellSize(k-1, iCell) + verticalCellSize(k, iCell))
+ vert_flux(iTracer,k) = w(k,iCell)*(weightK*tracers(iTracer,k,iCell)+weightKm1*tracers(iTracer,k-1,iCell))
+ enddo
+
+ vert_Flux(:, maxLevelCell(iCell)+1) = 0.0
+
+ do k=1,maxLevelCell(iCell)
+ do iTracer=1,num_tracers
+ tend(iTracer, k, iCell) = tend(iTracer, k, iCell) + (vert_flux(iTracer, k+1) - vert_flux(iTracer, k))
+ end do
+ end do
+ end do
+
+ deallocate(vert_flux)
+
+ end subroutine mpas_ocn_tracer_advection_std_vadv3_tend!}}}
+
+end module mpas_ocn_tracer_advection_std_vadv3
Copied: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection_std_vadv4.F (from rev 1651, trunk/mpas/src/core_ocean/mpas_ocn_tracer_advection_std_vadv4.F)
===================================================================
--- branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection_std_vadv4.F         (rev 0)
+++ branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_advection_std_vadv4.F        2012-03-15 22:11:29 UTC (rev 1652)
@@ -0,0 +1,105 @@
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! ocn_tracer_advection_std_vadv4
+!
+!> \brief MPAS ocean 4th order vertical tracer advection driver (non-monotonic/fct)
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This module contains routines for 4th order vertical tracer advection.
+!
+!-----------------------------------------------------------------------
+module mpas_ocn_tracer_advection_std_vadv4
+
+ use mpas_kind_types
+ use mpas_grid_types
+ use mpas_configure
+ use mpas_dmpar
+
+ use mpas_ocn_tracer_advection_helpers
+
+ implicit none
+ private
+ save
+
+ public :: mpas_ocn_tracer_advection_std_vadv4_tend
+
+ contains
+
+!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+!
+! routine mpas_ocn_tracer_advection_std_vadv4_tend
+!
+!> \brief MPAS ocean 4th order standard vertical tracer advection tendency
+!> \author Doug Jacobsen
+!> \date 03/09/12
+!> \version SVN:$Id:$
+!> \details
+!> This routine computes the 4th order vertical tracer advection tendencies.
+!
+!-----------------------------------------------------------------------
+ subroutine mpas_ocn_tracer_advection_std_vadv4_tend(tracers, w, verticalCellSize, grid, tend)!{{{
+ real (kind=RKIND), dimension(:,:,:), intent(inout) :: tend !< Input/Output: Tracer tendency
+ real (kind=RKIND), dimension(:,:,:), intent(in) :: tracers !< Input: Tracer Values
+ real (kind=RKIND), dimension(:,:), intent(in) :: w !< Input: Vertical Velocity
+ real (kind=RKIND), dimension(:,:), intent(in) :: verticalCellSize !< Input: Distance between vertical interfaces of cell
+ type (mesh_type), intent(in) :: grid !< Input: Grid information
+
+ integer :: i, iCell, iEdge, k, iTracer, cell1, cell2
+
+ real (kind=RKIND), dimension(:,:), allocatable :: vert_flux
+ real (kind=RKIND) :: weightK, weightKm1
+ integer :: nVertLevels, num_tracers
+ integer, dimension(:), pointer :: maxLevelCell
+
+ nVertLevels = grid % nVertLevels
+ num_tracers = size(tracers, dim=1)
+ maxLevelCell => grid % maxLevelCell % array
+
+ allocate(vert_flux(num_tracers, nVertLevels+1))
+
+ ! vertical flux divergence
+ !
+
+ ! zero fluxes at top and bottom
+
+ vert_flux(:,1) = 0.
+
+ do iCell=1,grid % nCellsSolve
+
+ k = 2
+ do iTracer=1,num_tracers
+ weightK = verticalCellSize(k-1, iCell) / (verticalCellSize(k-1, iCell) + verticalCellSize(k, iCell))
+ weightKm1 = verticalCellSize(k, iCell) / (verticalCellSize(k-1, iCell) + verticalCellSize(k, iCell))
+ vert_flux(iTracer,k) = w(k,iCell)*(weightK*tracers(iTracer,k,iCell)+weightKm1*tracers(iTracer,k-1,iCell))
+ enddo
+ do k=3,nVertLevels-1
+ do iTracer=1,num_tracers
+ vert_flux(iTracer,k) = mpas_ocn_tracer_advection_vflux4( tracers(iTracer,k-2,iCell),tracers(iTracer,k-1,iCell), &
+ tracers(iTracer,k ,iCell),tracers(iTracer,k+1,iCell), w(k,iCell) )
+ end do
+ end do
+
+ k = maxLevelCell(iCell)
+ do iTracer=1,num_tracers
+ weightK = verticalCellSize(k-1, iCell) / (verticalCellSize(k-1, iCell) + verticalCellSize(k, iCell))
+ weightKm1 = verticalCellSize(k, iCell) / (verticalCellSize(k-1, iCell) + verticalCellSize(k, iCell))
+ vert_flux(iTracer,k) = w(k,iCell)*(weightK*tracers(iTracer,k,iCell)+weightKm1*tracers(iTracer,k-1,iCell))
+ enddo
+
+ vert_flux(:,maxLevelCell(iCell)+1) = 0.0
+
+ do k=1,maxLevelCell(iCell)
+ do iTracer=1,num_tracers
+ tend(iTracer, k, iCell) = tend(iTracer, k, iCell) + (vert_flux(iTracer, k+1) - vert_flux(iTracer, k))
+ end do
+ end do
+
+ end do
+
+ deallocate(vert_flux)
+
+ end subroutine mpas_ocn_tracer_advection_std_vadv4_tend!}}}
+
+end module mpas_ocn_tracer_advection_std_vadv4
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_hadv.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_tracer_hadv.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_tracer_hadv.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_tracer_hadv.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_tracer_hadv.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_tracer_hadv.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tracer_hadv.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_tracer_hadv.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_tracer_hadv.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_tracer_hadv.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_tracer_hadv.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_tracer_hadv.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_tracer_hadv.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_tracer_hadv.F:924-962
Modified: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_hadv2.F
===================================================================
--- branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_hadv2.F        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_hadv2.F        2012-03-15 22:11:29 UTC (rev 1652)
@@ -182,7 +182,7 @@
err = 0
hadv2On = .false.
- if (config_tracer_adv_order == 2) then
+ if (config_horiz_tracer_adv_order == 2) then
hadv2On = .true.
end if
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_hadv2.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_tracer_hadv2.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_tracer_hadv2.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_tracer_hadv2.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_tracer_hadv2.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_tracer_hadv2.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tracer_hadv2.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_tracer_hadv2.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_tracer_hadv2.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_tracer_hadv2.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_tracer_hadv2.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_tracer_hadv2.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_tracer_hadv2.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_tracer_hadv2.F:924-962
Modified: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_hadv3.F
===================================================================
--- branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_hadv3.F        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_hadv3.F        2012-03-15 22:11:29 UTC (rev 1652)
@@ -221,11 +221,10 @@
err = 0
hadv3On = .false.
- if (config_tracer_adv_order == 3) then
+ if (config_horiz_tracer_adv_order == 3) then
hadv3On = .true.
- coef_3rd_order = 1.0
- if (config_monotonic) coef_3rd_order = 0.25
+ coef_3rd_order = config_coef_3rd_order
end if
!--------------------------------------------------------------------
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_hadv3.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_tracer_hadv3.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_tracer_hadv3.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_tracer_hadv3.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_tracer_hadv3.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_tracer_hadv3.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tracer_hadv3.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_tracer_hadv3.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_tracer_hadv3.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_tracer_hadv3.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_tracer_hadv3.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_tracer_hadv3.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_tracer_hadv3.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_tracer_hadv3.F:924-962
Modified: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_hadv4.F
===================================================================
--- branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_hadv4.F        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_hadv4.F        2012-03-15 22:11:29 UTC (rev 1652)
@@ -213,7 +213,7 @@
err = 0
hadv4On = .false.
- if (config_tracer_adv_order == 4) then
+ if (config_horiz_tracer_adv_order == 4) then
hadv4On = .true.
end if
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_hadv4.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_tracer_hadv4.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_tracer_hadv4.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_tracer_hadv4.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_tracer_hadv4.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_tracer_hadv4.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tracer_hadv4.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_tracer_hadv4.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_tracer_hadv4.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_tracer_hadv4.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_tracer_hadv4.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_tracer_hadv4.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_tracer_hadv4.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_tracer_hadv4.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_hmix.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_tracer_hmix.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_tracer_hmix.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_tracer_hmix.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_tracer_hmix.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_tracer_hmix.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tracer_hmix.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_tracer_hmix.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_tracer_hmix.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_tracer_hmix.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_tracer_hmix.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_tracer_hmix.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_tracer_hmix.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_tracer_hmix.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_hmix_del2.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_tracer_hmix_del2.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_tracer_hmix_del2.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_tracer_hmix_del2.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_tracer_hmix_del2.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_tracer_hmix_del2.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tracer_hmix_del2.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_tracer_hmix_del2.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_tracer_hmix_del2.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_tracer_hmix_del2.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_tracer_hmix_del2.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_tracer_hmix_del2.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_tracer_hmix_del2.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_tracer_hmix_del2.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_hmix_del4.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_tracer_hmix_del4.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_tracer_hmix_del4.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_tracer_hmix_del4.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_tracer_hmix_del4.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_tracer_hmix_del4.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tracer_hmix_del4.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_tracer_hmix_del4.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_tracer_hmix_del4.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_tracer_hmix_del4.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_tracer_hmix_del4.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_tracer_hmix_del4.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_tracer_hmix_del4.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_tracer_hmix_del4.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_vadv.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_tracer_vadv.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_tracer_vadv.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_tracer_vadv.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_tracer_vadv.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_tracer_vadv.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tracer_vadv.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_tracer_vadv.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_tracer_vadv.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_tracer_vadv.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_tracer_vadv.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_tracer_vadv.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_tracer_vadv.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_tracer_vadv.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_vadv_spline.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_tracer_vadv_spline.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_tracer_vadv_spline.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_tracer_vadv_spline.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_tracer_vadv_spline.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_tracer_vadv_spline.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tracer_vadv_spline.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_tracer_vadv_spline.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_tracer_vadv_spline.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_tracer_vadv_spline.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_tracer_vadv_spline.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_tracer_vadv_spline.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_tracer_vadv_spline.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_tracer_vadv_spline.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_vadv_spline2.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_tracer_vadv_spline2.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_tracer_vadv_spline2.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_tracer_vadv_spline2.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_tracer_vadv_spline2.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_tracer_vadv_spline2.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tracer_vadv_spline2.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_tracer_vadv_spline2.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_tracer_vadv_spline2.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_tracer_vadv_spline2.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_tracer_vadv_spline2.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_tracer_vadv_spline2.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_tracer_vadv_spline2.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_tracer_vadv_spline2.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_vadv_spline3.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_tracer_vadv_spline3.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_tracer_vadv_spline3.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_tracer_vadv_spline3.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_tracer_vadv_spline3.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_tracer_vadv_spline3.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tracer_vadv_spline3.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_tracer_vadv_spline3.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_tracer_vadv_spline3.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_tracer_vadv_spline3.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_tracer_vadv_spline3.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_tracer_vadv_spline3.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_tracer_vadv_spline3.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_tracer_vadv_spline3.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_vadv_stencil.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_tracer_vadv_stencil.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_tracer_vadv_stencil.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_tracer_vadv_stencil.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_tracer_vadv_stencil.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_tracer_vadv_stencil.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tracer_vadv_stencil.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_tracer_vadv_stencil.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_tracer_vadv_stencil.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_tracer_vadv_stencil.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_tracer_vadv_stencil.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_tracer_vadv_stencil.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_tracer_vadv_stencil.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_tracer_vadv_stencil.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_vadv_stencil2.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_tracer_vadv_stencil2.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_tracer_vadv_stencil2.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_tracer_vadv_stencil2.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_tracer_vadv_stencil2.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_tracer_vadv_stencil2.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tracer_vadv_stencil2.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_tracer_vadv_stencil2.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_tracer_vadv_stencil2.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_tracer_vadv_stencil2.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_tracer_vadv_stencil2.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_tracer_vadv_stencil2.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_tracer_vadv_stencil2.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_tracer_vadv_stencil2.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_vadv_stencil3.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_tracer_vadv_stencil3.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_tracer_vadv_stencil3.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_tracer_vadv_stencil3.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_tracer_vadv_stencil3.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_tracer_vadv_stencil3.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tracer_vadv_stencil3.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_tracer_vadv_stencil3.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_tracer_vadv_stencil3.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_tracer_vadv_stencil3.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_tracer_vadv_stencil3.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_tracer_vadv_stencil3.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_tracer_vadv_stencil3.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_tracer_vadv_stencil3.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_tracer_vadv_stencil4.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_tracer_vadv_stencil4.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_tracer_vadv_stencil4.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_tracer_vadv_stencil4.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_tracer_vadv_stencil4.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_tracer_vadv_stencil4.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tracer_vadv_stencil4.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_tracer_vadv_stencil4.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_tracer_vadv_stencil4.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_tracer_vadv_stencil4.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_tracer_vadv_stencil4.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_tracer_vadv_stencil4.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_tracer_vadv_stencil4.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_tracer_vadv_stencil4.F:924-962
Modified: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_vel_coriolis.F
===================================================================
--- branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_vel_coriolis.F        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_vel_coriolis.F        2012-03-15 22:11:29 UTC (rev 1652)
@@ -62,7 +62,7 @@
!
!-----------------------------------------------------------------------
- subroutine ocn_vel_coriolis_tend(grid, pv_edge, h_edge, u, ke, tend, err)!{{{
+ subroutine ocn_vel_coriolis_tend(grid, Vor_edge, h_edge, u, ke, tend, err)!{{{
!-----------------------------------------------------------------
!
@@ -71,7 +71,7 @@
!-----------------------------------------------------------------
real (kind=RKIND), dimension(:,:), intent(in) :: &
- pv_edge !< Input: Potential vorticity on edge
+ Vor_edge !< Input: Potential vorticity on edge
real (kind=RKIND), dimension(:,:), intent(in) :: &
h_edge !< Input: Thickness on edge
real (kind=RKIND), dimension(:,:), intent(in) :: &
@@ -138,7 +138,7 @@
q = 0.0
do j = 1,nEdgesOnEdge(iEdge)
eoe = edgesOnEdge(j,iEdge)
- workpv = 0.5 * (pv_edge(k,iEdge) + pv_edge(k,eoe))
+ workpv = 0.5 * (Vor_edge(k,iEdge) + Vor_edge(k,eoe))
q = q + weightsOnEdge(j,iEdge) * u(k,eoe) * workpv * h_edge(k,eoe)
end do
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_vel_coriolis.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_vel_coriolis.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_vel_coriolis.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_vel_coriolis.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_vel_coriolis.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_vel_coriolis.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vel_coriolis.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_vel_coriolis.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_vel_coriolis.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_vel_coriolis.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_vel_coriolis.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_vel_coriolis.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_vel_coriolis.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_vel_coriolis.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_vel_forcing.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_vel_forcing.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_vel_forcing.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_vel_forcing.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_vel_forcing.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_vel_forcing.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vel_forcing.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_vel_forcing.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_vel_forcing.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_vel_forcing.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_vel_forcing.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_vel_forcing.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_vel_forcing.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_vel_forcing.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_vel_forcing_bottomdrag.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_vel_forcing_bottomdrag.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_vel_forcing_bottomdrag.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_vel_forcing_bottomdrag.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_vel_forcing_bottomdrag.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_vel_forcing_bottomdrag.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vel_forcing_bottomdrag.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_vel_forcing_bottomdrag.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_vel_forcing_bottomdrag.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_vel_forcing_bottomdrag.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_vel_forcing_bottomdrag.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_vel_forcing_bottomdrag.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_vel_forcing_bottomdrag.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_vel_forcing_bottomdrag.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_vel_forcing_windstress.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_vel_forcing_windstress.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_vel_forcing_windstress.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_vel_forcing_windstress.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_vel_forcing_windstress.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_vel_forcing_windstress.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vel_forcing_windstress.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_vel_forcing_windstress.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_vel_forcing_windstress.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_vel_forcing_windstress.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_vel_forcing_windstress.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_vel_forcing_windstress.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_vel_forcing_windstress.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_vel_forcing_windstress.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_vel_hmix.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_vel_hmix.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_vel_hmix.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_vel_hmix.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_vel_hmix.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_vel_hmix.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vel_hmix.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_vel_hmix.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_vel_hmix.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_vel_hmix.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_vel_hmix.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_vel_hmix.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_vel_hmix.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_vel_hmix.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_vel_hmix_del2.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_vel_hmix_del2.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_vel_hmix_del2.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_vel_hmix_del2.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_vel_hmix_del2.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_vel_hmix_del2.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vel_hmix_del2.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_vel_hmix_del2.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_vel_hmix_del2.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_vel_hmix_del2.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_vel_hmix_del2.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_vel_hmix_del2.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_vel_hmix_del2.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_vel_hmix_del2.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_vel_hmix_del4.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_vel_hmix_del4.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_vel_hmix_del4.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_vel_hmix_del4.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_vel_hmix_del4.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_vel_hmix_del4.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vel_hmix_del4.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_vel_hmix_del4.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_vel_hmix_del4.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_vel_hmix_del4.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_vel_hmix_del4.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_vel_hmix_del4.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_vel_hmix_del4.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_vel_hmix_del4.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_vel_pressure_grad.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_vel_pressure_grad.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_vel_pressure_grad.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_vel_pressure_grad.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_vel_pressure_grad.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_vel_pressure_grad.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vel_pressure_grad.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_vel_pressure_grad.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_vel_pressure_grad.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_vel_pressure_grad.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_vel_pressure_grad.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_vel_pressure_grad.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_vel_pressure_grad.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_vel_pressure_grad.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_vel_vadv.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_vel_vadv.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_vel_vadv.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_vel_vadv.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_vel_vadv.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_vel_vadv.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vel_vadv.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_vel_vadv.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_vel_vadv.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_vel_vadv.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_vel_vadv.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_vel_vadv.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_vel_vadv.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_vel_vadv.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_vmix.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_vmix.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_vmix.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_vmix.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_vmix.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_vmix.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vmix.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_vmix.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_vmix.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_vmix.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_vmix.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_vmix.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_vmix.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_vmix.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_vmix_coefs_const.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_vmix_coefs_const.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_vmix_coefs_const.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_vmix_coefs_const.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_vmix_coefs_const.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_vmix_coefs_const.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vmix_coefs_const.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_vmix_coefs_const.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_vmix_coefs_const.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_vmix_coefs_const.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_vmix_coefs_const.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_vmix_coefs_const.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_vmix_coefs_const.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_vmix_coefs_const.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_vmix_coefs_rich.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_vmix_coefs_rich.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_vmix_coefs_rich.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_vmix_coefs_rich.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_vmix_coefs_rich.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_vmix_coefs_rich.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vmix_coefs_rich.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_vmix_coefs_rich.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_vmix_coefs_rich.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_vmix_coefs_rich.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_vmix_coefs_rich.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_vmix_coefs_rich.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_vmix_coefs_rich.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_vmix_coefs_rich.F:924-962
Property changes on: branches/land_ice_projects/implement_core/src/core_ocean/mpas_ocn_vmix_coefs_tanh.F
___________________________________________________________________
Deleted: svn:mergeinfo
- /branches/cam_mpas_nh/src/core_ocean/mpas_ocn_vmix_coefs_tanh.F:1260-1270
/branches/ocean_projects/ale_split_exp/src/core_ocean/mpas_ocn_vmix_coefs_tanh.F:1437-1483
/branches/ocean_projects/ale_vert_coord/src/core_ocean/mpas_ocn_vmix_coefs_tanh.F:1225-1383
/branches/ocean_projects/ale_vert_coord_new/src/core_ocean/mpas_ocn_vmix_coefs_tanh.F:1387-1428
/branches/ocean_projects/imp_vert_mix_mrp/src/core_ocean/mpas_ocn_vmix_coefs_tanh.F:754-986
/branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vmix_coefs_tanh.F:1120-1371
/branches/ocean_projects/rayleigh/src/core_ocean/mpas_ocn_vmix_coefs_tanh.F:1298-1311
/branches/ocean_projects/split_explicit_mrp/src/core_ocean/mpas_ocn_vmix_coefs_tanh.F:1134-1138
/branches/ocean_projects/split_explicit_timestepping/src/core_ocean/mpas_ocn_vmix_coefs_tanh.F:1044-1097
/branches/ocean_projects/time_averaging/src/core_ocean/mpas_ocn_vmix_coefs_tanh.F:1271-1305
/branches/ocean_projects/vert_adv_mrp/src/core_ocean/mpas_ocn_vmix_coefs_tanh.F:704-745
/branches/source_renaming/src/core_ocean/mpas_ocn_vmix_coefs_tanh.F:1082-1113
/branches/time_manager/src/core_ocean/mpas_ocn_vmix_coefs_tanh.F:924-962
Modified: branches/land_ice_projects/implement_core/src/core_sw/Registry
===================================================================
--- branches/land_ice_projects/implement_core/src/core_sw/Registry        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/src/core_sw/Registry        2012-03-15 22:11:29 UTC (rev 1652)
@@ -4,7 +4,7 @@
namelist integer sw_model config_test_case 5
namelist character sw_model config_time_integration RK4
namelist real sw_model config_dt 172.8
-namelist integer sw_model config_calendar_type MPAS_360DAY
+namelist character sw_model config_calendar_type 360day
namelist character sw_model config_start_time 0000-01-01_00:00:00
namelist character sw_model config_stop_time none
namelist character sw_model config_run_duration none
Modified: branches/land_ice_projects/implement_core/src/external/Makefile
===================================================================
--- branches/land_ice_projects/implement_core/src/external/Makefile        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/src/external/Makefile        2012-03-15 22:11:29 UTC (rev 1652)
@@ -3,7 +3,7 @@
all: esmf_time
esmf_time:
-        ( cd esmf_time_f90; make FC="$(FC) $(FFLAGS)" CPP="$(CPP)" )
+        ( cd esmf_time_f90; $(MAKE) FC="$(FC) $(FFLAGS)" CPP="$(CPP)" )
clean:
-        ( cd esmf_time_f90; make clean )
+        ( cd esmf_time_f90; $(MAKE) clean )
Modified: branches/land_ice_projects/implement_core/src/external/esmf_time_f90/ESMF_Calendar.F90
===================================================================
--- branches/land_ice_projects/implement_core/src/external/esmf_time_f90/ESMF_Calendar.F90        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/src/external/esmf_time_f90/ESMF_Calendar.F90        2012-03-15 22:11:29 UTC (rev 1652)
@@ -51,14 +51,23 @@
INTEGER, PARAMETER :: MONTHS_PER_YEAR = 12
- INTEGER, PARAMETER :: mday(MONTHS_PER_YEAR) &
+
+ INTEGER, PARAMETER :: daysPerMonthNoLeap(MONTHS_PER_YEAR) &
= (/31,28,31,30,31,30,31,31,30,31,30,31/)
- INTEGER, PARAMETER :: mdayleap(MONTHS_PER_YEAR) &
+ INTEGER, PARAMETER :: daysPerMonthLeap(MONTHS_PER_YEAR) &
= (/31,29,31,30,31,30,31,31,30,31,30,31/)
- INTEGER, DIMENSION(365) :: daym
- INTEGER, DIMENSION(366) :: daymleap
+ INTEGER, PARAMETER :: daysPerMonth360(MONTHS_PER_YEAR) &
+ = (/30,30,30,30,30,30,30,30,30,30,30,30/)
+
+ INTEGER, DIMENSION(MONTHS_PER_YEAR) :: mday
+ INTEGER, DIMENSION(MONTHS_PER_YEAR) :: mdayleap
+
+ INTEGER, DIMENSION(:), POINTER :: daym
+ INTEGER, DIMENSION(:), POINTER :: daymleap
+
INTEGER :: mdaycum(0:MONTHS_PER_YEAR)
INTEGER :: mdayleapcum(0:MONTHS_PER_YEAR)
+
TYPE(ESMF_BaseTime), TARGET :: monthbdys(0:MONTHS_PER_YEAR)
TYPE(ESMF_BaseTime), TARGET :: monthbdysleap(0:MONTHS_PER_YEAR)
@@ -69,7 +78,6 @@
! ! F90 "enum" type to match C++ ESMC_CalendarType enum
type ESMF_CalendarType
- private
integer :: caltype
end type
@@ -152,7 +160,10 @@
!
! !PUBLIC MEMBER FUNCTIONS:
public ESMF_CalendarCreate
+ public ESMF_CalendarDestroy
+ public ESMF_GetCalendarType
+
! Required inherited and overridden ESMF_Base class methods
public ESMF_CalendarInitialized ! Only in this implementation, intended
@@ -165,6 +176,14 @@
!==============================================================================
+
+
+ type(ESMF_CalendarType) function ESMF_GetCalendarType()
+ ESMF_GetCalendarType = defaultCal % Type
+ end function ESMF_GetCalendarType
+
+
+!==============================================================================
!BOP
! !IROUTINE: ESMF_CalendarCreate - Create a new ESMF Calendar of built-in type
@@ -210,50 +229,61 @@
type(ESMF_DaysPerYear) :: dayspy
if ( present(rc) ) rc = ESMF_FAILURE
-! Calendar type is hard-coded. Use ESMF library if more flexibility is
-! needed.
-#ifdef NO_LEAP_CALENDAR
- if ( calendartype%caltype /= ESMF_CAL_NOLEAP%caltype ) then
+
+ if ( calendartype % caltype == ESMF_CAL_GREGORIAN % caltype ) then
+ ESMF_CalendarCreate % Type = ESMF_CAL_GREGORIAN
+ mday = daysPerMonthNoLeap
+         mdayleap = daysPerMonthLeap
+         allocate(daym(365))
+         allocate(daymleap(366))
+ else if ( calendartype % caltype == ESMF_CAL_NOLEAP % caltype ) then
+ ESMF_CalendarCreate % Type = ESMF_CAL_NOLEAP
+         mday = daysPerMonthNoLeap
+         mdayleap = daysPerMonthNoLeap
+         allocate(daym(365))
+         allocate(daymleap(365))
+ else if ( calendartype % caltype == ESMF_CAL_360DAY % caltype ) then
+ ESMF_CalendarCreate % Type = ESMF_CAL_360DAY
+ mday = daysPerMonth360
+         mdayleap = daysPerMonth360
+         allocate(daym(360))
+         allocate(daymleap(360))
+ else
write(6,*) 'Not a valid calendar type for this implementation'
- write(6,*) 'This implementation only allows ESMF_CAL_NOLEAP'
- write(6,*) 'calender type set to = ', calendartype%caltype
- write(6,*) 'NO_LEAP calendar type is = ', ESMF_CAL_NOLEAP%caltype
+ write(6,*) 'The current implementation only supports ESMF_CAL_NOLEAP, ESMF_CAL_GREGORIAN, ESMF_CAL_360DAY'
return
end if
- ESMF_CalendarCreate%Type = ESMF_CAL_NOLEAP
-#else
- if ( calendartype%caltype /= ESMF_CAL_GREGORIAN%caltype ) then
- write(6,*) 'Not a valid calendar type for this implementation'
- write(6,*) 'This implementation only allows ESMF_CAL_GREGORIAN'
- write(6,*) 'calender type set to = ', calendartype%caltype
- write(6,*) 'GREGORIAN calendar type is = ', ESMF_CAL_GREGORIAN%caltype
- return
- end if
- ESMF_CalendarCreate%Type = ESMF_CAL_GREGORIAN
-#endif
-! This is a bug on some systems -- need initial value set by compiler at
-! startup.
-! However, note that some older compilers do not support compile-time
-! initialization of data members of Fortran derived data types. For example,
-! PGI 5.x compilers do not support this F95 feature. See
-! NO_DT_COMPONENT_INIT.
- ESMF_CalendarCreate%Set = .true.
- ESMF_CalendarCreate%SecondsPerDay = SECONDS_PER_DAY
-! DaysPerYear and SecondsPerYear are incorrect for Gregorian calendars...
- dayspy%D = size(daym)
-!TBH: TODO: Replace DaysPerYear and SecondsPerYear with methods
-!TBH: TODO: since they only make sense for the NO_LEAP calendar!
- ESMF_CalendarCreate%DaysPerYear = dayspy
- ESMF_CalendarCreate%SecondsPerYear = ESMF_CalendarCreate%SecondsPerDay &
- * dayspy%D
-!TBH: TODO: use mdayleap for leap-year calendar
- ESMF_CalendarCreate%DaysPerMonth(:) = mday(:)
+ ESMF_CalendarCreate % Set = .true.
+ ESMF_CalendarCreate % DaysPerMonth(:) = mday(:)
+ ESMF_CalendarCreate % SecondsPerDay = SECONDS_PER_DAY
+
+!TBH: TODO: Replace DaysPerYear and SecondsPerYear with methods
+!TBH: TODO: since they only make sense for the NO_LEAP calendar!
+ dayspy % D = size(daym)
+ ESMF_CalendarCreate % DaysPerYear = dayspy
+ ESMF_CalendarCreate % SecondsPerYear = ESMF_CalendarCreate % SecondsPerDay * dayspy % D
+
if ( present(rc) ) rc = ESMF_SUCCESS
- end function ESMF_CalendarCreate
+ end function ESMF_CalendarCreate
+ subroutine ESMF_CalendarDestroy(rc)
+
+ integer, intent(out), optional :: rc
+
+ if ( present(rc) ) rc = ESMF_FAILURE
+
+ deallocate(daym)
+ deallocate(daymleap)
+
+ if ( present(rc) ) rc = ESMF_SUCCESS
+
+ end subroutine ESMF_CalendarDestroy
+
+
+
!==============================================================================
!BOP
! !IROUTINE: ESMF_CalendarInitialized - check if calendar was created
Modified: branches/land_ice_projects/implement_core/src/external/esmf_time_f90/ESMF_Stubs.F90
===================================================================
--- branches/land_ice_projects/implement_core/src/external/esmf_time_f90/ESMF_Stubs.F90        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/src/external/esmf_time_f90/ESMF_Stubs.F90        2012-03-15 22:11:29 UTC (rev 1652)
@@ -91,6 +91,8 @@
! NOOP
SUBROUTINE ESMF_Finalize( rc )
USE esmf_basemod
+ USE esmf_calendarmod
+
INTEGER, INTENT( OUT), OPTIONAL :: rc
#if (defined SPMD) || (defined COUP_CSM)
#include <mpif.h>
@@ -98,6 +100,8 @@
LOGICAL :: flag
INTEGER :: ier
+ CALL ESMF_CalendarDestroy()
+
IF ( PRESENT( rc ) ) rc = ESMF_SUCCESS
#if (defined SPMD) || (defined COUP_CSM)
CALL MPI_Finalized( flag, ier )
Modified: branches/land_ice_projects/implement_core/src/external/esmf_time_f90/Meat.F90
===================================================================
--- branches/land_ice_projects/implement_core/src/external/esmf_time_f90/Meat.F90        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/src/external/esmf_time_f90/Meat.F90        2012-03-15 22:11:29 UTC (rev 1652)
@@ -169,26 +169,34 @@
! added from share/module_date_time in WRF.
FUNCTION nfeb ( year ) RESULT (num_days)
+ USE ESMF_CalendarMod
+
! Compute the number of days in February for the given year
IMPLICIT NONE
INTEGER :: year
INTEGER :: num_days
-! TBH: TODO: Replace this hack with run-time decision based on
-! TBH: TODO: passed-in calendar.
-#ifdef NO_LEAP_CALENDAR
- num_days = 28 ! By default, February has 28 days ...
-#else
- num_days = 28 ! By default, February has 28 days ...
- IF (MOD(year,4).eq.0) THEN
- num_days = 29 ! But every four years, it has 29 days ...
- IF (MOD(year,100).eq.0) THEN
- num_days = 28 ! Except every 100 years, when it has 28 days ...
- IF (MOD(year,400).eq.0) THEN
- num_days = 29 ! Except every 400 years, when it has 29 days.
+
+ type(ESMF_CalendarType) :: calendarType
+
+ calendarType = ESMF_GetCalendarType()
+
+ IF (calendarType % caltype == ESMF_CAL_NOLEAP % caltype) then
+ num_days = 28
+ ELSE IF (calendarType % caltype == ESMF_CAL_360DAY % caltype) then
+ num_days = 30
+ ELSE
+ num_days = 28 ! By default, February has 28 days ...
+ IF (MOD(year,4).eq.0) THEN
+ num_days = 29 ! But every four years, it has 29 days ...
+ IF (MOD(year,100).eq.0) THEN
+ num_days = 28 ! Except every 100 years, when it has 28 days ...
+ IF (MOD(year,400).eq.0) THEN
+ num_days = 29 ! Except every 400 years, when it has 29 days.
+ END IF
END IF
END IF
END IF
-#endif
+
END FUNCTION nfeb
@@ -206,6 +214,8 @@
#else
IF ( nfeb( year ) .EQ. 29 ) THEN
num_diy = 366
+ ELSE IF ( nfeb( year ) .EQ. 30 ) THEN
+ num_diy = 360
ELSE
num_diy = 365
ENDIF
Modified: branches/land_ice_projects/implement_core/src/framework/mpas_timekeeping.F
===================================================================
--- branches/land_ice_projects/implement_core/src/framework/mpas_timekeeping.F        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/src/framework/mpas_timekeeping.F        2012-03-15 22:11:29 UTC (rev 1652)
@@ -114,15 +114,16 @@
implicit none
- integer, intent(in) :: calendar
+ character (len=*), intent(in) :: calendar
- TheCalendar = calendar
-
- if (TheCalendar == MPAS_GREGORIAN) then
+ if (trim(calendar) == 'gregorian') then
+ TheCalendar = MPAS_GREGORIAN
call ESMF_Initialize(defaultCalendar=ESMF_CAL_GREGORIAN)
- else if (TheCalendar == MPAS_GREGORIAN_NOLEAP) then
+ else if (trim(calendar) == 'gregorian_noleap') then
+ TheCalendar = MPAS_GREGORIAN_NOLEAP
call ESMF_Initialize(defaultCalendar=ESMF_CAL_NOLEAP)
- else if (TheCalendar == MPAS_360DAY) then
+ else if (trim(calendar) == '360day') then
+ TheCalendar = MPAS_360DAY
call ESMF_Initialize(defaultCalendar=ESMF_CAL_360DAY)
else
write(0,*) 'ERROR: mpas_timekeeping_init: Invalid calendar type'
Modified: branches/land_ice_projects/implement_core/src/framework/streams.c
===================================================================
--- branches/land_ice_projects/implement_core/src/framework/streams.c        2012-03-15 19:57:40 UTC (rev 1651)
+++ branches/land_ice_projects/implement_core/src/framework/streams.c        2012-03-15 22:11:29 UTC (rev 1652)
@@ -18,6 +18,37 @@
{
char fname[128];
+#ifndef MPAS_DEBUG
+ if(*id == 0){
+         sprintf(fname, "log.%4.4i.err", *id);
+         fd_err = open(fname,O_CREAT|O_WRONLY|O_TRUNC,0644);
+         if (dup2(fd_err, 2) < 0) {
+                 printf("Error duplicating STDERR</font>
<font color="blue">");
+                 return;
+         }
+
+         sprintf(fname, "log.%4.4i.out", *id);
+         fd_out = open(fname,O_CREAT|O_WRONLY|O_TRUNC,0644);
+         if (dup2(fd_out, 1) < 0) {
+                 printf("Error duplicating STDOUT</font>
<font color="blue">");
+                 return;
+         }
+ } else {
+         sprintf(fname, "/dev/null", *id);
+         fd_err = open(fname,O_CREAT|O_WRONLY|O_TRUNC,0644);
+         if (dup2(fd_err, 2) < 0) {
+                 printf("Error duplicating STDERR</font>
<font color="blue">");
+                 return;
+         }
+
+         sprintf(fname, "/dev/null", *id);
+         fd_out = open(fname,O_CREAT|O_WRONLY|O_TRUNC,0644);
+         if (dup2(fd_out, 1) < 0) {
+                 printf("Error duplicating STDOUT</font>
<font color="gray">");
+                 return;
+         }
+ }
+#else
sprintf(fname, "log.%4.4i.err", *id);
fd_err = open(fname,O_CREAT|O_WRONLY|O_TRUNC,0644);
if (dup2(fd_err, 2) < 0) {
@@ -31,6 +62,7 @@
printf("Error duplicating STDOUT</font>
<font color="blue">");
return;
}
+#endif
}
void close_streams()
</font>
</pre>