CAM icon indicating copy to clipboard operation
CAM copied to clipboard

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

Open zyuying opened this issue 5 years ago • 10 comments

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)

zyuying avatar Oct 30 '20 21:10 zyuying

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

brian-eaton avatar Oct 30 '20 22:10 brian-eaton

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!

nusbaume avatar Nov 02 '20 18:11 nusbaume

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

brianpm avatar Nov 02 '20 19:11 brianpm

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.

brianpm avatar Nov 04 '20 17:11 brianpm

@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.

zyuying avatar Nov 04 '20 18:11 zyuying

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

https://github.com/ESCOMP/CAM/pull/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!

nusbaume avatar Nov 18 '20 20:11 nusbaume

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

cacraigucar avatar Nov 10 '21 23:11 cacraigucar

@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 avatar Nov 11 '21 17:11 nusbaume

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.

cacraigucar avatar Nov 11 '21 17:11 cacraigucar

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.

nusbaume avatar Nov 11 '21 18:11 nusbaume