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

Feedback from the CMIP6 example #69

Closed
ehogan opened this issue Jun 16, 2016 · 9 comments
Closed

Feedback from the CMIP6 example #69

ehogan opened this issue Jun 16, 2016 · 9 comments
Milestone

Comments

@ehogan
Copy link
Contributor

ehogan commented Jun 16, 2016

I ran through the CMIP6 example and I have some feedback:

  1. Would it be possible to include something like the following in a comment in the example?
# If this example is not executed from the directory containing the
# CMOR code, please first complete the following steps:
#
#   1. In any directory, create 'Tables/', 'Test/' and 'CMIP6/' directories.
#   2. Download
#      https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_Omon.json
#      and https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_CV.json
#      to the 'Tables/' directory.
#   3. Download
#      https://github.com/PCMDI/cmor/blob/master/Test/test_python_CMIP6_experimentID.json
#      to the 'Test/' directory.
  1. When loading the MIP table, should the line read table_id = cmor.load_table("CMIP6_Omon.json") (I was shown a return value when I ran the command in the example)?

  2. I had no problems until the cmor.write step:

In [8]: for i in range(0,5):
   ...:     cmor.write(ivar,data[i:i])
   ...:     

C Traceback:
In function: cmor_CV_setInstitution
! called from: cmor_setGblAttr
! 

!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Warning: Your input attribute institution "GICC (Generic International Climate Center, Geneva, Switzerland)" will be replaced with 
! "GCESS,BNU,Beijing,China" as defined in your Control Vocabulary file.
! 
!
!!!!!!!!!!!!!!!!!!!!!!!!!


C Traceback:
In function: cmor_CV_checkSourceID
! called from: cmor_setGblAttr
! 

!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Warning: Your input attribute "source" with value 
! "MIROC-ESM" will be replaced with value 
! "MIROC-ESM:".
! 
! 
!  See Control Vocabulary JSON file.(Tables/CMIP6_CV.json)
! 
!
!!!!!!!!!!!!!!!!!!!!!!!!!


C Traceback:
! In function: cmor_CV_checkGblAttributes
! 

!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Error: Your Control Vocabulary file specifies one or more
! required attributes.  CMOR found that the following
! attribute was not properly set.
! 
! Please set attribute: "branch_method" in your input JSON file.
!
!!!!!!!!!!!!!!!!!!!!!!!!!


C Traceback:
! In function: cmor_CV_checkGblAttributes
! 

!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Error: Your Control Vocabulary file specifies one or more
! required attributes.  CMOR found that the following
! attribute was not properly set.
! 
! Please set attribute: "source_type" in your input JSON file.
!
!!!!!!!!!!!!!!!!!!!!!!!!!


C Traceback:
! In function: cmor_CV_checkGblAttributes
! 

!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Error: Your Control Vocabulary file specifies one or more
! required attributes.  CMOR found that the following
! attribute was not properly set.
! 
! Please set attribute: "sub_experiment" in your input JSON file.
!
!!!!!!!!!!!!!!!!!!!!!!!!!


C Traceback:
! In function: cmor_CV_checkGblAttributes
! 

!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Error: Please fix required attributes mentioned in
! the warnings above and rerun. (aborting!)
! 
!
!!!!!!!!!!!!!!!!!!!!!!!!!

---------------------------------------------------------------------------
KeyboardInterrupt                         Traceback (most recent call last)
<ipython-input-8-4723ba247acc> in <module>()
      1 for i in range(0,5):
----> 2     cmor.write(ivar,data[i:i])
      3 

/home/h01/ehogan/software/cmor/lib/python2.7/site-packages/cmor/pywrapper.pyc in write(var_id, data, ntimes_passed, file_suffix, time_vals, time_bnds, store_with)
    694         raise Exception, "Error data type must one of: 'f','d','i','l', please convert first"
    695 
--> 696     return _cmor.write(var_id,data,type,ntimes_passed,time_vals,time_bnds,store_with)
    697 
    698 def _check_time_bounds_contiguous(time_bnds):

KeyboardInterrupt: 

In [9]: 

The first two traceback messages, i.e.,

C Traceback:
In function: cmor_CV_setInstitution
! called from: cmor_setGblAttr

and

C Traceback:
In function: cmor_CV_checkSourceID
! called from: cmor_setGblAttr

were printed without the off-white background, so I couldn’t read the dark blue text against the black background of my terminal window.

Just a comment, but when I open the log file with emacs, the background colour causes characters like ^[[2;31;47mC Traceback: to be visible.

@dnadeau4 dnadeau4 added this to the 3.1.0 milestone Jun 17, 2016
@dnadeau4
Copy link
Collaborator

I will get to them next week. Good suggestions. I hate the color theme as well.... Don't know if I have time to get to them though....

@ehogan
Copy link
Contributor Author

ehogan commented Jun 20, 2016

Another quick comment; in https://github.com/PCMDI/cmor/blob/master/Test/test_python_CMIP6_experimentID.json#L49, the institution_id is PCMDI, yet there is no entry for PCMDI in the institution_ids in https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_CV.json#L120 and CMOR picks BNU for some reason. In fact, even if I use 'MOHC' as the institution_id and the correct string for institution, it still says Your input attribute institution "Met Office Hadley Centre, Fitzroy Road, Exeter, Devon, EX1 3PB, UK." will be replaced with "GCESS,BNU,Beijing,China" as defined in your Control Vocabulary file.

@dnadeau4
Copy link
Collaborator

Emma,

This test is to make sure that if you have a bad institution, it will be
replace by the right one. In
https://github.com/PCMDI/cmor/blob/master/Test/test_python_CMIP6_experimentID.json#L49
I have 2 institution_id, the second one "BNU" overwrite the first one.
Sorry about that.

Denis
On 6/20/16 4:40 AM, Emma Hogan wrote:

Another quick comment; in
https://github.com/PCMDI/cmor/blob/master/Test/test_python_CMIP6_experimentID.json#L49,
the |institution_id| is |PCMDI|, yet there is no entry for |PCMDI| in
the |institution_ids| in
https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_CV.json#L120
and CMOR picks |BNU| for some reason. In fact, even if I use 'MOHC' as
the |institution_id| and the correct string for |institution|, it
still says |Your input attribute institution "Met Office Hadley
Centre, Fitzroy Road, Exeter, Devon, EX1 3PB, UK." will be replaced
with "GCESS,BNU,Beijing,China" as defined in your Control Vocabulary
file.|


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#69 (comment), or
mute the thread
https://github.com/notifications/unsubscribe/AGnMgmY9YMIjcA5AzXVP7CugyGI8rc7Yks5qNnxEgaJpZM4I3aOh.

@dnadeau4
Copy link
Collaborator

Actually, this test is to make sure that user institutionID is in the CV file. If not you get a critical error with an explanation to the. I need to replace the "???" as contact though. 👍

@dnadeau4
Copy link
Collaborator

I replaced the "???" character and checked in cmor-master.

@ehogan
Copy link
Contributor Author

ehogan commented Jun 21, 2016

Thank you! Would it be possible to reopen this ticket? The items in my first comment haven't yet been dealt with :)

@dnadeau4 dnadeau4 reopened this Jun 21, 2016
@dnadeau4
Copy link
Collaborator

Right now, I really really need to work on the CMIP6 Validator for ESGF. Many people are waiting for it. If you would be so inclined to create a pull request for me, I will merge it. Thanks!

@durack1 durack1 modified the milestones: 3.1.1, 3.1.0 Jul 6, 2016
@dnadeau4 dnadeau4 modified the milestones: 3.1.2, 3.1.1 Jul 7, 2016
@ehogan
Copy link
Contributor Author

ehogan commented Aug 10, 2016

I just tried running the CMIP6 example using CMOR 3.1.1 and it completes without errors :)

Thank you for adding the comments to the CMIP6 example!

I think the only outstanding item is:

  1. When loading the MIP table, should the line read table_id = cmor.load_table("CMIP6_Omon.json") (I was shown a return value when I ran the command in the example)?

I'm happy to submit a pull request if you think it is worthwhile, otherwise this issue can be closed.

Thank you! :)

@dnadeau4
Copy link
Collaborator

dnadeau4 commented Sep 7, 2016

@ehogan I think this ticket can be closed, we should open a new one with anything pending. It seems that I deleted the "printf" debugging return value from cmor.load_table.

@dnadeau4 dnadeau4 closed this as completed Sep 7, 2016
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

3 participants