@@ -143,6 +143,22 @@ ncks --overwrite --no-alphabetize -x -v silt \
143
143
echo " Append silt variable to output file"
144
144
ncks -A -v silt silt.nc ${output_file}
145
145
146
+ echo " Set silt units attribute"
147
+ att_nm=' units'
148
+ var_nm=' silt'
149
+ mode=' o'
150
+ att_type=' c'
151
+ att_val=' 1'
152
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
153
+
154
+ echo " Set silt long_name attribute"
155
+ att_nm=' long_name'
156
+ var_nm=' silt'
157
+ mode=' o'
158
+ att_type=' c'
159
+ att_val=' UM soil texture - silt fraction'
160
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
161
+
146
162
clay_file=${BIOS_PARAM_DIR} /clayfrac1.nc
147
163
echo " clay_file: ${clay_file} "
148
164
@@ -166,6 +182,22 @@ ncks --overwrite --no-alphabetize -x -v clay \
166
182
echo " Append clay variable to output file"
167
183
ncks -A -v clay clay.nc ${output_file}
168
184
185
+ echo " Set clay units attribute"
186
+ att_nm=' units'
187
+ var_nm=' clay'
188
+ mode=' o'
189
+ att_type=' c'
190
+ att_val=' 1'
191
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
192
+
193
+ echo " Set clay long_name attribute"
194
+ att_nm=' long_name'
195
+ var_nm=' clay'
196
+ mode=' o'
197
+ att_type=' c'
198
+ att_val=' UM soil texture - clay fraction'
199
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
200
+
169
201
echo " Create sand file"
170
202
ncks --overwrite --no-alphabetize silt.nc sand.nc
171
203
ncks -A -v clay clay.nc sand.nc
@@ -181,6 +213,22 @@ ncks --overwrite --no-alphabetize -x -v sand \
181
213
echo " Append sand variable to output file"
182
214
ncks -A -v sand sand.nc ${output_file}
183
215
216
+ echo " Set sand units attribute"
217
+ att_nm=' units'
218
+ var_nm=' sand'
219
+ mode=' o'
220
+ att_type=' c'
221
+ att_val=' 1'
222
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
223
+
224
+ echo " Set sand long_name attribute"
225
+ att_nm=' long_name'
226
+ var_nm=' sand'
227
+ mode=' o'
228
+ att_type=' c'
229
+ att_val=' UM soil texture - sand fraction'
230
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
231
+
184
232
css_file=${BIOS_PARAM_DIR} /csoil1.nc
185
233
echo " css_file: ${css_file} "
186
234
@@ -204,6 +252,22 @@ ncks --overwrite --no-alphabetize -x -v css \
204
252
echo " Append css variable to output file"
205
253
ncks -A -v css css.nc ${output_file}
206
254
255
+ echo " Set css units attribute"
256
+ att_nm=' units'
257
+ var_nm=' css'
258
+ mode=' o'
259
+ att_type=' c'
260
+ att_val=' J/kg/K'
261
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
262
+
263
+ echo " Set css long_name attribute"
264
+ att_nm=' long_name'
265
+ var_nm=' css'
266
+ mode=' o'
267
+ att_type=' c'
268
+ att_val=' Soil specific heat capacity'
269
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
270
+
207
271
sfc_file=${BIOS_PARAM_DIR} /wvol1fc_m3m3.nc
208
272
echo " sfc_file: ${sfc_file} "
209
273
@@ -227,6 +291,22 @@ ncks --overwrite --no-alphabetize -x -v sfc \
227
291
echo " Append sfc variable to output file"
228
292
ncks -A -v sfc sfc.nc ${output_file}
229
293
294
+ echo " Set sfc units attribute"
295
+ att_nm=' units'
296
+ var_nm=' sfc'
297
+ mode=' o'
298
+ att_type=' c'
299
+ att_val=' m3 m-3'
300
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
301
+
302
+ echo " Set sfc long_name attribute"
303
+ att_nm=' long_name'
304
+ var_nm=' sfc'
305
+ mode=' o'
306
+ att_type=' c'
307
+ att_val=' VOL SMC AT CRIT PT'
308
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
309
+
230
310
rhosoil_file=${BIOS_PARAM_DIR} /bulkdens1_kgm3.nc
231
311
echo " rhosoil_file: ${rhosoil_file} "
232
312
@@ -250,6 +330,22 @@ ncks --overwrite --no-alphabetize -x -v rhosoil \
250
330
echo " Append rhosoil variable to output file"
251
331
ncks -A -v rhosoil rhosoil.nc ${output_file}
252
332
333
+ echo " Set rhosoil units attribute"
334
+ att_nm=' units'
335
+ var_nm=' rhosoil'
336
+ mode=' o'
337
+ att_type=' c'
338
+ att_val=' kg/m^3'
339
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
340
+
341
+ echo " Set rhosoil long_name attribute"
342
+ att_nm=' long_name'
343
+ var_nm=' rhosoil'
344
+ mode=' o'
345
+ att_type=' c'
346
+ att_val=' SOIL BULK DENSITY'
347
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
348
+
253
349
bch_file=${BIOS_PARAM_DIR} /b1.nc
254
350
echo " bch_file: ${bch_file} "
255
351
@@ -278,6 +374,22 @@ ncks --overwrite --no-alphabetize -x -v bch \
278
374
echo " Append bch variable to output file"
279
375
ncks -A -v bch bch.nc ${output_file}
280
376
377
+ echo " Set bch units attribute"
378
+ att_nm=' units'
379
+ var_nm=' bch'
380
+ mode=' o'
381
+ att_type=' c'
382
+ att_val=' 1'
383
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
384
+
385
+ echo " Set bch long_name attribute"
386
+ att_nm=' long_name'
387
+ var_nm=' bch'
388
+ mode=' o'
389
+ att_type=' c'
390
+ att_val=' CLAPP-HORNBERGER B COEFFICIENT'
391
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
392
+
281
393
hyds_file=${BIOS_PARAM_DIR} /hyk1sat_ms.nc
282
394
echo " hyds_file: ${hyds_file} "
283
395
@@ -306,6 +418,22 @@ ncks --overwrite --no-alphabetize -x -v hyds \
306
418
echo " Append hyds variable to output file"
307
419
ncks -A -v hyds hyds.nc ${output_file}
308
420
421
+ echo " Set hyds units attribute"
422
+ att_nm=' units'
423
+ var_nm=' hyds'
424
+ mode=' o'
425
+ att_type=' c'
426
+ att_val=' m/s'
427
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
428
+
429
+ echo " Set hyds long_name attribute"
430
+ att_nm=' long_name'
431
+ var_nm=' hyds'
432
+ mode=' o'
433
+ att_type=' c'
434
+ att_val=' SAT SOIL CONDUCTIVITY'
435
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
436
+
309
437
ssat_file=${BIOS_PARAM_DIR} /wvol1sat_m3m3.nc
310
438
echo " ssat_file: ${ssat_file} "
311
439
@@ -334,6 +462,22 @@ ncks --overwrite --no-alphabetize -x -v ssat \
334
462
echo " Append ssat variable to output file"
335
463
ncks -A -v ssat ssat.nc ${output_file}
336
464
465
+ echo " Set ssat units attribute"
466
+ att_nm=' units'
467
+ var_nm=' ssat'
468
+ mode=' o'
469
+ att_type=' c'
470
+ att_val=' 1'
471
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
472
+
473
+ echo " Set ssat long_name attribute"
474
+ att_nm=' long_name'
475
+ var_nm=' ssat'
476
+ mode=' o'
477
+ att_type=' c'
478
+ att_val=' VOL SMC AT SATURATION'
479
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
480
+
337
481
swilt_file=${BIOS_PARAM_DIR} /wvol1w_m3m3.nc
338
482
echo " swilt_file: ${swilt_file} "
339
483
@@ -362,6 +506,22 @@ ncks --overwrite --no-alphabetize -x -v swilt \
362
506
echo " Append swilt variable to output file"
363
507
ncks -A -v swilt swilt.nc ${output_file}
364
508
509
+ echo " Set swilt units attribute"
510
+ att_nm=' units'
511
+ var_nm=' swilt'
512
+ mode=' o'
513
+ att_type=' c'
514
+ att_val=' 1'
515
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
516
+
517
+ echo " Set swilt long_name attribute"
518
+ att_nm=' long_name'
519
+ var_nm=' swilt'
520
+ mode=' o'
521
+ att_type=' c'
522
+ att_val=' VOL SMC AT WILTING'
523
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
524
+
365
525
sucs_file=${BIOS_PARAM_DIR} /psie1_m.nc
366
526
echo " sucs_file: ${sucs_file} "
367
527
@@ -395,6 +555,22 @@ ncks --overwrite --no-alphabetize -x -v sucs \
395
555
echo " Append sucs variable to output file"
396
556
ncks -A -v sucs sucs.nc ${output_file}
397
557
558
+ echo " Set sucs units attribute"
559
+ att_nm=' units'
560
+ var_nm=' sucs'
561
+ mode=' o'
562
+ att_type=' c'
563
+ att_val=' m'
564
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
565
+
566
+ echo " Set sucs long_name attribute"
567
+ att_nm=' long_name'
568
+ var_nm=' sucs'
569
+ mode=' o'
570
+ att_type=' c'
571
+ att_val=' SATURATED SOIL WATER SUCTION'
572
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
573
+
398
574
mvg_file=${BIOS_PARAM_DIR} /nvis5pre1750grp.nc
399
575
echo " mvg_file: ${mvg_file} "
400
576
@@ -421,6 +597,14 @@ ncks --overwrite --no-alphabetize -x -v mvg \
421
597
echo " Append mvg variable to output file"
422
598
ncks -A -v mvg mvg.nc ${output_file}
423
599
600
+ echo " Set mvg long_name attribute"
601
+ att_nm=' long_name'
602
+ var_nm=' mvg'
603
+ mode=' o'
604
+ att_type=' c'
605
+ att_val=' NVIS major vegetation group (v5.0)'
606
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
607
+
424
608
c4frac_file=${BIOS_PARAM_DIR} /c4_grass_frac_cov.nc
425
609
echo " c4frac_file: ${c4frac_file} "
426
610
@@ -444,6 +628,22 @@ ncks --overwrite --no-alphabetize -x -v c4frac \
444
628
echo " Append c4frac variable to output file"
445
629
ncks -A -v c4frac c4frac.nc ${output_file}
446
630
631
+ echo " Set c4frac units attribute"
632
+ att_nm=' units'
633
+ var_nm=' c4frac'
634
+ mode=' o'
635
+ att_type=' c'
636
+ att_val=' 1'
637
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
638
+
639
+ echo " Set c4frac long_name attribute"
640
+ att_nm=' long_name'
641
+ var_nm=' c4frac'
642
+ mode=' o'
643
+ att_type=' c'
644
+ att_val=' Fractional cover of C4 grass'
645
+ ncatted -h -a " ${att_nm} " ," ${var_nm} " ," ${mode} " ," ${att_type} " ," ${att_val} " ${output_file}
646
+
447
647
bios_soil_vars_regex=' ^clay$|^sand$|^ssat$|^bch$|^css$|^hyds$|^sfc$|^sucs$|^rhosoil$|^silt$|^swilt$'
448
648
449
649
echo " Add provenance information to BIOS soil parameters"
0 commit comments