Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uvcmetrics fails with cdscan error #2147

Open
mcenerney1 opened this issue Dec 8, 2016 · 8 comments
Open

uvcmetrics fails with cdscan error #2147

mcenerney1 opened this issue Dec 8, 2016 · 8 comments

Comments

@mcenerney1
Copy link
Contributor

Running the following diags with uvcdat 2.8 gets a cdscan error.

diags --package AMWG --set 8 --var T --seasons ANN --no-antialiasing --model path=/Users/mcenerney1/uvcmetrics/test/data/cam_output,climos=no --obs path=/Users/mcenerney1/uvcmetrics/test/data/obs,filter="f_contains('NCEP')",climos=yes --outputdir /Users/mcenerney1/diagout

UV-CDAT Diagnostics, command-line version
/Users/mcenerney1/anaconda/envs/2.8/bin/diags --package AMWG --set 8 --var T --seasons ANN --no-antialiasing --model path=/Users/mcenerney1/uvcmetrics/test/data/cam_output,climos=no --obs path=/Users/mcenerney1/uvcmetrics/test/data/obs,filter=f_contains('NCEP'),climos=yes --outputdir /Users/mcenerney1/diagout
ERROR: ERROR: cdscan terminated. This is usually fatal. The arguments were:['cdscan', '-q', '-x', '/tmp/mcenerney1/uvcmetrics/NCEP_csafcc95446a2cb4d2d592c51969023f4d.xml', '-e', 'time.units=months since 1979-01-01 00:00:00', '/Users/mcenerney1/uvcmetrics/test/data/obs/NCEP_01_climo.nc', '/Users/mcenerney1/uvcmetrics/test/data/obs/NCEP_02_climo.nc', '/Users/mcenerney1/uvcmetrics/test/data/obs/NCEP_03_climo.nc', '/Users/mcenerney1/uvcmetrics/test/data/obs/NCEP_04_climo.nc', '/Users/mcenerney1/uvcmetrics/test/data/obs/NCEP_05_climo.nc', '/Users/mcenerney1/uvcmetrics/test/data/obs/NCEP_06_climo.nc', '/Users/mcenerney1/uvcmetrics/test/data/obs/NCEP_07_climo.nc', '/Users/mcenerney1/uvcmetrics/test/data/obs/NCEP_08_climo.nc', '/Users/mcenerney1/uvcmetrics/test/data/obs/NCEP_09_climo.nc', '/Users/mcenerney1/uvcmetrics/test/data/obs/NCEP_10_climo.nc', '/Users/mcenerney1/uvcmetrics/test/data/obs/NCEP_11_climo.nc', '/Users/mcenerney1/uvcmetrics/test/data/obs/NCEP_12_climo.nc']

@painter1
Copy link
Contributor

painter1 commented Dec 8, 2016

I reproduced the problem with
cdscan ~/tmp/diagout/set8_ANN_T.xml -e time.units=months since 1979-01-01 00:00:00 ~/metrics_data/obs_data_20140804/NCEP_??_climo.nc
But the problem isn't in cdscan. It's in dataset.py or associated files such as CDMLParser.py

The error occurs where cdscan tries to open the output file in read-only mode. I don't know why it does that, but it's a legitimate operation. In openDataset() (dataset.py), this boils down to the simple line
dataset=load(path)
Load() successfully opens the file. It creates and a CDMLParser object and returns its root attribute. Thus that root attribute becomes the variable 'dataset' in openDataset(). Later on in openDataset(), something is done with 'dataset'. The problem is that load() had never done anything to set the root attribute of its CDMLParser object, hence 'dataset' is None, which causes a failure when it is used.

@painter1
Copy link
Contributor

painter1 commented Dec 8, 2016

Forget about that last message. I had left out the '-x' which cdscan needs. I'm concerned about the problem with opening an xml file, but that isn't the real cause of this issue.

@mcenerney1
Copy link
Contributor Author

Note the diags command line calls cdscan as indicated and is the one invoked by running ctest as in
ctest diags_test_08

@mcenerney1
Copy link
Contributor Author

Do you have an example of diags set 8 or 15 running with 2.8?

@painter1
Copy link
Contributor

painter1 commented Dec 8, 2016 via email

@painter1
Copy link
Contributor

painter1 commented Dec 8, 2016 via email

@mcenerney1
Copy link
Contributor Author

The obs data, obs_data_5.6 doesn't have T. Did this run for you?

I haven't had issues with install under 2.8. I almost always use
rm -rf build; python setup.py install

@painter1
Copy link
Contributor

painter1 commented Dec 8, 2016

My NCEP obs data has T. I wonder whether you're using a cut-down obs set made for automated tests.

Anyway, cdscan shouldn't crash whether T is in there or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants