#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 , 19 years ago
Status: | new → assigned |
---|---|
Version: | 0.8 → 0.7 |
comment:3 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Summary: | Inconsitent ECMWF a and b coefficients → Inconsistent 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.
Note:
See TracTickets
for help on using tickets.
After some thinking:
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:
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.