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

Add doxygen comments to chgres_cube. #239

Merged
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
49 changes: 20 additions & 29 deletions sorc/chgres_cube.fd/atmosphere.F90
Original file line number Diff line number Diff line change
@@ -1,30 +1,22 @@
!> @file
!! @brief Process atmospheric fields
!!
!! @author gayno NCEP/EMC
!!
!! Process atmospheric fields: Horizontally interpolate input
!! fields to the target grid. Adjust surface pressure according to
!! terrain difference between input and target grids. Vertically
!! interpolate to target grid vertical levels. Processing based on
!! the spectral GFS version of CHGRES.
!!
!! Variables defined below. Here "b4adj" indicates fields on the target
!! grid before vertical adjustment. "target" indicates data on target
!! grid. "input" indicates data on input grid. "_s" indicates fields
!! on the 'south' edge of the grid box. "_w" indicate fields on the
!! 'west' edge of the grid box. Otherwise, fields are at the center
!! of the grid box.
module atmosphere

!--------------------------------------------------------------------------
! Module atmosphere
!
! Abstract: Process atmospheric fields: Horizontally interpolate input
! fields to the target grid. Adjust surface pressure according to
! terrain difference between input and target grids. Vertically
! interpolate to target grid vertical levels. Processing based on
! the spectral GFS version of CHGRES.
!
! Public Subroutines:
! -------------------
! atmosphere driver Driver routine for processing atmospheric
! fields
!
! Public variables:
! -----------------
! Variables defined below. Here "b4adj" indicates fields on the target
! grid before vertical adjustment. "target" indicates data on target
! grid. "input" indicates data on input grid. "_s" indicates fields
! on the 'south' edge of the grid box. "_w" indicate fields on the
! 'west' edge of the grid box. Otherwise, fields are at the center
! of the grid box.
!
!--------------------------------------------------------------------------

use esmf

use input_data, only : lev_input, &
Expand Down Expand Up @@ -138,10 +130,9 @@ module atmosphere

contains

!-----------------------------------------------------------------------------------
! Driver routine for atmospheric fields.
!-----------------------------------------------------------------------------------

!> @brief
!! Driver routine for atmospheric fields.
!!
subroutine atmosphere_driver(localpet)

use mpi
Expand Down
18 changes: 9 additions & 9 deletions sorc/chgres_cube.fd/chgres.F90
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
!> @file
!! @brief Initialize an FV3 model run.
!!
!! Program CHGRES_CUBE
!!
!! Initialize an FV3 run using history or restart data from
!! another FV3 run, the spectral GFS, and a few other models.
!! Converts atmospheric, surface and nst data.
!!
program chgres

!-------------------------------------------------------------------------
! Program CHGRES
!
! Abstract: Initialize an FV3 run using history or restart data from
! another FV3 run, or the NEMS version of the spectral GFS.
! Converts atmospheric, surface and nst data.
!
!-------------------------------------------------------------------------

use mpi
use esmf

Expand Down
10 changes: 3 additions & 7 deletions sorc/chgres_cube.fd/grib2_util.F90
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
!> @file
!! @brief Utilities for use when reading grib2 data.
!!
module grib2_util

!--------------------------------------------------------------------------
! Module: grib2_util
!
! Abstract: Utilities for use when reading grib2 data.
!
!--------------------------------------------------------------------------

use esmf

use model_grid, only : i_input, j_input
Expand Down
67 changes: 31 additions & 36 deletions sorc/chgres_cube.fd/input_data.F90
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
!> @file
!! @brief Read input data
!! @author gayno NCEP/EMC
!!
!! Read atmospheric, surface and nst data on the input grid.
!! Supported formats include fv3 tiled 'restart' files, fv3 tiled
!! 'history' files, fv3 gaussian history files, spectral gfs
!! gaussian nemsio files, and spectral gfs sigio/sfcio files.
!!
!! Public variables are defined below: "input" indicates field
!! associated with the input grid.
!!
module input_data

!--------------------------------------------------------------------------
! Module input_data
!
! Abstract: Read atmospheric, surface and nst data on the input grid.
! Supported formats include fv3 tiled 'restart' files, fv3 tiled
! 'history' files, fv3 gaussian history files, spectral gfs
! gaussian nemsio files, and spectral gfs sigio/sfcio files.
!
! Public Subroutines:
! -----------------
! read_input_atm_data Driver routine to read atmospheric data
! cleanup_input_atm_data Free up memory associated with atm data
! read_input_sfc_data Driver routine to read surface data
! cleanup_input_sfc_data Free up memory associated with sfc data
! read_input_nst_data Driver routine to read nst data
! cleanup_input_nst_data Free up memory associated with nst data
!
! Public variables:
! -----------------
! Defined below. "input" indicates field associated with the input grid.
!
!--------------------------------------------------------------------------

use esmf
use netcdf
use nemsio_module
Expand Down Expand Up @@ -52,7 +41,7 @@ module input_data
num_tiles_input_grid, &
latitude_input_grid, &
longitude_input_grid, &
inv_file!, the_file_hrrr
inv_file

implicit none

Expand Down Expand Up @@ -143,10 +132,9 @@ module input_data

contains

!---------------------------------------------------------------------------
! Read input grid atmospheric data driver
!---------------------------------------------------------------------------

!> @brief
!! Read input grid atmospheric data driver
!!
subroutine read_input_atm_data(localpet)

implicit none
Expand Down Expand Up @@ -213,10 +201,9 @@ subroutine read_input_atm_data(localpet)

end subroutine read_input_atm_data

!---------------------------------------------------------------------------
! Read input grid nst data driver
!---------------------------------------------------------------------------

!> @brief
!! Driver to read input grid nst data.
!!
subroutine read_input_nst_data(localpet)

implicit none
Expand Down Expand Up @@ -375,10 +362,9 @@ subroutine read_input_nst_data(localpet)

end subroutine read_input_nst_data

!---------------------------------------------------------------------------
! Read input grid surface data driver.
!---------------------------------------------------------------------------

!> @brief
!! Driver to read input grid surface data.
!!
subroutine read_input_sfc_data(localpet)

implicit none
Expand Down Expand Up @@ -6428,6 +6414,9 @@ subroutine read_grib_soil(the_file,inv_file,vname,vname_file,dummy3d,rc)

end subroutine read_grib_soil

!> @brief
!! Free up memory associated with atm data
!!
subroutine cleanup_input_atm_data

implicit none
Expand All @@ -6450,6 +6439,9 @@ subroutine cleanup_input_atm_data

end subroutine cleanup_input_atm_data

!> @brief
!! Free up memory associated with nst data
!!
subroutine cleanup_input_nst_data

implicit none
Expand Down Expand Up @@ -6480,6 +6472,9 @@ subroutine cleanup_input_nst_data

end subroutine cleanup_input_nst_data

!> @brief
!! Free up memory associated with sfc data
!!
subroutine cleanup_input_sfc_data

implicit none
Expand Down
Loading