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

bug in the lidar simulator (COSP1.4 and COSP2) #262

Open
zyuying opened this issue Oct 30, 2020 · 10 comments
Open

bug in the lidar simulator (COSP1.4 and COSP2) #262

zyuying opened this issue Oct 30, 2020 · 10 comments
Assignees
Labels
bug Something isn't working correctly CoupledEval4 -wish list

Comments

@zyuying
Copy link

zyuying commented Oct 30, 2020

Greg Cesana from GISS/Columbia Univ. recently reported a bug in the lidar simulator in COSP1.4 and COSP2. For COSP1.4, “snow” has been mistakenly added to liquid in COSP1.4. For COPS2, “snow” is not accounted for at all. This will have potentially large impact on cloud phase diagnostics from the lidar simulator. So we need to fix it.

For COSP2, to fix the bug, we only need to change the line 463-468 in cosp_optics.F90

from
betatot_ice(1:npoints,icol,1:nlev) = betatot_ice(1:npoints,icol,1:nlev)+ &
kp_part(1:npoints,1:nlev,INDX_LSICE)*alpha_part(1:npoints,1:nlev,INDX_LSICE)+ &
kp_part(1:npoints,1:nlev,INDX_CVICE)*alpha_part(1:npoints,1:nlev,INDX_CVICE)
tautot_ice(1:npoints,icol,1:nlev) = tautot_ice(1:npoints,icol,1:nlev) + &
tau_part(1:npoints,1:nlev,INDX_LSICE) + &
tau_part(1:npoints,1:nlev,INDX_CVICE)

to
betatot_ice(1:npoints,icol,1:nlev) = betatot_ice(1:npoints,icol,1:nlev)+ &
kp_part(1:npoints,1:nlev,INDX_LSICE)*alpha_part(1:npoints,1:nlev,INDX_LSICE)+ &
kp_part(1:npoints,1:nlev,INDX_CVICE)*alpha_part(1:npoints,1:nlev,INDX_CVICE)+ &
kp_part(1:npoints,1:nlev,INDX_LSSNOW)*alpha_part(1:npoints,1:nlev,INDX_LSSNOW)
tautot_ice(1:npoints,icol,1:nlev) = tautot_ice(1:npoints,icol,1:nlev) + &
tau_part(1:npoints,1:nlev,INDX_LSICE) + &
tau_part(1:npoints,1:nlev,INDX_CVICE) + &
tau_part(1:npoints,1:nlev,INDX_LSSNOW)

For COSP1.4, we need to change the line 484-491 in lidar_simulator.F90

from
DO i = 2, npart,2
betatot_ice(:,:) = betatot_ice(:,:)+ kp_part(:,:,i)*alpha_part(:,:,i)
tautot_ice(:,:) = tautot_ice(:,:) + tau_part(:,:,i)
ENDDO ! i
DO i = 1, npart,2
betatot_liq(:,:) = betatot_liq(:,:)+ kp_part(:,:,i)*alpha_part(:,:,i)
tautot_liq(:,:) = tautot_liq(:,:) + tau_part(:,:,i)
ENDDO ! i

to
DO i = 2, npart,2
betatot_ice(:,:) = betatot_ice(:,:)+ kp_part(:,:,i)*alpha_part(:,:,i)
tautot_ice(:,:) = tautot_ice(:,:) + tau_part(:,:,i)
ENDDO ! i
betatot_ice(:,:) = betatot_ice(:,:)+ kp_part(:,:,5)*alpha_part(:,:,5)
tautot_ice(:,:) = tautot_ice(:,:) + tau_part(:,:,5)
DO i = 1, npart-1,2
betatot_liq(:,:) = betatot_liq(:,:)+ kp_part(:,:,i)*alpha_part(:,:,i)
tautot_liq(:,:) = tautot_liq(:,:) + tau_part(:,:,i)
ENDDO ! i

Yuying Zhang (LLNL)

@cacraigucar cacraigucar added the bug Something isn't working correctly label Oct 30, 2020
@brian-eaton
Copy link
Collaborator

The scientists who should evaluate this are Brian Medeiros and Jen Kay. Cheryl, do you know their github logins?

@nusbaume
Copy link
Collaborator

nusbaume commented Nov 2, 2020

Brian's Github ID is @brianpm, and I believe Jen Kay's is @jenkayco . Both of them should now see this issue, and can hopefully let you all know what should be done.

Hope that helps!

@brianpm
Copy link
Collaborator

brianpm commented Nov 2, 2020

@zyuying got in touch with us before posting the issue. I'll take a closer look at the suggested change this afternoon.

@brianpm
Copy link
Collaborator

brianpm commented Nov 4, 2020

I have taken a close look. As far as I can tell, this should be fine. The physical basis of the change makes sense, bringing snow into the backscatter and optical depth that COSP uses in the lidar simulator. I'm not sure why the snow was not already included. If @zyuying has any input on that, I'd be interested to hear it.

@zyuying
Copy link
Author

zyuying commented Nov 4, 2020

@brianpm, As for COSP1.4, the snow was accounted for as liquid in the phase component of backscatter and optical depth. It has to do with the "npart" indices. The snow index is 5. For COSP2, the snow is not accounted for at all in the separated liquid/ice backscatter and optical depth.

@nusbaume
Copy link
Collaborator

Hi @zyuying , I just made a Pull Request with your changes, which can be found here:

#279

If you can verify that the COSP outputs should change, and that my modifications to cloud_optics.F90 are correct, that would certainly be appreciated.

Also, I should note that CAM currently only uses COSP2. For COSP1.4, you'll need to make an issue and/or pull request to this repo:

https://github.com/CFMIP/COSPv1

Thanks!

@cacraigucar
Copy link
Collaborator

@nusbaume - It appears that this change has not been applied to the cam_development branch yet. Should it be there?

@nusbaume
Copy link
Collaborator

@cacraigucar yes, it should! Not sure how it slipped through the cracks. Regardless, it's a small code change, but does change answers for COSP simulations. Do you want to include it in your misc PR or should I open a new PR for it?

@nusbaume nusbaume reopened this Nov 11, 2021
@cacraigucar
Copy link
Collaborator

I'm not sure about whether I'm going to include everything together or not. I'm still going through the issues to see what all needs to be done and then will determine what makes sense to put together. This is not the only one which has fallen through the cracks.

@nusbaume
Copy link
Collaborator

Sounds good! I'll plan to wait until your misc PR is opened, and if this particular issues isn't present then I will just go ahead and open a separate PR for it then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly CoupledEval4 -wish list
Projects
Status: To Do
Development

No branches or pull requests

5 participants