.:developers:home:module: Difference between revisions

From ADPAA
Jump to navigation Jump to search
No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 8: Line 8:
# Type ADPAA -b source to update
# Type ADPAA -b source to update
# Create a directory for the script in the appropriate subdirectory/data level (Level1, Level2, Level3, Level4) in the ADPAA src directory (*/ADPAA/src/*/) (~/CoPAS/ADPAA/src/Level3/bulbtemp/bulbtemp.py)
# Create a directory for the script in the appropriate subdirectory/data level (Level1, Level2, Level3, Level4) in the ADPAA src directory (*/ADPAA/src/*/) (~/CoPAS/ADPAA/src/Level3/bulbtemp/bulbtemp.py)
# Type svn add [directory]/ where the directory in [brackets] is replaced by what you made in step 2 (from ~/CoPAS/ADPAA/src/Level3 I type svn add bulbtemp)
# Type svn add [directory] where the directory in [brackets] is replaced by what you made in step 2 (from ~/CoPAS/ADPAA/src/Level3 I type svn add bulbtemp)
# Type svn commit [directory]/ where the directory in [brackets] is replaced by what you made in step 2 (from ~/CoPAS/ADPAA/src/Level3 I type svn commit bulbtemp)
# Type svn commit [directory] where the directory in [brackets] is replaced by what you made in step 2 (from ~/CoPAS/ADPAA/src/Level3 I type svn commit bulbtemp)
# Edit the ADPAA Makefile from */src/build and add install line for appropriate data level; commit the Makefile (from /CoPAS/ADPAA/src/build/ I type svn commit Makefile)
# Edit the ADPAA Makefile from */src/build and add install line for appropriate data level; commit the Makefile (from /CoPAS/ADPAA/src/build/ I type svn commit Makefile)
# Type ADPAA -b source to update again
# Type ADPAA -b source to update again
Line 15: Line 15:
====Detailed Steps====
====Detailed Steps====


It is recommended that you update ADPAA both before and after adding a module. If you do not update ADPAA before, you may encounter errors when trying to add your module.
''Examples below are shown for adding the "bulbtemp.py" module.''
 
'''It is recommended that you update ADPAA both before and after adding a module'''. If you do not update ADPAA before, you may encounter errors when trying to add your module.


   adpaa -b source
   adpaa -b source


First, create a new sub-directory for the new module in the appropriate ADPAA directory. See Delene (2011) for information on ADPAA data levels: [http://aerosol.atmos.und.edu/Delene_ADPAA.pdf].
'''First''', create a new sub-directory for the new module in the appropriate ADPAA directory. See Delene (2011) for information on ADPAA data levels: [http://aerosol.atmos.und.edu/Delene_ADPAA.pdf].


   cp module_file_path 
   mkdir new_adpaa_directory
    
    
   ''Example:''
   ''Example:''
   mkdir ~/CoPAS/ADPAA/src/Level3/bulbtemp/
   mkdir ~/CoPAS/ADPAA/src/Level3/bulbtemp/
  ''(where "bulbtemp/" is the new directory)''


Second, copy the new module to the newly created directory.
'''Second''', copy the new module to the newly created directory.


   cp module_file_path new_adpaa_directory
   cp module_file_path new_adpaa_directory
 
  ''Example:''
  cp ~/scripts/bulbtemp.py ~/CoPAS/ADPAA/src/Level3/bulbtemp/bulbtemp.py


'''Third''', add and commit the new module.
 
  Be in the directory (within */ADPAA/src) where the newly created sub-directory is located.
 
  svn add new_adpaa_directory
  svn commit new_adpaa_directory
 
  ''Note: committing requires you to entire your password. In the text editor that pops up, enter comments about what is being added/changed, then write and exit (with wq! for example)''
 
   ''Example:''
   ''Example:''
   cp ~/scripts/bulbtemp.py ~/CoPAS/ADPAA/src/Level3/bulbtemp/bulbtemp.py
   svn add bulbtemp
  svn commit bulbtemp
  ''Comment: "Added the new bulbtemp.py module".''
 
'''Fourth''', edit the Makefile, then commit it.
 
  The Makefile is located in */ADPAA/src/build/Makefile
  (Example: ~/CoPAS/ADPAA/src/build/Makefile)
 
  From the build directory (*/ADPAA/src/build), you can edit the Makefile.
  In the Makefile, add a new line that will copy the new module to the ADPAA/bin/ directory. Make sure this is in the appropriate data level section. You can use the format that all of the other modules use.
 
  ''Example:''
  install $(INSTOPT) $(BASEDIR)/Level3/bulbtemp/bulbtemp.py $(PREFIX)/bin/bulbtemp.py
 
  To commit:
  svn commit Makefile
 
It is recommended that you update ADPAA again (adpaa -b source) and verify your new module was successfully added.

Latest revision as of 20:25, 26 April 2022

Adding A New Module to ADPAA

Quick Reference

The short list for adding a module to ADPAA:

  1. Write a program that outputs data in ADPAA format (bulbtemp.py)
  2. Type ADPAA -b source to update
  3. Create a directory for the script in the appropriate subdirectory/data level (Level1, Level2, Level3, Level4) in the ADPAA src directory (*/ADPAA/src/*/) (~/CoPAS/ADPAA/src/Level3/bulbtemp/bulbtemp.py)
  4. Type svn add [directory] where the directory in [brackets] is replaced by what you made in step 2 (from ~/CoPAS/ADPAA/src/Level3 I type svn add bulbtemp)
  5. Type svn commit [directory] where the directory in [brackets] is replaced by what you made in step 2 (from ~/CoPAS/ADPAA/src/Level3 I type svn commit bulbtemp)
  6. Edit the ADPAA Makefile from */src/build and add install line for appropriate data level; commit the Makefile (from /CoPAS/ADPAA/src/build/ I type svn commit Makefile)
  7. Type ADPAA -b source to update again

Detailed Steps

Examples below are shown for adding the "bulbtemp.py" module.

It is recommended that you update ADPAA both before and after adding a module. If you do not update ADPAA before, you may encounter errors when trying to add your module.

 adpaa -b source

First, create a new sub-directory for the new module in the appropriate ADPAA directory. See Delene (2011) for information on ADPAA data levels: [1].

 mkdir new_adpaa_directory
 
 Example:
 mkdir ~/CoPAS/ADPAA/src/Level3/bulbtemp/
 (where "bulbtemp/" is the new directory)

Second, copy the new module to the newly created directory.

 cp module_file_path new_adpaa_directory
 
 Example:
 cp ~/scripts/bulbtemp.py ~/CoPAS/ADPAA/src/Level3/bulbtemp/bulbtemp.py

Third, add and commit the new module.

 Be in the directory (within */ADPAA/src) where the newly created sub-directory is located.
 
 svn add new_adpaa_directory
 svn commit new_adpaa_directory
 
 Note: committing requires you to entire your password. In the text editor that pops up, enter comments about what is being added/changed, then write and exit (with wq! for example)
 
 Example:
 svn add bulbtemp
 svn commit bulbtemp
 Comment: "Added the new bulbtemp.py module".

Fourth, edit the Makefile, then commit it.

 The Makefile is located in */ADPAA/src/build/Makefile
 (Example: ~/CoPAS/ADPAA/src/build/Makefile)
 
 From the build directory (*/ADPAA/src/build), you can edit the Makefile.
 In the Makefile, add a new line that will copy the new module to the ADPAA/bin/ directory. Make sure this is in the appropriate data level section. You can use the format that all of the other modules use.
  
 Example:
 install $(INSTOPT) $(BASEDIR)/Level3/bulbtemp/bulbtemp.py $(PREFIX)/bin/bulbtemp.py
 
 To commit:
 svn commit Makefile

It is recommended that you update ADPAA again (adpaa -b source) and verify your new module was successfully added.