Opened 6 months ago

Closed 4 weeks ago

#2255 closed defect (fixed)

cfa broken

Reported by: simon.tett Owned by: david
Priority: high Component: UM Tools
Keywords: Cc: tim.cowan@…
Platform: ARCHER UM Version: 8.5

Description

Hi,

my colleague Tim Cowan has noticed some oddies in the netcdf we produce. The conversion is done by cfa. We have found that the pressure co-ordinates (and possibly other vertical co-ordinates) are reversed. This looks like it started to happen when cfa was modified on the 27th of March at 20:55. This also seems to be the recurrence of an earlier bug which I remember David fixing. So

1) Could the bug be fixed?
2) Could we have a tool to fix the existing bad netcdf files.

Example data at /nerc/n02/n02/stett2/archive/xnbdx/apy
xnbdxa.py19251201.nc is bad (created 28th March @ 08:31)
xnbdxa.py19301201.nc is good (created 27th March @ 11:37)

thanks
Simon

Attachments (1)

flip_pressure.py (434 bytes) - added by willie 7 weeks ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 5 months ago by simon.tett

Any action on this

comment:2 Changed 5 months ago by willie

  • Owner changed from um_support to david
  • Status changed from new to assigned

Hi Simon,

David is looking at this

Regards
Willie

comment:3 Changed 5 months ago by simon.tett

HI any update on this… I would like to do some more simulations soon… And have the data coming out as correctly netCDF is quite important…

Simon

comment:4 Changed 5 months ago by grenville

  • Resolution set to fixed
  • Status changed from assigned to closed

Finally, I hope to have made progress. I have updated cfa/cfdump/cf-python on archer to 2.0.6, which should fix the upside down pressure levels issue.
David

comment:5 Changed 4 months ago by simon.tett

  • Resolution fixed deleted
  • Status changed from closed to reopened

Any update on code to fix bad files?
Simon

Changed 7 weeks ago by willie

comment:6 Changed 7 weeks ago by willie

Hi Simon,

Just in time for Christmas, this script will fix you bad netCDF files, those with "backwards" pressure coordinates:

python flip_pressure.py bad_file.nc fixed_file.nc

Note that fixed_file.nc can have te same name as the bad file, but you'll want to check that it's behaving before you overwrite!

All the best,

David

comment:7 Changed 4 weeks ago by willie

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.