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  http://proj.badc.rl.ac.uk/svn/exarch/CCCC/tags/<  tag  >"   or,  svn -r  < revision > co  http://proj.badc.rl.ac.uk/svn/exarch/CCCC/trunk.

    To see which are the versions and tags, visit  http://proj.badc.rl.ac.uk/exarch/wiki/PackageCedaccReleases 

 . How to run  ceda_cc  from the command line      
    (jasmin-sci1)
    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/c4.py -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/c4.py -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/c4.py -p SPECS -f /group_workspaces/jasmin/specs/EC-EARTH2/batch00/output/KNMI/EC-EARTH2/seaIceInit/S19191101/mon/atmos/tas/r1i1p1/tas_Amon_EC-EARTH2_seaIceInit_S19191101_r1i1p1_192912-192912.nc --ld LOG_KNMI_EC-EARTH2_seaIceInit_S19191101_mon_atmos_tas  
    3) To produce a summary of all detected issues :
       python ceda_cc/summary.py   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 ./Ceda_cc_KNMI_EC-EARTH2_seaIceInit.sh 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.
Steps:
1) Download a version (example with version 1.3):
   export SVN_PATH=http://proj.badc.rl.ac.uk/svn/exarch/CCCC   ( 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: http://proj.badc.rl.ac.uk/exarch/browser/CCCC/tags or http://proj.badc.rl.ac.uk/svn/exarch/CCCC/tags/ 
2) After your modifications in "ceda-cc" code (if any) you also need to edit "setup.py" and change "version='m'"  to  "version='n'"
   If no modifications were done you do not need to modify "setup.py"
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 setup.py 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 ) 
6)
   Use the traball to create a new version on PyPi for users to download 
   go  to " https://pypi.python.org/pypi?%3Aaction=submit_form " 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:  https://pypi.python.org/pypi/ceda-cc/1.3)
7) manually write a ~/.pypirc file wiht the following lines:
[distutils]
index-servers=pypi

[pypi]
repository = https://pypi.python.org/pypi
username:A
password:B

replace A for your username and B by your password (which you have got when you have created a PyPi account at:
https://pypi.python.org/pypi?%3Aaction=register_form )

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

. download ceda_cc from SVN
    (jasmin-sci1)
    a) ceda_cc is available here:    http://proj.badc.rl.ac.uk/svn/exarch/CCCC/trunk/  
    b) Copy ceda-cc to the current directory svn co http://proj.badc.rl.ac.uk/svn/exarch/CCCC/trunk/ 
    c) Update: cd /home/users/dacosta/WORKDIR/SPECS/CEDA_CC/trunk; svn info; svn update; svn info


Related sites:
   http://proj.badc.rl.ac.uk/exarch/wiki/PackageFCC  
   http://team.ceda.ac.uk/trac/ceda/wiki/ExarchInterna  
   href=http://team.ceda.ac.uk/trac/ceda/wiki/TitleIndex  
   more info on how to put on PyPi:
   http://team.ceda.ac.uk/trac/ceda/wiki/DevGroup/PythonPackages/PuttingOnPyPI 




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