ANTS and Iris Coord System.. #5154
Replies: 2 comments 1 reply
-
Hello All! I was able to use just Iris instead of ANTS to get the data regridded. Hope JULES accepts these ancillaries! Thanks & Regards |
Beta Was this translation helpful? Give feedback.
0 replies
-
from iris.coord_systems import GeogCS
for axis in ("x", "y"):
coord = my_cube.coord(axis=axis)
coord.coord_system = GeogCS(6371229.0) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
raghu330
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello All!
This is more to do with ANTS which uses Iris, but my problem is basic coord issue.
I would like to convert (regrid) an ancillary file(s) from 0.25 deg resolution to ~0.125 deg to run JULES land surface model at 12 km. My meteorological forcings too at this higher resolution. I have taken the land-sea mask at ~0.125 deg as the target grid like:
I have the source ancillary data (in nc file format @ 0.25 deg) containing all the required ancillaries to drive JULES and I load them in ANTS as an iris cube.
Now I am defining the regrid scheme as:
Regrid the source ancillaries to new target resolution
I get the following error when I try to regrid:
Traceback (most recent call last):
File "", line 1, in
File "/home/raghav/anaconda3/envs/ants/lib/python3.7/site-packages/iris/cube.py", line 4560, in regrid
regridder = scheme.regridder(self, grid)
File "/home/raghav/ANTS/ants.cur/lib/ants/regrid/init.py", line 149, in regridder
hregridder = self._horizontal_scheme.regridder(src_grid, target_grid)
File "/home/raghav/ANTS/ants.cur/lib/ants/regrid/rectilinear.py", line 549, in regridder
src_grid, target_grid, "linear", self._extrapolation
File "/home/raghav/ANTS/ants.cur/lib/ants/regrid/rectilinear.py", line 464, in init
args[0] = _process_cube_crs(args[0])
File "/home/raghav/ANTS/ants.cur/lib/ants/regrid/rectilinear.py", line 31, in _process_cube_crs
src_crs = sx.coord_system.as_ants_crs()
AttributeError: 'NoneType' object has no attribute 'as_ants_crs'
Now how can I set the coordinate system for both the target and source grid to say "GeogCS(6371229.0)" or something meaningful to regrid the source data to target grid size?
Thank you & Regards
Raghu
Beta Was this translation helpful? Give feedback.
All reactions