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

Reading in Met-Offce Unified Model data #148

Open
2 tasks
leifdenby opened this issue Nov 2, 2021 · 2 comments
Open
2 tasks

Reading in Met-Offce Unified Model data #148

leifdenby opened this issue Nov 2, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@leifdenby
Copy link
Contributor

@LSaffin and I are going to try and get UM model data read into lagtraj 😄

So far what I know we need is:

  • loading of UM netCDF files, this should loaded the relevant netCDF files (by some naming convention, or globbing a directory), rename variables to the ECMWF naming convention and add any derived variables that lagtraj needs
  • interpolation from UM height-levels (which are different in each column) to the height levels in lagtraj
@leifdenby
Copy link
Contributor Author

leifdenby commented Nov 2, 2021

Name-mapping for ECMWF to UM variable names (taken from https://github.com/EUREC4A-UK/lagtraj/blob/master/lagtraj/forcings/profile_calculation.py#L13)

  • u: zonal_velocity in blafile.nc ??
  • v
  • theta
  • q
  • clwc
  • ciwc
  • t
  • p_f
  • t_l
  • cc
  • q_t
  • r_t
  • r_v
  • r_l
  • r_i
  • theta_l

more to follow

@leosaffin
Copy link

leosaffin commented Nov 3, 2021

I think it will be easiest to use CF standard names for UM output. By default people use met office specific file formats for UM output which I can load with iris giving you variables by standard name. If I load UM data output to netCDF with xarray, the variable names are "STASH codes" which aren't very human readable. Standard prognostics are

Standard name STASH code Possible ECMWF name
x_wind STASH_m01s00i002 u
y_wind STASH_m01s00i003 v
air_potential_temperature STASH_m01s00i004 theta
specific_humidity STASH_m01s00i010 q
mass_fraction_of_cloud_ice_in_air STASH_m01s00i012 ciwc
surface_altitude STASH_m01s00i033
upward_air_velocity STASH_m01s00i150
mass_fraction_of_cloud_liquid_water_in_air STASH_m01s00i254 clwc
cloud_area_fraction_in_atmosphere_layer STASH_m01s00i265 cc
STASH_m01s00i389 rho
air_pressure STASH_m01s00i408 p_f
surface_air_pressure STASH_m01s00i409

From these, you should be able to derive the rest.

Another thing to watch out for is the grid staggering. u, v, and rho are on half model levels as well as u and v being horizontally staggered.

@leifdenby leifdenby added the enhancement New feature or request label Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants