Skip to content

Commit 56ba008

Browse files
author
Elizabeth Fischer
committed
Revert "Bug fix: make sure that underice==UI_ICEBIN wherever fhc != 0."
Having "extra" elevation classes with underice==UI_ICEBIN but no ACTUAL IceBin ice under it is a problem. Therefore: underice==UI_ICEBIN *ONLY* where there is actual IceBin/PISM ice beneat the elevation class. The original bug needs to be fixed by being smarter about ghost points; understanding that they need to be iniitalized as soon as they turn ghost, and BEFORE underice is set to UI_ICEBIN. This reverts commit 78a9416.
1 parent 78a9416 commit 56ba008

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

slib/icebin/modele/topo.cpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -690,10 +690,7 @@ blitz::Array<int16_t,3> &underice3)
690690
// UI_ICEBIN: Only make ghost points for dynamic ice ECs
691691
if (maxhc >= 0 && underice_hc[ihc] == UI_ICEBIN) {
692692
for (int ihc=std::max(0,minhc-2); ihc<=std::max(maxhc+2,nhc_icebin); ++ihc) {
693-
if (fhc3(ihc,j,i)==0) {
694-
fhc3(ihc,j,i) = 1.e-30;
695-
underice3(ihc,j,i) = underice_hc[ihc];
696-
}
693+
if (fhc3(ihc,j,i)==0) fhc3(ihc,j,i) = 1.e-30;
697694
}}
698695
}}
699696

@@ -725,7 +722,6 @@ blitz::Array<int16_t,3> &underice3)
725722
double const fhc_near = fhc3(ihc, j+ix[0], i+ix[1]);
726723
if (abs(fhc_near) > 1e-20) {
727724
fhc3(ihc,j,i) = 1.e-30;
728-
underice3(ihc,j,i) = underice_hc[ihc];
729725
nghost += 1;
730726
printf("Horizontal ghost point: %d,%d,%d\n", ihc,j,i);
731727
break;

0 commit comments

Comments
 (0)