Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

LWup passed from CLM to CAM disagreement

Hello,In validating variables passed between CLM and CAM (RRTMG to be specific), I am outputting the fields using user_nl_clm and user_nl_cam, then plotting the differences, which unfortunately, are not zero. In particular, take LWup from CLM, for example.  The only changes I made are the following additions to radiation.F90, as outlined by executing "%git diff atm/cam/src/physics/rrtmg/radiation.F90".  Added lines are notated by the "+" symbol.----------------------------------------------------------diff --git a/atm/cam/src/physics/rrtmg/radiation.F90 b/atm/cam/src/physics/rrtmg/radiation.F90--- a/atm/cam/src/physics/rrtmg/radiation.F90+++ b/atm/cam/src/physics/rrtmg/radiation.F90@@ -491,6 +491,10 @@ end function radiation_nextsw_cday           call addfld('FULC'//diag(icall),    'W/m2', pverp,'I', 'Longwave clear-sky upward flux', phys_decomp)           call addfld('FDLC'//diag(icall),    'W/m2', pverp,'I', 'Longwave clear-sky downward flux', phys_decomp)+          call addfld('LWUPclm'//diag(icall),    'W/m2', 1,'A', 'Longwave upward flux from CLM', phys_decomp, &+                                                                           sampling_seq='rad_lwsw')           if (history_amwg) then              call add_default('QRL'//diag(icall),   1, ' ')              call add_default('FLNS'//diag(icall),  1, ' ')@@ -1114,6 +1118,8 @@ end function radiation_nextsw_cday               if (active_calls(icall)) then+                  call outfld('LWUPclm'//diag(icall),cam_in%lwup,pcols,lchnk)                   ! update the conctrations in the RRTMG state object                   call  rrtmg_state_update( state, pbuf, icall, r_state)------------------------------------------------------------------------in user_nl_clm, the following lines are added, as 'LWup' is already a history field:hist_avgflag_pertape='A','A'hist_fincl2 = 'LWup'hist_mfilt = 1,720hist_nhtfrq = 0,1------------------------------------------------------------------------In user_nl_cam, the following lines are added, given the changes to radiation.F90:avgflag_pertape='A','A'fincl2 = 'LWUPclm'mfilt = 1,720nhtfrq = 0,1 -----------------------------------------------------------------------------Attached are figures of the maps of the differences in the LWup.  The differences are not zero everywhere.  
CESM1.2.2, compset=B1850C5CN, res=T31_g37, mach=corip1How can I determine the correct domain indices to use for outputting these variables so that they match exactly (differences=0?). Thank you,Kuo
 

eaton

CSEG and Liaisons
The values of cam_in%lwup should be the same as the CLM values in grid cells that only contain land.  In grid cells near the coastlines there will be differences with CLM which only knows about the land values, but the coupler merges land, ocean, and sea ice values before sending data to CAM.
 

eaton

CSEG and Liaisons
The values of cam_in%lwup should be the same as the CLM values in grid cells that only contain land.  In grid cells near the coastlines there will be differences with CLM which only knows about the land values, but the coupler merges land, ocean, and sea ice values before sending data to CAM.
 

eaton

CSEG and Liaisons
The values of cam_in%lwup should be the same as the CLM values in grid cells that only contain land.  In grid cells near the coastlines there will be differences with CLM which only knows about the land values, but the coupler merges land, ocean, and sea ice values before sending data to CAM.
 

eaton

CSEG and Liaisons
The values of cam_in%lwup should be the same as the CLM values in grid cells that only contain land.  In grid cells near the coastlines there will be differences with CLM which only knows about the land values, but the coupler merges land, ocean, and sea ice values before sending data to CAM.
 
Thanks for your comment eaton.Originally, my suspicion pointed to the interfaces between the land and ocean due to coupler processing.  But, the attached figures from the original post show that there are differences of 50+  W/m^2 in land interiors.  Most notably, Asia in testCLM2CAM_LWUPclm4.png and Australia in the figure testCLM2CAM_LWUPclm238.png.Thanks,Kuo
 
Thanks for your comment eaton.Originally, my suspicion pointed to the interfaces between the land and ocean due to coupler processing.  But, the attached figures from the original post show that there are differences of 50+  W/m^2 in land interiors.  Most notably, Asia in testCLM2CAM_LWUPclm4.png and Australia in the figure testCLM2CAM_LWUPclm238.png.Thanks,Kuo
 
Thanks for your comment eaton.Originally, my suspicion pointed to the interfaces between the land and ocean due to coupler processing.  But, the attached figures from the original post show that there are differences of 50+  W/m^2 in land interiors.  Most notably, Asia in testCLM2CAM_LWUPclm4.png and Australia in the figure testCLM2CAM_LWUPclm238.png.Thanks,Kuo
 
Thanks for your comment eaton.Originally, my suspicion pointed to the interfaces between the land and ocean due to coupler processing.  But, the attached figures from the original post show that there are differences of 50+  W/m^2 in land interiors.  Most notably, Asia in testCLM2CAM_LWUPclm4.png and Australia in the figure testCLM2CAM_LWUPclm238.png.Thanks,Kuo
 

eaton

CSEG and Liaisons
I can't reproduce the plots which you claim to be cam_in%lwup (the middle plots).  Your plots show lwup=0 over the oceans.  But cam_in%lwup is not zero over the oceans in the data sent from the coupler to CAM.  It should be the ocean value of lwup.
 

eaton

CSEG and Liaisons
I can't reproduce the plots which you claim to be cam_in%lwup (the middle plots).  Your plots show lwup=0 over the oceans.  But cam_in%lwup is not zero over the oceans in the data sent from the coupler to CAM.  It should be the ocean value of lwup.
 

eaton

CSEG and Liaisons
I can't reproduce the plots which you claim to be cam_in%lwup (the middle plots).  Your plots show lwup=0 over the oceans.  But cam_in%lwup is not zero over the oceans in the data sent from the coupler to CAM.  It should be the ocean value of lwup.
 

eaton

CSEG and Liaisons
I can't reproduce the plots which you claim to be cam_in%lwup (the middle plots).  Your plots show lwup=0 over the oceans.  But cam_in%lwup is not zero over the oceans in the data sent from the coupler to CAM.  It should be the ocean value of lwup.
 
Hi Eaton,Yes, that's true.  The unaltered cam_in%lwup is not zero over the oceans.  For the plots, I multiplied this cam_in%lwup (LWUPclm in my plots) by the landmask variable in the CLM netcdf file, so that it is more easily visualized for the land areas.   I verified that all non-zero values in the landmask array = 1.0.Do you see differences in the land areas, between the LWUP from CLM and cam_in%lwup?Thanks.
 
Hi Eaton,Yes, that's true.  The unaltered cam_in%lwup is not zero over the oceans.  For the plots, I multiplied this cam_in%lwup (LWUPclm in my plots) by the landmask variable in the CLM netcdf file, so that it is more easily visualized for the land areas.   I verified that all non-zero values in the landmask array = 1.0.Do you see differences in the land areas, between the LWUP from CLM and cam_in%lwup?Thanks.
 
Hi Eaton,Yes, that's true.  The unaltered cam_in%lwup is not zero over the oceans.  For the plots, I multiplied this cam_in%lwup (LWUPclm in my plots) by the landmask variable in the CLM netcdf file, so that it is more easily visualized for the land areas.   I verified that all non-zero values in the landmask array = 1.0.Do you see differences in the land areas, between the LWUP from CLM and cam_in%lwup?Thanks.
 
Hi Eaton,Yes, that's true.  The unaltered cam_in%lwup is not zero over the oceans.  For the plots, I multiplied this cam_in%lwup (LWUPclm in my plots) by the landmask variable in the CLM netcdf file, so that it is more easily visualized for the land areas.   I verified that all non-zero values in the landmask array = 1.0.Do you see differences in the land areas, between the LWUP from CLM and cam_in%lwup?Thanks.
 

eaton

CSEG and Liaisons
Yes, I am seeing the large differences at cell locations which are all land just as you've pointed out.  I didn't expect this and don't have an explanation.  The code will need to be traced from where the values are set in CLM through the coupler layer to come to a resolution.  I'll venture a guess that perhaps the LWup output from CLM is not exactly what's being passed to the coupler.  Otherwise it would appear that the coupler is doing something unexpected.
 

eaton

CSEG and Liaisons
Yes, I am seeing the large differences at cell locations which are all land just as you've pointed out.  I didn't expect this and don't have an explanation.  The code will need to be traced from where the values are set in CLM through the coupler layer to come to a resolution.  I'll venture a guess that perhaps the LWup output from CLM is not exactly what's being passed to the coupler.  Otherwise it would appear that the coupler is doing something unexpected.
 

eaton

CSEG and Liaisons
Yes, I am seeing the large differences at cell locations which are all land just as you've pointed out.  I didn't expect this and don't have an explanation.  The code will need to be traced from where the values are set in CLM through the coupler layer to come to a resolution.  I'll venture a guess that perhaps the LWup output from CLM is not exactly what's being passed to the coupler.  Otherwise it would appear that the coupler is doing something unexpected.
 
Top