CABLE-LSM / CABLE-Trac-archive

Archive CABLE Trac contents as issues
Other
0 stars 0 forks source link

GW sign fix #316

Closed penguian closed 2 years ago

penguian commented 2 years ago

keyword_nogit owner:jxs599@nci.org.au resolution_fixed type_defect | by mgk576


Hi,

We implemented this fix previously but it wasn't correctly translated. In cable_gw_hydro.f90

The code should be:

REAL(r_2), DIMENSION(mp,ms) :: minus_ones
minus_ones = -1

! mgk, 24/07/2018 - fix to compile
unsat_smp(i) = SIGN(soil%sucs_vec(i,1),minus_ones(i,1)) * MIN(1.0, &
               (MAX(0.001, (unsat_wb(i)-soil%watr(i,1))/(soil%ssat_vec(i,1)-&
               soil%watr(i,1)) ) )** (-soil%bch_vec(i,1)) )

This replaces the previous version which used an array "ones" but missed the *-1 conversion.

No doubt there is a better technical way to do this, but this is at least correct scientifically.


Issue migrated from trac:316 at 2023-11-27 11:39:48 +1100

penguian commented 2 years ago

@jxs599@nci.org.au changed status from new to closed

penguian commented 2 years ago

@jxs599@nci.org.au set resolution to fixed

penguian commented 2 years ago

@jxs599@nci.org.au set milestone to 1. Closed

penguian commented 2 years ago

@jxs599@nci.org.au commented


pushed to trunk @ -dbffdd67e7be74e76baf7fceceb845262458389c

penguian commented 1 year ago

@ccc561@nci.org.au set keywords to nogit