Skip to content

Fix or remove internal error check in decompInitMod.F90 for nclumps #3905

@ekluzek

Description

@ekluzek

There's an error check in decompInitMod.F90 where the write and the endrun call contradict each other. This should be fixed or removed.

The case for removing it, is that nclumps is currently a positive integer multiplied by npes, so it can never happen normally.

However, if the code were to change or parts of the code moved around you might want it to happen to save debugging time. So fixing it and adding a unit test for it, might be the best thing to do.

The error message is now in

decompInit_lnd_check_errors

as follows...

            if (nclumps < npes) then
               ier = 1
               write(iulog,*) 'Number of gridcell clumps= ',nclumps, &
                     ' is less than the number of processes = ', npes
               call endrun(msg="Number of clumps exceeds number of processes", &
                           file=sourcefile, line=__LINE__)
               return
            end if

and the endrun message contradicts the message in the write. So it should be fixed or removed.

Originally posted by @ekluzek in #3517 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bfbbit-for-bitcode healthimproving internal code structure to make easier to maintain (sustainability)enhancementnew capability or improved behavior of existing capabilitypriority: lowBackground task that doesn't need to be done right away.size: smallusabilityImprove or clarify user-facing options

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions