Skip to content

Commit 58ad8cd

Browse files
committed
set/update unique tracking_id when creating derived files
1 parent c8adc98 commit 58ad8cd

12 files changed

+41
-2
lines changed

aggregate.ncl

+3
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,9 @@ hstring = hstring+" method="+method
456456
hstring = hstring+" outtime="+outtime
457457
fout@history = hstring+inttochar(10)+fout@history
458458

459+
;; update unique tracking_id
460+
fout@tracking_id = systemfunc("uuidgen")
461+
459462

460463
;; provenance checking - to be sure that your data is coming from where you think it should.
461464

calc_dir.ncl

+3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ history = "Created " + systemfunc("date") + " by "+systemfunc("whoami")+"@"+syst
3232

3333
fout@history = history
3434

35+
;; update unique tracking_id
36+
fout@tracking_id = systemfunc("uuidgen")
37+
3538

3639
; copy variables
3740

calc_evps.ncl

+4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ history = "Created " + systemfunc("date") + " by "+systemfunc("whoami")+"@"+syst
3030

3131
fout@history = history
3232

33+
;; update unique tracking_id
34+
fout@tracking_id = systemfunc("uuidgen")
35+
36+
3337
; copy variables
3438

3539
var_names = getfilevarnames (finh) ;

calc_hidx.ncl

+4
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ history = history + " using NCL script calc_hidx.ncl from parent files listed ab
5959

6060
fout@history = history
6161

62+
;; update unique tracking_id
63+
fout@tracking_id = systemfunc("uuidgen")
64+
65+
6266
; copy variables
6367

6468
var_names = getfilevarnames (fint) ;

calc_humid.ncl

+3
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ history = history + " using NCL script calc_humid.ncl from parent files listed a
6363
fouth@history = history
6464
foutd@history = history
6565

66+
;; update unique tracking_ids
67+
fouth@tracking_id = systemfunc("uuidgen")
68+
foutd@tracking_id = systemfunc("uuidgen")
6669

6770

6871
; copy variables

calc_pet.ncl

+3
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ history = "Created " + systemfunc("date") + " by "+systemfunc("whoami")+"@"+syst
107107

108108
fout@history = history
109109

110+
;; update unique tracking_id
111+
fout@tracking_id = systemfunc("uuidgen")
112+
110113

111114
; copy variables
112115

calc_spd.ncl

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ history = "Created " + systemfunc("date") + " by "+systemfunc("whoami")+"@"+syst
3333

3434
fout@history = history
3535

36+
;; update unique tracking_id
37+
fout@tracking_id = systemfunc("uuidgen")
38+
3639

3740
; copy variables
3841

coarsen.ncl

+3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ end do
3737

3838
fout@history = systemfunc("date")+": ncl datafile="+datafile+" gridfile="+gridfile+" outfile="+outfile+" coarsen.ncl"+inttochar(10)+fout@history
3939

40+
;; update unique tracking_id
41+
fout@tracking_id = systemfunc("uuidgen")
42+
4043

4144
; copy variables
4245

lonflip.ncl

+4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ end do
3131

3232
;; No need to add history entry - varname@lonFlip attribute records operation
3333

34+
;; But the data does (potentially) get rearranged, so:
35+
;; update unique tracking_id
36+
fout@tracking_id = systemfunc("uuidgen")
37+
3438
; copy variables
3539

3640
var_names = getfilevarnames (fin) ;

patch-regrid.ncl

+5
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,10 @@ hstring = systemfunc("date")
4747
hstring = hstring + ": ncl patch-regrid.ncl infile="+infile+" wgtfile="+wgtfile+" outfile="+outfile+" varname="+varname
4848
fout@history = hstring+inttochar(10)+fout@history
4949

50+
51+
;; update unique tracking_id
52+
fout@tracking_id = systemfunc("uuidgen")
53+
54+
5055
;; Copyright 2013 Univ. Corp. for Atmos. Research
5156
;; Author: Seth McGinnis, [email protected]

pr2prec

+3-1
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,7 @@ ncap2 -O -s "$v=$v"'*(60*60*24)' \
5656

5757
ncrename -v $v,prec $outfile
5858

59-
# Copyright 2010-2012 Univ. Corp. for Atmos. Research
59+
ncatted -h -a tracking_id,global,o,c,`uuidgen` $outfile
60+
61+
# Copyright 2010-2018 Univ. Corp. for Atmos. Research
6062
# Author: Seth McGinnis, [email protected]

tas2temp

+3-1
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,7 @@ else
5555
ncrename -v $v,temp $outfile
5656
endif
5757

58-
# Copyright 2010-2012 Univ. Corp. for Atmos. Research
58+
ncatted -h -a tracking_id,global,o,c,`uuidgen` $outfile
59+
60+
# Copyright 2010-2018 Univ. Corp. for Atmos. Research
5961
# Author: Seth McGinnis, [email protected]

0 commit comments

Comments
 (0)