Skip to content
Snippets Groups Projects
Commit b865ac43 authored by tomrink's avatar tomrink
Browse files

snapshot...

parent 0b219169
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ import xarray as xr
from util.util import get_grid_values_all
def acspo_validate(oper_file, cspp_file):
def acspo_validate(oper_file, cspp_file, outfile=None):
h5f_oper = h5py.File(oper_file, 'r')
h5f_cspp = h5py.File(cspp_file, 'r')
......@@ -95,7 +95,8 @@ def acspo_validate(oper_file, cspp_file):
'oper_lat': xr.DataArray([valid_lat_oper], coords=None, dims=None, name='oper_lat'),
'oper_lon': xr.DataArray([valid_lon_oper], coords=None, dims=None, name='oper_lon'),
})
xarray_data.to_netcdf('/Users/tomrink/sst_values.nc')
if outfile is not None:
xarray_data.to_netcdf('/Users/tomrink/sst_values.nc')
print('fraction approx equal: ',
np.sum(np.isclose(valid_sst_cspp, valid_sst_oper, rtol=0.001))/np.sum(both_valid))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment