Guest User

Untitled

a guest
Sep 21st, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. azamatm@thetalogin1:~/repos/E3SM> git diff components/cam/src/physics/cam/check_energy.F90
  2. diff --git a/components/cam/src/physics/cam/check_energy.F90 b/components/cam/src/physics/cam/check_energy.F90
  3. index f69569bb1..c91fe7ca2 100644
  4. --- a/components/cam/src/physics/cam/check_energy.F90
  5. +++ b/components/cam/src/physics/cam/check_energy.F90
  6. @@ -672,7 +672,8 @@ subroutine ieflx_gmean(state, tend, pbuf2d, cam_in, cam_out, nstep)
  7. snow = 0._r8
  8. ienet = 0._r8
  9.  
  10. -!DIR$ CONCURRENT
  11. + if (ieflx_opt < 1 .or. ieflx_opt > 2) call endrun('*** incorrect ieflx_opt ***')
  12. +
  13. do lchnk = begchunk, endchunk
  14.  
  15. ncol = state(lchnk)%ncol
  16. @@ -680,8 +681,6 @@ subroutine ieflx_gmean(state, tend, pbuf2d, cam_in, cam_out, nstep)
  17. snow(:ncol,lchnk) = cam_out(lchnk)%precsc(:ncol) + cam_out(lchnk)%precsl(:ncol)
  18. rain(:ncol,lchnk) = cam_out(lchnk)%precc(:ncol) + cam_out(lchnk)%precl(:ncol) - snow(:ncol,lchnk)
  19.  
  20. - select case (ieflx_opt)
  21. -
  22. !!.....................................................................................
  23. !! Calculate the internal energy flux at surface (imitate what is considered in the ocean model)
  24. !!
  25. @@ -693,27 +692,22 @@ subroutine ieflx_gmean(state, tend, pbuf2d, cam_in, cam_out, nstep)
  26. !! (rhow*) converts the unit of precipitation from m/s to kg/m2/s
  27. !!.....................................................................................
  28.  
  29. - case(1)
  30. + if (ieflx_opt == 1) then
  31. ienet(:ncol,lchnk) = cpsw * qflx(:ncol,lchnk) * cam_in(lchnk)%ts(:ncol) - &
  32. cpsw * rhow * ( rain(:ncol,lchnk) + snow(:ncol,lchnk) ) * cam_out(lchnk)%tbot(:ncol)
  33. - case(2)
  34. + else
  35. ienet(:ncol,lchnk) = cpsw * qflx(:ncol,lchnk) * cam_in(lchnk)%ts(:ncol) - &
  36. cpsw * rhow * ( rain(:ncol,lchnk) + snow(:ncol,lchnk) ) * cam_in(lchnk)%ts(:ncol)
  37. - case default
  38. - call endrun('*** incorrect ieflx_opt ***')
  39. - end select
  40. -
  41. -
  42. + endif
  43. end do
  44.  
  45. call gmean(ienet, ieflx_glob)
  46.  
  47. -!DIR$ CONCURRENT
  48. - do lchnk = begchunk, endchunk
  49. + ieflx = ieflx_glob
  50.  
  51. - ieflx(:ncol) = ieflx_glob
  52. + do lchnk = begchunk, endchunk
  53.  
  54. - call outfld('IEFLX', ieflx(:ncol), pcols, lchnk)
  55. + call outfld('IEFLX', ieflx, pcols, lchnk)
  56.  
  57. end do
Add Comment
Please, Sign In to add comment