Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

atmosphere lat-long bounds #17

Open
grenville opened this issue Nov 9, 2022 · 15 comments
Open

atmosphere lat-long bounds #17

grenville opened this issue Nov 9, 2022 · 15 comments
Labels
output-cf-compliance Relates to the CF compliance of the output

Comments

@grenville
Copy link

Do we need to include bounds for atmos lat and long (& vertical) coordinates

@grenville grenville added bug Something isn't working output-cf-compliance Relates to the CF compliance of the output and removed bug Something isn't working labels Nov 9, 2022
@grenville
Copy link
Author

this might not be too big a job - Jeff already has the code to do much of what's needed in umnetcdf

@bnlawrence
Copy link
Contributor

I can see the need for doing it in the vertical coordinates, but it seems un-necessary for the horizontal coordinates ???

@jeff-cole
Copy link

Grenville's comment applies to lat/lon not vertical bounds. Vertical would be a lot harder I think

@jeff-cole
Copy link

Looking at some MetO CMIP6 pressure level data they do not have bounds, would it make any sense to have bounds on pressure levels? I can't find any model level data to check but they certainly can have bounds and it probably makes sense to have them. Currently the XIOS output on model levels has the model level number as the only vertical dimension so all the extra vertical dimensions and their bounds would need to be added. All this is available in the UM so can be done but is not a quick bit of work. I guess this is a separate issue.

@grenville
Copy link
Author

Our XIOS vertical coords are not complete we don't currently have the height information (as below), just the model level number. We are looking at how to add this

	double lev(lev) ;
		lev:bounds = "lev_bnds" ;
		lev:units = "m" ;
		lev:axis = "Z" ;
		lev:positive = "up" ;
		lev:long_name = "hybrid height coordinate" ;
		lev:standard_name = "atmosphere_hybrid_height_coordinate" ;
		lev:formula = "z = a + b*orog" ;
		lev:formula_terms = "a: lev b: b orog: orog" ;
	double lev_bnds(lev, bnds) ;
		lev_bnds:formula = "z = a + b*orog" ;
		lev_bnds:standard_name = "atmosphere_hybrid_height_coordinate" ;
		lev_bnds:units = "m" ;
		lev_bnds:formula_terms = "a: lev_bnds b: b_bnds orog: orog" ;
	double b(lev) ;
		b:long_name = "vertical coordinate formula term: b(k)" ;
	float orog(lat, lon) ;
		orog:long_name = "Surface Altitude" ;
		orog:units = "m" ;
	double b_bnds(lev, bnds) ;
		b_bnds:long_name = "vertical coordinate formula term: b(k+1/2)" ;

@grenville
Copy link
Author

This seems to be tricky in files that have multiple fields - we currently have these combinations of vertical coordinates and grids in the same file -- we can't add unique formula terms for heights in this case- we'd need to split up the output so that only a single horizontal grid is associated with a given vertical axis, ie we can't have things like the first three entries all in one file

[['um-atmos_DALLRH', 'grid_u'], ['um-atmos_DALLRH', 'grid_v'], ['um-atmos_DALLTH', 'grid_t'], ['um-atmos_DTHSPARSE', 'grid_t'], ['um-atmos_DALLRH', 'grid_t'], ['um-atmos_DALLRHP1', 'grid_t'], ['um-atmos_DRHP1SPARSE', 'grid_t'], ['um-atmos_D1TH', 'grid_t'], ['um-atmos_D52RH', 'grid_t'], ['um-atmos_DNOGWTH', 'grid_u'], ['um-atmos_DNOGWTH', 'grid_v'], ['um-atmos_DNOGWRH', 'grid_u'], ['um-atmos_DNOGWRH', 'grid_v'], ['um-atmos_DALLTH', 'grid_u'], ['um-atmos_DALLTH', 'grid_v']]

@grenville
Copy link
Author

OK - so progress here. Spitting 3-d fields into u, v, t streams is simple - I've done it for all fields except CORDEX (no particular reason for not doing CORDEX yet)
We now have metadata like

	float um-atmos_DALLRHP1(um-atmos_DALLRHP1) ;
		um-atmos_DALLRHP1:name = "um-atmos_DALLRHP1" ;
		um-atmos_DALLRHP1:standard_name = "model_level_number" ;
		um-atmos_DALLRHP1:long_name = "model rho levels (Charney-Phillips grid)" ;
		um-atmos_DALLRHP1:units = "1" ;
		um-atmos_DALLRHP1:axis = "Z" ;
		um-atmos_DALLRHP1:positive = "up" ;
		um-atmos_DALLRHP1:formula = "z = a + b*orog" ;
		um-atmos_DALLRHP1:formula_terms = "a: um-atmos_DALLRHP1 b: b_tum-atmos_DALLRHP1 orog: orog_t" ;
	float um-atmos_DRHP1SPARSE(um-atmos_DRHP1SPARSE) ;
		um-atmos_DRHP1SPARSE:name = "um-atmos_DRHP1SPARSE" ;
		um-atmos_DRHP1SPARSE:standard_name = "model_level_number" ;
		um-atmos_DRHP1SPARSE:long_name = "model rho levels (Charney-Phillips grid)" ;
		um-atmos_DRHP1SPARSE:units = "1" ;
		um-atmos_DRHP1SPARSE:axis = "Z" ;
		um-atmos_DRHP1SPARSE:positive = "up" ;
		um-atmos_DRHP1SPARSE:formula = "z = a + b*orog" ;
		um-atmos_DRHP1SPARSE:formula_terms = "a: um-atmos_DRHP1SPARSE b: b_tum-atmos_DRHP1SPARSE orog: orog_t" ;

with

	double b_tum-atmos_DALLTH(um-atmos_DALLTH) ;
	double orog_t(lat_um-atmos_grid_t_halo_single, lon_um-atmos_grid_t_halo_single) ;
	double b_tum-atmos_DTHSPARSE(um-atmos_DTHSPARSE) ;
	double b_tum-atmos_DALLRH(um-atmos_DALLRH) ;
	double b_tum-atmos_DALLRHP1(um-atmos_DALLRHP1) ;
	double b_tum-atmos_DRHP1SPARSE(um-atmos_DRHP1SPARSE) ;
	double b_tum-atmos_D1TH(um-atmos_D1TH) ;
	double b_tum-atmos_D52RH(um-atmos_D52RH) ;

similarly for u and v grids - we only have uv grid for pressure-level data

@grenville
Copy link
Author

I've not done SOILS

@davidhassell
Copy link

Hi - this looks a bit confused. The a formula term variable has to have units (equivalent to) metres, and have standard_name "atmosphere_hybrid_height_coordinate"

@grenville
Copy link
Author

grenville commented Dec 8, 2022

good old CF -- watch this space

@grenville
Copy link
Author

Hi @davidhassell - please confirm that having a's, b's and orography's in separate files is not CF -- Yann thinks he did that for their CMIP6 output

@davidhassell
Copy link

having a's, b's and orography's in separate files is not CF

Correct.

@grenville
Copy link
Author

grenville commented Dec 8, 2022

Fixed attributes

float um-atmos_DTHSPARSE(um-atmos_DTHSPARSE) ;
		um-atmos_DTHSPARSE:name = "um-atmos_DTHSPARSE" ;
		um-atmos_DTHSPARSE:units = "m" ;
		um-atmos_DTHSPARSE:axis = "Z" ;
		um-atmos_DTHSPARSE:positive = "up" ;
		um-atmos_DTHSPARSE:standard_name = "atmosphere_hybrid_height_coordinate" ;
		um-atmos_DTHSPARSE:long_name = "hybrid height coordinate" ;
		um-atmos_DTHSPARSE:formula = "z = a + b*orog" ;
		um-atmos_DTHSPARSE:formula_terms = "a: um-atmos_DTHSPARSE b: b_t_um-atmos_DTHSPARSE orog: orog_t" ;

double b_t_um-atmos_DALLTH(um-atmos_DALLTH) ;
		b_t_um-atmos_DALLTH:long_name = "vertical coordinate formula term: b(k)" ;
	double orog_t(lat_um-atmos_grid_t_halo_single, lon_um-atmos_grid_t_halo_single) ;
		orog_t:long_name = "Surface Altitude" ;
		orog_t:units = "m" ;

etc

@davidhassell
Copy link

Nice!

I'd just add that in this case the orography should also have a standard_name of "surface_altitude", and add computed_standard_name = "altitude" to um-atmos_DTHSPARSE (see here for details).

@grenville
Copy link
Author

thanks added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
output-cf-compliance Relates to the CF compliance of the output
Projects
None yet
Development

No branches or pull requests

4 participants