Skip to content

Commit 6e346b1

Browse files
committed
Make sure land fluxes are zero when no land model
'Fall_' fluxes that are not merged have to be set to 0 in MOAB when there's no land model. Otherwise they will keep the default value. Found while testing the aquaplanet case and dust fluxes were -1e+10
1 parent 17d4f6e commit 6e346b1

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

driver-moab/main/prep_atm_mod.F90

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ subroutine prep_atm_mrg_moab(infodata, xao_ax)
10771077
integer nvert(3), nvise(3), nbl(3), nsurf(3), nvisBC(3) ! for moab info
10781078
character(CXX) ::tagname, mct_field
10791079
integer :: ent_type, ierr, arrsize
1080-
logical :: single_column
1080+
logical :: single_column,lnd_present
10811081
#ifdef MOABDEBUG
10821082
character*32 :: outfile, wopts, lnum
10831083
#endif
@@ -1092,7 +1092,7 @@ subroutine prep_atm_mrg_moab(infodata, xao_ax)
10921092
!-----------------------------------------------------------------------
10931093
!
10941094
call seq_comm_getdata(CPLID, iamroot=iamroot)
1095-
call seq_infodata_getdata(infodata,single_column=single_column)
1095+
call seq_infodata_getdata(infodata,single_column=single_column,lnd_present=lnd_present)
10961096

10971097
if (first_time) then
10981098

@@ -1531,6 +1531,13 @@ subroutine prep_atm_mrg_moab(infodata, xao_ax)
15311531
end if
15321532
end if
15331533
endif
1534+
! if no land, make sure any 'Fall' fluxes that are not merged are 0.
1535+
! e.g. dust fluxes
1536+
if(.not.lnd_present) then
1537+
if((lindx(ka)>0) .and. .not.lstate(ka) .and. .not.lmerge(ka)) then
1538+
x2a_am(n,ka) = 0.0_r8
1539+
endif
1540+
endif
15341541
if (iindx(ka) > 0 .and. fraci > 0._r8) then
15351542
if (imerge(ka)) then
15361543
x2a_am(n, ka) = x2a_am(n, ka) + i2x_am(n, iindx(ka)) * fraci

0 commit comments

Comments
 (0)