-
Notifications
You must be signed in to change notification settings - Fork 7
Issue #915: Produce BCVs #918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
34913c0
0e9bfc9
a2acaef
76ae7f3
c3acd7d
fc1d578
ea5832e
e3a017f
24f56e6
f7df065
33ed78f
748a4dd
aab1b11
6890f9b
41e1818
72744f5
108fc6c
b70e7c8
ff974e0
c51d452
481cb61
c976f19
77009e7
e92ee2c
ba763de
46774c0
30e0136
a3ede49
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -201,7 +201,8 @@ | |
| "ancil_filenames": [ | ||
| "qrparm.landfrac.pp", | ||
| "qrparm.soil.pp", | ||
| "qrparm.orog.pp" | ||
| "qrparm.orog.pp", | ||
| "slthick_rootd_sftgif.pp" | ||
| ], | ||
| "hybrid_heights_files": [ | ||
| "atmosphere_theta_levels_85.txt", | ||
|
|
@@ -216,12 +217,18 @@ | |
| "levels": 75, | ||
| "replacement_coordinates_file": "", | ||
| "ancil_filenames": [ | ||
| "nemo_eORCA1_grid-V.nc", | ||
| "nemo_eORCA1_grid-U.nc", | ||
| "ocean_constants.nc", | ||
| "ocean_byte_masks.nc", | ||
| "ocean_basin.nc", | ||
| "diaptr_basin_masks.nc", | ||
| "ocean_zostoga.nc" | ||
| ], | ||
| "ancil_variables": [ | ||
| "u_coord_reference", | ||
| "v_coord_reference" | ||
| ], | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needed otherwise moo filter threw an error trying to extract these from MASS. |
||
| "bounds_coordinates": { | ||
| "onm-grid-T": [ | ||
| "bounds_nav_lon", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -198,10 +198,13 @@ def load_cubes(all_input_data, run_bounds, loadable, ancil_variables): | |
| logger.debug('Loading cube using Iris constraints') | ||
| load_constraints = constraint_constructor.load_constraints(loadable) | ||
|
|
||
| # Static coord-reference ancils have a fixed timestamp that won't match | ||
| # later cycle run_bounds, so skip time filtering for them. | ||
| effective_run_bounds = None if loadable.name.endswith('_coord_reference') else run_bounds | ||
| if loadable.is_pp(): | ||
| merged_cubes = load_cubes_from_pp(all_input_data, load_constraints, run_bounds, ancil_variables) | ||
| else: | ||
| merged_cubes = load_cubes_from_nc(all_input_data, load_constraints, run_bounds) | ||
| merged_cubes = load_cubes_from_nc(all_input_data, load_constraints, effective_run_bounds) | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I went with the name change from |
||
|
|
||
| if not merged_cubes: | ||
| error_msg = 'No cubes found using constraints "{}" within "{}"' | ||
|
|
@@ -391,18 +394,21 @@ def load_cubes_from_nc(all_input_data, load_constraints, run_bounds): | |
|
|
||
| cubes = iris.cube.CubeList() | ||
| if merged_cubes: | ||
| # Apply the time constraint. | ||
| time_constraint = setup_time_constraint(run_bounds) | ||
| # Apply the time constraint (skipped if run_bounds is None, e.g. for static ancils). | ||
| time_constraint = setup_time_constraint(run_bounds) if run_bounds is not None else None | ||
| for merged_cube in merged_cubes: | ||
| promote_aux_time_coord_to_dim(merged_cube) | ||
| # Add the fill_value as an attribute on the cube to workaround the | ||
| # fact that iris.util.new_axis resets the fill_value. | ||
| if hasattr(merged_cube.lazy_data(), 'fill_value'): | ||
| merged_cube.attributes['fill_value'] = merged_cube.lazy_data().fill_value | ||
|
|
||
| cube = apply_time_constraint(merged_cube, time_constraint) | ||
| if cube is not None: | ||
| cubes.append(cube) | ||
| if time_constraint is None: | ||
| cubes.append(merged_cube) | ||
| else: | ||
| cube = apply_time_constraint(merged_cube, time_constraint) | ||
| if cube is not None: | ||
| cubes.append(cube) | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Setting time_constraint to |
||
| return cubes | ||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2497,3 +2497,9 @@ def calc_rootd(soil_cube, frac_cube, ice_class=None): | |
| ) | ||
|
|
||
| return rootd_cube | ||
|
|
||
|
|
||
| def apply_ocean_coordinates(cube, coordinate_cube): | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. docstring |
||
| cube.coord(axis='Y').points = coordinate_cube.coord(axis='Y').points.copy() | ||
| cube.coord(axis='X').points = coordinate_cube.coord(axis='X').points.copy() | ||
| return cube | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -344,3 +344,14 @@ positive = | |
| reviewer = none | ||
| status = embargoed | ||
| units = m | ||
|
|
||
| [lai_tavg-u-hxy-lnd] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looks wrong (section 19 not in UKCM2) |
||
| comment = | ||
| component = land | ||
| dimension = longitude latitude time | ||
| expression = land_class_mean(m01s19i014[lbtim_ia=240,lbproc=128], m01s19i013[lbtim_ia=240,lbproc=128], land_class='veg') | ||
| mip_table_id = land | ||
| positive = | ||
| reviewer = none | ||
| status = embargoed | ||
| units = 1 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to add this to UKCM2a-0-HH as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
separate issue