yes? show data
currently SET data sets:
1> ./BSOSE20132017wOmega.nc
name title I J K L
TEMP Temperature 1:2160 1:586 1:1 1:60
S Salinity 1:2160 1:586 1:1 1:60
TCARBN DIC 1:2160 1:586 1:1 1:60
ALKALI TAlk 1:2160 1:586 1:1 1:60
PHT pHT 1:2160 1:586 1:1 1:60
PCO2 pCO2 1:2160 1:586 ... 1:60
NITRATE Nitrate 1:2160 1:586 1:1 1:60
OMEGAAR 1:2174 1:586 1:1 1:60
OMEGAAR2100
1:2174 1:586 1:1 1:60
yes? show grid S[d=1]
GRID GGB1
name axis # pts start end subset
TIME TIME 60 r 30-JAN-2013 20:48 31-DEC-2017 10:24 full
Hi ,
Nancy and I looked at this and it turns out that the file uses an
INT64 data type to store the time coordinates. That's very
slightly non-standard, as INT64 is a type not listed in the CF
standard. We will be able to add it to the types that PyFerret
(and Ferret) recognizes. That will be in a future PyFerret
release.
Meanwhile, we can redefine the time axis within the PyFerret
session, so PyFerret will write it out ok, and without changing
any of the time information. DEFINE AXIS/LIKE= gets the time
origin and units from the original axis and t[gt=time] will use
the same coordinates. It just makes it a Ferret-defined axis
rather than an axis from the file.
yes? define axis/t/like=time time = t[gt=time]
Replacing definition of axis TIME
*** NOTE: grid GON1 used by data set
bsose_i001_2013to2017_monthly_Salt
*** NOTE: Redefinition may alter apparent contents
of data set
...
There may be more lines of ***NOTE as the definition of the axis
"time" from the file is being changed for all of the grids in the
file. Again this is happening just in the session, making new
definition of what PyFerret is going to use for the time axis of
the variable.
-Ansley
Hello All,
I am trying to subset a large NetCDF file to sample only monthly surface salinity values for 2013-2017 using the following code but am getting a NetCDF error. Please let me know if you have any suggestions.
Thanks,Nancy Williams
williams% pyferret
NOAA/PMEL TMAP
PyFerret v7.42 (optimized)
Darwin 14.5.0 - 08/01/18
27-Nov-18 15:35
yes? set memory/size=1000
yes? use bsose_i001_2013to2017_monthly_Salt.nc
*** NOTE: Internal err: unknown data type
*** NOTE: Axis coordinates are decreasing-ordered. Reversing ordering for axis Z
yes? show data
currently SET data sets:
1> ./bsose_i001_2013to2017_monthly_Salt.nc (default)
name title I J K L
ITER model timestep number ... ... ... 1:60
DEPTH ocean depth 1:2160 1:586 ... ...
RA cell area 1:2160 1:586 ... ...
DRF cell z size ... ... 1:52 ...
HFACC vertical fraction of open cell 1:2160 1:586 1:52 ...
SALT Salinity 1:2160 1:586 1:52 1:60
yes? let S=SALT[k=52]
yes? show var
Created by DEFINE VARIABLE:
>>> Definitions that replace any file variable of same name:
S = SALT[K=52]
yes? save/clobber/file="BSOSE20132017.nc" S
LISTing to file BSOSE20132017.nc
NetCDF: Not a valid data type or _FillValue type mismatch (OPeNDAP/netCDF Error code -45)
Failed creating coord variable TIME
yes?
--
Nancy L. Williams
NRC Postdoctoral Fellow
NOAA Pacific Marine Environmental Laboratory
nancy.williams@xxxxxxxx