⚲
Project
General
Profile
Sign in
Register
Home
Projects
Imprint + Privacy Policy
Help
Search
:
CDO
All Projects
CDO
Overview
Activity
News
Wiki
Forums
Files
Documentation
Download (922 Bytes)
python vs cdo - timeseries mean
» Validation_Month_SEB.py
Sarah O'Keefe
, 2017-11-11 17:17
import
sys
import
numpy
as
np
#import Scientific.IO.NetCDF as s
import
matplotlib.pyplot
as
plt
import
mpl_toolkits.basemap
as
bm
from
scipy.stats.stats
import
pearsonr
from
netCDF4
import
Dataset
path
=
"/ouce-home/staff/sedm4922/"
#for fname in glob.glob(path):
#print(fname)
workdir
=
'/ouce-home/staff/sedm4922/biases/'
model
=
[
'chirps'
]
for
i
,
m
in
enumerate
(
model
):
precip_f
=
'/ouce-home/staff/sedm4922/biases/inputs/'
+
m
+
'_short.nc'
print
precip_f
precip_mod
=
Dataset
(
precip_f
,
'r'
)
precip_model
=
precip_mod
.
variables
[
'precip'
][:]
precip_model
=
np
.
squeeze
(
precip_model
)
lat
=
precip_mod
.
variables
[
'latitude'
][:]
lon
=
precip_mod
.
variables
[
'longitude'
][:]
print
precip_model
.
shape
precip_model
=
np
.
mean
(
precip_model
,
axis
=
1
)
precip_model
=
np
.
mean
(
precip_model
,
axis
=
1
)
precip_model
=
np
.
mean
(
precip_model
,
axis
=
0
)
print
precip_model
.
shape
print
precip_model
exit
()
« Previous
1
2
Next »
(2-2/2)
Loading...