Skip to content

Commit

Permalink
Avoid rotating arrays that are not associated
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavo-marques authored and alperaltuntas committed Apr 21, 2022
1 parent f814147 commit fc3ab45
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/core/MOM_forcing_type.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3384,14 +3384,17 @@ subroutine rotate_forcing(fluxes_in, fluxes, turns)

if (do_heat .and. do_water) then
call rotate_array(fluxes_in%heat_content_cond, turns, fluxes%heat_content_cond)
call rotate_array(fluxes_in%heat_content_evap, turns, fluxes%heat_content_evap)
call rotate_array(fluxes_in%heat_content_lprec, turns, fluxes%heat_content_lprec)
call rotate_array(fluxes_in%heat_content_fprec, turns, fluxes%heat_content_fprec)
call rotate_array(fluxes_in%heat_content_vprec, turns, fluxes%heat_content_vprec)
call rotate_array(fluxes_in%heat_content_lrunoff, turns, fluxes%heat_content_lrunoff)
call rotate_array(fluxes_in%heat_content_frunoff, turns, fluxes%heat_content_frunoff)
call rotate_array(fluxes_in%heat_content_massout, turns, fluxes%heat_content_massout)
call rotate_array(fluxes_in%heat_content_massin, turns, fluxes%heat_content_massin)
if (associated (fluxes_in%heat_content_evap)) then
call rotate_array(fluxes_in%heat_content_evap, turns, fluxes%heat_content_evap)
else
call rotate_array(fluxes_in%heat_content_massout, turns, fluxes%heat_content_massout)
call rotate_array(fluxes_in%heat_content_massin, turns, fluxes%heat_content_massin)
endif
endif

if (do_press) then
Expand Down

0 comments on commit fc3ab45

Please sign in to comment.