@@ -143,6 +143,22 @@ ncks --overwrite --no-alphabetize -x -v silt \
143143echo " Append silt variable to output file"
144144ncks -A -v silt silt.nc ${output_file}
145145
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+
146162clay_file=${BIOS_PARAM_DIR} /clayfrac1.nc
147163echo " clay_file: ${clay_file} "
148164
@@ -166,6 +182,22 @@ ncks --overwrite --no-alphabetize -x -v clay \
166182echo " Append clay variable to output file"
167183ncks -A -v clay clay.nc ${output_file}
168184
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+
169201echo " Create sand file"
170202ncks --overwrite --no-alphabetize silt.nc sand.nc
171203ncks -A -v clay clay.nc sand.nc
@@ -181,6 +213,22 @@ ncks --overwrite --no-alphabetize -x -v sand \
181213echo " Append sand variable to output file"
182214ncks -A -v sand sand.nc ${output_file}
183215
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+
184232css_file=${BIOS_PARAM_DIR} /csoil1.nc
185233echo " css_file: ${css_file} "
186234
@@ -204,6 +252,22 @@ ncks --overwrite --no-alphabetize -x -v css \
204252echo " Append css variable to output file"
205253ncks -A -v css css.nc ${output_file}
206254
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+
207271sfc_file=${BIOS_PARAM_DIR} /wvol1fc_m3m3.nc
208272echo " sfc_file: ${sfc_file} "
209273
@@ -227,6 +291,22 @@ ncks --overwrite --no-alphabetize -x -v sfc \
227291echo " Append sfc variable to output file"
228292ncks -A -v sfc sfc.nc ${output_file}
229293
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+
230310rhosoil_file=${BIOS_PARAM_DIR} /bulkdens1_kgm3.nc
231311echo " rhosoil_file: ${rhosoil_file} "
232312
@@ -250,6 +330,22 @@ ncks --overwrite --no-alphabetize -x -v rhosoil \
250330echo " Append rhosoil variable to output file"
251331ncks -A -v rhosoil rhosoil.nc ${output_file}
252332
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+
253349bch_file=${BIOS_PARAM_DIR} /b1.nc
254350echo " bch_file: ${bch_file} "
255351
@@ -278,6 +374,22 @@ ncks --overwrite --no-alphabetize -x -v bch \
278374echo " Append bch variable to output file"
279375ncks -A -v bch bch.nc ${output_file}
280376
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+
281393hyds_file=${BIOS_PARAM_DIR} /hyk1sat_ms.nc
282394echo " hyds_file: ${hyds_file} "
283395
@@ -306,6 +418,22 @@ ncks --overwrite --no-alphabetize -x -v hyds \
306418echo " Append hyds variable to output file"
307419ncks -A -v hyds hyds.nc ${output_file}
308420
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+
309437ssat_file=${BIOS_PARAM_DIR} /wvol1sat_m3m3.nc
310438echo " ssat_file: ${ssat_file} "
311439
@@ -334,6 +462,22 @@ ncks --overwrite --no-alphabetize -x -v ssat \
334462echo " Append ssat variable to output file"
335463ncks -A -v ssat ssat.nc ${output_file}
336464
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+
337481swilt_file=${BIOS_PARAM_DIR} /wvol1w_m3m3.nc
338482echo " swilt_file: ${swilt_file} "
339483
@@ -362,6 +506,22 @@ ncks --overwrite --no-alphabetize -x -v swilt \
362506echo " Append swilt variable to output file"
363507ncks -A -v swilt swilt.nc ${output_file}
364508
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+
365525sucs_file=${BIOS_PARAM_DIR} /psie1_m.nc
366526echo " sucs_file: ${sucs_file} "
367527
@@ -395,6 +555,22 @@ ncks --overwrite --no-alphabetize -x -v sucs \
395555echo " Append sucs variable to output file"
396556ncks -A -v sucs sucs.nc ${output_file}
397557
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+
398574mvg_file=${BIOS_PARAM_DIR} /nvis5pre1750grp.nc
399575echo " mvg_file: ${mvg_file} "
400576
@@ -421,6 +597,14 @@ ncks --overwrite --no-alphabetize -x -v mvg \
421597echo " Append mvg variable to output file"
422598ncks -A -v mvg mvg.nc ${output_file}
423599
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+
424608c4frac_file=${BIOS_PARAM_DIR} /c4_grass_frac_cov.nc
425609echo " c4frac_file: ${c4frac_file} "
426610
@@ -444,6 +628,22 @@ ncks --overwrite --no-alphabetize -x -v c4frac \
444628echo " Append c4frac variable to output file"
445629ncks -A -v c4frac c4frac.nc ${output_file}
446630
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+
447647bios_soil_vars_regex=' ^clay$|^sand$|^ssat$|^bch$|^css$|^hyds$|^sfc$|^sucs$|^rhosoil$|^silt$|^swilt$'
448648
449649echo " Add provenance information to BIOS soil parameters"
0 commit comments