Skip to content

Commit 7730f1c

Browse files
authored
Merge pull request #248 from FESOM/press_air_bug_fix
bug fix in update_atm_forcing. press_air array was accessed even if n…
2 parents 0819c49 + 744f59f commit 7730f1c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/gen_forcing_couple.F90

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,9 @@ subroutine update_atm_forcing(istep, mesh)
260260
Tair = atmdata(i_tair ,:)-273.15_WP
261261
prec_rain = atmdata(i_prec ,:)/1000._WP
262262
prec_snow = atmdata(i_snow ,:)/1000._WP
263-
press_air = atmdata(i_mslp ,:) ! unit should be Pa
263+
if (l_mslp) then
264+
press_air = atmdata(i_mslp ,:) ! unit should be Pa
265+
end if
264266

265267

266268
if (use_cavity) then
@@ -273,7 +275,9 @@ subroutine update_atm_forcing(istep, mesh)
273275
Tair(i) = 0.0_WP
274276
prec_rain(i)= 0.0_WP
275277
prec_snow(i)= 0.0_WP
276-
press_air(i)= 0.0_WP
278+
if (l_mslp) then
279+
press_air(i)= 0.0_WP
280+
end if
277281
runoff(i) = 0.0_WP
278282
end if
279283
end do

0 commit comments

Comments
 (0)