How to ceda_cc

Present date:

 . How to get ceda_cc from the svn archive       (jasmin-sci1, command line) 

    To access via tags use: "svn co<  tag  >"   or,  svn -r  < revision > co

    To see which are the versions and tags, visit 

 . How to run  ceda_cc  from the command line      
    1) Go to the directory where ceda-cc is installed, for exemple : cd  /home/users/dacosta/WORKDIR/SPECS/CEDA_CC;
    2) the command to run ceda-cc has the form: python ceda_cc/ -p < project > -d < directory >  --ld < log file directory >  ## check all files in directory and write log files into directory "log file directory"
       Examples using files from the SPECS project: 
       python ceda_cc/ -p SPECS -D /group_workspaces/jasmin/specs/EC-EARTH2/batch00/output/KNMI/EC-EARTH2/seaIceInit/S19191101 --ld LOG_KNMI_EC-EARTH2_seaIceInit_S19191101
       python /home/users/dacosta/WORKDIR/SPECS/CEDA_CC/trunk/ceda_cc/ -p SPECS -f /group_workspaces/jasmin/specs/EC-EARTH2/batch00/output/KNMI/EC-EARTH2/seaIceInit/S19191101/mon/atmos/tas/r1i1p1/ --ld LOG_KNMI_EC-EARTH2_seaIceInit_S19191101_mon_atmos_tas  
    3) To produce a summary of all detected issues :
       python ceda_cc/   LOG_KNMI_EC-EARTH2_seaIceInit_S19191101_mon_atmos_tas
    4) Other outpus produced by ceda-cc : "Rec.txt", "Rec.json" , logfiles
       "Rec.json" is essential for telling "drs-tool" where the files go in the archive.

    (ingest1, badc)
    1) In insgest1, ceda-cc is installed in a virtual environment
       So, we can use the same command lines as above but we need frist to activate the virtual environment:
       cd /usr/local/ingest_software/venv27; source bin/activate
       to know the version of ceda-cc that is running: yolk -l ceda-cc

 . How to run  ceda_cc   using a script     
    (jasmin-sci1)   (exemplo with : data from KNMI_EC-EARTH2_seaIceInit )  

cd /home/users/dacosta/WORKDIR/SPECS/CEDA_CC ./ batch00
The script will create a "batch00_KNMI_EC-EARTH2_seaIceInit" directory with Rec.json files and directories with the log_files. output_dir =" /group_workspaces/jasmin/specs/dacosta/CEDA_CC/${1}_${exp}" where ${1} = "batch00"; exp = "KNMI_EC-EARTH2_seaIceInit" "SUMMARY_KNMI_EC-EARTH2_seaIceInit.txt" contains the summary of the errors found.

. How to realese a new version of ceda_cc on PyPi (and ingest1)
Main steps:

Create a tarball file with all "ceda-cc" code and then upload it to PyPi and use it to install ceda-cc on ingest1.
1) Download a version (example with version 1.3):
   export SVN_PATH=   ( telling where we are putting the new version )
   svn cp $SVN_PATH/trunk $SVN_PATH/tags/1.3                   ( store  to version 1.3 )
   Check existing version numbers at: or 
2) After your modifications in "ceda-cc" code (if any) you also need to edit "" and change "version='m'"  to  "version='n'"
   If no modifications were done you do not need to modify ""
3) If you have made modifications then commit them to SVN (in order to have the same version at SVN and PyPi) : 
    "svn commit" 
   and create also a new tagged version on SVN (in order to be able to refer to this specific version by its tag name"n"):
    "svn cp $SVN_PATH $SVN_PATH/tags/'n'"
4) Eitherway, create a tarball file 'ceda-cc-"n".tar.gz' : python2.7 egg_info sdist   ( creates in /home/users/dacosta/WORKDIR/SPECS/CEDA_CC/trunk/dist the file ceda-cc-1.3.tar.gz (tar ball) )
    (this file can also be used to install ceda-cc in a virtuall environment, or elsewhere)
5)  Use the tarball to install ceda-cc on ingest1
   ( log in ingest1 as badc)
   source /usr/local/ingest_software/venv27/bin/activate       ( activate the virtual environment) 
   pip install /group_workspaces/jasmin/specs/dacosta/CEDA_CC/ceda-cc-1.3.tar.gz ( installing the new version of ceda-cc in ingest1 ) 
   Use the traball to create a new version on PyPi for users to download 
   go  to " " and upload the file   /home/users/dacosta/WORKDIR/SPECS/CEDA_CC/trunk/ceda_cc.egg-info/PKG-INFO ( this gives metadata preparing the version your are uploading. This information should be visible at:
7) manually write a ~/.pypirc file wiht the following lines:

repository =

replace A for your username and B by your password (which you have got when you have created a PyPi account at: )

Some documentation suggest that one uses "=" instead of ":" after username and password,  

. download ceda_cc from SVN
    a) ceda_cc is available here:  
    b) Copy ceda-cc to the current directory svn co 
    c) Update: cd /home/users/dacosta/WORKDIR/SPECS/CEDA_CC/trunk; svn info; svn update; svn info

Related sites:  
   more info on how to put on PyPi: 

Last modified: Mon Feb 12 14:51:59 GMT 2015