|
22 | 22 | MP_SS_tot, |
23 | 23 | Od550aer, |
24 | 24 | Pr, |
| 25 | + Prodlnox, |
25 | 26 | Rlds, |
26 | 27 | Rlus, |
27 | 28 | Rlut, |
@@ -931,6 +932,36 @@ def test_clwvi_fix(cubes_2d): |
931 | 932 | np.testing.assert_allclose(cube.data, [[[2.0]]]) |
932 | 933 |
|
933 | 934 |
|
| 935 | +def test_get_prodlnox_fix(): |
| 936 | + """Test getting of fix.""" |
| 937 | + fix = Fix.get_fixes('EMAC', 'EMAC', 'Amon', 'prodlnox') |
| 938 | + assert fix == [Prodlnox(None), AllVars(None), GenericFix(None)] |
| 939 | + |
| 940 | + |
| 941 | +def test_prodlnox_fix(cubes_2d): |
| 942 | + """Test fix.""" |
| 943 | + cubes_2d[0].var_name = 'NOxcg_cav' |
| 944 | + cubes_2d[1].var_name = 'NOxic_cav' |
| 945 | + cubes_2d[2].var_name = 'dt' |
| 946 | + cubes_2d[0].units = 'kg' |
| 947 | + cubes_2d[1].units = 'kg' |
| 948 | + cubes_2d[2].units = 's' |
| 949 | + |
| 950 | + fixed_cubes = fix_metadata(cubes_2d, 'Amon', 'prodlnox') |
| 951 | + |
| 952 | + assert len(fixed_cubes) == 1 |
| 953 | + cube = fixed_cubes[0] |
| 954 | + assert cube.var_name == 'prodlnox' |
| 955 | + assert cube.standard_name is None |
| 956 | + assert cube.long_name == ( |
| 957 | + 'Tendency of atmosphere mass content of NOx from lightning' |
| 958 | + ) |
| 959 | + assert cube.units == 'kg s-1' |
| 960 | + assert 'positive' not in cube.attributes |
| 961 | + |
| 962 | + np.testing.assert_allclose(cube.data, [[[2.0]]]) |
| 963 | + |
| 964 | + |
934 | 965 | def test_get_co2mass_fix(): |
935 | 966 | """Test getting of fix.""" |
936 | 967 | fix = Fix.get_fixes('EMAC', 'EMAC', 'Amon', 'co2mass') |
|
0 commit comments