Opened 19 years ago

Closed 19 years ago

Last modified 16 years ago

#14 closed defect (fixed)

Inconsistent ECMWF a and b coefficients

Reported by: frae Owned by: frcm
Priority: normal Milestone:
Component: ROPP (all) Version: 0.7
Keywords: Cc:

Description

The ECMWF a and b coefficients given in the netCDF files (ropp_fm/data) are using units of Pa (at least coeff a) while surface pressure is given in hPa. Should be consistent and has to be changed in the ropp_io module.

Change history (4)

comment:1 by frcm, 19 years ago

Status: newassigned
Version: 0.80.7

After some thinking:

  • The units of the level coefficients depend on the vertical level type. For hybrid vertical levels as defined at the ECMWF, for example, a is in pressure units, while b is unitless. For the Met Office New Dynamics, one of the coefficients would have units of a geopotential, or geopotential heights.
  • Thus, I initially thought that it makes no sense to define a set of 'default units' in the type definition for ROprof, as we do for all the other variables.

The current implementation reflects this: When the ROPP netCDF variables are created, most variables are defined using the standard units as attributes; but for the level 2d level coefficients, the user's settings are used instead. Thus, in the current implementation, the user is responsible for setting the correct units prior to writing the data.

However:

  • Units of the level coefficients might be inconsistent with the default units for variables of the same physical type (i.e. using Pa for the a coefficients in a for hybrid levels, but hPa for all other pressures)
  • or can easily be forgotten completely - as in the initial version of the example data files in ropp_fm.
  • There is currently no variable conversion implemented when reding these data in.

Overall, this clearly will cause unneccesary grief when users reading the data with different assumptions on the level coefficient units. Data producers can avoid this partly by ensuring that the proper units are specified in the appropriate structure variables prior to writing; but this still leaves the possibility of inconsistent units. Data producers could avoid that by making sure they are doing the proper conversions to the ROPP default units, again prior to writing the data. However, this is somewhat against the philosophy we used so far, where we basically assumed that users specified whatever (consistent) unit, and the system handles all necessary conversions to standard units.

The alternative would be to specify default units for the level coefficients depending on the level type. We then wouldn't need the user to do any unit conversions any more, but require that the level_type is specified correctly. Ok, that seems to be a smaller and more consistent requirement...

I have therefore added code to ropp_io/ropp/ropp_io_write_ncdf_def.f90 which sets default units based on the value of data%Lev2d%level_type, where data is the ROprof structure provided by the user. I have also added code in ropp_fm/common/ropp_fm_set_units.f90 to set the internally used units for hybrid vertical levels of the ECMWF kind, and to allow for the necessary unit conversions. As things go, there was a typo / bug in ropp_io/ropp/ropp_io_write_ncdf_put.f90 as well; I fixed that, too.

With this new units handling for the level coefficients, it means that the example files I provided for the ropp_fm package are not correct any more, as they do not contain proper units. For the time being, I have edited the units attribute of the level_coeff_a variable and set it to 'Pa'; the ropp_io routines should work with that, but the level coefficients now have inconsistent units compared with the other pressure variables. This still needs to be fixed.

comment:2 by frcm, 19 years ago

Oops - the changes described above went into svn with changeset [647].

comment:3 by frcm, 19 years ago

Resolution: fixed
Status: assignedclosed
Summary: Inconsitent ECMWF a and b coefficientsInconsistent ECMWF a and b coefficients

Changeset [648] contains the updated versions of the example data files where the level coefficient a is now given in hPa.

comment:4 by (none), 16 years ago

Milestone: 0.8

Milestone 0.8 deleted

Note: See TracTickets for help on using tickets.