Page 1 of 1

log

Posted: Thu Jun 20, 2019 6:49 pm America/New_York
by bbroman93
Is there a function I can use at the command line to apply logarithm to my chlorophyll anomalies once they are calculated?

log

Posted: Fri Jun 21, 2019 9:31 am America/New_York
by OB WebDev - norman
It's not SeaDAS, but you could use the standard linux program, bc, like this.

cat <<EOF >sample_chl_anomalies.txt
0.02
0.014
2.4
0.26
0.089
0.37
EOF

for c in `cat sample_chl_anomalies.txt`; do
  echo "l($c)" | bc -l >> log_sample_chl_anomalies.txt
done

Or you could use my favorite, reverse-polish, command-line calculator from the
GMT folks that provides a lot more mathematical functionality.

gmt math sample_chl_anomalies.txt LOG = log_sample_chl_anomalies.txt

Regards,
Norman