Skip to content

Glad's is_in_active_grid is slightly inconsistent with logic elsewhere in CISM #41

@billsacks

Description

@billsacks

This is a spin-off from #39 . I noticed that the conditional that determines the icemask in is_in_active_grid checks usrf > 0. But apparently some code elsewhere in CISM treats points with topg exactly equal to 0 as land. So, for consistency, is_in_active_grid should also consider these points with topg exactly equal to 0 to be land, and thus within the ice mask.

As discussed in #39 , this inconsistency is a problem for conservation, so it should definitely be fixed. However, it only impacts a small number of grid cells. As also discussed in #39 , changing this conditional to usrf >= 0 doesn't work, because ocean grid cells have usrf == 0, so that change led all points in the CISM domain to be considered to be within the ice mask. @whlipscomb suggested a possible change like usrf > 0 .or. topg >= 0, but we want to check to make sure that really is the correct conditional, consistent with what is used elsewhere. Ideally, we would use an existing mask variable that is consistent with what is used elsewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions