<p><b>dwj07@fsu.edu</b> 2013-02-05 09:30:40 -0700 (Tue, 05 Feb 2013)</p><p><br>
        -- BRANCH COMMIT --<br>
<br>
        Merging trunk to openmp_elements branch.<br>
</p><hr noshade><pre><font color="gray">Index: branches/ocean_projects/openmp_elements
===================================================================
--- branches/ocean_projects/openmp_elements        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements        2013-02-05 16:30:40 UTC (rev 2430)
Property changes on: branches/ocean_projects/openmp_elements
___________________________________________________________________
Modified: svn:mergeinfo
## -10,6 +10,7 ##
/branches/ocean_projects/leith_mrp:2182-2241
/branches/ocean_projects/monotonic_advection:1499-1640
/branches/ocean_projects/monthly_forcing:1810-1867
+/branches/ocean_projects/namelist_cleanup:2319-2414
/branches/ocean_projects/option3_b4b_test:2201-2231
/branches/ocean_projects/partial_bottom_cells:2172-2226
/branches/ocean_projects/restart_reproducibility:2239-2272
## -25,4 +26,4 ##
/branches/omp_blocks/multiple_blocks:1803-2084
/branches/source_renaming:1082-1113
/branches/time_manager:924-962
-/trunk/mpas:2346-2403
+/trunk/mpas:2346-2428
\ No newline at end of property
Modified: branches/ocean_projects/openmp_elements/namelist.input.ocean
===================================================================
--- branches/ocean_projects/openmp_elements/namelist.input.ocean        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/namelist.input.ocean        2013-02-05 16:30:40 UTC (rev 2430)
@@ -1,110 +1,162 @@
-&sw_model
- config_test_case = 0
- config_time_integration = 'split_explicit'
- config_rk_filter_btr_mode = .false.
- config_dt = 180.0
- config_start_time = '0000-01-01_00:00:00'
- config_run_duration = '1_00:00:00'
- config_stats_interval = 480
+&time_management
+        config_do_restart = .false.
+        config_start_time = '0000-01-01_00:00:00'
+        config_stop_time = 'none'
+        config_run_duration = '0_06:00:00'
+        config_calendar_type = '360day'
+        config_ncouple_per_day = 1
/
&io
- config_input_name = 'grid.nc'
- config_output_name = 'output.nc'
- config_restart_name = 'restart.nc'
- config_output_interval = '1_00:00:00'
- config_frames_per_outfile = 1000000
- config_pio_num_iotasks = 0
- config_pio_stride = 1
- config_write_output_on_startup = .true.
+        config_input_name = 'grid.nc'
+        config_output_name = 'output.nc'
+        config_restart_name = 'restart.nc'
+        config_restart_interval = '0_03:00:00'
+        config_output_interval = '0_06:00:00'
+        config_stats_interval = '00_00:00:01'
+        config_write_stats_on_startup = .false.
+        config_write_output_on_startup = .false.
+        config_frames_per_outfile = 0
+        config_pio_num_iotasks = 0
+        config_pio_stride = 1
/
+&time_integration
+        config_dt = 3000.0
+        config_time_integrator = 'split_explicit'
+/
+&grid
+        config_num_halos = 3
+        config_enforce_grid_on_restart = .false.
+        config_vert_coord_movement = 'uniform_stretching'
+        config_alter_ICs_for_pbcs = 'zlevel_pbcs_off'
+        config_min_pbc_fraction = 0.10
+        config_check_ssh_consistency = .true.
+/
&decomposition
- config_number_of_blocks = 0
- config_block_decomp_file_prefix = 'graph.info.part.'
- config_explicit_proc_decomp = .false.
- config_proc_decomp_file_prefix = 'graph.info.part.'
+        config_block_decomp_file_prefix = 'graph.info.part.'
+        config_number_of_blocks = 0
+        config_explicit_proc_decomp = .false.
+        config_proc_decomp_file_prefix = 'graph.info.part.'
/
-&restart
- config_do_restart = .false.
- config_restart_interval = '120_00:00:00'
+&hmix
+        config_h_ScaleWithMesh = .true.
+        config_visc_vorticity_term = .true.
+        config_apvm_scale_factor = 0.0
/
-&grid
- config_vert_grid_type = 'isopycnal'
- config_pressure_type = 'pressure'
- config_rho0 = 1014.65
+&hmix_del2
+        config_use_mom_del2 = .false.
+        config_use_tracer_del2 = .false.
+        config_h_mom_eddy_visc2 = 0.0
+        config_h_tracer_eddy_diff2 = 0.0
+        config_visc_vorticity_visc2_scale = 1.0
/
-&partial_bottom_cells
- config_alter_ICs_for_pbcs = 'off'
- config_min_pbc_fraction = 0.10
- config_check_ssh_consistency = .true.
- config_check_zlevel_consistency = .false.
+&hmix_del4
+        config_use_mom_del4 = .true.
+        config_use_tracer_del4 = .false.
+        config_h_mom_eddy_visc4 = 5.0e13
+        config_h_tracer_eddy_diff4 = 0.0
+        config_visc_vorticity_visc4_scale = 1.0
/
-&split_explicit_ts
- config_n_ts_iter = 2
- config_n_bcl_iter_beg = 1
- config_n_bcl_iter_mid = 2
- config_n_bcl_iter_end = 2
- config_n_btr_subcycles = 10
- config_n_btr_cor_iter = 2
- config_u_correction = .true.
- config_filter_btr_mode = .false.
- config_btr_subcycle_loop_factor = 2
- config_btr_gam1_uWt1 = 0.5
- config_btr_gam2_SSHWt1 = 1.0
- config_btr_gam3_uWt2 = 1.0
- config_btr_solve_SSH2 = .false.
+&hmix_Leith
+        config_use_Leith_del2 = .false.
+        config_Leith_parameter = 1.0
+        config_Leith_dx = 15000.0
+        config_Leith_visc2_max = 2.5e3
/
-&hmix
- config_h_mom_eddy_visc2 = 100.0
- config_h_mom_eddy_visc4 = 0.0
- config_h_kappa = 0.0
- config_h_kappa_q = 0.0
- config_visc_vorticity_term = .true.
- config_h_tracer_eddy_diff2 = 1.0e5
- config_h_tracer_eddy_diff4 = 0.0
+&standard_GM
+        config_h_kappa = 0.0
+        config_h_kappa_q = 0.0
/
-&hmix_leith
- config_use_leith_del2 = .false.
- config_leith_parameter = 1.0
- config_leith_dx = 15000.0
- config_leith_visc2_max = 2.5e3
+&Rayleigh_damping
+        config_Rayleigh_friction = .false.
+        config_Rayleigh_damping_coeff = 0.0
/
&vmix
- config_vert_visc_type = 'const'
- config_vert_diff_type = 'const'
- config_implicit_vertical_mix = .true.
- config_convective_visc = 1.0
- config_convective_diff = 1.0
- config_bottom_drag_coeff = 1.0e-3
+        config_implicit_vertical_mix = .true.
+        config_convective_visc = 1.0
+        config_convective_diff = 1.0
/
&vmix_const
- config_vert_visc = 1.0e-5
- config_vert_diff = 1.0e-5
+        config_use_const_visc = .false.
+        config_use_const_diff = .false.
+        config_vert_visc = 2.5e-4
+        config_vert_diff = 2.5e-5
/
&vmix_rich
- config_bkrd_vert_visc = 1.0e-5
- config_bkrd_vert_diff = 1.0e-5
- config_rich_mix = 0.005
+        config_use_rich_visc = .true.
+        config_use_rich_diff = .true.
+        config_bkrd_vert_visc = 1.0e-4
+        config_bkrd_vert_diff = 1.0e-5
+        config_rich_mix = 0.005
/
&vmix_tanh
- config_max_visc_tanh = 2.5e-1
- config_min_visc_tanh = 1.0e-4
- config_max_diff_tanh = 2.5e-2
- config_min_diff_tanh = 1.0e-5
- config_zMid_tanh = -100
- config_zWidth_tanh = 100
+        config_use_tanh_visc = .false.
+        config_use_tanh_diff = .false.
+        config_max_visc_tanh = 2.5e-1
+        config_min_visc_tanh = 1.0e-4
+        config_max_diff_tanh = 2.5e-2
+        config_min_diff_tanh = 1.0e-5
+        config_zMid_tanh = -100
+        config_zWidth_tanh = 100
/
-&eos
- config_eos_type = 'linear'
+&forcing
+        config_use_monthly_forcing = .false.
+        config_restoreTS = .false.
+        config_restoreT_timescale = 90.0
+        config_restoreS_timescale = 90.0
/
&advection
- config_vert_tracer_adv = 'stencil'
- config_vert_tracer_adv_order = 2
- config_horiz_tracer_adv_order = 2
- config_thickness_adv_order = 2
- config_monotonic = .false.
+        config_vert_tracer_adv = 'stencil'
+        config_vert_tracer_adv_order = 3
+        config_horiz_tracer_adv_order = 3
+        config_coef_3rd_order = 0.25
+        config_monotonic = .true.
/
-&restore
- config_restoreTS = .false.
- config_restoreT_timescale = 90.0
- config_restoreS_timescale = 90.0
+&bottom_drag
+        config_bottom_drag_coeff = 1.0e-3
/
+&pressure_gradient
+        config_pressure_gradient_type = 'pressure_and_zmid'
+        config_rho0 = 1014.65
+/
+&eos
+        config_eos_type = 'jm'
+/
+&split_explicit_ts
+        config_n_ts_iter = 2
+        config_n_bcl_iter_beg = 1
+        config_n_bcl_iter_mid = 2
+        config_n_bcl_iter_end = 2
+        config_n_btr_subcycles = 20
+        config_n_btr_cor_iter = 2
+        config_u_correction = .true.
+        config_btr_subcycle_loop_factor = 2
+        config_btr_gam1_uWt1 = 0.5
+        config_btr_gam2_SSHWt1 = 1.0
+        config_btr_gam3_uWt2 = 1.0
+        config_btr_solve_SSH2 = .false.
+/
+&sw_model
+ config_test_case = 0
+/
+&debug
+        config_check_zlevel_consistency = .false.
+        config_filter_btr_mode = .false.
+        config_prescribe_velocity = .false.
+        config_prescribe_thickness = .false.
+        config_include_KE_vertex = .false.
+        config_check_tracer_monotonicity = .false.
+        config_disable_h_all_tend = .false.
+        config_disable_h_hadv = .false.
+        config_disable_h_vadv = .false.
+        config_disable_u_all_tend = .false.
+        config_disable_u_coriolis = .false.
+        config_disable_u_pgrad = .false.
+        config_disable_u_hmix = .false.
+        config_disable_u_windstress = .false.
+        config_disable_u_vmix = .false.
+        config_disable_u_vadv = .false.
+        config_disable_tr_all_tend = .false.
+        config_disable_tr_adv = .false.
+        config_disable_tr_hmix = .false.
+        config_disable_tr_vmix = .false.
+/
Index: branches/ocean_projects/openmp_elements/src/core_ocean
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean        2013-02-05 16:30:40 UTC (rev 2430)
Property changes on: branches/ocean_projects/openmp_elements/src/core_ocean
___________________________________________________________________
Modified: svn:mergeinfo
## -10,6 +10,7 ##
/branches/ocean_projects/leith_mrp/src/core_ocean:2182-2241
/branches/ocean_projects/monotonic_advection/src/core_ocean:1499-1640
/branches/ocean_projects/monthly_forcing/src/core_ocean:1810-1867
+/branches/ocean_projects/namelist_cleanup/src/core_ocean:2319-2414
/branches/ocean_projects/option3_b4b_test/src/core_ocean:2201-2231
/branches/ocean_projects/partial_bottom_cells/src/core_ocean:2172-2226
/branches/ocean_projects/restart_reproducibility/src/core_ocean:2239-2272
## -27,4 +28,4 ##
/branches/omp_blocks/openmp_test/src/core_ocean_elements:2161-2201
/branches/source_renaming/src/core_ocean:1082-1113
/branches/time_manager/src/core_ocean:924-962
-/trunk/mpas/src/core_ocean:2346-2403
+/trunk/mpas/src/core_ocean:2346-2428
\ No newline at end of property
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/Registry
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/Registry        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/Registry        2013-02-05 16:30:40 UTC (rev 2430)
@@ -1,103 +1,145 @@
%
% namelist type namelist_record name default_value
%
-namelist integer sw_model config_test_case 5
-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 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 integer sw_model config_num_halos 3
-namelist integer sw_model config_ncouple_per_day 1
-namelist character io config_input_name grid.nc
-namelist character io config_output_name output.nc
-namelist character io config_restart_name restart.nc
-namelist character io config_output_interval 24:00:00
+namelist logical time_management config_do_restart .false.
+namelist character time_management config_start_time '0000-01-01_00:00:00'
+namelist character time_management config_stop_time 'none'
+namelist character time_management config_run_duration 'none'
+namelist character time_management config_calendar_type '360day'
+namelist integer time_management config_ncouple_per_day 1
+
+namelist character io config_input_name 'grid.nc'
+namelist character io config_output_name 'output.nc'
+namelist character io config_restart_name 'restart.nc'
+namelist character io config_restart_interval 'none'
+namelist character io config_output_interval '24:00:00'
+namelist character io config_stats_interval '24:00:00'
+namelist logical io config_write_stats_on_startup .false.
+namelist logical io config_write_output_on_startup .true.
namelist integer io config_frames_per_outfile 0
namelist integer io config_pio_num_iotasks 0
namelist integer io config_pio_stride 1
-namelist logical io config_write_output_on_startup true
-namelist character decomposition config_block_decomp_file_prefix graph.info.part.
+
+namelist real time_integration config_dt 172.8
+namelist character time_integration config_time_integrator 'RK4'
+
+namelist integer grid config_num_halos 3
+namelist logical grid config_enforce_grid_on_restart .false.
+namelist character grid config_vert_coord_movement 'isopycnal'
+namelist character grid config_alter_ICs_for_pbcs 'zlevel_pbcs_off'
+namelist real grid config_min_pbc_fraction 0.10
+namelist logical grid config_check_ssh_consistency .true.
+
+namelist character decomposition config_block_decomp_file_prefix 'graph.info.part.'
namelist integer decomposition config_number_of_blocks 0
-namelist logical decomposition config_explicit_proc_decomp false
-namelist character decomposition config_proc_decomp_file_prefix graph.info.part.
-namelist logical restart config_do_restart false
-namelist character restart config_restart_interval none
-namelist character grid config_vert_grid_type isopycnal
-namelist character grid config_pressure_type pressure
-namelist real grid config_rho0 1028
-namelist logical grid config_enforce_zstar_at_restart false
-namelist character partial_bottom_cells config_alter_ICs_for_pbcs zlevel_pbcs_off
-namelist real partial_bottom_cells config_min_pbc_fraction 0.10
-namelist logical partial_bottom_cells config_check_ssh_consistency true
-namelist logical partial_bottom_cells config_check_zlevel_consistency false
-namelist integer split_explicit_ts config_n_ts_iter 2
-namelist integer split_explicit_ts config_n_bcl_iter_beg 2
-namelist integer split_explicit_ts config_n_bcl_iter_mid 2
-namelist integer split_explicit_ts config_n_bcl_iter_end 2
-namelist integer split_explicit_ts config_n_btr_subcycles 20
-namelist integer split_explicit_ts config_n_btr_cor_iter 2
-namelist logical split_explicit_ts config_u_correction true
-namelist logical split_explicit_ts config_filter_btr_mode false
-namelist integer split_explicit_ts config_btr_subcycle_loop_factor 2
-namelist real split_explicit_ts config_btr_gam1_uWt1 0.5
-namelist real split_explicit_ts config_btr_gam2_SSHWt1 1.0
-namelist real split_explicit_ts config_btr_gam3_uWt2 1.0
-namelist logical split_explicit_ts config_btr_solve_SSH2 false
-namelist logical hmix config_h_ScaleWithMesh false
-namelist real hmix config_h_mom_eddy_visc2 0.0
-namelist real hmix config_h_mom_eddy_visc4 0.0
-namelist logical hmix config_visc_vorticity_term true
-namelist real hmix config_visc_vorticity_visc2_scale 1.0
-namelist real hmix config_visc_vorticity_visc4_scale 1.0
-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_h_kappa 0.0
-namelist real hmix config_h_kappa_q 0.0
-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 logical hmix_leith config_use_leith_del2 false
-namelist real hmix_leith config_leith_parameter 0.0
-namelist real hmix_leith config_leith_dx 0.0
-namelist real hmix_leith config_leith_visc2_max 1000000.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
+namelist logical decomposition config_explicit_proc_decomp .false.
+namelist character decomposition config_proc_decomp_file_prefix 'graph.info.part.'
+
+namelist logical hmix config_h_ScaleWithMesh .false.
+namelist logical hmix config_visc_vorticity_term .true.
+namelist real hmix config_apvm_scale_factor 0.0
+
+namelist logical hmix_del2 config_use_mom_del2 .true.
+namelist logical hmix_del2 config_use_tracer_del2 .true.
+namelist real hmix_del2 config_h_mom_eddy_visc2 0.0
+namelist real hmix_del2 config_h_tracer_eddy_diff2 0.0
+namelist real hmix_del2 config_visc_vorticity_visc2_scale 1.0
+
+namelist logical hmix_del4 config_use_mom_del4 .true.
+namelist logical hmix_del4 config_use_tracer_del4 .true.
+namelist real hmix_del4 config_h_mom_eddy_visc4 0.0
+namelist real hmix_del4 config_h_tracer_eddy_diff4 0.0
+namelist real hmix_del4 config_visc_vorticity_visc4_scale 1.0
+
+namelist logical hmix_Leith config_use_Leith_del2 .false.
+namelist real hmix_Leith config_Leith_parameter 0.0
+namelist real hmix_Leith config_Leith_dx 0.0
+namelist real hmix_Leith config_Leith_visc2_max 1000000.0
+
+namelist real standard_GM config_h_kappa 0.0
+namelist real standard_GM config_h_kappa_q 0.0
+
+namelist logical Rayleigh_damping config_Rayleigh_friction .false.
+namelist real Rayleigh_damping config_Rayleigh_damping_coeff 0.0
+
+namelist logical vmix config_implicit_vertical_mix .true.
namelist real vmix config_convective_visc 1.0
namelist real vmix config_convective_diff 1.0
-namelist real vmix config_bottom_drag_coeff 1.0e-3
+
+namelist logical vmix_const config_use_const_visc .true.
+namelist logical vmix_const config_use_const_diff .true.
namelist real vmix_const config_vert_visc 2.5e-4
namelist real vmix_const config_vert_diff 2.5e-5
+
+namelist logical vmix_rich config_use_rich_visc .true.
+namelist logical vmix_rich config_use_rich_diff .true.
namelist real vmix_rich config_bkrd_vert_visc 1.0e-4
namelist real vmix_rich config_bkrd_vert_diff 1.0e-5
namelist real vmix_rich config_rich_mix 0.005
+
+namelist logical vmix_tanh config_use_tanh_visc .true.
+namelist logical vmix_tanh config_use_tanh_diff .true.
namelist real vmix_tanh config_max_visc_tanh 2.5e-1
namelist real vmix_tanh config_min_visc_tanh 1.0e-4
namelist real vmix_tanh config_max_diff_tanh 2.5e-2
namelist real vmix_tanh config_min_diff_tanh 1.0e-5
namelist real vmix_tanh config_zMid_tanh -100
namelist real vmix_tanh config_zWidth_tanh 100
-namelist character eos config_eos_type linear
-namelist character advection config_vert_tracer_adv stencil
+
+namelist logical forcing config_use_monthly_forcing .false.
+namelist logical forcing config_restoreTS .false.
+namelist real forcing config_restoreT_timescale 90.0
+namelist real forcing config_restoreS_timescale 90.0
+
+namelist character advection config_vert_tracer_adv 'stencil'
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 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
-namelist logical restore config_use_monthly_forcing false
+namelist logical advection config_monotonic .false.
+namelist real bottom_drag config_bottom_drag_coeff 1.0e-3
+
+namelist character pressure_gradient config_pressure_gradient_type 'pressure_and_zmid'
+namelist real pressure_gradient config_rho0 1014.65
+
+namelist character eos config_eos_type 'linear'
+
+namelist integer split_explicit_ts config_n_ts_iter 2
+namelist integer split_explicit_ts config_n_bcl_iter_beg 2
+namelist integer split_explicit_ts config_n_bcl_iter_mid 2
+namelist integer split_explicit_ts config_n_bcl_iter_end 2
+namelist integer split_explicit_ts config_n_btr_subcycles 20
+namelist integer split_explicit_ts config_n_btr_cor_iter 2
+namelist logical split_explicit_ts config_u_correction .true.
+namelist integer split_explicit_ts config_btr_subcycle_loop_factor 2
+namelist real split_explicit_ts config_btr_gam1_uWt1 0.5
+namelist real split_explicit_ts config_btr_gam2_SSHWt1 1.0
+namelist real split_explicit_ts config_btr_gam3_uWt2 1.0
+namelist logical split_explicit_ts config_btr_solve_SSH2 .false.
+
+namelist integer sw_model config_test_case 0
+
+namelist logical debug config_check_zlevel_consistency .false.
+namelist logical debug config_filter_btr_mode .false.
+namelist logical debug config_prescribe_velocity .false.
+namelist logical debug config_prescribe_thickness .false.
+namelist logical debug config_include_KE_vertex .false.
+namelist logical debug config_check_tracer_monotonicity .false.
+namelist logical debug config_disable_h_all_tend .false.
+namelist logical debug config_disable_h_hadv .false.
+namelist logical debug config_disable_h_vadv .false.
+namelist logical debug config_disable_u_all_tend .false.
+namelist logical debug config_disable_u_coriolis .false.
+namelist logical debug config_disable_u_pgrad .false.
+namelist logical debug config_disable_u_hmix .false.
+namelist logical debug config_disable_u_windstress .false.
+namelist logical debug config_disable_u_vmix .false.
+namelist logical debug config_disable_u_vadv .false.
+namelist logical debug config_disable_tr_all_tend .false.
+namelist logical debug config_disable_tr_adv .false.
+namelist logical debug config_disable_tr_hmix .false.
+namelist logical debug config_disable_tr_vmix .false.
+
%
% dim type name_in_file name_in_code
%
@@ -196,7 +238,7 @@
% Arrays required for reconstruction of velocity field
var persistent real coeffs_reconstruct ( R3 maxEdges nCells ) 0 - coeffs_reconstruct mesh - -
-% Arrays for z-level version of mpas-ocean
+% Arrays for non-isopycnal version of mpas-ocean
var persistent integer maxLevelCell ( nCells ) 0 iro maxLevelCell mesh - -
var persistent integer maxLevelEdgeTop ( nEdges ) 0 - maxLevelEdgeTop mesh - -
var persistent integer maxLevelEdgeBot ( nEdges ) 0 - maxLevelEdgeBot mesh - -
@@ -205,7 +247,7 @@
var persistent real refBottomDepth ( nVertLevels ) 0 iro refBottomDepth mesh - -
var persistent real refBottomDepthTopOfCell ( nVertLevelsP1 ) 0 - refBottomDepthTopOfCell mesh - -
var persistent real hZLevel ( nVertLevels ) 0 iro hZLevel mesh - -
-var persistent real zstarWeight ( nVertLevels ) 0 - zstarWeight mesh - -
+var persistent real vertCoordMovementWeights ( nVertLevels ) 0 iro vertCoordMovementWeights mesh - -
% Boundary conditions and masks
var persistent integer boundaryEdge ( nVertLevels nEdges ) 0 - boundaryEdge mesh - -
@@ -240,7 +282,7 @@
var persistent real tend_tracer1 ( nVertLevels nCells Time ) 1 - tracer1 tend tracers testing
% state variables for Split Explicit timesplitting
-var persistent real uBtr ( nEdges Time ) 2 r uBtr state - -
+var persistent real uBtr ( nEdges Time ) 2 r uBtr state - -
var persistent real ssh ( nCells Time ) 2 o ssh state - -
var persistent real uBtrSubcycle ( nEdges Time ) 2 - uBtrSubcycle state - -
var persistent real sshSubcycle ( nCells Time ) 2 - sshSubcycle state - -
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_equation_of_state.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_equation_of_state.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_equation_of_state.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -158,7 +158,7 @@
linearEos = .false.
jmEos = .false.
- if(config_vert_grid_type.ne.'isopycnal') then
+ if(config_vert_coord_movement.ne.'isopycnal') then
eosON = .true.
if (config_eos_type.eq.'linear') then
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_gm.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_gm.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_gm.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -30,7 +30,7 @@
contains
- subroutine ocn_gm_compute_uBolus(s, grid)
+ subroutine ocn_gm_compute_uBolus(s, grid)!{{{
implicit none
type(state_type), intent(inout) :: s
type(mesh_type), intent(in) :: grid
@@ -50,7 +50,7 @@
call ocn_gm_compute_hEddyFlux(s, grid)
- if (config_vert_grid_type .EQ. 'isopycnal') then
+ if (config_vert_coord_movement .EQ. 'isopycnal') then
!$OMP DO PRIVATE(k)
do iEdge = 1, nEdges
@@ -69,10 +69,9 @@
end if
- end subroutine ocn_gm_compute_uBolus
+ end subroutine ocn_gm_compute_uBolus!}}}
-
- subroutine ocn_gm_compute_hEddyFlux(s, grid)
+ subroutine ocn_gm_compute_hEddyFlux(s, grid)!{{{
implicit none
type(state_type), intent(inout) :: s
type(mesh_type), intent(in) :: grid
@@ -96,7 +95,7 @@
hEddyFlux(:,:) = 0.0
!$OMP END WORKSHARE
- if (config_vert_grid_type .EQ. 'isopycnal') then
+ if (config_vert_coord_movement .EQ. 'isopycnal') then
!$OMP DO PRIVATE(cell1, cell2, k)
do iEdge = 1,nEdges
cell1 = cellsOnEdge(1,iEdge)
@@ -112,12 +111,10 @@
end if
- end subroutine ocn_gm_compute_hEddyFlux
+ end subroutine ocn_gm_compute_hEddyFlux!}}}
+ subroutine ocn_get_h_kappa(s, grid)!{{{
-
- subroutine ocn_get_h_kappa(s, grid)
-
type (state_type), intent(inout) :: s
type (mesh_type), intent(in) :: grid
@@ -129,11 +126,10 @@
h_kappa(:,:) = config_h_kappa
- end subroutine ocn_get_h_kappa
+ end subroutine ocn_get_h_kappa!}}}
+ subroutine ocn_get_h_kappa_q(s, grid)!{{{
- subroutine ocn_get_h_kappa_q(s, grid)
-
type (state_type), intent(inout) :: s
type (mesh_type), intent(in) :: grid
@@ -145,6 +141,6 @@
h_kappa_q(:,:) = config_h_kappa_q
- end subroutine ocn_get_h_kappa_q
+ end subroutine ocn_get_h_kappa_q!}}}
end module ocn_gm
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_mpas_core.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_mpas_core.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_mpas_core.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -13,10 +13,14 @@
use ocn_monthly_forcing
+ use ocn_thick_hadv
+ use ocn_thick_vadv
+
use ocn_vel_pressure_grad
use ocn_vel_vadv
use ocn_vel_hmix
use ocn_vel_forcing
+ use ocn_vel_coriolis
use ocn_tracer_hadv
use ocn_tracer_vadv
@@ -64,9 +68,16 @@
! Initialize submodules before initializing blocks.
call ocn_timestep_init(err)
+ call ocn_thick_hadv_init(err_tmp)
+ err = ior(err, err_tmp)
+
+ call ocn_thick_vadv_init(err_tmp)
+ err = ior(err, err_tmp)
+
+ call ocn_vel_coriolis_init(err_tmp)
+ err = ior(err, err_tmp)
call ocn_vel_pressure_grad_init(err_tmp)
err = ior(err, err_tmp)
-
call ocn_vel_vadv_init(err_tmp)
err = ior(err, err_tmp)
call ocn_vel_hmix_init(err_tmp)
@@ -106,38 +117,38 @@
if (.not. config_do_restart) call setup_sw_test_case(domain)
- if (config_vert_grid_type.ne.'isopycnal') call ocn_init_vert_coord(domain)
+ if (config_vert_coord_movement.ne.'isopycnal') call ocn_init_vert_coord(domain)
call ocn_compute_max_level(domain)
- if (config_enforce_zstar_at_restart) then
- call ocn_init_h_zstar(domain)
- endif
-
if (.not.config_do_restart) call ocn_init_split_timestep(domain)
- write (0,'(a,a10)') ' Vertical grid type is: ',config_vert_grid_type
+ write (0,'(a,a10)') ' Vertical coordinate movement is: ',config_vert_coord_movement
- if (config_vert_grid_type.ne.'isopycnal'.and. &
- config_vert_grid_type.ne.'zlevel'.and. &
- config_vert_grid_type.ne.'zstar1'.and. &
- config_vert_grid_type.ne.'zstar'.and. &
- config_vert_grid_type.ne.'zstarWeights') then
- write (0,*) ' Incorrect choice of config_vert_grid_type.'
+ if (config_vert_coord_movement.ne.'isopycnal'.and. &
+ config_vert_coord_movement.ne.'fixed'.and. &
+ config_vert_coord_movement.ne.'uniform_stretching'.and. &
+ config_vert_coord_movement.ne.'user_specified') then
+ write (0,*) ' Incorrect choice of config_vert_coord_movement.'
call mpas_dmpar_abort(dminfo)
endif
- write (0,'(a,a10)') ' Pressure type is: ',config_pressure_type
- if (config_pressure_type.ne.'pressure'.and. &
- config_pressure_type.ne.'MontgomeryPotential') then
- write (0,*) ' Incorrect choice of config_pressure_type.'
+ write (0,'(a,a)') ' Pressure type is: ',trim(config_pressure_gradient_type)
+ if (config_pressure_gradient_type.ne.'pressure_and_zmid'.and. &
+ config_pressure_gradient_type.ne.'MontgomeryPotential') then
+ write (0,*) ' Incorrect choice of config_pressure_gradient_type.'
call mpas_dmpar_abort(dminfo)
endif
+ if(config_vert_coord_movement .ne. 'isopycnal' .and. config_pressure_gradient_type .eq. 'MontgomeryPotential') then
+ write (0,*) ' Incorrect combination of config_vert_coord_movement and config_pressure_gradient_type'
+ call mpas_dmpar_abort(dminfo)
+ end if
+
if (config_filter_btr_mode.and. &
- config_vert_grid_type.ne.'zlevel')then
+ config_vert_coord_movement.ne.'fixed')then
write (0,*) 'filter_btr_mode has only been tested with'// &
- ' config_vert_grid_type=zlevel.'
+ ' config_vert_coord_movement=fixed.'
call mpas_dmpar_abort(dminfo)
endif
@@ -162,7 +173,7 @@
! input arguement into mpas_init. Ask about that later. For now, there will be
! no initial statistics write.
- if (config_initial_stats) then
+ if (config_write_stats_on_startup) then
call mpas_timer_start("global diagnostics", .false., globalDiagTimer)
call ocn_compute_global_diagnostics(domain, 1 , 0, dt)
call mpas_timer_stop("global diagnostics", globalDiagTimer)
@@ -230,11 +241,11 @@
!TODO: use this code if we desire to convert config_stats_interval to alarms
!(must also change config_stats_interval type to character)
! set stats alarm, if necessary
- !if (trim(config_stats_interval) /= "none") then
- ! call mpas_set_timeInterval(alarmTimeStep, timeString=config_stats_interval, ierr=ierr)
- ! alarmStartTime = startTime + alarmTimeStep
- ! call mpas_add_clock_alarm(clock, statsAlarmID, alarmStartTime, alarmTimeStep, ierr=ierr)
- !end if
+ if (trim(config_stats_interval) /= "none") then
+ call mpas_set_timeInterval(alarmTimeStep, timeString=config_stats_interval, ierr=ierr)
+ alarmStartTime = startTime + alarmTimeStep
+ call mpas_add_clock_alarm(clock, statsAlarmID, alarmStartTime, alarmTimeStep, ierr=ierr)
+ end if
call mpas_get_time(curr_time=startTime, dateTimeString=startTimeStamp, ierr=ierr)
@@ -529,30 +540,31 @@
call ocn_timestep(domain, dt, timeStamp)
- if (config_stats_interval > 0) then
- if (mod(itimestep, config_stats_interval) == 0) then
- call mpas_timer_start("global diagnostics", .false., globalDiagTimer)
- call ocn_compute_global_diagnostics(domain, 2, itimestep, dt);
- call mpas_timer_stop("global diagnostics", globalDiagTimer)
- end if
- end if
+ !if (config_stats_interval > 0) then
+ ! if (mod(itimestep, config_stats_interval) == 0) then
+ ! call mpas_timer_start("global diagnostics", .false., globalDiagTimer)
+ ! call ocn_compute_global_diagnostics(domain, 2, itimestep, dt);
+ ! call mpas_timer_stop("global diagnostics", globalDiagTimer)
+ ! end if
+ !end if
!TODO: replace the above code block with this if we desire to convert config_stats_interval to use alarms
- !if (mpas_is_alarm_ringing(clock, statsAlarmID, ierr=ierr)) then
- ! call mpas_reset_clock_alarm(clock, statsAlarmID, ierr=ierr)
+ if (mpas_is_alarm_ringing(clock, statsAlarmID, ierr=ierr)) then
+ call mpas_reset_clock_alarm(clock, statsAlarmID, ierr=ierr)
- ! block_ptr => domain % blocklist
- ! if (associated(block_ptr % next)) then
- ! write(0,*) 'Error: computeGlobalDiagnostics assumes ',&
- ! 'that there is only one block per processor.'
- ! end if
+! block_ptr => domain % blocklist
+! if (associated(block_ptr % next)) then
+! write(0,*) 'Error: computeGlobalDiagnostics assumes ',&
+! 'that there is only one block per processor.'
+! end if
- ! call mpas_timer_start("global diagnostics")
- ! call ocn_compute_global_diagnostics(domain % dminfo, &
- ! block_ptr % state % time_levs(2) % state, block_ptr % mesh, &
- ! timeStamp, dt)
- ! call mpas_timer_stop("global diagnostics")
- !end if
+ call mpas_timer_start("global diagnostics")
+ call ocn_compute_global_diagnostics(domain, 2, itimestep, dt);
+ ! call ocn_compute_global_diagnostics(domain % dminfo, &
+ ! block_ptr % state % time_levs(2) % state, block_ptr % mesh, &
+ ! timeStamp, dt)
+ call mpas_timer_stop("global diagnostics")
+ end if
end subroutine mpas_timestep!}}}
@@ -576,7 +588,7 @@
integer, dimension(:), pointer :: maxLevelCell
real (kind=RKIND), dimension(:), pointer :: refBottomDepth, &
- refBottomDepthTopOfCell, zstarWeight, hZLevel, bottomDepth
+ refBottomDepthTopOfCell, vertCoordMovementWeights, hZLevel, bottomDepth
real (kind=RKIND), dimension(:), allocatable :: minBottomDepth, minBottomDepthMid, zMidZLevel
real (kind=RKIND), dimension(:,:), pointer :: h
@@ -593,7 +605,7 @@
refBottomDepth => block % mesh % refBottomDepth % array
refBottomDepthTopOfCell => block % mesh % refBottomDepthTopOfCell % array
bottomDepth => block % mesh % bottomDepth % array
- zstarWeight => block % mesh % zstarWeight % array
+ vertCoordMovementWeights => block % mesh % vertCoordMovementWeights % array
hZLevel => block % mesh % hZLevel % array
maxLevelCell => block % mesh % maxLevelCell % array
@@ -617,28 +629,17 @@
refBottomDepthTopOfCell(k+1) = refBottomDepth(k)
end do
- ! Initialization of zstarWeights. This determines how SSH perturbations
+ ! Initialization of vertCoordMovementWeights. This determines how SSH perturbations
! are distributed throughout the column.
- if (config_vert_grid_type.eq.'zlevel') then
+ if (config_vert_coord_movement.eq.'fixed') then
- zstarWeight = 0.0
- zstarWeight(1) = 1.0
+ vertCoordMovementWeights = 0.0
+ vertCoordMovementWeights(1) = 1.0
- elseif (config_vert_grid_type.eq.'zstar') then
+ elseif (config_vert_coord_movement.eq.'uniform_stretching') then
- zstarWeight = 1.0
+ vertCoordMovementWeights = 1.0
- elseif (config_vert_grid_type.eq.'zstarWeights') then
-
- ! This is a test with other weights, just to make sure zstar functions
- ! using variable weights.
-
- zstarWeight = 0.0
- zstarWeight(1:5) = 1.0
- do k=1,10
- zstarWeight(5+k) = 1.0-k*0.1
- end do
-
endif
! Initial condition files (ocean.nc, produced by basin) include a realistic
@@ -791,13 +792,13 @@
! Compute barotropic velocity at first timestep
! This is only done upon start-up.
- if (trim(config_time_integration) == 'unsplit_explicit') then
+ if (trim(config_time_integrator) == 'unsplit_explicit') then
block % state % time_levs(1) % state % uBtr % array(:) = 0.0
block % state % time_levs(1) % state % uBcl % array(:,:) &
= block % state % time_levs(1) % state % u % array(:,:)
- elseif (trim(config_time_integration) == 'split_explicit') then
+ elseif (trim(config_time_integrator) == 'split_explicit') then
if (config_filter_btr_mode) then
do iCell=1,block % mesh % nCells
@@ -866,64 +867,6 @@
end subroutine ocn_init_split_timestep!}}}
- subroutine ocn_init_h_zstar(domain)!{{{
- ! If changing from zlevel to zstar, compute h based on zstar weights,
- ! where SSH is distributed through the layers. We only change h.
- ! We do not remap the tracer variables, so this breaks total global
- ! conservation.
-
- use mpas_grid_types
- use mpas_configure
-
- implicit none
-
- type (domain_type), intent(inout) :: domain
-
- type (block_type), pointer :: block
-
- integer :: i, iCell, iEdge, iVertex, k, nVertLevels
- integer, dimension(:), pointer :: maxLevelCell
-
- real (kind=RKIND) :: hSum, sumZstarWeights
- real (kind=RKIND), dimension(:), pointer :: hZLevel, zstarWeight, &
- refBottomDepth
- real (kind=RKIND), dimension(:,:), pointer :: h
-
- ! Initialize z-level grid variables from h, read in from input file.
- block => domain % blocklist
- do while (associated(block))
-
- h => block % state % time_levs(1) % state % h % array
- nVertLevels = block % mesh % nVertLevels
- hZLevel => block % mesh % hZLevel % array
- maxLevelCell => block % mesh % maxLevelCell % array
- zstarWeight => block % mesh % zstarWeight % array
- refBottomDepth => block % mesh % refBottomDepth % array
-
- do iCell=1,block % mesh % nCells
- ! Compute the total column thickness, hSum, and the sum of zstar weights.
- hSum = 0.0
- sumZstarWeights = 0.0
- do k = 1,maxLevelCell(iCell)
- hSum = hSum + h(k,iCell)
- sumZstarWeights = sumZstarWeights + zstarWeight(k)
- enddo
-
- ! h_k = h_k^{zlevel} + zeta * W_k/sum(W_k)
- ! where zeta is SSH and W_k are weights
- do k = 1,maxLevelCell(iCell)
- h(k,iCell) = hZLevel(k) &
- + (hSum - refBottomDepth(maxLevelCell(iCell))) &
- * zstarWeight(k)/sumZstarWeights
- enddo
-
- enddo
-
- block => block % next
- end do
-
- end subroutine ocn_init_h_zstar!}}}
-
subroutine ocn_compute_max_level(domain)!{{{
! Initialize maxLevel and bouncary grid variables.
@@ -974,7 +917,7 @@
! for z-grids, maxLevelCell should be in input state
! Isopycnal grid uses all vertical cells
- if (config_vert_grid_type.eq.'isopycnal') then
+ if (config_vert_coord_movement.eq.'isopycnal') then
maxLevelCell(1:nCells) = nVertLevels
endif
maxLevelCell(nCells+1) = 0
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_tendency.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_tendency.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_tendency.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -80,7 +80,6 @@
!
!--------------------------------------------------------------------
- integer :: hadv2nd, hadv3rd, hadv4th
integer :: ke_cell_flag, ke_vertex_flag
real (kind=RKIND) :: coef_3rd_order, fCoef
@@ -132,6 +131,8 @@
tend_h = 0.0
!$OMP END WORKSHARE
+ if(config_disable_h_all_tend) return
+
!
! height tendency: horizontal advection term -</font>
<font color="gray">abla\cdot ( hu)
!
@@ -223,6 +224,8 @@
tend_u(:,:) = 0.0
!$OMP END WORKSHARE
+ if(config_disable_u_all_tend) return
+
!
! velocity tendency: nonlinear Coriolis term and grad of kinetic energy
!
@@ -249,7 +252,7 @@
!
call mpas_timer_start("pressure grad", .false., velPgradTimer)
!$OMP END SINGLE
- if (config_pressure_type.eq.'MontgomeryPotential') then
+ if (config_pressure_gradient_type.eq.'MontgomeryPotential') then
call ocn_vel_pressure_grad_tend(grid, MontPot, zMid, rho, tend_u, err)
else
call ocn_vel_pressure_grad_tend(grid, pressure, zMid, rho, tend_u, err)
@@ -340,11 +343,22 @@
tend_tr => tend % tracers % array
tend_h => tend % h % array
+
+ !
+ ! initialize tracer tendency (RHS of tracer equation) to zero.
+ !
+ !$OMP WORKSHARE
+ tend_tr(:,:,:) = 0.0
+ !$OMP END WORKSHARE
+
+ if(config_disable_tr_all_tend) return
+
!$OMP SINGLE
call mpas_allocate_scratch_field(scratch % uh)
!$OMP END SINGLE
uh => scratch % uh % array
+
!
! QC Comment (3/15/12): need to make sure that uTransport is the right
! transport velocity for the tracer.
@@ -356,14 +370,6 @@
end do
!$OMP END DO
- !
- ! initialize tracer tendency (RHS of tracer equation) to zero.
- !
- !$OMP WORKSHARE
- tend_tr(:,:,:) = 0.0
- !$OMP END WORKSHARE
-
- !
! tracer tendency: horizontal advection term -div( h \phi u)
!
! mrp 101115 note: in order to include flux boundary conditions, we will need to
@@ -559,7 +565,7 @@
coef_3rd_order = config_coef_3rd_order
!$OMP DO PRIVATE(cell1, cell2, k)
- do iEdge=1,nEdges*hadv2nd
+ do iEdge=1,nEdges
cell1 = cellsOnEdge(1,iEdge)
cell2 = cellsOnEdge(2,iEdge)
do k=1,maxLevelEdgeTop(iEdge)
@@ -568,77 +574,6 @@
end do
!$OMP END DO
- !$OMP DO PRIVATE(cell1, cell2, k, d2fdx2_cell1, d2fdx2_cell2, boundaryMask, i, velMask)
- do iEdge=1,nEdges*hadv3rd
- cell1 = cellsOnEdge(1,iEdge)
- cell2 = cellsOnEdge(2,iEdge)
-
- do k=1,maxLevelEdgeTop(iEdge)
-
- d2fdx2_cell1 = 0.0
- d2fdx2_cell2 = 0.0
-
- boundaryMask = abs(transfer(.not.(boundaryCell(k,cell1) == 0 .and. boundaryCell(k,cell2) == 0), boundaryMask))
-
- d2fdx2_cell1 = deriv_two(1,1,iEdge) * h(k,cell1) * boundaryMask
- d2fdx2_cell2 = deriv_two(1,2,iEdge) * h(k,cell2) * boundaryMask
-
- !-- all edges of cell 1
- do i=1, nEdgesOnCell(cell1) * boundaryMask
- d2fdx2_cell1 = d2fdx2_cell1 + &
- deriv_two(i+1,1,iEdge) * h(k,grid % CellsOnCell % array (i,cell1))
- end do
-
- !-- all edges of cell 2
- do i=1, nEdgesOnCell(cell2) * boundaryMask
- d2fdx2_cell2 = d2fdx2_cell2 + &
- deriv_two(i+1,2,iEdge) * h(k,grid % CellsOnCell % array (i,cell2))
- end do
-
- velMask = 2*(abs(transfer(u(k,iEdge) <= 0, velMask))) - 1
-
- h_edge(k,iEdge) = 0.5*(h(k,cell1) + h(k,cell2)) - (dcEdge(iEdge) **2) * (d2fdx2_cell1 + d2fdx2_cell2) / 12. &
- + velMask * (dcEdge(iEdge) **2) * coef_3rd_order*(d2fdx2_cell1 - d2fdx2_cell2) / 12.
-
- end do ! do k
- end do ! do iEdge
- !$OMP END DO
-
- !$OMP DO PRIVATE(cell1, cell2, k, d2fdx2_cell1, d2fdx2_cell2, boundaryMask, i)
- do iEdge=1,nEdges*hadv4th
- cell1 = cellsOnEdge(1,iEdge)
- cell2 = cellsOnEdge(2,iEdge)
-
- do k=1,maxLevelEdgeTop(iEdge)
-
- d2fdx2_cell1 = 0.0
- d2fdx2_cell2 = 0.0
-
- boundaryMask = abs(transfer(.not.(boundaryCell(k,cell1) == 0 .and. boundaryCell(k,cell2) == 0), boundaryMask))
-
- d2fdx2_cell1 = deriv_two(1,1,iEdge) * h(k,cell1) * boundaryMask
- d2fdx2_cell2 = deriv_two(1,2,iEdge) * h(k,cell2) * boundaryMask
-
- !-- all edges of cell 1
- do i=1, nEdgesOnCell(cell1) * boundaryMask
- d2fdx2_cell1 = d2fdx2_cell1 + &
- deriv_two(i+1,1,iEdge) * h(k,grid % CellsOnCell % array (i,cell1))
- end do
-
- !-- all edges of cell 2
- do i=1, nEdgesOnCell(cell2) * boundaryMask
- d2fdx2_cell2 = d2fdx2_cell2 + &
- deriv_two(i+1,2,iEdge) * h(k,grid % CellsOnCell % array (i,cell2))
- end do
-
- h_edge(k,iEdge) = &
- 0.5*(h(k,cell1) + h(k,cell2)) &
- -(dcEdge(iEdge) **2) * (d2fdx2_cell1 + d2fdx2_cell2) / 12.
-
- end do ! do k
- end do ! do iEdge
- !$OMP END DO
-
!
! set the velocity and height at dummy address
! used -1e34 so error clearly occurs if these values are used.
@@ -847,7 +782,7 @@
!
! For an isopycnal model, density should remain constant.
! For zlevel, calculate in-situ density
- if (config_vert_grid_type.ne.'isopycnal') then
+ if (config_vert_coord_movement.ne.'isopycnal') then
!DWJ 01/29/13 OMP Equation Of State Call....
!$OMP SINGLE
call mpas_timer_start("equation of state", .false., diagEOSTimer)
@@ -863,7 +798,7 @@
! This section must be after computing rho
!
! dwj: 10/25/2011 - Need to explore isopycnal vs zlevel flags
- if (config_pressure_type.eq.'MontgomeryPotential') then
+ if (config_pressure_gradient_type.eq.'MontgomeryPotential') then
! For Isopycnal model.
! Compute pressure at top of each layer, and then
@@ -1009,7 +944,7 @@
real (kind=RKIND), dimension(:), pointer :: &
- dvEdge, areaCell, zstarWeight
+ dvEdge, areaCell, vertCoordMovementWeights
real (kind=RKIND), dimension(:), allocatable:: div_hu, h_tend_col
real (kind=RKIND) :: div_hu_btr
@@ -1030,14 +965,14 @@
maxLevelCell => grid % maxLevelCell % array
maxLevelEdgeBot => grid % maxLevelEdgeBot % array
dvEdge => grid % dvEdge % array
- zstarWeight => grid % zstarWeight % array
+ vertCoordMovementWeights => grid % vertCoordMovementWeights % array
nCells = grid % nCells
nEdges = grid % nEdges
nVertLevels = grid % nVertLevels
- if (config_vert_grid_type.eq.'isopycnal') then
+ if (config_vert_coord_movement.eq.'isopycnal') then
! set vertical velocity to zero in isopycnal case
!$OMP WORKSHARE
wTop=0.0_RKIND
@@ -1071,8 +1006,8 @@
end do
do k = 1, maxLevelCell(iCell)
- h_tend_col(k) = - zstarWeight(k) * h(k, iCell) * div_hu_btr
- hSum = hSum + zstarWeight(k) * h(k, iCell)
+ h_tend_col(k) = - vertCoordMovementWeights(k) * h(k, iCell) * div_hu_btr
+ hSum = hSum + vertCoordMovementWeights(k) * h(k, iCell)
end do
if(hSum > 0.0) then
@@ -1306,27 +1241,6 @@
coef_3rd_order = 0.
- if (config_thickness_adv_order == 2) then
- hadv2nd = 1
- hadv3rd = 0
- hadv4th = 0
- else if (config_thickness_adv_order == 3) then
- hadv2nd = 0
- hadv3rd = 1
- hadv4th = 0
-
- if(config_monotonic) then
- coef_3rd_order = 0.25
- else
- coef_3rd_order = 1.0
- endif
- else if (config_thickness_adv_order == 4) then
- hadv2nd = 0
- hadv3rd = 0
- hadv4th = 1
- end if
-
-
if(config_include_KE_vertex) then
ke_vertex_flag = 1
ke_cell_flag = 0
@@ -1335,11 +1249,11 @@
ke_cell_flag = 1
endif
- if (trim(config_time_integration) == 'RK4') then
+ if (trim(config_time_integrator) == 'RK4') then
! for RK4, PV is really PV = (eta+f)/h
fCoef = 1
- elseif (trim(config_time_integration) == 'split_explicit' &
- .or.trim(config_time_integration) == 'unsplit_explicit') then
+ elseif (trim(config_time_integrator) == 'split_explicit' &
+ .or.trim(config_time_integrator) == 'unsplit_explicit') then
! for split explicit, PV is eta/h because f is added separately to the momentum forcing.
! mrp temp, new should be:
fCoef = 0
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_thick_hadv.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_thick_hadv.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_thick_hadv.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -41,8 +41,9 @@
! Private module variables
!
!--------------------------------------------------------------------
+
+ logical :: thickHadvOn
-
!***********************************************************************
contains
@@ -120,6 +121,8 @@
err = 0
+ if(.not.thickHadvOn) return
+
nEdges = grid % nEdges
nCells = grid % nCells
nVertLevels = grid % nVertLevels
@@ -177,6 +180,10 @@
integer, intent(out) :: err !< Output: error flag
+ thickHadvOn = .true.
+
+ if(config_disable_h_hadv) thickHadvOn = .false.
+
err = 0
!--------------------------------------------------------------------
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_thick_vadv.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_thick_vadv.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_thick_vadv.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -42,6 +42,7 @@
!
!--------------------------------------------------------------------
+ logical :: thickVadvOn
!***********************************************************************
@@ -111,6 +112,8 @@
err = 0
+ if(.not.thickVadvOn) return
+
maxLevelCell => grid % maxLevelCell % array
nCells = grid % nCells
@@ -153,6 +156,10 @@
!-----------------------------------------------------------------
integer, intent(out) :: err !< Output: error flag
+
+ thickVadvOn = .true.
+
+ if(config_disable_h_vadv) thickVadvOn = .false.
err = 0
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_time_integration.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_time_integration.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_time_integration.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -123,14 +123,14 @@
rk4On = .false.
splitOn = .false.
- if (trim(config_time_integration) == 'RK4') then
+ if (trim(config_time_integrator) == 'RK4') then
rk4On = .true.
- elseif (trim(config_time_integration) == 'split_explicit' &
- .or.trim(config_time_integration) == 'unsplit_explicit') then
+ elseif (trim(config_time_integrator) == 'split_explicit' &
+ .or.trim(config_time_integrator) == 'unsplit_explicit') then
splitOn = .true.
else
err = 1
- write(*,*) 'Incorrect choice for config_time_integration:', trim(config_time_integration)
+ write(*,*) 'Incorrect choice for config_time_integrator:', trim(config_time_integrator)
write(*,*) ' choices are: RK4, split_explicit, unsplit_explicit'
endif
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_time_integration_rk4.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_time_integration_rk4.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_time_integration_rk4.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -176,7 +176,7 @@
block % provis % uTransport % array, block % provis % wTop % array, err)
call ocn_tend_h(block % tend, block % provis, block % mesh, block % scratch)
- if (config_rk_filter_btr_mode) then
+ if (config_filter_btr_mode) then
call ocn_filter_btr_mode_tend_u(block % tend, block % provis, block % mesh)
endif
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_time_integration_split.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_time_integration_split.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_time_integration_split.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -225,9 +225,9 @@
do j=1,n_bcl_iter(split_explicit_step)
! Use this G coefficient to avoid an if statement within the iEdge loop.
- if (trim(config_time_integration) == 'unsplit_explicit') then
+ if (trim(config_time_integrator) == 'unsplit_explicit') then
split = 0
- elseif (trim(config_time_integration) == 'split_explicit') then
+ elseif (trim(config_time_integrator) == 'split_explicit') then
split = 1
endif
@@ -316,7 +316,7 @@
oldBtrSubcycleTime = 1
newBtrSubcycleTime = 2
- if (trim(config_time_integration) == 'unsplit_explicit') then
+ if (trim(config_time_integrator) == 'unsplit_explicit') then
block => domain % blocklist
do while (associated(block))
@@ -347,7 +347,7 @@
block => block % next
end do ! block
- elseif (trim(config_time_integration) == 'split_explicit') then
+ elseif (trim(config_time_integrator) == 'split_explicit') then
! Initialize variables for barotropic subcycling
block => domain % blocklist
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_tracer_advection.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_tracer_advection.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_tracer_advection.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -32,6 +32,7 @@
mpas_ocn_tracer_advection_coefficients, &
mpas_ocn_tracer_advection_tend
+ logical :: tracerAdvOn
logical :: monotonicOn
contains
@@ -252,6 +253,8 @@
real (kind=RKIND), dimension(:,:), intent(in) :: tend_h !< Input: Thickness tendency information
type (scratch_type), intent(inout) :: scratch !< Input/Output : Scratch structure
+ if(.not. tracerAdvOn) return
+
if(monotonicOn) then
call mpas_ocn_tracer_advection_mono_tend(tracers, uh, w, h, verticalCellSize, dt, grid, tend_h, tend, scratch)
else
@@ -280,6 +283,10 @@
err = 0
+ tracerAdvOn = .true.
+
+ if(config_disable_tr_adv) tracerAdvOn = .false.
+
call mpas_ocn_tracer_advection_std_init(err_tmp)
call mpas_ocn_tracer_advection_mono_init(err_tmp)
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_tracer_advection_mono.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_tracer_advection_mono.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_tracer_advection_mono.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -156,7 +156,7 @@
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
+ if (config_check_tracer_monotonicity) then
tracer_new(k,iCell) = 0.0
end if
end do ! k loop
@@ -349,7 +349,7 @@
do k = 1, maxLevelEdgeTop(iEdge)
tend(iTracer, k, iCell) = tend(iTracer, k, iCell) + edgeSignOnCell(i, iCell) * high_order_horiz_flux(k, iEdge) * invAreaCell1
- if(config_check_monotonicity) then
+ if(config_check_tracer_monotonicity) then
tracer_new(k, iCell) = tracer_new(k, iCell) + edgeSignOnCell(i, iCell) * high_order_horiz_flux(k, iEdge) * invAreaCell1
end if
end do
@@ -363,7 +363,7 @@
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
+ if (config_check_tracer_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)
@@ -374,7 +374,7 @@
end do ! iCell loop
!$OMP END DO
- if (config_check_monotonicity) then
+ if (config_check_tracer_monotonicity) then
!build min and max bounds on old and new tracer for check on monotonicity.
!$OMP DO PRIVATE(k)
do iCell = 1, nCellsSolve
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_tracer_hmix.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_tracer_hmix.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_tracer_hmix.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -47,6 +47,7 @@
!
!--------------------------------------------------------------------
+ logical :: tracerHmixOn
type (timer_node), pointer :: del2Timer, del4Timer
@@ -124,6 +125,8 @@
!
!-----------------------------------------------------------------
+ if(.not.tracerHmixOn) return
+
!$OMP SINGLE
call mpas_timer_start("del2", .false., del2Timer)
!$OMP END SINGLE
@@ -173,6 +176,9 @@
integer :: err1, err2
+ tracerHmixOn = .true.
+
+ if(config_disable_tr_hmix) tracerHmixOn = .false.
call ocn_tracer_hmix_del2_init(err1)
call ocn_tracer_hmix_del4_init(err2)
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_tracer_hmix_del2.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_tracer_hmix_del2.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_tracer_hmix_del2.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -218,6 +218,8 @@
eddyDiff2 = config_h_tracer_eddy_diff2
endif
+ if(.not.config_use_tracer_del2) del2on = .false.
+
!--------------------------------------------------------------------
end subroutine ocn_tracer_hmix_del2_init!}}}
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_tracer_hmix_del4.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_tracer_hmix_del4.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_tracer_hmix_del4.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -254,6 +254,8 @@
eddyDiff4 = config_h_tracer_eddy_diff4
endif
+ if(.not.config_use_tracer_del4) del4on = .false.
+
!--------------------------------------------------------------------
end subroutine ocn_tracer_hmix_del4_init!}}}
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_tracer_vadv.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_tracer_vadv.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_tracer_vadv.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -172,7 +172,7 @@
err = 0
vadvOn = .false.
- if (config_vert_grid_type.ne.'isopycnal') then
+ if (config_vert_coord_movement.ne.'isopycnal') then
vadvOn = .true.
call ocn_tracer_vadv_stencil_init(err1)
call ocn_tracer_vadv_spline_init(err2)
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vel_coriolis.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vel_coriolis.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vel_coriolis.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -43,6 +43,7 @@
!
!--------------------------------------------------------------------
+ logical :: coriolisOn
!***********************************************************************
@@ -116,6 +117,8 @@
err = 0
+ if(.not.coriolisOn) return
+
maxLevelEdgeTop => grid % maxLevelEdgeTop % array
nEdgesOnEdge => grid % nEdgesOnEdge % array
cellsOnEdge => grid % cellsOnEdge % array
@@ -183,6 +186,10 @@
err = 0
+ coriolisOn = .true.
+
+ if(config_disable_u_coriolis) coriolisOn = .false.
+
!--------------------------------------------------------------------
end subroutine ocn_vel_coriolis_init!}}}
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vel_forcing_windstress.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vel_forcing_windstress.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vel_forcing_windstress.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -169,6 +169,8 @@
windStressOn = .true.
+ if(config_disable_u_windstress) windStressOn = .false.
+
err = 0
!--------------------------------------------------------------------
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vel_hmix.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vel_hmix.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vel_hmix.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -48,6 +48,7 @@
!
!--------------------------------------------------------------------
+ logical :: hmixOn
type (timer_node), pointer :: del2Timer, leithTimer, del4Timer
@@ -128,6 +129,8 @@
!
!-----------------------------------------------------------------
+ if(.not.hmixOn) return
+
viscosity = 0.0
call mpas_timer_start("del2", .false., del2Timer)
@@ -178,12 +181,16 @@
integer :: err1, err2, err3
+ hmixOn = .true.
+
call ocn_vel_hmix_del2_init(err1)
call ocn_vel_hmix_leith_init(err2)
call ocn_vel_hmix_del4_init(err3)
err = ior(ior(err1, err2),err3)
+ if(config_disable_u_hmix) hmixOn = .false.
+
!--------------------------------------------------------------------
end subroutine ocn_vel_hmix_init!}}}
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vel_hmix_del2.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vel_hmix_del2.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vel_hmix_del2.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -215,7 +215,9 @@
endif
endif
+ if(.not.config_use_mom_del2) hmixDel2On = .false.
+
!--------------------------------------------------------------------
end subroutine ocn_vel_hmix_del2_init!}}}
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vel_hmix_del4.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vel_hmix_del4.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vel_hmix_del4.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -296,6 +296,8 @@
endif
+ if(.not.config_use_mom_del4) hmixDel4On = .false.
+
!--------------------------------------------------------------------
end subroutine ocn_vel_hmix_del4_init!}}}
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vel_pressure_grad.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vel_pressure_grad.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vel_pressure_grad.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -44,6 +44,7 @@
!
!--------------------------------------------------------------------
+ logical :: pgradOn
real (kind=RKIND) :: rho0Inv, grho0Inv
@@ -113,6 +114,8 @@
err = 0
+ if(.not.pgradOn) return
+
nEdgesSolve = grid % nEdgesSolve
maxLevelEdgeTop => grid % maxLevelEdgeTop % array
cellsOnEdge => grid % cellsOnEdge % array
@@ -187,7 +190,9 @@
err = 0
- if (config_pressure_type.eq.'MontgomeryPotential') then
+ pgradOn = .true.
+
+ if (config_pressure_gradient_type.eq.'MontgomeryPotential') then
rho0Inv = 1.0
grho0Inv = 0.0
else
@@ -195,8 +200,10 @@
grho0Inv = gravity/config_rho0
end if
+ if(config_disable_u_pgrad) pgradOn = .false.
+
!--------------------------------------------------------------------
end subroutine ocn_vel_pressure_grad_init!}}}
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vel_vadv.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vel_vadv.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vel_vadv.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -185,10 +185,12 @@
err = 0
velVadvOn = .false.
- if (config_vert_grid_type.ne.'isopycnal') then
+ if (config_vert_coord_movement.ne.'isopycnal') then
velVadvOn = .true.
end if
+ if(config_disable_u_vadv) velVadvOn = .false.
+
!--------------------------------------------------------------------
end subroutine ocn_vel_vadv_init!}}}
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vmix.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vmix.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vmix.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -15,6 +15,7 @@
module ocn_vmix
+ use mpas_kind_types
use mpas_grid_types
use mpas_configure
use mpas_timer
@@ -56,6 +57,7 @@
!
!--------------------------------------------------------------------
+ logical :: velVmixOn, tracerVmixOn
logical :: explicitOn, implicitOn
!***********************************************************************
@@ -125,6 +127,9 @@
err = 0
+ d % vertViscTopOfEdge % array = 0.0_RKIND
+ d % vertDiffTopOfCell % array = 0.0_RKIND
+
call ocn_vmix_coefs_const_build(grid, s, d, err1)
call ocn_vmix_coefs_tanh_build(grid, s, d, err2)
call ocn_vmix_coefs_rich_build(grid, s, d, scratch, err3)
@@ -200,6 +205,7 @@
err = 0
+ if(.not.velVmixOn) return
if(implicitOn) return
nEdgessolve = grid % nEdgesSolve
@@ -301,6 +307,7 @@
err = 0
+ if(.not.velVmixOn) return
if(explicitOn) return
nEdges = grid % nEdges
@@ -429,6 +436,7 @@
err = 0
+ if(.not.tracerVmixOn) return
if(implicitOn) return
nCellsSolve = grid % nCellsSolve
@@ -534,6 +542,7 @@
err = 0
+ if(.not.tracerVmixOn) return
if(explicitOn) return
nCells = grid % nCells
@@ -669,6 +678,9 @@
err = 0
+ velVmixOn = .true.
+ tracerVmixOn = .true.
+
explicitOn = .true.
implicitOn = .false.
@@ -677,6 +689,9 @@
implicitOn = .true.
end if
+ if(config_disable_u_vmix) velVmixOn = .false.
+ if(config_disable_tr_vmix) tracerVmixOn = .false.
+
call ocn_vmix_coefs_const_init(err1)
call ocn_vmix_coefs_tanh_init(err2)
call ocn_vmix_coefs_rich_init(err3)
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vmix_coefs_const.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vmix_coefs_const.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vmix_coefs_const.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -121,7 +121,6 @@
!-----------------------------------------------------------------
err = 0
- if((.not.constViscOn) .and. (.not.constDiffOn)) return
vertViscTopOfEdge => d % vertViscTopOfEdge % array
vertDiffTopOfCell => d % vertDiffTopOfCell % array
@@ -186,7 +185,7 @@
if(.not.constViscOn) return
!$OMP WORKSHARE
- vertViscTopOfEdge = constVisc
+ vertViscTopOfEdge = vertViscTopOfEdge + constVisc
!$OMP END WORKSHARE
!--------------------------------------------------------------------
@@ -244,7 +243,7 @@
if(.not.constDiffOn) return
!$OMP WORKSHARE
- vertDiffTopOfCell = constDiff
+ vertDiffTopOfCell = vertDiffTopOfCell + constDiff
!$OMP END WORKSHARE
!--------------------------------------------------------------------
@@ -283,18 +282,20 @@
err = 0
- constViscOn = .false.
- constDiffOn = .false.
+ constViscOn = config_use_const_visc
+ constDiffOn = config_use_const_diff
+ constVisc = config_vert_visc
+ constDiff = config_vert_diff
- if (config_vert_visc_type.eq.'const') then
- constViscOn = .true.
- constVisc = config_vert_visc
- endif
+! if (config_vert_visc_type.eq.'const') then
+! constViscOn = .true.
+! constVisc = config_vert_visc
+! endif
- if (config_vert_diff_type.eq.'const') then
- constDiffOn = .true.
- constDiff = config_vert_diff
- endif
+! if (config_vert_diff_type.eq.'const') then
+! constDiffOn = .true.
+! constDiff = config_vert_diff
+! endif
!--------------------------------------------------------------------
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vmix_coefs_rich.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vmix_coefs_rich.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vmix_coefs_rich.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -126,7 +126,6 @@
!-----------------------------------------------------------------
err = 0
- if((.not.richViscOn) .and. (.not.richDiffOn)) return
indexT = s%index_temperature
indexS = s%index_salinity
@@ -226,14 +225,13 @@
maxLevelEdgeTop => grid % maxLevelEdgeTop % array
- vertViscTopOfEdge = 0.0
!$OMP DO PRIVATE(k)
do iEdge = 1,nEdges
do k = 2,maxLevelEdgeTop(iEdge)
! mrp 110324 efficiency note: this if is inside iEdge and k loops.
! Perhaps there is a more efficient way to do this.
if (RiTopOfEdge(k,iEdge)>0.0) then
- vertViscTopOfEdge(k,iEdge) = config_bkrd_vert_visc &
+ vertViscTopOfEdge(k,iEdge) = vertViscTopOfEdge(k, iEdge) + config_bkrd_vert_visc &
+ config_rich_mix / (1.0 + 5.0*RiTopOfEdge(k,iEdge))**2
! maltrud do limiting of coefficient--should not be necessary
! also probably better logic could be found
@@ -253,8 +251,7 @@
else
! for Ri<0 and explicit vertical mix,
! use maximum diffusion allowed by CFL criterion
- vertViscTopOfEdge(k,iEdge) = &
- ((h_edge(k-1,iEdge)+h_edge(k,iEdge))/2.0)**2/config_dt/4.0
+ vertViscTopOfEdge(k,iEdge) = vertViscTopOfEdge(k,iEdge) + ((h_edge(k-1,iEdge)+h_edge(k,iEdge))/2.0)**2/config_dt/4.0
end if
end if
end do
@@ -332,7 +329,6 @@
maxLevelCell => grid % maxLevelCell % array
- vertDiffTopOfCell = 0.0
coef = -gravity/config_rho0/2.0
!$OMP DO PRIVATE(k)
do iCell = 1,nCells
@@ -340,7 +336,7 @@
! mrp 110324 efficiency note: this if is inside iCell and k loops.
! Perhaps there is a more efficient way to do this.
if (RiTopOfCell(k,iCell)>0.0) then
- vertDiffTopOfCell(k,iCell) = config_bkrd_vert_diff &
+ vertDiffTopOfCell(k,iCell) = vertDiffTopOfCell(k, iCell) + config_bkrd_vert_diff &
+ (config_bkrd_vert_visc &
+ config_rich_mix / (1.0 + 5.0*RiTopOfCell(k,iCell))**2) &
/ (1.0 + 5.0*RiTopOfCell(k,iCell))
@@ -362,8 +358,7 @@
else
! for Ri<0 and explicit vertical mix,
! use maximum diffusion allowed by CFL criterion
- vertDiffTopOfCell(k,iCell) = &
- ((h(k-1,iCell)+h(k,iCell))/2.0)**2/config_dt/4.0
+ vertDiffTopOfCell(k,iCell) = vertDiffTopOfCell(k, iCell) + ((h(k-1,iCell)+h(k,iCell))/2.0)**2/config_dt/4.0
end if
end if
end do
@@ -605,16 +600,16 @@
err = 0
- richViscOn = .false.
- richDiffOn = .false.
+ richViscOn = config_use_rich_visc
+ richDiffOn = config_use_rich_diff
- if (config_vert_visc_type.eq.'rich') then
- richViscOn = .true.
- endif
+! if (config_vert_visc_type.eq.'rich') then
+! richViscOn = .true.
+! endif
- if (config_vert_diff_type.eq.'rich') then
- richDiffOn = .true.
- endif
+! if (config_vert_diff_type.eq.'rich') then
+! richDiffOn = .true.
+! endif
!--------------------------------------------------------------------
Modified: branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vmix_coefs_tanh.F
===================================================================
--- branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vmix_coefs_tanh.F        2013-02-05 16:30:34 UTC (rev 2429)
+++ branches/ocean_projects/openmp_elements/src/core_ocean/mpas_ocn_vmix_coefs_tanh.F        2013-02-05 16:30:40 UTC (rev 2430)
@@ -115,7 +115,6 @@
!-----------------------------------------------------------------
err = 0
- if((.not.tanhViscOn) .and. (.not.tanhDiffOn)) return
vertViscTopOfEdge => d % vertViscTopOfEdge % array
vertDiffTopOfCell => d % vertDiffTopOfCell % array
@@ -189,9 +188,8 @@
! refBottomDepth is used here for simplicity. Using zMid and h, which
! vary in time, would give the exact location of the top, but it
! would only change the diffusion value very slightly.
- vertViscTopOfEdge = 0.0
do k=2,nVertLevels
- vertViscTopOfEdge(k,:) = -(config_max_visc_tanh-config_min_visc_tanh)/2.0 &
+ vertViscTopOfEdge(k,:) = vertViscTopOfEdge(k,:)-(config_max_visc_tanh-config_min_visc_tanh)/2.0 &
*tanh((refBottomDepth(k-1)+config_ZMid_tanh) &
/config_zWidth_tanh) &
+ (config_max_visc_tanh+config_min_visc_tanh)/2
@@ -262,9 +260,8 @@
! refBottomDepth is used here for simplicity. Using zMid and h, which
! vary in time, would give the exact location of the top, but it
! would only change the diffusion value very slightly.
- vertDiffTopOfCell = 0.0
do k=2,nVertLevels
- vertDiffTopOfCell(k,:) = -(config_max_diff_tanh-config_min_diff_tanh)/2.0 &
+ vertDiffTopOfCell(k,:) = vertDiffTopOfCell(k,:)-(config_max_diff_tanh-config_min_diff_tanh)/2.0 &
*tanh((refBottomDepth(k-1)+config_ZMid_tanh) &
/config_zWidth_tanh) &
+ (config_max_diff_tanh+config_min_diff_tanh)/2
@@ -305,16 +302,16 @@
err = 0
- tanhViscOn = .false.
- tanhDiffOn = .false.
+ tanhViscOn = config_use_tanh_visc
+ tanhDiffOn = config_use_tanh_diff
- if (config_vert_visc_type.eq.'tanh') then
- tanhViscOn = .true.
- endif
+! if (config_vert_visc_type.eq.'tanh') then
+! tanhViscOn = .true.
+! endif
- if (config_vert_diff_type.eq.'tanh') then
- tanhDiffOn = .true.
- endif
+! if (config_vert_diff_type.eq.'tanh') then
+! tanhDiffOn = .true.
+! endif
!--------------------------------------------------------------------
</font>
</pre>