Skip to content

Git Migration Notes

Rick Pernak edited this page May 17, 2020 · 3 revisions

as of this writing (18-May-2020), I have not been maintaining the cross section (XS) repository particularly well, mainly because I forgot it existed. Fortunately, it does not change very often, so a merge of versions was not difficult.

The local version of the XS SVN repository is currently:

% pwd
/nas/project/rc/rc1/xs_files_local_version
% ls -ltr
total 96
drwxr-sr-x. 3 rpernak rc 22528 Mar 28  2017 xs
-rw-r--r--. 1 rpernak rc  1765 Mar 28  2017 README.release_notes
-rwxr-xr-x. 1 rpernak rc  7541 Jun 17  2019 FSCDXS

But things have changed since 2017 since we have had an LBLRTM release (v12.9). The biggest change is the addition of the BrO database, which was requested for the ABSCO project. Some smaller edits were necessary for the RFMIP project, which was mainly dealing with aliases for some of the halocarbons that were used (I believe CCl2FCH3 and CH3CClF2) -- we changed the capital Ls in Cl to lower case ones. These changes are captured in the FSCDXS file in the local version, which is why the time stamp is in 2019.

For the LBLRTM v12.9 release, we have kept the changes to aliases and added BrO to the full database:

% pwd
/nas/project/rc_static/models/aer_line_parameters/AER_line_files/aer_v_3.7/xs_files
% ls -ltr
total 96
-rw-rw-r--. 1 rpernak blue  1897 Aug 22  2019 README.release_notes
drwxrwxr-x. 2 rpernak blue 22528 Jan 29 12:30 xs
-rwxrwxr-x. 1 rpernak blue  7681 Jan 29 12:30 FSCDXS
% diff FSCDXS $LOCAL_XS/FSCDXS 
3,4d2
< BRO       26106.467034918.69201.44604939    1          N    xs/BROAT1
< BRO       25927.025034973.06801.92797165    1          N    xs/BROBT1

so before migrating from SVN to Git, we should sync the latest and local versions of the XS database:

% pwd
/nas/project/rc/rc1/xs_files_local_version
% cp /nas/project/rc_static/models/aer_line_parameters/AER_line_files/aer_v_3.7/xs_files/FSCDXS .
cp: overwrite `./FSCDXS'? y
% cp /nas/project/rc_static/models/aer_line_parameters/AER_line_files/aer_v_3.7/xs_files/README.release_notes .
cp: overwrite `./README.release_notes'? y
% rm -rf xs
% cp -r /nas/project/rc_static/models/aer_line_parameters/AER_line_files/aer_v_3.7/xs_files/xs .
% svn commit * -m 'updated to be consistent with LBLRTM v12.9 release'

There was some trickery with the xs directory, which one can see in the log:

% svn log xs/ 
------------------------------------------------------------------------
r33271 | rpernak | 2020-05-17 14:35:16 -0400 (Sun, 17 May 2020) | 1 line

re-added xs directory with updates files
------------------------------------------------------------------------

then the actual migration:

% pwd
/rd47/scratch/RC/Git_Migration
% svn co https://svn.aer.com/svn/aer/project/RD/XS_FILES/trunk/ xs
% cd xs/
% svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > authors-xs.txt
% mv authors-xs.txt ..
% cd ..
% mkdir Git_XS
% mv authors-xs.txt Git_XS/
% cd Git_XS/
% echo "(no author) = no_author <no_author@no_author>" >> authors-xs.txt 
% cat authors-xs.txt 
 =  <>
dgombos = dgombos <dgombos>
jdelamer = jdelamer <jdelamer>
kcadyper = kcadyper <kcadyper>
malvarad = malvarad <malvarad>
rpernak = rpernak <rpernak>
vpayne = vpayne <vpayne>
(no author) = no_author <no_author@no_author>
% svn2git https://svn.aer.com/svn/aer/project/RD/XS_FILES --authors authors-xs.txt --no-minimize-url
% git remote add origin [email protected]:AER-RC/cross-sections.git
% git push -u origin master
% git push --tags origin
Clone this wiki locally