From 7b3e5666cb42fc1d4958389796c95c9e8fcbc7da Mon Sep 17 00:00:00 2001 From: kayee Date: Wed, 6 Apr 2022 01:18:04 -0600 Subject: [PATCH 1/5] This is part of Issue #392. Fixes the doxygen warnings in INITPOST.F, INITPOST_GFS_NEMS_MPIIO, INITPOST_NEMS.f and INITPOST_NETCDF.f. --- sorc/ncep_post.fd/INITPOST.F | 62 ++++++------------ sorc/ncep_post.fd/INITPOST_GFS_NEMS_MPIIO.f | 72 +++++++-------------- sorc/ncep_post.fd/INITPOST_NEMS.f | 51 +++++---------- sorc/ncep_post.fd/INITPOST_NETCDF.f | 54 +++++----------- 4 files changed, 77 insertions(+), 162 deletions(-) diff --git a/sorc/ncep_post.fd/INITPOST.F b/sorc/ncep_post.fd/INITPOST.F index 87cd31af5..7dfaa32d0 100644 --- a/sorc/ncep_post.fd/INITPOST.F +++ b/sorc/ncep_post.fd/INITPOST.F @@ -1,46 +1,24 @@ !> @file -! -!> SUBPROGRAM: INITPOST INITIALIZE POST FOR RUN -!! PRGRMMR: RUSS TREADON ORG: W/NP2 DATE: 93-11-10 -!! -!! ABSTRACT: THIS ROUTINE INITIALIZES CONSTANTS AND -!! VARIABLES AT THE START OF AN ETA MODEL OR POST -!! PROCESSOR RUN. -!! -!! THIS ROUTINE ASSUMES THAT INTEGERS AND REALS ARE THE SAME SIZE -!! -!! PROGRAM HISTORY LOG: -!! 93-11-10 RUSS TREADON - ADDED DOCBLOC -!! 98-05-29 BLACK - CONVERSION OF POST CODE FROM 1-D TO 2-D -!! 99-01 20 TUCCILLO - MPI VERSION -!! 01-10-25 H CHUANG - MODIFIED TO PROCESS HYBRID MODEL OUTPUT -!! 02-06-19 MIKE BALDWIN - WRF VERSION -!! 02-08-15 H CHUANG - UNIT CORRECTION AND GENERALIZE PROJECTION OPTIONS -!! 21-03-11 Bo Cui - change local arrays to dimension (im,jsta:jend) -!! -!! USAGE: CALL INIT -!! INPUT ARGUMENT LIST: -!! NONE -!! -!! OUTPUT ARGUMENT LIST: -!! NONE -!! -!! OUTPUT FILES: -!! NONE -!! -!! SUBPROGRAMS CALLED: -!! UTILITIES: -!! NONE -!! LIBRARY: -!! COMMON - CTLBLK -!! LOOKUP -!! SOILDEPTH -!! -!! -!! ATTRIBUTES: -!! LANGUAGE: FORTRAN -!! MACHINE : CRAY C-90 -!! +!> @brief INITPOST initializes post for run. +!> +!> This routine initializes constants and +!> variables at the start of an ETA model or post +!> processor run. +!> +!> This routine assumes that integers and reals are the same size. +!> +!> ### Program History Log +!> Date | Programmer | Comments +!> -----|------------|--------- +!> 1993-11-10 | Russ Treadon | Initial. Added DOCBLOC +!> 1998-05-29 | T Black | Conversion from 1-D to 2-D +!> 1999-01-20 | Jim Tuccillo | MPI Version +!> 2001-10-25 | H CHuang | Modified to process hybrid model output +!> 2002-06-19 | Mike Baldwin | WRF Version +!> 2002-08-15 | H CHuang | Unit correction and generalize projection options +!> 2021-03-11 | Bo Cui | Change local arrays to dimension (im,jsta:jend) +!> +!> @author Russ Treadon W/NP2 @date 1993-11-10 SUBROUTINE INITPOST use vrbls4d, only: dust, smoke diff --git a/sorc/ncep_post.fd/INITPOST_GFS_NEMS_MPIIO.f b/sorc/ncep_post.fd/INITPOST_GFS_NEMS_MPIIO.f index 4714cfc3d..95fc1be5b 100644 --- a/sorc/ncep_post.fd/INITPOST_GFS_NEMS_MPIIO.f +++ b/sorc/ncep_post.fd/INITPOST_GFS_NEMS_MPIIO.f @@ -1,51 +1,29 @@ !> @file -! . . . -!> SUBPROGRAM: INITPOST_GFS_NEMS_MPIIO INITIALIZE POST FOR RUN -!! PRGRMMR: Hui-Ya Chuang DATE: 2016-03-04 -!! -!! ABSTRACT: THIS ROUTINE INITIALIZES CONSTANTS AND -!! VARIABLES AT THE START OF GFS MODEL OR POST -!! PROCESSOR RUN. -!! -!! REVISION HISTORY -!! 2011-02-07 Jun Wang add grib2 option -!! 2011-12-14 Sarah Lu add aer option -!! 2012-01-07 Sarah Lu compute air density -!! 2012-12-22 Sarah Lu add aerosol zerout option -!! 2015-03-16 S. Moorthi adding gocart_on option -!! 2015-03-18 S. Moorthi Optimization including threading -!! 2015-08-17 S. Moorthi Add TKE for NEMS/GSM -!! 2016-03-04 H CHUANG Add MPI IO option to read GFS nems output -!! 2016-05-16 S. KAR Add computation of omega -!! 2016-07-21 S. Moorthi Convert input upper air data from reduced to full grid -!! and reduce memory in divergence calculatiom -!! 2016-07-21 Jun Wang change averaged field name with suffix -!! 2019-07-24 Li(Kate) Zhang - Merge and update NGAC UPP into FV3-Chem -!! 2021-03-11 Bo Cui change local arrays to dimension (im,jsta:jend) -!! -!! USAGE: CALL INIT -!! INPUT ARGUMENT LIST: -!! NONE -!! -!! OUTPUT ARGUMENT LIST: -!! NONE -!! -!! OUTPUT FILES: -!! NONE -!! -!! SUBPROGRAMS CALLED: -!! UTILITIES: -!! NONE -!! LIBRARY: -!! COMMON - CTLBLK -!! LOOKUP -!! SOILDEPTH -!! -!! -!! ATTRIBUTES: -!! LANGUAGE: FORTRAN -!! MACHINE : CRAY C-90 -!! +!> @brief INITPOST_GFS_NEMS_MPIIO initializes post for run. +!> +!> This routine initializes constants and +!> variables at the start of GFS model or post +!> processor run. +!> +!> ### Program History Log +!> Date | Programmer | Comments +!> -----|------------|--------- +!> 2007-03-04 | Hui-Ya Chuang | Initial +!> 2011-02-07 | Jun Wang | Add grib2 option +!> 2011-12-14 | Sarah Lu | Add aer option +!> 2012-01-07 | Sarah Lu | Compute air density +!> 2012-12-22 | Sarah Lu | Add aerosol zerout option +!> 2015-03-16 | S. Moorthi | Adding gocart_on option +!> 2015-03-18 | S. Moorthi | Optimization including threading +!> 2015-08-17 | S. Moorthi | Add TKE for NEMS/GSM +!> 2016-03-04 | H Chuang | Add MPI IO option to read GFS nems output +!> 2016-05-16 | S. Kar | Add computation of omega +!> 2016-07-21 | S. Moorthi | Convert input upper air data from reduced to full grid and reduce memory in divergence calculatiom +!> 2016-07-21 | Jun Wang | Change averaged field name with suffix +!> 2019-07-24 | Li(Kate) Zhang | Merge and update NGAC UPP into FV3-Chem +!> 2021-03-11 | Bo Cui | Change local arrays to dimension (im,jsta:jend) +!> +!> @author Hui-Ya Chuang @date 2007-03-04 SUBROUTINE INITPOST_GFS_NEMS_MPIIO(iostatusAER) diff --git a/sorc/ncep_post.fd/INITPOST_NEMS.f b/sorc/ncep_post.fd/INITPOST_NEMS.f index 39459701f..d11f6b7b8 100644 --- a/sorc/ncep_post.fd/INITPOST_NEMS.f +++ b/sorc/ncep_post.fd/INITPOST_NEMS.f @@ -1,39 +1,20 @@ !> @file -! . . . -!> SUBPROGRAM: INITPOST INITIALIZE POST FOR RUN -!! PRGRMMR: Hui-Ya Chuang DATE: 2008-03-26 -!! -!! ABSTRACT: THIS ROUTINE INITIALIZES CONSTANTS AND -!! VARIABLES AT THE START OF AN NEMS MODEL OR POST -!! PROCESSOR RUN. -!! -!! REVISION HISTORY -!! 21-03-11 Bo Cui - change local arrays to dimension (im,jsta:jend) -!! -!! USAGE: CALL INITPOST_NEMS -!! INPUT ARGUMENT LIST: -!! NREC -!! NFILE -!! -!! OUTPUT ARGUMENT LIST: -!! NONE -!! -!! OUTPUT FILES: -!! NONE -!! -!! SUBPROGRAMS CALLED: -!! UTILITIES: -!! NONE -!! LIBRARY: -!! COMMON - CTLBLK -!! LOOKUP -!! SOILDEPTH -!! -!! -!! ATTRIBUTES: -!! LANGUAGE: FORTRAN -!! MACHINE : CRAY C-90 -!! +!> @brief INITPOST_NEMS initializes post for run. +!> +!> This routine initializes constants and +!> variables at the start of an NEMS model or post +!> processor run. +!> +!> @param[in] NREC. +!> @param[in] NFILE. +!> +!> ### Program History Log +!> Date | Programmer | Comments +!> -----|------------|--------- +!> 2007-03-01 | Hui-Ya Chuang | Initial +!> 2021-03-11 | Bo Cui | Change local arrays to dimension (im,jsta:jend) +!> +!> @author Hui-Ya Chuang @date 2007-03-26 SUBROUTINE INITPOST_NEMS(NREC,nfile) use vrbls3d, only: t, q, uh, vh, q2, cwm, f_ice, f_rain, f_rimef, cfr, pint,& diff --git a/sorc/ncep_post.fd/INITPOST_NETCDF.f b/sorc/ncep_post.fd/INITPOST_NETCDF.f index f6739999d..9e4f2742b 100644 --- a/sorc/ncep_post.fd/INITPOST_NETCDF.f +++ b/sorc/ncep_post.fd/INITPOST_NETCDF.f @@ -1,42 +1,20 @@ !> @file -! . . . -!> SUBPROGRAM: INITPOST_NETCDF INITIALIZE POST FOR RUN -!! PRGRMMR: Hui-Ya Chuang DATE: 2016-03-04 -!! -!! ABSTRACT: THIS ROUTINE INITIALIZES CONSTANTS AND -!! VARIABLES AT THE START OF GFS MODEL OR POST -!! PROCESSOR RUN. -!! -!! REVISION HISTORY -!! 2017-08-11 H Chuang start from INITPOST_GFS_NEMS_MPIIO.f -!! 2021-03-11 Bo Cui change local arrays to dimension (im,jsta:jend) -!! 2022-02-07 Wen Meng Changes for parallel netcdf read. -!! 2022-03-15 Wen Meng Unify regional and global interfaces. -!! 2022-03-22 Wen Meng Read PWAT from model. -!! -!! USAGE: CALL INITPOST_NETCDF -!! INPUT ARGUMENT LIST: -!! NONE -!! -!! OUTPUT ARGUMENT LIST: -!! NONE -!! -!! OUTPUT FILES: -!! NONE -!! -!! SUBPROGRAMS CALLED: -!! UTILITIES: -!! NONE -!! LIBRARY: -!! COMMON - CTLBLK -!! LOOKUP -!! SOILDEPTH -!! -!! -!! ATTRIBUTES: -!! LANGUAGE: FORTRAN -!! MACHINE : CRAY C-90 -!! +!> INITPOST_NETCDF initializes post for run. +!> +!> This routine initializes constants and +!> variables at the start of GFS model or post +!> processor run. +!> +!> ### Program History Log +!> Date | Programmer | Comments +!> -----|------------|--------- +!> 2007-03-01 | Hui-Ya Chuang | Initial. Start from INITPOST_GFS_NEMS_MPIIO.f +!> 2021-03-11 | Bo Cui | Change local arrays to dimension (im,jsta:jend) +!> 2022-02-07 | Wen Meng | Changes for parallel netcdf read +!> 2022-03-15 | Wen Meng | Unify regional and global interfaces +!> 2022-03-22 | Wen Meng | Read PWAT from model +!> +!> @author Hui-Ya Chuang @date 2016-03-04 SUBROUTINE INITPOST_NETCDF(ncid2d,ncid3d) From edbf7faa34a179a6addbf166110818e5988e1f25 Mon Sep 17 00:00:00 2001 From: kayee Date: Wed, 6 Apr 2022 11:23:37 -0600 Subject: [PATCH 2/5] Minor fix. --- sorc/ncep_post.fd/INITPOST.F | 2 +- sorc/ncep_post.fd/INITPOST_GFS_NEMS_MPIIO.f | 2 +- sorc/ncep_post.fd/INITPOST_NEMS.f | 2 +- sorc/ncep_post.fd/INITPOST_NETCDF.f | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sorc/ncep_post.fd/INITPOST.F b/sorc/ncep_post.fd/INITPOST.F index 7dfaa32d0..d53e3be9b 100644 --- a/sorc/ncep_post.fd/INITPOST.F +++ b/sorc/ncep_post.fd/INITPOST.F @@ -1,5 +1,5 @@ !> @file -!> @brief INITPOST initializes post for run. +!> @brief initpost() initializes post for run. !> !> This routine initializes constants and !> variables at the start of an ETA model or post diff --git a/sorc/ncep_post.fd/INITPOST_GFS_NEMS_MPIIO.f b/sorc/ncep_post.fd/INITPOST_GFS_NEMS_MPIIO.f index 95fc1be5b..4fc8b1f5d 100644 --- a/sorc/ncep_post.fd/INITPOST_GFS_NEMS_MPIIO.f +++ b/sorc/ncep_post.fd/INITPOST_GFS_NEMS_MPIIO.f @@ -1,5 +1,5 @@ !> @file -!> @brief INITPOST_GFS_NEMS_MPIIO initializes post for run. +!> @brief initpost_gfs_nems_mpiio() initializes post for run. !> !> This routine initializes constants and !> variables at the start of GFS model or post diff --git a/sorc/ncep_post.fd/INITPOST_NEMS.f b/sorc/ncep_post.fd/INITPOST_NEMS.f index d11f6b7b8..700685d95 100644 --- a/sorc/ncep_post.fd/INITPOST_NEMS.f +++ b/sorc/ncep_post.fd/INITPOST_NEMS.f @@ -1,5 +1,5 @@ !> @file -!> @brief INITPOST_NEMS initializes post for run. +!> @brief initpost_nems() initializes post for run. !> !> This routine initializes constants and !> variables at the start of an NEMS model or post diff --git a/sorc/ncep_post.fd/INITPOST_NETCDF.f b/sorc/ncep_post.fd/INITPOST_NETCDF.f index 9e4f2742b..545436923 100644 --- a/sorc/ncep_post.fd/INITPOST_NETCDF.f +++ b/sorc/ncep_post.fd/INITPOST_NETCDF.f @@ -1,5 +1,5 @@ !> @file -!> INITPOST_NETCDF initializes post for run. +!> !brief initpost_netcdf() initializes post for run. !> !> This routine initializes constants and !> variables at the start of GFS model or post From eec7f14fc957378fa6a6e4ce393a79ba3db8092c Mon Sep 17 00:00:00 2001 From: kayee Date: Thu, 21 Apr 2022 14:05:53 -0600 Subject: [PATCH 3/5] Minor fix. --- sorc/ncep_post.fd/INITPOST_NETCDF.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/ncep_post.fd/INITPOST_NETCDF.f b/sorc/ncep_post.fd/INITPOST_NETCDF.f index 545436923..b6abb5d8d 100644 --- a/sorc/ncep_post.fd/INITPOST_NETCDF.f +++ b/sorc/ncep_post.fd/INITPOST_NETCDF.f @@ -1,5 +1,5 @@ !> @file -!> !brief initpost_netcdf() initializes post for run. +!> @brief initpost_netcdf() initializes post for run. !> !> This routine initializes constants and !> variables at the start of GFS model or post From 0f9c5cbdf3fc9fc4319517bb0336d575e253d5f5 Mon Sep 17 00:00:00 2001 From: kayee Date: Tue, 26 Apr 2022 13:29:03 -0600 Subject: [PATCH 4/5] Further refinement from Ed's comments. --- sorc/ncep_post.fd/INITPOST.F | 2 ++ sorc/ncep_post.fd/INITPOST_GFS_NEMS_MPIIO.f | 2 ++ sorc/ncep_post.fd/INITPOST_NEMS.f | 2 ++ sorc/ncep_post.fd/INITPOST_NETCDF.f | 4 +++- 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/sorc/ncep_post.fd/INITPOST.F b/sorc/ncep_post.fd/INITPOST.F index d53e3be9b..5e74564ab 100644 --- a/sorc/ncep_post.fd/INITPOST.F +++ b/sorc/ncep_post.fd/INITPOST.F @@ -1,6 +1,8 @@ !> @file !> @brief initpost() initializes post for run. !> +!> @author Russ Treadon W/NP2 @date 1993-11-10 + !> This routine initializes constants and !> variables at the start of an ETA model or post !> processor run. diff --git a/sorc/ncep_post.fd/INITPOST_GFS_NEMS_MPIIO.f b/sorc/ncep_post.fd/INITPOST_GFS_NEMS_MPIIO.f index 4fc8b1f5d..0d9b4da88 100644 --- a/sorc/ncep_post.fd/INITPOST_GFS_NEMS_MPIIO.f +++ b/sorc/ncep_post.fd/INITPOST_GFS_NEMS_MPIIO.f @@ -1,6 +1,8 @@ !> @file !> @brief initpost_gfs_nems_mpiio() initializes post for run. !> +!> @author Hui-Ya Chuang @date 2007-03-04 + !> This routine initializes constants and !> variables at the start of GFS model or post !> processor run. diff --git a/sorc/ncep_post.fd/INITPOST_NEMS.f b/sorc/ncep_post.fd/INITPOST_NEMS.f index 700685d95..a88dfa3d6 100644 --- a/sorc/ncep_post.fd/INITPOST_NEMS.f +++ b/sorc/ncep_post.fd/INITPOST_NEMS.f @@ -1,6 +1,8 @@ !> @file !> @brief initpost_nems() initializes post for run. !> +!> @author Hui-Ya Chuang @date 2007-03-26 + !> This routine initializes constants and !> variables at the start of an NEMS model or post !> processor run. diff --git a/sorc/ncep_post.fd/INITPOST_NETCDF.f b/sorc/ncep_post.fd/INITPOST_NETCDF.f index b6abb5d8d..65d5502ab 100644 --- a/sorc/ncep_post.fd/INITPOST_NETCDF.f +++ b/sorc/ncep_post.fd/INITPOST_NETCDF.f @@ -1,6 +1,8 @@ !> @file -!> @brief initpost_netcdf() initializes post for run. +!> !brief initpost_netcdf() initializes post for run. !> +!> @author Hui-Ya Chuang @date 2016-03-04 + !> This routine initializes constants and !> variables at the start of GFS model or post !> processor run. From 4c553fc910f7f27c21c39e99e59060347869ae5b Mon Sep 17 00:00:00 2001 From: kayee Date: Tue, 26 Apr 2022 13:58:42 -0600 Subject: [PATCH 5/5] Minor bug fix. --- sorc/ncep_post.fd/INITPOST_NETCDF.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/ncep_post.fd/INITPOST_NETCDF.f b/sorc/ncep_post.fd/INITPOST_NETCDF.f index 65d5502ab..c7a7a2a3a 100644 --- a/sorc/ncep_post.fd/INITPOST_NETCDF.f +++ b/sorc/ncep_post.fd/INITPOST_NETCDF.f @@ -1,5 +1,5 @@ !> @file -!> !brief initpost_netcdf() initializes post for run. +!> @brief initpost_netcdf() initializes post for run. !> !> @author Hui-Ya Chuang @date 2016-03-04