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

capgen must handle doxygen comments between metadata table hooks and subroutine (8 hours) #369

Closed
climbfuji opened this issue Apr 28, 2021 · 2 comments
Assignees
Labels
bug For issues describing bugs, or PRs fixing bugs capgen bugs, requests, etc. that involve ccpp_capgen capgen-unification Issues/PRs necessary for capgen/prebuild unification

Comments

@climbfuji
Copy link
Collaborator

capgen's metadata/Fortran parser (the "Julie Schramm version") throws an error

No matching Fortran routine found for sfc_sice_run in /Users/dom.heinzeller/scratch/ufs-weather-model/fortran_parser_julie/ccpp-physics-fork/physics/sfc_sice.F

when there are certain doxygen lines between the metadata table hooks and the subroutine:

!! \section arg_table_sfc_sice_run Argument Table
!! \htmlinclude sfc_sice_run.html
!!
!>  @{
      subroutine sfc_sice_run                                           &
     &    ( im, kice, sbc, hvap, tgice, cp, eps, epsm1, rvrdm1, grav,   & !  ---  inputs:
     &      t0c, rd, ps, t1, q1, delt,                                  &
     &      sfcemis, dlwflx, sfcnsw, sfcdsw, srflag,                    &
     &      cm, ch, prsl1, prslki, prsik1, prslk1, wind,                &
     &      flag_iter, lprnt, ipr,                                      &
     &      hice, fice, tice, weasd, tskin, tprcp, tiice, ep,           & !  ---  input/outputs:
     &      snwdph, qsurf, snowmt, gflux, cmm, chh, evap, hflx,         & !  
     &      frac_grid, icy, islmsk_cice,                                &
     &      min_lakeice, min_seaice, oceanfrac,                         &
     &      errmsg, errflg )

If I move the line !> @{ to after & errmsg, errflg ), it works.

However, the parser is fine with the following lines:

!! \section arg_table_scm_sfc_flux_spec_run Argument Table
!! \htmlinclude scm_sfc_flux_spec_run.html
!!
!! \section general_sfc_flux_spec General Algorithm
!!  -# Compute friction velocity from the wind speed at the lowest model layer, the height about the ground, and the roughness length.
!!  -# Compute the surface stress from the friction velocity.
!!  -# Calculate the surface drag coefficient for momentum given the surface stress and wind on the lowest model layer.
!!  -# Calculate the Monin-Obukhov similarity funciton for momentum from the surface drag coefficient.
!!  -# Calculate the Obukhov length from the friction velocity, surface virtual potential temperature, and surface vertical virtual potential temperature flux.
!!  -# Calculate the bulk Richardson number at the lowest model layer.
!!  -# Calculate the Monin-Obukhov similarity function for heat and moisture from the bulk Richardson number and diagnosed similarity function for momentum.
!!  -# Calculate the surface drag coefficient for heat and moisture.
!!  -# Calculate the u and v wind at 10m.
  subroutine scm_sfc_flux_spec_run (u1, v1, z1, t1, q1, p1, roughness_length, spec_sh_flux, spec_lh_flux, &
    exner_inverse, T_surf, cp, grav, hvap, rd, fvirt, vonKarman, sh_flux, lh_flux, sh_flux_chs, lh_flux_chs, u_star, sfc_stress, cm, ch, &
    fm, fh, rb, u10m, v10m, wind1, qss, t2m, q2m, errmsg, errflg)
``
@climbfuji climbfuji added capgen bugs, requests, etc. that involve ccpp_capgen capgen-unification Issues/PRs necessary for capgen/prebuild unification labels Apr 28, 2021
@gold2718 gold2718 self-assigned this Apr 28, 2021
@gold2718 gold2718 added the bug For issues describing bugs, or PRs fixing bugs label Apr 28, 2021
@gold2718
Copy link
Collaborator

Sounds like a bug or 3 (I'm betting on at least 2 bugs here).

@gold2718 gold2718 changed the title capgen bug or not? Doxygen comments between metadata table hooks and subroutine capgen must handle doxygen comments between metadata table hooks and subroutine Oct 18, 2021
@gold2718 gold2718 changed the title capgen must handle doxygen comments between metadata table hooks and subroutine capgen must handle doxygen comments between metadata table hooks and subroutine (8 hours) Oct 18, 2021
@climbfuji
Copy link
Collaborator Author

This bug no longer exists in capgen, see #429

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For issues describing bugs, or PRs fixing bugs capgen bugs, requests, etc. that involve ccpp_capgen capgen-unification Issues/PRs necessary for capgen/prebuild unification
Projects
None yet
Development

No branches or pull requests

2 participants