Skip to content

Commit

Permalink
Merge pull request #141 from alperaltuntas/fix_gnu_bugs
Browse files Browse the repository at this point in the history
Fix bugs caught by GNU compiler
  • Loading branch information
gustavo-marques authored Feb 12, 2020
2 parents ab54b96 + ba5a442 commit 83da090
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion config_src/mct_driver/ocn_comp_mct.F90
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module ocn_comp_mct
use MOM_time_manager, only: time_type, set_date, set_time, set_calendar_type, NOLEAP
use MOM_time_manager, only: operator(+), operator(-), operator(*), operator(/)
use MOM_time_manager, only: operator(==), operator(/=), operator(>), get_time
use MOM_file_parser, only: get_param, log_version, param_file_type
use MOM_file_parser, only: get_param, log_version, param_file_type, close_param_file
use MOM_get_input, only: Get_MOM_Input, directories
use MOM_EOS, only: gsw_sp_from_sr, gsw_pt_from_ct
use MOM_constants, only: CELSIUS_KELVIN_OFFSET
Expand Down Expand Up @@ -281,6 +281,9 @@ subroutine ocn_init_mct( EClock, cdata_o, x2o_o, o2x_o, NLFilename )
glb%c1 = 0.0; glb%c2 = 0.0; glb%c3 = 0.0; glb%c4 = 0.0
endif

! Close param file before it gets opened by ocean_model_init again.
call close_param_file(param_file)

! Initialize the MOM6 model
runtype = get_runtype()
if (runtype == "initial") then
Expand Down
7 changes: 5 additions & 2 deletions src/parameterizations/vertical/MOM_CVMix_ddiff.F90
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,11 @@ logical function CVMix_ddiff_init(Time, G, GV, US, param_file, diag, CS)

CS%id_R_rho = register_diag_field('ocean_model','R_rho',diag%axesTi,Time, &
'Double-diffusion density ratio', 'nondim')
if (CS%id_R_rho > 0) &
allocate(CS%R_rho( SZI_(G), SZJ_(G), SZK_(G)+1)); CS%R_rho(:,:,:) = 0.0

if (CS%id_R_rho > 0) then
allocate(CS%R_rho( SZI_(G), SZJ_(G), SZK_(G)+1))
CS%R_rho(:,:,:) = 0.0
endif

call cvmix_init_ddiff(strat_param_max=CS%strat_param_max, &
kappa_ddiff_s=CS%kappa_ddiff_s, &
Expand Down

0 comments on commit 83da090

Please sign in to comment.