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

Surface upward heat fluxes for coupling are not properly calculated when (cplaqm .and. .not.cplflx) is ture in GFS_PBL_generic_post.F90 #945

Closed
ChunxiZhang-NOAA opened this issue Jul 11, 2022 · 3 comments · Fixed by #962, NOAA-EMC/fv3atm#578 or ufs-community/ufs-weather-model#1399
Labels

Comments

@ChunxiZhang-NOAA
Copy link
Collaborator

Description

In GFS_PBL_generic_post.F90, when AQM model is on and condition (cplaqm .and. .not. cplflx) is true, the model will crash due to unallocated variables dtsfc_cice and dqsfc_cice in GFS_typedefs.F90 (dtsfcin_cpl and dqsfcin_cpl accordingly). The following is the slice of the code:

if (cplaqm .and. .not.cplflx) then
do i=1,im
if (oceanfrac(i) > zero) then ! Ocean only, NO LAKES
if ( .not. wet(i)) then ! no open water
if (kdt > 1) then !use results from CICE
dtsfci_cpl(i) = dtsfc_cice(i)
dqsfci_cpl(i) = dqsfc_cice(i)

else !use PBL fluxes when CICE fluxes is unavailable
dtsfci_cpl(i) = dtsfc1(i)hffac(i)
dqsfci_cpl(i) = dqsfc1(i)
end if
elseif (icy(i) .or. dry(i)) then ! use stress_ocean from sfc_diff for opw component at mixed point
rho = prsl(i,1) / (rd
t1(i)(one+fvirtmax(q1(i), qmin)))
dtsfci_cpl(i) = cp * rho * hflx_wat(i) ! sensible heat flux over open ocean
dqsfci_cpl(i) = hvap * rho * evap_wat(i) ! latent heat flux over open ocean
else ! use results from PBL scheme for 100% open ocean
dtsfci_cpl(i) = dtsfc1(i)*hffac(i)
dqsfci_cpl(i) = dqsfc1(i)
endif
endif ! Ocean only, NO LAKES
enddo
end if

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. step 1
  2. step 2
  3. see the bug...

Additional Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • Machine
  • Compiler
  • Suite Definition File or Scheme
  • Reference other issues or PRs in other repositories that this is related to, and how they are related.

Output

Please include any relevant log files, screenshots or other output here.

@bbakernoaa
Copy link
Contributor

Has there been a PR submitted for this? @ChunxiZhang-NOAA

@ChunxiZhang-NOAA
Copy link
Collaborator Author

@bbakernoaa No, I haven't submitted a PR for this issue. I will submit one soon.

@bbakernoaa
Copy link
Contributor

bbakernoaa commented Aug 12, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment