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

Doxygen in CALRAD_WCLOUD_newcrtm.f CALRCH.f CALSTRM.f CALTAU.f CALTHTE.f CALUPDHEL.f. #467

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 18 additions & 26 deletions sorc/ncep_post.fd/CALRAD_WCLOUD_newcrtm.f
Original file line number Diff line number Diff line change
@@ -1,30 +1,22 @@
!> @file
!
!> THIS ROUTINE COMPUTES MODEL DERIVED BRIGHTNESS TEMPERATURE
!! USING CRTM. IT IS PATTERNED AFTER GSI SETUPRAD WITH TREADON'S HELP
!!
!! PROGRAM HISTORY LOG:
!! - 11-02-06 Jun WANG - addgrib2 option
!! - 14-12-09 WM LEWIS ADDED:
!! FUNCTION EFFR TO COMPUTE EFFECTIVE PARTICLE RADII
!! CHANNEL SELECTION USING LVLS FROM WRF_CNTRL.PARM
!! - 19-04-01 Sharon NEBUDA - Added output option for GOES-16 & GOES-17 ABI IR Channels 7-16
!! - 20-04-09 Tracy Hertneky - Added Himawari-8 AHI CH7-CH16
!! - 21-01-10 Web Meng - Added checking points for skiping grids with filling value spval
!! - 21-03-11 Bo Cui - improve local arrays memory
!! - 21-08-31 Lin Zhu - added ssmis-f17 channels 15-18 grib2 output
!!
!! OUTPUT FILES:
!! NONE
!!
!! SUBPROGRAMS CALLED:
!! UTILITIES:
!!
!! LIBRARY:
!! /nwprod/lib/sorc/crtm2
!!
!! @author CHUANG @date 07-01-17
!!
!> @brief Subroutine that computes model derived brightness temperature.
!>
!> This routine computes model derived brightness temperature
!> using CRTM. It is patterned after GSI setuprad with Treadon's help.
!>
!> ### Program history log:
!> Date | Programmer | Comments
!> -----|------------|---------
!> 2007-01-17 | H Chuang | Initial
!> 2011-02-06 | Jun Wang | add grib2 option
!> 2014-12-09 | WM Lewis | added function EFFR to compute effective particle radii channel selection using LVLS from WRF_CNTRL.PARM
!> 2019-04-01 | Sharon Nebuda | Added output option for GOES-16 & GOES-17 ABI IR Channels 7-16
!> 2020-04-09 | Tracy Hertneky | Added Himawari-8 AHI CH7-CH16
!> 2021-01-10 | Wen Meng | Added checking points for skiping grids with filling value spval
!> 2021-03-11 | Bo Cui | improve local arrays memory
!> 2021-08-31 | Lin Zhu | added ssmis-f17 channels 15-18 grib2 output
!>
!> @author Chuang @date 2007-01-17
SUBROUTINE CALRAD_WCLOUD

use vrbls3d, only: o3, pint, pmid, t, q, qqw, qqi, qqr, f_rimef, nlice, nrain, qqs, qqg, &
Expand Down
60 changes: 21 additions & 39 deletions sorc/ncep_post.fd/CALRCH.f
Original file line number Diff line number Diff line change
@@ -1,43 +1,25 @@
!> @file
!
!> SUBPROGRAM: CALRCH COMPUTES GRD RCH NUMBER
!! PRGRMMR: TREADON ORG: W/NP2 DATE: 93-10-11
!!
!! ABSTRACT:
!! THIS ROUTINE COMPUTES THE GRADIENT RICHARDSON NUMBER
!! AS CODED IN ETA MODEL SUBROUTINE PROFQ2.F.
!! FIX TO AVOID UNREASONABLY SMALL ANEMOMETER LEVEL WINDS.
!!
!! PROGRAM HISTORY LOG:
!! 93-10-11 RUSS TREADON
!! 98-06-17 T BLACK - CONVERSION FROM 1-D TO 2-D
!! 00-01-04 JIM TUCCILLO - MPI VERSION
!! 01-10-22 H CHUANG - MODIFIED TO PROCESS HYBRID MODEL OUTPUT
!! 02-01-15 MIKE BALDWIN - WRF VERSION
!! 05-02-25 H CHUANG - ADD COMPUTATION FOR NMM E GRID
!! 05-07-07 BINBIN ZHOU - ADD RSM FOR A GRID
!!
!! USAGE: CALL CALRCH(EL,RICHNO)
!! INPUT ARGUMENT LIST:
!! EL - MIXING LENGTH SCALE.
!!
!! OUTPUT ARGUMENT LIST:
!! RICHNO - GRADIENT RICHARDSON NUMBER.
!!
!! OUTPUT FILES:
!! NONE
!!
!! SUBPROGRAMS CALLED:
!! UTILITIES:
!! NONE
!! LIBRARY:
!! COMMON -
!! CTLBLK
!!
!! ATTRIBUTES:
!! LANGUAGE: FORTRAN
!! MACHINE : CRAY C-90
!!
!> @brief Subroutine that computes GRD RCH number.
!>
!> This routine computes the gradient Richardson number
!> as coded in ETA model subroutine PROFQ2.F.
!> Fix to avoid unreasonably small anemometer level winds.
!>
!> @param[in] EL Mixing length scale.
!> @param[out] RICHNO Gradient Richardson number.
!>
!> ### Program history log:
!> Date | Programmer | Comments
!> -----|------------|---------
!> 1993-10-11 | Russ Treadon | Initial
!> 1998-06-17 | T Black | Convesion from 1-D to 2-D
!> 2000-01-04 | Jim Tuccillo | MPI Version
!> 2001-10-22 | H Chuang | Modified to process hybrid model output
!> 2002-01-15 | Mike Baldwin | WRF Version
!> 2005-02-25 | H Chuang | Add computation for NMM E grid
!> 2005-07-07 | Binbin Zhou | Add RSM for A Grid
!>
!> @author Russ Treadon W/NP2 @date 1993-10-11
SUBROUTINE CALRCH(EL,RICHNO)

!
Expand Down
61 changes: 22 additions & 39 deletions sorc/ncep_post.fd/CALSTRM.f
Original file line number Diff line number Diff line change
@@ -1,43 +1,26 @@
!> @file
!
!> SUBPROGRAM: CALSTRM COMPUTES GEO STREAMFUNCTION
!! PRGRMMR: TREADON ORG: W/NP2 DATE: 92-12-22
!!
!! ABSTRACT:
!! THIS ROUTINE COMPUTES THE GEOSTROPHIC STREAMFUNCTION,
!! PSI, FROM THE PASSED GEOPOTENTIAL HEIGHT FIELD, Z.
!! THE FORMULA USED IS PSI = G*Z/F0, WHERE G IS THE
!! GRAVITATIONAL ACCELERATION CONSTANT AND F0 IS A
!! CONSTANT CORIOLIS PARAMETER. F0 IS SET TO BE THE
!! VALUE OF THE CORIOLIS PARAMETER NEAR THE CENTER
!! OF THE MODEL GRID.
!!
!! PROGRAM HISTORY LOG:
!! 92-12-22 RUSS TREADON
!! 98-06-08 T BLACK - CONVERSION FROM 1-D TO 2-D
!! 00-01-05 JIM TUCCILLO - MPI VERSION
!! 02-06-13 MIKE BALDWIN - WRF VERSION
!!
!! USAGE: CALL CALSTRM(Z1D,STRM)
!! INPUT ARGUMENT LIST:
!! Z1D - GEOPOTENTIAL HEIGHT (M)
!!
!! OUTPUT ARGUMENT LIST:
!! STRM - GEOSTROPHIC STREAMFUNCTION
!!
!! OUTPUT FILES:
!! NONE
!!
!! SUBPROGRAMS CALLED:
!! UTILITIES:
!! NONE
!! LIBRARY:
!! COMMON - MAPOT
!!
!! ATTRIBUTES:
!! LANGUAGE: FORTRAN
!! MACHINE : CRAY C-90
!!
!> @brief Subroutine that computes geo streamfunction.
!>
!> This routine computes the geostrophic streamfunction,
!> PSI, from the passed geopotential height field, Z.
!> The formule used it PSI = G*Z/F0, where G is the
!> gravitational acceleration constant and F0 is a
!> constant Coriolis parameter. F0 is set to be the
!> valus of the Coriolis parameter near the center
!> of the model grid.
!>
!> @param[in] Z1D Geopotential height (m).
!> @param[out] STRM Geostrophic streamfunction.
!>
!> ### Program history log:
!> Date | Programmer | Comments
!> -----|------------|---------
!> 1992-12-22 | Russ Treadon | Initial
!> 1998-06-08 | T Black | Conversion from 1-D TO 2-D
!> 2000-01-05 | Jim Tuccillo | MPI Version
!> 2002-06-13 | Mike Baldwin | WRF Version
!>
!> @author Russ Treadon W/NP2 @date 1992-12-22
SUBROUTINE CALSTRM(Z1D,STRM)

!
Expand Down
67 changes: 25 additions & 42 deletions sorc/ncep_post.fd/CALTAU.f
Original file line number Diff line number Diff line change
@@ -1,46 +1,29 @@
!> @file
!
!> SUBPROGRAM: CALTAU COMPUTE U AND V WIND STRESSES
!! PRGRMMR: TREADON ORG: W/NP2 DATE: 93-09-01
!!
!! ABSTRACT: THIS ROUTINE COMPUTES SURFACE LAYER U AND V
!! WIND COMPONENT STRESSES USING K THEORY AS PRESENTED
!! IN SECTION 8.4 OF "NUMBERICAL PREDICTION AND DYNAMIC
!! METEOROLOGY" BY HALTINER AND WILLIAMS (1980, JOHN WILEY
!! & SONS).
!!
!! PROGRAM HISTORY LOG:
!! 93-09-01 RUSS TREADON
!! 98-06-11 T BLACK - CONVERSION FROM 1-D TO 2-D
!! 00-01-04 JIM TUCCILLO - MPI VERSION
!! 01-10-25 H CHUANG - MODIFIED TO PROCESS HYBRID OUTPUT
!! 02-01-15 MIKE BALDWIN - WRF VERSION, OUTPUT IS ON MASS-POINTS
!! 05-02-23 H CHUANG - COMPUTE STRESS FOR NMM ON WIND POINTS
!! 05-07-07 BINBIN ZHOU - ADD RSM STRESS for A GRID
!! 21-07-26 W Meng - Restrict computation from undefined grids
!! USAGE: CALL CALTAU(TAUX,TAUY)
!! INPUT ARGUMENT LIST:
!! NONE
!!
!! OUTPUT ARGUMENT LIST:
!! TAUX - SUFACE LAYER U COMPONENT WIND STRESS.
!! TAUY - SUFACE LAYER V COMPONENT WIND STRESS.
!!
!! OUTPUT FILES:
!! NONE
!!
!! SUBPROGRAMS CALLED:
!! UTILITIES:
!! CLMAX
!! MIXLEN
!!
!! LIBRARY:
!! COMMON -
!!
!! ATTRIBUTES:
!! LANGUAGE: FORTRAN
!! MACHINE : CRAY C-90
!!
!> @brief Subroutine that computes U and V wind stresses.
!>
!> This routine computes surface layer U and V
!> wind component stresses using K theory as presented
!> in section 8.4 of "Numerical prediction and dynamic
!> meteorology" by Haltiner and Williams (1980, John Wiley
!> & Sons).
!>
!> @param[out] TAUX Suface layer U component wind stress.
!> @param[out] TAUY Suface layer V component wind stress.
!>
!> ### Program history log:
!> Date | Programmer | Comments
!> -----|------------|---------
!> 1993-09-01 | Russ Treadon | Initial
!> 1998-06-11 | T Black | Convesion from 1-D to 2-D
!> 2000-01-04 | Jim Tuccillo | MPI Version
!> 2001-10-25 | H Chuang | Modified to process hybrid output
!> 2002-01-15 | Mike Baldwin | WRF Version, output is on mass-points
!> 2005-02-23 | H Chuang | Compute stress for NMM on wind points
!> 2005-07-07 | Binbin Zhou | Add RSM stress for A Grid
!> 2021-07-26 | W Meng | Restrict computation from undefined grids
!>
!> @author Russ Treadon W/NP2 @date 1993-09-01

SUBROUTINE CALTAU(TAUX,TAUY)

!
Expand Down
58 changes: 21 additions & 37 deletions sorc/ncep_post.fd/CALTHTE.f
Original file line number Diff line number Diff line change
@@ -1,41 +1,25 @@
!> @file
!
!> SUBPROGRAM: CALTHTE COMPUTES THETA-E
!! PRGRMMR: TREADON ORG: W/NP2 DATE: 93-06-18
!!
!! ABSTRACT:
!! THIS ROUTINE COMPUTES THE EQUIVALENT POTENTIAL TEMPERATURE
!! GIVEN PRESSURE, TEMPERATURE, AND SPECIFIC HUMIDITY. THE
!! EQUATIONS OF BOLTON (MWR,1980) ARE USED.
!!
!! PROGRAM HISTORY LOG:
!! 93-06-18 RUSS TREADON
!! 98-06-16 T BLACK - CONVERSION FROM 1-D TO 2-D
!! 00-01-04 JIM TUCCILLO - MPI VERSION
!! 21-07-28 W Meng - Restrict computation from undefined grids
!!
!! USAGE: CALL CALTHTE(P1D,T1D,Q1D,THTE)
!! INPUT ARGUMENT LIST:
!! P1D - PRESSURE (PA)
!! T1D - TEMPERATURE (K)
!! Q1D - SPECIFIC HUMIDITY (KG/KG)
!!
!! OUTPUT ARGUMENT LIST:
!! THTE - THETA-E (K)
!!
!! OUTPUT FILES:
!! NONE
!!
!! SUBPROGRAMS CALLED:
!! UTILITIES:
!! VAPOR - FUNCTION TO CALCULATE VAPOR PRESSURE.
!! LIBRARY:
!! NONE
!!
!! ATTRIBUTES:
!! LANGUAGE: FORTRAN
!! MACHINE : CRAY C-90
!!
!> @brief Subroutine that computes Theta-E.
!>
!> This routine computes the equivalent potential temperature
!> given pressure, temperature, and specific humidity. The
!> equations of Bolton (MWR,1980) are used.
!>
!> @param[in] P1D pressure (Pa).
!> @param[in] T1D temperature (K).
!> @param[in] Q1D specific humidity(kg/kg).
!> @param[out] THTE Theta-E (K).
!>
!> ### Program history log:
!> Date | Programmer | Comments
!> -----|------------|---------
!> 1993-06-18 | Russ Treadon | Initial
!> 1998-06-16 | T Black | Convesion from 1-D to 2-D
!> 2000-01-04 | Jim Tuccillo | MPI Version
!> 2021-07-28 | W Meng | Restrict computation from undefined grids
!>
!> @author Russ Treadon W/NP2 @date 1993-06-18

SUBROUTINE CALTHTE(P1D,T1D,Q1D,THTE)

!
Expand Down
49 changes: 14 additions & 35 deletions sorc/ncep_post.fd/CALUPDHEL.f
Original file line number Diff line number Diff line change
@@ -1,39 +1,18 @@
!> @file
!
kayeekayee marked this conversation as resolved.
Show resolved Hide resolved
!> SUBPROGRAM: CALUPDHEL COMPUTES UPDRAFT HELICITY
!! PRGRMMR: PYLE ORG: W/NP2 DATE: 07-10-22
!!
!! ABSTRACT:
!! THIS ROUTINE COMPUTES THE UPDRAFT HELICITY
!!
!! PROGRAM HISTORY LOG:
!! 07-10-22 M PYLE - based on SPC Algorithm courtesy of David Bright
!! 11-01-11 M Pyle - converted to F90 for unified post
!! 11-04-05 H Chuang - added B grid option
!! 20-11-06 J Meng - USE UPP_MATH MODULE
!! 22-03-17 Wen Meng - Restrict computation from undefined grids.
!!
!! USAGE: CALL CALUPDHEL(UPDHEL)
!!
!! INPUT ARGUMENT LIST:
!! NONE
!!
!! OUTPUT ARGUMENT LIST:
!! UPDHEL - UPDRAFT HELICITY (M^2/S^2)
!!
!! OUTPUT FILES:
!! NONE
!!
!! SUBPROGRAMS CALLED:
!! UTILITIES:
!! NONE
!! LIBRARY:
!! COMMON - CTLBLK
!!
!! ATTRIBUTES:
!! LANGUAGE: FORTRAN
!! MACHINE : CRAY C-90
!!
!> @brief Subroutine that computes the updraft helicity.
!>
!> @param[out] UPDHEL Updraft helicity (m^2/s^2).
!>
!> ### Program history log:
!> Date | Programmer | Comments
!> -----|------------|---------
!> 2007-10-22 | M Pyle | Initial
!> 2007-10-22 | M Pyle | based on SPC Algorithm courtesy of David Bright
!> 2011-01-11 | M Pyle | converted to F90 for unified post
!> 2011-04-05 | H Chuang | added B grid option
!> 2020-11-06 | J Meng | Use UPP_MATH Module
!>
!> @author M Pyle W/NP2 @date 2007-10-22
SUBROUTINE CALUPDHEL(UPDHEL)

!
Expand Down