Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

computing albedo #78

Open
jasonebox opened this issue Jul 13, 2022 · 7 comments
Open

computing albedo #78

jasonebox opened this issue Jul 13, 2022 · 7 comments

Comments

@jasonebox
Copy link

Hi Baptiste

checking if another approach for GCN albedo is in the pipeline, to QC the GCN data. I guess JAWS?

Anyway, I've started comparing daily GCN L1 albedo with MODIS C6.1

looping over yy years and dd day of year

v=((df.year==yy+i_year)&(df.doy==dd+1)) if sum(v)==24: denom=np.nansum(df.ISWR[v]) numerator=np.nansum(df.OSWR[v]) if denom>numerator:alb[dd]=numerator/denom

Jason

ps. here's a plot

SUM_2019_albedo

@jasonebox
Copy link
Author

BTW, DY2 GCN albedo, as computed as above is again higher than MOD10A1 C6.1
DY2_2019_albedo

@BaptisteVandecrux
Copy link
Member

Hi Jason,

I have not been looking much at radiation so far.

I am looking at applying the tilt correction from JAWS now, but there are some limitations in time due to ancillary files that JAWS uses and that need to be updated for the years after 2016. (see jaws/jaws#204).
The tilt correction is still nice to have for the years prior 2016 and I hope we can update these files at some point and run jaws forward.

There still a lot of filters that could be added to the processing pipeline.
I could use the IDL code as a starting point, but not all of them were available (see GEUS-Glaciology-and-Climate/JEB_GC-Net#1).
If you have them at hand then I can translate your IDL albedo quality check to python and add it to the L1 pipeline.

@jasonebox
Copy link
Author

OK, I will continue and try to have my filtering output ranges useful by this repository

note
consistent with GCN albedo at e.g. DY2 being high, above 0.9 for most of April 2019, is an earlier comparison I made using an Eppley PSP albedo measurement beside the LiCor albedo measurement, which has a narrower spectral range, is to apply an offset of -0.035

@jasonebox
Copy link
Author

jasonebox commented Jul 15, 2022

here's my IDL to filter albedo, for 2000 to 2016, I'll look into translating it and making it useful by this repository

``

if aws_nam(st) eq 'PTE' then begin
alb(st,yy,0:99)=-999.
alb(st,yy,280:364)=-999.
if year(yy) eq '2014' then alb(st,yy,0:191)=-999.
endif

if aws_nam(st) eq 'JR2' then begin
if fix(year(yy)) eq 2002 then begin
v=where(reform(alb(st,yy,)) lt 0.65 and days_365 lt 125) & alb(st,yy,v)=-999
endif
if year(yy) eq '2010' then alb(st,yy,170:364)=-999.
if fix(year(yy)) le 2012 then begin
v=where(alb(st,yy,
) gt 0.85) & alb(st,yy,v)=-999
endif
endif

if aws_nam(st) eq 'NSE' then begin
if fix(year(yy)) eq 2000 then begin
v=where(reform(alb(st,yy,)) gt 0.88 and days_365 lt 425) & alb(st,yy,v)=-999
endif
if fix(year(yy)) eq 2001 then begin
v=where(reform(alb(st,yy,
)) lt 0.77 and days_365 lt 425) & alb(st,yy,v)=-999
endif
if fix(year(yy)) eq 2002 then begin
v=where(reform(alb(st,yy,)) lt 0.79 and days_365 lt 425) & alb(st,yy,v)=-999
endif
if fix(year(yy)) eq 2003 then begin
v=where(reform(alb(st,yy,
)) lt 0.79 and days_365 lt 425) & alb(st,yy,v)=-999
endif
if fix(year(yy)) eq 2004 then begin
v=where(reform(alb(st,yy,)) lt 0.7 and days_365 lt 425) & alb(st,yy,v)=-999
endif
if fix(year(yy)) eq 2005 then alb(st,yy,200:364)=-999.
if year(yy) eq '2006' then alb(st,yy,0:100)=-999.
if fix(year(yy)) eq 2010 then begin
v=where(reform(alb(st,yy,
)) lt 0.8 and days_365 gt 270) & alb(st,yy,v)=-999
endif
if fix(year(yy)) eq 2007 then begin
v=where(reform(alb(st,yy,)) lt 0.75 and days_365 lt 425) & alb(st,yy,v)=-999
v=where(reform(alb(st,yy,
)) gt 0.88 and days_365 lt 425) & alb(st,yy,v)=-999
endif
if fix(year(yy)) eq 2010 then begin
v=where(reform(alb(st,yy,)) lt 0.75 and days_365 lt 425) & alb(st,yy,v)=-999
endif
if fix(year(yy)) eq 2012 then begin
v=where(reform(alb(st,yy,
)) lt 0.7 and days_365 lt 425) & alb(st,yy,v)=-999
endif
if year(yy) eq '2013' then alb(st,yy,248:364)=-999.
if fix(year(yy)) eq 2014 then begin
v=where(reform(alb(st,yy,*)) lt 0.78 and days_365 gt 270) & alb(st,yy,v)=-999
endif
if year(yy) eq '2016' then alb(st,yy,0:75)=-999.
endif

if aws_nam(st) eq 'NGP' then begin
if year(yy) eq '2002' then alb(st,yy,250:364)=-999.
if year(yy) eq '2003' then alb(st,yy,0:100)=-999. & if year(yy) eq '2003' then alb(st,yy,245:364)=-999.
if year(yy) eq '2004' then alb(st,yy,0:120)=-999.
if year(yy) eq '2005' then alb(st,yy,250:364)=-999.
if year(yy) eq '2006' then alb(st,yy,250:364)=-999.
if year(yy) eq '2007' then alb(st,yy,0:130)=-999. & if year(yy) eq '2007' then alb(st,yy,250:364)=-999.
if year(yy) eq '2008' then alb(st,yy,0:100)=-999. & if year(yy) eq '2008' then alb(st,yy,260:364)=-999.
if year(yy) eq '2009' then alb(st,yy,0:105)=-999. & if year(yy) eq '2009' then alb(st,yy,240:364)=-999.
if year(yy) eq '2010' then alb(st,yy,0:130)=-999.
endif

if aws_nam(st) eq 'CP2' then begin
if year(yy) eq '2000' then begin
v=where(alb(st,yy,) lt 0.65)
alb(st,yy,v)=-999
endif
if year(yy) eq '2014' then alb(st,yy,
)=-999.
if year(yy) eq '2015' then alb(st,yy,*)=-999.
endif

if aws_nam(st) eq 'NAE' then begin
if fix(year(yy)) eq 2000 then begin
v=where(reform(alb(st,yy,)) lt 0.78) & alb(st,yy,v)=-999
endif
if year(yy) eq '2000' then alb(st,yy,0:105)=-999. & if year(yy) eq '2000' then alb(st,yy,255:364)=-999.
if year(yy) eq '2001' then alb(st,yy,0:123)=-999. & if year(yy) eq '2001' then alb(st,yy,264:364)=-999.
if fix(year(yy)) eq 2001 then begin
v=where(reform(alb(st,yy,
)) lt 0.78) & alb(st,yy,v)=-999
endif
if year(yy) eq '2002' then alb(st,yy,0:110)=-999. & if year(yy) eq '2002' then alb(st,yy,250:364)=-999.
if year(yy) eq '2003' then alb(st,yy,0:136)=-999. & if year(yy) eq '2003' then alb(st,yy,255:364)=-999.
if year(yy) eq '2004' then alb(st,yy,0:110)=-999. & if year(yy) eq '2004' then alb(st,yy,244:364)=-999.
if year(yy) eq '2005' then alb(st,yy,0:88)=-999. & if year(yy) eq '2005' then alb(st,yy,255:364)=-999.
if year(yy) eq '2006' then alb(st,yy,0:112)=-999. & if year(yy) eq '2006' then alb(st,yy,244:364)=-999.
if year(yy) eq '2007' then alb(st,yy,0:115)=-999. & if year(yy) eq '2007' then alb(st,yy,268:364)=-999.
if year(yy) eq '2008' then alb(st,yy,0:115)=-999.
if year(yy) eq '2010' then alb(st,yy,0:115)=-999. & if year(yy) eq '2010' then alb(st,yy,250:364)=-999.
if year(yy) eq '2011' then alb(st,yy,0:116)=-999. & if year(yy) eq '2011' then alb(st,yy,255:364)=-999.
if year(yy) eq '2012' then alb(st,yy,0:142)=-999. & if year(yy) eq '2012' then alb(st,yy,255:364)=-999.
if year(yy) eq '2013' then alb(st,yy,0:136)=-999. & if year(yy) eq '2013' then alb(st,yy,253:364)=-999.
if year(yy) eq '2014' then alb(st,yy,0:127)=-999. & if year(yy) eq '2014' then alb(st,yy,253:364)=-999.
if year(yy) eq '2015' then alb(st,yy,0:112)=-999. & if year(yy) eq '2015' then alb(st,yy,260:364)=-999.
endif

if aws_nam(st) eq 'SDM' then begin
if fix(year(yy)) eq 2000 then begin
v=where(reform(alb(st,yy,)) gt 0.85) & alb(st,yy,v)=0.85
endif
if fix(year(yy)) eq 2001 then begin
v=where(reform(alb(st,yy,
)) lt 0.8 and days_365 lt 140) & alb(st,yy,v)=-999
endif
if fix(year(yy)) eq 2003 then alb(st,yy,)=-999
if fix(year(yy)) eq 2004 then alb(st,yy,
)=-999
if fix(year(yy)) eq 2005 then alb(st,yy,*)=-999

if fix(year(yy)) eq 2008 then begin
v=where(reform(alb(st,yy,)) lt 0.75 and days_365 lt 110) & alb(st,yy,v)=-999
endif
if fix(year(yy)) eq 2011 then begin
v=where(reform(alb(st,yy,
)) lt 0.7 and days_365 gt 260) & alb(st,yy,v)=-999
endif
if year(yy) eq '2013' then alb(st,yy,280:364)=-999.
if fix(year(yy)) eq 2015 or fix(year(yy)) eq 2014 then begin
v=where(reform(alb(st,yy,*)) gt 0.88) & alb(st,yy,v)=0.88
endif

endif

if aws_nam(st) eq 'SDL' then begin
if fix(year(yy)) eq 2000 then begin
v=where(reform(alb(st,yy,)) lt 0.8 and days_365 lt 100) & alb(st,yy,v)=-999
endif
if fix(year(yy)) eq 2001 or fix(year(yy)) eq 2006 or fix(year(yy)) eq 2007 or fix(year(yy)) eq 2012 or fix(year(yy)) eq 2013 or fix(year(yy)) eq 2016 then begin
v=where(reform(alb(st,yy,
)) lt 0.8 and days_365 lt 110) & alb(st,yy,v)=-999
v=where(reform(alb(st,yy,)) lt 0.8 and days_365 gt 260) & alb(st,yy,v)=-999
endif
if year(yy) eq '2009' then alb(st,yy,0:80)=-999.
if year(yy) eq '2005' or year(yy) eq '2006' or year(yy) eq '2007' or year(yy) eq '2011' or year(yy) eq '2013' then alb(st,yy,255:364)=-999.
if fix(year(yy)) eq 2008 or fix(year(yy)) eq 2009 then begin
v=where(reform(alb(st,yy,
)) lt 0.8 and days_365 lt 140) & alb(st,yy,v)=-999
endif
endif

if aws_nam(st) eq 'JR1' then begin
if year(yy) eq '2004' then alb(st,yy,250:364)=-999.
if year(yy) eq '2005' then alb(st,yy,0:127)=-999.
if year(yy) eq '2007' then alb(st,yy,240:364)=-999.
if year(yy) eq '2008' then alb(st,yy,0:129)=-999.
if year(yy) eq '2010' then alb(st,yy,207:364)=-999.
if year(yy) eq '2011' then alb(st,yy,0:159)=-999.
if year(yy) eq '2012' then alb(st,yy,0:130)=-999.
endif

if aws_nam(st) eq 'DY2' then begin
if year(yy) eq '2004' then alb(st,yy,190:364)=-999.
if year(yy) eq '2005' then alb(st,yy,0:140)=-999.
if year(yy) eq '2003' then alb(st,yy,200:364)=-999.
if year(yy) eq '2009' then alb(st,yy,0:90)=-999.
if year(yy) eq '2011' then alb(st,yy,0:75)=-999.
if fix(year(yy)) eq 2012 then begin
v=where(reform(alb(st,yy,*)) lt 0.8 and days_365 lt 110) & alb(st,yy,v)=-999
endif
if year(yy) eq '2013' then alb(st,yy,265:364)=-999.
endif

if aws_nam(st) eq 'TUN' then begin
if fix(year(yy)) eq 2001 then begin
v=where(alb(st,yy,) lt 0.7) & alb(st,yy,v)=-999
alb(st,yy,0:95)=-999.
endif
if fix(year(yy)) eq 2010 then begin
v=where(alb(st,yy,
) lt 0.8) & alb(st,yy,v)=-999
endif
if year(yy) eq '2005' then alb(st,yy,0:95)=-999.
if year(yy) eq '2007' then alb(st,yy,0:95)=-999.
if year(yy) eq '2008' then alb(st,yy,0:95)=-999.
if year(yy) eq '2009' then alb(st,yy,0:95)=-999.
if year(yy) eq '2011' then alb(st,yy,260:364)=-999.
if year(yy) eq '2013' then alb(st,yy,280:364)=-999.
if year(yy) eq '2013' then alb(st,yy,0:95)=-999.
if year(yy) eq '2014' then alb(st,yy,0:116)=-999. &if year(yy) eq '2014' then alb(st,yy,290:364)=-999.
endif

if aws_nam(st) eq 'SUM' then begin
alb(st,yy,0:97)=-999. & alb(st,yy,265:364)=-999.
if fix(year(yy)) le 2000 then begin
v=where(alb(st,yy,) lt 0.7) & alb(st,yy,v)=-999
alb(st,yy,247:364)=-999.
v=where(reform(alb(st,yy,
)) gt 0.85 and days_365 gt 150 and days_365 lt 180) & alb(st,yy,v)=-999
endif
if year(yy) eq '2003' then alb(st,yy,240:364)=-999.
if year(yy) eq '2004' then alb(st,yy,245:364)=-999.
if year(yy) eq '2005' then alb(st,yy,238:364)=-999.
if year(yy) eq '2006' then alb(st,yy,238:364)=-999.
if year(yy) eq '2010' then alb(st,yy,0:130)=-999. & if year(yy) eq '2010' then alb(st,yy,260:364)=-999.
if year(yy) eq '2011' then begin
alb(st,yy,250:364)=-999.
v=where(alb(st,yy,) lt 0.76) & alb(st,yy,v)=-999
endif
if year(yy) eq '2012' then alb(st,yy,258:364)=-999.
if year(yy) eq '2013' then alb(st,yy,0:110)=-999.
if year(yy) eq '2014' then begin
v=where(alb(st,yy,
) lt 0.885) & alb(st,yy,v)=-999
endif
endif

if aws_nam(st) eq 'HUM' then begin
if year(yy) eq '2002' then begin
v=where(alb(st,yy,*) gt 0.9) & alb(st,yy,v)=-999
alb(st,yy,v)+=0.02
endif
if year(yy) eq '2004' then alb(st,yy,0:110)=-999.
if year(yy) eq '2005' then alb(st,yy,0:90)=-999. & if year(yy) eq '2005' then alb(st,yy,250:364)=-999.
if year(yy) eq '2006' then alb(st,yy,0:84)=-999.
alb(st,yy,0:90)=-999. & alb(st,yy,255:364)=-999.

endif

if aws_nam(st) eq 'GIT' then begin
if year(yy) eq '2001' then alb(st,yy,0:115)=-999. & if year(yy) eq '2001' then alb(st,yy,250:364)=-999.
if year(yy) eq '2002' then alb(st,yy,0:115)=-999.
if year(yy) eq '2004' then begin
v=where(alb(st,yy,) lt 0.73) & alb(st,yy,v)=-999
endif
if year(yy) eq '2006' then alb(st,yy,0:120)=-999. & if year(yy) eq '2006' then alb(st,yy,250:364)=-999.
if year(yy) eq '2007' then alb(st,yy,0:105)=-999.
if year(yy) eq '2014' then alb(st,yy,200:364)=-999.
if year(yy) eq '2015' then alb(st,yy,
)=-999.
if year(yy) eq '2016' then alb(st,yy,*)=-999.
endif

if aws_nam(st) eq 'NAU' then begin
a1_temp=[2.003,2.054,2.658]
a0_temp=[0.224,0.215,0.037]
a1=mean(a1_temp) & a0=mean(a0_temp)
if fix(year(yy)) le 2014 then begin
v=where(alb(st,yy,) gt -999) & alb(st,yy,v)=alb(st,yy,v)a1+a0
endif
if fix(year(yy)) le 2015 then begin
alb(st,yy,
)+=0.05
alb(st,yy,245:364)=-999
endif
if fix(year(yy)) eq 2015 then begin
alb(st,yy,
)+=0.035
endif
endif

if aws_nam(st) eq 'CP1' then begin
if year(yy) eq '2003' then begin
v=where(alb(st,yy,) lt 0.78) & alb(st,yy,v)=-999
endif
if year(yy) eq '2005' then begin
v=where(alb(st,yy,
) lt 0.7) & alb(st,yy,v)=-999
alb(st,yy,)-=0.093
endif
if year(yy) eq '2006' then alb(st,yy,
)-=0.086
if year(yy) eq '2007' then alb(st,yy,)-=0.073
if year(yy) eq '2008' then alb(st,yy,
)-=0.08
if year(yy) eq '2009' then alb(st,yy,)-=0.071
if fix(year(yy)) eq 2009 then begin
v=where(reform(alb(st,yy,
)) lt 0.8 and days_365 gt 150 and days_365 lt 160) & alb(st,yy,v)=-999
endif
if year(yy) eq '2010' then alb(st,yy,)-=0.068
if year(yy) eq '2014' then alb(st,yy,
)=-999.
if year(yy) eq '2015' then alb(st,yy,*)=-999.
endif

if aws_nam(st) eq 'SWC' then begin
if year(yy) eq '2007' then alb(st,yy,)=-999.
if year(yy) eq '2011' then alb(st,yy,0:139)=-999.
if year(yy) eq '2012' then alb(st,yy,
)=-999.
if year(yy) eq '2013' then alb(st,yy,)=-999.
if year(yy) eq '2014' then alb(st,yy,0:88)=-999.
if year(yy) eq '2015' then begin
alb(st,yy,
)-=0.18
v=where(reform(alb(st,yy,)) gt 0.9) & alb(st,yy,v)=-999
alb(st,yy,206:364)=-999.
endif
if year(yy) eq '2016' then alb(st,yy,90:110)=-999.
if year(yy) eq '2003' then begin
v=where(alb(st,yy,
) lt 0.45) & alb(st,yy,v)=-999
alb(st,yy,200:364)=-999.
endif
endif
``

@BaptisteVandecrux
Copy link
Member

Thanks for the info!
We can see if this list of suspicious periods correspond to too times with too much station tilt or erroneous SWin or SWout measurements.

I am adding albedo as an output in the next commit, but it will have only limited quality check.
What I had in mind was to use albedo to discard SWin or SWout, but not directly filter albedo.
I'll think about possible approaches.

@jasonebox
Copy link
Author

agree it's smarter "What I had in mind was to use albedo to discard SWin or SWout, but not directly filter albedo." anyway, I went ahead an implemented a way to save the adjustment parameters in the standard format for min and max filters to DAILY albedo

I took the ~45 min to work through the Summit data series for a collab with Ohmura for us to discuss.

here is the repo https://github.com/jasonebox/GCN_albedo
I should have a look at how the filter params perform for HOURLY running 24h summed SWin SWout ratio'd albedo.

I output daily and seasonal albedo for Summit 1996-2021

I'm going to look into air T now for Summit, may be I find reason to apply adjustments.

@jasonebox
Copy link
Author

jasonebox commented Jul 15, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants