ESCOMP / CISM

Community Ice Sheet Model
GNU Lesser General Public License v3.0
6 stars 11 forks source link

Make usrf condition in is_in_active_grid consistent with other checks #40

Closed billsacks closed 2 years ago

billsacks commented 2 years ago

As per suggestions from Bill Lipscomb in https://github.com/ESCOMP/CISM/issues/39, I am treating usrf == 0 as land rather than ocean. This makes the conditional here consistent with similar checks elsewhere in CISM.

billsacks commented 2 years ago

I'm going ahead and merging this since it just does what we discussed in #39, and merging it will let me run testing in the context of CISM-wrapper. @whlipscomb feel free to comment after the fact if you want.

billsacks commented 2 years ago

I meant to mention: I checked the standard 4-km Greenland input file, and it has 70 grid cells with topg exactly equal to 0, and 50 grid cells with (topg + thk) (i.e., usrf) exactly equal to 0. So I expect small answer changes from this change. (I had been hoping that we could avoid answer changes in a Greenland case, but I don't feel that it's a big deal that it will change answers: I'll just want to look more closely at the differences to make sure there aren't any significant unforeseen consequences of this change.)

whlipscomb commented 2 years ago

@billsacks – I agree that small answer changes for Greenland aren't a big deal. I would hope that most or all of the points with topg = usrf = 0.0 are in the interior, surrounded by cells with usrf > 0. In that case, labeling them as land will reduce the chance of having weird logic errors. But if there are such points out in the ocean, we might have to give them a closer look.

billsacks commented 2 years ago

Yes, they are either in the interior or on the coast: I don't see any that are out in the ocean.

Here is a map with a range and color scale that makes these points with topg == 0 stand out: see the green pixels in this map:

image

whlipscomb commented 2 years ago

@billsacks – Thanks for the image. I think that reclassifying these points as land would be a good thing, or at least not a bad thing.

billsacks commented 2 years ago

As discussed in #39 and #41 this didn't work right. I have reverted it (#42 ) and we'll revisit #41 later.