Skip to content

Commit

Permalink
minor changes to Fei's commit (to avoid segfault)
Browse files Browse the repository at this point in the history
  • Loading branch information
josephzhang8 committed Jul 8, 2020
1 parent 681377d commit adde1aa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sample_inputs/param.nml
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@
!-----------------------------------------------------------------------
ihconsv = 0 !heat exchange option
isconsv = 0 !evaporation/precipitation model
! Min depth for applying heat/salt exchange (i.e. off if the local water depth h<hmin_airsea_ex)
! Min total water depth for applying heat/salt exchange (i.e. off if the local water depth <hmin_airsea_ex)
hmin_airsea_ex = 0.2 ![m]

!-----------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/Hydro/schism_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ subroutine schism_init(iorder,indir,iths,ntime)
iadjust_mass_consv0=0 !Enforce mass conservation for a tracer
ipre2=0
ielm_transport=0; max_subcyc=10
hmin_airsea_ex=-2.d0
hmin_airsea_ex=0.2d0

!Output elev, hvel by detault
iof_hydro(1)=1; iof_hydro(25)=1
Expand Down
6 changes: 4 additions & 2 deletions src/Hydro/schism_step.F90
Original file line number Diff line number Diff line change
Expand Up @@ -6151,7 +6151,8 @@ subroutine schism_step(it)
if(isconsv/=0) then
!$OMP do
do i=1,nea
if( idry_e(i)==1 .or. (ze(nvrt,i)-ze(kbe(i),i))<hmin_airsea_ex ) cycle
if(idry_e(i)==1) cycle
if(ze(nvrt,i)-ze(kbe(i),i)<hmin_airsea_ex) cycle

if(impose_net_flux/=0) then !imposed net
precip=sum(fluxprc(elnode(1:i34(i),i)))/real(i34(i),rkind) !P-E
Expand All @@ -6169,7 +6170,8 @@ subroutine schism_step(it)
if(ihconsv/=0) then
!$OMP do
do i=1,nea
if( idry_e(i)==1 .or. (ze(nvrt,i)-ze(kbe(i),i))<hmin_airsea_ex ) cycle
if(idry_e(i)==1) cycle
if(ze(nvrt,i)-ze(kbe(i),i)<hmin_airsea_ex) cycle

! Wet element (not shallow)
! Surface flux
Expand Down

0 comments on commit adde1aa

Please sign in to comment.