Some tips for getting assistance:
-
Provide more information. You’ve said you’re interested in the fld_s04i201
variable, but not said in which file to find this variable. The more work you ask someone to do the less likely you will get help.
-
You can’t assume everyone can access your data files. Not everyone is a member of the same projects, in this case v45
. If you want assistance from a wider pool of people then you can copy data files to a directory in /scratch/public
with permissions for anyone to access it.
That said, I am a member of v45
.
It appears the variable you’re interested in is in the umnsa_spec_*.nc
files.
The cdo
command you tried is accessing all the files in the directory. Is there a reason for that?
I’m not a cdo
expert, and I am sure it can be done with that or nco
and ncrcat
. What you want can also be accomplished with python and xarray
In [4]: import xarray as xr
In [5]: ds = xr.open_mfdataset('umnsa_spec_*.nc')
In [6]: ds
Out[6]:
<xarray.Dataset> Size: 1TB Dimensions: (time: 36, lat: 2120, lon: 2600, pseudo_level: 5,
lon_0: 2600, lat_0: 2121, time_0: 36, bnds: 2)
Coordinates:
* time (time) datetime64[ns] 288B 2016-06-03T00:10:00 ...
* lat (lat) float64 17kB -48.79 -48.77 ... -6.852 -6.832
* lon (lon) float64 21kB 114.3 114.3 ... 165.7 165.7
* pseudo_level (pseudo_level) int32 20B 1 2 3 4 5
* lon_0 (lon_0) float64 21kB 114.3 114.3 ... 165.7 165.7
* lat_0 (lat_0) float64 17kB -48.8 -48.78 ... -6.822
* time_0 (time_0) datetime64[ns] 288B 2016-06-03T00:05:0...
theta_level_height float64 8B 5.0
model_theta_level_number int32 4B 1
sigma_theta float64 8B 0.9994
height float64 8B 10.0
height_0 float64 8B 1.5
Dimensions without coordinates: bnds
Data variables: (12/39)
fld_s00i010 (time_0, time, lat, lon) float32 29GB dask.array<chunksize=(6, 1, 1060, 1300), meta=np.ndarray>
latitude_longitude (time_0, time) float64 10kB -2.147e+09 ... -2.1...
lat_bnds (time_0, time, lat, bnds) float64 44MB dask.array<chunksize=(6, 36, 2120, 2), meta=np.ndarray>
lon_bnds (time_0, time, lon, bnds) float64 54MB dask.array<chunksize=(6, 36, 2600, 2), meta=np.ndarray>
theta_level_height_bnds (time_0, time, bnds) float64 21kB dask.array<chunksize=(6, 36, 2), meta=np.ndarray>
sigma_theta_bnds (time_0, time, bnds) float64 21kB dask.array<chunksize=(6, 36, 2), meta=np.ndarray>
... ...
fld_s21i101 (time_0, time, lat, lon) float64 57GB dask.array<chunksize=(6, 1, 1060, 1300), meta=np.ndarray>
fld_s21i104 (time, time_0, lat, lon) float32 29GB dask.array<chunksize=(36, 2, 1060, 1300), meta=np.ndarray>
fld_s30i403 (time_0, time, lat, lon) float32 29GB dask.array<chunksize=(6, 1, 1060, 1300), meta=np.ndarray>
fld_s30i404 (time_0, time, lat, lon) float32 29GB dask.array<chunksize=(6, 1, 1060, 1300), meta=np.ndarray>
fld_s30i405 (time_0, time, lat, lon) float32 29GB dask.array<chunksize=(6, 1, 1060, 1300), meta=np.ndarray>
fld_s30i406 (time_0, time, lat, lon) float32 29GB dask.array<chunksize=(6, 1, 1060, 1300), meta=np.ndarray>
Attributes:
history: File /home/563/cc6171/cylc-run/u-cs142/share/cycle/20160603...
Conventions: CF-1.6
source: Data from Met Office Unified Model
um_version: 12.2
In [7]: ds['fld_s04i201']
Out[7]:
<xarray.DataArray 'fld_s04i201' (time: 36, time_0: 36, lat: 2120, lon: 2600)> Size: 29GB
dask.array<concatenate, shape=(36, 36, 2120, 2600), dtype=float32, chunksize=(36, 2, 1060, 1300), chunktype=numpy.ndarray>
Coordinates:
* time (time) datetime64[ns] 288B 2016-06-03T00:10:00 ...
* lat (lat) float64 17kB -48.79 -48.77 ... -6.852 -6.832
* lon (lon) float64 21kB 114.3 114.3 ... 165.7 165.7
* time_0 (time_0) datetime64[ns] 288B 2016-06-03T00:05:0...
theta_level_height float64 8B 5.0
model_theta_level_number int32 4B 1
sigma_theta float64 8B 0.9994
height float64 8B 10.0
height_0 float64 8B 1.5
Attributes:
standard_name: stratiform_rainfall_amount
long_name: LARGE SCALE RAIN AMOUNT KG/M2/TS
units: kg m-2
um_stash_source: m01s04i201
cell_methods: time_0: mean
grid_mapping: latitude_longitude
In [8]: ds['time_0']
Out[8]:
<xarray.DataArray 'time_0' (time_0: 36)> Size: 288B
array(['2016-06-03T00:05:00.000000000', '2016-06-03T00:15:00.000000000',
'2016-06-03T00:24:59.999999744', '2016-06-03T00:35:00.000000256',
'2016-06-03T00:45:00.000000000', '2016-06-03T00:54:59.999999744',
'2016-06-03T01:05:00.000000256', '2016-06-03T01:15:00.000000000',
'2016-06-03T01:25:00.000000000', '2016-06-03T01:35:00.000000000',
'2016-06-03T01:45:00.000000000', '2016-06-03T01:54:59.999999744',
'2016-06-03T02:05:00.000000256', '2016-06-03T02:15:00.000000000',
'2016-06-03T02:24:59.999999744', '2016-06-03T02:35:00.000000256',
'2016-06-03T02:45:00.000000000', '2016-06-03T02:55:00.000000000',
'2016-06-03T03:05:00.000000000', '2016-06-03T03:15:00.000000000',
'2016-06-03T03:24:59.999999744', '2016-06-03T03:35:00.000000256',
'2016-06-03T03:45:00.000000000', '2016-06-03T03:54:59.999999744',
'2016-06-03T04:05:00.000000256', '2016-06-03T04:15:00.000000000',
'2016-06-03T04:25:00.000000000', '2016-06-03T04:35:00.000000000',
'2016-06-03T04:45:00.000000000', '2016-06-03T04:54:59.999999744',
'2016-06-03T05:05:00.000000256', '2016-06-03T05:15:00.000000000',
'2016-06-03T05:24:59.999999744', '2016-06-03T05:35:00.000000256',
'2016-06-03T05:45:00.000000000', '2016-06-03T05:55:00.000000000'],
dtype='datetime64[ns]')
Coordinates:
* time_0 (time_0) datetime64[ns] 288B 2016-06-03T00:05:0...
theta_level_height float64 8B 5.0
model_theta_level_number int32 4B 1
sigma_theta float64 8B 0.9994
height float64 8B 10.0
height_0 float64 8B 1.5
Attributes:
axis: T
bounds: time_0_bnds
standard_name: time
In [11]: ds['fld_s04i201'].resample(time_0='1D').sum()
Out[11]:
<xarray.DataArray 'fld_s04i201' (time: 36, time_0: 1, lat: 2120, lon: 2600)> Size: 794MB
dask.array<transpose, shape=(36, 1, 2120, 2600), dtype=float32, chunksize=(36, 1, 1060, 1300), chunktype=numpy.ndarray>
Coordinates:
* time (time) datetime64[ns] 288B 2016-06-03T00:10:00 ...
* lat (lat) float64 17kB -48.79 -48.77 ... -6.852 -6.832
* lon (lon) float64 21kB 114.3 114.3 ... 165.7 165.7
theta_level_height float64 8B 5.0
model_theta_level_number int32 4B 1
sigma_theta float64 8B 0.9994
height float64 8B 10.0
height_0 float64 8B 1.5
* time_0 (time_0) datetime64[ns] 8B 2016-06-03
Attributes:
standard_name: stratiform_rainfall_amount
long_name: LARGE SCALE RAIN AMOUNT KG/M2/TS
units: kg m-2
um_stash_source: m01s04i201
cell_methods: time_0: mean
grid_mapping: latitude_longitude
Note that the final object is a lazy dask
array, and you need to add .compute()
on the end, or evaluate it in some other way to force the computation. When I tried this on a login node it was killed, probably exceeded memory, so you’ll need to do this on an ARE session or similar.