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 GFSPOSTSIG.F NGMFLD.f OTLFT.f OTLIFT.f PARA_RANGE.f PROCESS.f and retrieve_index.f. #477

Merged
Show file tree
Hide file tree
Changes from 2 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
341 changes: 144 additions & 197 deletions sorc/ncep_post.fd/GFSPOSTSIG.F

Large diffs are not rendered by default.

123 changes: 46 additions & 77 deletions sorc/ncep_post.fd/NGMFLD.f
Original file line number Diff line number Diff line change
@@ -1,81 +1,50 @@
!> @file
! . . .
!> SUBPROGRAM: NGMFLD COMPUTES LAYER MEAN NGM FIELDS
!! PRGRMMR: TREADON ORG: W/NP2 DATE: 92-12-22
!!
!! ABSTRACT:
!! THIS ROUTINE COMPUTES A HANDFUL OF NGM LAYER MEAN
!! FIELDS. THIS IS DONE TO PROVIDE A FULLY COMPLETE
!! ETA NGM LOOK-ALIKE OUTPUT FILE. THE SIGMA (LAYER)
!! FIELDS COMPUTED BY THIS ROUTINE ARE TABULATED BELOW.
!!
!! SIGMA (LAYER) FIELD(S)
!! --------------- --------------
!! 0.47191-1.00000 RH
!! 0.47171-0.96470 RH
!! 0.18019-0.47191 RH
!! 0.84368-0.98230 RH
!! 0.85000-1.00000 MCONV
!! WHERE
!! RH = RELATIVE HUMIDITY
!! MCONV = MOISTURE CONVERGENCE
!!
!! LAYER MEANS ARE A SUMMATION OVER ETA LAYERS MAPPING INTO
!! THE PRESSURE RANGE CORRESPONDING TO THE SIGMA RANGE ABOVE.
!! THE CALCULATION OF THESE BOUNDING PRESSURES IS DONE AT
!! EACH HORIZONTAL GRID POINT BASED ON THE SURFACE PRESSURE.
!! EACH TERM IN THE SUMMATION IS WEIGHTED BY THE THICKNESS OF
!! THE ETA LAYER. THE FINAL LAYER MEAN IS THIS SUM NORMALIZED
!! BY THE TOTAL DEPTH OF THE LAYER.

!!
!!
!! PROGRAM HISTORY LOG:
!! 92-12-22 RUSS TREADON
!! 93-07-27 RUSS TREADON - MODIFIED SUMMATION LIMITS FROM
!! 0.66*PSFC TO 0.75*PSFC AND 0.33*PSFC
!! TO 0.50*PSFC, WHERE PSFC IS THE
!! SURFACES PRESSURE. THE REASON FOR
!! THIS CHANGE WAS RECOGNITION THAT IN
!! THE LFM 0.33 AND 0.66 WERE MEASURED
!! FROM THE SURFACE TO THE TROPOPAUSE,
!! NOT THE TOP OF THE MODEL.
!! 93-09-13 RUSS TREADON - RH CALCULATIONS WERE MADE INTERNAL
!! TO THE ROUTINE.
!! 98-06-16 T BLACK - CONVERSION FROM 1-D TO 2-D
!! 98-08-18 MIKE BALDWIN - COMPUTE RH OVER ICE
!! 98-12-22 MIKE BALDWIN - BACK OUT RH OVER ICE
!! 00-01-04 JIM TUCCILLO - MPI VERSION
!! 02-04-24 MIKE BALDWIN - WRF VERSION
!!
!!
!! USAGE: CALL NGMFLD(RH4710,RH4796,RH1847,RH8498,QM8510)
!! INPUT ARGUMENT LIST:
!! NONE
!!
!! OUTPUT ARGUMENT LIST:
!! RH4710 - SIGMA LAYER 0.47-1.00 MEAN RELATIVE HUMIDITY.
!! RH4796 - SIGMA LAYER 0.47-0.96 MEAN RELATIVE HUMIDITY.
!! RH1847 - SIGMA LAYER 0.18-0.47 MEAN RELATIVE HUMIDITY.
!! RH8498 - SIGMA LAYER 0.84-0.98 MEAN RELATIVE HUMIDITY.
!! QM8510 - SIGMA LAYER 0.85-1.00 MEAN MOISTURE CONVERGENCE.
!!
!! OUTPUT FILES:
!! NONE
!!
!! LIBRARY:
!! COMMON -
!! MASKS
!! OPTIONS
!! LOOPS
!! MAPOT
!! DYNAMD
!! INDX
!!
!! ATTRIBUTES:
!! LANGUAGE: FORTRAN
!! MACHINE : CRAY C-90
!!
!> @brief ngmfld() computes layer mean NGM fields
!>
!> This routine computes a handful of NGM layer mean
!> fields. This is done to provide a fully complete
!> ETA NGM look-alike output file. The sigma (layer)
!> fields computed bu this routine are tabulated below.
!><pre>
kayeekayee marked this conversation as resolved.
Show resolved Hide resolved
!> Sigma (layer) Field(s)
!> --------------- --------------
!> 0.47191-1.00000 RH
!> 0.47171-0.96470 RH
!> 0.18019-0.47191 RH
!> 0.84368-0.98230 RH
!> 0.85000-1.00000 MCONV
!> where
!> RH = Relative humidity
!> MCONV = Moisture convergence
!></pre>
!> Layer means are a summation over ETA layers mapping into
!> The pressure range corresponding to the sigma range above.
!> The calculation of these bounding pressures is done at
!> each horizontal grid point based on the surface pressure.
!> Each term in the summation is weighted by the thickness of
!> the ETA layer. The final layer mean is this sum normalized
!> by the total depth of the layer.
!>
!> @param[out] RH4710 Sigma layer 0.47-1.00 mean relative humidity.
!> @param[out] RH4796 Sigma layer 0.47-0.96 mean relative humidity.
!> @param[out] RH1847 Sigma layer 0.18-0.47 mean relative humidity.
!> @param[out] RH8498 Sigma layer 0.84-0.98 mean relative humidity.
!> @param[out] QM8510 Sigma layer 0.85-1.00 mean moisture convergence.
!>
!> ### Program History Log
!> Date | Programmer | Comments
!> -----|------------|---------
!> 1992-12-22 | Russ Treadon | Initial
!> 1993-07-27 | Russ Treadon | Modified summation limits from 0.66*PSFC to 0.75*PSFC and 0.33*PSFC to 0.50*PSFC, where PSFC is the surfaces pressure. The reason for this change was recognition that in the LFM 0.33 and 0.66 were measured from the surface to the tropopause not the top of the model.
!> 1993-09-13 | Russ Treadon | RH calculations were made internal to the routine.
!> 1996-03-04 | Mike Baldwin | Change PW CALC to include CLD WTR
!> 1998-06-16 | T Black | Conversion from 1-D to 2-D
!> 1998-08-17 | Mike Baldwin | Compute RH over ice
!> 1998-12-22 | Mike Baldwin | Back out RH over ice
!> 2000-01-04 | Jim Tuccillo | MPI Version
!> 2002-04-24 | Mike Baldwin | WRF Version
!>
!> @author Russ Treadon W/NP2 @date 1992-12-22
SUBROUTINE NGMFLD(RH4710,RH4796,RH1847,RH8498,QM8510)

!
Expand Down
71 changes: 25 additions & 46 deletions sorc/ncep_post.fd/OTLFT.f
Original file line number Diff line number Diff line change
@@ -1,50 +1,29 @@
!> @file
!
!> SUBPROGRAM: OTLFT COMPUTES LIFTED INDEX
!! PRGRMMR: TREADON ORG: W/NP2 DATE: 93-03-10
!!
!! ABSTRACT:
!! THIS ROUTINE COMPUTES LIFTS A PARCEL SPECIFIED BY THE
!! PASSED PRESSURE, TEMPERATURE, AND SPECIFIC HUMIDITY TO
!! 500MB AND THEN COMPUTES A LIFTED INDEX. THIS LIFTED
!! LIFTED INDEX IS THE DIFFERENCE BETWEEN THE LIFTED
!! PARCEL'S TEMPERATURE AT 500MB AND THE AMBIENT 500MB
!! TEMPERATURE.
!!
!! PROGRAM HISTORY LOG:
!! 93-03-10 RUSS TREADON - MODIFIED OTLIFT2 TO LIFT PARCELS
!! SPECIFIED BY PASSED P, T, AND Q.
!! 98-06-15 T BLACK - CONVERSION FROM 1-D TO 2-D
!! 00-01-04 JIM TUCCILLO - MPI VERSION
!! 02-06-17 MIKE BALDWIN - WRF VERSION
!! 11-04-12 GEOFF MANIKIN - USE VIRTUAL TEMPERATURE
!! 20-11-10 JESSE MENG - USE UPP_PHYSICS MODULE
!!
!! USAGE: CALL OTLFT(PBND,TBND,QBND,SLINDX)
!! INPUT ARGUMENT LIST:
!! PBND - PARCEL PRESSURE.
!! TBND - PARCEL TEMPERATURE.
!! QBND - PARCEL SPECIFIC HUMIDITY.
!!
!! OUTPUT ARGUMENT LIST:
!! SLINDX - LIFTED INDEX.
!!
!! OUTPUT FILES:
!! NONE
!!
!! SUBPROGRAMS CALLED:
!! UTILITIES:
!! NONE
!! LIBRARY:
!! COMMON - CTLBLK
!! LOOPS
!! MASKS
!! PHYS
!!
!! ATTRIBUTES:
!! LANGUAGE: FORTRAN
!! MACHINE : CRAY C-90
!!
!> @brief otlft() computes lifted index.
!>
!> This routine computes lifts a parcel specified by the
!> passed pressure, temperature, and specific humidity to
!> 500mb and then computes a lifted index. This lifted
!> lifted index is the difference between the lifted
!> parcel's temperature at 500mb and the ambient 500mb
!> temperature.
!>
!> @param[in] PBND Parcel pressure.
!> @param[in] TBND Parcel temperature.
!> @param[in] QBND Parcel specific humidity.
!> @param[out] SLINDX Lifted index.
!>
!> ### Program History Log
!> Date | Programmer | Comments
!> -----|------------|---------
!> 1993-03-10 | Russ Treadon | Initial. Modified OTLIFT2 to lift parcels specified by passed P, T, and Q.
!> 1998-06-15 | T Black | Conversion from 1-D to 2-D
!> 2000-01-04 | Jim Tuccillo | MPI Version
!> 2002-06-17 | Mike Baldwin | WRF Version
!> 2011-04-12 | Geoff Manikin | Use virtual temperature
!> 2020-11-10 | Jesse Meng | Use UPP_PHYSICS Module
!>
!> @author Russ Treadon W/NP2 @date 1993-03-10
SUBROUTINE OTLFT(PBND,TBND,QBND,SLINDX)

!
Expand Down
63 changes: 23 additions & 40 deletions sorc/ncep_post.fd/OTLIFT.f
Original file line number Diff line number Diff line change
@@ -1,44 +1,27 @@
!> @file
!
!> SUBPROGRAM: OTLIFT COMPUTES SFC TO 500MB LIFTED INDEX
!! PRGRMMR: TREADON ORG: W/NP2 DATE: 93-03-10
!!
!! ABSTRACT:
!! THIS ROUTINE COMPUTES A SURFACE TO 500MB LIFTED INDEX.
!! THE LIFTED PARCEL IS FROM THE FIRST ATMOSPHERIC ETA
!! LAYER (IE, THE ETA LAYER CLOSEST TO THE MODEL GROUND).
!! THE LIFTED INDEX IS THE DIFFERENCE BETWEEN THIS PARCEL'S
!! TEMPERATURE AT 500MB AND THE AMBIENT 500MB TEMPERATURE.
!!
!! PROGRAM HISTORY LOG:
!! ??-??-?? ??? - SUBROUTINE OTLIFT IN ETA MODEL.
!! 93-03-10 RUSS TREADON - ADAPTED OTLIFT FOR USE WITH NEW POST.
!! 98-06-18 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 MODEL OUTPUT
!! 02-06-11 MIKE BALDWIN - WRF VERSION
!! 11-04-12 GEOFF MANIKIN - USE VIRTUAL TEMPERATURE
!! 20-11-10 JESSE MENG - USE UPP_PHYSICS MODULE
!!
!! USAGE: CALL OTLIFT(SLINDX)
!! INPUT ARGUMENT LIST:
!!
!! OUTPUT ARGUMENT LIST:
!! SLINDX - LIFTED INDEX.
!!
!! OUTPUT FILES:
!! NONE
!!
!! SUBPROGRAMS CALLED:
!! UTILITIES:
!! NONE
!! LIBRARY:
!! COMMON - CTLBLK
!!
!! ATTRIBUTES:
!! LANGUAGE: FORTRAN
!! MACHINE : CRAY C-90
!!
!> @brief otlift() computes SFC to 500mb lifted index.
!>
!> This routine computes a surface to 500mb lifted index.
!> The lifted parcel is from the first atmpspheric ETA
!> layer (ie, the ETA layer closest to the model ground).
!> The lifted index is the difference between this parcel's
!> temperature at 500mb and the ambient 500mb temperature.
!>
!> @param[out] SLINDX lifted index.
!>
!> ### Program History Log
!> Date | Programmer | Comments
!> -----|------------|---------
!> ????-??-?? | ??? | Subroutine OTLIFT in ETA model.
!> 1993-03-10 | Russ Treadon | Adapted OTLIFT for use with new post.
!> 1998-06-18 | T Black | Conversion from 1-D to 2-D
!> 2000-01-04 | Jim Tuccillo | MPI Version
!> 2001-10-25 | H Chuang | Modified to process hybrid model output
!> 2002-06-11 | Mike Baldwin | WRF Version
!> 2011-04-12 | Geoff Manikin | Use virtual temperature
!> 2020-11-10 | Jesse Meng | Use UPP_PHYSICS Module
!>
!> @author Russ Treadon W/NP2 @date 1993-03-10
SUBROUTINE OTLIFT(SLINDX)

!
Expand Down
50 changes: 17 additions & 33 deletions sorc/ncep_post.fd/PARA_RANGE.f
Original file line number Diff line number Diff line change
@@ -1,37 +1,21 @@
!> @file
!
!> SUBPROGRAM: PARA_RANGE SET UP DECOMPOSITION VALUES
!! PRGRMMR: TUCCILLO ORG: IBM
!!
!! ABSTRACT:
!! SETS UP DECOMOSITION VALUES
!!
!! PROGRAM HISTORY LOG:
!! 00-01-06 TUCCILLO - ORIGINAL
!!
!! USAGE: CALL PARA_RANGE (N1,N2,NPROCS,IRANK,ISTA,IEND)(A)
!! INPUT ARGUMENT LIST:
!! N1 - FIRST INTERATE VALUE
!! N2 - LAST INTERATE VALUE
!! NPROCS - NUMBER OF MPI TASKS
!! IRANK - MY TAKS ID
!!
!! OUTPUT ARGUMENT LIST:
!! ISTA - FIRST LOOP VALUE
!! IEND - LAST LOOP VALUE
!!
!! OUTPUT FILES:
!! STDOUT - RUN TIME STANDARD OUT.
!!
!! SUBPROGRAMS CALLED:
!! UTILITIES:
!! NONE
!! LIBRARY:
!!
!! ATTRIBUTES:
!! LANGUAGE: FORTRAN
!! MACHINE : IBM RS/6000 SP
!!
!> @brief para_range() sets up decomposition values.
!>
!> This subroutine sets up decomposition values.
!>
!> @param[in] N1 First interate value.
!> @param[in] N2 Last interate value.
!> @param[in] NPROCS Number of MPI tasks.
!> @param[in] IRANK My taks ID.
!> @param[out] ISTA First loop value.
!> @param[out] IEND Last loop value.
!>
!> ### Program History Log
!> Date | Programmer | Comments
!> -----|------------|---------
!> 2000-01-06 | Jim Tuccillo | Initial
!>
!> @author Jim Tuccillo IBM @date 2000-01-06
SUBROUTINE PARA_RANGE (N1,N2,NPROCS,IRANK,ISTA,IEND)

implicit none
Expand Down
Loading