-
Notifications
You must be signed in to change notification settings - Fork 37
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
MISR outputs are not properly set to fillvalues for night columns #30
Comments
On closer inspection, it looks like changes are needed to
Since this routine also returns |
@brhillman @RobertPincus Secondly, regarding I propose we ask Roj if he agrees with you proposed changes. Then would you be kind enough to open a PR with your proposed changes? |
Dustin, this is great.
I’ve cc’d Roj on this email but I’m confident your bug fix for the MISR simulator is correct: that MISR_mean_ztop(npoints) = R_UNDEF should be replaced with MISR_mean_ztop(j) = R_UNDEF.
Where would you have @brhillman mask the box_MISR_ztop and tauOUT variables? He should set them to R_UNDEF in misr_subcolumn()? Will that work with the current implementation of misr_column()?
|
I'll gladly put together the PR, once we have the desired behavior straight (i.e., at which level we want the masking to be done). |
I'll gladly put together the PR, once we have the desired behavior straight (i.e., at which level we want the masking to be done).
That’s what I’m asking @dustinswales to explain.
|
@RobertPincus The only change necessary is in |
@dustinswales Fair enough, in the current setup, but would this hold if some decided to use the MISR optical depths and cloud top heights in a different aggregation? Seem like there's an argument for masking as low down as possible? |
@brhillman The question I have is why are we calling the MISR_subcolumn() simulator for all columns if we are only using the daylit points in the statistics ? Seems like a waste, we could only process the sunlit points, compute the same stats, maybe save some time? |
Hey @dustinswales yeah I agree masking makes sense at the low-level (misr_column). To answer your question about useless calculations, right now misr_subcolumn loops over both columns and subcolumns. So as the code currently stands the easiest thing to do would be to add a logical check at each column to see if the column is night, and if so then bypass the calculations and instead set the column to R_UNDEF (right now it calculates for each column, and then fills after the fact). The other option would be to take the loop over columns out of misr_subcolumn, so inputs would only have a subcolumn dimension and no column dimension, and instead handle the loop over columns at the higher misr_column subroutine, only calling misr_subcolumn for sunlit columns. I don't think there will be a performance difference either way between these options (same amount of work) so I think it's up to you how you want the code structured. |
@brhillman |
@dustinswales @brhillman I still can't wrap my head around apply the night-time filter at the column rather than the sub-column level, since there's no way for any passive instrument including MISR to make any retrievals at night. Is it just technically easier at this stage? @dustinswales Should we open another issue in clean up the MODIS code to do better night-time filtering? |
@RobertPincus Also. Yes let's open a corresponding PR to clean up the MODIS code to also handle the masking internally. I can do this. |
@dustinswales I like this idea. @brhillman, it's clear what's being proposed, and you can make a PR? |
@brhillman |
@brhillman No waving my dirty laundry around in public, now. But yes... It's great having you go through the code. You find all the warts. |
@RobertPincus @dustinswales yup I think it's clear, I'll put it together tomorrow. |
It appears that MISR_mean_ztop is not properly reset to the fillvalue
R_UNDEF
for night columns. InMISR_COLUMN()
inMISR_simulator.F90
, the following code computes the joint histogram for sunlit points, or else sets values to fillvalue (lines 266-287):Note that
MISR_cldarea
appears to be set correctly, butMISR_mean_ztop
is only set for the last index, andfq_MISR_TAU_v_CTH
is excluded entirely. The following correction should give the desired behavior:The text was updated successfully, but these errors were encountered: