# HG changeset patch # User Forrest Hoffman # Date 1238090541 14400 # Node ID 4be95183fbcd4e3ca5e9e211fa1dc4d2f36d4ad6 # Parent 0c6405ab2ff4f69dd34fc64427ac869ee1ac0500 Modifications to scoring and graphics production for the final version of code for the C-LAMP paper in GCB. diff -r 0c6405ab2ff4 -r 4be95183fbcd all/01.npp.ncl --- a/all/01.npp.ncl Mon Jan 26 22:08:20 2009 -0500 +++ b/all/01.npp.ncl Thu Mar 26 14:02:21 2009 -0400 @@ -193,7 +193,8 @@ ;(3) global data, interpolated into model grid dirg = diro + "npp/" - filg = "Npp_"+model_grid+"_mean.nc" + ;filg = "Npp_"+model_grid+"_mean.nc" + filg = "npp_"+model_grid+"_mean_2000-2004.nc" fglobe = addfile (dirg+filg,"r") nppglobe0 = fglobe->NPP @@ -225,11 +226,11 @@ ; ; rain81 : mm/year ; rainmod : mm/s -; npp81 : g C/m^2/year -; nppmod81: g C/m^2/s -; nppglobe: g C/m^2/year +; npp81 : gC/m^2/year +; nppmod81: gC/m^2/s +; nppglobe: gC/m^2/year ; -; We want to convert these to "m/year" and "g C/m^2/year". +; We want to convert these to "m/year" and "gC/m^2/year". nsec_per_year = 60*60*24*365 @@ -243,27 +244,27 @@ nppmod = nppmod * nsec_per_year - npp81@units = "gC/m^2/yr" - nppmod81@units = "gC/m^2/yr" - npp933@units = "gC/m^2/yr" - nppmod933@units = "gC/m^2/yr" - nppmod@units = "gC/m^2/yr" - nppglobe@units = "gC/m^2/yr" - rain81@units = "m/yr" - rainmod81@units = "m/yr" - rain933@units = "m/yr" - rainmod933@units = "m/yr" + npp81@units = "gC m~S~-2~N~ y~S~-1~N~" + nppmod81@units = "gC m~S~-2~N~ y~S~-1~N~" + npp933@units = "gC m~S~-2~N~ y~S~-1~N~" + nppmod933@units = "gC m~S~-2~N~ y~S~-1~N~" + nppmod@units = "gC m~S~-2~N~ y~S~-1~N~" + nppglobe@units = "gC m~S~-2~N~ y~S~-1~N~" + rain81@units = "m y~S~-1~N~" + rainmod81@units = "m y~S~-1~N~" + rain933@units = "m y~S~-1~N~" + rainmod933@units = "m y~S~-1~N~" - npp81@long_name = "Obs. NPP (gC/m2/year)" - npp933@long_name = "Obs. NPP (gC/m2/year)" - nppmod81@long_name = "Model NPP (gC/m2/year)" - nppmod933@long_name = "Model NPP (gC/m2/year)" - nppmod@long_name = "Model NPP (gC/m2/year)" - nppglobe@long_name = "NPP (gC/m2/year)" - rain81@long_name = "PREC (m/year)" - rain933@long_name = "PREC (m/year)" - rainmod81@long_name = "PREC (m/year)" - rainmod933@long_name = "PREC (m/year)" + npp81@long_name = "Obs. NPP (gC m~S~-2~N~ y~S~-1~N~)" + npp933@long_name = "Obs. NPP (gC m~S~-2~N~ y~S~-1~N~)" + nppmod81@long_name = "Model NPP (gC m~S~-2~N~ y~S~-1~N~)" + nppmod933@long_name = "Model NPP (gC m~S~-2~N~ y~S~-1~N~)" + nppmod@long_name = "Model NPP (gC m~S~-2~N~ y~S~-1~N~)" + nppglobe@long_name = "NPP (gC m~S~-2~N~ y~S~-1~N~)" + rain81@long_name = "PREC (m y~S~-1~N~)" + rain933@long_name = "PREC (m y~S~-1~N~)" + rainmod81@long_name = "PREC (m y~S~-1~N~)" + rainmod933@long_name = "PREC (m y~S~-1~N~)" ; change longitude from 0-360 to -180-180 x81 = where(x81 .gt. 180., x81 -360., x81 ) @@ -289,8 +290,8 @@ ," Site ID" \ ," Latitude" \ ," Longitude" \ - ," NPP(gC/m2/year)" \ - ," PPT(m/year)" \ + ," NPP (gC m-2 y-1)" \ + ," PPT (m y-1)" \ ,"" \ /) table_footer = "" @@ -354,8 +355,8 @@ ," Site ID" \ ," Latitude" \ ," Longitude" \ - ," NPP(gC/m2/year)" \ - ," PPT(m/year)" \ + ," NPP (gC m-2 y-1)" \ + ," PPT (m y-1)" \ ,"" \ /) table_footer = "" @@ -425,8 +426,8 @@ ," Site ID" \ ," Latitude" \ ," Longitude" \ - ," NPP(gC/m2.year)" \ - ," RAIN(m/year)" \ + ," NPP (gC m-2 y-1)" \ + ," RAIN (m y-1)" \ ,"" \ ,"" \ ," observed" \ @@ -506,8 +507,8 @@ ," Site ID" \ ," Latitude" \ ," Longitude" \ - ," NPP(gC/m2.year)" \ - ," RAIN(m/year)" \ + ," NPP (gC m-2 y-1)" \ + ," RAIN (m y-1)" \ ,"" \ ,"" \ ," observed" \ @@ -569,7 +570,8 @@ ;*************************************************************************** plot_name = "scatter_model_vs_ob_81" - title = model_name +" vs Class A observations (81 sites)" + ;title = model_name +" vs Class A observations (81 sites)" + title = model_name +" (1975-2000) vs Class A observations (81 sites)" wks = gsn_open_wks (plot_type,plot_name) ; open workstation res = True ; plot mods desired @@ -587,7 +589,7 @@ ccr81 = esccr(nppmod81,npp81,0) ;print (ccr81) - score_max = 2.5 + score_max = 1.0 bias = sum(abs(nppmod81-npp81)/(abs(nppmod81)+abs(npp81))) M81s = (1. - (bias/dimsizes(y81)))*score_max @@ -618,15 +620,16 @@ delete (wks) delete (dum) - system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ + system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) + ;system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new) ;*************************************************************************** ;(A)-6 scatter plot, model vs ob 933 ;*************************************************************************** plot_name = "scatter_model_vs_ob_933" - title = model_name +" vs Class B Observations (933 sites)" + title = model_name +" (1975-2000) vs Class B Observations (933 sites)" wks = gsn_open_wks (plot_type,plot_name) ; open workstation res = True ; plot mods desired @@ -644,7 +647,7 @@ ccr933 = esccr(nppmod933,npp933,0) - score_max = 2.5 + score_max = 1.0 bias = sum(abs(nppmod933-npp933)/(abs(nppmod933)+abs(npp933))) M933s = (1. - (bias/dimsizes(y933)))*score_max @@ -675,8 +678,9 @@ delete (wks) delete (dum) - system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ + system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) + ;system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new) ;************************************************************************** ;(B) histogram 81 @@ -711,7 +715,7 @@ ccr81h = esccr(uu,vv,0) - score_max = 2.5 + score_max = 2.0 bias = sum(abs(vv-uu)/(abs(vv)+abs(uu))) M81h = (1.- (bias/dimsizes(uu)))*score_max @@ -742,8 +746,8 @@ resh@trYMinF = min(mn_yvalues) - 10. resh@trYMaxF = max(mx_yvalues) + 10. - resh@tiYAxisString = "NPP (g C/m2/year)" - resh@tiXAxisString = "Precipitation (m/year)" + resh@tiYAxisString = "NPP (gC m~S~-2~N~ y~S~-1~N~)" + resh@tiXAxisString = "Precipitation (m y~S~-1~N~)" max_bar = new((/2,nx/),graphic) min_bar = new((/2,nx/),graphic) @@ -765,6 +769,9 @@ xy = gsn_csm_xy(wks,xvalues(0,:),yvalues(0,:),resh) + ; Added by Forrest Hoffman to print out values on Wed Feb 4 14:36:00 EST 2009 + print("Observations: " + xvalues(0,:) + " " + yvalues(0,:)) + ;------------------------------- ;Attach the vertical bar and the horizontal cap line @@ -809,15 +816,16 @@ draw(xy) delete (wks) - system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ + system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) + ;system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new) ;**************************************************************************** ;(B)-2 histogram plot, model vs ob 81 site ;**************************************************************************** plot_name = "histogram_model_vs_ob_81" - title = model_name+ " vs Class A Observations (81 sites)" + title = model_name+ " (1975-2000) vs Class A Observations (81 sites)" resh@tiMainString = title wks = gsn_open_wks (plot_type,plot_name) ; open workstation @@ -847,6 +855,10 @@ gsn_text_ndc(wks,correlation_text,0.56,0.85,tRes) xy = gsn_csm_xy(wks,xvalues,yvalues,resh) + + ; Added by Forrest Hoffman to print out values on Wed Feb 4 14:36:00 EST 2009 + print(model_name + ": " + xvalues(1,:) + " " + yvalues(1,:)) + ;print("All: " + xvalues(:,:) + " " + yvalues(:,:)) ;------------------------------- ;Attach the vertical bar and the horizontal cap line @@ -883,8 +895,9 @@ draw(xy) delete(wks) - system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ + system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) + ;system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new) delete (RAIN1_1D) delete (RAIN2_1D) @@ -935,7 +948,7 @@ ccr933h = esccr(uu,vv,0) - score_max = 2.5 + score_max = 2.0 bias = sum(abs(vv-uu)/(abs(vv)+abs(uu))) M933h = (1.- (bias/dimsizes(uu)))*score_max @@ -967,8 +980,8 @@ resh@trYMinF = min(mn_yvalues) - 10. resh@trYMaxF = max(mx_yvalues) + 10. - resh@tiYAxisString = "NPP (g C/m2/year)" - resh@tiXAxisString = "Precipitation (m/year)" + resh@tiYAxisString = "NPP (gC m~S~-2~N~ y~S~-1~N~)" + resh@tiXAxisString = "Precipitation (m y~S~-1~N~)" max_bar = new((/2,nx/),graphic) min_bar = new((/2,nx/),graphic) @@ -990,6 +1003,9 @@ xy = gsn_csm_xy(wks,xvalues(0,:),yvalues(0,:),resh) + ; Added by Forrest Hoffman to print out values on Wed Feb 4 14:36:00 EST 2009 + print("Observations: " + xvalues(0,:) + " " + yvalues(0,:)) + ;------------------------------- ;Attach the vertical bar and the horizontal cap line @@ -1027,15 +1043,16 @@ delete (xy) delete (wks) - system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ + system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) + ;system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new) ;**************************************************************************** ;(B)-4 histogram plot, model vs ob 933 site ;**************************************************************************** plot_name = "histogram_model_vs_ob_933" - title = model_name+ " vs Class B Observations (933 sites)" + title = model_name+ " (1975-2000) vs Class B Observations (933 sites)" resh@tiMainString = title wks = gsn_open_wks (plot_type,plot_name) ; open workstation @@ -1065,6 +1082,9 @@ gsn_text_ndc(wks,correlation_text,0.56,0.85,tRes) xy = gsn_csm_xy(wks,xvalues,yvalues,resh) + + ; Added by Forrest Hoffman to print out values on Wed Feb 4 14:36:00 EST 2009 + print("Observations: " + xvalues(1,:) + " " + yvalues(1,:)) ;------------------------------- ;Attach the vertical bar and the horizontal cap line @@ -1102,8 +1122,30 @@ delete(xy) delete(wks) - system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ + system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) + ;system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new) + +;*************************************************************************** +; Read 2000-2004 dataset for MODIS comparison +;*************************************************************************** + +;------------------------------------------------------ +; read model data + + fm = addfile (dirm+film9,"r") + + nppmod0 = fm->NPP + xm = fm->lon + ym = fm->lat + + delete (fm) + + nppmod = nppmod0(0,:,:) + delete (nppmod0) + nppmod = nppmod * nsec_per_year + nppmod@units = "gC m~S~-2~N~ y~S~-1~N~" + nppmod@long_name = "Model NPP (gC m~S~-2~N~ y~S~-1~N~)" ;*************************************************************************** ;(C) global contour @@ -1132,7 +1174,7 @@ nppglobe = where(ismissing(nppglobe).and.(ismissing(nppmod).or.(nppmod.lt.delta)),0.,nppglobe) plot_name = "global_ob" - title = "Observed MODIS MOD 17" + title = "MODIS MOD17A3 (2000-2004)" resg@tiMainString = title wks = gsn_open_wks (plot_type,plot_name) ; open workstation @@ -1142,14 +1184,15 @@ delete (wks) - system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ + system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) + ;system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new) ;**************************************************************************** ;(C)-2 global contour plot, model ;**************************************************************************** plot_name = "global_model" - title = "Model "+ model_name + title = "Model "+ model_name + " (2000-2004)" resg@tiMainString = title wks = gsn_open_wks (plot_type,plot_name) ; open workstation @@ -1159,8 +1202,9 @@ delete (wks) - system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ + system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) + ;system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new) ;**************************************************************************** ;(C)-3 global contour plot, model vs ob @@ -1190,7 +1234,7 @@ ccrG = esccr(ug,vg,0) - score_max = 5.0 + score_max = 2.0 MG = (ccrG*ccrG)* score_max M_npp_G = sprintf("%.2f", MG) @@ -1215,14 +1259,14 @@ ;-------------------------------------------------------------------- ;(a) ob - title = "Observed MODIS MOD 17" + title = "MODIS MOD17A3 (2000-2004)" resg@tiMainString = title plot(0) = gsn_csm_contour_map_ce(wks,nppglobe,resg) ;(b) model - title = "Model "+ model_name + title = "Model "+ model_name + " (2000-2004)" resg@tiMainString = title plot(1) = gsn_csm_contour_map_ce(wks,nppmod,resg) @@ -1231,7 +1275,7 @@ zz = nppmod zz = nppmod - nppglobe - title = "Model_"+model_name+" - Observed" + title = "Model "+model_name+" - MODIS MOD17A3" resg@cnMinLevelValF = -500 ; Min level resg@cnMaxLevelValF = 500. ; Max level @@ -1250,8 +1294,9 @@ delete (wks) delete (plot) - system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ + system("convert -trim -density 150 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) + ;system("convert -trim -density 150 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new) ;*************************************************************************** ;(D)-1 zonal line plot, ob @@ -1261,7 +1306,7 @@ vv@long_name = nppglobe@long_name plot_name = "zonal_ob" - title = "Observed MODIS MOD 17" + title = "MODIS MOD17A3 (2000-2004)" resz = True resz@tiMainString = title @@ -1272,8 +1317,9 @@ delete (wks) - system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ + system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) + ;system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new) ;**************************************************************************** ;(D)-2 zonal line plot, model vs ob @@ -1288,7 +1334,7 @@ ;------------------------------------------- ; compute correlation coef and M score - score_max = 5.0 + score_max = 2.0 ccrZ = esccr(s(1,:), s(0,:),0) MZ = (ccrZ*ccrZ)* score_max @@ -1303,7 +1349,7 @@ "mv -f "+html_new+" "+html_name) ;------------------------------------------- plot_name = "zonal_model_vs_ob" - title = "Zonal Average" + title = "Zonal Average (2000-2004)" resz@tiMainString = title wks = gsn_open_wks (plot_type,plot_name) @@ -1324,16 +1370,16 @@ resz@pmLegendDisplayMode = "Always" ; turn on legend resz@pmLegendSide = "Top" ; Change location of ; resz@pmLegendParallelPosF = .45 ; move units right - resz@pmLegendParallelPosF = .82 ; move units right + resz@pmLegendParallelPosF = .75 ; move units right resz@pmLegendOrthogonalPosF = -0.4 ; move units down resz@pmLegendWidthF = 0.10 ; Change width and resz@pmLegendHeightF = 0.10 ; height of legend. - resz@lgLabelFontHeightF = .02 ; change font height + resz@lgLabelFontHeightF = .015 ; change font height ; resz@lgTitleOn = True ; turn on legend title ; resz@lgTitleString = "Example" ; create legend title ; resz@lgTitleFontHeightF = .025 ; font of legend title - resz@xyExplicitLegendLabels = (/"Observed",model_name/) ; explicit labels + resz@xyExplicitLegendLabels = (/"MODIS MOD17A3",model_name/) ; explicit labels ;-------------------------------------------------------------------- zRes = True zRes@txFontHeightF = 0.025 @@ -1347,8 +1393,9 @@ delete (wks) - system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ + system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) + ;system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new) ;*************************************************************************** ; add total score and write to file diff -r 0c6405ab2ff4 -r 4be95183fbcd all/02.lai.ncl --- a/all/02.lai.ncl Mon Jan 26 22:08:20 2009 -0500 +++ b/all/02.lai.ncl Thu Mar 26 14:02:21 2009 -0400 @@ -94,8 +94,8 @@ ;--------------------------------- ; read lai data: observed - ;ob_name = "MODIS MOD 15A2 2000-2005" - ob_name = "MODIS MOD 15A2 2000-2004" + ;ob_name = "MODIS MOD15A2 (2000-2005)" + ob_name = "MODIS MOD15A2 (2000-2004)" dir_l = diro + "lai/" ;filo = "LAI_2000-2005_MONS_"+model_grid+".nc" @@ -145,7 +145,7 @@ delete (wks) - system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ + system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) ;************************************************ @@ -167,7 +167,7 @@ delete (wks) - system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ + system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) ;******************************************************************* @@ -258,6 +258,7 @@ if (m .eq. 0) then data_ob = dim_avg_Wrap(laiob (lat|:,lon|:,time|:)) data_mod = dim_avg_Wrap(laimod(lat|:,lon|:,time|:)) + score_max = 4.0 end if ; (B) Max @@ -283,6 +284,8 @@ data_mod(j,i) = max(laimod(:,j,i)) end do end do + + score_max = 5.0 end if @@ -309,6 +312,8 @@ data_mod(j,i) = maxind(laimod(:,j,i)) + 1 end do end do + + score_max = 6.0 end if @@ -373,7 +378,9 @@ ; compute correlation coef and M score ;===================================== - score_max = 5.0 + ; FMH: Max scores are depend on which component is being analyzed, so this + ; is now set in each if statement above. + ;score_max = 5.0 u = yvalues(0,:) v = yvalues(1,:) @@ -489,15 +496,17 @@ delete (wks) delete (plot) - system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ + system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) + ;system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new) + ;============================ ; global contour : model ;============================ plot_name = "global_"+component(m)+"_model" - title = "Model " + model_name + title = "Model " + model_name + " (2000-2004)" resg@tiMainString = title wks = gsn_open_wks (plot_type,plot_name) @@ -508,8 +517,9 @@ delete (wks) delete (plot) - system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ + system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) + ;system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new) ;================================ ; global contour: model vs ob @@ -544,7 +554,7 @@ ; plot model - title = "Model "+ model_name + title = "Model "+ model_name + " (2000-2004)" resg@tiMainString = title plot(1) = gsn_csm_contour_map_ce(wks,data_mod,resg) @@ -571,7 +581,7 @@ zz = data_mod zz = data_mod - data_ob - title = "Model_"+model_name+" - Observed" + title = "Model_"+model_name+" - MODIS MOD15A2" resg@tiMainString = title plot(2) = gsn_csm_contour_map_ce(wks,zz,resg) @@ -586,8 +596,9 @@ delete (wks) delete (plot) - system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ + system("convert -trim -density 150 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) + ;system("convert -trim -density 150 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new) delete (data_ob) delete (data_mod) @@ -833,7 +844,7 @@ delete (wks) delete (plot) - system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ + system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) end do @@ -857,7 +868,7 @@ delete (wks) delete (plot) - system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ + system("convert -trim -density 100 "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new+";"+ \ "rm "+plot_name+"."+plot_type) delete (plot_data) diff -r 0c6405ab2ff4 -r 4be95183fbcd all/03.co2.ncl --- a/all/03.co2.ncl Mon Jan 26 22:08:20 2009 -0500 +++ b/all/03.co2.ncl Thu Mar 26 14:02:21 2009 -0400 @@ -186,7 +186,7 @@ if (z .eq. 3) then zone = "90S-EQ" - score_max = 5.0 + score_max = 0.0 ind_z = ind(lat_ob .lt. 0. ) end if 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 diff -r 0c6405ab2ff4 -r 4be95183fbcd all/06.fluxnet.ncl --- a/all/06.fluxnet.ncl Mon Jan 26 22:08:20 2009 -0500 +++ b/all/06.fluxnet.ncl Thu Mar 26 14:02:21 2009 -0400 @@ -530,7 +530,8 @@ ;*************************************************************************** ; add total score and write to file ;*************************************************************************** - M_total = M_fluxnet_all + ;M_total = M_fluxnet_all + M_total = 0.00 ; we don't actually use these scores asciiwrite("M_save.fluxnet", M_total) diff -r 0c6405ab2ff4 -r 4be95183fbcd all/07.beta.ncl --- a/all/07.beta.ncl Mon Jan 26 22:08:20 2009 -0500 +++ b/all/07.beta.ncl Thu Mar 26 14:02:21 2009 -0400 @@ -136,7 +136,7 @@ ;--------------------------------------------------- ;compute beta_4 - score_max = 3. + score_max = 10. beta_4 = new((/n_sta/),float) diff -r 0c6405ab2ff4 -r 4be95183fbcd all/10.fire.ncl --- a/all/10.fire.ncl Mon Jan 26 22:08:20 2009 -0500 +++ b/all/10.fire.ncl Thu Mar 26 14:02:21 2009 -0400 @@ -74,7 +74,10 @@ fm = addfile (dirm+film7,"r") + ; FMH: This was Jeff's, but I got an error data_mod = fm->COL_FIRE_CLOSS(18:25,:,:,:) + ; FMH: So I'll try this + ;data_mod = fm->COL_FIRE_CLOSS(17:24,:,:,:) delete (fm) @@ -192,7 +195,7 @@ ;---------------------------------------------------- ; compute M_global - score_max = 1. + score_max = 2.5 Mscore1 = cc_space * cc_space * score_max @@ -542,7 +545,7 @@ ; unit change from TgC/month to PgC/month unit_factor = 1.e-3 - score_max = 1. + score_max = 2.5 tmp_ob = new((/ntime/),float) tmp_mod = new((/ntime/),float) @@ -607,7 +610,7 @@ ;------------------------------------------ ; data for table : global - score_max = 1. + score_max = 2.5 tmp_ob = ndtooned(yvalues_g(:,0,:)) tmp_mod = ndtooned(yvalues_g(:,1,:)) diff -r 0c6405ab2ff4 -r 4be95183fbcd all/11.ameriflux.ncl --- a/all/11.ameriflux.ncl Mon Jan 26 22:08:20 2009 -0500 +++ b/all/11.ameriflux.ncl Thu Mar 26 14:02:21 2009 -0400 @@ -557,7 +557,8 @@ ; compute annual cycle correlation coef and M score ;************************************************************ - score_max = 1. + ;score_max = 1. + score_max = (/6., 0., 9., 9., 6., 0./) ccr = new ((/nstation, nfield/),float) M_score = new ((/nstation, nfield/),float) @@ -566,7 +567,7 @@ do m=0,nfield-1 ccr(n,m) = esccr(data_ob_ann(m,:,n),data_mod_ann(m,:,n),0) bias = sum(abs(data_mod_ann(m,:,n)-data_ob_ann(m,:,n))/(abs(data_mod_ann(m,:,n))+abs(data_ob_ann(m,:,n)))) - M_score(n,m) = (1. -(bias/nmonth)) * score_max + M_score(n,m) = (1. -(bias/nmonth)) * score_max(m) end do end do diff -r 0c6405ab2ff4 -r 4be95183fbcd all/run_1-model.csh --- a/all/run_1-model.csh Mon Jan 26 22:08:20 2009 -0500 +++ b/all/run_1-model.csh Thu Mar 26 14:02:21 2009 -0400 @@ -58,7 +58,10 @@ else set TEMPLATE = template_1-model_noCO2 endif -cp -r $DIR_SCRIPTS/$TEMPLATE $MODEL +#cp -r $DIR_SCRIPTS/$TEMPLATE $MODEL +rm -rf $MODEL +tar xvpf $DIR_SCRIPTS/$TEMPLATE.tar +mv $TEMPLATE $MODEL # add quote, to be usesd in INPUT_TEXT set MODELQ = \"$MODEL\" diff -r 0c6405ab2ff4 -r 4be95183fbcd all/run_2-model.csh --- a/all/run_2-model.csh Mon Jan 26 22:08:20 2009 -0500 +++ b/all/run_2-model.csh Thu Mar 26 14:02:21 2009 -0400 @@ -70,8 +70,14 @@ set TEMPLATE1 = template_1-model_noCO2 set TEMPLATE2 = template_2-model_noCO2 endif -cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL1 -cp -r $DIR_SCRIPTS/$TEMPLATE2 $COMPARE +#cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL1 +#cp -r $DIR_SCRIPTS/$TEMPLATE2 $COMPARE +rm -rf $MODEL1 +rm -rf $COMPARE +tar xvpf $DIR_SCRIPTS/$TEMPLATE1.tar +mv $TEMPLATE1 $MODEL1 +tar xvpf $DIR_SCRIPTS/$TEMPLATE2.tar +mv $TEMPLATE2 $COMPARE # add quote, to be usesd in INPUT_TEXT set MODELQ = \"$MODEL1\" @@ -147,7 +153,11 @@ else set TEMPLATE1 = template_1-model_noCO2 endif -cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL2 +#cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL2 +rm -rf $MODEL2 +tar xvpf $DIR_SCRIPTS/$TEMPLATE1.tar +mv $TEMPLATE1 $MODEL2 + # add quote, to be usesd in INPUT_TEXT set MODELQ = \"$MODEL2\" diff -r 0c6405ab2ff4 -r 4be95183fbcd all/run_2-model_36cn_37cn_cont.csh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/all/run_2-model_36cn_37cn_cont.csh Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,247 @@ +#!/bin/csh -f +#------------------------------------------------------------------- +# note: user modifies ONLY the "user modification" section +# +# COMPARE: model1 vs model2 +# MODELn : model name +# DIR_M : directory of model data +# DIR_O : directory of observed data +# DIR_S : directory of model surface data +# DIR_SCRIPTS : directory of run scripts +# FILE1 : time_mean climatology from CLM diagnostic package +# FILE2 : 12-monthly climatology from CLM diagnostic package +# FILE3 : 12-monthly climatology from ATM diagnostic package +# leave it blank, if no ATM file: +# set FILE3 = +# FILE7 : timeseries file generated from .... +# FILE8 : timeseries file generated from .... +# GRID : T31, T42, or 1.9 +# BGC : cn or casa +# ENERGY : new or old (fields in model data) +#------------------------------------------------------------------- + +#******************************************************* +# user modification-(1) + +# directory name of model comparison +#et COMPARE = b30.061n_vs_b30.061m +set COMPARE = i01.36cn_vs_i01.37cn_cont + +#******************************************************* +# user modification-(2) + +# model1 +set MODEL1 = i01.36cn +set DIR_M = /lustre/wolf-ddn/scratch/hof/cases1/i01.36cn_out/ +set FILE1 = i01.36cn_out_ANN_climo.nc +set FILE2 = i01.36cn_out_MONS_climo.nc +set FILE3 = +set FILE4 = $FILE1 +set FILE5 = $FILE1 +set FILE6 = $FILE1 +set FILE7 = i01.36cn_Fire_C_2076-2100_monthly.nc +set FILE8 = i01.36cn_ameriflux_2076-2100_monthly.nc +set FILE9 = $FILE1 +set FILE10 = $FILE2 +set GRID = 1.9 +set BGC = cn +set ENERGY = old + +# in the "CLAMP metric processing" section: +# only 00.initial.ncl and 99.final.ncl are required, +# user can comment out any one or more of the other ncl scripts, +# e.g. +# #ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl + +# model surface data +set DIR_S = /lustre/wolf-ddn/scratch/hof/clamp_data/surface_model/ + +# observed data +set DIR_O = /lustre/wolf-ddn/scratch/hof/clamp_data/observed/ + +# directory for scripts, templates and ncl files +set DIR_SCRIPTS = /lustre/wolf-ddn/scratch/hof/clamp/all/ + +#******************************************************** + +# create model1 and model1_vs_model2 directory by copying templates +if ($FILE3 != "") then + set TEMPLATE1 = template_1-model + set TEMPLATE2 = template_2-model +else + set TEMPLATE1 = template_1-model_noCO2 + set TEMPLATE2 = template_2-model_noCO2 +endif +#cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL1 +#cp -r $DIR_SCRIPTS/$TEMPLATE2 $COMPARE +rm -rf $MODEL1 +rm -rf $COMPARE +tar xvpf $DIR_SCRIPTS/$TEMPLATE1.tar +mv $TEMPLATE1 $MODEL1 +tar xvpf $DIR_SCRIPTS/$TEMPLATE2.tar +mv $TEMPLATE2 $COMPARE + +# add quote, to be usesd in INPUT_TEXT +set MODELQ = \"$MODEL1\" +set DIRMQ = \"$DIR_M\" +set F1 = \"$FILE1\" +set F2 = \"$FILE2\" +set F3 = \"$FILE3\" +set F4 = \"$FILE4\" +set F5 = \"$FILE5\" +set F6 = \"$FILE6\" +set F7 = \"$FILE7\" +set F8 = \"$FILE8\" +set F9 = \"$FILE9\" +set F10 = \"$FILE10\" +set GRIDQ = \"$GRID\" +set BGCQ = \"$BGC\" +set ENERGYQ = \"$ENERGY\" +set DIRSQ = \"$DIR_S\" +set DIROQ = \"$DIR_O\" +set DIRCQ = \"$DIR_SCRIPTS\" + +set COMPAREQ = \"$COMPARE\" +set MODELN = \"model1\" + +set INPUT_TEXT = "model_name=$MODELQ model_grid=$GRIDQ dirm=$DIRMQ film1=$F1 film2=$F2 film3=$F3 film4=$F4 film5=$F5 film6=$F6 film7=$F7 film8=$F8 film9=$F9 film10=$F10 BGC=$BGCQ ENERGY=$ENERGYQ dirs=$DIRSQ diro=$DIROQ dirscript=$DIRCQ modeln=$MODELN compare=$COMPAREQ" + +echo "`date` - Running diagnostics for model ${MODELQ}" +# CLAMP metric processing of model1 +echo "`date` - Running 00.initial.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/00.initial.ncl +echo "`date` - Running 01.npp.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/01.npp.ncl +echo "`date` - Running 01.lai.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/02.lai.ncl + +if ($FILE3 != "") then +echo "`date` - Running 03.co2.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/03.co2.ncl +endif + +echo "`date` - Running 04.biomass.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/04.biomass.ncl +echo "`date` - Running 06.fluxnet.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/06.fluxnet.ncl +echo "`date` - Running 07.beta.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/07.beta.ncl +echo "`date` - Running 08.turnover.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/08.turnover.ncl + +if ($BGC != "casa") then +echo "`date` - Running 09.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09.carbon_sink.ncl +else +echo "`date` - Running 09x.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09x.carbon_sink.ncl +endif + +if ($BGC != "casa") then +echo "`date` - Running 10.fire.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl +endif + +echo "`date` - Running 11.ameriflux.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/11.ameriflux.ncl +echo "`date` - Running 99.final.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/99.final.ncl + +#******************************************************* +# user modification-(3) + +# model2 +set MODEL2 = i01.37cn_cont +set DIR_M = /lustre/wolf-ddn/scratch/hof/cases/i01.37cn_cont_out/ +set FILE1 = i01.37cn_cont_out_ANN_climo.nc +set FILE2 = i01.37cn_cont_out_MONS_climo.nc +set FILE3 = +set FILE4 = $FILE1 +set FILE5 = $FILE1 +set FILE6 = $FILE1 +set FILE7 = i01.37cn_cont_Fire_C_2976-3000_monthly.nc +set FILE8 = i01.37cn_cont_ameriflux_2976-3000_monthly.nc +set FILE9 = $FILE1 +set FILE10 = $FILE2 +set GRID = 1.9 +set BGC = cn +set ENERGY = old +#******************************************************* +# create model2 directory by copying templates +if ($FILE3 != "") then + set TEMPLATE1 = template_1-model +else + set TEMPLATE1 = template_1-model_noCO2 +endif +#cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL2 +rm -rf $MODEL2 +tar xvpf $DIR_SCRIPTS/$TEMPLATE1.tar +mv $TEMPLATE1 $MODEL2 + +# add quote, to be usesd in INPUT_TEXT +set MODELQ = \"$MODEL2\" +set DIRMQ = \"$DIR_M\" +set F1 = \"$FILE1\" +set F2 = \"$FILE2\" +set F3 = \"$FILE3\" +set F4 = \"$FILE4\" +set F5 = \"$FILE5\" +set F6 = \"$FILE6\" +set F7 = \"$FILE7\" +set F8 = \"$FILE8\" +set F9 = \"$FILE9\" +set F10 = \"$FILE10\" +set GRIDQ = \"$GRID\" +set BGCQ = \"$BGC\" +set ENERGYQ = \"$ENERGY\" + +set COMPAREQ = \"$COMPARE\" +set MODELN = \"model2\" + +set INPUT_TEXT = "model_name=$MODELQ model_grid=$GRIDQ dirm=$DIRMQ film1=$F1 film2=$F2 film3=$F3 film4=$F4 film5=$F5 film6=$F6 film7=$F7 film8=$F8 film9=$F9 film10=$F10 BGC=$BGCQ ENERGY=$ENERGYQ dirs=$DIRSQ diro=$DIROQ dirscript=$DIRCQ modeln=$MODELN compare=$COMPAREQ" + +echo "`date` - Running diagnostics for model ${MODELQ}" +# CLAMP metric processing of model2 +echo "`date` - Running 00.inital.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/00.initial.ncl +echo "`date` - Running 01.npp.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/01.npp.ncl +echo "`date` - Running 02.lai.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/02.lai.ncl + +if ($FILE3 != "") then +echo "`date` - Running 03.co2.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/03.co2.ncl +endif + +echo "`date` - Running 04.biomass.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/04.biomass.ncl +echo "`date` - Running 06.fluxnet.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/06.fluxnet.ncl +echo "`date` - Running 07.beta.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/07.beta.ncl +echo "`date` - Running 08.turnover.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/08.turnover.ncl + +if ($BGC != "casa") then +echo "`date` - Running 09.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09.carbon_sink.ncl +else +echo "`date` - Running 09x.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09x.carbon_sink.ncl +endif + +if ($BGC != "casa") then +echo "`date` - Running 10.fire.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl +endif + +echo "`date` - Running 11.ameriflux.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/11.ameriflux.ncl +echo "`date` - Running 99.final.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/99.final.ncl + +# create a tar file from the final output +echo "`date` - tarring up final output into all.tar" +tar cf - $MODEL1 $MODEL2 $COMPARE > all.tar + diff -r 0c6405ab2ff4 -r 4be95183fbcd all/run_2-model_36cn_38cn.csh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/all/run_2-model_36cn_38cn.csh Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,247 @@ +#!/bin/csh -f +#------------------------------------------------------------------- +# note: user modifies ONLY the "user modification" section +# +# COMPARE: model1 vs model2 +# MODELn : model name +# DIR_M : directory of model data +# DIR_O : directory of observed data +# DIR_S : directory of model surface data +# DIR_SCRIPTS : directory of run scripts +# FILE1 : time_mean climatology from CLM diagnostic package +# FILE2 : 12-monthly climatology from CLM diagnostic package +# FILE3 : 12-monthly climatology from ATM diagnostic package +# leave it blank, if no ATM file: +# set FILE3 = +# FILE7 : timeseries file generated from .... +# FILE8 : timeseries file generated from .... +# GRID : T31, T42, or 1.9 +# BGC : cn or casa +# ENERGY : new or old (fields in model data) +#------------------------------------------------------------------- + +#******************************************************* +# user modification-(1) + +# directory name of model comparison +#et COMPARE = b30.061n_vs_b30.061m +set COMPARE = i01.36cn_vs_i01.38cn + +#******************************************************* +# user modification-(2) + +# model1 +set MODEL1 = i01.36cn +set DIR_M = /lustre/wolf-ddn/scratch/hof/cases1/i01.36cn_out/ +set FILE1 = i01.36cn_out_ANN_climo.nc +set FILE2 = i01.36cn_out_MONS_climo.nc +set FILE3 = +set FILE4 = $FILE1 +set FILE5 = $FILE1 +set FILE6 = $FILE1 +set FILE7 = i01.36cn_Fire_C_2076-2100_monthly.nc +set FILE8 = i01.36cn_ameriflux_2076-2100_monthly.nc +set FILE9 = $FILE1 +set FILE10 = $FILE2 +set GRID = 1.9 +set BGC = cn +set ENERGY = old + +# in the "CLAMP metric processing" section: +# only 00.initial.ncl and 99.final.ncl are required, +# user can comment out any one or more of the other ncl scripts, +# e.g. +# #ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl + +# model surface data +set DIR_S = /lustre/wolf-ddn/scratch/hof/clamp_data/surface_model/ + +# observed data +set DIR_O = /lustre/wolf-ddn/scratch/hof/clamp_data/observed/ + +# directory for scripts, templates and ncl files +set DIR_SCRIPTS = /lustre/wolf-ddn/scratch/hof/clamp/all/ + +#******************************************************** + +# create model1 and model1_vs_model2 directory by copying templates +if ($FILE3 != "") then + set TEMPLATE1 = template_1-model + set TEMPLATE2 = template_2-model +else + set TEMPLATE1 = template_1-model_noCO2 + set TEMPLATE2 = template_2-model_noCO2 +endif +#cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL1 +#cp -r $DIR_SCRIPTS/$TEMPLATE2 $COMPARE +rm -rf $MODEL1 +rm -rf $COMPARE +tar xvpf $DIR_SCRIPTS/$TEMPLATE1.tar +mv $TEMPLATE1 $MODEL1 +tar xvpf $DIR_SCRIPTS/$TEMPLATE2.tar +mv $TEMPLATE2 $COMPARE + +# add quote, to be usesd in INPUT_TEXT +set MODELQ = \"$MODEL1\" +set DIRMQ = \"$DIR_M\" +set F1 = \"$FILE1\" +set F2 = \"$FILE2\" +set F3 = \"$FILE3\" +set F4 = \"$FILE4\" +set F5 = \"$FILE5\" +set F6 = \"$FILE6\" +set F7 = \"$FILE7\" +set F8 = \"$FILE8\" +set F9 = \"$FILE9\" +set F10 = \"$FILE10\" +set GRIDQ = \"$GRID\" +set BGCQ = \"$BGC\" +set ENERGYQ = \"$ENERGY\" +set DIRSQ = \"$DIR_S\" +set DIROQ = \"$DIR_O\" +set DIRCQ = \"$DIR_SCRIPTS\" + +set COMPAREQ = \"$COMPARE\" +set MODELN = \"model1\" + +set INPUT_TEXT = "model_name=$MODELQ model_grid=$GRIDQ dirm=$DIRMQ film1=$F1 film2=$F2 film3=$F3 film4=$F4 film5=$F5 film6=$F6 film7=$F7 film8=$F8 film9=$F9 film10=$F10 BGC=$BGCQ ENERGY=$ENERGYQ dirs=$DIRSQ diro=$DIROQ dirscript=$DIRCQ modeln=$MODELN compare=$COMPAREQ" + +echo "`date` - Running diagnostics for model ${MODELQ}" +# CLAMP metric processing of model1 +echo "`date` - Running 00.initial.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/00.initial.ncl +echo "`date` - Running 01.npp.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/01.npp.ncl +echo "`date` - Running 01.lai.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/02.lai.ncl + +if ($FILE3 != "") then +echo "`date` - Running 03.co2.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/03.co2.ncl +endif + +echo "`date` - Running 04.biomass.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/04.biomass.ncl +echo "`date` - Running 06.fluxnet.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/06.fluxnet.ncl +echo "`date` - Running 07.beta.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/07.beta.ncl +echo "`date` - Running 08.turnover.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/08.turnover.ncl + +if ($BGC != "casa") then +echo "`date` - Running 09.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09.carbon_sink.ncl +else +echo "`date` - Running 09x.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09x.carbon_sink.ncl +endif + +if ($BGC != "casa") then +echo "`date` - Running 10.fire.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl +endif + +echo "`date` - Running 11.ameriflux.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/11.ameriflux.ncl +echo "`date` - Running 99.final.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/99.final.ncl + +#******************************************************* +# user modification-(3) + +# model2 +set MODEL2 = i01.38cn +set DIR_M = /lustre/wolf-ddn/scratch/hof/cases1/i01.38cn_out/ +set FILE1 = i01.38cn_out_ANN_climo.nc +set FILE2 = i01.38cn_out_MONS_climo.nc +set FILE3 = +set FILE4 = $FILE1 +set FILE5 = $FILE1 +set FILE6 = $FILE1 +set FILE7 = i01.38cn_Fire_C_2151-2175_monthly.nc +set FILE8 = i01.38cn_ameriflux_2151-2175_monthly.nc +set FILE9 = $FILE1 +set FILE10 = $FILE2 +set GRID = 1.9 +set BGC = cn +set ENERGY = old +#******************************************************* +# create model2 directory by copying templates +if ($FILE3 != "") then + set TEMPLATE1 = template_1-model +else + set TEMPLATE1 = template_1-model_noCO2 +endif +#cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL2 +rm -rf $MODEL2 +tar xvpf $DIR_SCRIPTS/$TEMPLATE1.tar +mv $TEMPLATE1 $MODEL2 + +# add quote, to be usesd in INPUT_TEXT +set MODELQ = \"$MODEL2\" +set DIRMQ = \"$DIR_M\" +set F1 = \"$FILE1\" +set F2 = \"$FILE2\" +set F3 = \"$FILE3\" +set F4 = \"$FILE4\" +set F5 = \"$FILE5\" +set F6 = \"$FILE6\" +set F7 = \"$FILE7\" +set F8 = \"$FILE8\" +set F9 = \"$FILE9\" +set F10 = \"$FILE10\" +set GRIDQ = \"$GRID\" +set BGCQ = \"$BGC\" +set ENERGYQ = \"$ENERGY\" + +set COMPAREQ = \"$COMPARE\" +set MODELN = \"model2\" + +set INPUT_TEXT = "model_name=$MODELQ model_grid=$GRIDQ dirm=$DIRMQ film1=$F1 film2=$F2 film3=$F3 film4=$F4 film5=$F5 film6=$F6 film7=$F7 film8=$F8 film9=$F9 film10=$F10 BGC=$BGCQ ENERGY=$ENERGYQ dirs=$DIRSQ diro=$DIROQ dirscript=$DIRCQ modeln=$MODELN compare=$COMPAREQ" + +echo "`date` - Running diagnostics for model ${MODELQ}" +# CLAMP metric processing of model2 +echo "`date` - Running 00.inital.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/00.initial.ncl +echo "`date` - Running 01.npp.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/01.npp.ncl +echo "`date` - Running 02.lai.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/02.lai.ncl + +if ($FILE3 != "") then +echo "`date` - Running 03.co2.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/03.co2.ncl +endif + +echo "`date` - Running 04.biomass.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/04.biomass.ncl +echo "`date` - Running 06.fluxnet.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/06.fluxnet.ncl +echo "`date` - Running 07.beta.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/07.beta.ncl +echo "`date` - Running 08.turnover.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/08.turnover.ncl + +if ($BGC != "casa") then +echo "`date` - Running 09.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09.carbon_sink.ncl +else +echo "`date` - Running 09x.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09x.carbon_sink.ncl +endif + +if ($BGC != "casa") then +echo "`date` - Running 10.fire.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl +endif + +echo "`date` - Running 11.ameriflux.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/11.ameriflux.ncl +echo "`date` - Running 99.final.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/99.final.ncl + +# create a tar file from the final output +echo "`date` - tarring up final output into all.tar" +tar cf - $MODEL1 $MODEL2 $COMPARE > all.tar + diff -r 0c6405ab2ff4 -r 4be95183fbcd all/run_2-model_37cn_cont_42cn.csh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/all/run_2-model_37cn_cont_42cn.csh Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,247 @@ +#!/bin/csh -f +#------------------------------------------------------------------- +# note: user modifies ONLY the "user modification" section +# +# COMPARE: model1 vs model2 +# MODELn : model name +# DIR_M : directory of model data +# DIR_O : directory of observed data +# DIR_S : directory of model surface data +# DIR_SCRIPTS : directory of run scripts +# FILE1 : time_mean climatology from CLM diagnostic package +# FILE2 : 12-monthly climatology from CLM diagnostic package +# FILE3 : 12-monthly climatology from ATM diagnostic package +# leave it blank, if no ATM file: +# set FILE3 = +# FILE7 : timeseries file generated from .... +# FILE8 : timeseries file generated from .... +# GRID : T31, T42, or 1.9 +# BGC : cn or casa +# ENERGY : new or old (fields in model data) +#------------------------------------------------------------------- + +#******************************************************* +# user modification-(1) + +# directory name of model comparison +#et COMPARE = b30.061n_vs_b30.061m +set COMPARE = i01.37cn_cont_vs_i01.42cn + +#******************************************************* +# user modification-(2) + +# model1 +set MODEL1 = i01.37cn_cont +set DIR_M = /lustre/wolf-ddn/scratch/hof/cases/i01.37cn_cont_out/ +set FILE1 = i01.37cn_cont_out_ANN_climo.nc +set FILE2 = i01.37cn_cont_out_MONS_climo.nc +set FILE3 = +set FILE4 = $FILE1 +set FILE5 = $FILE1 +set FILE6 = $FILE1 +set FILE7 = i01.37cn_cont_Fire_C_2976-3000_monthly.nc +set FILE8 = i01.37cn_cont_ameriflux_2976-3000_monthly.nc +set FILE9 = $FILE1 +set FILE10 = $FILE2 +set GRID = 1.9 +set BGC = cn +set ENERGY = old + +# in the "CLAMP metric processing" section: +# only 00.initial.ncl and 99.final.ncl are required, +# user can comment out any one or more of the other ncl scripts, +# e.g. +# #ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl + +# model surface data +set DIR_S = /lustre/wolf-ddn/scratch/hof/clamp_data/surface_model/ + +# observed data +set DIR_O = /lustre/wolf-ddn/scratch/hof/clamp_data/observed/ + +# directory for scripts, templates and ncl files +set DIR_SCRIPTS = /lustre/wolf-ddn/scratch/hof/clamp/all/ + +#******************************************************** + +# create model1 and model1_vs_model2 directory by copying templates +if ($FILE3 != "") then + set TEMPLATE1 = template_1-model + set TEMPLATE2 = template_2-model +else + set TEMPLATE1 = template_1-model_noCO2 + set TEMPLATE2 = template_2-model_noCO2 +endif +#cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL1 +#cp -r $DIR_SCRIPTS/$TEMPLATE2 $COMPARE +rm -rf $MODEL1 +rm -rf $COMPARE +tar xvpf $DIR_SCRIPTS/$TEMPLATE1.tar +mv $TEMPLATE1 $MODEL1 +tar xvpf $DIR_SCRIPTS/$TEMPLATE2.tar +mv $TEMPLATE2 $COMPARE + +# add quote, to be usesd in INPUT_TEXT +set MODELQ = \"$MODEL1\" +set DIRMQ = \"$DIR_M\" +set F1 = \"$FILE1\" +set F2 = \"$FILE2\" +set F3 = \"$FILE3\" +set F4 = \"$FILE4\" +set F5 = \"$FILE5\" +set F6 = \"$FILE6\" +set F7 = \"$FILE7\" +set F8 = \"$FILE8\" +set F9 = \"$FILE9\" +set F10 = \"$FILE10\" +set GRIDQ = \"$GRID\" +set BGCQ = \"$BGC\" +set ENERGYQ = \"$ENERGY\" +set DIRSQ = \"$DIR_S\" +set DIROQ = \"$DIR_O\" +set DIRCQ = \"$DIR_SCRIPTS\" + +set COMPAREQ = \"$COMPARE\" +set MODELN = \"model1\" + +set INPUT_TEXT = "model_name=$MODELQ model_grid=$GRIDQ dirm=$DIRMQ film1=$F1 film2=$F2 film3=$F3 film4=$F4 film5=$F5 film6=$F6 film7=$F7 film8=$F8 film9=$F9 film10=$F10 BGC=$BGCQ ENERGY=$ENERGYQ dirs=$DIRSQ diro=$DIROQ dirscript=$DIRCQ modeln=$MODELN compare=$COMPAREQ" + +echo "`date` - Running diagnostics for model ${MODELQ}" +# CLAMP metric processing of model1 +echo "`date` - Running 00.initial.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/00.initial.ncl +echo "`date` - Running 01.npp.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/01.npp.ncl +echo "`date` - Running 01.lai.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/02.lai.ncl + +if ($FILE3 != "") then +echo "`date` - Running 03.co2.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/03.co2.ncl +endif + +echo "`date` - Running 04.biomass.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/04.biomass.ncl +echo "`date` - Running 06.fluxnet.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/06.fluxnet.ncl +echo "`date` - Running 07.beta.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/07.beta.ncl +echo "`date` - Running 08.turnover.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/08.turnover.ncl + +if ($BGC != "casa") then +echo "`date` - Running 09.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09.carbon_sink.ncl +else +echo "`date` - Running 09x.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09x.carbon_sink.ncl +endif + +if ($BGC != "casa") then +echo "`date` - Running 10.fire.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl +endif + +echo "`date` - Running 11.ameriflux.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/11.ameriflux.ncl +echo "`date` - Running 99.final.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/99.final.ncl + +#******************************************************* +# user modification-(3) + +# model2 +set MODEL2 = i01.42cn +set DIR_M = /lustre/wolf-ddn/scratch/hof/cases/i01.42cn_out/ +set FILE1 = i01.42cn_out_ANN_climo.nc +set FILE2 = i01.42cn_out_MONS_climo.nc +set FILE3 = +set FILE4 = $FILE1 +set FILE5 = $FILE1 +set FILE6 = $FILE1 +set FILE7 = i01.42cn_Fire_C_2976-3000_monthly.nc +set FILE8 = i01.42cn_ameriflux_2976-3000_monthly.nc +set FILE9 = $FILE1 +set FILE10 = $FILE2 +set GRID = 1.9 +set BGC = cn +set ENERGY = old +#******************************************************* +# create model2 directory by copying templates +if ($FILE3 != "") then + set TEMPLATE1 = template_1-model +else + set TEMPLATE1 = template_1-model_noCO2 +endif +#cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL2 +rm -rf $MODEL2 +tar xvpf $DIR_SCRIPTS/$TEMPLATE1.tar +mv $TEMPLATE1 $MODEL2 + +# add quote, to be usesd in INPUT_TEXT +set MODELQ = \"$MODEL2\" +set DIRMQ = \"$DIR_M\" +set F1 = \"$FILE1\" +set F2 = \"$FILE2\" +set F3 = \"$FILE3\" +set F4 = \"$FILE4\" +set F5 = \"$FILE5\" +set F6 = \"$FILE6\" +set F7 = \"$FILE7\" +set F8 = \"$FILE8\" +set F9 = \"$FILE9\" +set F10 = \"$FILE10\" +set GRIDQ = \"$GRID\" +set BGCQ = \"$BGC\" +set ENERGYQ = \"$ENERGY\" + +set COMPAREQ = \"$COMPARE\" +set MODELN = \"model2\" + +set INPUT_TEXT = "model_name=$MODELQ model_grid=$GRIDQ dirm=$DIRMQ film1=$F1 film2=$F2 film3=$F3 film4=$F4 film5=$F5 film6=$F6 film7=$F7 film8=$F8 film9=$F9 film10=$F10 BGC=$BGCQ ENERGY=$ENERGYQ dirs=$DIRSQ diro=$DIROQ dirscript=$DIRCQ modeln=$MODELN compare=$COMPAREQ" + +echo "`date` - Running diagnostics for model ${MODELQ}" +# CLAMP metric processing of model2 +echo "`date` - Running 00.inital.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/00.initial.ncl +echo "`date` - Running 01.npp.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/01.npp.ncl +echo "`date` - Running 02.lai.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/02.lai.ncl + +if ($FILE3 != "") then +echo "`date` - Running 03.co2.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/03.co2.ncl +endif + +echo "`date` - Running 04.biomass.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/04.biomass.ncl +echo "`date` - Running 06.fluxnet.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/06.fluxnet.ncl +echo "`date` - Running 07.beta.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/07.beta.ncl +echo "`date` - Running 08.turnover.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/08.turnover.ncl + +if ($BGC != "casa") then +echo "`date` - Running 09.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09.carbon_sink.ncl +else +echo "`date` - Running 09x.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09x.carbon_sink.ncl +endif + +if ($BGC != "casa") then +echo "`date` - Running 10.fire.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl +endif + +echo "`date` - Running 11.ameriflux.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/11.ameriflux.ncl +echo "`date` - Running 99.final.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/99.final.ncl + +# create a tar file from the final output +echo "`date` - tarring up final output into all.tar" +tar cf - $MODEL1 $MODEL2 $COMPARE > all.tar + diff -r 0c6405ab2ff4 -r 4be95183fbcd all/run_2-model_37cn_cont_43cn.csh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/all/run_2-model_37cn_cont_43cn.csh Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,247 @@ +#!/bin/csh -f +#------------------------------------------------------------------- +# note: user modifies ONLY the "user modification" section +# +# COMPARE: model1 vs model2 +# MODELn : model name +# DIR_M : directory of model data +# DIR_O : directory of observed data +# DIR_S : directory of model surface data +# DIR_SCRIPTS : directory of run scripts +# FILE1 : time_mean climatology from CLM diagnostic package +# FILE2 : 12-monthly climatology from CLM diagnostic package +# FILE3 : 12-monthly climatology from ATM diagnostic package +# leave it blank, if no ATM file: +# set FILE3 = +# FILE7 : timeseries file generated from .... +# FILE8 : timeseries file generated from .... +# GRID : T31, T42, or 1.9 +# BGC : cn or casa +# ENERGY : new or old (fields in model data) +#------------------------------------------------------------------- + +#******************************************************* +# user modification-(1) + +# directory name of model comparison +#et COMPARE = b30.061n_vs_b30.061m +set COMPARE = i01.37cn_cont_vs_i01.43cn + +#******************************************************* +# user modification-(2) + +# model1 +set MODEL1 = i01.37cn_cont +set DIR_M = /lustre/wolf-ddn/scratch/hof/cases/i01.37cn_cont_out/ +set FILE1 = i01.37cn_cont_out_ANN_climo.nc +set FILE2 = i01.37cn_cont_out_MONS_climo.nc +set FILE3 = +set FILE4 = $FILE1 +set FILE5 = $FILE1 +set FILE6 = $FILE1 +set FILE7 = i01.37cn_cont_Fire_C_2976-3000_monthly.nc +set FILE8 = i01.37cn_cont_ameriflux_2976-3000_monthly.nc +set FILE9 = $FILE1 +set FILE10 = $FILE2 +set GRID = 1.9 +set BGC = cn +set ENERGY = old + +# in the "CLAMP metric processing" section: +# only 00.initial.ncl and 99.final.ncl are required, +# user can comment out any one or more of the other ncl scripts, +# e.g. +# #ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl + +# model surface data +set DIR_S = /lustre/wolf-ddn/scratch/hof/clamp_data/surface_model/ + +# observed data +set DIR_O = /lustre/wolf-ddn/scratch/hof/clamp_data/observed/ + +# directory for scripts, templates and ncl files +set DIR_SCRIPTS = /lustre/wolf-ddn/scratch/hof/clamp/all/ + +#******************************************************** + +# create model1 and model1_vs_model2 directory by copying templates +if ($FILE3 != "") then + set TEMPLATE1 = template_1-model + set TEMPLATE2 = template_2-model +else + set TEMPLATE1 = template_1-model_noCO2 + set TEMPLATE2 = template_2-model_noCO2 +endif +#cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL1 +#cp -r $DIR_SCRIPTS/$TEMPLATE2 $COMPARE +rm -rf $MODEL1 +rm -rf $COMPARE +tar xvpf $DIR_SCRIPTS/$TEMPLATE1.tar +mv $TEMPLATE1 $MODEL1 +tar xvpf $DIR_SCRIPTS/$TEMPLATE2.tar +mv $TEMPLATE2 $COMPARE + +# add quote, to be usesd in INPUT_TEXT +set MODELQ = \"$MODEL1\" +set DIRMQ = \"$DIR_M\" +set F1 = \"$FILE1\" +set F2 = \"$FILE2\" +set F3 = \"$FILE3\" +set F4 = \"$FILE4\" +set F5 = \"$FILE5\" +set F6 = \"$FILE6\" +set F7 = \"$FILE7\" +set F8 = \"$FILE8\" +set F9 = \"$FILE9\" +set F10 = \"$FILE10\" +set GRIDQ = \"$GRID\" +set BGCQ = \"$BGC\" +set ENERGYQ = \"$ENERGY\" +set DIRSQ = \"$DIR_S\" +set DIROQ = \"$DIR_O\" +set DIRCQ = \"$DIR_SCRIPTS\" + +set COMPAREQ = \"$COMPARE\" +set MODELN = \"model1\" + +set INPUT_TEXT = "model_name=$MODELQ model_grid=$GRIDQ dirm=$DIRMQ film1=$F1 film2=$F2 film3=$F3 film4=$F4 film5=$F5 film6=$F6 film7=$F7 film8=$F8 film9=$F9 film10=$F10 BGC=$BGCQ ENERGY=$ENERGYQ dirs=$DIRSQ diro=$DIROQ dirscript=$DIRCQ modeln=$MODELN compare=$COMPAREQ" + +echo "`date` - Running diagnostics for model ${MODELQ}" +# CLAMP metric processing of model1 +echo "`date` - Running 00.initial.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/00.initial.ncl +echo "`date` - Running 01.npp.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/01.npp.ncl +echo "`date` - Running 01.lai.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/02.lai.ncl + +if ($FILE3 != "") then +echo "`date` - Running 03.co2.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/03.co2.ncl +endif + +echo "`date` - Running 04.biomass.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/04.biomass.ncl +echo "`date` - Running 06.fluxnet.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/06.fluxnet.ncl +echo "`date` - Running 07.beta.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/07.beta.ncl +echo "`date` - Running 08.turnover.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/08.turnover.ncl + +if ($BGC != "casa") then +echo "`date` - Running 09.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09.carbon_sink.ncl +else +echo "`date` - Running 09x.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09x.carbon_sink.ncl +endif + +if ($BGC != "casa") then +echo "`date` - Running 10.fire.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl +endif + +echo "`date` - Running 11.ameriflux.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/11.ameriflux.ncl +echo "`date` - Running 99.final.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/99.final.ncl + +#******************************************************* +# user modification-(3) + +# model2 +set MODEL2 = i01.43cn +set DIR_M = /lustre/wolf-ddn/scratch/hof/cases1/i01.43cn_out/ +set FILE1 = i01.43cn_out_ANN_climo.nc +set FILE2 = i01.43cn_out_MONS_climo.nc +set FILE3 = +set FILE4 = $FILE1 +set FILE5 = $FILE1 +set FILE6 = $FILE1 +set FILE7 = i01.43cn_Fire_C_2876-2900_monthly.nc +set FILE8 = i01.43cn_ameriflux_2876-2900_monthly.nc +set FILE9 = $FILE1 +set FILE10 = $FILE2 +set GRID = 1.9 +set BGC = cn +set ENERGY = old +#******************************************************* +# create model2 directory by copying templates +if ($FILE3 != "") then + set TEMPLATE1 = template_1-model +else + set TEMPLATE1 = template_1-model_noCO2 +endif +#cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL2 +rm -rf $MODEL2 +tar xvpf $DIR_SCRIPTS/$TEMPLATE1.tar +mv $TEMPLATE1 $MODEL2 + +# add quote, to be usesd in INPUT_TEXT +set MODELQ = \"$MODEL2\" +set DIRMQ = \"$DIR_M\" +set F1 = \"$FILE1\" +set F2 = \"$FILE2\" +set F3 = \"$FILE3\" +set F4 = \"$FILE4\" +set F5 = \"$FILE5\" +set F6 = \"$FILE6\" +set F7 = \"$FILE7\" +set F8 = \"$FILE8\" +set F9 = \"$FILE9\" +set F10 = \"$FILE10\" +set GRIDQ = \"$GRID\" +set BGCQ = \"$BGC\" +set ENERGYQ = \"$ENERGY\" + +set COMPAREQ = \"$COMPARE\" +set MODELN = \"model2\" + +set INPUT_TEXT = "model_name=$MODELQ model_grid=$GRIDQ dirm=$DIRMQ film1=$F1 film2=$F2 film3=$F3 film4=$F4 film5=$F5 film6=$F6 film7=$F7 film8=$F8 film9=$F9 film10=$F10 BGC=$BGCQ ENERGY=$ENERGYQ dirs=$DIRSQ diro=$DIROQ dirscript=$DIRCQ modeln=$MODELN compare=$COMPAREQ" + +echo "`date` - Running diagnostics for model ${MODELQ}" +# CLAMP metric processing of model2 +echo "`date` - Running 00.inital.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/00.initial.ncl +echo "`date` - Running 01.npp.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/01.npp.ncl +echo "`date` - Running 02.lai.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/02.lai.ncl + +if ($FILE3 != "") then +echo "`date` - Running 03.co2.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/03.co2.ncl +endif + +echo "`date` - Running 04.biomass.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/04.biomass.ncl +echo "`date` - Running 06.fluxnet.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/06.fluxnet.ncl +echo "`date` - Running 07.beta.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/07.beta.ncl +echo "`date` - Running 08.turnover.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/08.turnover.ncl + +if ($BGC != "casa") then +echo "`date` - Running 09.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09.carbon_sink.ncl +else +echo "`date` - Running 09x.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09x.carbon_sink.ncl +endif + +if ($BGC != "casa") then +echo "`date` - Running 10.fire.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl +endif + +echo "`date` - Running 11.ameriflux.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/11.ameriflux.ncl +echo "`date` - Running 99.final.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/99.final.ncl + +# create a tar file from the final output +echo "`date` - tarring up final output into all.tar" +tar cf - $MODEL1 $MODEL2 $COMPARE > all.tar + diff -r 0c6405ab2ff4 -r 4be95183fbcd all/run_2-model_38cn_39cn.csh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/all/run_2-model_38cn_39cn.csh Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,247 @@ +#!/bin/csh -f +#------------------------------------------------------------------- +# note: user modifies ONLY the "user modification" section +# +# COMPARE: model1 vs model2 +# MODELn : model name +# DIR_M : directory of model data +# DIR_O : directory of observed data +# DIR_S : directory of model surface data +# DIR_SCRIPTS : directory of run scripts +# FILE1 : time_mean climatology from CLM diagnostic package +# FILE2 : 12-monthly climatology from CLM diagnostic package +# FILE3 : 12-monthly climatology from ATM diagnostic package +# leave it blank, if no ATM file: +# set FILE3 = +# FILE7 : timeseries file generated from .... +# FILE8 : timeseries file generated from .... +# GRID : T31, T42, or 1.9 +# BGC : cn or casa +# ENERGY : new or old (fields in model data) +#------------------------------------------------------------------- + +#******************************************************* +# user modification-(1) + +# directory name of model comparison +#et COMPARE = b30.061n_vs_b30.061m +set COMPARE = i01.38cn_vs_i01.39cn + +#******************************************************* +# user modification-(2) + +# model1 +set MODEL1 = i01.38cn +set DIR_M = /lustre/wolf-ddn/scratch/hof/cases1/i01.38cn_out/ +set FILE1 = i01.38cn_out_ANN_climo.nc +set FILE2 = i01.38cn_out_MONS_climo.nc +set FILE3 = +set FILE4 = $FILE1 +set FILE5 = $FILE1 +set FILE6 = $FILE1 +set FILE7 = i01.38cn_Fire_C_2151-2175_monthly.nc +set FILE8 = i01.38cn_ameriflux_2151-2175_monthly.nc +set FILE9 = $FILE1 +set FILE10 = $FILE2 +set GRID = 1.9 +set BGC = cn +set ENERGY = old + +# in the "CLAMP metric processing" section: +# only 00.initial.ncl and 99.final.ncl are required, +# user can comment out any one or more of the other ncl scripts, +# e.g. +# #ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl + +# model surface data +set DIR_S = /lustre/wolf-ddn/scratch/hof/clamp_data/surface_model/ + +# observed data +set DIR_O = /lustre/wolf-ddn/scratch/hof/clamp_data/observed/ + +# directory for scripts, templates and ncl files +set DIR_SCRIPTS = /lustre/wolf-ddn/scratch/hof/clamp/all/ + +#******************************************************** + +# create model1 and model1_vs_model2 directory by copying templates +if ($FILE3 != "") then + set TEMPLATE1 = template_1-model + set TEMPLATE2 = template_2-model +else + set TEMPLATE1 = template_1-model_noCO2 + set TEMPLATE2 = template_2-model_noCO2 +endif +#cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL1 +#cp -r $DIR_SCRIPTS/$TEMPLATE2 $COMPARE +rm -rf $MODEL1 +rm -rf $COMPARE +tar xvpf $DIR_SCRIPTS/$TEMPLATE1.tar +mv $TEMPLATE1 $MODEL1 +tar xvpf $DIR_SCRIPTS/$TEMPLATE2.tar +mv $TEMPLATE2 $COMPARE + +# add quote, to be usesd in INPUT_TEXT +set MODELQ = \"$MODEL1\" +set DIRMQ = \"$DIR_M\" +set F1 = \"$FILE1\" +set F2 = \"$FILE2\" +set F3 = \"$FILE3\" +set F4 = \"$FILE4\" +set F5 = \"$FILE5\" +set F6 = \"$FILE6\" +set F7 = \"$FILE7\" +set F8 = \"$FILE8\" +set F9 = \"$FILE9\" +set F10 = \"$FILE10\" +set GRIDQ = \"$GRID\" +set BGCQ = \"$BGC\" +set ENERGYQ = \"$ENERGY\" +set DIRSQ = \"$DIR_S\" +set DIROQ = \"$DIR_O\" +set DIRCQ = \"$DIR_SCRIPTS\" + +set COMPAREQ = \"$COMPARE\" +set MODELN = \"model1\" + +set INPUT_TEXT = "model_name=$MODELQ model_grid=$GRIDQ dirm=$DIRMQ film1=$F1 film2=$F2 film3=$F3 film4=$F4 film5=$F5 film6=$F6 film7=$F7 film8=$F8 film9=$F9 film10=$F10 BGC=$BGCQ ENERGY=$ENERGYQ dirs=$DIRSQ diro=$DIROQ dirscript=$DIRCQ modeln=$MODELN compare=$COMPAREQ" + +echo "`date` - Running diagnostics for model ${MODELQ}" +# CLAMP metric processing of model1 +echo "`date` - Running 00.initial.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/00.initial.ncl +echo "`date` - Running 01.npp.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/01.npp.ncl +echo "`date` - Running 01.lai.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/02.lai.ncl + +if ($FILE3 != "") then +echo "`date` - Running 03.co2.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/03.co2.ncl +endif + +echo "`date` - Running 04.biomass.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/04.biomass.ncl +echo "`date` - Running 06.fluxnet.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/06.fluxnet.ncl +echo "`date` - Running 07.beta.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/07.beta.ncl +echo "`date` - Running 08.turnover.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/08.turnover.ncl + +if ($BGC != "casa") then +echo "`date` - Running 09.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09.carbon_sink.ncl +else +echo "`date` - Running 09x.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09x.carbon_sink.ncl +endif + +if ($BGC != "casa") then +echo "`date` - Running 10.fire.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl +endif + +echo "`date` - Running 11.ameriflux.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/11.ameriflux.ncl +echo "`date` - Running 99.final.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/99.final.ncl + +#******************************************************* +# user modification-(3) + +# model2 +set MODEL2 = i01.39cn +set DIR_M = /lustre/wolf-ddn/scratch/hof/cases1/i01.39cn_out/ +set FILE1 = i01.39cn_out_ANN_climo.nc +set FILE2 = i01.39cn_out_MONS_climo.nc +set FILE3 = +set FILE4 = $FILE1 +set FILE5 = $FILE1 +set FILE6 = $FILE1 +set FILE7 = i01.39cn_Fire_C_2101-2125_monthly.nc +set FILE8 = i01.39cn_ameriflux_2101-2125_monthly.nc +set FILE9 = $FILE1 +set FILE10 = $FILE2 +set GRID = 1.9 +set BGC = cn +set ENERGY = old +#******************************************************* +# create model2 directory by copying templates +if ($FILE3 != "") then + set TEMPLATE1 = template_1-model +else + set TEMPLATE1 = template_1-model_noCO2 +endif +#cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL2 +rm -rf $MODEL2 +tar xvpf $DIR_SCRIPTS/$TEMPLATE1.tar +mv $TEMPLATE1 $MODEL2 + +# add quote, to be usesd in INPUT_TEXT +set MODELQ = \"$MODEL2\" +set DIRMQ = \"$DIR_M\" +set F1 = \"$FILE1\" +set F2 = \"$FILE2\" +set F3 = \"$FILE3\" +set F4 = \"$FILE4\" +set F5 = \"$FILE5\" +set F6 = \"$FILE6\" +set F7 = \"$FILE7\" +set F8 = \"$FILE8\" +set F9 = \"$FILE9\" +set F10 = \"$FILE10\" +set GRIDQ = \"$GRID\" +set BGCQ = \"$BGC\" +set ENERGYQ = \"$ENERGY\" + +set COMPAREQ = \"$COMPARE\" +set MODELN = \"model2\" + +set INPUT_TEXT = "model_name=$MODELQ model_grid=$GRIDQ dirm=$DIRMQ film1=$F1 film2=$F2 film3=$F3 film4=$F4 film5=$F5 film6=$F6 film7=$F7 film8=$F8 film9=$F9 film10=$F10 BGC=$BGCQ ENERGY=$ENERGYQ dirs=$DIRSQ diro=$DIROQ dirscript=$DIRCQ modeln=$MODELN compare=$COMPAREQ" + +echo "`date` - Running diagnostics for model ${MODELQ}" +# CLAMP metric processing of model2 +echo "`date` - Running 00.inital.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/00.initial.ncl +echo "`date` - Running 01.npp.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/01.npp.ncl +echo "`date` - Running 02.lai.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/02.lai.ncl + +if ($FILE3 != "") then +echo "`date` - Running 03.co2.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/03.co2.ncl +endif + +echo "`date` - Running 04.biomass.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/04.biomass.ncl +echo "`date` - Running 06.fluxnet.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/06.fluxnet.ncl +echo "`date` - Running 07.beta.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/07.beta.ncl +echo "`date` - Running 08.turnover.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/08.turnover.ncl + +if ($BGC != "casa") then +echo "`date` - Running 09.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09.carbon_sink.ncl +else +echo "`date` - Running 09x.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09x.carbon_sink.ncl +endif + +if ($BGC != "casa") then +echo "`date` - Running 10.fire.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl +endif + +echo "`date` - Running 11.ameriflux.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/11.ameriflux.ncl +echo "`date` - Running 99.final.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/99.final.ncl + +# create a tar file from the final output +echo "`date` - tarring up final output into all.tar" +tar cf - $MODEL1 $MODEL2 $COMPARE > all.tar + diff -r 0c6405ab2ff4 -r 4be95183fbcd all/run_2-model_38cn_41cn.csh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/all/run_2-model_38cn_41cn.csh Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,247 @@ +#!/bin/csh -f +#------------------------------------------------------------------- +# note: user modifies ONLY the "user modification" section +# +# COMPARE: model1 vs model2 +# MODELn : model name +# DIR_M : directory of model data +# DIR_O : directory of observed data +# DIR_S : directory of model surface data +# DIR_SCRIPTS : directory of run scripts +# FILE1 : time_mean climatology from CLM diagnostic package +# FILE2 : 12-monthly climatology from CLM diagnostic package +# FILE3 : 12-monthly climatology from ATM diagnostic package +# leave it blank, if no ATM file: +# set FILE3 = +# FILE7 : timeseries file generated from .... +# FILE8 : timeseries file generated from .... +# GRID : T31, T42, or 1.9 +# BGC : cn or casa +# ENERGY : new or old (fields in model data) +#------------------------------------------------------------------- + +#******************************************************* +# user modification-(1) + +# directory name of model comparison +#et COMPARE = b30.061n_vs_b30.061m +set COMPARE = i01.38cn_vs_i01.41cn + +#******************************************************* +# user modification-(2) + +# model1 +set MODEL1 = i01.38cn +set DIR_M = /lustre/wolf-ddn/scratch/hof/cases1/i01.38cn_out/ +set FILE1 = i01.38cn_out_ANN_climo.nc +set FILE2 = i01.38cn_out_MONS_climo.nc +set FILE3 = +set FILE4 = $FILE1 +set FILE5 = $FILE1 +set FILE6 = $FILE1 +set FILE7 = i01.38cn_Fire_C_2151-2175_monthly.nc +set FILE8 = i01.38cn_ameriflux_2151-2175_monthly.nc +set FILE9 = $FILE1 +set FILE10 = $FILE2 +set GRID = 1.9 +set BGC = cn +set ENERGY = old + +# in the "CLAMP metric processing" section: +# only 00.initial.ncl and 99.final.ncl are required, +# user can comment out any one or more of the other ncl scripts, +# e.g. +# #ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl + +# model surface data +set DIR_S = /lustre/wolf-ddn/scratch/hof/clamp_data/surface_model/ + +# observed data +set DIR_O = /lustre/wolf-ddn/scratch/hof/clamp_data/observed/ + +# directory for scripts, templates and ncl files +set DIR_SCRIPTS = /lustre/wolf-ddn/scratch/hof/clamp/all/ + +#******************************************************** + +# create model1 and model1_vs_model2 directory by copying templates +if ($FILE3 != "") then + set TEMPLATE1 = template_1-model + set TEMPLATE2 = template_2-model +else + set TEMPLATE1 = template_1-model_noCO2 + set TEMPLATE2 = template_2-model_noCO2 +endif +#cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL1 +#cp -r $DIR_SCRIPTS/$TEMPLATE2 $COMPARE +rm -rf $MODEL1 +rm -rf $COMPARE +tar xvpf $DIR_SCRIPTS/$TEMPLATE1.tar +mv $TEMPLATE1 $MODEL1 +tar xvpf $DIR_SCRIPTS/$TEMPLATE2.tar +mv $TEMPLATE2 $COMPARE + +# add quote, to be usesd in INPUT_TEXT +set MODELQ = \"$MODEL1\" +set DIRMQ = \"$DIR_M\" +set F1 = \"$FILE1\" +set F2 = \"$FILE2\" +set F3 = \"$FILE3\" +set F4 = \"$FILE4\" +set F5 = \"$FILE5\" +set F6 = \"$FILE6\" +set F7 = \"$FILE7\" +set F8 = \"$FILE8\" +set F9 = \"$FILE9\" +set F10 = \"$FILE10\" +set GRIDQ = \"$GRID\" +set BGCQ = \"$BGC\" +set ENERGYQ = \"$ENERGY\" +set DIRSQ = \"$DIR_S\" +set DIROQ = \"$DIR_O\" +set DIRCQ = \"$DIR_SCRIPTS\" + +set COMPAREQ = \"$COMPARE\" +set MODELN = \"model1\" + +set INPUT_TEXT = "model_name=$MODELQ model_grid=$GRIDQ dirm=$DIRMQ film1=$F1 film2=$F2 film3=$F3 film4=$F4 film5=$F5 film6=$F6 film7=$F7 film8=$F8 film9=$F9 film10=$F10 BGC=$BGCQ ENERGY=$ENERGYQ dirs=$DIRSQ diro=$DIROQ dirscript=$DIRCQ modeln=$MODELN compare=$COMPAREQ" + +echo "`date` - Running diagnostics for model ${MODELQ}" +# CLAMP metric processing of model1 +echo "`date` - Running 00.initial.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/00.initial.ncl +echo "`date` - Running 01.npp.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/01.npp.ncl +echo "`date` - Running 01.lai.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/02.lai.ncl + +if ($FILE3 != "") then +echo "`date` - Running 03.co2.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/03.co2.ncl +endif + +echo "`date` - Running 04.biomass.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/04.biomass.ncl +echo "`date` - Running 06.fluxnet.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/06.fluxnet.ncl +echo "`date` - Running 07.beta.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/07.beta.ncl +echo "`date` - Running 08.turnover.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/08.turnover.ncl + +if ($BGC != "casa") then +echo "`date` - Running 09.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09.carbon_sink.ncl +else +echo "`date` - Running 09x.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09x.carbon_sink.ncl +endif + +if ($BGC != "casa") then +echo "`date` - Running 10.fire.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl +endif + +echo "`date` - Running 11.ameriflux.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/11.ameriflux.ncl +echo "`date` - Running 99.final.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/99.final.ncl + +#******************************************************* +# user modification-(3) + +# model2 +set MODEL2 = i01.41cn +set DIR_M = /lustre/wolf-ddn/scratch/hof/cases1/i01.41cn_out/ +set FILE1 = i01.41cn_out_ANN_climo.nc +set FILE2 = i01.41cn_out_MONS_climo.nc +set FILE3 = +set FILE4 = $FILE1 +set FILE5 = $FILE1 +set FILE6 = $FILE1 +set FILE7 = i01.41cn_Fire_C_2076-2100_monthly.nc +set FILE8 = i01.41cn_ameriflux_2076-2100_monthly.nc +set FILE9 = $FILE1 +set FILE10 = $FILE2 +set GRID = 1.9 +set BGC = cn +set ENERGY = old +#******************************************************* +# create model2 directory by copying templates +if ($FILE3 != "") then + set TEMPLATE1 = template_1-model +else + set TEMPLATE1 = template_1-model_noCO2 +endif +#cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL2 +rm -rf $MODEL2 +tar xvpf $DIR_SCRIPTS/$TEMPLATE1.tar +mv $TEMPLATE1 $MODEL2 + +# add quote, to be usesd in INPUT_TEXT +set MODELQ = \"$MODEL2\" +set DIRMQ = \"$DIR_M\" +set F1 = \"$FILE1\" +set F2 = \"$FILE2\" +set F3 = \"$FILE3\" +set F4 = \"$FILE4\" +set F5 = \"$FILE5\" +set F6 = \"$FILE6\" +set F7 = \"$FILE7\" +set F8 = \"$FILE8\" +set F9 = \"$FILE9\" +set F10 = \"$FILE10\" +set GRIDQ = \"$GRID\" +set BGCQ = \"$BGC\" +set ENERGYQ = \"$ENERGY\" + +set COMPAREQ = \"$COMPARE\" +set MODELN = \"model2\" + +set INPUT_TEXT = "model_name=$MODELQ model_grid=$GRIDQ dirm=$DIRMQ film1=$F1 film2=$F2 film3=$F3 film4=$F4 film5=$F5 film6=$F6 film7=$F7 film8=$F8 film9=$F9 film10=$F10 BGC=$BGCQ ENERGY=$ENERGYQ dirs=$DIRSQ diro=$DIROQ dirscript=$DIRCQ modeln=$MODELN compare=$COMPAREQ" + +echo "`date` - Running diagnostics for model ${MODELQ}" +# CLAMP metric processing of model2 +echo "`date` - Running 00.inital.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/00.initial.ncl +echo "`date` - Running 01.npp.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/01.npp.ncl +echo "`date` - Running 02.lai.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/02.lai.ncl + +if ($FILE3 != "") then +echo "`date` - Running 03.co2.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/03.co2.ncl +endif + +echo "`date` - Running 04.biomass.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/04.biomass.ncl +echo "`date` - Running 06.fluxnet.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/06.fluxnet.ncl +echo "`date` - Running 07.beta.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/07.beta.ncl +echo "`date` - Running 08.turnover.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/08.turnover.ncl + +if ($BGC != "casa") then +echo "`date` - Running 09.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09.carbon_sink.ncl +else +echo "`date` - Running 09x.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09x.carbon_sink.ncl +endif + +if ($BGC != "casa") then +echo "`date` - Running 10.fire.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl +endif + +echo "`date` - Running 11.ameriflux.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/11.ameriflux.ncl +echo "`date` - Running 99.final.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/99.final.ncl + +# create a tar file from the final output +echo "`date` - tarring up final output into all.tar" +tar cf - $MODEL1 $MODEL2 $COMPARE > all.tar + diff -r 0c6405ab2ff4 -r 4be95183fbcd all/run_2-model_39cn_40cn.csh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/all/run_2-model_39cn_40cn.csh Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,247 @@ +#!/bin/csh -f +#------------------------------------------------------------------- +# note: user modifies ONLY the "user modification" section +# +# COMPARE: model1 vs model2 +# MODELn : model name +# DIR_M : directory of model data +# DIR_O : directory of observed data +# DIR_S : directory of model surface data +# DIR_SCRIPTS : directory of run scripts +# FILE1 : time_mean climatology from CLM diagnostic package +# FILE2 : 12-monthly climatology from CLM diagnostic package +# FILE3 : 12-monthly climatology from ATM diagnostic package +# leave it blank, if no ATM file: +# set FILE3 = +# FILE7 : timeseries file generated from .... +# FILE8 : timeseries file generated from .... +# GRID : T31, T42, or 1.9 +# BGC : cn or casa +# ENERGY : new or old (fields in model data) +#------------------------------------------------------------------- + +#******************************************************* +# user modification-(1) + +# directory name of model comparison +#et COMPARE = b30.061n_vs_b30.061m +set COMPARE = i01.39cn_vs_i01.40cn + +#******************************************************* +# user modification-(2) + +# model1 +set MODEL1 = i01.39cn +set DIR_M = /lustre/wolf-ddn/scratch/hof/cases1/i01.39cn_out/ +set FILE1 = i01.39cn_out_ANN_climo.nc +set FILE2 = i01.39cn_out_MONS_climo.nc +set FILE3 = +set FILE4 = $FILE1 +set FILE5 = $FILE1 +set FILE6 = $FILE1 +set FILE7 = i01.39cn_Fire_C_2101-2125_monthly.nc +set FILE8 = i01.39cn_ameriflux_2101-2125_monthly.nc +set FILE9 = $FILE1 +set FILE10 = $FILE2 +set GRID = 1.9 +set BGC = cn +set ENERGY = old + +# in the "CLAMP metric processing" section: +# only 00.initial.ncl and 99.final.ncl are required, +# user can comment out any one or more of the other ncl scripts, +# e.g. +# #ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl + +# model surface data +set DIR_S = /lustre/wolf-ddn/scratch/hof/clamp_data/surface_model/ + +# observed data +set DIR_O = /lustre/wolf-ddn/scratch/hof/clamp_data/observed/ + +# directory for scripts, templates and ncl files +set DIR_SCRIPTS = /lustre/wolf-ddn/scratch/hof/clamp/all/ + +#******************************************************** + +# create model1 and model1_vs_model2 directory by copying templates +if ($FILE3 != "") then + set TEMPLATE1 = template_1-model + set TEMPLATE2 = template_2-model +else + set TEMPLATE1 = template_1-model_noCO2 + set TEMPLATE2 = template_2-model_noCO2 +endif +#cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL1 +#cp -r $DIR_SCRIPTS/$TEMPLATE2 $COMPARE +rm -rf $MODEL1 +rm -rf $COMPARE +tar xvpf $DIR_SCRIPTS/$TEMPLATE1.tar +mv $TEMPLATE1 $MODEL1 +tar xvpf $DIR_SCRIPTS/$TEMPLATE2.tar +mv $TEMPLATE2 $COMPARE + +# add quote, to be usesd in INPUT_TEXT +set MODELQ = \"$MODEL1\" +set DIRMQ = \"$DIR_M\" +set F1 = \"$FILE1\" +set F2 = \"$FILE2\" +set F3 = \"$FILE3\" +set F4 = \"$FILE4\" +set F5 = \"$FILE5\" +set F6 = \"$FILE6\" +set F7 = \"$FILE7\" +set F8 = \"$FILE8\" +set F9 = \"$FILE9\" +set F10 = \"$FILE10\" +set GRIDQ = \"$GRID\" +set BGCQ = \"$BGC\" +set ENERGYQ = \"$ENERGY\" +set DIRSQ = \"$DIR_S\" +set DIROQ = \"$DIR_O\" +set DIRCQ = \"$DIR_SCRIPTS\" + +set COMPAREQ = \"$COMPARE\" +set MODELN = \"model1\" + +set INPUT_TEXT = "model_name=$MODELQ model_grid=$GRIDQ dirm=$DIRMQ film1=$F1 film2=$F2 film3=$F3 film4=$F4 film5=$F5 film6=$F6 film7=$F7 film8=$F8 film9=$F9 film10=$F10 BGC=$BGCQ ENERGY=$ENERGYQ dirs=$DIRSQ diro=$DIROQ dirscript=$DIRCQ modeln=$MODELN compare=$COMPAREQ" + +echo "`date` - Running diagnostics for model ${MODELQ}" +# CLAMP metric processing of model1 +echo "`date` - Running 00.initial.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/00.initial.ncl +echo "`date` - Running 01.npp.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/01.npp.ncl +echo "`date` - Running 01.lai.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/02.lai.ncl + +if ($FILE3 != "") then +echo "`date` - Running 03.co2.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/03.co2.ncl +endif + +echo "`date` - Running 04.biomass.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/04.biomass.ncl +echo "`date` - Running 06.fluxnet.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/06.fluxnet.ncl +echo "`date` - Running 07.beta.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/07.beta.ncl +echo "`date` - Running 08.turnover.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/08.turnover.ncl + +if ($BGC != "casa") then +echo "`date` - Running 09.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09.carbon_sink.ncl +else +echo "`date` - Running 09x.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09x.carbon_sink.ncl +endif + +if ($BGC != "casa") then +echo "`date` - Running 10.fire.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl +endif + +echo "`date` - Running 11.ameriflux.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/11.ameriflux.ncl +echo "`date` - Running 99.final.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/99.final.ncl + +#******************************************************* +# user modification-(3) + +# model2 +set MODEL2 = i01.40cn +set DIR_M = /lustre/wolf-ddn/scratch/hof/cases1/i01.40cn_out/ +set FILE1 = i01.40cn_out_ANN_climo.nc +set FILE2 = i01.40cn_out_MONS_climo.nc +set FILE3 = +set FILE4 = $FILE1 +set FILE5 = $FILE1 +set FILE6 = $FILE1 +set FILE7 = i01.40cn_Fire_C_2076-2100_monthly.nc +set FILE8 = i01.40cn_ameriflux_2076-2100_monthly.nc +set FILE9 = $FILE1 +set FILE10 = $FILE2 +set GRID = 1.9 +set BGC = cn +set ENERGY = old +#******************************************************* +# create model2 directory by copying templates +if ($FILE3 != "") then + set TEMPLATE1 = template_1-model +else + set TEMPLATE1 = template_1-model_noCO2 +endif +#cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL2 +rm -rf $MODEL2 +tar xvpf $DIR_SCRIPTS/$TEMPLATE1.tar +mv $TEMPLATE1 $MODEL2 + +# add quote, to be usesd in INPUT_TEXT +set MODELQ = \"$MODEL2\" +set DIRMQ = \"$DIR_M\" +set F1 = \"$FILE1\" +set F2 = \"$FILE2\" +set F3 = \"$FILE3\" +set F4 = \"$FILE4\" +set F5 = \"$FILE5\" +set F6 = \"$FILE6\" +set F7 = \"$FILE7\" +set F8 = \"$FILE8\" +set F9 = \"$FILE9\" +set F10 = \"$FILE10\" +set GRIDQ = \"$GRID\" +set BGCQ = \"$BGC\" +set ENERGYQ = \"$ENERGY\" + +set COMPAREQ = \"$COMPARE\" +set MODELN = \"model2\" + +set INPUT_TEXT = "model_name=$MODELQ model_grid=$GRIDQ dirm=$DIRMQ film1=$F1 film2=$F2 film3=$F3 film4=$F4 film5=$F5 film6=$F6 film7=$F7 film8=$F8 film9=$F9 film10=$F10 BGC=$BGCQ ENERGY=$ENERGYQ dirs=$DIRSQ diro=$DIROQ dirscript=$DIRCQ modeln=$MODELN compare=$COMPAREQ" + +echo "`date` - Running diagnostics for model ${MODELQ}" +# CLAMP metric processing of model2 +echo "`date` - Running 00.inital.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/00.initial.ncl +echo "`date` - Running 01.npp.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/01.npp.ncl +echo "`date` - Running 02.lai.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/02.lai.ncl + +if ($FILE3 != "") then +echo "`date` - Running 03.co2.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/03.co2.ncl +endif + +echo "`date` - Running 04.biomass.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/04.biomass.ncl +echo "`date` - Running 06.fluxnet.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/06.fluxnet.ncl +echo "`date` - Running 07.beta.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/07.beta.ncl +echo "`date` - Running 08.turnover.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/08.turnover.ncl + +if ($BGC != "casa") then +echo "`date` - Running 09.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09.carbon_sink.ncl +else +echo "`date` - Running 09x.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09x.carbon_sink.ncl +endif + +if ($BGC != "casa") then +echo "`date` - Running 10.fire.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl +endif + +echo "`date` - Running 11.ameriflux.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/11.ameriflux.ncl +echo "`date` - Running 99.final.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/99.final.ncl + +# create a tar file from the final output +echo "`date` - tarring up final output into all.tar" +tar cf - $MODEL1 $MODEL2 $COMPARE > all.tar + diff -r 0c6405ab2ff4 -r 4be95183fbcd all/run_2-model_42cn_43cn.csh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/all/run_2-model_42cn_43cn.csh Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,247 @@ +#!/bin/csh -f +#------------------------------------------------------------------- +# note: user modifies ONLY the "user modification" section +# +# COMPARE: model1 vs model2 +# MODELn : model name +# DIR_M : directory of model data +# DIR_O : directory of observed data +# DIR_S : directory of model surface data +# DIR_SCRIPTS : directory of run scripts +# FILE1 : time_mean climatology from CLM diagnostic package +# FILE2 : 12-monthly climatology from CLM diagnostic package +# FILE3 : 12-monthly climatology from ATM diagnostic package +# leave it blank, if no ATM file: +# set FILE3 = +# FILE7 : timeseries file generated from .... +# FILE8 : timeseries file generated from .... +# GRID : T31, T42, or 1.9 +# BGC : cn or casa +# ENERGY : new or old (fields in model data) +#------------------------------------------------------------------- + +#******************************************************* +# user modification-(1) + +# directory name of model comparison +#et COMPARE = b30.061n_vs_b30.061m +set COMPARE = i01.42cn_vs_i01.43cn + +#******************************************************* +# user modification-(2) + +# model1 +set MODEL1 = i01.42cn +set DIR_M = /lustre/wolf-ddn/scratch/hof/cases/i01.42cn_out/ +set FILE1 = i01.42cn_out_ANN_climo.nc +set FILE2 = i01.42cn_out_MONS_climo.nc +set FILE3 = +set FILE4 = $FILE1 +set FILE5 = $FILE1 +set FILE6 = $FILE1 +set FILE7 = i01.42cn_Fire_C_2976-3000_monthly.nc +set FILE8 = i01.42cn_ameriflux_2976-3000_monthly.nc +set FILE9 = $FILE1 +set FILE10 = $FILE2 +set GRID = 1.9 +set BGC = cn +set ENERGY = old + +# in the "CLAMP metric processing" section: +# only 00.initial.ncl and 99.final.ncl are required, +# user can comment out any one or more of the other ncl scripts, +# e.g. +# #ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl + +# model surface data +set DIR_S = /lustre/wolf-ddn/scratch/hof/clamp_data/surface_model/ + +# observed data +set DIR_O = /lustre/wolf-ddn/scratch/hof/clamp_data/observed/ + +# directory for scripts, templates and ncl files +set DIR_SCRIPTS = /lustre/wolf-ddn/scratch/hof/clamp/all/ + +#******************************************************** + +# create model1 and model1_vs_model2 directory by copying templates +if ($FILE3 != "") then + set TEMPLATE1 = template_1-model + set TEMPLATE2 = template_2-model +else + set TEMPLATE1 = template_1-model_noCO2 + set TEMPLATE2 = template_2-model_noCO2 +endif +#cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL1 +#cp -r $DIR_SCRIPTS/$TEMPLATE2 $COMPARE +rm -rf $MODEL1 +rm -rf $COMPARE +tar xvpf $DIR_SCRIPTS/$TEMPLATE1.tar +mv $TEMPLATE1 $MODEL1 +tar xvpf $DIR_SCRIPTS/$TEMPLATE2.tar +mv $TEMPLATE2 $COMPARE + +# add quote, to be usesd in INPUT_TEXT +set MODELQ = \"$MODEL1\" +set DIRMQ = \"$DIR_M\" +set F1 = \"$FILE1\" +set F2 = \"$FILE2\" +set F3 = \"$FILE3\" +set F4 = \"$FILE4\" +set F5 = \"$FILE5\" +set F6 = \"$FILE6\" +set F7 = \"$FILE7\" +set F8 = \"$FILE8\" +set F9 = \"$FILE9\" +set F10 = \"$FILE10\" +set GRIDQ = \"$GRID\" +set BGCQ = \"$BGC\" +set ENERGYQ = \"$ENERGY\" +set DIRSQ = \"$DIR_S\" +set DIROQ = \"$DIR_O\" +set DIRCQ = \"$DIR_SCRIPTS\" + +set COMPAREQ = \"$COMPARE\" +set MODELN = \"model1\" + +set INPUT_TEXT = "model_name=$MODELQ model_grid=$GRIDQ dirm=$DIRMQ film1=$F1 film2=$F2 film3=$F3 film4=$F4 film5=$F5 film6=$F6 film7=$F7 film8=$F8 film9=$F9 film10=$F10 BGC=$BGCQ ENERGY=$ENERGYQ dirs=$DIRSQ diro=$DIROQ dirscript=$DIRCQ modeln=$MODELN compare=$COMPAREQ" + +echo "`date` - Running diagnostics for model ${MODELQ}" +# CLAMP metric processing of model1 +echo "`date` - Running 00.initial.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/00.initial.ncl +echo "`date` - Running 01.npp.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/01.npp.ncl +echo "`date` - Running 01.lai.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/02.lai.ncl + +if ($FILE3 != "") then +echo "`date` - Running 03.co2.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/03.co2.ncl +endif + +echo "`date` - Running 04.biomass.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/04.biomass.ncl +echo "`date` - Running 06.fluxnet.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/06.fluxnet.ncl +echo "`date` - Running 07.beta.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/07.beta.ncl +echo "`date` - Running 08.turnover.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/08.turnover.ncl + +if ($BGC != "casa") then +echo "`date` - Running 09.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09.carbon_sink.ncl +else +echo "`date` - Running 09x.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09x.carbon_sink.ncl +endif + +if ($BGC != "casa") then +echo "`date` - Running 10.fire.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl +endif + +echo "`date` - Running 11.ameriflux.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/11.ameriflux.ncl +echo "`date` - Running 99.final.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/99.final.ncl + +#******************************************************* +# user modification-(3) + +# model2 +set MODEL2 = i01.43cn +set DIR_M = /lustre/wolf-ddn/scratch/hof/cases1/i01.43cn_out/ +set FILE1 = i01.43cn_out_ANN_climo.nc +set FILE2 = i01.43cn_out_MONS_climo.nc +set FILE3 = +set FILE4 = $FILE1 +set FILE5 = $FILE1 +set FILE6 = $FILE1 +set FILE7 = i01.43cn_Fire_C_2876-2900_monthly.nc +set FILE8 = i01.43cn_ameriflux_2876-2900_monthly.nc +set FILE9 = $FILE1 +set FILE10 = $FILE2 +set GRID = 1.9 +set BGC = cn +set ENERGY = old +#******************************************************* +# create model2 directory by copying templates +if ($FILE3 != "") then + set TEMPLATE1 = template_1-model +else + set TEMPLATE1 = template_1-model_noCO2 +endif +#cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL2 +rm -rf $MODEL2 +tar xvpf $DIR_SCRIPTS/$TEMPLATE1.tar +mv $TEMPLATE1 $MODEL2 + +# add quote, to be usesd in INPUT_TEXT +set MODELQ = \"$MODEL2\" +set DIRMQ = \"$DIR_M\" +set F1 = \"$FILE1\" +set F2 = \"$FILE2\" +set F3 = \"$FILE3\" +set F4 = \"$FILE4\" +set F5 = \"$FILE5\" +set F6 = \"$FILE6\" +set F7 = \"$FILE7\" +set F8 = \"$FILE8\" +set F9 = \"$FILE9\" +set F10 = \"$FILE10\" +set GRIDQ = \"$GRID\" +set BGCQ = \"$BGC\" +set ENERGYQ = \"$ENERGY\" + +set COMPAREQ = \"$COMPARE\" +set MODELN = \"model2\" + +set INPUT_TEXT = "model_name=$MODELQ model_grid=$GRIDQ dirm=$DIRMQ film1=$F1 film2=$F2 film3=$F3 film4=$F4 film5=$F5 film6=$F6 film7=$F7 film8=$F8 film9=$F9 film10=$F10 BGC=$BGCQ ENERGY=$ENERGYQ dirs=$DIRSQ diro=$DIROQ dirscript=$DIRCQ modeln=$MODELN compare=$COMPAREQ" + +echo "`date` - Running diagnostics for model ${MODELQ}" +# CLAMP metric processing of model2 +echo "`date` - Running 00.inital.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/00.initial.ncl +echo "`date` - Running 01.npp.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/01.npp.ncl +echo "`date` - Running 02.lai.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/02.lai.ncl + +if ($FILE3 != "") then +echo "`date` - Running 03.co2.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/03.co2.ncl +endif + +echo "`date` - Running 04.biomass.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/04.biomass.ncl +echo "`date` - Running 06.fluxnet.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/06.fluxnet.ncl +echo "`date` - Running 07.beta.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/07.beta.ncl +echo "`date` - Running 08.turnover.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/08.turnover.ncl + +if ($BGC != "casa") then +echo "`date` - Running 09.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09.carbon_sink.ncl +else +echo "`date` - Running 09x.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09x.carbon_sink.ncl +endif + +if ($BGC != "casa") then +echo "`date` - Running 10.fire.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl +endif + +echo "`date` - Running 11.ameriflux.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/11.ameriflux.ncl +echo "`date` - Running 99.final.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/99.final.ncl + +# create a tar file from the final output +echo "`date` - tarring up final output into all.tar" +tar cf - $MODEL1 $MODEL2 $COMPARE > all.tar + diff -r 0c6405ab2ff4 -r 4be95183fbcd all/run_2-model_FMH.csh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/all/run_2-model_FMH.csh Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,254 @@ +#!/bin/csh -f +#------------------------------------------------------------------- +# note: user modifies ONLY the "user modification" section +# +# COMPARE: model1 vs model2 +# MODELn : model name +# DIR_M : directory of model data +# DIR_O : directory of observed data +# DIR_S : directory of model surface data +# DIR_SCRIPTS : directory of run scripts +# FILE1 : time_mean climatology from CLM diagnostic package +# FILE2 : 12-monthly climatology from CLM diagnostic package +# FILE3 : 12-monthly climatology from ATM diagnostic package +# leave it blank, if no ATM file: +# set FILE3 = +# FILE7 : timeseries file generated from .... +# FILE8 : timeseries file generated from .... +# GRID : T31, T42, or 1.9 +# BGC : cn or casa +# ENERGY : new or old (fields in model data) +#------------------------------------------------------------------- + +#******************************************************* +# user modification-(1) + +# directory name of model comparison +#et COMPARE = b30.061n_vs_b30.061m +set COMPARE = CN_vs_CASA + +#******************************************************* +# user modification-(2) + +# model1 +set MODEL1 = CASA +set DIR_M = /lustre/wolf-ddn/scratch/hof/clamp_data/model/ +#set FILE1 = i01.10casa_1948-2004_ANN_climo.nc +set FILE1 = i01.10casa_1975-2000_ANN_climo.nc +set FILE2 = i01.10casa_1948-2004_MONS_climo.nc +set FILE3 = f02.03casa_1876-1900_MONS_climo_atm.nc +set FILE4 = i01.06casa_1980-2004_ANN_climo.nc +set FILE5 = i01.10casa_1990-2004_ANN_climo.nc +set FILE6 = i01.07casa_1990-2004_ANN_climo.nc +set FILE7 = i01.10casa_Fire_C_1979-2004_monthly.nc +set FILE8 = i01.10casa_ameriflux_1990-2004_monthly.nc +set FILE9 = i01.10casa_2000-2004_ANN_climo.nc +set FILE10 = i01.10casa_2000-2004_MONS_climo.nc +set FILE11 = i01.10casa_2000_ANN_climo.nc +set GRID = T42 +set BGC = casa +set ENERGY = new + +# in the "CLAMP metric processing" section: +# only 00.initial.ncl and 99.final.ncl are required, +# user can comment out any one or more of the other ncl scripts, +# e.g. +# #ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl + +# model surface data +set DIR_S = /lustre/wolf-ddn/scratch/hof/clamp_data/surface_model/ + +# observed data +set DIR_O = /lustre/wolf-ddn/scratch/hof/clamp_data/observed/ + +# directory for scripts, templates and ncl files +set DIR_SCRIPTS = /lustre/wolf-ddn/scratch/hof/clamp/all/ + +#******************************************************** + +# create model1 and model1_vs_model2 directory by copying templates +if ($FILE3 != "") then + set TEMPLATE1 = template_1-model + set TEMPLATE2 = template_2-model +else + set TEMPLATE1 = template_1-model_noCO2 + set TEMPLATE2 = template_2-model_noCO2 +endif +#cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL1 +#cp -r $DIR_SCRIPTS/$TEMPLATE2 $COMPARE +rm -rf $MODEL1 +rm -rf $COMPARE +tar xvpf $DIR_SCRIPTS/$TEMPLATE1.tar +mv $TEMPLATE1 $MODEL1 +tar xvpf $DIR_SCRIPTS/$TEMPLATE2.tar +mv $TEMPLATE2 $COMPARE + +# add quote, to be usesd in INPUT_TEXT +set MODELQ = \"$MODEL1\" +set DIRMQ = \"$DIR_M\" +set F1 = \"$FILE1\" +set F2 = \"$FILE2\" +set F3 = \"$FILE3\" +set F4 = \"$FILE4\" +set F5 = \"$FILE5\" +set F6 = \"$FILE6\" +set F7 = \"$FILE7\" +set F8 = \"$FILE8\" +set F9 = \"$FILE9\" +set F10 = \"$FILE10\" +set F11 = \"$FILE11\" +set GRIDQ = \"$GRID\" +set BGCQ = \"$BGC\" +set ENERGYQ = \"$ENERGY\" +set DIRSQ = \"$DIR_S\" +set DIROQ = \"$DIR_O\" +set DIRCQ = \"$DIR_SCRIPTS\" + +set COMPAREQ = \"$COMPARE\" +set MODELN = \"model1\" + +set INPUT_TEXT = "model_name=$MODELQ model_grid=$GRIDQ dirm=$DIRMQ film1=$F1 film2=$F2 film3=$F3 film4=$F4 film5=$F5 film6=$F6 film7=$F7 film8=$F8 film9=$F9 film10=$F10 film11=$F11 BGC=$BGCQ ENERGY=$ENERGYQ dirs=$DIRSQ diro=$DIROQ dirscript=$DIRCQ modeln=$MODELN compare=$COMPAREQ" + +echo "`date` - Running diagnostics for model ${MODELQ}" +# CLAMP metric processing of model1 +echo "`date` - Running 00.initial.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/00.initial.ncl +echo "`date` - Running 01.npp.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/01.npp.ncl +echo "`date` - Running 01.lai.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/02.lai.ncl + +if ($FILE3 != "") then +echo "`date` - Running 03.co2.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/03.co2.ncl +endif + +echo "`date` - Running 04.biomass.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/04.biomass.ncl +echo "`date` - Running 06.fluxnet.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/06.fluxnet.ncl +echo "`date` - Running 07.beta.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/07.beta.ncl +echo "`date` - Running 08.turnover.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/08.turnover.ncl + +if ($BGC != "casa") then +echo "`date` - Running 09.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09.carbon_sink.ncl +else +echo "`date` - Running 09x.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09x.carbon_sink.ncl +endif + +if ($BGC != "casa") then +echo "`date` - Running 10.fire.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl +endif + +echo "`date` - Running 11.ameriflux.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/11.ameriflux.ncl +echo "`date` - Running 99.final.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/99.final.ncl + +#******************************************************* +# user modification-(3) + +# model2 +set MODEL2 = CN +set DIR_M = /lustre/wolf-ddn/scratch/hof/clamp_data/model/ +#set FILE1 = i01.10cn_1948-2004_ANN_climo.nc +set FILE1 = i01.10cn_1975-2000_ANN_climo.nc +set FILE2 = i01.10cn_1948-2004_MONS_climo.nc +set FILE3 = f02.03cn_1901-1925_MONS_climo_atm.nc +set FILE4 = i01.06cn_1980-2004_ANN_climo.nc +set FILE5 = i01.10cn_1990-2004_ANN_climo.nc +set FILE6 = i01.07cn_1990-2004_ANN_climo.nc +set FILE7 = i01.10cn_Fire_C_1979-2004_monthly.nc +set FILE8 = i01.10cn_ameriflux_1990-2004_monthly.nc +set FILE9 = i01.10cn_2000-2004_ANN_climo.nc +set FILE10 = i01.10cn_2000-2004_MONS_climo.nc +set FILE11 = i01.10cn_2000_ANN_climo.nc +set GRID = T42 +set BGC = cn +set ENERGY = new + +#******************************************************* +# create model2 directory by copying templates +if ($FILE3 != "") then + set TEMPLATE1 = template_1-model +else + set TEMPLATE1 = template_1-model_noCO2 +endif +#cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL2 +rm -rf $MODEL2 +tar xvpf $DIR_SCRIPTS/$TEMPLATE1.tar +mv $TEMPLATE1 $MODEL2 + +# add quote, to be usesd in INPUT_TEXT +set MODELQ = \"$MODEL2\" +set DIRMQ = \"$DIR_M\" +set F1 = \"$FILE1\" +set F2 = \"$FILE2\" +set F3 = \"$FILE3\" +set F4 = \"$FILE4\" +set F5 = \"$FILE5\" +set F6 = \"$FILE6\" +set F7 = \"$FILE7\" +set F8 = \"$FILE8\" +set F9 = \"$FILE9\" +set F10 = \"$FILE10\" +set F11 = \"$FILE11\" +set GRIDQ = \"$GRID\" +set BGCQ = \"$BGC\" +set ENERGYQ = \"$ENERGY\" + +set COMPAREQ = \"$COMPARE\" +set MODELN = \"model2\" + +set INPUT_TEXT = "model_name=$MODELQ model_grid=$GRIDQ dirm=$DIRMQ film1=$F1 film2=$F2 film3=$F3 film4=$F4 film5=$F5 film6=$F6 film7=$F7 film8=$F8 film9=$F9 film10=$F10 film11=$F11 BGC=$BGCQ ENERGY=$ENERGYQ dirs=$DIRSQ diro=$DIROQ dirscript=$DIRCQ modeln=$MODELN compare=$COMPAREQ" + +echo "`date` - Running diagnostics for model ${MODELQ}" +# CLAMP metric processing of model2 +echo "`date` - Running 00.inital.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/00.initial.ncl +echo "`date` - Running 01.npp.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/01.npp.ncl +echo "`date` - Running 02.lai.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/02.lai.ncl + +if ($FILE3 != "") then +echo "`date` - Running 03.co2.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/03.co2.ncl +endif + +echo "`date` - Running 04.biomass.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/04.biomass.ncl +echo "`date` - Running 06.fluxnet.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/06.fluxnet.ncl +echo "`date` - Running 07.beta.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/07.beta.ncl +echo "`date` - Running 08.turnover.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/08.turnover.ncl + +if ($BGC != "casa") then +echo "`date` - Running 09.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09.carbon_sink.ncl +else +echo "`date` - Running 09x.carbon_sink.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/09x.carbon_sink.ncl +endif + +if ($BGC != "casa") then +echo "`date` - Running 10.fire.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl +endif + +echo "`date` - Running 11.ameriflux.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/11.ameriflux.ncl +echo "`date` - Running 99.final.ncl" +ncl $INPUT_TEXT $DIR_SCRIPTS/99.final.ncl + +# create a tar file from the final output +echo "`date` - tarring up final output into all.tar" +tar cf - $MODEL1 $MODEL2 $COMPARE > all.tar + diff -r 0c6405ab2ff4 -r 4be95183fbcd all/run_clamp_diag_LENS.csh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/all/run_clamp_diag_LENS.csh Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,31 @@ +#!/bin/csh -f +#PBS -A cli017bgc +#PBS -N clamp_diag +##PBS -q batch +#PBS -l nodes=1:ppn=1 +#PBS -l walltime=02:00:00 +#PBS -j oe +#PBS -S /bin/csh -V +#PBS -m abe +#PBS -M forrest@climatemodeling.org +##PBS -M forrest@climatemodeling.org,8656843670@messaging.sprintpcs.com +##PBS -M forrest@climatemodeling.org,fmhoffman@ipipi.com + +cd /tmp/work/hof/clamp/all/ + +if ($?tcsh) then + set modules_shell="tcsh" +else + set modules_shell="csh" +endif + +source /usr/Modules/init/${modules_shell} + +unset modules_shell + +module load nco +module load ncl + +#time ./lnd_template4.6_ORNL_27cn29.csh +#time ./lnd_template4.6_ORNL_27cn31.csh >& lnd_template4.6_ORNL_27cn31.log +time ./run_2-model_FMH.csh >& run_2-model_FMH.log diff -r 0c6405ab2ff4 -r 4be95183fbcd all/template_1-model.tar Binary file all/template_1-model.tar has changed diff -r 0c6405ab2ff4 -r 4be95183fbcd all/template_1-model/index.html --- a/all/template_1-model/index.html Mon Jan 26 22:08:20 2009 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ - - - Score Sheet for CLAMP - - - - - - -

    CLAMP Score Sheet for Biogeochemical Model Evaluation

- - - - - - diff -r 0c6405ab2ff4 -r 4be95183fbcd all/template_1-model/table.html --- a/all/template_1-model/table.html Mon Jan 26 22:08:20 2009 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,407 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Metric Metric
components
Observations &
comparison protocol
Model
model_name
Score (points)
Full model_name
NPPEMDI NPP
observations
- - Class_A_table - - - table
- - scatter_plot -
2.5M_npp_S81
- - Class_B_table - - - table
- - scatter_plot -
2.5M_npp_S933
EMDI NPP
normalized by PPT
- - Class_A_histogram - - - Class_A_histogram - 2.5M_npp_H81
- - Class_B_histogram - - - Class_B_histogram - 2.5M_npp_H933
Correlation with MODIS obs. - - global_map - - - model_map
- - model_vs_obs -
5M_npp_G
Correlation with MODIS-zonal mean - - zonal_mean_obs - - - zonal_mean
model_vs_obs_plot
-
5M_npp_Z
LAIMODIS Mean - - land_class_obs
- - land_class_model
- - global_map -
- - model_vs_obs_table
- - global_map
- - model_vs_obs -
5M_lai_Mean
MODIS Maximum - - global_map - - - global_map
- - model_vs_obs -
5M_lai_Max
MODIS Phase - - global_map - - - global_map
- - model_vs_obs -
5M_lai_Phase
CO2
Seasonal
Cycle
Comparison with NOAA observations
phase and amplitude
-- - - model_vs_obs - 20M_co2
Carbon
Stocks
Aboveground live biomass
in South America
- - obs_amazon - - - model_amazon
- - model_vs_obs -
5M_biomass
Aboveground live
biomass
within Amazon Basin
(sum within Legal Amazon)
- - mask
- - obs_masked
- Sum_biomass_ob (Pg C) -
- - model_masked
- - model_vs_obs
- Sum_biomass_mod (Pg C) -
5M_biomask
Energy and
C Fluxes
from Fluxnet
NEE - - line_plot - - - model_vs_obs - 5M_fluxnet_nee
Net radiation5M_fluxnet_rad
Latent heat5M_fluxnet_lh
Sensible heat5M_fluxnet_sh
Energy and
C Fluxes
from Ameriflux
NEE - - line_plot - - - model_vs_obs
- - timeseries_plot -
1M_ameriflux_nee
Shortwave Incoming1M_ameriflux_rad
Latent heat1M_ameriflux_lh
Sensible heat1M_ameriflux_sh
GPP1M_ameriflux_gpp
ER1M_ameriflux_er
Transient DynamicsBeta factor for NPP Stimulation from elevated CO2-- - - FACE_Site_comparison
- - biome_table -
3M_beta
Turnover times and pool sizes-- - - Leaf
- - Wood
- - Fine_Root
- - Litter
- - Coarse_Woody_Debris
- - Soil -
3--
Carbon Sinks
(1990-2004)
-- - - biome_mean
- - biome_total -
2--
Fire Variability-- - - global_spatial_comparison
- - temporal_dynamics_(1997-2004) -
2M_fire
Total 100M_total
- diff -r 0c6405ab2ff4 -r 4be95183fbcd all/template_1-model/tablerows.html --- a/all/template_1-model/tablerows.html Mon Jan 26 22:08:20 2009 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - NPP -Site observationn1 - - - - - -Site observationn2 -Site observationn3 -Site observationn4 - diff -r 0c6405ab2ff4 -r 4be95183fbcd all/template_1-model_noCO2.tar Binary file all/template_1-model_noCO2.tar has changed diff -r 0c6405ab2ff4 -r 4be95183fbcd all/template_1-model_noCO2/index.html --- a/all/template_1-model_noCO2/index.html Mon Jan 26 22:08:20 2009 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ - - - Score Sheet for CLAMP - - - - - - -

    CLAMP Score Sheet for Biogeochemical Model Evaluation

- - - - - - diff -r 0c6405ab2ff4 -r 4be95183fbcd all/template_1-model_noCO2/table.html --- a/all/template_1-model_noCO2/table.html Mon Jan 26 22:08:20 2009 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,404 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Metric Metric
components
Observations &
comparison protocol
Model
model_name
Score (points)
Full model_name
NPPEMDI NPP
observations
- - Class_A_table - - - table
- - scatter_plot -
2.5M_npp_S81
- - Class_B_table - - - table
- - scatter_plot -
2.5M_npp_S933
EMDI NPP
normalized by PPT
- - Class_A_histogram - - - Class_A_histogram - 2.5M_npp_H81
- - Class_B_histogram - - - Class_B_histogram - 2.5M_npp_H933
Correlation with MODIS obs. - - global_map - - - model_map
- - model_vs_obs -
5M_npp_G
Correlation with MODIS-zonal mean - - zonal_mean_obs - - - zonal_mean
model_vs_obs_plot
-
5M_npp_Z
LAIMODIS Mean - - land_class_obs
- - land_class_model
- - global_map -
- - model_vs_obs_table
- - global_map
- - model_vs_obs -
5M_lai_Mean
MODIS Maximum - - global_map - - - global_map
- - model_vs_obs -
5M_lai_Max
MODIS Phase - - global_map - - - global_map
- - model_vs_obs -
5M_lai_Phase
CO2
Seasonal
Cycle
Comparison with NOAA observations
phase and amplitude
----20--
Carbon
Stocks
Aboveground live biomass
in South America
- - obs_amazon - - - model_amazon
- - model_vs_obs -
5M_biomass
Aboveground live
biomass
within Amazon Basin
(sum within Legal Amazon)
- - mask
- - obs_masked
- Sum_biomass_ob (Pg C) -
- - model_masked
- - model_vs_obs
- Sum_biomass_mod (Pg C) -
5M_biomask
Energy and
C Fluxes
from Fluxnet
NEE - - line_plot - - - model_vs_obs - 5M_fluxnet_nee
Net radiation5M_fluxnet_rad
Latent heat5M_fluxnet_lh
Sensible heat5M_fluxnet_sh
Energy and
C Fluxes
from Ameriflux
NEE - - line_plot - - - model_vs_obs
- - timeseries_plot -
1M_ameriflux_nee
Shortwave Incoming1M_ameriflux_rad
Latent heat1M_ameriflux_lh
Sensible heat1M_ameriflux_sh
GPP1M_ameriflux_gpp
ER1M_ameriflux_er
Transient DynamicsBeta factor for NPP Stimulation from elevated CO2-- - - FACE_Site_comparison
- - biome_table -
3M_beta
Turnover times and pool sizes-- - - Leaf
- - Wood
- - Fine_Root
- - Litter
- - Coarse_Woody_Debris
- - Soil -
3--
Carbon Sinks
(1990-2004)
-- - - biome_mean
- - biome_total -
2--
Fire Variability-- - - global_spatial_comparison
- - temporal_dynamics_(1997-2004) -
2M_fire
Total 100M_total
- diff -r 0c6405ab2ff4 -r 4be95183fbcd all/template_1-model_noCO2/tablerows.html --- a/all/template_1-model_noCO2/tablerows.html Mon Jan 26 22:08:20 2009 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - NPP -Site observationn1 - - - - - -Site observationn2 -Site observationn3 -Site observationn4 - diff -r 0c6405ab2ff4 -r 4be95183fbcd all/template_2-model.1fire.tar Binary file all/template_2-model.1fire.tar has changed diff -r 0c6405ab2ff4 -r 4be95183fbcd all/template_2-model.2fire.tar Binary file all/template_2-model.2fire.tar has changed diff -r 0c6405ab2ff4 -r 4be95183fbcd all/template_2-model.tar --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/all/template_2-model.tar Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,1 @@ +template_2-model.1fire.tar \ No newline at end of file diff -r 0c6405ab2ff4 -r 4be95183fbcd all/template_2-model/index.html --- a/all/template_2-model/index.html Mon Jan 26 22:08:20 2009 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ - - - Score Sheet for CLAMP - - - - - - -

    CLAMP Score Sheet for Biogeochemical Model Evaluation

- - - - - - diff -r 0c6405ab2ff4 -r 4be95183fbcd all/template_2-model/table.html --- a/all/template_2-model/table.html Mon Jan 26 22:08:20 2009 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,559 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Metric Metric
components
Observations &
comparison protocol
Model
model1
Model
model2
Score (points)
Full model1 model2
NPPEMDI NPP
observations
- - Class_A_table - - - table
- - scatter_plot -
- - table
- - scatter_plot -
2.5M_npp_S81M_npp_S81
- - Class_B_table - - - table
- - scatter_plot -
- - table
- - scatter_plot -
2.5M_npp_S933M_npp_S933
EMDI NPP
normalized by PPT
- - Class_A_histogram - - - Class_A_histogram - - - Class_A_histogram - 2.5M_npp_H81M_npp_H81
- - Class_B_histogram - - - Class_B_histogram - - - Class_B_histogram - 2.5M_npp_H933M_npp_H933
Correlation with MODIS obs. - - global_map - - - model_map
- - model_vs_obs -
- - model_map
- - model_vs_obs -
5M_npp_GM_npp_G
Correlation with MODIS-zonal mean - - zonal_mean_obs - - - zonal_mean
model_vs_obs_plot
-
- - zonal_mean
model_vs_obs_plot
-
5M_npp_ZM_npp_Z
LAIMODIS Mean - - land_class_obs
- - land_class_model
- - global_map -
- - model_vs_obs_table
- - global_map
- - model_vs_obs -
- - model_vs_obs_table
- - global_map
- - model_vs_obs -
5M_lai_MeanM_lai_Mean
MODIS Maximum - - global_map - - - global_map
- - model_vs_obs -
- - global_map
- - model_vs_obs -
5M_lai_MaxM_lai_Max
MODIS Phase - - global_map - - - global_map
- - model_vs_obs -
- - global_map
- - model_vs_obs -
5M_lai_PhaseM_lai_Phase
CO2
Seasonal
Cycle
Comparison with NOAA observations
phase and amplitude
-- - - model_vs_obs - - - model_vs_obs - 20M_co2M_co2
Carbon
Stocks
Aboveground live biomass
in South America
- - obs_amazon - - - model_amazon
- - model_vs_obs -
- - amazon_map
- - model_vs_obs -
5M_biomassM_biomass
Aboveground live
biomass
within Amazon Basin
(sum within Legal Amazon)
- - mask
- - obs_masked
- Sum_biomass_ob (Pg C) -
- - model_masked
- - model_vs_obs
- Sum_biomass_mod (Pg C) -
- - model_masked
- - model_vs_obs
- Sum_biomass_mod (Pg C) -
5M_biomaskM_biomask
Energy and
C Fluxes
from Fluxnet
NEE - - line_plot - - - model_vs_obs - - - model_vs_obs - 5M_fluxnet_neeM_fluxnet_nee
Net radiation5M_fluxnet_radM_fluxnet_rad
Latent heat5M_fluxnet_lhM_fluxnet_lh
Sensible heat5M_fluxnet_shM_fluxnet_sh
Energy and
C Fluxes
from Ameriflux
NEE - - line_plot - - - model_vs_obs
- - timeseries_plot -
- - model_vs_obs
- - timeseries_plot -
1M_ameriflux_neeM_ameriflux_nee
Shortwave Incoming1M_ameriflux_radM_ameriflux_rad
Latent heat1M_ameriflux_lhM_ameriflux_lh
Sensible heat1M_ameriflux_shM_ameriflux_sh
GPP1M_ameriflux_gppM_ameriflux_gpp
ER1M_ameriflux_erM_ameriflux_er
Transient DynamicsBeta factor for NPP Stimulation from elevated CO2-- - - FACE_Site_comparison
- - biome_table -
- - FACE_Site_comparison
- - biome_table -
3M_betaM_beta
Turnover times and pool sizes-- - - Leaf
- - Wood
- - Fine_Root
- - Litter
- - Coarse_Woody_Debris
- - Soil -
- - Leaf
- - Wood
- - Fine_Root
- - Litter
- - Coarse_Woody_Debris
- - Soil -
3----
Carbon Sinks
(1990-2004)
-- - - biome_mean
- - biome_total -
- - biome_mean
- - biome_total -
2----
Fire Variability-- - - global_spatial_comparison
- - temporal_dynamics_(1997-2004) -
--2M_fire--
Total 100M_totalM_total
- diff -r 0c6405ab2ff4 -r 4be95183fbcd all/template_2-model/tablerows.html --- a/all/template_2-model/tablerows.html Mon Jan 26 22:08:20 2009 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - NPP -Site observationn1 - - - - - -Site observationn2 -Site observationn3 -Site observationn4 - diff -r 0c6405ab2ff4 -r 4be95183fbcd all/template_2-model_noCO2.tar Binary file all/template_2-model_noCO2.tar has changed diff -r 0c6405ab2ff4 -r 4be95183fbcd all/template_2-model_noCO2/index.html --- a/all/template_2-model_noCO2/index.html Mon Jan 26 22:08:20 2009 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ - - - Score Sheet for CLAMP - - - - - - -

    CLAMP Score Sheet for Biogeochemical Model Evaluation

- - - - - - diff -r 0c6405ab2ff4 -r 4be95183fbcd all/template_2-model_noCO2/table.html --- a/all/template_2-model_noCO2/table.html Mon Jan 26 22:08:20 2009 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,552 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Metric Metric
components
Observations &
comparison protocol
Model
model1
Model
model2
Score (points)
Full model1 model2
NPPEMDI NPP
observations
- - Class_A_table - - - table
- - scatter_plot -
- - table
- - scatter_plot -
2.5M_npp_S81M_npp_S81
- - Class_B_table - - - table
- - scatter_plot -
- - table
- - scatter_plot -
2.5M_npp_S933M_npp_S933
EMDI NPP
normalized by PPT
- - Class_A_histogram - - - Class_A_histogram - - - Class_A_histogram - 2.5M_npp_H81M_npp_H81
- - Class_B_histogram - - - Class_B_histogram - - - Class_B_histogram - 2.5M_npp_H933M_npp_H933
Correlation with MODIS obs. - - global_map - - - model_map
- - model_vs_obs -
- - model_map
- - model_vs_obs -
5M_npp_GM_npp_G
Correlation with MODIS-zonal mean - - zonal_mean_obs - - - zonal_mean
model_vs_obs_plot
-
- - zonal_mean
model_vs_obs_plot
-
5M_npp_ZM_npp_Z
LAIMODIS Mean - - land_class_obs
- - land_class_model
- - global_map -
- - model_vs_obs_table
- - global_map
- - model_vs_obs -
- - model_vs_obs_table
- - global_map
- - model_vs_obs -
5M_lai_MeanM_lai_Mean
MODIS Maximum - - global_map - - - global_map
- - model_vs_obs -
- - global_map
- - model_vs_obs -
5M_lai_MaxM_lai_Max
MODIS Phase - - global_map - - - global_map
- - model_vs_obs -
- - global_map
- - model_vs_obs -
5M_lai_PhaseM_lai_Phase
CO2
Seasonal
Cycle
Comparison with NOAA observations
phase and amplitude
------20----
Carbon
Stocks
Aboveground live biomass
in South America
- - obs_amazon - - - model_amazon
- - model_vs_obs -
- - amazon_map
- - model_vs_obs -
5M_biomassM_biomass
Aboveground live
biomass
within Amazon Basin
(sum within Legal Amazon)
- - mask
- - obs_masked
- Sum_biomass_ob (Pg C) -
- - model_masked
- - model_vs_obs
- Sum_biomass_mod (Pg C) -
- - model_masked
- - model_vs_obs
- Sum_biomass_mod (Pg C) -
5M_biomaskM_biomask
Energy and
C Fluxes
from Fluxnet
NEE - - line_plot - - - model_vs_obs - - - model_vs_obs - 5M_fluxnet_neeM_fluxnet_nee
Net radiation5M_fluxnet_radM_fluxnet_rad
Latent heat5M_fluxnet_lhM_fluxnet_lh
Sensible heat5M_fluxnet_shM_fluxnet_sh
Energy and
C Fluxes
from Ameriflux
NEE - - line_plot - - - model_vs_obs
- - timeseries_plot -
- - model_vs_obs
- - timeseries_plot -
1M_ameriflux_neeM_ameriflux_nee
Shortwave Incoming1M_ameriflux_radM_ameriflux_rad
Latent heat1M_ameriflux_lhM_ameriflux_lh
Sensible heat1M_ameriflux_shM_ameriflux_sh
GPP1M_ameriflux_gppM_ameriflux_gpp
ER1M_ameriflux_erM_ameriflux_er
Transient DynamicsBeta factor for NPP Stimulation from elevated CO2-- - - FACE_Site_comparison
- - biome_table -
- - FACE_Site_comparison
- - biome_table -
3M_betaM_beta
Turnover times and pool sizes-- - - Leaf
- - Wood
- - Fine_Root
- - Litter
- - Coarse_Woody_Debris
- - Soil -
- - Leaf
- - Wood
- - Fine_Root
- - Litter
- - Coarse_Woody_Debris
- - Soil -
3----
Carbon Sinks
(1990-2004)
-- - - biome_mean
- - biome_total -
- - biome_mean
- - biome_total -
2----
Fire Variability-- - - global_spatial_comparison
- - temporal_dynamics_(1997-2004) -
--2M_fire--
Total 100M_totalM_total
- diff -r 0c6405ab2ff4 -r 4be95183fbcd all/template_2-model_noCO2/tablerows.html --- a/all/template_2-model_noCO2/tablerows.html Mon Jan 26 22:08:20 2009 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - NPP -Site observationn1 - - - - - -Site observationn2 -Site observationn3 -Site observationn4 - diff -r 0c6405ab2ff4 -r 4be95183fbcd time_series/10.write_ameriflux_cn_FMH36cn.ncl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/time_series/10.write_ameriflux_cn_FMH36cn.ncl Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,208 @@ +;************************************************ +; Read ascii, Write nc +; output: lat: N->S lon: -180W->180E +;************************************************ +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" +;************************************************ +begin + +; output + + model_name = "i01.36cn" + + ;diro = "/ptmp/jeff/" + diro = "/lustre/wolf-ddn/scratch/hof/cases1/i01.36cn_out/" + filo = model_name + "_ameriflux_2076-2100_monthly.nc" + c = addfile(diro+filo,"c") + filedimdef(c,"year",-1,True) + +; input data + + nlat = 96 + nlon = 144 + + year_start = 2076 + year_end = 2100 + + nyear = year_end - year_start + 1 + nmonth = 12 + + data1 = new((/nyear,nmonth,nlat,nlon/),float) + data2 = new((/nyear,nmonth,nlat,nlon/),float) + data3 = new((/nyear,nmonth,nlat,nlon/),float) + ;data4 = new((/nyear,nmonth,nlat,nlon/),float) + ;data5 = new((/nyear,nmonth,nlat,nlon/),float) + data6 = new((/nyear,nmonth,nlat,nlon/),float) + data7 = new((/nyear,nmonth,nlat,nlon/),float) + data8 = new((/nyear,nmonth,nlat,nlon/),float) + data9 = new((/nyear,nmonth,nlat,nlon/),float) + data10 = new((/nyear,nmonth,nlat,nlon/),float) + date = new((/nyear,nmonth/),integer) + +; name dimensions and assign coordinate variables + + data1!0 ="year" + data1!1 ="month" + data1!2 = "lat" + data1!3 = "lon" + + data2!0 ="year" + data2!1 ="month" + data2!2 = "lat" + data2!3 = "lon" + + data3!0 ="year" + data3!1 ="month" + data3!2 = "lat" + data3!3 = "lon" + + ;data4!0 ="year" + ;data4!1 ="month" + ;data4!2 = "lat" + ;data4!3 = "lon" + + ;data5!0 ="year" + ;data5!1 ="month" + ;data5!2 = "lat" + ;data5!3 = "lon" + + data6!0 ="year" + data6!1 ="month" + data6!2 = "lat" + data6!3 = "lon" + + data7!0 ="year" + data7!1 ="month" + data7!2 = "lat" + data7!3 = "lon" + + data8!0 ="year" + data8!1 ="month" + data8!2 = "lat" + data8!3 = "lon" + + data9!0 ="year" + data9!1 ="month" + data9!2 = "lat" + data9!3 = "lon" + + data10!0 ="year" + data10!1 ="month" + data10!2 = "lat" + data10!3 = "lon" + + date!0 ="year" + date!1 ="month" + date@long_name = "date: yyyymm" + +; input dir + diri = "/lustre/wolf-ddn/scratch/hof/cases1/"+model_name+"/" + + do m = 0,nyear-1 + year = year_start + m + do n = 0,nmonth-1 + nn = n+1 + date(m,n) = year*100 +nn + +; input file + if (nn .ge. 10) then + fili = model_name+".clm2.h0."+year+"-"+nn+".nc" + else + fili = model_name+".clm2.h0."+year+"-0"+nn+".nc" + end if + + print (fili) + + g = addfile (diri+fili,"r") + + b = g->NEE + data1(m,n,:,:) = (/b(0,:,:)/) + data1@long_name = b@long_name + data1@units = b@units + data1@_FillValue = b@_FillValue + delete (b) + + b = g->GPP + data2(m,n,:,:) = (/b(0,:,:)/) + data2@long_name = b@long_name + data2@units = b@units + data2@_FillValue = b@_FillValue + delete (b) + + b = g->ER + data3(m,n,:,:) = (/b(0,:,:)/) + data3@long_name = b@long_name + data3@units = b@units + data3@_FillValue = b@_FillValue + delete (b) + + ;b = g->NETRAD + ;data4(m,n,:,:) = (/b(0,:,:)/) + ;data4@long_name = b@long_name + ;data4@units = b@units + ;data4@_FillValue = b@_FillValue + ;delete (b) + + ;b = g->LATENT + ;data5(m,n,:,:) = (/b(0,:,:)/) + ;data5@long_name = b@long_name + ;data5@units = b@units + ;data5@_FillValue = b@_FillValue + ;delete (b) + + b = g->FSH + data6(m,n,:,:) = (/b(0,:,:)/) + data6@long_name = b@long_name + data6@units = b@units + data6@_FillValue = b@_FillValue + delete (b) + + b = g->FSDS + data7(m,n,:,:) = (/b(0,:,:)/) + data7@long_name = b@long_name + data7@units = b@units + data7@_FillValue = b@_FillValue + delete (b) + + b = g->FCEV + data8(m,n,:,:) = (/b(0,:,:)/) + data8@long_name = b@long_name + data8@units = b@units + data8@_FillValue = b@_FillValue + delete (b) + + b = g->FCTR + data9(m,n,:,:) = (/b(0,:,:)/) + data9@long_name = b@long_name + data9@units = b@units + data9@_FillValue = b@_FillValue + delete (b) + + b = g->FGEV + data10(m,n,:,:) = (/b(0,:,:)/) + data10@long_name = b@long_name + data10@units = b@units + data10@_FillValue = b@_FillValue + delete (b) + + end do + end do + + c->NEE = data1 + c->GPP = data2 + c->ER = data3 + ;c->NETRAD = data4 + ;c->LATENT = data5 + c->FSH = data6 + c->FSDS = data7 + c->FCEV = data8 + c->FCTR = data9 + c->FGEV = data10 + c->date = date + c->area = g->area + + print (date) + +end diff -r 0c6405ab2ff4 -r 4be95183fbcd time_series/10.write_ameriflux_cn_FMH37cn_cont.ncl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/time_series/10.write_ameriflux_cn_FMH37cn_cont.ncl Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,208 @@ +;************************************************ +; Read ascii, Write nc +; output: lat: N->S lon: -180W->180E +;************************************************ +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" +;************************************************ +begin + +; output + + model_name = "i01.37cn_cont" + + ;diro = "/ptmp/jeff/" + diro = "/lustre/wolf-ddn/scratch/hof/cases/i01.37cn_cont_out/" + filo = model_name + "_ameriflux_2976-3000_monthly.nc" + c = addfile(diro+filo,"c") + filedimdef(c,"year",-1,True) + +; input data + + nlat = 96 + nlon = 144 + + year_start = 2976 + year_end = 3000 + + nyear = year_end - year_start + 1 + nmonth = 12 + + data1 = new((/nyear,nmonth,nlat,nlon/),float) + data2 = new((/nyear,nmonth,nlat,nlon/),float) + data3 = new((/nyear,nmonth,nlat,nlon/),float) + ;data4 = new((/nyear,nmonth,nlat,nlon/),float) + ;data5 = new((/nyear,nmonth,nlat,nlon/),float) + data6 = new((/nyear,nmonth,nlat,nlon/),float) + data7 = new((/nyear,nmonth,nlat,nlon/),float) + data8 = new((/nyear,nmonth,nlat,nlon/),float) + data9 = new((/nyear,nmonth,nlat,nlon/),float) + data10 = new((/nyear,nmonth,nlat,nlon/),float) + date = new((/nyear,nmonth/),integer) + +; name dimensions and assign coordinate variables + + data1!0 ="year" + data1!1 ="month" + data1!2 = "lat" + data1!3 = "lon" + + data2!0 ="year" + data2!1 ="month" + data2!2 = "lat" + data2!3 = "lon" + + data3!0 ="year" + data3!1 ="month" + data3!2 = "lat" + data3!3 = "lon" + + ;data4!0 ="year" + ;data4!1 ="month" + ;data4!2 = "lat" + ;data4!3 = "lon" + + ;data5!0 ="year" + ;data5!1 ="month" + ;data5!2 = "lat" + ;data5!3 = "lon" + + data6!0 ="year" + data6!1 ="month" + data6!2 = "lat" + data6!3 = "lon" + + data7!0 ="year" + data7!1 ="month" + data7!2 = "lat" + data7!3 = "lon" + + data8!0 ="year" + data8!1 ="month" + data8!2 = "lat" + data8!3 = "lon" + + data9!0 ="year" + data9!1 ="month" + data9!2 = "lat" + data9!3 = "lon" + + data10!0 ="year" + data10!1 ="month" + data10!2 = "lat" + data10!3 = "lon" + + date!0 ="year" + date!1 ="month" + date@long_name = "date: yyyymm" + +; input dir + diri = "/lustre/wolf-ddn/scratch/hof/cases/"+model_name+"/" + + do m = 0,nyear-1 + year = year_start + m + do n = 0,nmonth-1 + nn = n+1 + date(m,n) = year*100 +nn + +; input file + if (nn .ge. 10) then + fili = model_name+".clm2.h0."+year+"-"+nn+".nc" + else + fili = model_name+".clm2.h0."+year+"-0"+nn+".nc" + end if + + print (fili) + + g = addfile (diri+fili,"r") + + b = g->NEE + data1(m,n,:,:) = (/b(0,:,:)/) + data1@long_name = b@long_name + data1@units = b@units + data1@_FillValue = b@_FillValue + delete (b) + + b = g->GPP + data2(m,n,:,:) = (/b(0,:,:)/) + data2@long_name = b@long_name + data2@units = b@units + data2@_FillValue = b@_FillValue + delete (b) + + b = g->ER + data3(m,n,:,:) = (/b(0,:,:)/) + data3@long_name = b@long_name + data3@units = b@units + data3@_FillValue = b@_FillValue + delete (b) + + ;b = g->NETRAD + ;data4(m,n,:,:) = (/b(0,:,:)/) + ;data4@long_name = b@long_name + ;data4@units = b@units + ;data4@_FillValue = b@_FillValue + ;delete (b) + + ;b = g->LATENT + ;data5(m,n,:,:) = (/b(0,:,:)/) + ;data5@long_name = b@long_name + ;data5@units = b@units + ;data5@_FillValue = b@_FillValue + ;delete (b) + + b = g->FSH + data6(m,n,:,:) = (/b(0,:,:)/) + data6@long_name = b@long_name + data6@units = b@units + data6@_FillValue = b@_FillValue + delete (b) + + b = g->FSDS + data7(m,n,:,:) = (/b(0,:,:)/) + data7@long_name = b@long_name + data7@units = b@units + data7@_FillValue = b@_FillValue + delete (b) + + b = g->FCEV + data8(m,n,:,:) = (/b(0,:,:)/) + data8@long_name = b@long_name + data8@units = b@units + data8@_FillValue = b@_FillValue + delete (b) + + b = g->FCTR + data9(m,n,:,:) = (/b(0,:,:)/) + data9@long_name = b@long_name + data9@units = b@units + data9@_FillValue = b@_FillValue + delete (b) + + b = g->FGEV + data10(m,n,:,:) = (/b(0,:,:)/) + data10@long_name = b@long_name + data10@units = b@units + data10@_FillValue = b@_FillValue + delete (b) + + end do + end do + + c->NEE = data1 + c->GPP = data2 + c->ER = data3 + ;c->NETRAD = data4 + ;c->LATENT = data5 + c->FSH = data6 + c->FSDS = data7 + c->FCEV = data8 + c->FCTR = data9 + c->FGEV = data10 + c->date = date + c->area = g->area + + print (date) + +end diff -r 0c6405ab2ff4 -r 4be95183fbcd time_series/10.write_ameriflux_cn_FMH38cn.ncl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/time_series/10.write_ameriflux_cn_FMH38cn.ncl Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,208 @@ +;************************************************ +; Read ascii, Write nc +; output: lat: N->S lon: -180W->180E +;************************************************ +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" +;************************************************ +begin + +; output + + model_name = "i01.38cn" + + ;diro = "/ptmp/jeff/" + diro = "/lustre/wolf-ddn/scratch/hof/cases1/i01.38cn_out/" + filo = model_name + "_ameriflux_2151-2175_monthly.nc" + c = addfile(diro+filo,"c") + filedimdef(c,"year",-1,True) + +; input data + + nlat = 96 + nlon = 144 + + year_start = 2151 + year_end = 2175 + + nyear = year_end - year_start + 1 + nmonth = 12 + + data1 = new((/nyear,nmonth,nlat,nlon/),float) + data2 = new((/nyear,nmonth,nlat,nlon/),float) + data3 = new((/nyear,nmonth,nlat,nlon/),float) + ;data4 = new((/nyear,nmonth,nlat,nlon/),float) + ;data5 = new((/nyear,nmonth,nlat,nlon/),float) + data6 = new((/nyear,nmonth,nlat,nlon/),float) + data7 = new((/nyear,nmonth,nlat,nlon/),float) + data8 = new((/nyear,nmonth,nlat,nlon/),float) + data9 = new((/nyear,nmonth,nlat,nlon/),float) + data10 = new((/nyear,nmonth,nlat,nlon/),float) + date = new((/nyear,nmonth/),integer) + +; name dimensions and assign coordinate variables + + data1!0 ="year" + data1!1 ="month" + data1!2 = "lat" + data1!3 = "lon" + + data2!0 ="year" + data2!1 ="month" + data2!2 = "lat" + data2!3 = "lon" + + data3!0 ="year" + data3!1 ="month" + data3!2 = "lat" + data3!3 = "lon" + + ;data4!0 ="year" + ;data4!1 ="month" + ;data4!2 = "lat" + ;data4!3 = "lon" + + ;data5!0 ="year" + ;data5!1 ="month" + ;data5!2 = "lat" + ;data5!3 = "lon" + + data6!0 ="year" + data6!1 ="month" + data6!2 = "lat" + data6!3 = "lon" + + data7!0 ="year" + data7!1 ="month" + data7!2 = "lat" + data7!3 = "lon" + + data8!0 ="year" + data8!1 ="month" + data8!2 = "lat" + data8!3 = "lon" + + data9!0 ="year" + data9!1 ="month" + data9!2 = "lat" + data9!3 = "lon" + + data10!0 ="year" + data10!1 ="month" + data10!2 = "lat" + data10!3 = "lon" + + date!0 ="year" + date!1 ="month" + date@long_name = "date: yyyymm" + +; input dir + diri = "/lustre/wolf-ddn/scratch/hof/cases1/"+model_name+"/" + + do m = 0,nyear-1 + year = year_start + m + do n = 0,nmonth-1 + nn = n+1 + date(m,n) = year*100 +nn + +; input file + if (nn .ge. 10) then + fili = model_name+".clm2.h0."+year+"-"+nn+".nc" + else + fili = model_name+".clm2.h0."+year+"-0"+nn+".nc" + end if + + print (fili) + + g = addfile (diri+fili,"r") + + b = g->NEE + data1(m,n,:,:) = (/b(0,:,:)/) + data1@long_name = b@long_name + data1@units = b@units + data1@_FillValue = b@_FillValue + delete (b) + + b = g->GPP + data2(m,n,:,:) = (/b(0,:,:)/) + data2@long_name = b@long_name + data2@units = b@units + data2@_FillValue = b@_FillValue + delete (b) + + b = g->ER + data3(m,n,:,:) = (/b(0,:,:)/) + data3@long_name = b@long_name + data3@units = b@units + data3@_FillValue = b@_FillValue + delete (b) + + ;b = g->NETRAD + ;data4(m,n,:,:) = (/b(0,:,:)/) + ;data4@long_name = b@long_name + ;data4@units = b@units + ;data4@_FillValue = b@_FillValue + ;delete (b) + + ;b = g->LATENT + ;data5(m,n,:,:) = (/b(0,:,:)/) + ;data5@long_name = b@long_name + ;data5@units = b@units + ;data5@_FillValue = b@_FillValue + ;delete (b) + + b = g->FSH + data6(m,n,:,:) = (/b(0,:,:)/) + data6@long_name = b@long_name + data6@units = b@units + data6@_FillValue = b@_FillValue + delete (b) + + b = g->FSDS + data7(m,n,:,:) = (/b(0,:,:)/) + data7@long_name = b@long_name + data7@units = b@units + data7@_FillValue = b@_FillValue + delete (b) + + b = g->FCEV + data8(m,n,:,:) = (/b(0,:,:)/) + data8@long_name = b@long_name + data8@units = b@units + data8@_FillValue = b@_FillValue + delete (b) + + b = g->FCTR + data9(m,n,:,:) = (/b(0,:,:)/) + data9@long_name = b@long_name + data9@units = b@units + data9@_FillValue = b@_FillValue + delete (b) + + b = g->FGEV + data10(m,n,:,:) = (/b(0,:,:)/) + data10@long_name = b@long_name + data10@units = b@units + data10@_FillValue = b@_FillValue + delete (b) + + end do + end do + + c->NEE = data1 + c->GPP = data2 + c->ER = data3 + ;c->NETRAD = data4 + ;c->LATENT = data5 + c->FSH = data6 + c->FSDS = data7 + c->FCEV = data8 + c->FCTR = data9 + c->FGEV = data10 + c->date = date + c->area = g->area + + print (date) + +end diff -r 0c6405ab2ff4 -r 4be95183fbcd time_series/10.write_ameriflux_cn_FMH39cn.ncl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/time_series/10.write_ameriflux_cn_FMH39cn.ncl Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,208 @@ +;************************************************ +; Read ascii, Write nc +; output: lat: N->S lon: -180W->180E +;************************************************ +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" +;************************************************ +begin + +; output + + model_name = "i01.39cn" + + ;diro = "/ptmp/jeff/" + diro = "/lustre/wolf-ddn/scratch/hof/cases1/i01.39cn_out/" + filo = model_name + "_ameriflux_2101-2125_monthly.nc" + c = addfile(diro+filo,"c") + filedimdef(c,"year",-1,True) + +; input data + + nlat = 96 + nlon = 144 + + year_start = 2101 + year_end = 2125 + + nyear = year_end - year_start + 1 + nmonth = 12 + + data1 = new((/nyear,nmonth,nlat,nlon/),float) + data2 = new((/nyear,nmonth,nlat,nlon/),float) + data3 = new((/nyear,nmonth,nlat,nlon/),float) + ;data4 = new((/nyear,nmonth,nlat,nlon/),float) + ;data5 = new((/nyear,nmonth,nlat,nlon/),float) + data6 = new((/nyear,nmonth,nlat,nlon/),float) + data7 = new((/nyear,nmonth,nlat,nlon/),float) + data8 = new((/nyear,nmonth,nlat,nlon/),float) + data9 = new((/nyear,nmonth,nlat,nlon/),float) + data10 = new((/nyear,nmonth,nlat,nlon/),float) + date = new((/nyear,nmonth/),integer) + +; name dimensions and assign coordinate variables + + data1!0 ="year" + data1!1 ="month" + data1!2 = "lat" + data1!3 = "lon" + + data2!0 ="year" + data2!1 ="month" + data2!2 = "lat" + data2!3 = "lon" + + data3!0 ="year" + data3!1 ="month" + data3!2 = "lat" + data3!3 = "lon" + + ;data4!0 ="year" + ;data4!1 ="month" + ;data4!2 = "lat" + ;data4!3 = "lon" + + ;data5!0 ="year" + ;data5!1 ="month" + ;data5!2 = "lat" + ;data5!3 = "lon" + + data6!0 ="year" + data6!1 ="month" + data6!2 = "lat" + data6!3 = "lon" + + data7!0 ="year" + data7!1 ="month" + data7!2 = "lat" + data7!3 = "lon" + + data8!0 ="year" + data8!1 ="month" + data8!2 = "lat" + data8!3 = "lon" + + data9!0 ="year" + data9!1 ="month" + data9!2 = "lat" + data9!3 = "lon" + + data10!0 ="year" + data10!1 ="month" + data10!2 = "lat" + data10!3 = "lon" + + date!0 ="year" + date!1 ="month" + date@long_name = "date: yyyymm" + +; input dir + diri = "/lustre/wolf-ddn/scratch/hof/cases1/"+model_name+"/" + + do m = 0,nyear-1 + year = year_start + m + do n = 0,nmonth-1 + nn = n+1 + date(m,n) = year*100 +nn + +; input file + if (nn .ge. 10) then + fili = model_name+".clm2.h0."+year+"-"+nn+".nc" + else + fili = model_name+".clm2.h0."+year+"-0"+nn+".nc" + end if + + print (fili) + + g = addfile (diri+fili,"r") + + b = g->NEE + data1(m,n,:,:) = (/b(0,:,:)/) + data1@long_name = b@long_name + data1@units = b@units + data1@_FillValue = b@_FillValue + delete (b) + + b = g->GPP + data2(m,n,:,:) = (/b(0,:,:)/) + data2@long_name = b@long_name + data2@units = b@units + data2@_FillValue = b@_FillValue + delete (b) + + b = g->ER + data3(m,n,:,:) = (/b(0,:,:)/) + data3@long_name = b@long_name + data3@units = b@units + data3@_FillValue = b@_FillValue + delete (b) + + ;b = g->NETRAD + ;data4(m,n,:,:) = (/b(0,:,:)/) + ;data4@long_name = b@long_name + ;data4@units = b@units + ;data4@_FillValue = b@_FillValue + ;delete (b) + + ;b = g->LATENT + ;data5(m,n,:,:) = (/b(0,:,:)/) + ;data5@long_name = b@long_name + ;data5@units = b@units + ;data5@_FillValue = b@_FillValue + ;delete (b) + + b = g->FSH + data6(m,n,:,:) = (/b(0,:,:)/) + data6@long_name = b@long_name + data6@units = b@units + data6@_FillValue = b@_FillValue + delete (b) + + b = g->FSDS + data7(m,n,:,:) = (/b(0,:,:)/) + data7@long_name = b@long_name + data7@units = b@units + data7@_FillValue = b@_FillValue + delete (b) + + b = g->FCEV + data8(m,n,:,:) = (/b(0,:,:)/) + data8@long_name = b@long_name + data8@units = b@units + data8@_FillValue = b@_FillValue + delete (b) + + b = g->FCTR + data9(m,n,:,:) = (/b(0,:,:)/) + data9@long_name = b@long_name + data9@units = b@units + data9@_FillValue = b@_FillValue + delete (b) + + b = g->FGEV + data10(m,n,:,:) = (/b(0,:,:)/) + data10@long_name = b@long_name + data10@units = b@units + data10@_FillValue = b@_FillValue + delete (b) + + end do + end do + + c->NEE = data1 + c->GPP = data2 + c->ER = data3 + ;c->NETRAD = data4 + ;c->LATENT = data5 + c->FSH = data6 + c->FSDS = data7 + c->FCEV = data8 + c->FCTR = data9 + c->FGEV = data10 + c->date = date + c->area = g->area + + print (date) + +end diff -r 0c6405ab2ff4 -r 4be95183fbcd time_series/10.write_ameriflux_cn_FMH40cn.ncl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/time_series/10.write_ameriflux_cn_FMH40cn.ncl Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,208 @@ +;************************************************ +; Read ascii, Write nc +; output: lat: N->S lon: -180W->180E +;************************************************ +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" +;************************************************ +begin + +; output + + model_name = "i01.40cn" + + ;diro = "/ptmp/jeff/" + diro = "/lustre/wolf-ddn/scratch/hof/cases1/i01.40cn_out/" + filo = model_name + "_ameriflux_2076-2100_monthly.nc" + c = addfile(diro+filo,"c") + filedimdef(c,"year",-1,True) + +; input data + + nlat = 96 + nlon = 144 + + year_start = 2076 + year_end = 2100 + + nyear = year_end - year_start + 1 + nmonth = 12 + + data1 = new((/nyear,nmonth,nlat,nlon/),float) + data2 = new((/nyear,nmonth,nlat,nlon/),float) + data3 = new((/nyear,nmonth,nlat,nlon/),float) + ;data4 = new((/nyear,nmonth,nlat,nlon/),float) + ;data5 = new((/nyear,nmonth,nlat,nlon/),float) + data6 = new((/nyear,nmonth,nlat,nlon/),float) + data7 = new((/nyear,nmonth,nlat,nlon/),float) + data8 = new((/nyear,nmonth,nlat,nlon/),float) + data9 = new((/nyear,nmonth,nlat,nlon/),float) + data10 = new((/nyear,nmonth,nlat,nlon/),float) + date = new((/nyear,nmonth/),integer) + +; name dimensions and assign coordinate variables + + data1!0 ="year" + data1!1 ="month" + data1!2 = "lat" + data1!3 = "lon" + + data2!0 ="year" + data2!1 ="month" + data2!2 = "lat" + data2!3 = "lon" + + data3!0 ="year" + data3!1 ="month" + data3!2 = "lat" + data3!3 = "lon" + + ;data4!0 ="year" + ;data4!1 ="month" + ;data4!2 = "lat" + ;data4!3 = "lon" + + ;data5!0 ="year" + ;data5!1 ="month" + ;data5!2 = "lat" + ;data5!3 = "lon" + + data6!0 ="year" + data6!1 ="month" + data6!2 = "lat" + data6!3 = "lon" + + data7!0 ="year" + data7!1 ="month" + data7!2 = "lat" + data7!3 = "lon" + + data8!0 ="year" + data8!1 ="month" + data8!2 = "lat" + data8!3 = "lon" + + data9!0 ="year" + data9!1 ="month" + data9!2 = "lat" + data9!3 = "lon" + + data10!0 ="year" + data10!1 ="month" + data10!2 = "lat" + data10!3 = "lon" + + date!0 ="year" + date!1 ="month" + date@long_name = "date: yyyymm" + +; input dir + diri = "/lustre/wolf-ddn/scratch/hof/cases1/"+model_name+"/" + + do m = 0,nyear-1 + year = year_start + m + do n = 0,nmonth-1 + nn = n+1 + date(m,n) = year*100 +nn + +; input file + if (nn .ge. 10) then + fili = model_name+".clm2.h0."+year+"-"+nn+".nc" + else + fili = model_name+".clm2.h0."+year+"-0"+nn+".nc" + end if + + print (fili) + + g = addfile (diri+fili,"r") + + b = g->NEE + data1(m,n,:,:) = (/b(0,:,:)/) + data1@long_name = b@long_name + data1@units = b@units + data1@_FillValue = b@_FillValue + delete (b) + + b = g->GPP + data2(m,n,:,:) = (/b(0,:,:)/) + data2@long_name = b@long_name + data2@units = b@units + data2@_FillValue = b@_FillValue + delete (b) + + b = g->ER + data3(m,n,:,:) = (/b(0,:,:)/) + data3@long_name = b@long_name + data3@units = b@units + data3@_FillValue = b@_FillValue + delete (b) + + ;b = g->NETRAD + ;data4(m,n,:,:) = (/b(0,:,:)/) + ;data4@long_name = b@long_name + ;data4@units = b@units + ;data4@_FillValue = b@_FillValue + ;delete (b) + + ;b = g->LATENT + ;data5(m,n,:,:) = (/b(0,:,:)/) + ;data5@long_name = b@long_name + ;data5@units = b@units + ;data5@_FillValue = b@_FillValue + ;delete (b) + + b = g->FSH + data6(m,n,:,:) = (/b(0,:,:)/) + data6@long_name = b@long_name + data6@units = b@units + data6@_FillValue = b@_FillValue + delete (b) + + b = g->FSDS + data7(m,n,:,:) = (/b(0,:,:)/) + data7@long_name = b@long_name + data7@units = b@units + data7@_FillValue = b@_FillValue + delete (b) + + b = g->FCEV + data8(m,n,:,:) = (/b(0,:,:)/) + data8@long_name = b@long_name + data8@units = b@units + data8@_FillValue = b@_FillValue + delete (b) + + b = g->FCTR + data9(m,n,:,:) = (/b(0,:,:)/) + data9@long_name = b@long_name + data9@units = b@units + data9@_FillValue = b@_FillValue + delete (b) + + b = g->FGEV + data10(m,n,:,:) = (/b(0,:,:)/) + data10@long_name = b@long_name + data10@units = b@units + data10@_FillValue = b@_FillValue + delete (b) + + end do + end do + + c->NEE = data1 + c->GPP = data2 + c->ER = data3 + ;c->NETRAD = data4 + ;c->LATENT = data5 + c->FSH = data6 + c->FSDS = data7 + c->FCEV = data8 + c->FCTR = data9 + c->FGEV = data10 + c->date = date + c->area = g->area + + print (date) + +end diff -r 0c6405ab2ff4 -r 4be95183fbcd time_series/10.write_ameriflux_cn_FMH41cn.ncl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/time_series/10.write_ameriflux_cn_FMH41cn.ncl Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,208 @@ +;************************************************ +; Read ascii, Write nc +; output: lat: N->S lon: -180W->180E +;************************************************ +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" +;************************************************ +begin + +; output + + model_name = "i01.41cn" + + ;diro = "/ptmp/jeff/" + diro = "/lustre/wolf-ddn/scratch/hof/cases1/i01.41cn_out/" + filo = model_name + "_ameriflux_2076-2100_monthly.nc" + c = addfile(diro+filo,"c") + filedimdef(c,"year",-1,True) + +; input data + + nlat = 96 + nlon = 144 + + year_start = 2076 + year_end = 2100 + + nyear = year_end - year_start + 1 + nmonth = 12 + + data1 = new((/nyear,nmonth,nlat,nlon/),float) + data2 = new((/nyear,nmonth,nlat,nlon/),float) + data3 = new((/nyear,nmonth,nlat,nlon/),float) + ;data4 = new((/nyear,nmonth,nlat,nlon/),float) + ;data5 = new((/nyear,nmonth,nlat,nlon/),float) + data6 = new((/nyear,nmonth,nlat,nlon/),float) + data7 = new((/nyear,nmonth,nlat,nlon/),float) + data8 = new((/nyear,nmonth,nlat,nlon/),float) + data9 = new((/nyear,nmonth,nlat,nlon/),float) + data10 = new((/nyear,nmonth,nlat,nlon/),float) + date = new((/nyear,nmonth/),integer) + +; name dimensions and assign coordinate variables + + data1!0 ="year" + data1!1 ="month" + data1!2 = "lat" + data1!3 = "lon" + + data2!0 ="year" + data2!1 ="month" + data2!2 = "lat" + data2!3 = "lon" + + data3!0 ="year" + data3!1 ="month" + data3!2 = "lat" + data3!3 = "lon" + + ;data4!0 ="year" + ;data4!1 ="month" + ;data4!2 = "lat" + ;data4!3 = "lon" + + ;data5!0 ="year" + ;data5!1 ="month" + ;data5!2 = "lat" + ;data5!3 = "lon" + + data6!0 ="year" + data6!1 ="month" + data6!2 = "lat" + data6!3 = "lon" + + data7!0 ="year" + data7!1 ="month" + data7!2 = "lat" + data7!3 = "lon" + + data8!0 ="year" + data8!1 ="month" + data8!2 = "lat" + data8!3 = "lon" + + data9!0 ="year" + data9!1 ="month" + data9!2 = "lat" + data9!3 = "lon" + + data10!0 ="year" + data10!1 ="month" + data10!2 = "lat" + data10!3 = "lon" + + date!0 ="year" + date!1 ="month" + date@long_name = "date: yyyymm" + +; input dir + diri = "/lustre/wolf-ddn/scratch/hof/cases1/"+model_name+"/" + + do m = 0,nyear-1 + year = year_start + m + do n = 0,nmonth-1 + nn = n+1 + date(m,n) = year*100 +nn + +; input file + if (nn .ge. 10) then + fili = model_name+".clm2.h0."+year+"-"+nn+".nc" + else + fili = model_name+".clm2.h0."+year+"-0"+nn+".nc" + end if + + print (fili) + + g = addfile (diri+fili,"r") + + b = g->NEE + data1(m,n,:,:) = (/b(0,:,:)/) + data1@long_name = b@long_name + data1@units = b@units + data1@_FillValue = b@_FillValue + delete (b) + + b = g->GPP + data2(m,n,:,:) = (/b(0,:,:)/) + data2@long_name = b@long_name + data2@units = b@units + data2@_FillValue = b@_FillValue + delete (b) + + b = g->ER + data3(m,n,:,:) = (/b(0,:,:)/) + data3@long_name = b@long_name + data3@units = b@units + data3@_FillValue = b@_FillValue + delete (b) + + ;b = g->NETRAD + ;data4(m,n,:,:) = (/b(0,:,:)/) + ;data4@long_name = b@long_name + ;data4@units = b@units + ;data4@_FillValue = b@_FillValue + ;delete (b) + + ;b = g->LATENT + ;data5(m,n,:,:) = (/b(0,:,:)/) + ;data5@long_name = b@long_name + ;data5@units = b@units + ;data5@_FillValue = b@_FillValue + ;delete (b) + + b = g->FSH + data6(m,n,:,:) = (/b(0,:,:)/) + data6@long_name = b@long_name + data6@units = b@units + data6@_FillValue = b@_FillValue + delete (b) + + b = g->FSDS + data7(m,n,:,:) = (/b(0,:,:)/) + data7@long_name = b@long_name + data7@units = b@units + data7@_FillValue = b@_FillValue + delete (b) + + b = g->FCEV + data8(m,n,:,:) = (/b(0,:,:)/) + data8@long_name = b@long_name + data8@units = b@units + data8@_FillValue = b@_FillValue + delete (b) + + b = g->FCTR + data9(m,n,:,:) = (/b(0,:,:)/) + data9@long_name = b@long_name + data9@units = b@units + data9@_FillValue = b@_FillValue + delete (b) + + b = g->FGEV + data10(m,n,:,:) = (/b(0,:,:)/) + data10@long_name = b@long_name + data10@units = b@units + data10@_FillValue = b@_FillValue + delete (b) + + end do + end do + + c->NEE = data1 + c->GPP = data2 + c->ER = data3 + ;c->NETRAD = data4 + ;c->LATENT = data5 + c->FSH = data6 + c->FSDS = data7 + c->FCEV = data8 + c->FCTR = data9 + c->FGEV = data10 + c->date = date + c->area = g->area + + print (date) + +end diff -r 0c6405ab2ff4 -r 4be95183fbcd time_series/10.write_ameriflux_cn_FMH42cn.ncl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/time_series/10.write_ameriflux_cn_FMH42cn.ncl Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,208 @@ +;************************************************ +; Read ascii, Write nc +; output: lat: N->S lon: -180W->180E +;************************************************ +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" +;************************************************ +begin + +; output + + model_name = "i01.42cn" + + ;diro = "/ptmp/jeff/" + diro = "/lustre/wolf-ddn/scratch/hof/cases/i01.42cn_out/" + filo = model_name + "_ameriflux_2976-3000_monthly.nc" + c = addfile(diro+filo,"c") + filedimdef(c,"year",-1,True) + +; input data + + nlat = 96 + nlon = 144 + + year_start = 2976 + year_end = 3000 + + nyear = year_end - year_start + 1 + nmonth = 12 + + data1 = new((/nyear,nmonth,nlat,nlon/),float) + data2 = new((/nyear,nmonth,nlat,nlon/),float) + data3 = new((/nyear,nmonth,nlat,nlon/),float) + ;data4 = new((/nyear,nmonth,nlat,nlon/),float) + ;data5 = new((/nyear,nmonth,nlat,nlon/),float) + data6 = new((/nyear,nmonth,nlat,nlon/),float) + data7 = new((/nyear,nmonth,nlat,nlon/),float) + data8 = new((/nyear,nmonth,nlat,nlon/),float) + data9 = new((/nyear,nmonth,nlat,nlon/),float) + data10 = new((/nyear,nmonth,nlat,nlon/),float) + date = new((/nyear,nmonth/),integer) + +; name dimensions and assign coordinate variables + + data1!0 ="year" + data1!1 ="month" + data1!2 = "lat" + data1!3 = "lon" + + data2!0 ="year" + data2!1 ="month" + data2!2 = "lat" + data2!3 = "lon" + + data3!0 ="year" + data3!1 ="month" + data3!2 = "lat" + data3!3 = "lon" + + ;data4!0 ="year" + ;data4!1 ="month" + ;data4!2 = "lat" + ;data4!3 = "lon" + + ;data5!0 ="year" + ;data5!1 ="month" + ;data5!2 = "lat" + ;data5!3 = "lon" + + data6!0 ="year" + data6!1 ="month" + data6!2 = "lat" + data6!3 = "lon" + + data7!0 ="year" + data7!1 ="month" + data7!2 = "lat" + data7!3 = "lon" + + data8!0 ="year" + data8!1 ="month" + data8!2 = "lat" + data8!3 = "lon" + + data9!0 ="year" + data9!1 ="month" + data9!2 = "lat" + data9!3 = "lon" + + data10!0 ="year" + data10!1 ="month" + data10!2 = "lat" + data10!3 = "lon" + + date!0 ="year" + date!1 ="month" + date@long_name = "date: yyyymm" + +; input dir + diri = "/lustre/wolf-ddn/scratch/hof/cases/"+model_name+"/" + + do m = 0,nyear-1 + year = year_start + m + do n = 0,nmonth-1 + nn = n+1 + date(m,n) = year*100 +nn + +; input file + if (nn .ge. 10) then + fili = model_name+".clm2.h0."+year+"-"+nn+".nc" + else + fili = model_name+".clm2.h0."+year+"-0"+nn+".nc" + end if + + print (fili) + + g = addfile (diri+fili,"r") + + b = g->NEE + data1(m,n,:,:) = (/b(0,:,:)/) + data1@long_name = b@long_name + data1@units = b@units + data1@_FillValue = b@_FillValue + delete (b) + + b = g->GPP + data2(m,n,:,:) = (/b(0,:,:)/) + data2@long_name = b@long_name + data2@units = b@units + data2@_FillValue = b@_FillValue + delete (b) + + b = g->ER + data3(m,n,:,:) = (/b(0,:,:)/) + data3@long_name = b@long_name + data3@units = b@units + data3@_FillValue = b@_FillValue + delete (b) + + ;b = g->NETRAD + ;data4(m,n,:,:) = (/b(0,:,:)/) + ;data4@long_name = b@long_name + ;data4@units = b@units + ;data4@_FillValue = b@_FillValue + ;delete (b) + + ;b = g->LATENT + ;data5(m,n,:,:) = (/b(0,:,:)/) + ;data5@long_name = b@long_name + ;data5@units = b@units + ;data5@_FillValue = b@_FillValue + ;delete (b) + + b = g->FSH + data6(m,n,:,:) = (/b(0,:,:)/) + data6@long_name = b@long_name + data6@units = b@units + data6@_FillValue = b@_FillValue + delete (b) + + b = g->FSDS + data7(m,n,:,:) = (/b(0,:,:)/) + data7@long_name = b@long_name + data7@units = b@units + data7@_FillValue = b@_FillValue + delete (b) + + b = g->FCEV + data8(m,n,:,:) = (/b(0,:,:)/) + data8@long_name = b@long_name + data8@units = b@units + data8@_FillValue = b@_FillValue + delete (b) + + b = g->FCTR + data9(m,n,:,:) = (/b(0,:,:)/) + data9@long_name = b@long_name + data9@units = b@units + data9@_FillValue = b@_FillValue + delete (b) + + b = g->FGEV + data10(m,n,:,:) = (/b(0,:,:)/) + data10@long_name = b@long_name + data10@units = b@units + data10@_FillValue = b@_FillValue + delete (b) + + end do + end do + + c->NEE = data1 + c->GPP = data2 + c->ER = data3 + ;c->NETRAD = data4 + ;c->LATENT = data5 + c->FSH = data6 + c->FSDS = data7 + c->FCEV = data8 + c->FCTR = data9 + c->FGEV = data10 + c->date = date + c->area = g->area + + print (date) + +end diff -r 0c6405ab2ff4 -r 4be95183fbcd time_series/10.write_ameriflux_cn_FMH43cn.ncl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/time_series/10.write_ameriflux_cn_FMH43cn.ncl Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,208 @@ +;************************************************ +; Read ascii, Write nc +; output: lat: N->S lon: -180W->180E +;************************************************ +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" +;************************************************ +begin + +; output + + model_name = "i01.43cn" + + ;diro = "/ptmp/jeff/" + diro = "/lustre/wolf-ddn/scratch/hof/cases1/i01.43cn_out/" + filo = model_name + "_ameriflux_2876-2900_monthly.nc" + c = addfile(diro+filo,"c") + filedimdef(c,"year",-1,True) + +; input data + + nlat = 96 + nlon = 144 + + year_start = 2876 + year_end = 2900 + + nyear = year_end - year_start + 1 + nmonth = 12 + + data1 = new((/nyear,nmonth,nlat,nlon/),float) + data2 = new((/nyear,nmonth,nlat,nlon/),float) + data3 = new((/nyear,nmonth,nlat,nlon/),float) + ;data4 = new((/nyear,nmonth,nlat,nlon/),float) + ;data5 = new((/nyear,nmonth,nlat,nlon/),float) + data6 = new((/nyear,nmonth,nlat,nlon/),float) + data7 = new((/nyear,nmonth,nlat,nlon/),float) + data8 = new((/nyear,nmonth,nlat,nlon/),float) + data9 = new((/nyear,nmonth,nlat,nlon/),float) + data10 = new((/nyear,nmonth,nlat,nlon/),float) + date = new((/nyear,nmonth/),integer) + +; name dimensions and assign coordinate variables + + data1!0 ="year" + data1!1 ="month" + data1!2 = "lat" + data1!3 = "lon" + + data2!0 ="year" + data2!1 ="month" + data2!2 = "lat" + data2!3 = "lon" + + data3!0 ="year" + data3!1 ="month" + data3!2 = "lat" + data3!3 = "lon" + + ;data4!0 ="year" + ;data4!1 ="month" + ;data4!2 = "lat" + ;data4!3 = "lon" + + ;data5!0 ="year" + ;data5!1 ="month" + ;data5!2 = "lat" + ;data5!3 = "lon" + + data6!0 ="year" + data6!1 ="month" + data6!2 = "lat" + data6!3 = "lon" + + data7!0 ="year" + data7!1 ="month" + data7!2 = "lat" + data7!3 = "lon" + + data8!0 ="year" + data8!1 ="month" + data8!2 = "lat" + data8!3 = "lon" + + data9!0 ="year" + data9!1 ="month" + data9!2 = "lat" + data9!3 = "lon" + + data10!0 ="year" + data10!1 ="month" + data10!2 = "lat" + data10!3 = "lon" + + date!0 ="year" + date!1 ="month" + date@long_name = "date: yyyymm" + +; input dir + diri = "/lustre/wolf-ddn/scratch/hof/cases1/"+model_name+"/" + + do m = 0,nyear-1 + year = year_start + m + do n = 0,nmonth-1 + nn = n+1 + date(m,n) = year*100 +nn + +; input file + if (nn .ge. 10) then + fili = model_name+".clm2.h0."+year+"-"+nn+".nc" + else + fili = model_name+".clm2.h0."+year+"-0"+nn+".nc" + end if + + print (fili) + + g = addfile (diri+fili,"r") + + b = g->NEE + data1(m,n,:,:) = (/b(0,:,:)/) + data1@long_name = b@long_name + data1@units = b@units + data1@_FillValue = b@_FillValue + delete (b) + + b = g->GPP + data2(m,n,:,:) = (/b(0,:,:)/) + data2@long_name = b@long_name + data2@units = b@units + data2@_FillValue = b@_FillValue + delete (b) + + b = g->ER + data3(m,n,:,:) = (/b(0,:,:)/) + data3@long_name = b@long_name + data3@units = b@units + data3@_FillValue = b@_FillValue + delete (b) + + ;b = g->NETRAD + ;data4(m,n,:,:) = (/b(0,:,:)/) + ;data4@long_name = b@long_name + ;data4@units = b@units + ;data4@_FillValue = b@_FillValue + ;delete (b) + + ;b = g->LATENT + ;data5(m,n,:,:) = (/b(0,:,:)/) + ;data5@long_name = b@long_name + ;data5@units = b@units + ;data5@_FillValue = b@_FillValue + ;delete (b) + + b = g->FSH + data6(m,n,:,:) = (/b(0,:,:)/) + data6@long_name = b@long_name + data6@units = b@units + data6@_FillValue = b@_FillValue + delete (b) + + b = g->FSDS + data7(m,n,:,:) = (/b(0,:,:)/) + data7@long_name = b@long_name + data7@units = b@units + data7@_FillValue = b@_FillValue + delete (b) + + b = g->FCEV + data8(m,n,:,:) = (/b(0,:,:)/) + data8@long_name = b@long_name + data8@units = b@units + data8@_FillValue = b@_FillValue + delete (b) + + b = g->FCTR + data9(m,n,:,:) = (/b(0,:,:)/) + data9@long_name = b@long_name + data9@units = b@units + data9@_FillValue = b@_FillValue + delete (b) + + b = g->FGEV + data10(m,n,:,:) = (/b(0,:,:)/) + data10@long_name = b@long_name + data10@units = b@units + data10@_FillValue = b@_FillValue + delete (b) + + end do + end do + + c->NEE = data1 + c->GPP = data2 + c->ER = data3 + ;c->NETRAD = data4 + ;c->LATENT = data5 + c->FSH = data6 + c->FSDS = data7 + c->FCEV = data8 + c->FCTR = data9 + c->FGEV = data10 + c->date = date + c->area = g->area + + print (date) + +end diff -r 0c6405ab2ff4 -r 4be95183fbcd time_series/20.write_fire_cn_FMH36cn.ncl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/time_series/20.write_fire_cn_FMH36cn.ncl Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,104 @@ +;************************************************ +; output: lat: N->S lon: -180W->180E +;************************************************ +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" +;************************************************ +begin + +; output + + model_name = "i01.36cn" + + diro = "/lustre/wolf-ddn/scratch/hof/cases1/i01.36cn_out/" + filo = model_name + "_Fire_C_2076-2100_monthly.nc" + c = addfile(diro+filo,"c") + filedimdef(c,"year",-1,True) + +; input data + + nlat = 96 + nlon = 144 + + year_start = 2076 + year_end = 2100 + + nyear = year_end - year_start + 1 + nmonth = 12 + + data1 = new((/nyear,nmonth,nlat,nlon/),float) + data2 = new((/nyear,nmonth,nlat,nlon/),float) + data3 = new((/nyear,nmonth,nlat,nlon/),float) + date = new((/nyear,nmonth/),integer) + +; input dir + diri = "/lustre/wolf-ddn/scratch/hof/cases1/"+model_name+"/" + + do m = 0,nyear-1 + year = year_start + m + do n = 0,nmonth-1 + nn = n+1 + date(m,n) = year*100 +nn + +; input file + if (nn .ge. 10) then + fili = model_name+".clm2.h0."+year+"-"+nn+".nc" + else + fili = model_name+".clm2.h0."+year+"-0"+nn+".nc" + end if + +; print (fili) + + g = addfile (diri+fili,"r") + + b1 = g->COL_FIRE_CLOSS + data1(m,n,:,:) = (/b1(0,:,:)/) + + b2 = g->NPP + data2(m,n,:,:) = (/b2(0,:,:)/) + + b3 = g->NEE + data3(m,n,:,:) = (/b3(0,:,:)/) + end do + end do + +; name dimensions and assign coordinate variables + + data1!0 ="year" + data1!1 ="month" + data1!2 = "lat" + data1!3 = "lon" + data1@long_name = b1@long_name + data1@units = b1@units + data1@_FillValue = b1@_FillValue + + data2!0 ="year" + data2!1 ="month" + data2!2 = "lat" + data2!3 = "lon" + data2@long_name = b2@long_name + data2@units = b2@units + data2@_FillValue = b2@_FillValue + + data3!0 ="year" + data3!1 ="month" + data3!2 = "lat" + data3!3 = "lon" + data3@long_name = b3@long_name + data3@units = b3@units + data3@_FillValue = b3@_FillValue + + date!0 ="year" + date!1 ="month" + date@long_name = "date: yyyymm" + + c->COL_FIRE_CLOSS = data1 + c->NPP = data2 + c->NEE = data3 + c->date = date + c->area = g->area + + print (date) + +end diff -r 0c6405ab2ff4 -r 4be95183fbcd time_series/20.write_fire_cn_FMH37cn_cont.ncl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/time_series/20.write_fire_cn_FMH37cn_cont.ncl Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,104 @@ +;************************************************ +; output: lat: N->S lon: -180W->180E +;************************************************ +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" +;************************************************ +begin + +; output + + model_name = "i01.37cn_cont" + + diro = "/lustre/wolf-ddn/scratch/hof/cases/i01.37cn_cont_out/" + filo = model_name + "_Fire_C_2976-3000_monthly.nc" + c = addfile(diro+filo,"c") + filedimdef(c,"year",-1,True) + +; input data + + nlat = 96 + nlon = 144 + + year_start = 2976 + year_end = 3000 + + nyear = year_end - year_start + 1 + nmonth = 12 + + data1 = new((/nyear,nmonth,nlat,nlon/),float) + data2 = new((/nyear,nmonth,nlat,nlon/),float) + data3 = new((/nyear,nmonth,nlat,nlon/),float) + date = new((/nyear,nmonth/),integer) + +; input dir + diri = "/lustre/wolf-ddn/scratch/hof/cases/"+model_name+"/" + + do m = 0,nyear-1 + year = year_start + m + do n = 0,nmonth-1 + nn = n+1 + date(m,n) = year*100 +nn + +; input file + if (nn .ge. 10) then + fili = model_name+".clm2.h0."+year+"-"+nn+".nc" + else + fili = model_name+".clm2.h0."+year+"-0"+nn+".nc" + end if + +; print (fili) + + g = addfile (diri+fili,"r") + + b1 = g->COL_FIRE_CLOSS + data1(m,n,:,:) = (/b1(0,:,:)/) + + b2 = g->NPP + data2(m,n,:,:) = (/b2(0,:,:)/) + + b3 = g->NEE + data3(m,n,:,:) = (/b3(0,:,:)/) + end do + end do + +; name dimensions and assign coordinate variables + + data1!0 ="year" + data1!1 ="month" + data1!2 = "lat" + data1!3 = "lon" + data1@long_name = b1@long_name + data1@units = b1@units + data1@_FillValue = b1@_FillValue + + data2!0 ="year" + data2!1 ="month" + data2!2 = "lat" + data2!3 = "lon" + data2@long_name = b2@long_name + data2@units = b2@units + data2@_FillValue = b2@_FillValue + + data3!0 ="year" + data3!1 ="month" + data3!2 = "lat" + data3!3 = "lon" + data3@long_name = b3@long_name + data3@units = b3@units + data3@_FillValue = b3@_FillValue + + date!0 ="year" + date!1 ="month" + date@long_name = "date: yyyymm" + + c->COL_FIRE_CLOSS = data1 + c->NPP = data2 + c->NEE = data3 + c->date = date + c->area = g->area + + print (date) + +end diff -r 0c6405ab2ff4 -r 4be95183fbcd time_series/20.write_fire_cn_FMH38cn.ncl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/time_series/20.write_fire_cn_FMH38cn.ncl Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,104 @@ +;************************************************ +; output: lat: N->S lon: -180W->180E +;************************************************ +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" +;************************************************ +begin + +; output + + model_name = "i01.38cn" + + diro = "/lustre/wolf-ddn/scratch/hof/cases1/i01.38cn_out/" + filo = model_name + "_Fire_C_2151-2175_monthly.nc" + c = addfile(diro+filo,"c") + filedimdef(c,"year",-1,True) + +; input data + + nlat = 96 + nlon = 144 + + year_start = 2151 + year_end = 2175 + + nyear = year_end - year_start + 1 + nmonth = 12 + + data1 = new((/nyear,nmonth,nlat,nlon/),float) + data2 = new((/nyear,nmonth,nlat,nlon/),float) + data3 = new((/nyear,nmonth,nlat,nlon/),float) + date = new((/nyear,nmonth/),integer) + +; input dir + diri = "/lustre/wolf-ddn/scratch/hof/cases1/"+model_name+"/" + + do m = 0,nyear-1 + year = year_start + m + do n = 0,nmonth-1 + nn = n+1 + date(m,n) = year*100 +nn + +; input file + if (nn .ge. 10) then + fili = model_name+".clm2.h0."+year+"-"+nn+".nc" + else + fili = model_name+".clm2.h0."+year+"-0"+nn+".nc" + end if + +; print (fili) + + g = addfile (diri+fili,"r") + + b1 = g->COL_FIRE_CLOSS + data1(m,n,:,:) = (/b1(0,:,:)/) + + b2 = g->NPP + data2(m,n,:,:) = (/b2(0,:,:)/) + + b3 = g->NEE + data3(m,n,:,:) = (/b3(0,:,:)/) + end do + end do + +; name dimensions and assign coordinate variables + + data1!0 ="year" + data1!1 ="month" + data1!2 = "lat" + data1!3 = "lon" + data1@long_name = b1@long_name + data1@units = b1@units + data1@_FillValue = b1@_FillValue + + data2!0 ="year" + data2!1 ="month" + data2!2 = "lat" + data2!3 = "lon" + data2@long_name = b2@long_name + data2@units = b2@units + data2@_FillValue = b2@_FillValue + + data3!0 ="year" + data3!1 ="month" + data3!2 = "lat" + data3!3 = "lon" + data3@long_name = b3@long_name + data3@units = b3@units + data3@_FillValue = b3@_FillValue + + date!0 ="year" + date!1 ="month" + date@long_name = "date: yyyymm" + + c->COL_FIRE_CLOSS = data1 + c->NPP = data2 + c->NEE = data3 + c->date = date + c->area = g->area + + print (date) + +end diff -r 0c6405ab2ff4 -r 4be95183fbcd time_series/20.write_fire_cn_FMH39cn.ncl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/time_series/20.write_fire_cn_FMH39cn.ncl Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,104 @@ +;************************************************ +; output: lat: N->S lon: -180W->180E +;************************************************ +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" +;************************************************ +begin + +; output + + model_name = "i01.39cn" + + diro = "/lustre/wolf-ddn/scratch/hof/cases1/i01.39cn_out/" + filo = model_name + "_Fire_C_2101-2125_monthly.nc" + c = addfile(diro+filo,"c") + filedimdef(c,"year",-1,True) + +; input data + + nlat = 96 + nlon = 144 + + year_start = 2101 + year_end = 2125 + + nyear = year_end - year_start + 1 + nmonth = 12 + + data1 = new((/nyear,nmonth,nlat,nlon/),float) + data2 = new((/nyear,nmonth,nlat,nlon/),float) + data3 = new((/nyear,nmonth,nlat,nlon/),float) + date = new((/nyear,nmonth/),integer) + +; input dir + diri = "/lustre/wolf-ddn/scratch/hof/cases1/"+model_name+"/" + + do m = 0,nyear-1 + year = year_start + m + do n = 0,nmonth-1 + nn = n+1 + date(m,n) = year*100 +nn + +; input file + if (nn .ge. 10) then + fili = model_name+".clm2.h0."+year+"-"+nn+".nc" + else + fili = model_name+".clm2.h0."+year+"-0"+nn+".nc" + end if + +; print (fili) + + g = addfile (diri+fili,"r") + + b1 = g->COL_FIRE_CLOSS + data1(m,n,:,:) = (/b1(0,:,:)/) + + b2 = g->NPP + data2(m,n,:,:) = (/b2(0,:,:)/) + + b3 = g->NEE + data3(m,n,:,:) = (/b3(0,:,:)/) + end do + end do + +; name dimensions and assign coordinate variables + + data1!0 ="year" + data1!1 ="month" + data1!2 = "lat" + data1!3 = "lon" + data1@long_name = b1@long_name + data1@units = b1@units + data1@_FillValue = b1@_FillValue + + data2!0 ="year" + data2!1 ="month" + data2!2 = "lat" + data2!3 = "lon" + data2@long_name = b2@long_name + data2@units = b2@units + data2@_FillValue = b2@_FillValue + + data3!0 ="year" + data3!1 ="month" + data3!2 = "lat" + data3!3 = "lon" + data3@long_name = b3@long_name + data3@units = b3@units + data3@_FillValue = b3@_FillValue + + date!0 ="year" + date!1 ="month" + date@long_name = "date: yyyymm" + + c->COL_FIRE_CLOSS = data1 + c->NPP = data2 + c->NEE = data3 + c->date = date + c->area = g->area + + print (date) + +end diff -r 0c6405ab2ff4 -r 4be95183fbcd time_series/20.write_fire_cn_FMH40cn.ncl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/time_series/20.write_fire_cn_FMH40cn.ncl Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,104 @@ +;************************************************ +; output: lat: N->S lon: -180W->180E +;************************************************ +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" +;************************************************ +begin + +; output + + model_name = "i01.40cn" + + diro = "/lustre/wolf-ddn/scratch/hof/cases1/i01.40cn_out/" + filo = model_name + "_Fire_C_2076-2100_monthly.nc" + c = addfile(diro+filo,"c") + filedimdef(c,"year",-1,True) + +; input data + + nlat = 96 + nlon = 144 + + year_start = 2076 + year_end = 2100 + + nyear = year_end - year_start + 1 + nmonth = 12 + + data1 = new((/nyear,nmonth,nlat,nlon/),float) + data2 = new((/nyear,nmonth,nlat,nlon/),float) + data3 = new((/nyear,nmonth,nlat,nlon/),float) + date = new((/nyear,nmonth/),integer) + +; input dir + diri = "/lustre/wolf-ddn/scratch/hof/cases1/"+model_name+"/" + + do m = 0,nyear-1 + year = year_start + m + do n = 0,nmonth-1 + nn = n+1 + date(m,n) = year*100 +nn + +; input file + if (nn .ge. 10) then + fili = model_name+".clm2.h0."+year+"-"+nn+".nc" + else + fili = model_name+".clm2.h0."+year+"-0"+nn+".nc" + end if + +; print (fili) + + g = addfile (diri+fili,"r") + + b1 = g->COL_FIRE_CLOSS + data1(m,n,:,:) = (/b1(0,:,:)/) + + b2 = g->NPP + data2(m,n,:,:) = (/b2(0,:,:)/) + + b3 = g->NEE + data3(m,n,:,:) = (/b3(0,:,:)/) + end do + end do + +; name dimensions and assign coordinate variables + + data1!0 ="year" + data1!1 ="month" + data1!2 = "lat" + data1!3 = "lon" + data1@long_name = b1@long_name + data1@units = b1@units + data1@_FillValue = b1@_FillValue + + data2!0 ="year" + data2!1 ="month" + data2!2 = "lat" + data2!3 = "lon" + data2@long_name = b2@long_name + data2@units = b2@units + data2@_FillValue = b2@_FillValue + + data3!0 ="year" + data3!1 ="month" + data3!2 = "lat" + data3!3 = "lon" + data3@long_name = b3@long_name + data3@units = b3@units + data3@_FillValue = b3@_FillValue + + date!0 ="year" + date!1 ="month" + date@long_name = "date: yyyymm" + + c->COL_FIRE_CLOSS = data1 + c->NPP = data2 + c->NEE = data3 + c->date = date + c->area = g->area + + print (date) + +end diff -r 0c6405ab2ff4 -r 4be95183fbcd time_series/20.write_fire_cn_FMH41cn.ncl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/time_series/20.write_fire_cn_FMH41cn.ncl Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,104 @@ +;************************************************ +; output: lat: N->S lon: -180W->180E +;************************************************ +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" +;************************************************ +begin + +; output + + model_name = "i01.41cn" + + diro = "/lustre/wolf-ddn/scratch/hof/cases1/i01.41cn_out/" + filo = model_name + "_Fire_C_2076-2100_monthly.nc" + c = addfile(diro+filo,"c") + filedimdef(c,"year",-1,True) + +; input data + + nlat = 96 + nlon = 144 + + year_start = 2076 + year_end = 2100 + + nyear = year_end - year_start + 1 + nmonth = 12 + + data1 = new((/nyear,nmonth,nlat,nlon/),float) + data2 = new((/nyear,nmonth,nlat,nlon/),float) + data3 = new((/nyear,nmonth,nlat,nlon/),float) + date = new((/nyear,nmonth/),integer) + +; input dir + diri = "/lustre/wolf-ddn/scratch/hof/cases1/"+model_name+"/" + + do m = 0,nyear-1 + year = year_start + m + do n = 0,nmonth-1 + nn = n+1 + date(m,n) = year*100 +nn + +; input file + if (nn .ge. 10) then + fili = model_name+".clm2.h0."+year+"-"+nn+".nc" + else + fili = model_name+".clm2.h0."+year+"-0"+nn+".nc" + end if + +; print (fili) + + g = addfile (diri+fili,"r") + + b1 = g->COL_FIRE_CLOSS + data1(m,n,:,:) = (/b1(0,:,:)/) + + b2 = g->NPP + data2(m,n,:,:) = (/b2(0,:,:)/) + + b3 = g->NEE + data3(m,n,:,:) = (/b3(0,:,:)/) + end do + end do + +; name dimensions and assign coordinate variables + + data1!0 ="year" + data1!1 ="month" + data1!2 = "lat" + data1!3 = "lon" + data1@long_name = b1@long_name + data1@units = b1@units + data1@_FillValue = b1@_FillValue + + data2!0 ="year" + data2!1 ="month" + data2!2 = "lat" + data2!3 = "lon" + data2@long_name = b2@long_name + data2@units = b2@units + data2@_FillValue = b2@_FillValue + + data3!0 ="year" + data3!1 ="month" + data3!2 = "lat" + data3!3 = "lon" + data3@long_name = b3@long_name + data3@units = b3@units + data3@_FillValue = b3@_FillValue + + date!0 ="year" + date!1 ="month" + date@long_name = "date: yyyymm" + + c->COL_FIRE_CLOSS = data1 + c->NPP = data2 + c->NEE = data3 + c->date = date + c->area = g->area + + print (date) + +end diff -r 0c6405ab2ff4 -r 4be95183fbcd time_series/20.write_fire_cn_FMH42cn.ncl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/time_series/20.write_fire_cn_FMH42cn.ncl Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,104 @@ +;************************************************ +; output: lat: N->S lon: -180W->180E +;************************************************ +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" +;************************************************ +begin + +; output + + model_name = "i01.42cn" + + diro = "/lustre/wolf-ddn/scratch/hof/cases/i01.42cn_out/" + filo = model_name + "_Fire_C_2976-3000_monthly.nc" + c = addfile(diro+filo,"c") + filedimdef(c,"year",-1,True) + +; input data + + nlat = 96 + nlon = 144 + + year_start = 2976 + year_end = 3000 + + nyear = year_end - year_start + 1 + nmonth = 12 + + data1 = new((/nyear,nmonth,nlat,nlon/),float) + data2 = new((/nyear,nmonth,nlat,nlon/),float) + data3 = new((/nyear,nmonth,nlat,nlon/),float) + date = new((/nyear,nmonth/),integer) + +; input dir + diri = "/lustre/wolf-ddn/scratch/hof/cases/"+model_name+"/" + + do m = 0,nyear-1 + year = year_start + m + do n = 0,nmonth-1 + nn = n+1 + date(m,n) = year*100 +nn + +; input file + if (nn .ge. 10) then + fili = model_name+".clm2.h0."+year+"-"+nn+".nc" + else + fili = model_name+".clm2.h0."+year+"-0"+nn+".nc" + end if + +; print (fili) + + g = addfile (diri+fili,"r") + + b1 = g->COL_FIRE_CLOSS + data1(m,n,:,:) = (/b1(0,:,:)/) + + b2 = g->NPP + data2(m,n,:,:) = (/b2(0,:,:)/) + + b3 = g->NEE + data3(m,n,:,:) = (/b3(0,:,:)/) + end do + end do + +; name dimensions and assign coordinate variables + + data1!0 ="year" + data1!1 ="month" + data1!2 = "lat" + data1!3 = "lon" + data1@long_name = b1@long_name + data1@units = b1@units + data1@_FillValue = b1@_FillValue + + data2!0 ="year" + data2!1 ="month" + data2!2 = "lat" + data2!3 = "lon" + data2@long_name = b2@long_name + data2@units = b2@units + data2@_FillValue = b2@_FillValue + + data3!0 ="year" + data3!1 ="month" + data3!2 = "lat" + data3!3 = "lon" + data3@long_name = b3@long_name + data3@units = b3@units + data3@_FillValue = b3@_FillValue + + date!0 ="year" + date!1 ="month" + date@long_name = "date: yyyymm" + + c->COL_FIRE_CLOSS = data1 + c->NPP = data2 + c->NEE = data3 + c->date = date + c->area = g->area + + print (date) + +end diff -r 0c6405ab2ff4 -r 4be95183fbcd time_series/20.write_fire_cn_FMH43cn.ncl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/time_series/20.write_fire_cn_FMH43cn.ncl Thu Mar 26 14:02:21 2009 -0400 @@ -0,0 +1,104 @@ +;************************************************ +; output: lat: N->S lon: -180W->180E +;************************************************ +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" +;************************************************ +begin + +; output + + model_name = "i01.43cn" + + diro = "/lustre/wolf-ddn/scratch/hof/cases1/i01.43cn_out/" + filo = model_name + "_Fire_C_2876-2900_monthly.nc" + c = addfile(diro+filo,"c") + filedimdef(c,"year",-1,True) + +; input data + + nlat = 96 + nlon = 144 + + year_start = 2876 + year_end = 2900 + + nyear = year_end - year_start + 1 + nmonth = 12 + + data1 = new((/nyear,nmonth,nlat,nlon/),float) + data2 = new((/nyear,nmonth,nlat,nlon/),float) + data3 = new((/nyear,nmonth,nlat,nlon/),float) + date = new((/nyear,nmonth/),integer) + +; input dir + diri = "/lustre/wolf-ddn/scratch/hof/cases1/"+model_name+"/" + + do m = 0,nyear-1 + year = year_start + m + do n = 0,nmonth-1 + nn = n+1 + date(m,n) = year*100 +nn + +; input file + if (nn .ge. 10) then + fili = model_name+".clm2.h0."+year+"-"+nn+".nc" + else + fili = model_name+".clm2.h0."+year+"-0"+nn+".nc" + end if + +; print (fili) + + g = addfile (diri+fili,"r") + + b1 = g->COL_FIRE_CLOSS + data1(m,n,:,:) = (/b1(0,:,:)/) + + b2 = g->NPP + data2(m,n,:,:) = (/b2(0,:,:)/) + + b3 = g->NEE + data3(m,n,:,:) = (/b3(0,:,:)/) + end do + end do + +; name dimensions and assign coordinate variables + + data1!0 ="year" + data1!1 ="month" + data1!2 = "lat" + data1!3 = "lon" + data1@long_name = b1@long_name + data1@units = b1@units + data1@_FillValue = b1@_FillValue + + data2!0 ="year" + data2!1 ="month" + data2!2 = "lat" + data2!3 = "lon" + data2@long_name = b2@long_name + data2@units = b2@units + data2@_FillValue = b2@_FillValue + + data3!0 ="year" + data3!1 ="month" + data3!2 = "lat" + data3!3 = "lon" + data3@long_name = b3@long_name + data3@units = b3@units + data3@_FillValue = b3@_FillValue + + date!0 ="year" + date!1 ="month" + date@long_name = "date: yyyymm" + + c->COL_FIRE_CLOSS = data1 + c->NPP = data2 + c->NEE = data3 + c->date = date + c->area = g->area + + print (date) + +end