Skip to content

Conversation

@mjs2369
Copy link
Collaborator

@mjs2369 mjs2369 commented Jan 8, 2026

This PR adds a new page to the User Guide in the pyDARTdiags documentation that introduces users to the Data Assimilation Research Testbed (DART) workflow and demonstrates how to use pyDARTdiags to enhance their DART data assimilation projects.

This page includes instructions to create an observation sequence file with DART, use pyDARTdiags to perform some basic manipulations on the observation sequence, set up and run data assimilation with DART using the Lorenz 63 model, and finally analyze the results with pyDARTdiags diagnostic plotting and observe how the changes made to the observation sequence affected the data assimilation outcome.

This fixes #117

This PR also fixes #112 by making the levels argument optional in the plot_rank_histogram function.

It adds logic to skip level binning and plot a single RH if nothing for levels is passed into the fucntion.

It also adds logic to work with identity obs as a possible value for obs_type to be passed into the plot_rank_histogram function.

…pyDARTdiags with DART, including new example to change error variance
…nstead linking to DART docs, providing direct instructions for writing Python script to half obs error variance, etc.
@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2026

Codecov Report

❌ Patch coverage is 0% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.75%. Comparing base (e84b009) to head (14b1b21).

Files with missing lines Patch % Lines
src/pydartdiags/matplots/matplots.py 0.00% 44 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #121      +/-   ##
==========================================
- Coverage   71.78%   69.75%   -2.04%     
==========================================
  Files           4        4              
  Lines         996     1025      +29     
==========================================
  Hits          715      715              
- Misses        281      310      +29     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

mjs2369 and others added 3 commits January 8, 2026 09:15
…obs that is missing from the DART docs, since this experiment's obs seq is all identity obs. Having the user write the code to plot the rank histograms. Fixing formatting.
@mjs2369
Copy link
Collaborator Author

mjs2369 commented Jan 9, 2026

Formatting issues fixed

Copy link
Member

@hkershaw-brown hkershaw-brown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Part way though this review.
Major comment is to not repeat the dart documentation and focus on how pyDARTdiags fits into DART, rather than how to build and run DART.

@hkershaw-brown
Copy link
Member

I will run the example once the fix for #112 is in.

…on; adding logic to plot a skip level binning and plot a single RH if nothing for levels is passed in
@hkershaw-brown
Copy link
Member

Hi @mjs2369 can you push the the .png files, not finding them when I build the docs.

/Users/hkershaw/DART/Projects/Diagnostics/JOSS/pull_121/pyDARTdiags/docs/userguide/dartworkflow.rst:211: WARNING: image file not readable: images/rh_l63.png [image.not_readable]
/Users/hkershaw/DART/Projects/Diagnostics/JOSS/pull_121/pyDARTdiags/docs/userguide/dartworkflow.rst:218: WARNING: image file not readable: images/rh_l63_halfev.png [image.not_readable]

Copy link
Member

@hkershaw-brown hkershaw-brown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Marlee,

I worked through the dartworkflow and a couple of commands are incorrect.
The text needs a little revision, as it talks about writing a program but the commands are interactive. Can you work through the example and make sure the commands run.

One question on type < 0

Cheers,
Helen

@mjs2369
Copy link
Collaborator Author

mjs2369 commented Jan 13, 2026

Hi Marlee,

I worked through the dartworkflow and a couple of commands are incorrect. The text needs a little revision, as it talks about writing a program but the commands are interactive. Can you work through the example and make sure the commands run.

Hi Helen, fixed the commands. Sorry about that, I had manually edited them to get them to work when running through the examples in an interactive session and forgot to commit the fixes to the guide

print(
"Observation type is for identity observations."
) # No filtering by type for identity obs
if qc0.empty:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you still need to filter on identity obs here.
Currently only checking for qc.0
If there is a mix of identity obs and regular obs you will plot all the identity obs and reg obs together.

I have a real obs test case, I'll go ahead and add this filter by type < 0

regualar obs have the type,e.g. "RAW_STATE_VARIABLE"
identity obs are a negative number
Copy link
Member

@hkershaw-brown hkershaw-brown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work on this Marlee!

@hkershaw-brown hkershaw-brown merged commit c1056bf into main Jan 14, 2026
2 checks passed
@hkershaw-brown hkershaw-brown deleted the dart_workflow branch January 14, 2026 17:32
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.

Provide DART workflow example matplots.plot_rank_histogram requires levels

4 participants