diff -r 0c6405ab2ff4 -r 4be95183fbcd all/04.biomass.ncl --- a/all/04.biomass.ncl Mon Jan 26 22:08:20 2009 -0500 +++ b/all/04.biomass.ncl Thu Mar 26 14:02:21 2009 -0400 @@ -44,7 +44,7 @@ ;-------------------------------------------- ; read model data - fm = addfile (dirm+film1,"r") + fm = addfile (dirm+film11,"r") if (BGC .eq. "cn") then data1 = fm->LIVESTEMC @@ -83,7 +83,7 @@ ;------------------------------------------------ ; read ob data - ob_name = "LC15_Amazon_Biomass" + ob_name = "LC15 Amazon Biomass" dir_b = diro + "biomass/" fil_b = "amazon_biomass_"+model_grid+".nc" @@ -99,9 +99,9 @@ ; Units for these variables are: ; dataob : MgC/ha ; datamod0 : gC/m2 -; We want to convert these to KgC/m2 +; We want to convert these to kgC/m2 ; ha = 100m*100m = 10,000 m2 -; MgC/ha*1000/10,000 = KgC/m2 +; MgC/ha*1000/10,000 = kgC/m2 factor_aboveground = 0.5 factor_unit_ob = 0.1 @@ -110,8 +110,8 @@ dataob = dataob * factor_aboveground * factor_unit_ob datamod0 = datamod0 * factor_unit_mod - dataob@units = "KgC/m2" - datamod0@units = "KgC/m2" + dataob@units = "kg C m~S~-2~N~" + datamod0@units = "kg C m~S~-2~N~" dataob@long_name = "Amazon Biomass" datamod0@long_name = "Amazon Biomass" @@ -139,7 +139,7 @@ ;******************************************************** ; sum over amazom_mask area: -; Peta g = 1.e15 g = 1.e12 Kg +; Peta g = 1.e15 g = 1.e12 kg factor_unit = 1.e-12 ; mask_amazon = where(mask_amazon .ge. 0.5, mask_amazon ,0.) @@ -204,6 +204,7 @@ system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) + ;system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new) ;------------------------------------------------------------------------ ; contour ob @@ -225,6 +226,7 @@ system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) + ;system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new) ;------------------------------------------------------------------------ ; contour model @@ -234,7 +236,7 @@ resg@cnLevelSpacingF = 2. ; interval plot_name = "global_model" - title = "Model "+ model_name + title = "Model "+ model_name + " (2000)" resg@tiMainString = title wks = gsn_open_wks (plot_type,plot_name) ; open workstation @@ -246,6 +248,7 @@ system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) + ;system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new) ;------------------------------------------------------------------------ ; contour model vs ob @@ -273,13 +276,17 @@ ccrG = esccr(ug,vg,0) - score_max = 5.0 + score_max = 10.0 ; Miomass = (ccrG*ccrG)* score_max ; new eq bias = sum(abs(ug-vg)/(abs(ug)+abs(vg))) + print ("bias=" + bias + "dimsizes(ug)=" + dimsizes(ug)) + print ("other bias=" + sum(abs(ug-vg)/(ug+vg))) Mbiomass = (1. - (bias/dimsizes(ug)))*score_max + print ("Mbiomass=" + Mbiomass) M_biomass = sprintf("%.2f", Mbiomass) + print ("M_biomass=" + M_biomass) if (isvar("compare")) then system("sed -e '1,/M_biomass/s/M_biomass/"+M_biomass+"/' "+html_name2+" > "+html_new2+";"+ \ @@ -309,7 +316,7 @@ ;(b) model - title = "Model "+ model_name + title = "Model "+ model_name + " (2000)" resg@tiMainString = title plot(1) = gsn_csm_contour_map_ce(wks,datamod,resg) @@ -318,7 +325,7 @@ zz = datamod zz = datamod - dataob - title = "Model_"+model_name+" - Observed" + title = "Model "+model_name+" (2000) - Observed" resg@cnMinLevelValF = -10. ; Min level resg@cnMaxLevelValF = 10. ; Max level @@ -340,6 +347,7 @@ system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) + ;system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new) resg@gsnFrame = True ; draw plot resg@gsnDraw = True ; advance frame @@ -363,7 +371,7 @@ gRes@txFontHeightF = 0.02 gRes@txAngleF = 0 - area_avg_text = "(average over mask area = "+sprintf("%.2f", avg_ob)+" Kg C/m2)" + area_avg_text = "(average over mask area = "+sprintf("%.2f", avg_ob)+" kg C m~S~-2~N~)" gsn_text_ndc(wks,area_avg_text,0.50,0.81,gRes) ;----------------------------------------- @@ -377,6 +385,7 @@ system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) + ;system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new) ;------------------------------------------------------------------------ ; contour model: masked @@ -386,7 +395,7 @@ resg@cnLevelSpacingF = 2. ; interval plot_name = "global_mask_model" - title = "Model "+ model_name + title = "Model "+ model_name + " (2000)" resg@tiMainString = title wks = gsn_open_wks (plot_type,plot_name) ; open workstation @@ -398,7 +407,7 @@ gRes@txFontHeightF = 0.02 gRes@txAngleF = 0 - area_avg_text = "(average over mask area = "+sprintf("%.2f", avg_mod)+" Kg C/m2)" + area_avg_text = "(average over mask area = "+sprintf("%.2f", avg_mod)+" kg C m~S~-2~N~)" gsn_text_ndc(wks,area_avg_text,0.50,0.81,gRes) ;----------------------------------------- @@ -412,6 +421,7 @@ system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) + ;system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new) ;------------------------------------------------------------------------ ; contour model vs ob: masked @@ -434,7 +444,7 @@ delete (ug) delete (vg) - score_max = 5. + score_max = 0. uu = ndtooned(zm) vv = ndtooned(zo) @@ -488,7 +498,7 @@ ;(b) model - title = "Model "+ model_name + title = "Model "+ model_name + " (2000)" resg@tiMainString = title plot(1) = gsn_csm_contour_map_ce(wks,zm,resg) @@ -497,7 +507,7 @@ zz = zo zz = zm - zo - title = "Model_"+model_name+" - Observed" + title = "Model "+model_name+" (2000) - Observed" resg@cnMinLevelValF = -10. ; Min level resg@cnMaxLevelValF = 10. ; Max level @@ -518,6 +528,7 @@ system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) + ;system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new) ;*************************************************************************** ; add total score and write to file