Commit 78961a00 authored by Evans, Katherine's avatar Evans, Katherine
Browse files

fixed problem with aavg values- use area not gris_area which is 0

parent ec1f19f5
......@@ -54,9 +54,9 @@ ncrename -v PCT_GLC_MEC,PCT_GLC_SUM $outpath/lnd/climos/${case}_ANN_climo_pct_gl
climos_path=$outpath/lnd/climos
echo "average land monthly climos over ice sheet region"
ncwa -O -a lat,lon -w gris_area -B "gris_mask == 1" $climos_path/${case}_ANN_climo.nc $climos_path/${case}_ANN_aavg_climo.nc
ncwa -O -a lat,lon -w gris_area -B "gris_mask == 1" $climos_path/${case}_JJA_climo.nc $climos_path/${case}_JJA_aavg_climo.nc
ncwa -O -a lat,lon -w gris_area -B "gris_mask == 1" $climos_path/${case}_DJF_climo.nc $climos_path/${case}_DJF_aavg_climo.nc
ncwa -O -a lat,lon -w area -B "gris_mask == 1" $climos_path/${case}_ANN_climo.nc $climos_path/${case}_ANN_aavg_climo.nc
ncwa -O -a lat,lon -w area -B "gris_mask == 1" $climos_path/${case}_JJA_climo.nc $climos_path/${case}_JJA_aavg_climo.nc
ncwa -O -a lat,lon -w area -B "gris_mask == 1" $climos_path/${case}_DJF_climo.nc $climos_path/${case}_DJF_aavg_climo.nc
fi
......
......@@ -7,7 +7,7 @@ echo "make time series of monthly average lnd data for $ivar"
if [ "$version" == "cesm1" ]; then
ncrcat -O -v mcdate,time,$ivar $h0lnd_path/${case}.${lnd}.${freq}.*.nc $outpath/lnd/tseries/$case.$lnd.${freq}.$ivar.nc
elif [ "$version" == "e3sm" ]; then
ncrcat -O -v mcdate,time,gris_area,gris_mask,$ivar $h0lnd_path/${case}.${lnd}.${freq}.*.nc $outpath/lnd/tseries/$case.$lnd.${freq}.$ivar.nc
ncrcat -O -v mcdate,time,area,gris_mask,$ivar $h0lnd_path/${case}.${lnd}.${freq}.*.nc $outpath/lnd/tseries/$case.$lnd.${freq}.$ivar.nc
fi
if test -a $outpath/lnd/tseries/${case}.$lnd.${freq}.$ivar.nc; then
......@@ -49,10 +49,11 @@ elif [ "$version" == "e3sm" ]; then
#echo "add pct coverage of glacier to file before averaging"
#ncks -A -v PCT_GLC_SUM $outpath/lnd/climos/${case}_ANN_climo_pct_glc.nc $outpath/lnd/tseries/$case.$lnd.${freq}.yrly.$ivar.nc
#ncap2 -O -s 'areaice=PCT_GLC_SUM*0.01*area' $outpath/lnd/tseries/$case.$lnd.${freq}.yrly.$ivar.nc -o $outpath/lnd/tseries/$case.$lnd.${freq}.yrly_ai.$ivar.nc
echo "average over ice sheet region for yearly averaged lnd data for $ivar"
ncwa -O -a lat,lon -w gris_area -B "gris_mask == 1" $outpath/lnd/tseries/$case.$lnd.${freq}.yrly.$ivar.nc $outpath/lnd/tseries/$case.$lnd.aavg.${freq}.yrly.$ivar.nc
ncwa -O -a lat,lon -w area -B "gris_mask == 1" $outpath/lnd/tseries/$case.$lnd.${freq}.yrly.$ivar.nc $outpath/lnd/tseries/$case.$lnd.aavg.${freq}.yrly.$ivar.nc
#ncap2 -O -s 'areaice=PCT_GLC_SUM*0.01*gris_area' $outpath/lnd/tseries/$case.$lnd.${freq}.yrly.$ivar.nc -o $outpath/lnd/tseries/$case.$lnd.${freq}.yrly_ai.$ivar.nc
if test -a $outpath/lnd/tseries/${case}.$lnd.aavg.${freq}.yrly.$ivar.nc; then
echo "Global avg yearly masked $lnd averages of $ivar made"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment