Skip to content

[Outdated] Add CRA metrics. Keeping until CRA fully resolved.#940

Draft
tennlee wants to merge 2 commits into
developfrom
cra_staging
Draft

[Outdated] Add CRA metrics. Keeping until CRA fully resolved.#940
tennlee wants to merge 2 commits into
developfrom
cra_staging

Conversation

@tennlee

@tennlee tennlee commented Nov 29, 2025

Copy link
Copy Markdown
Collaborator

We have merged Esteban's work into a staging directory on the main repo so that some additional documentation work and refactoring can occur prior to the merge to develop.

esteban-abellan and others added 2 commits November 29, 2025 13:41
* Add CRA metrics
* add brute force search, valid fraction mask
* add max distance arg
* add cra_2d with reduce_dims arg
* specify obs or fcst in largest_blob_label
* replace calc_shifted_forecast with translate_forecast_region
* adjust cra to reduce_dims
Signed-off-by: Stephanie Chong <168800785+Steph-Chong@users.noreply.github.com>
@Steph-Chong Steph-Chong mentioned this pull request Nov 29, 2025
16 tasks
@tennlee tennlee changed the title [DRAFT] Add CRA metrics (#902) [DRAFT] Add CRA metrics Nov 29, 2025
@Steph-Chong

Steph-Chong commented Nov 29, 2025

Copy link
Copy Markdown
Collaborator

@esteban-abellan I have updated included.md. You can see how it is currently rendering here: https://scores.readthedocs.io/en/228-documentation-testing-branch/included.html#spatial

Could you please confirm:

  1. Are you happy with the CRA entries? Are there any changes you wish to make?

  2. Which reference(s), if any, did you want listed in the table for each of “CRA”, “CRA - 2D” and “CRA - Core 2D”?
    
- In the docstring for cra you list Ebert and McBride (2000)
    
- In the docstring for cra_2d you list Ebert and McBride (2000)
    

- In the docstring for cra_core_2d you do not list any references.
    


- In the tutorial, you list Ebert and McBride (2000) and Ebert and Gallus (2009)
    


- In PR Add CRA metrics #902, for included.md, you listed Ebert and McBride (2000); Ebert and Gallus (2009)
    



- As such, I wasn’t sure which reference(s), if any, to include in the table
 for each of "CRA", "CRA - 2D" and "CRA - Core 2D"

Please feel free to either make any changes yourself, or let me know what you would like changed and I can sort it out - whatever suits :-).

(Note: please disregard any broken tutorial links. I don't know why that is currently happening on included.html as rendered on branch 228. I think that's something @tennlee will need to investigate).

@esteban-abellan

Copy link
Copy Markdown
Collaborator

Thanks @Steph-Chong !

The two references should be listed for all three CRA functions - sorry for the confusion.

I've added this to the docstring in my next commit and fixed a few formatting issues in the cra_2d function. This should address the following:

  • Definitions of MSE_displacement, MSE_volume and MSE_pattern are now listed and rendered correctly
  • The Returns section now shows a proper list of variables (instead of a sublist under mse_total)

@esteban-abellan

Copy link
Copy Markdown
Collaborator

I don't think I have permission to commit directly to the upstream branch, but you should be able to see my commit on my fork: d6c22b8

@Steph-Chong

Copy link
Copy Markdown
Collaborator

I don't think I have permission to commit directly to the upstream branch, but you should be able to see my commit on my fork: d6c22b8

What I did was open a new pull request (#941) with my changes, but I changed the base branch from the default develop to cra_staging. Then @tennlee was able to merge it into the nci:cra_staging branch. (I hope my explanation makes sense)

@esteban-abellan

Copy link
Copy Markdown
Collaborator

Ok, I'm not entirely sure if I did this the right way, but I committed the docstring fix to my add_cra branch, you can find it here. I'm still not sure if this will resolve the docstring issue, so I'd like to see how it renders. Could you check if this approach works?

@tennlee

tennlee commented Dec 3, 2025

Copy link
Copy Markdown
Collaborator Author

Hi Esteban. What you did in git to cra_staging branch was great, that's the right approach. However, the docstring rendering doesn't like the formatting you used in your docstring. The docs rendering is super brittle to minor formatting things, so don't feel bad. I'll pull down your change later, tidy up the formatting, and push it up into the main staging branch. Once that's done you'll need to reset your branch accordingly.

@nikeethr nikeethr marked this pull request as draft January 6, 2026 00:19
@tennlee tennlee changed the title [DRAFT] Add CRA metrics [Outdated] Add CRA metrics. Keeping until CRA fully resolved. Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants