Skip to content

Commit

Permalink
if not allocated, do not assign R_rho
Browse files Browse the repository at this point in the history
  • Loading branch information
alperaltuntas committed Feb 12, 2020
1 parent 435a741 commit ba5a442
Showing 1 changed file with 5 additions and 2 deletions.
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 ba5a442

Please sign in to comment.