Modifications to scoring and graphics production for the final version of code for the C-LAMP paper in GCB.
1 ;************************************************************
2 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
3 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
4 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
5 ;************************************************************
10 file_input = "1999_L4_m.nc"
11 file_output = year_new+"_L4_m.nc"
13 a = addfile(file_input,"r")
14 b = addfile(file_output,"c")
15 ;-------------------------------------------------------------------
16 ; Enter predefine phase.
18 ; Write global attributes to file. It's okay to do this before
19 ; predefining the file's variables. We are still in "define" mode.
22 fAtt@description = "Data read in from " + file_input
23 fAtt@creation_date = systemfunc ("date")
26 filedimdef( b,"year",-1,True)
27 ;-------------------------------------------------------------------
28 month_of_year = (/1,2,3,4,5,6,7,8,9,10,11,12/)
30 Var = getfilevarnames(a)
39 if (Var(n).ne."year" .and. Var(n).ne."Month" .and. Var(n).ne."n_days" .and. Var(n).ne."lat" .and. Var(n).ne."lon" ) then
46 if (Var(n).eq."year") then
47 b->$Var(n)$ = year_new
50 if (Var(n).eq."Month") then
52 Month(0,:)= month_of_year + year_new * 100
56 if (Var(n).eq."n_days" .or. Var(n).eq."lat" .or. Var(n).eq."lon") then
57 b->$Var(n)$ = a->$Var(n)$