Missing units in the STASH-to-CF table
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
Research direction
Read the STASH_to_CF.txt table linked in the issue and inspect the 63 listed STASH codes against the HiRes outputs described in the reproduction script. Start by checking which entries lack units and establish the units of the quantities as output by the UM; the issue provides the surface dust example as a guide. Done when as many listed codes as can be determined have correct output units in the table.
Written by the indexing model from the issue text.
Description
There are plenty of STASH codes in STASH_to_CF.txt thate are not assigned physical units. We should correct that as best we can, and certainly for known use cases.
Note that the required units are for the quantities actually output by the UM, not a canonical equivalent unit. For instance, STASH code 20058 (SURFACE DUST CONCENTRATION) is output in units of g m-3 (not kg m-3).
The HiRes model runs are currently outputting 63 STASH codes that do not have units, and it would be good to address as many of these as possible.
Note, that we're using here the latest STASH-to-CF.txt table that currently lives in PR #64 .
The 63 STASH codes that the HiRes runs need units for are:
('211', 'CCA WITH ANVIL AFTER TIMESTEP')
('253', 'DENSITY*R*R AFTER TIMESTEP')
('266', 'BULK CLOUD FRACTION IN EACH LAYER')
('1221', 'LAYER CLD LIQ RE * LAYER CLD WEIGHT')
('1223', 'LAYER CLOUD WEIGHT FOR MICROPHYSICS')
('1225', 'CONV CLOUD LIQ RE * CONV CLD WEIGHT')
('1226', 'CONV CLOUD WEIGHT FOR MICROPHYSICS')
('1241', 'DROPLET NUMBER CONC * LYR CLOUD WGT')
('1242', 'LAYER CLOUD LWC * LAYER CLOUD WEIGHT')
('1245', '2-D RE DISTRIBUTION * 2-D RE WEIGHT')
('1246', 'WEIGHT FOR 2-D RE DISTRIBUTION')
('1254', '2-D RE * WEIGHT - WARM CLOUDS ONLY')
('1255', 'WEIGHT FOR WARM CLOUD 2-D RE')
('1260', 'NET DN SW O SEA FLX BLW 690NM:SEA MN')
('1280', 'COLUMN-INTEGRATED Nd * SAMP. WEIGHT')
('1281', 'SAMP. WEIGHT FOR COL. INT. Nd')
('1298', 'CDNC @CLOUD TOP * WEIGHT')
('1299', 'WEIGHT FOR CDNC @CLOUD TOP')
('2295', 'FOSSIL FUEL ORG C OPTIC DEPTH IN RAD')
('2422', 'DUST OPTICAL DEPTH FROM PROGNOSTIC')
('3055', 'CUMULATIVE FRACTION TRANSPIRATION')
('3231', 'SUBLIM. FROM SURFACE (GBM) KG/M2/TS')
('3237', 'SPECIFIC HUMIDITY AT 1.5M')
('3305', 'STABLE BL INDICATOR')
('3306', 'STRATOCUM. OVER STABLE BL INDICATOR')
('3307', 'WELL_MIXED BL INDICATOR')
('3308', 'DECOUPLED SC. NOT OVER CU. INDICATOR')
('3309', 'DECOUPLED SC. OVER CU. INDICATOR')
('3310', 'CUMULUS-CAPPED BL INDICATOR')
('3317', 'SURFACE TILE FRACTIONS')
('3331', 'SUBLIMATION MOISTURE FLUX ON TILES')
('3340', 'SHEAR-DRIVEN B.LAYER INDICATOR')
('3365', '10 METRE NEUTRAL WIND U-COMP B GRID')
('3366', '10 METRE NEUTRAL WIND V-COMP B GRID')
('3367', '10 METRE NEUTRAL WIND SPEED B GRID')
('3395', 'FRACTION OF LAND')
('3539', 'TRANSPIRATION GRIDBOX MEAN')
('6101', 'EASTWARD FLUX - SPECTRAL PSEUDOMOM.')
('6102', 'SOUTHWARD FLUX - SPECTRAL PSEUDOMOM.')
('6103', 'WESTWARD FLUX - SPECTRAL PSEUDOMOM.')
('6104', 'NORTHWARD FLUX - SPECTRAL PSEUDOMOM.')
('6105', 'EASTWARD FORCE FROM SPECTRAL GW')
('6106', 'NORTHWARD FORCE FROM SPECTRAL GW')
('6111', 'E. FLUX SPECTRAL PSEUDOMOM. P LEVS')
('6113', 'W. FLUX SPECTRAL PSEUDOMOM. P LEVS')
('6115', 'EAST. FORCE FROM SPECTRAL GW P LEVS')
('6207', 'U-ACCEL FROM SATURATED STRESS')
('6208', 'V-ACCEL FROM SATURATED STRESS')
('6223', 'X COMPONENT OF GW SATURATION STRESS')
('6224', 'Y COMPONENT OF GW SATURATION STRESS')
('6241', 'X COMPT OF GRAV. WAVE STRESS P LEVS')
('6247', 'U-ACCEL FROM SATURATED STRESS P LEVS')
('30112', 'WBIG Set to 1 if w GT 1.0m/s')
('30114', 'WBIG Set to 1 if w GT 0.1m/s')
('30206', 'RELATIVE HUMIDITY ON P LEV/UV GRID')
('30301', 'HEAVYSIDE FN ON P LEV/UV GRID')
('30403', 'TOTAL COLUMN DRY MASS RHO GRID')
('30404', 'TOTAL COLUMN WET MASS RHO GRID')
('30407', 'TOTAL WATER VAPOUR FLUX U RHO (retd)')
('30408', 'TOTAL WATER VAPOUR FLUX V RHO (retd)')
('30428', 'dry mass col int u*q per unit area')
('30429', 'dry mass col int v*q per unit area')
('30431', 'dry mass col int u*v per unit area')
63 STASH codes without units
List produced by:
import glob
import umfive # Runing from PR #64
files = list(glob.glob("u-dz876/19640701T0000Z/dz876a*"))
files.append("u-dz876/atmos_pm/dz876a.pm1959sep")
vars_without_units = []
for filename in files:
print('Checking', filename)
u = umfive.File(filename)
vars_without_units.extend(
[
(v.attrs['stash_code'], v.attrs['long_name'])
for name, v in u.data_variables.items() if 'units' not in v.attrs
]
)
vars_without_units = sorted(set(vars_without_units), key=lambda item: int(item[0]))
print("\n".join(map(str, vars_without_units)))
print(f"\n{len(vars_without_units)} STASH codes without units")
- Dominant language
- Python
- Stars
- 2
- Forks
- 1
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 9
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
eegprep-lean: set channel types from the Zarr group's channel_typePossibly taken @claude claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
sccn/eegprep#668 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
blacklanternsecurity/bbot#3679 ·
Maintainers usually reply within 2 days
-
Link Checker ReportOpenBot Type: Bug Type: Documentation
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
speakeasy-api/speakeasy#2159 ·
Maintainers usually reply within 1 day