Comments (6)
@dnadeau4 this is the offending line:
cmor.write(varid,values,time_vals=d.getTime()[:],time_bnds=d.getTime().genGenericBounds())
from cmor.
There are a couple of issues here:
CMOR
SHOULD faithfully reproduce a time axis if it is provided with the dataset, NOT overwrite this by generating a new time axis using thetime_bounds
- The input time_axis is off by 15hrs, 12hrs, 3hrs or similar hrs depending on the month - the first value SHOULD BE
2015-1-16 12:0:0
NOT2015-01-16 18
or2015-01-16 03
- The
time_bnds
are not set correctly usingtime_bnds=d.getTime().genGenericBounds()
from cmor.
@dnadeau4 the issue has been resolved by providing more reasonable time_bnds
to CMOR
by using the following:
time = d.getTime()
cmor.write(varid,values,time_vals=time[:],time_bnds=time.getBounds())
I would recommend however that in documentation the fact that CMOR
uses time_bnds
and ignores the provided time_axis
values is highlighted - it is certainly an unusual logical decision to this user
from cmor.
@Durack it IS documented in the manual. Did you read it 😉
[coord_vals] = 1-d array (single precision float, double precision float, or, for
labels, character strings) containing coordinate values, ordered consistently
with the data array that will be passed by the user to CMOR through
function cmor_write (see documentation below). This argument is required
except if: 1) the axis is a simple “index axis” (i.e., an axis without
coordinate values), or 2) for a time coordinate, the user intends to pass the
coordinate values when the cmor_write function is called. Note that the
coordinate values must be ordered monotonically, so, for example, in the
case of longitudes that might have the values, 0., 10., 20, ... 170., 180., 190.,
200., ... 340., 350., passing the (equivalent) values, 0., 10., 20, ... 170.,
180., -170., -160., ... -20., -10. is forbidden. In the case of time-coordinate
values, if cell bounds are also passed, then CMOR will first check that each
coordinate value is not outside its associated cell bounds; subsequently,
however, the user-defined coordinate value will be replaced by the midpoint
of the interval defined by its bounds, and it is this value that will be
written to the netCDF file. In the case of character string coord_vals there
are no cell_bounds, but for the C version of the function, the argument
cell_bounds_ndim is used to specify the length of the strings in the
coord_vals array (i.e., the array will be dimensioned
[length][cell_bounds_ndim]).
type = type of the coord_vals/bnds passed,
from cmor.
@doutriaux1 that would be a NO, my bad.. However, following your advice _where_ is the manual located?
I've found http://www-pcmdi.llnl.gov/software/cmor/cmor_users_guide.pdf and https://pcmdi.github.io/cmor-site/index.html which would seem to be out of sync - or have similar content.. Which is the most recent?
I think @dnadeau4 was planning on updating that to https://pcmdi.llnl.gov/cmor/ using the formatting provided on http://uvcdat.llnl.gov/documentation/cdms/cdms.html
from cmor.
@dnadeau4 this is no longer a problem - I do think that the docs should _VERY CLEARLY_ state that this is the case (bounds are used not the time axis)
from cmor.
Related Issues (20)
- CMOR 3.7.1 HOT 3
- making PrePARE work with arbitrary CV HOT 22
- Building CMOR 3.7.1 with gfortran 10.1 fails at loader with several errors HOT 6
- Deprecated NumPy aliases for float and int causing errors in Python
- Check consistency between frequency and table name. HOT 3
- Add project funding attribution HOT 22
- Removing testsrunner from testing suite
- CDSM2 is no longer compatible with the latest build of CMOR HOT 1
- warning on timesteps written HOT 6
- CMOR 3.7.2
- CMOR segfaults when further_info_url is specified as an empty or pure whitespace string HOT 2
- Compute HadGEM3-GC31-HH hist-1950 msftbarot from sobarstf and so HOT 2
- AWS-C dependencies of v3.7.2 HOT 7
- CMOR failure when attempting to write large volume of data HOT 4
- updates for mip-cmor-tables HOT 4
- "call to undeclared function 'calculate_leadtime_coord'" error in recent Xcode/Clang build for OSX HOT 4
- Python 3.12 build
- Renaming default branch to 'main' on October 11, 2023 HOT 1
- CMOR 3.7.3
- CMOR segfaults with mip cmor tables and CMIP6Plus CV.json HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cmor.