Skip to content

Compute non-parametric vertical coordinates #158

Merged
davidhassell merged 63 commits intoNCAS-CMS:masterfrom
davidhassell:formula_terms
Dec 10, 2020
Merged

Compute non-parametric vertical coordinates #158
davidhassell merged 63 commits intoNCAS-CMS:masterfrom
davidhassell:formula_terms

Conversation

@davidhassell
Copy link
Copy Markdown
Collaborator

Fixes #142

The method is (roughly)

  • For each coordinate reference construct, Field.compute_vertical_coordinates calls function formula

  • The formula function calls the appropriate coordinate-calculator function (e.g. atmosphere_hybrid_height_coordinate) and returns either

    • None if the vertical coordinates can not be calculated from the coordinate reference construct

    or

    • The computed vertical coordinates
  • If coordinates were computed then they are inserted into the field construct

@davidhassell
Copy link
Copy Markdown
Collaborator Author

Note NCAS-CMS/cfdm#109

Copy link
Copy Markdown
Member

@sadielbartholomew sadielbartholomew left a comment

Choose a reason for hiding this comment

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

I have a small number of further minor comments (some of which should really be addressed pre-merge though will be very quick to fix), but overall this looks great: well tested and well-designed in terms of static methods to provide the code reuse for the logic required for the class methods corresponding to the various standard names with formulas (atmosphere_ln_pressure_coordinate, atmosphere_sigma_coordinate etc.). 🔥

@davidhassell
Copy link
Copy Markdown
Collaborator Author

Hi Sadie, Thanks as ever for the careful review.

I've accepted all of your suggestions - hopefully implementing them correctly! Are we good to go?

@sadielbartholomew
Copy link
Copy Markdown
Member

Thanks David. Yes this is definitely good to go! Please merge away.

@davidhassell
Copy link
Copy Markdown
Collaborator Author

Great!

@davidhassell davidhassell merged commit 2a16873 into NCAS-CMS:master Dec 10, 2020
@davidhassell davidhassell added this to the 3.8.0 milestone Dec 17, 2020
@davidhassell davidhassell deleted the formula_terms branch February 24, 2023 11:10
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.

Create a method to calculate dimensional coordinate values from the parametric vertical coordinate values

2 participants