-
Notifications
You must be signed in to change notification settings - Fork 95
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
Doxygen in GET_BITS.f, GPVS.f, LFMFLD.f, LFMFLD_GFS.f, MDL2P.f, MDL2STD_P.f, MDL2THANDPV.f, and MSFPS.f. #474
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,24 @@ | ||
!> @file | ||
! . . . | ||
!> SUBPROGRAM: GPVS COMPUTE SATURATION VAPOR PRESSURE TABLE | ||
!! AUTHOR: N PHILLIPS W/NP2 DATE: 30 DEC 82 | ||
!! | ||
!! ABSTRACT: COMPUTE SATURATION VAPOR PRESSURE TABLE AS A FUNCTION OF | ||
!! TEMPERATURE FOR THE TABLE LOOKUP FUNCTION FPVS. | ||
!! EXACT SATURATION VAPOR PRESSURES ARE CALCULATED IN SUBPROGRAM FPVSX. | ||
!! THE CURRENT IMPLEMENTATION COMPUTES A TABLE WITH A LENGTH | ||
!! OF 7501 FOR TEMPERATURES RANGING FROM 180.0 TO 330.0 KELVIN. | ||
!! | ||
!! PROGRAM HISTORY LOG: | ||
!! 91-05-07 IREDELL | ||
!! 94-12-30 IREDELL EXPAND TABLE | ||
!! 96-02-19 HONG ICE EFFECT | ||
!! | ||
!! USAGE: CALL GPVS | ||
!! | ||
!! SUBPROGRAMS CALLED: | ||
!! (FPVSX) - INLINABLE FUNCTION TO COMPUTE SATURATION VAPOR PRESSURE | ||
!! | ||
!! COMMON BLOCKS: | ||
!! COMPVS - SCALING PARAMETERS AND TABLE FOR FUNCTION FPVS. | ||
!! | ||
!! ATTRIBUTES: | ||
!! LANGUAGE: FORTRAN 90 | ||
!! MACHINE: IBM SP | ||
!! | ||
!! | ||
!####################################################################### | ||
!-- Lookup tables for the saturation vapor pressure w/r/t water & ice -- | ||
!####################################################################### | ||
! | ||
!> @brief gpvs() computes saturation vapor pressure table. | ||
!> | ||
!> Compute saturation vapor pressure table as a function of | ||
!> temperature for the table lookup function FPVS. | ||
!> Exact saturation vapor pressures are calculated in subprogram FPVSX. | ||
!> The current implementation computes a table with a length | ||
!> of 7501 for temperatures ranging from 180.0 to 330.0 Kelvin. | ||
!> | ||
!> @param[out] pvu real (km) potential vorticity (10**-6*K*m**2/kg/s). | ||
!> | ||
!> ### Program History Log | ||
!> Date | Programmer | Comments | ||
!> -----|------------|--------- | ||
!> 1982-12-30 | N Phillips | Initial | ||
!> 1991-05-07 | Mark Iredell | Made into inlinable function | ||
!> 1994-12-30 | Mark Iredell | Expand table | ||
!> 1996-02-19 | Hong | Ice effect | ||
!> | ||
!> @note Lookup tables for the saturation vapor pressure w/r/t water & ice. | ||
!> @author N Phillips W/NP2 @date 1982-12-30 | ||
SUBROUTINE GPVS | ||
! ****************************************************************** | ||
|
||
|
@@ -65,40 +53,28 @@ SUBROUTINE GPVS | |
!----------------------------------------------------------------------- | ||
FUNCTION FPVS(T) | ||
!----------------------------------------------------------------------- | ||
!$$$ SUBPROGRAM DOCUMENTATION BLOCK | ||
! . . . | ||
! SUBPROGRAM: FPVS COMPUTE SATURATION VAPOR PRESSURE | ||
! AUTHOR: N PHILLIPS W/NP2 DATE: 30 DEC 82 | ||
! | ||
! ABSTRACT: COMPUTE SATURATION VAPOR PRESSURE FROM THE TEMPERATURE. | ||
! A LINEAR INTERPOLATION IS DONE BETWEEN VALUES IN A LOOKUP TABLE | ||
! COMPUTED IN GPVS. SEE DOCUMENTATION FOR FPVSX FOR DETAILS. | ||
! INPUT VALUES OUTSIDE TABLE RANGE ARE RESET TO TABLE EXTREMA. | ||
! THE INTERPOLATION ACCURACY IS ALMOST 6 DECIMAL PLACES. | ||
! ON THE CRAY, FPVS IS ABOUT 4 TIMES FASTER THAN EXACT CALCULATION. | ||
! THIS FUNCTION SHOULD BE EXPANDED INLINE IN THE CALLING ROUTINE. | ||
! | ||
! PROGRAM HISTORY LOG: | ||
! 91-05-07 IREDELL MADE INTO INLINABLE FUNCTION | ||
! 94-12-30 IREDELL EXPAND TABLE | ||
! 96-02-19 HONG ICE EFFECT | ||
! | ||
! USAGE: PVS=FPVS(T) | ||
! | ||
! INPUT ARGUMENT LIST: | ||
! T - REAL TEMPERATURE IN KELVIN | ||
! | ||
! OUTPUT ARGUMENT LIST: | ||
! FPVS - REAL SATURATION VAPOR PRESSURE IN KILOPASCALS (CB) | ||
! | ||
! COMMON BLOCKS: | ||
! COMPVS - SCALING PARAMETERS AND TABLE COMPUTED IN GPVS. | ||
! | ||
! ATTRIBUTES: | ||
! LANGUAGE: FORTRAN 90 | ||
! MACHINE: IBM SP | ||
! | ||
!$$$ | ||
!> fpvs() computes saturation vapor pressure. | ||
!> | ||
!> Compute saturation vapor pressure from the temperature. | ||
!> A linear interpolation is done between values in a lookup table | ||
!> computed in GPVS. See documentation for FPVSX for details. | ||
!> Input values outside table range are reset to table extrema. | ||
!> The interpolation accuracy is almost 6 decimal places. | ||
!> On the CRAY, FPVS is about 4 times faster than exact calculation. | ||
!> This function should be expanded inline in the calling routine. | ||
!> | ||
!> @param[in] T real temperature in Kelvin. | ||
!> @param[out] FPVS real saturation vapor pressure in kilopascals (CB). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is CB? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @WenMeng-NOAA @HuiyaChuang-NOAA There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kayeekayee I would defer this question to @HuiyaChuang-NOAA. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This kind of confusion is exactly the reason that we should be very cautious using abbreviations in documentation! |
||
!> | ||
!> ### Program History Log | ||
!> Date | Programmer | Comments | ||
!> -----|------------|--------- | ||
!> 1982-12-30 | N Phillips | Initial | ||
!> 1991-05-07 | Mark Iredell | Made into inlinable function | ||
!> 1994-12-30 | Mark Iredell | Expand table | ||
!> 1996-02-19 | Hong | Ice effect | ||
!> | ||
!> @author N Phillips W/NP2 @date 1982-12-30 | ||
!----------------------------------------------------------------------- | ||
use svptbl_mod, only : NX,C1XPVS,C2XPVS,TBPVS | ||
! | ||
|
@@ -144,41 +120,33 @@ FUNCTION FPVS0(T,NX,C1XPVS0,C2XPVS0,TBPVS0) | |
!----------------------------------------------------------------------- | ||
FUNCTION FPVSX(T) | ||
!----------------------------------------------------------------------- | ||
!$$$ SUBPROGRAM DOCUMENTATION BLOCK | ||
! . . . | ||
! SUBPROGRAM: FPVSX COMPUTE SATURATION VAPOR PRESSURE | ||
! AUTHOR: N PHILLIPS W/NP2 DATE: 30 DEC 82 | ||
! | ||
! ABSTRACT: EXACTLY COMPUTE SATURATION VAPOR PRESSURE FROM TEMPERATURE. | ||
! THE WATER MODEL ASSUMES A PERFECT GAS, CONSTANT SPECIFIC HEATS | ||
! FOR GAS AND LIQUID, AND NEGLECTS THE VOLUME OF THE LIQUID. | ||
! THE MODEL DOES ACCOUNT FOR THE VARIATION OF THE LATENT HEAT | ||
! OF CONDENSATION WITH TEMPERATURE. THE ICE OPTION IS NOT INCLUDED. | ||
! THE CLAUSIUS-CLAPEYRON EQUATION IS INTEGRATED FROM THE TRIPLE POINT | ||
! TO GET THE FORMULA | ||
! PVS=PSATK*(TR**XA)*EXP(XB*(1.-TR)) | ||
! WHERE TR IS TTP/T AND OTHER VALUES ARE PHYSICAL CONSTANTS | ||
! THIS FUNCTION SHOULD BE EXPANDED INLINE IN THE CALLING ROUTINE. | ||
! | ||
! PROGRAM HISTORY LOG: | ||
! 91-05-07 IREDELL MADE INTO INLINABLE FUNCTION | ||
! 94-12-30 IREDELL EXACT COMPUTATION | ||
! 96-02-19 HONG ICE EFFECT | ||
! | ||
! USAGE: PVS=FPVSX(T) | ||
! REFERENCE: EMANUEL(1994),116-117 | ||
! | ||
! INPUT ARGUMENT LIST: | ||
! T - REAL TEMPERATURE IN KELVIN | ||
! | ||
! OUTPUT ARGUMENT LIST: | ||
! FPVSX - REAL SATURATION VAPOR PRESSURE IN KILOPASCALS (CB) | ||
! | ||
! ATTRIBUTES: | ||
! LANGUAGE: FORTRAN 90 | ||
! MACHINE: IBM SP | ||
! | ||
!$$$ | ||
!> fpvsx() computes saturation vapor pressure. | ||
!> | ||
!> Exactly compute saturation vapor pressure from temperature. | ||
!> The water model assumes a perfect gas, constant specific heats | ||
!> for gas and liquid, and neglects the volume of the liquid. | ||
!> The model does account for the variation of the latent heat | ||
!> of condensation with temperature. The ice option is not included. | ||
!> The Clausius-Clapeyron equation is integrated from the triple point | ||
!> To get the formula | ||
!> @code | ||
!> PVS=PSATK*(TR**XA)*exp(XB*(1.-TR)) | ||
!> @endcode | ||
!> where TR is TTP/T and other values are physical constants | ||
!> This function should be expanded inline in the calling routine. | ||
!> | ||
!> @param[in] T real temperature in Kelvin. | ||
!> @param[out] FPVSX real saturation vapor pressure in kilopascals (CB). | ||
!> | ||
!> ### Program History Log | ||
!> Date | Programmer | Comments | ||
!> -----|------------|--------- | ||
!> 1982-12-30 | N Phillips | Initial | ||
!> 1991-05-07 | Mark Iredell | Made into inlinable function | ||
!> 1994-12-30 | Mark Iredell | Exact computation | ||
!> 1996-02-19 | Hong | Ice effect | ||
!> | ||
!> @author N Phillips W/NP2 @date 1982-12-30 | ||
!----------------------------------------------------------------------- | ||
implicit none | ||
! | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably just a numbered list here would work better than the pre tag.