reading an UM output

2 posts / 0 new
Last post
Masaru Yoshioka
reading an UM output

Hi.

I have a problem in reading the .pp file as well. I did below in ipython on JASMIN.

dirp = '/group_workspaces/jasmin2/ukca/vol1/myoshioka/um/Dumps/teayd/'
fnmp = 'teayda.pm2008jan.pp'
vnm = 'mass_fraction_of_dust_in_insoluble_accumulation_mode_aerosol_in_air'
cis.read_data(dirp+fnmp, vnm, product=None)

This took a long time before it failed... I got messages like these;

ERROR:root:Unable to concatenate cubes on load:
failed to concatenate into a single cube.
Cube metadata differs for phenomenon: air_pressure
Out[33]: <cis 'GriddedData' of mass_fraction_of_dust_in_insoluble_accumulation_mode_aerosol_in_air / (kg kg-1) (model_level_number: 85; latitude: 145; longitude: 192)>

The result is exactly the same when I use "product='HadGEM_PP'".

The last line above is a positive message and I thought dust mass mixing ratio might have been stored in 'GriddedData'. But I don't know how to use it. The documentation (r 1.6.0 Stable) mention "summary()" but is this the way to use it?

summary(GriddedData)

This returns this;

NameError: name 'summary' is not defined

print(GriddedData)

returns the same error message as above.

Please can anyone help me? Also is there anywhere I can look up for error codes and messages? Thanks.

Best regards,
Masaru

duncanwp
Hi Masaru,

Hi Masaru,

I think I've answered this in the other post, but I'll copy it here in case anyone else finds it!

You're nearly there when reading the dataset in Python. You just need to assign it to a variable and then print that:

dust=cis.read_data(dirp+fnmp, vnm, product=None)
print(dust)

Unfortunately the Python interface isn't as well documented as I'd like, for now this set of notes should give you a good start though: https://nbviewer.jupyter.org/github/duncanwp/python_for_climate_scientis...

Hope that helps!

Website designed & built by OCC