Skip to content

Ocean sigma over z NetCDF loading. - #1105

Merged
esc24 merged 2 commits into
SciTools:masterfrom
bjlittle:refactor_ocean_sigma_over_z
Apr 25, 2014
Merged

esc24 merged 2 commits into
SciTools:masterfrom
bjlittle:refactor_ocean_sigma_over_z

Conversation

@bjlittle

Copy link
Copy Markdown
Member

This PR extends the CF dimensionless vertical coordinates coverage of Iris by supporting the ocean sigma over z coordinate auxiliary factory.

At present only NetCDF loading has been included in this PR, which is a re-factor of #509.

@bjlittle

Copy link
Copy Markdown
Member Author

@rsignell-usgs I hope you've not been holding your breath for this ... 😜

If you get the opportunity, I'd greatly appreciate if you could kick the tyres (once again) to see if the derived coordinate is behaving as expected using some of your datasets. Thanks!

Comment thread lib/iris/aux_factory.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A minor thing, but you could use is_unknown() here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I agree, that's better, thanks.

Comment thread lib/iris/aux_factory.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In my opinion, this change should not take place here. The method is called _check_dependencies(), which suggests it just checks for compatibility. This looks like a side effect to me.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yup, being graceful I thought I could squeeze it in, as it is dependency related. It is the only exception and I want consistency as _check_dependencies is called from both the __init__ and update methods.

@bjlittle

Copy link
Copy Markdown
Member Author

Raised #1106 in support of this PR, to ensure that NetCDF quantities with missing units default to being dimensionless, as per the stipulated CF convention, see http://cf-convention.github.io/1.6.html#units

@rsignell-usgs

Copy link
Copy Markdown

So I should go ahead and test this PR?

@bjlittle

Copy link
Copy Markdown
Member Author

Yes please, thanks @rsignell-usgs.

If you need to blend in #1106 you can as there's a check in the code to raise an exception if sigma is not explicitly dimensionless.

@bjlittle

Copy link
Copy Markdown
Member Author

I tried to re-use the notebook http://nbviewer.ipython.org/urls/raw.github.com/rsignell-usgs/ipython-notebooks/master/ncom_coords.ipynb from #509 ... but it's since been deleted. Understandable really, it was 8 months ago 😉

@rsignell-usgs

Copy link
Copy Markdown

I'm just back from travel, so probably won't be able to test today, but that notebook for testing is now here:
http://nbviewer.ipython.org/github/rsignell-usgs/notebook/blob/master/ncom_coords.ipynb

@bjlittle

Copy link
Copy Markdown
Member Author

No problem, thanks for posting the notebook again, that's really helpful.

@bjlittle

Copy link
Copy Markdown
Member Author

ocean_sigma_z

Seems to do the job @rsignell-usgs !

Over to you @esc24 ... let's get this in before we get distracted again.

esc24 added a commit that referenced this pull request Apr 25, 2014
@esc24
esc24 merged commit 08fd260 into SciTools:master Apr 25, 2014
@esc24

esc24 commented Apr 25, 2014

Copy link
Copy Markdown
Member

Thanks @bjlittle.

@bjlittle

Copy link
Copy Markdown
Member Author

Awesome! Nice one @esc24 and thanks @rsignell-usgs

@rsignell-usgs

Copy link
Copy Markdown

Awesome! Are you guys proceeding on to handle other dimensionless vertical coordinates, or was this the specific one you needed for now?

@bjlittle

Copy link
Copy Markdown
Member Author

I don't know if @esc24 has plans to schedule further development effort in this area in the short-term, but I'm assuming that you'd like to see support for the following dimensionless vertical coordinates in the following order:

  1. ocean_s_coordinate_g1 (used by most ROMS models > 2010)
  2. ocean_s_coordinate (used by ROMS models < 2010)
  3. ocean_s_coordinate_g2 ( used by some ROMS models > 2010)
  4. ocean_sigma_coordinate (used by POM and ECOM models)

Is that right @rsignell-usgs ?

@rsignell-usgs

Copy link
Copy Markdown

Yes, that is exactly right! If those additional 4 coordinate systems were handled, we would be able to handle about 90% of the model results in the US Integrated Ocean Observing System, which would be awesome.

@bjlittle

Copy link
Copy Markdown
Member Author

@rsignell-usgs do you have example OPeNDAP datasets for ocean_s_coordinate_g1 ? I'm not making any promises here ... just teeing up everything I (we) might need next, sometime 😉

@bjlittle
bjlittle deleted the refactor_ocean_sigma_over_z branch April 29, 2014 09:42
@rsignell-usgs

Copy link
Copy Markdown

Oh Yes! Here is the OPeNDAP URL for the US Integrated Ocean Observing Sysstem mid-Atlantic ocean forecast model, which uses ocean_s_coordinate_g1:

url = 'http://tds.marine.rutgers.edu/thredds/dodsC/roms/espresso/2013_da/avg_Best/ESPRESSO_Real-Time_v2_Averages_Best_Available_best.ncd'
s = iris.load_cube(url,'sea_water_salinity')

@bjlittle

Copy link
Copy Markdown
Member Author

Cheers!

@bjlittle bjlittle mentioned this pull request May 15, 2014
@ocefpaf ocefpaf mentioned this pull request Jun 6, 2014
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