Further formatting fixes to the PC2 and boundary-layer scheme docs ported from the UMDPs. - #523
Further formatting fixes to the PC2 and boundary-layer scheme docs ported from the UMDPs.#523MichaelWhitall wants to merge 118 commits into
Conversation
…CloudScheme.tex to convert the latex source to .rst format.
… extension! Updated syntax to use this for the first few equations.
…hon script written by copilot.
…eferecing, and re-applied the corrections using an automatic script (most things stay the same, but my tweaks to reduce line-lengths have been reveretd).
…s possible to label and reference the individual equations in sphynx.
…'t converted to .rst correctly) with correctly-formatted display-mode equations.
…erical application', (b) Corrected a stray wrong indent, (c) Remove colon from appendix section titles (messes-up when used in the label).
…pply automated changes from scratch. Needed to apply corrections to section references in tables.
…and get the literature citations to work...
…tomating the corrections to figures and figure cross-referencing (then re-applied the manual fixes from 8 April 2026 using git apply).
Adrian Lock (Adrian-Lock)
left a comment
There was a problem hiding this comment.
Further improvements to some of the formatting . Well spotted and thinks Mike
|
The links to equations tends to fall just below the equation in the page, meaning I need to scroll up to see the equations. A minor point, and I suspect it's a "feature" rather than a bug. |
|
There is a section missing 3.3.1 Numerical Application, plus a few lines previous, and Eqn 45 (would become LFRic_Apps docs Eqn 44) and the final sentence in LFRic_Apps docs doesn't seem to appear in UMDocs section 3.3? |
|
more equations not numbered: after LFRic_Apps #86, UM_Docs 91, 92, 93, (all 3 are factors/constants) 94 (refers to nothing?), 95 LFRic_Apps 102-107, 108-111, (after UM_docs 92) LFRic_Apps 177, 184, 186, 189, 192, 193, 212, 214, 215, 217-220, 221-224, 226-227, 231, 234-235, 237-239, just wondering if this is indicative of a bug somewhere? |
|
4.3 PC2 Erosion - differences, |
Thanks lots for spotting this Paul! I just checked and that section is actually missing on the trunk in the github copy of the The missing section was introduced by my trac ticket: I could just fix this myself, but should probably first check whether any other changes to the UMDPs between vn13.9 and vn14.0 got left out by mistake! |
Thanks for testing the equation links! I'm currently finding that if I click an eqn link when viewing the doc in Firefox, the browser lines up with the equation nicely at the top of the window. Whereas currently if I view the same doc using Edge, the equations aren't displaying correctly at all :( Which browser are you using? |
The equations which are numbered in the UMDP latex doc but unnumbered in the lfric_apps ReST doc are ones which were not labeled in the UMDP (and therefore not cross-referenced anywhere). There are various latex math environments which number equations by default, even if you do not label or cross-reference them. But I think in ReST it only generates an equation number if you label the equation. So if we want to keep all the eqn numbers the same as they were in the latex doc, we'll have to add new labels to the currently unlabeled equations in the ReST source. I don't think its worth doing this universally, but shout if there are any particular equations you reckon should be labeled and numbered :) That's a good spot that in the latex UMDP 030 eq 94 labels a blank line! Looking at the latex source (https://github.com/MetOffice/um_doc/blob/main/source/030/UMDP30_PC2CloudScheme.tex, L1795), this is in an |
This was in Chrome, with the window about 40% of the screen size, and so I think it's just a consequence of that (or possibly zoom level), I can't replicate now. So working in Firefox and Chrome seems fine to me. I didn't test every link, but hopefully if someone spots a broken link later they can report it |
I agree - it isn't worth keeping exact correspondence to the latex eqn numbers. I think it makes sense that if they are referred to in text then they need a reference, otherwise it's just there to show working. I didn't really go through to see if I thought others needed a number. We can pick this up in a future PR, once the additional new features are documented. |
That makes sense, I couldn't work out why it felt like it was the first time I was seeing this in the LFRic_Apps docs! Good plan, worth checking for other changes first. |
I've posted a question about the UMDP content missing from the port to github here: |
|
Re the missing section of the PC2 doc (when comparing the UMDP on github versus the UMDP on trac), Yash helped me get to the bottom of this here: Section 3.3.1 was actually deleted by my trac ticket 4703, which replaced it with new sections further down the doc. The key thing is, the docs hosted on trac at i.e. the trunk of the |
|
Following some feedback offline from Yaswant Pradhan (@yaswant), I've added the latest commit which fixes the UM code-structure diagram in the PC2 cloud-scheme doc (just formatting corrections; changing the content to reflect LFRic rather than UM is tbd in another PR). In particular, the original latex version of this colour-coded the subroutine names according to whether they're used by the Smith, PC2 or bimodal cloud-schemes, but the text colours hadn't ported into ReST. Text colour has now been re-implemented. |
|
Your CLA signature was found on the base branch, but you appear to have modified the CONTRIBUTORS.md file in this PR. Please do not edit the CONTRIBUTORS.md file. If you have already signed the CLA, revert changes to the file and your signature will be picked up. |
PR Summary
Sci/Tech Reviewer: Paul Barrett (@paul-barrett)
Code Reviewer: Yaswant Pradhan (@yaswant)
#450 and #465 made an initial port of the UM Documentation Papers describing the PC2 cloud-scheme and the Boundary-Layer scheme into the lfric_apps science guide. This involved fixing many formatting errors when converting the source from latex to Sphinx / ReStructureText. Subsequent to those PRs being lodged, further formatting problems have been found. This PR attempts to fix these problems:
**) or bold (****); to get these equations to display I needed to close the enclosing**or*before the math, then open it again afterwards. Where math was inside a bold (****) region, I've used latex \boldsymbol to make it render bold as intended.\\"u(for a u with double-dots above) fooled my script as the"was interpreted as the end of the field string, so author names containing this character were spuriously truncated.Copy of the built docs: science_guide/index.html#science-guide-index
closes #405
closes #451
Code Quality Checklist
****Only documentation is edited; the doc source should speak for itself without needing explanatory comments, but feel free to suggest if you'd like any clarifying comments in the source?**check_cr_approved won't pass until code review is approved.Testing
*****Only modified documentation; rose-stem not applicable.To test the changes, I have built the lfric_apps docs from the branch source. The build now gives no errors or warnings.
trac.log
Security Considerations
**I'm not aware of any security issues with the docs. Does anyone know if there are license implications though? The latex UMDPs that I'm porting from are private, whereas the lfric_apps docs that I'm porting to are open-access?Performance Impact
NA
AI Assistance and Attribution
I got M365 copilot to help update the python scripts which I'm using to automate the format corrections applied to the doc ReST source after running pandoc (and the scripts were largely written by copilot in the first place).
Documentation
This is a documentation-only PR
PSyclone Approval
NA
Sci/Tech Review
(Please alert the code reviewer via a tag when you have approved the SR)
Code Review