
# PROCESSING OF FRAGMENTATION DOUBLING SIMULATIOMS

# HERE PERFORM DIFF CALCULATIONS FOR TIMSUM

##### 39m ###### 
cd /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.39m.4/SBG/Output/MO/DIFFS_AED_ALL/
#
cdo sub D_AREA_BURNT_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DBA_next_timsum_Ha_yr.nc
cdo sub D_AREA_BURNT_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DBA_next_timmin_Ha_mon.nc
cdo sub D_AREA_BURNT_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DBA_next_timmax_Ha_mon.nc
cdo div DBA_next_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DFRAC_BA_next_timsum_Ha_yr_39m.nc
cdo div DBA_next_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DFRAC_BA_next_timmin_Ha_mon_39m.nc
cdo div DBA_next_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DFRAC_BA_next_timmax_Ha_mon_39m.nc

##### 78m ###### TODO
cd /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/

cdo sub D_AREA_BURNT_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DBA_next_timsum_Ha_yr.nc
cdo sub D_AREA_BURNT_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DBA_next_timmin_Ha_mon.nc
cdo sub D_AREA_BURNT_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DBA_next_timmax_Ha_mon.nc
cdo div DBA_next_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DFRAC_BA_next_timsum_Ha_yr_78m.nc
cdo div DBA_next_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DFRAC_BA_next_timmin_Ha_mon_78m.nc
cdo div DBA_next_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DFRAC_BA_next_timmax_Ha_mon_78m.nc

##### 156m ######  TODO
cd /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/

cdo sub D_AREA_BURNT_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DBA_next_timsum_Ha_yr.nc
cdo sub D_AREA_BURNT_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DBA_next_timmin_Ha_mon.nc
cdo sub D_AREA_BURNT_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DBA_next_timmax_Ha_mon.nc
cdo div DBA_next_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DFRAC_BA_next_timsum_Ha_yr_156m.nc
cdo div DBA_next_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DFRAC_BA_next_timmin_Ha_mon_156m.nc
cdo div DBA_next_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DFRAC_BA_next_timmax_Ha_mon_156m.nc

 
##### 313m ###### 
cd /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/

cdo sub D_AREA_BURNT_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DBA_next_timsum_Ha_yr.nc
cdo sub D_AREA_BURNT_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DBA_next_timmin_Ha_mon.nc
cdo sub D_AREA_BURNT_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DBA_next_timmax_Ha_mon.nc
cdo div DBA_next_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DFRAC_BA_next_timsum_Ha_yr_313m.nc
cdo div DBA_next_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DFRAC_BA_next_timmin_Ha_mon_313m.nc
cdo div DBA_next_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DFRAC_BA_next_timmax_Ha_mon_313m.nc


##### 625m ###### 
cd /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/

cdo sub D_AREA_BURNT_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DBA_next_timsum_Ha_yr.nc
cdo sub D_AREA_BURNT_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DBA_next_timmin_Ha_mon.nc
cdo sub D_AREA_BURNT_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DBA_next_timmax_Ha_mon.nc
cdo div DBA_next_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DFRAC_BA_next_timsum_Ha_yr_625m.nc
cdo div DBA_next_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DFRAC_BA_next_timmin_Ha_mon_625m.nc
cdo div DBA_next_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DFRAC_BA_next_timmax_Ha_mon_625m.nc

##### 1250m ###### 
cd /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/

cdo sub D_AREA_BURNT_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DBA_next_timsum_Ha_yr.nc
cdo sub D_AREA_BURNT_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DBA_next_timmin_Ha_mon.nc
cdo sub D_AREA_BURNT_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DBA_next_timmax_Ha_mon.nc
cdo div DBA_next_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DFRAC_BA_next_timsum_Ha_yr_1250m.nc
cdo div DBA_next_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DFRAC_BA_next_timmin_Ha_mon_1250m.nc
cdo div DBA_next_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DFRAC_BA_next_timmax_Ha_mon_1250m.nc

##### 2500m ###### 
cd /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/

cdo sub D_AREA_BURNT_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DBA_next_timsum_Ha_yr.nc
cdo sub D_AREA_BURNT_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DBA_next_timmin_Ha_mon.nc
cdo sub D_AREA_BURNT_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DBA_next_timmax_Ha_mon.nc
cdo div DBA_next_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DFRAC_BA_next_timsum_Ha_yr_2500m.nc
cdo div DBA_next_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DFRAC_BA_next_timmin_Ha_mon_2500m.nc
cdo div DBA_next_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DFRAC_BA_next_timmax_Ha_mon_2500m.nc

##### 5000m ###### 
cd /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/

cdo sub D_AREA_BURNT_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DBA_next_timsum_Ha_yr.nc
cdo sub D_AREA_BURNT_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DBA_next_timmin_Ha_mon.nc
cdo sub D_AREA_BURNT_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DBA_next_timmax_Ha_mon.nc
cdo div DBA_next_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DFRAC_BA_next_timsum_Ha_yr_5000m.nc
cdo div DBA_next_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DFRAC_BA_next_timmin_Ha_mon_5000m.nc
cdo div DBA_next_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DFRAC_BA_next_timmax_Ha_mon_5000m.nc


##### 10000m ###### 
cd /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/

cdo sub D_AREA_BURNT_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DBA_next_timsum_Ha_yr.nc
cdo sub D_AREA_BURNT_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DBA_next_timmin_Ha_mon.nc
cdo sub D_AREA_BURNT_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DBA_next_timmax_Ha_mon.nc
cdo div DBA_next_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DFRAC_BA_next_timsum_Ha_yr_10000m.nc
cdo div DBA_next_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DFRAC_BA_next_timmin_Ha_mon_10000m.nc
cdo div DBA_next_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DFRAC_BA_next_timmax_Ha_mon_10000m.nc

############### GATHER ALL THE MAPS FOR COMPUTING AVERAGE in 39m DIRECTORY

cd /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.39m.4/SBG/Output/MO/DIFFS_AED_ALL/
cdo mulc,0.0001 Areas.nc Areas_Ha.nc

##### SENSITIVITY MAPS IN HA/YR and GRID FRACTION
cdo add /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.39m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc temp1.nc
cdo add temp1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc temp2.nc
cdo add temp2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc temp3.nc
cdo add temp3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc temp4.nc
cdo add temp4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc temp5.nc
cdo add temp5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc temp6.nc
cdo add temp6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc temp7.nc
cdo add temp7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc temp8.nc
cdo divc,9 temp8.nc DBA_ENSEMBLE_next_timsum_Ha_yr.nc
cdo div DBA_ENSEMBLE_next_timsum_Ha_yr.nc Areas_Ha.nc DBA_ENSEMBLE_next_timsum_GRIDFRAC.nc
rm -rf temp*

cdo add /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.39m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc temp1.nc
cdo add temp1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc temp2.nc
cdo add temp2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc temp3.nc
cdo add temp3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc temp4.nc
cdo add temp4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc temp5.nc
cdo add temp5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc temp6.nc
cdo add temp6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc temp7.nc
cdo add temp7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc temp8.nc
cdo divc,9 temp8.nc DBA_ENSEMBLE_next_timmin_Ha_mon.nc
cdo div DBA_ENSEMBLE_next_timmin_Ha_mon.nc Areas_Ha.nc DBA_ENSEMBLE_next_timmin_GRIDFRAC.nc
rm -rf temp*


cdo add /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.39m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc temp1.nc
cdo add temp1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc temp2.nc
cdo add temp2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc temp3.nc
cdo add temp3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc temp4.nc
cdo add temp4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc temp5.nc
cdo add temp5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc temp6.nc
cdo add temp6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc temp7.nc
cdo add temp7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc temp8.nc
cdo divc,9 temp8.nc DBA_ENSEMBLE_next_timmax_Ha_mon.nc
cdo div DBA_ENSEMBLE_next_timmax_Ha_mon.nc Areas_Ha.nc DBA_ENSEMBLE_next_timmax_GRIDFRAC.nc
rm -rf temp*

### RATE CHANGE SENSITIVITY MAPS (CHANGE IN BA PER DOUBLING OF FRAGMENTATION)

DFRAC_BA_next_timsum_Ha_yr_2500m.nc


cdo add /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.39m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_39m.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_78m.nc temp1.nc
cdo add temp1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_156m.nc temp2.nc
cdo add temp2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_313m.nc temp3.nc
cdo add temp3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_625m.nc temp4.nc
cdo add temp4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_1250m.nc temp5.nc
cdo add temp5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_2500m.nc temp6.nc
cdo add temp6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_5000m.nc temp7.nc
cdo add temp7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_10000m.nc temp8.nc
cdo divc,9 temp8.nc DFRAC_BA_ENSEMBLE_next_timsum_Ha_yr.nc
rm -rf temp*

cdo add /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.39m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_39m.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_78m.nc temp1.nc
cdo add temp1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_156m.nc temp2.nc
cdo add temp2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_313m.nc temp3.nc
cdo add temp3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_625m.nc temp4.nc
cdo add temp4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_1250m.nc temp5.nc
cdo add temp5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_2500m.nc temp6.nc
cdo add temp6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_5000m.nc temp7.nc
cdo add temp7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_10000m.nc temp8.nc
cdo divc,9 temp8.nc DFRAC_BA_ENSEMBLE_next_timmin_Ha_mon.nc
rm -rf temp*


cdo add /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.39m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_39m.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_78m.nc temp1.nc
cdo add temp1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_156m.nc temp2.nc
cdo add temp2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_313m.nc temp3.nc
cdo add temp3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_625m.nc temp4.nc
cdo add temp4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_1250m.nc temp5.nc
cdo add temp5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_2500m.nc temp6.nc
cdo add temp6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_5000m.nc temp7.nc
cdo add temp7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_10000m.nc temp8.nc
cdo divc,9 temp8.nc DFRAC_BA_ENSEMBLE_next_timmax_Ha_mon.nc
rm -rf temp*


##############  CHANGE IN BA AS (a) FRACTIONAL BURNED AREA CHANGE PER DOUBLING; (b) GRID AREA FRACTION CHANGE IN BA PER DOUBLING:::: PER BIOME
##############
##############


###### (a) FRACTIONAL BURNED AREA CHANGE PER DOUBLING;
#####
###TIMSUM
##
#
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_78m.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_156m.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_313m.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_625m.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_1250m.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_2500m.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_5000m.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_10000m.nc .


ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timsum_Ha_yr_39m.nc bla1.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timsum_Ha_yr_78m.nc bla2.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timsum_Ha_yr_156m.nc bla3.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timsum_Ha_yr_313m.nc bla4.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timsum_Ha_yr_625m.nc bla5.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timsum_Ha_yr_1250m.nc bla6.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timsum_Ha_yr_2500m.nc bla7.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timsum_Ha_yr_5000m.nc bla8.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timsum_Ha_yr_10000m.nc bla9.nc

mkdir DFRAC_BA_next_BIOME

#39m
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/timsum_C3_DFRAC_BA_next_39m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/timsum_C4_DFRAC_BA_next_39m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/timsum_TROP_DFRAC_BA_next_39m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/timsum_TMPRATE_DFRAC_BA_next_39m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/timsum_BOREAL_DFRAC_BA_next_39m.nc
rm -rf temp*

#78m
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/timsum_C3_DFRAC_BA_next_78m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/timsum_C4_DFRAC_BA_next_78m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/timsum_TROP_DFRAC_BA_next_78m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/timsum_TMPRATE_DFRAC_BA_next_78m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/timsum_BOREAL_DFRAC_BA_next_78m.nc
rm -rf temp*

#156m
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/timsum_C3_DFRAC_BA_next_156m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/timsum_C4_DFRAC_BA_next_156m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/timsum_TROP_DFRAC_BA_next_156m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/timsum_TMPRATE_DFRAC_BA_next_156m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/timsum_BOREAL_DFRAC_BA_next_156m.nc
rm -rf temp*

#313m
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/timsum_C3_DFRAC_BA_next_313m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/timsum_C4_DFRAC_BA_next_313m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/timsum_TROP_DFRAC_BA_next_313m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/timsum_TMPRATE_DFRAC_BA_next_313m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/timsum_BOREAL_DFRAC_BA_next_313m.nc
rm -rf temp*

#625m
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/timsum_C3_DFRAC_BA_next_625m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/timsum_C4_DFRAC_BA_next_625m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/timsum_TROP_DFRAC_BA_next_625m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/timsum_TMPRATE_DFRAC_BA_next_625m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/timsum_BOREAL_DFRAC_BA_next_625m.nc
rm -rf temp*

#1250m
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/timsum_C3_DFRAC_BA_next_1250m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/timsum_C4_DFRAC_BA_next_1250m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/timsum_TROP_DFRAC_BA_next_1250m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/timsum_TMPRATE_DFRAC_BA_next_1250m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/timsum_BOREAL_DFRAC_BA_next_1250m.nc
rm -rf temp*

#2500m
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/timsum_C3_DFRAC_BA_next_2500m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/timsum_C4_DFRAC_BA_next_2500m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/timsum_TROP_DFRAC_BA_next_2500m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/timsum_TMPRATE_DFRAC_BA_next_2500m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/timsum_BOREAL_DFRAC_BA_next_2500m.nc
rm -rf temp*

#5000m
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/timsum_C3_DFRAC_BA_next_5000m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/timsum_C4_DFRAC_BA_next_5000m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/timsum_TROP_DFRAC_BA_next_5000m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/timsum_TMPRATE_DFRAC_BA_next_5000m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/timsum_BOREAL_DFRAC_BA_next_5000m.nc
rm -rf temp*

#10000m
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/timsum_C3_DFRAC_BA_next_10000m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/timsum_C4_DFRAC_BA_next_10000m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/timsum_TROP_DFRAC_BA_next_10000m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/timsum_TMPRATE_DFRAC_BA_next_10000m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/timsum_BOREAL_DFRAC_BA_next_10000m.nc
rm -rf temp*

rm -rf bla*



###### (a) FRACTIONAL BURNED AREA CHANGE PER DOUBLING;
#####
###TIMMAX
##
#
 mkdir DFRAC_BA_next_BIOME/TIMMAX

cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_78m.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_156m.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_313m.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_625m.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_1250m.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_2500m.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_5000m.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_10000m.nc .


ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmax_Ha_mon_39m.nc bla1.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmax_Ha_mon_78m.nc bla2.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmax_Ha_mon_156m.nc bla3.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmax_Ha_mon_313m.nc bla4.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmax_Ha_mon_625m.nc bla5.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmax_Ha_mon_1250m.nc bla6.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmax_Ha_mon_2500m.nc bla7.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmax_Ha_mon_5000m.nc bla8.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmax_Ha_mon_10000m.nc bla9.nc

#39m
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C3_DFRAC_BA_next_39m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C4_DFRAC_BA_next_39m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TROP_DFRAC_BA_next_39m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TMPRATE_DFRAC_BA_next_39m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_BOREAL_DFRAC_BA_next_39m.nc
rm -rf temp*

#78m
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C3_DFRAC_BA_next_78m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C4_DFRAC_BA_next_78m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TROP_DFRAC_BA_next_78m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TMPRATE_DFRAC_BA_next_78m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_BOREAL_DFRAC_BA_next_78m.nc
rm -rf temp*

#156m
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C3_DFRAC_BA_next_156m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C4_DFRAC_BA_next_156m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TROP_DFRAC_BA_next_156m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TMPRATE_DFRAC_BA_next_156m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_BOREAL_DFRAC_BA_next_156m.nc
rm -rf temp*

#313m
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C3_DFRAC_BA_next_313m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C4_DFRAC_BA_next_313m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TROP_DFRAC_BA_next_313m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TMPRATE_DFRAC_BA_next_313m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_BOREAL_DFRAC_BA_next_313m.nc
rm -rf temp*

#625m
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C3_DFRAC_BA_next_625m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C4_DFRAC_BA_next_625m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TROP_DFRAC_BA_next_625m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TMPRATE_DFRAC_BA_next_625m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_BOREAL_DFRAC_BA_next_625m.nc
rm -rf temp*

#1250m
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C3_DFRAC_BA_next_1250m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C4_DFRAC_BA_next_1250m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TROP_DFRAC_BA_next_1250m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TMPRATE_DFRAC_BA_next_1250m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_BOREAL_DFRAC_BA_next_1250m.nc
rm -rf temp*

#2500m
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C3_DFRAC_BA_next_2500m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C4_DFRAC_BA_next_2500m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TROP_DFRAC_BA_next_2500m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TMPRATE_DFRAC_BA_next_2500m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_BOREAL_DFRAC_BA_next_2500m.nc
rm -rf temp*

#5000m
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C3_DFRAC_BA_next_5000m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C4_DFRAC_BA_next_5000m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TROP_DFRAC_BA_next_5000m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TMPRATE_DFRAC_BA_next_5000m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_BOREAL_DFRAC_BA_next_5000m.nc
rm -rf temp*

#10000m
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C3_DFRAC_BA_next_10000m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C4_DFRAC_BA_next_10000m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TROP_DFRAC_BA_next_10000m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TMPRATE_DFRAC_BA_next_10000m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_BOREAL_DFRAC_BA_next_10000m.nc
rm -rf temp*

rm -rf bla*

#######################

###### (a) FRACTIONAL BURNED AREA CHANGE PER DOUBLING;
#####
###TIMMIN
##
#
mkdir DFRAC_BA_next_BIOME/TIMMIN
 
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_78m.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_156m.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_313m.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_625m.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_1250m.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_2500m.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_5000m.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_10000m.nc .


ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmin_Ha_mon_39m.nc bla1.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmin_Ha_mon_78m.nc bla2.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmin_Ha_mon_156m.nc bla3.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmin_Ha_mon_313m.nc bla4.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmin_Ha_mon_625m.nc bla5.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmin_Ha_mon_1250m.nc bla6.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmin_Ha_mon_2500m.nc bla7.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmin_Ha_mon_5000m.nc bla8.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmin_Ha_mon_10000m.nc bla9.nc

#39m
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C3_DFRAC_BA_next_39m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C4_DFRAC_BA_next_39m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TROP_DFRAC_BA_next_39m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TMPRATE_DFRAC_BA_next_39m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_BOREAL_DFRAC_BA_next_39m.nc
rm -rf temp*

#78m
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C3_DFRAC_BA_next_78m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C4_DFRAC_BA_next_78m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TROP_DFRAC_BA_next_78m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TMPRATE_DFRAC_BA_next_78m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_BOREAL_DFRAC_BA_next_78m.nc
rm -rf temp*

#156m
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C3_DFRAC_BA_next_156m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C4_DFRAC_BA_next_156m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TROP_DFRAC_BA_next_156m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TMPRATE_DFRAC_BA_next_156m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_BOREAL_DFRAC_BA_next_156m.nc
rm -rf temp*

#313m
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C3_DFRAC_BA_next_313m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C4_DFRAC_BA_next_313m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TROP_DFRAC_BA_next_313m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TMPRATE_DFRAC_BA_next_313m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_BOREAL_DFRAC_BA_next_313m.nc
rm -rf temp*

#625m
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C3_DFRAC_BA_next_625m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C4_DFRAC_BA_next_625m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TROP_DFRAC_BA_next_625m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TMPRATE_DFRAC_BA_next_625m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_BOREAL_DFRAC_BA_next_625m.nc
rm -rf temp*

#1250m
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C3_DFRAC_BA_next_1250m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C4_DFRAC_BA_next_1250m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TROP_DFRAC_BA_next_1250m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TMPRATE_DFRAC_BA_next_1250m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_BOREAL_DFRAC_BA_next_1250m.nc
rm -rf temp*

#2500m
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C3_DFRAC_BA_next_2500m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C4_DFRAC_BA_next_2500m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TROP_DFRAC_BA_next_2500m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TMPRATE_DFRAC_BA_next_2500m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_BOREAL_DFRAC_BA_next_2500m.nc
rm -rf temp*

#5000m
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C3_DFRAC_BA_next_5000m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C4_DFRAC_BA_next_5000m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TROP_DFRAC_BA_next_5000m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TMPRATE_DFRAC_BA_next_5000m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_BOREAL_DFRAC_BA_next_5000m.nc
rm -rf temp*

#10000m
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C3_DFRAC_BA_next_10000m.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C4_DFRAC_BA_next_10000m.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TROP_DFRAC_BA_next_10000m.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TMPRATE_DFRAC_BA_next_10000m.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_BOREAL_DFRAC_BA_next_10000m.nc
rm -rf temp*

rm -rf bla*



#######################
cd DFRAC_BA_next_BIOME/
mkdir TIMSUM
mv timsum* TIMSUM/
cd ../

##############  CHANGE IN BA AS (b) GRID AREA FRACTION CHANGE IN BA PER DOUBLING:::: PER BIOME
##############
##############


###### (b) GRID AREA FRACTION CHANGE IN BA PER DOUBLING:
#####
###TIMSUM
##
#
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.39m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc Areas_Ha.nc bla1.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc Areas_Ha.nc bla2.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc Areas_Ha.nc bla3.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc Areas_Ha.nc bla4.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc Areas_Ha.nc bla5.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc Areas_Ha.nc bla6.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc Areas_Ha.nc bla7.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc Areas_Ha.nc bla8.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc Areas_Ha.nc bla9.nc

mkdir DFRAC_GRIDBA_next_BIOME

#39m
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timsum_C3_DFRAC_GRID_BA_next_39m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timsum_C4_DFRAC_GRID_BA_next_39m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timsum_TROP_DFRAC_GRID_BA_next_39m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timsum_TMPRATE_DFRAC_GRID_BA_next_39m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timsum_BOREAL_DFRAC_GRID_BA_next_39m.nc
rm -rf temp*

#78m
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timsum_C3_DFRAC_GRID_BA_next_78m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timsum_C4_DFRAC_GRID_BA_next_78m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timsum_TROP_DFRAC_GRID_BA_next_78m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timsum_TMPRATE_DFRAC_GRID_BA_next_78m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timsum_BOREAL_DFRAC_GRID_BA_next_78m.nc
rm -rf temp*

#156m
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timsum_C3_DFRAC_GRID_BA_next_156m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timsum_C4_DFRAC_GRID_BA_next_156m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timsum_TROP_DFRAC_GRID_BA_next_156m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timsum_TMPRATE_DFRAC_GRID_BA_next_156m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timsum_BOREAL_DFRAC_GRID_BA_next_156m.nc
rm -rf temp*

#313m
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timsum_C3_DFRAC_GRID_BA_next_313m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timsum_C4_DFRAC_GRID_BA_next_313m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timsum_TROP_DFRAC_GRID_BA_next_313m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timsum_TMPRATE_DFRAC_GRID_BA_next_313m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timsum_BOREAL_DFRAC_GRID_BA_next_313m.nc
rm -rf temp*

#625m
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timsum_C3_DFRAC_GRID_BA_next_625m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timsum_C4_DFRAC_GRID_BA_next_625m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timsum_TROP_DFRAC_GRID_BA_next_625m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timsum_TMPRATE_DFRAC_GRID_BA_next_625m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timsum_BOREAL_DFRAC_GRID_BA_next_625m.nc
rm -rf temp*

#1250m
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timsum_C3_DFRAC_GRID_BA_next_1250m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timsum_C4_DFRAC_GRID_BA_next_1250m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timsum_TROP_DFRAC_GRID_BA_next_1250m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timsum_TMPRATE_DFRAC_GRID_BA_next_1250m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timsum_BOREAL_DFRAC_GRID_BA_next_1250m.nc
rm -rf temp*

#2500m
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timsum_C3_DFRAC_GRID_BA_next_2500m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timsum_C4_DFRAC_GRID_BA_next_2500m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timsum_TROP_DFRAC_GRID_BA_next_2500m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timsum_TMPRATE_DFRAC_GRID_BA_next_2500m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timsum_BOREAL_DFRAC_GRID_BA_next_2500m.nc
rm -rf temp*

#5000m
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timsum_C3_DFRAC_GRID_BA_next_5000m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timsum_C4_DFRAC_GRID_BA_next_5000m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timsum_TROP_DFRAC_GRID_BA_next_5000m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timsum_TMPRATE_DFRAC_GRID_BA_next_5000m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timsum_BOREAL_DFRAC_GRID_BA_next_5000m.nc
rm -rf temp*

#10000m
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timsum_C3_DFRAC_GRID_BA_next_10000m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timsum_C4_DFRAC_GRID_BA_next_10000m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timsum_TROP_DFRAC_GRID_BA_next_10000m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timsum_TMPRATE_DFRAC_GRID_BA_next_10000m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timsum_BOREAL_DFRAC_GRID_BA_next_10000m.nc
rm -rf temp*

rm -rf bla*



###### (a) FRACTIONAL BURNED AREA CHANGE PER DOUBLING;
#####
###TIMMAX
##
#
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.39m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc Areas_Ha.nc bla1.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc Areas_Ha.nc bla2.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc Areas_Ha.nc bla3.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc Areas_Ha.nc bla4.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc Areas_Ha.nc bla5.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc Areas_Ha.nc bla6.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc Areas_Ha.nc bla7.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc Areas_Ha.nc bla8.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc Areas_Ha.nc bla9.nc

#39m
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmax_C3_DFRAC_GRID_BA_next_39m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmax_C4_DFRAC_GRID_BA_next_39m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmax_TROP_DFRAC_GRID_BA_next_39m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmax_TMPRATE_DFRAC_GRID_BA_next_39m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmax_BOREAL_DFRAC_GRID_BA_next_39m.nc
rm -rf temp*

#78m
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmax_C3_DFRAC_GRID_BA_next_78m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmax_C4_DFRAC_GRID_BA_next_78m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmax_TROP_DFRAC_GRID_BA_next_78m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmax_TMPRATE_DFRAC_GRID_BA_next_78m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmax_BOREAL_DFRAC_GRID_BA_next_78m.nc
rm -rf temp*

#156m
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmax_C3_DFRAC_GRID_BA_next_156m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmax_C4_DFRAC_GRID_BA_next_156m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmax_TROP_DFRAC_GRID_BA_next_156m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmax_TMPRATE_DFRAC_GRID_BA_next_156m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmax_BOREAL_DFRAC_GRID_BA_next_156m.nc
rm -rf temp*

#313m
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmax_C3_DFRAC_GRID_BA_next_313m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmax_C4_DFRAC_GRID_BA_next_313m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmax_TROP_DFRAC_GRID_BA_next_313m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmax_TMPRATE_DFRAC_GRID_BA_next_313m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmax_BOREAL_DFRAC_GRID_BA_next_313m.nc
rm -rf temp*

#625m
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmax_C3_DFRAC_GRID_BA_next_625m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmax_C4_DFRAC_GRID_BA_next_625m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmax_TROP_DFRAC_GRID_BA_next_625m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmax_TMPRATE_DFRAC_GRID_BA_next_625m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmax_BOREAL_DFRAC_GRID_BA_next_625m.nc
rm -rf temp*

#1250m
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmax_C3_DFRAC_GRID_BA_next_1250m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmax_C4_DFRAC_GRID_BA_next_1250m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmax_TROP_DFRAC_GRID_BA_next_1250m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmax_TMPRATE_DFRAC_GRID_BA_next_1250m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmax_BOREAL_DFRAC_GRID_BA_next_1250m.nc
rm -rf temp*

#2500m
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmax_C3_DFRAC_GRID_BA_next_2500m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmax_C4_DFRAC_GRID_BA_next_2500m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmax_TROP_DFRAC_GRID_BA_next_2500m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmax_TMPRATE_DFRAC_GRID_BA_next_2500m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmax_BOREAL_DFRAC_GRID_BA_next_2500m.nc
rm -rf temp*

#5000m
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmax_C3_DFRAC_GRID_BA_next_5000m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmax_C4_DFRAC_GRID_BA_next_5000m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmax_TROP_DFRAC_GRID_BA_next_5000m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmax_TMPRATE_DFRAC_GRID_BA_next_5000m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmax_BOREAL_DFRAC_GRID_BA_next_5000m.nc
rm -rf temp*

#10000m
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmax_C3_DFRAC_GRID_BA_next_10000m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmax_C4_DFRAC_GRID_BA_next_10000m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmax_TROP_DFRAC_GRID_BA_next_10000m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmax_TMPRATE_DFRAC_GRID_BA_next_10000m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmax_BOREAL_DFRAC_GRID_BA_next_10000m.nc
rm -rf temp*

rm -rf bla*

#######################

###### (a) FRACTIONAL BURNED AREA CHANGE PER DOUBLING;
#####
###TIMMIN
##
#
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.39m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc Areas_Ha.nc bla1.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc Areas_Ha.nc bla2.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc Areas_Ha.nc bla3.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc Areas_Ha.nc bla4.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc Areas_Ha.nc bla5.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc Areas_Ha.nc bla6.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc Areas_Ha.nc bla7.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc Areas_Ha.nc bla8.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc Areas_Ha.nc bla9.nc

#39m
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmin_C3_DFRAC_GRID_BA_next_39m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmin_C4_DFRAC_GRID_BA_next_39m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmin_TROP_DFRAC_GRID_BA_next_39m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmin_TMPRATE_DFRAC_GRID_BA_next_39m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmin_BOREAL_DFRAC_GRID_BA_next_39m.nc
rm -rf temp*

#78m
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmin_C3_DFRAC_GRID_BA_next_78m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmin_C4_DFRAC_GRID_BA_next_78m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmin_TROP_DFRAC_GRID_BA_next_78m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmin_TMPRATE_DFRAC_GRID_BA_next_78m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmin_BOREAL_DFRAC_GRID_BA_next_78m.nc
rm -rf temp*

#156m
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmin_C3_DFRAC_GRID_BA_next_156m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmin_C4_DFRAC_GRID_BA_next_156m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmin_TROP_DFRAC_GRID_BA_next_156m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmin_TMPRATE_DFRAC_GRID_BA_next_156m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmin_BOREAL_DFRAC_GRID_BA_next_156m.nc
rm -rf temp*

#313m
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmin_C3_DFRAC_GRID_BA_next_313m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmin_C4_DFRAC_GRID_BA_next_313m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmin_TROP_DFRAC_GRID_BA_next_313m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmin_TMPRATE_DFRAC_GRID_BA_next_313m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmin_BOREAL_DFRAC_GRID_BA_next_313m.nc
rm -rf temp*

#625m
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmin_C3_DFRAC_GRID_BA_next_625m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmin_C4_DFRAC_GRID_BA_next_625m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmin_TROP_DFRAC_GRID_BA_next_625m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmin_TMPRATE_DFRAC_GRID_BA_next_625m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmin_BOREAL_DFRAC_GRID_BA_next_625m.nc
rm -rf temp*

#1250m
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmin_C3_DFRAC_GRID_BA_next_1250m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmin_C4_DFRAC_GRID_BA_next_1250m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmin_TROP_DFRAC_GRID_BA_next_1250m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmin_TMPRATE_DFRAC_GRID_BA_next_1250m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmin_BOREAL_DFRAC_GRID_BA_next_1250m.nc
rm -rf temp*

#2500m
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmin_C3_DFRAC_GRID_BA_next_2500m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmin_C4_DFRAC_GRID_BA_next_2500m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmin_TROP_DFRAC_GRID_BA_next_2500m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmin_TMPRATE_DFRAC_GRID_BA_next_2500m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmin_BOREAL_DFRAC_GRID_BA_next_2500m.nc
rm -rf temp*

#5000m
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmin_C3_DFRAC_GRID_BA_next_5000m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmin_C4_DFRAC_GRID_BA_next_5000m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmin_TROP_DFRAC_GRID_BA_next_5000m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmin_TMPRATE_DFRAC_GRID_BA_next_5000m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmin_BOREAL_DFRAC_GRID_BA_next_5000m.nc
rm -rf temp*

#10000m
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.4/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmin_C3_DFRAC_GRID_BA_next_10000m.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmin_C4_DFRAC_GRID_BA_next_10000m.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmin_TROP_DFRAC_GRID_BA_next_10000m.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmin_TMPRATE_DFRAC_GRID_BA_next_10000m.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmin_BOREAL_DFRAC_GRID_BA_next_10000m.nc
rm -rf temp*

rm -rf bla*

#######################
cd DFRAC_GRIDBA_next_BIOME/
mkdir TIMSUM
mkdir TIMMAX
mkdir TIMMIN
mv timsum* TIMSUM/
mv timmax* TIMMAX/
mv timmin* TIMMIN/
cd ../
#######################
#######################
#######################
#######################
#######################


mkdir 39m
mkdir 78m
mkdir 156m
mkdir 313m
mkdir 625m
mkdir 1250m
mkdir 2500m
mkdir 5000m
mkdir 10000m
mv *39m.nc 39m/
mv *78m.nc 78m/
mv *156m.nc 156m/
mv *313m.nc 313m/
mv *625m.nc 625m/
mv *1250m.nc 1250m/
mv *2500m.nc 2500m/
mv *5000m.nc 5000m/
mv *10000m.nc 10000m/



# HERE PERFORM DIFF CALCULATIONS FOR TIMSUM

##### 39m ###### 
cd /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.39m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/
#
cdo sub D_AREA_BURNT_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DBA_next_timsum_Ha_yr.nc
cdo sub D_AREA_BURNT_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DBA_next_timmin_Ha_mon.nc
cdo sub D_AREA_BURNT_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DBA_next_timmax_Ha_mon.nc
cdo div DBA_next_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DFRAC_BA_next_timsum_Ha_yr_39m.fut.nc
cdo div DBA_next_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DFRAC_BA_next_timmin_Ha_mon_39m.fut.nc
cdo div DBA_next_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DFRAC_BA_next_timmax_Ha_mon_39m.fut.nc

##### 78m ###### TODO
cd /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/

cdo sub D_AREA_BURNT_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DBA_next_timsum_Ha_yr.nc
cdo sub D_AREA_BURNT_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DBA_next_timmin_Ha_mon.nc
cdo sub D_AREA_BURNT_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DBA_next_timmax_Ha_mon.nc
cdo div DBA_next_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DFRAC_BA_next_timsum_Ha_yr_78m.fut.nc
cdo div DBA_next_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DFRAC_BA_next_timmin_Ha_mon_78m.fut.nc
cdo div DBA_next_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DFRAC_BA_next_timmax_Ha_mon_78m.fut.nc

##### 156m ######  TODO
cd /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/

cdo sub D_AREA_BURNT_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DBA_next_timsum_Ha_yr.nc
cdo sub D_AREA_BURNT_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DBA_next_timmin_Ha_mon.nc
cdo sub D_AREA_BURNT_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DBA_next_timmax_Ha_mon.nc
cdo div DBA_next_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DFRAC_BA_next_timsum_Ha_yr_156m.fut.nc
cdo div DBA_next_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DFRAC_BA_next_timmin_Ha_mon_156m.fut.nc
cdo div DBA_next_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DFRAC_BA_next_timmax_Ha_mon_156m.fut.nc

 
##### 313m ###### 
cd /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/

cdo sub D_AREA_BURNT_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DBA_next_timsum_Ha_yr.nc
cdo sub D_AREA_BURNT_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DBA_next_timmin_Ha_mon.nc
cdo sub D_AREA_BURNT_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DBA_next_timmax_Ha_mon.nc
cdo div DBA_next_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DFRAC_BA_next_timsum_Ha_yr_313m.fut.nc
cdo div DBA_next_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DFRAC_BA_next_timmin_Ha_mon_313m.fut.nc
cdo div DBA_next_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DFRAC_BA_next_timmax_Ha_mon_313m.fut.nc


##### 625m ###### 
cd /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/

cdo sub D_AREA_BURNT_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DBA_next_timsum_Ha_yr.nc
cdo sub D_AREA_BURNT_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DBA_next_timmin_Ha_mon.nc
cdo sub D_AREA_BURNT_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DBA_next_timmax_Ha_mon.nc
cdo div DBA_next_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DFRAC_BA_next_timsum_Ha_yr_625m.fut.nc
cdo div DBA_next_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DFRAC_BA_next_timmin_Ha_mon_625m.fut.nc
cdo div DBA_next_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DFRAC_BA_next_timmax_Ha_mon_625m.fut.nc

##### 1250m ###### 
cd /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/

cdo sub D_AREA_BURNT_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DBA_next_timsum_Ha_yr.nc
cdo sub D_AREA_BURNT_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DBA_next_timmin_Ha_mon.nc
cdo sub D_AREA_BURNT_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DBA_next_timmax_Ha_mon.nc
cdo div DBA_next_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DFRAC_BA_next_timsum_Ha_yr_1250m.fut.nc
cdo div DBA_next_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DFRAC_BA_next_timmin_Ha_mon_1250m.fut.nc
cdo div DBA_next_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DFRAC_BA_next_timmax_Ha_mon_1250m.fut.nc

##### 2500m ###### 
cd /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/

cdo sub D_AREA_BURNT_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DBA_next_timsum_Ha_yr.nc
cdo sub D_AREA_BURNT_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DBA_next_timmin_Ha_mon.nc
cdo sub D_AREA_BURNT_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DBA_next_timmax_Ha_mon.nc
cdo div DBA_next_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DFRAC_BA_next_timsum_Ha_yr_2500m.fut.nc
cdo div DBA_next_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DFRAC_BA_next_timmin_Ha_mon_2500m.fut.nc
cdo div DBA_next_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DFRAC_BA_next_timmax_Ha_mon_2500m.fut.nc

##### 5000m ###### 
cd /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/

cdo sub D_AREA_BURNT_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DBA_next_timsum_Ha_yr.nc
cdo sub D_AREA_BURNT_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DBA_next_timmin_Ha_mon.nc
cdo sub D_AREA_BURNT_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DBA_next_timmax_Ha_mon.nc
cdo div DBA_next_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DFRAC_BA_next_timsum_Ha_yr_5000m.fut.nc
cdo div DBA_next_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DFRAC_BA_next_timmin_Ha_mon_5000m.fut.nc
cdo div DBA_next_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DFRAC_BA_next_timmax_Ha_mon_5000m.fut.nc


##### 10000m ###### 
cd /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/

cdo sub D_AREA_BURNT_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DBA_next_timsum_Ha_yr.nc
cdo sub D_AREA_BURNT_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DBA_next_timmin_Ha_mon.nc
cdo sub D_AREA_BURNT_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DBA_next_timmax_Ha_mon.nc
cdo div DBA_next_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timsum_Ha_yr.nc DFRAC_BA_next_timsum_Ha_yr_10000m.fut.nc
cdo div DBA_next_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmin_Ha_mon.nc DFRAC_BA_next_timmin_Ha_mon_10000m.fut.nc
cdo div DBA_next_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/D_AREA_BURNT_timmax_Ha_mon.nc DFRAC_BA_next_timmax_Ha_mon_10000m.fut.nc

############### GATHER ALL THE MAPS FOR COMPUTING AVERAGE in 39m DIRECTORY

cd /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.39m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/
cdo mulc,0.0001 Areas.nc Areas_Ha.nc

##### SENSITIVITY MAPS IN HA/YR and GRID FRACTION
cdo add /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.39m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc temp1.nc
cdo add temp1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc temp2.nc
cdo add temp2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc temp3.nc
cdo add temp3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc temp4.nc
cdo add temp4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc temp5.nc
cdo add temp5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc temp6.nc
cdo add temp6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc temp7.nc
cdo add temp7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc temp8.nc
cdo divc,9 temp8.nc DBA_ENSEMBLE_next_timsum_Ha_yr.nc
cdo div DBA_ENSEMBLE_next_timsum_Ha_yr.nc Areas_Ha.nc DBA_ENSEMBLE_next_timsum_GRIDFRAC.nc
rm -rf temp*

cdo add /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.39m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc temp1.nc
cdo add temp1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc temp2.nc
cdo add temp2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc temp3.nc
cdo add temp3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc temp4.nc
cdo add temp4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc temp5.nc
cdo add temp5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc temp6.nc
cdo add temp6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc temp7.nc
cdo add temp7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc temp8.nc
cdo divc,9 temp8.nc DBA_ENSEMBLE_next_timmin_Ha_mon.nc
cdo div DBA_ENSEMBLE_next_timmin_Ha_mon.nc Areas_Ha.nc DBA_ENSEMBLE_next_timmin_GRIDFRAC.nc
rm -rf temp*


cdo add /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.39m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc temp1.nc
cdo add temp1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc temp2.nc
cdo add temp2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc temp3.nc
cdo add temp3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc temp4.nc
cdo add temp4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc temp5.nc
cdo add temp5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc temp6.nc
cdo add temp6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc temp7.nc
cdo add temp7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc temp8.nc
cdo divc,9 temp8.nc DBA_ENSEMBLE_next_timmax_Ha_mon.nc
cdo div DBA_ENSEMBLE_next_timmax_Ha_mon.nc Areas_Ha.nc DBA_ENSEMBLE_next_timmax_GRIDFRAC.nc
rm -rf temp*

### RATE CHANGE SENSITIVITY MAPS (CHANGE IN BA PER DOUBLING OF FRAGMENTATION)

DFRAC_BA_next_timsum_Ha_yr_2500m.fut.nc


cdo add /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.39m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_39m.fut.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_78m.fut.nc temp1.nc
cdo add temp1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_156m.fut.nc temp2.nc
cdo add temp2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_313m.fut.nc temp3.nc
cdo add temp3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_625m.fut.nc temp4.nc
cdo add temp4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_1250m.fut.nc temp5.nc
cdo add temp5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_2500m.fut.nc temp6.nc
cdo add temp6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_5000m.fut.nc temp7.nc
cdo add temp7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_10000m.fut.nc temp8.nc
cdo divc,9 temp8.nc DFRAC_BA_ENSEMBLE_next_timsum_Ha_yr.nc
rm -rf temp*

cdo add /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.39m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_39m.fut.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_78m.fut.nc temp1.nc
cdo add temp1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_156m.fut.nc temp2.nc
cdo add temp2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_313m.fut.nc temp3.nc
cdo add temp3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_625m.fut.nc temp4.nc
cdo add temp4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_1250m.fut.nc temp5.nc
cdo add temp5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_2500m.fut.nc temp6.nc
cdo add temp6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_5000m.fut.nc temp7.nc
cdo add temp7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_10000m.fut.nc temp8.nc
cdo divc,9 temp8.nc DFRAC_BA_ENSEMBLE_next_timmin_Ha_mon.nc
rm -rf temp*


cdo add /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.39m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_39m.fut.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_78m.fut.nc temp1.nc
cdo add temp1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_156m.fut.nc temp2.nc
cdo add temp2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_313m.fut.nc temp3.nc
cdo add temp3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_625m.fut.nc temp4.nc
cdo add temp4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_1250m.fut.nc temp5.nc
cdo add temp5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_2500m.fut.nc temp6.nc
cdo add temp6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_5000m.fut.nc temp7.nc
cdo add temp7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_10000m.fut.nc temp8.nc
cdo divc,9 temp8.nc DFRAC_BA_ENSEMBLE_next_timmax_Ha_mon.nc
rm -rf temp*


##############  CHANGE IN BA AS (a) FRACTIONAL BURNED AREA CHANGE PER DOUBLING; (b) GRID AREA FRACTION CHANGE IN BA PER DOUBLING:::: PER BIOME
##############
##############


###### (a) FRACTIONAL BURNED AREA CHANGE PER DOUBLING;
#####
###TIMSUM
##
#
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_78m.fut.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_156m.fut.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_313m.fut.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_625m.fut.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_1250m.fut.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_2500m.fut.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_5000m.fut.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timsum_Ha_yr_10000m.fut.nc .


ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timsum_Ha_yr_39m.fut.nc bla1.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timsum_Ha_yr_78m.fut.nc bla2.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timsum_Ha_yr_156m.fut.nc bla3.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timsum_Ha_yr_313m.fut.nc bla4.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timsum_Ha_yr_625m.fut.nc bla5.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timsum_Ha_yr_1250m.fut.nc bla6.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timsum_Ha_yr_2500m.fut.nc bla7.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timsum_Ha_yr_5000m.fut.nc bla8.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timsum_Ha_yr_10000m.fut.nc bla9.nc

mkdir DFRAC_BA_next_BIOME

#39m
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/timsum_C3_DFRAC_BA_next_39m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/timsum_C4_DFRAC_BA_next_39m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/timsum_TROP_DFRAC_BA_next_39m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/timsum_TMPRATE_DFRAC_BA_next_39m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/timsum_BOREAL_DFRAC_BA_next_39m.fut.nc
rm -rf temp*

#78m
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/timsum_C3_DFRAC_BA_next_78m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/timsum_C4_DFRAC_BA_next_78m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/timsum_TROP_DFRAC_BA_next_78m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/timsum_TMPRATE_DFRAC_BA_next_78m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/timsum_BOREAL_DFRAC_BA_next_78m.fut.nc
rm -rf temp*

#156m
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/timsum_C3_DFRAC_BA_next_156m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/timsum_C4_DFRAC_BA_next_156m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/timsum_TROP_DFRAC_BA_next_156m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/timsum_TMPRATE_DFRAC_BA_next_156m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/timsum_BOREAL_DFRAC_BA_next_156m.fut.nc
rm -rf temp*

#313m
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/timsum_C3_DFRAC_BA_next_313m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/timsum_C4_DFRAC_BA_next_313m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/timsum_TROP_DFRAC_BA_next_313m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/timsum_TMPRATE_DFRAC_BA_next_313m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/timsum_BOREAL_DFRAC_BA_next_313m.fut.nc
rm -rf temp*

#625m
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/timsum_C3_DFRAC_BA_next_625m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/timsum_C4_DFRAC_BA_next_625m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/timsum_TROP_DFRAC_BA_next_625m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/timsum_TMPRATE_DFRAC_BA_next_625m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/timsum_BOREAL_DFRAC_BA_next_625m.fut.nc
rm -rf temp*

#1250m
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/timsum_C3_DFRAC_BA_next_1250m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/timsum_C4_DFRAC_BA_next_1250m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/timsum_TROP_DFRAC_BA_next_1250m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/timsum_TMPRATE_DFRAC_BA_next_1250m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/timsum_BOREAL_DFRAC_BA_next_1250m.fut.nc
rm -rf temp*

#2500m
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/timsum_C3_DFRAC_BA_next_2500m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/timsum_C4_DFRAC_BA_next_2500m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/timsum_TROP_DFRAC_BA_next_2500m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/timsum_TMPRATE_DFRAC_BA_next_2500m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/timsum_BOREAL_DFRAC_BA_next_2500m.fut.nc
rm -rf temp*

#5000m
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/timsum_C3_DFRAC_BA_next_5000m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/timsum_C4_DFRAC_BA_next_5000m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/timsum_TROP_DFRAC_BA_next_5000m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/timsum_TMPRATE_DFRAC_BA_next_5000m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/timsum_BOREAL_DFRAC_BA_next_5000m.fut.nc
rm -rf temp*

#10000m
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/timsum_C3_DFRAC_BA_next_10000m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/timsum_C4_DFRAC_BA_next_10000m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/timsum_TROP_DFRAC_BA_next_10000m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/timsum_TMPRATE_DFRAC_BA_next_10000m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/timsum_BOREAL_DFRAC_BA_next_10000m.fut.nc
rm -rf temp*

rm -rf bla*



###### (a) FRACTIONAL BURNED AREA CHANGE PER DOUBLING;
#####
###TIMMAX
##
#
 mkdir DFRAC_BA_next_BIOME/TIMMAX

cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_78m.fut.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_156m.fut.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_313m.fut.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_625m.fut.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_1250m.fut.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_2500m.fut.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_5000m.fut.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmax_Ha_mon_10000m.fut.nc .


ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmax_Ha_mon_39m.fut.nc bla1.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmax_Ha_mon_78m.fut.nc bla2.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmax_Ha_mon_156m.fut.nc bla3.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmax_Ha_mon_313m.fut.nc bla4.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmax_Ha_mon_625m.fut.nc bla5.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmax_Ha_mon_1250m.fut.nc bla6.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmax_Ha_mon_2500m.fut.nc bla7.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmax_Ha_mon_5000m.fut.nc bla8.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmax_Ha_mon_10000m.fut.nc bla9.nc

#39m
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C3_DFRAC_BA_next_39m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C4_DFRAC_BA_next_39m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TROP_DFRAC_BA_next_39m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TMPRATE_DFRAC_BA_next_39m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_BOREAL_DFRAC_BA_next_39m.fut.nc
rm -rf temp*

#78m
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C3_DFRAC_BA_next_78m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C4_DFRAC_BA_next_78m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TROP_DFRAC_BA_next_78m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TMPRATE_DFRAC_BA_next_78m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_BOREAL_DFRAC_BA_next_78m.fut.nc
rm -rf temp*

#156m
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C3_DFRAC_BA_next_156m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C4_DFRAC_BA_next_156m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TROP_DFRAC_BA_next_156m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TMPRATE_DFRAC_BA_next_156m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_BOREAL_DFRAC_BA_next_156m.fut.nc
rm -rf temp*

#313m
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C3_DFRAC_BA_next_313m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C4_DFRAC_BA_next_313m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TROP_DFRAC_BA_next_313m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TMPRATE_DFRAC_BA_next_313m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_BOREAL_DFRAC_BA_next_313m.fut.nc
rm -rf temp*

#625m
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C3_DFRAC_BA_next_625m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C4_DFRAC_BA_next_625m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TROP_DFRAC_BA_next_625m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TMPRATE_DFRAC_BA_next_625m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_BOREAL_DFRAC_BA_next_625m.fut.nc
rm -rf temp*

#1250m
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C3_DFRAC_BA_next_1250m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C4_DFRAC_BA_next_1250m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TROP_DFRAC_BA_next_1250m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TMPRATE_DFRAC_BA_next_1250m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_BOREAL_DFRAC_BA_next_1250m.fut.nc
rm -rf temp*

#2500m
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C3_DFRAC_BA_next_2500m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C4_DFRAC_BA_next_2500m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TROP_DFRAC_BA_next_2500m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TMPRATE_DFRAC_BA_next_2500m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_BOREAL_DFRAC_BA_next_2500m.fut.nc
rm -rf temp*

#5000m
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C3_DFRAC_BA_next_5000m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C4_DFRAC_BA_next_5000m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TROP_DFRAC_BA_next_5000m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TMPRATE_DFRAC_BA_next_5000m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_BOREAL_DFRAC_BA_next_5000m.fut.nc
rm -rf temp*

#10000m
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C3_DFRAC_BA_next_10000m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_C4_DFRAC_BA_next_10000m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TROP_DFRAC_BA_next_10000m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_TMPRATE_DFRAC_BA_next_10000m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMAX/timmax_BOREAL_DFRAC_BA_next_10000m.fut.nc
rm -rf temp*

rm -rf bla*

#######################

###### (a) FRACTIONAL BURNED AREA CHANGE PER DOUBLING;
#####
###TIMMIN
##
#
mkdir DFRAC_BA_next_BIOME/TIMMIN
 
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_78m.fut.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_156m.fut.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_313m.fut.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_625m.fut.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_1250m.fut.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_2500m.fut.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_5000m.fut.nc .
cp /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DFRAC_BA_next_timmin_Ha_mon_10000m.fut.nc .


ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmin_Ha_mon_39m.fut.nc bla1.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmin_Ha_mon_78m.fut.nc bla2.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmin_Ha_mon_156m.fut.nc bla3.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmin_Ha_mon_313m.fut.nc bla4.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmin_Ha_mon_625m.fut.nc bla5.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmin_Ha_mon_1250m.fut.nc bla6.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmin_Ha_mon_2500m.fut.nc bla7.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmin_Ha_mon_5000m.fut.nc bla8.nc
ncap2 -s 'where (D_AREA_BURNT>100) D_AREA_BURNT=100;' DFRAC_BA_next_timmin_Ha_mon_10000m.fut.nc bla9.nc

#39m
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C3_DFRAC_BA_next_39m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C4_DFRAC_BA_next_39m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TROP_DFRAC_BA_next_39m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TMPRATE_DFRAC_BA_next_39m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_BOREAL_DFRAC_BA_next_39m.fut.nc
rm -rf temp*

#78m
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C3_DFRAC_BA_next_78m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C4_DFRAC_BA_next_78m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TROP_DFRAC_BA_next_78m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TMPRATE_DFRAC_BA_next_78m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_BOREAL_DFRAC_BA_next_78m.fut.nc
rm -rf temp*

#156m
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C3_DFRAC_BA_next_156m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C4_DFRAC_BA_next_156m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TROP_DFRAC_BA_next_156m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TMPRATE_DFRAC_BA_next_156m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_BOREAL_DFRAC_BA_next_156m.fut.nc
rm -rf temp*

#313m
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C3_DFRAC_BA_next_313m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C4_DFRAC_BA_next_313m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TROP_DFRAC_BA_next_313m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TMPRATE_DFRAC_BA_next_313m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_BOREAL_DFRAC_BA_next_313m.fut.nc
rm -rf temp*

#625m
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C3_DFRAC_BA_next_625m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C4_DFRAC_BA_next_625m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TROP_DFRAC_BA_next_625m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TMPRATE_DFRAC_BA_next_625m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_BOREAL_DFRAC_BA_next_625m.fut.nc
rm -rf temp*

#1250m
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C3_DFRAC_BA_next_1250m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C4_DFRAC_BA_next_1250m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TROP_DFRAC_BA_next_1250m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TMPRATE_DFRAC_BA_next_1250m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_BOREAL_DFRAC_BA_next_1250m.fut.nc
rm -rf temp*

#2500m
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C3_DFRAC_BA_next_2500m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C4_DFRAC_BA_next_2500m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TROP_DFRAC_BA_next_2500m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TMPRATE_DFRAC_BA_next_2500m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_BOREAL_DFRAC_BA_next_2500m.fut.nc
rm -rf temp*

#5000m
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C3_DFRAC_BA_next_5000m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C4_DFRAC_BA_next_5000m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TROP_DFRAC_BA_next_5000m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TMPRATE_DFRAC_BA_next_5000m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_BOREAL_DFRAC_BA_next_5000m.fut.nc
rm -rf temp*

#10000m
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C3_DFRAC_BA_next_10000m.fut.nc
cdo fldmean temp2.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_C4_DFRAC_BA_next_10000m.fut.nc
cdo fldmean temp3.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TROP_DFRAC_BA_next_10000m.fut.nc
cdo fldmean temp4.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_TMPRATE_DFRAC_BA_next_10000m.fut.nc
cdo fldmean temp5.nc DFRAC_BA_next_BIOME/TIMMIN/timmin_BOREAL_DFRAC_BA_next_10000m.fut.nc
rm -rf temp*

rm -rf bla*



#######################
cd DFRAC_BA_next_BIOME/
mkdir TIMSUM
mv timsum* TIMSUM/
cd ../

##############  CHANGE IN BA AS (b) GRID AREA FRACTION CHANGE IN BA PER DOUBLING:::: PER BIOME
##############
##############


###### (b) GRID AREA FRACTION CHANGE IN BA PER DOUBLING:
#####
###TIMSUM
##
#
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.39m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc Areas_Ha.nc bla1.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc Areas_Ha.nc bla2.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc Areas_Ha.nc bla3.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc Areas_Ha.nc bla4.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc Areas_Ha.nc bla5.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc Areas_Ha.nc bla6.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc Areas_Ha.nc bla7.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc Areas_Ha.nc bla8.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timsum_Ha_yr.nc Areas_Ha.nc bla9.nc

mkdir DFRAC_GRIDBA_next_BIOME

#39m
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timsum_C3_DFRAC_GRID_BA_next_39m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timsum_C4_DFRAC_GRID_BA_next_39m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timsum_TROP_DFRAC_GRID_BA_next_39m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timsum_TMPRATE_DFRAC_GRID_BA_next_39m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timsum_BOREAL_DFRAC_GRID_BA_next_39m.fut.nc
rm -rf temp*

#78m
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timsum_C3_DFRAC_GRID_BA_next_78m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timsum_C4_DFRAC_GRID_BA_next_78m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timsum_TROP_DFRAC_GRID_BA_next_78m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timsum_TMPRATE_DFRAC_GRID_BA_next_78m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timsum_BOREAL_DFRAC_GRID_BA_next_78m.fut.nc
rm -rf temp*

#156m
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timsum_C3_DFRAC_GRID_BA_next_156m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timsum_C4_DFRAC_GRID_BA_next_156m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timsum_TROP_DFRAC_GRID_BA_next_156m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timsum_TMPRATE_DFRAC_GRID_BA_next_156m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timsum_BOREAL_DFRAC_GRID_BA_next_156m.fut.nc
rm -rf temp*

#313m
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timsum_C3_DFRAC_GRID_BA_next_313m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timsum_C4_DFRAC_GRID_BA_next_313m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timsum_TROP_DFRAC_GRID_BA_next_313m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timsum_TMPRATE_DFRAC_GRID_BA_next_313m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timsum_BOREAL_DFRAC_GRID_BA_next_313m.fut.nc
rm -rf temp*

#625m
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timsum_C3_DFRAC_GRID_BA_next_625m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timsum_C4_DFRAC_GRID_BA_next_625m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timsum_TROP_DFRAC_GRID_BA_next_625m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timsum_TMPRATE_DFRAC_GRID_BA_next_625m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timsum_BOREAL_DFRAC_GRID_BA_next_625m.fut.nc
rm -rf temp*

#1250m
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timsum_C3_DFRAC_GRID_BA_next_1250m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timsum_C4_DFRAC_GRID_BA_next_1250m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timsum_TROP_DFRAC_GRID_BA_next_1250m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timsum_TMPRATE_DFRAC_GRID_BA_next_1250m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timsum_BOREAL_DFRAC_GRID_BA_next_1250m.fut.nc
rm -rf temp*

#2500m
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timsum_C3_DFRAC_GRID_BA_next_2500m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timsum_C4_DFRAC_GRID_BA_next_2500m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timsum_TROP_DFRAC_GRID_BA_next_2500m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timsum_TMPRATE_DFRAC_GRID_BA_next_2500m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timsum_BOREAL_DFRAC_GRID_BA_next_2500m.fut.nc
rm -rf temp*

#5000m
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timsum_C3_DFRAC_GRID_BA_next_5000m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timsum_C4_DFRAC_GRID_BA_next_5000m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timsum_TROP_DFRAC_GRID_BA_next_5000m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timsum_TMPRATE_DFRAC_GRID_BA_next_5000m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timsum_BOREAL_DFRAC_GRID_BA_next_5000m.fut.nc
rm -rf temp*

#10000m
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timsum_C3_DFRAC_GRID_BA_next_10000m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timsum_C4_DFRAC_GRID_BA_next_10000m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timsum_TROP_DFRAC_GRID_BA_next_10000m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timsum_TMPRATE_DFRAC_GRID_BA_next_10000m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timsum_BOREAL_DFRAC_GRID_BA_next_10000m.fut.nc
rm -rf temp*

rm -rf bla*



###### (a) FRACTIONAL BURNED AREA CHANGE PER DOUBLING;
#####
###TIMMAX
##
#
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.39m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc Areas_Ha.nc bla1.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc Areas_Ha.nc bla2.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc Areas_Ha.nc bla3.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc Areas_Ha.nc bla4.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc Areas_Ha.nc bla5.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc Areas_Ha.nc bla6.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc Areas_Ha.nc bla7.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc Areas_Ha.nc bla8.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmax_Ha_mon.nc Areas_Ha.nc bla9.nc

#39m
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmax_C3_DFRAC_GRID_BA_next_39m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmax_C4_DFRAC_GRID_BA_next_39m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmax_TROP_DFRAC_GRID_BA_next_39m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmax_TMPRATE_DFRAC_GRID_BA_next_39m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmax_BOREAL_DFRAC_GRID_BA_next_39m.fut.nc
rm -rf temp*

#78m
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmax_C3_DFRAC_GRID_BA_next_78m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmax_C4_DFRAC_GRID_BA_next_78m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmax_TROP_DFRAC_GRID_BA_next_78m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmax_TMPRATE_DFRAC_GRID_BA_next_78m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmax_BOREAL_DFRAC_GRID_BA_next_78m.fut.nc
rm -rf temp*

#156m
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmax_C3_DFRAC_GRID_BA_next_156m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmax_C4_DFRAC_GRID_BA_next_156m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmax_TROP_DFRAC_GRID_BA_next_156m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmax_TMPRATE_DFRAC_GRID_BA_next_156m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmax_BOREAL_DFRAC_GRID_BA_next_156m.fut.nc
rm -rf temp*

#313m
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmax_C3_DFRAC_GRID_BA_next_313m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmax_C4_DFRAC_GRID_BA_next_313m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmax_TROP_DFRAC_GRID_BA_next_313m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmax_TMPRATE_DFRAC_GRID_BA_next_313m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmax_BOREAL_DFRAC_GRID_BA_next_313m.fut.nc
rm -rf temp*

#625m
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmax_C3_DFRAC_GRID_BA_next_625m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmax_C4_DFRAC_GRID_BA_next_625m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmax_TROP_DFRAC_GRID_BA_next_625m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmax_TMPRATE_DFRAC_GRID_BA_next_625m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmax_BOREAL_DFRAC_GRID_BA_next_625m.fut.nc
rm -rf temp*

#1250m
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmax_C3_DFRAC_GRID_BA_next_1250m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmax_C4_DFRAC_GRID_BA_next_1250m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmax_TROP_DFRAC_GRID_BA_next_1250m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmax_TMPRATE_DFRAC_GRID_BA_next_1250m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmax_BOREAL_DFRAC_GRID_BA_next_1250m.fut.nc
rm -rf temp*

#2500m
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmax_C3_DFRAC_GRID_BA_next_2500m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmax_C4_DFRAC_GRID_BA_next_2500m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmax_TROP_DFRAC_GRID_BA_next_2500m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmax_TMPRATE_DFRAC_GRID_BA_next_2500m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmax_BOREAL_DFRAC_GRID_BA_next_2500m.fut.nc
rm -rf temp*

#5000m
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmax_C3_DFRAC_GRID_BA_next_5000m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmax_C4_DFRAC_GRID_BA_next_5000m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmax_TROP_DFRAC_GRID_BA_next_5000m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmax_TMPRATE_DFRAC_GRID_BA_next_5000m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmax_BOREAL_DFRAC_GRID_BA_next_5000m.fut.nc
rm -rf temp*

#10000m
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmax_C3_DFRAC_GRID_BA_next_10000m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmax_C4_DFRAC_GRID_BA_next_10000m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmax_TROP_DFRAC_GRID_BA_next_10000m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmax_TMPRATE_DFRAC_GRID_BA_next_10000m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmax_BOREAL_DFRAC_GRID_BA_next_10000m.fut.nc
rm -rf temp*

rm -rf bla*

#######################

###### (a) FRACTIONAL BURNED AREA CHANGE PER DOUBLING;
#####
###TIMMIN
##
#
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.39m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc Areas_Ha.nc bla1.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc Areas_Ha.nc bla2.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc Areas_Ha.nc bla3.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc Areas_Ha.nc bla4.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc Areas_Ha.nc bla5.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc Areas_Ha.nc bla6.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc Areas_Ha.nc bla7.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc Areas_Ha.nc bla8.nc
 cdo div /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/DBA_next_timmin_Ha_mon.nc Areas_Ha.nc bla9.nc

#39m
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla1.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.78m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmin_C3_DFRAC_GRID_BA_next_39m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmin_C4_DFRAC_GRID_BA_next_39m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmin_TROP_DFRAC_GRID_BA_next_39m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmin_TMPRATE_DFRAC_GRID_BA_next_39m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmin_BOREAL_DFRAC_GRID_BA_next_39m.fut.nc
rm -rf temp*

#78m
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla2.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.156m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmin_C3_DFRAC_GRID_BA_next_78m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmin_C4_DFRAC_GRID_BA_next_78m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmin_TROP_DFRAC_GRID_BA_next_78m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmin_TMPRATE_DFRAC_GRID_BA_next_78m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmin_BOREAL_DFRAC_GRID_BA_next_78m.fut.nc
rm -rf temp*

#156m
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla3.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.313m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmin_C3_DFRAC_GRID_BA_next_156m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmin_C4_DFRAC_GRID_BA_next_156m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmin_TROP_DFRAC_GRID_BA_next_156m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmin_TMPRATE_DFRAC_GRID_BA_next_156m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmin_BOREAL_DFRAC_GRID_BA_next_156m.fut.nc
rm -rf temp*

#313m
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla4.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.625m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmin_C3_DFRAC_GRID_BA_next_313m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmin_C4_DFRAC_GRID_BA_next_313m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmin_TROP_DFRAC_GRID_BA_next_313m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmin_TMPRATE_DFRAC_GRID_BA_next_313m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmin_BOREAL_DFRAC_GRID_BA_next_313m.fut.nc
rm -rf temp*

#625m
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla5.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.1250m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmin_C3_DFRAC_GRID_BA_next_625m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmin_C4_DFRAC_GRID_BA_next_625m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmin_TROP_DFRAC_GRID_BA_next_625m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmin_TMPRATE_DFRAC_GRID_BA_next_625m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmin_BOREAL_DFRAC_GRID_BA_next_625m.fut.nc
rm -rf temp*

#1250m
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla6.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.2500m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmin_C3_DFRAC_GRID_BA_next_1250m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmin_C4_DFRAC_GRID_BA_next_1250m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmin_TROP_DFRAC_GRID_BA_next_1250m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmin_TMPRATE_DFRAC_GRID_BA_next_1250m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmin_BOREAL_DFRAC_GRID_BA_next_1250m.fut.nc
rm -rf temp*

#2500m
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla7.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.5000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmin_C3_DFRAC_GRID_BA_next_2500m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmin_C4_DFRAC_GRID_BA_next_2500m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmin_TROP_DFRAC_GRID_BA_next_2500m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmin_TMPRATE_DFRAC_GRID_BA_next_2500m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmin_BOREAL_DFRAC_GRID_BA_next_2500m.fut.nc
rm -rf temp*

#5000m
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla8.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.10000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmin_C3_DFRAC_GRID_BA_next_5000m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmin_C4_DFRAC_GRID_BA_next_5000m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmin_TROP_DFRAC_GRID_BA_next_5000m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmin_TMPRATE_DFRAC_GRID_BA_next_5000m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmin_BOREAL_DFRAC_GRID_BA_next_5000m.fut.nc
rm -rf temp*

#10000m
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C3_NaNmask.nc temp1.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/C4_NaNmask.nc temp2.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TROP_NaNmask.nc temp3.nc 
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/TMPRATE_NaNmask.nc temp4.nc
cdo mul bla9.nc /home/surface4/sbowring/ARCHIVE/IGCM_OUT/OL2/DEVT/secsto/AED.20000m.fut.1/SBG/Output/MO/DIFFS_AED_ALL/FIRE_MASK/BOREAL_NaNmask.nc temp5.nc

cdo fldmean temp1.nc DFRAC_GRIDBA_next_BIOME/timmin_C3_DFRAC_GRID_BA_next_10000m.fut.nc
cdo fldmean temp2.nc DFRAC_GRIDBA_next_BIOME/timmin_C4_DFRAC_GRID_BA_next_10000m.fut.nc
cdo fldmean temp3.nc DFRAC_GRIDBA_next_BIOME/timmin_TROP_DFRAC_GRID_BA_next_10000m.fut.nc
cdo fldmean temp4.nc DFRAC_GRIDBA_next_BIOME/timmin_TMPRATE_DFRAC_GRID_BA_next_10000m.fut.nc
cdo fldmean temp5.nc DFRAC_GRIDBA_next_BIOME/timmin_BOREAL_DFRAC_GRID_BA_next_10000m.fut.nc
rm -rf temp*

rm -rf bla*

#######################
cd DFRAC_GRIDBA_next_BIOME/
mkdir TIMSUM
mkdir TIMMAX
mkdir TIMMIN
mv timsum* TIMSUM/
mv timmax* TIMMAX/
mv timmin* TIMMIN/
cd ../
#######################
#######################
#######################
#######################
#######################


mkdir 39m
mkdir 78m
mkdir 156m
mkdir 313m
mkdir 625m
mkdir 1250m
mkdir 2500m
mkdir 5000m
mkdir 10000m
mv *39m.fut.nc 39m/
mv *78m.fut.nc 78m/
mv *156m.fut.nc 156m/
mv *313m.fut.nc 313m/
mv *625m.fut.nc 625m/
mv *1250m.fut.nc 1250m/
mv *2500m.fut.nc 2500m/
mv *5000m.fut.nc 5000m/
mv *10000m.fut.nc 10000m/
