Skip to content

Richards growth curve (and compiler warnings) #775

Closed

Description

@jimianelli

This issue is redundant with issue #778.

Note from full [tpl created yesterday (July 21, 2026) ] I made edits to:

  1. lose all of the compiler warnings; and
  2. prevent the Richards growth curve option from giving nan's (See Steve Barbeaux's comment from the other day). The final full ss3.tpl file is here which should compile and run.

Apologies but I don't know how to best push to the code.

Activity

  1. Rick-Methot-NOAA commented on Jul 22, 2026

    @Rick-Methot-NOAA
    Collaborator

    Thhanks for helping to look into this. I'll run a compare to find your change and then continue my investigation, which narrowed the problem down to the growth in the first age beyond the Amin.

  2. iantaylor-NOAA commented on Jul 22, 2026

    @iantaylor-NOAA
    Contributor

    Hi @jimianelli,
    The first link says I need more permissions but I compiled the current main branch which I think is good enough and used that to compare to your modified code in the second link.
    I'm seeing 3 types of changes:

    1. Replacing sprintf():
    Image
    1. Adding brackets:
    Image
    1. Changes related to growth issue (all changes between lines 17611 and 18461, with the first two shown below)Image
    Image

    If Rick can incorporate your changes to growth or implement some different fix for that issue, then I can work on mapping the first two types of changes over as part of a separate pull request, which I think will make code review easier rather than having lots of independent changes to all the TPL files.

  3. jimianelli commented on Jul 22, 2026

    @jimianelli
    CollaboratorAuthor

    wow cool that you got there and sorry, I changed permissions just now. great idea to place in separate PRs because one is lower priority than the other (for Steve anyway). Thanks for looking into this so quickly! sorry I didn't follow better channels

  4. Rick-Methot-NOAA commented on Jul 22, 2026

    @Rick-Methot-NOAA
    Collaborator

    I was already making a change to fix the growth issue. Agree with Ian that all else should be addressed separately.

    Jim's code basically reverts to what was there before:
    case 2: // Richards
    {
    Ave_Size(styr, 1, g)(0, first_grow_age(g)) = Lmin(gp);
    VBK_temp2 = VBK_temp * VBK_seas(0);
    for (a = first_grow_age(g); a <= nages; a++)
    {
    temp = LinfR + (LminR - LinfR) * mfexp(VBK_temp2 * (real_age(g, 1, a) - AFIX));
    Ave_Size(styr, 1, g, a) = pow(temp, inv_Richards);
    } // done ageloop
    break;

    Jim - what compilier is giving you those additional warnings?

  5. Rick-Methot-NOAA commented on Jul 22, 2026

    @Rick-Methot-NOAA
    Collaborator

    I confirm that the problem is fixed. I think Jim and I independently found the problem at about the same time (unless Jim found it yesterday and waited to tell us). Thanks again Jim for all the other code suggestions.

  6. added theissue type on Jul 23, 2026
  7. added
    in progressThis is being worked on in a branch
    quickfew hours work
    change loguse for issues that should appear in change log
    and removed
    quickfew hours work
    on Jul 23, 2026
  8. added this to the 3.30.25.1 milestone on Jul 23, 2026
  9. jimianelli commented on Jul 23, 2026

    @jimianelli
    CollaboratorAuthor

    I was already making a change to fix the growth issue. Agree with Ian that all else should be addressed separately.

    Jim's code basically reverts to what was there before: case 2: // Richards { Ave_Size(styr, 1, g)(0, first_grow_age(g)) = Lmin(gp); VBK_temp2 = VBK_temp * VBK_seas(0); for (a = first_grow_age(g); a <= nages; a++) { temp = LinfR + (LminR - LinfR) * mfexp(VBK_temp2 * (real_age(g, 1, a) - AFIX)); Ave_Size(styr, 1, g, a) = pow(temp, inv_Richards); } // done ageloop break;

    Jim - what compilier is giving you those additional warnings?

    gcc, Apple clang version 21.00 (clang-2100.1.1.101)

    but they've been around for a while so I don't think it's a compiler version issue so much. also mostly quite minor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

change loguse for issues that should appear in change loggrowth

Type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions