Skip to content

Commit

Permalink
Update documentation for several UPP files (#696)
Browse files Browse the repository at this point in the history
* update upp_math to remove warnings

* document members of kinds_mod.F

* document members/return vals for native_endianness.f

* basic documentation of GFIP3.f to remove warnings

* silence warnings for CTLBLK.f

* eliminate warnings for GET_BITS.f

* switch SURFCE.f comments to fortran & silence warnings

* silence warnings for FRZLVL.f and FRZLVL2.f

* silence warnings on SMOOTH.f

* silence warnings on SELECT_CHANNELS.f

* silence warnings on SCLFLD.f

* silence warnings for retrieve_index.f

* silence warnings on PARA_RANGE.f

* silence warnings on GFSPOST.F

* silence warnings on LFMFLD.f

* silence warnings on FILL_PSETFLD.f

* silence warnings on EXCH_c_float.f

* silence warnings on DEWPOINT.f

* update MDL2THANDPV.f

* updates to UPP_MATH.f and MDL2THANDPV.f

* update kinds_mod.F

* update native_endianness.f

* silence warnings on UPP_PHYSICS.f

* update MDL2STD_P.f

* update GET_BITS.f

* supress GFIP3.f warnings; update var defs

* update var defs in GFIP3.f

* update kinds_mod.F

* update kinds_mod.F

* update retrieve_index.f

* update GFIP3.f

* update SMOOTH.f

* update SMOOTH.f

* update native_endianness.f

* silence warnings on LFMFLD_GFS.f; correct copy-paste errors

* update omega in GFSPOST.F

* update omega units in GFSPOST.F

---------

Co-authored-by: gspetro <gillian.s.petro@gmail.com>
  • Loading branch information
gspetro-NOAA and gspetro authored Apr 26, 2023
1 parent 7e58735 commit a5078ea
Show file tree
Hide file tree
Showing 23 changed files with 497 additions and 173 deletions.
10 changes: 8 additions & 2 deletions sorc/ncep_post.fd/CTLBLK.f
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ module CTLBLK_mod
! 2011-02 Jun Wang - ADD variables for grib2
! 2011-12-14 SARAH LU - ADD AER FILENAME
! 2011-12-23 SARAH LU - ADD NBIN FOR DU, SS, OC, BC, SU
! 2021-09-30 JESSE MENG- 2D DECOMPOSITION
! 2022-09-22 Li(Kate) Zhang- Add option for NASA GOCART as "nasa_on", add NBIN for NO3 and NH4
! 2021-09-30 JESSE MENG - 2D DECOMPOSITION
! 2022-09-22 Li(Kate) Zhang - Add option for NASA GOCART as "nasa_on", add NBIN for NO3 and NH4
! 2022-11-08 Kai Wang - Replace aqfcmaq_on with aqf_on
! 2023-01-24 Sam Trahan - IFI flight levels, runtime of IFI, and record of the bucket time
! 2023-03-21 Jesse Meng - Add slrutah_on option to use U Utah SLR
Expand All @@ -22,10 +22,16 @@ module CTLBLK_mod
implicit none
!
type field_info
!> ifld @memberof CTLBLK_mod
integer ifld
!> lvl @memberof CTLBLK_mod
integer lvl
!> lvl1 @memberof CTLBLK_mod
!> lvl2 @memberof CTLBLK_mod
integer lvl1,lvl2
!> ntrange @memberof CTLBLK_mod
integer ntrange
!> tinvstat @memberof CTLBLK_mod
integer tinvstat
end type
integer, parameter :: komax=70
Expand Down
7 changes: 7 additions & 0 deletions sorc/ncep_post.fd/DEWPOINT.f
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@
!> 2021-10-31 | J Meng | 2D Decomposition
!>
!> @author Jim Tuccillo W/NP2 @date 1990-05-19
!--------------------------------------------------------------------------
!> DEWPOINT() Subroutine that computes dewpoints from vapor pressure.
!> It computes the dewpoints for the N values of vapor pressure in array VP.
!>
!> @param[in] VP Array of N vapor pressures(centibars).
!> @param[out] TD Dewpoint in degrees absolute.
!--------------------------------------------------------------------------
SUBROUTINE DEWPOINT( VP, TD)

use ctlblk_mod, only: jsta, jend, im, spval, ista, iend
Expand Down
7 changes: 7 additions & 0 deletions sorc/ncep_post.fd/EXCH_c_float.f
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
!> makefile (Tuccillo, personal communication; Ferrier, Feb '02).
!>
!> @author Jim Tuccillo IBM @date 2000-01-06
!--------------------------------------------------------------------------
!> EXCH_c_float Subroutines that exchange one halo row.
!>
!> @param[inout] A
!> @note As input, A is the array that will have halos exchanged. As output,
!> A is the array with halos exchanged.
!--------------------------------------------------------------------------
SUBROUTINE EXCH_c_float(A)

use ctlblk_mod, only: num_procs, jend, iup, jsta, idn, mpi_comm_comp, im,&
Expand Down
12 changes: 10 additions & 2 deletions sorc/ncep_post.fd/FILL_PSETFLD.f
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
!> as parameter name, level type etc from post available field
!> table.
!>
!> @param[in] param_ofld output field.
!> @param[inout] param_ofld output field.
!> @param[in] param_afld available field in post.
!> @param[out] param_ofld output field.
!>
!> ### Program History Log
!> Date | Programmer | Comments
Expand All @@ -17,6 +16,15 @@
!> 2015-03-10 | Lin Gan | Using flat file data
!>
!> @author J. Wang NCEP/EMC @date 2012-01-27
!-----------------------------------------------------------------------
!> fill_psetfld() reads post xml control file.
!> This routine sets the output field GRIB2 information such
!> as parameter name, level type etc from post available field
!> table.
!>
!> @param[inout] param_ofld output field.
!> @param[in] param_afld available field in post.
!>
subroutine fill_psetfld(param_ofld,param_afld)
!

Expand Down
7 changes: 7 additions & 0 deletions sorc/ncep_post.fd/FRZLVL.f
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@
!> 2021-10-15 |JESSE MENG | 2D DECOMPOSITION
!>
!> @author Russ Treadon W/NP2 @date 1992-12-22
!-----------------------------------------------------------------------------
!> FRZLVL() Subroutine that computes FRZING LVL, Z and RH.
!>
!> @param[out] ZFRZ real Above ground level freezing height.
!> @param[out] RHFRZ real Relative humidity at freezing level.
!> @param[out] PFRZL real Pressure at freezing level.
!>
SUBROUTINE FRZLVL(ZFRZ,RHFRZ,PFRZL)

!
Expand Down
9 changes: 9 additions & 0 deletions sorc/ncep_post.fd/FRZLVL2.f
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@
!> 2021-07-28 | W. Meng | Restrict compuatation from undefined grids
!>
!> @author Russ Treadon W/NP2 @date 1992-12-22
!-------------------------------------------------------------------------------
!> Subroutine that computes FRZING LVL, Z and RH.
!>
!> @param[in] ISOTHERM real Isothermal value of height to be output.
!> @param[out] ZFRZ real Above ground level/ZFL at isotherm height.
!> @param[out] RHFRZ real Relative humidity at isotherm level.
!> @param[out] PFRZL real Pressure at isotherm level.
!>

SUBROUTINE FRZLVL2(ISOTHERM,ZFRZ,RHFRZ,PFRZL)

!
Expand Down
20 changes: 17 additions & 3 deletions sorc/ncep_post.fd/GET_BITS.f
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@
!> 1995-04-14 | Baldwin | Modify following Keith Brill's code to use sig digits to compute DEC scale
!>
!> @author Iredell W/NP23 @date 1992-10-31
!-----------------------------------------------------------------------
!> get_bits() computes number of bits and round field.
!>
!> @param[in] IBM integer bitmap flag (=0 for no bitmap).
!> @param[in] SGDS real Maximum significant digits to keep.
!> @param[in] LEN integer Length of the field and bitmap.
!> @param[in] MG integer (LEN) Bitmap if IBM=1 (0 to skip, 1 tp keep).
!> @param[in] G real (LEN) Field.
!> @param[inout] ISCALE integer Decimal scaling.
!> @param[inout] GROUND real (LEN) Field rounded to decimal scaling.
!> @param[out] GMIN real Minimum valid rounded field value.
!> @param[out] GMAX real Maximum valid rounded field value.
!> @param[inout] NBIT integer Number of bits to pack.
!>
SUBROUTINE GET_BITS(IBM,SGDS,LEN,MG,G,ISCALE,GROUND, &
GMIN,GMAX,NBIT)
Expand Down Expand Up @@ -96,10 +110,10 @@ SUBROUTINE GET_BITS(IBM,SGDS,LEN,MG,G,ISCALE,GROUND, &
!>
!> Note that a fractional number of significant digits is allowed.
!>
!> @param[in] AMIN Real Minimum value.
!> @param[in] AMAX Real Maximum value.
!> @param[in] RMIN Real Minimum value.
!> @param[in] RMAX Real Maximum value.
!> @param[in] RDB Real Maximum # of significant digits OR binary precision if < 0.
!> @param[out] NBITS Integer Number of bits for packing.
!> @param[out] NMBTS Integer Number of bits for packing.
!> @param[out] ISCALE Integer Power of 10 scaling to use.
!> @param[out] IRET Integer Return code. 0 = normal return.
!>
Expand Down
Loading

0 comments on commit a5078ea

Please sign in to comment.