Skip to content

Commit

Permalink
Update documentation in module_write_internal_state.F90 and module_wr…
Browse files Browse the repository at this point in the history
…ite_netcdf.F90
  • Loading branch information
DusanJovic-NOAA committed Jan 17, 2024
1 parent 92ba266 commit c1e16a2
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 69 deletions.
90 changes: 45 additions & 45 deletions io/module_write_internal_state.F90
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
!> @file
!> @brief The internal state of the write component.
!> @author Jun Wang @date Feb, 2017
!> @author Jun Wang @date Feb, 2017

!> @brief The internal state of the write component.
!> @author Jun Wang @date Feb, 2017
!> @author Jun Wang @date Feb, 2017
module write_internal_state
use esmf
!
Expand All @@ -14,27 +14,27 @@ module write_internal_state
!-----------------------------------------------------------------------
!
type output_grid_info
integer :: im !< ???
integer :: jm !< ???
integer :: lm !< ???
integer :: i_start !< ???
integer :: i_end !< ???
integer :: j_start !< ???
integer :: j_end !< ???
real,dimension(:,:),allocatable :: lonPtr !< ???
real,dimension(:,:),allocatable :: latPtr !< ???
integer,dimension(:),allocatable :: i_start_wrtgrp !< ???
integer,dimension(:),allocatable :: i_end_wrtgrp !< ???
integer,dimension(:),allocatable :: j_start_wrtgrp !< ???
integer,dimension(:),allocatable :: j_end_wrtgrp !< ???
real :: latse !< ???
real :: latnw !< ???
real :: lonse !< ???
real :: lonnw !< ???
real :: latstart !< ???
real :: latlast !< ???
real :: lonstart !< ???
real :: lonlast !< ???
integer :: im !< output grid global I dimension size
integer :: jm !< output grid global J dimension size
integer :: lm !< output grid global L dimension size
integer :: i_start !< output grid lower bound of I dimension on current PE
integer :: i_end !< output grid upper bound of I dimension on current PE
integer :: j_start !< output grid lower bound of J dimension on current PE
integer :: j_end !< output grid upper bound of J dimension on current PE
real,dimension(:,:),allocatable :: lonPtr !< output grid longitudes
real,dimension(:,:),allocatable :: latPtr !< output grid latitudes
integer,dimension(:),allocatable :: i_start_wrtgrp !< I dimension lower bound of all wrire groups
integer,dimension(:),allocatable :: i_end_wrtgrp !< I dimension upper bound of all wrire groups
integer,dimension(:),allocatable :: j_start_wrtgrp !< J dimension lower bound of all wrire groups
integer,dimension(:),allocatable :: j_end_wrtgrp !< J dimension upper bound of all wrire groups
real :: latse !< output grid South East corner latitude
real :: latnw !< output grid North West corner latitude
real :: lonse !< output grid South East corner longitude
real :: lonnw !< output grid North West corner longitude
real :: latstart !< output grid start latitude
real :: latlast !< output grid last latitude
real :: lonstart !< output grid start logitude
real :: lonlast !< output grid last longitude
end type output_grid_info

type wrt_internal_state
Expand All @@ -43,62 +43,62 @@ module write_internal_state
! pe information and task layout
!--------------------------------
!
integer :: mype !< ???
integer :: mype !< MPI rank
integer :: petcount !< Number of PEs.
!
!--------------------
!*** grid information
!--------------------
type(esmf_grid) :: wrtgrid !< ???
type(esmf_grid) :: wrtgrid !< ESMF output grid

type(output_grid_info) ,dimension(:), allocatable :: out_grid_info !< ???
type(output_grid_info) ,dimension(:), allocatable :: out_grid_info !< Array of output_grid_info for all domains
!
!--------------------------
!*** file bundle for output
!--------------------------
integer :: FBCount !< ???
integer :: FBCount !< Numebr of output ESMF field bundles
!
!-----------------------------------------------------------------------
!*** THE OUTPUT FILE
!-----------------------------------------------------------------------
!
integer :: num_files !< ???
integer :: num_files !< number of output files
!
!-----------------------------------------------------------------------
!*** THE OUTPUT FILE
!-----------------------------------------------------------------------
!
type(ESMF_FieldBundle),dimension(:),allocatable :: wrtFB !< ???
type(ESMF_FieldBundle),dimension(:),allocatable :: wrtFB !< ESMF write field bundles
!
!-------------------------------------
!*** Times used in history filenames
!-------------------------------------
!
type(ESMF_Time) :: io_basetime !< ???
integer :: idate(7) !< ???
integer :: fdate(7) !< ???
type(ESMF_Time) :: io_basetime !< ESMF clock's starting time
integer :: idate(7) !< Forecast initial time
integer :: fdate(7) !< Forecast current time
!
!-----------------------------------------
!*** I/O direction flags (Read or Write)
!-----------------------------------------
!
logical :: output_history !< ???
logical :: output_history !< True if history output is requested
!
!-----------------------------------------
!*** POST flags and required variables
!-----------------------------------------
!
logical :: write_dopost !< ???
character(80) :: post_namelist !< ???
!
integer :: fhzero !< ???
integer :: ntrac !< ???
integer :: ncld !< ???
integer :: nsoil !< ???
integer :: imp_physics !< ???
integer :: dtp !< ???
real,dimension(:),allocatable :: ak !< ???
real,dimension(:),allocatable :: bk !< ???
logical :: write_dopost !< True if inline post is requested
character(80) :: post_namelist !< filename of the inline post namelist
!
integer :: fhzero !< hours between clearing of diagnostic buckets
integer :: ntrac !< number of tracers
integer :: ncld !< number of hydrometeors
integer :: nsoil !< number of soil layers
integer :: imp_physics !< choice of microphysics scheme
integer :: dtp !< physics timestep
real,dimension(:),allocatable :: ak !< a parameter for sigma pressure level calculations
real,dimension(:),allocatable :: bk !< b parameter for sigma pressure level calculations
!-----------------------------------------------------------------------
!
end type wrt_internal_state
Expand All @@ -109,7 +109,7 @@ module write_internal_state
!-----------------------------------------------------------
!
type write_wrap
type(wrt_internal_state),pointer :: write_int_state !< ???
type(wrt_internal_state),pointer :: write_int_state !< Write grid component internal state
end type write_wrap

!-----------------------------------------------------------
Expand Down
48 changes: 24 additions & 24 deletions io/module_write_netcdf.F90
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
!> @file
!> @brief ???
!> @author Dusan Jovic @date Nov 1, 2017
!> @brief Module containing history files output routines
!> @author Dusan Jovic @date Nov 1, 2017

!> Return error to ESMF and finalize it.
!> Return error to ESMF and finalize it.
#define ESMF_ERR_RETURN(rc) \
if (ESMF_LogFoundError(rc, msg="Breaking out of subroutine", line=__LINE__, file=__FILE__)) call ESMF_Finalize(endflag=ESMF_END_ABORT)

!> Return error to ESMF and finalize it.
!> Return error to ESMF and finalize it.
#define NC_ERR_STOP(status) \
if (status /= nf90_noerr) write(0,*) "file: ", __FILE__, " line: ", __LINE__, trim(nf90_strerror(status)); \
if (status /= nf90_noerr) call ESMF_Finalize(endflag=ESMF_END_ABORT)

!> @brief ???
!> @brief Module containing history files output routines
!>
!> @author Dusan Jovic @date Nov 1, 2017
!> @author Dusan Jovic @date Nov 1, 2017
module module_write_netcdf

use mpi
Expand All @@ -28,21 +28,21 @@ module module_write_netcdf
private
public write_netcdf

logical :: par !< ???
logical :: par !< True if parallel I/O should be used.

contains

!> Write netCDF file.
!>
!> @param[in] wrtfb ???
!> @param[in] wrtfb ESMF write field bundle
!> @param[in] filename NetCDF filename.
!> @param[in] use_parallel_netcdf True if parallel I/O should be used.
!> @param[in] mpi_comm MPI communicator for parallel I/O.
!> @param[in] mype ???
!> @param[in] grid_id ???
!> @param[out] rc Return code: ???
!> @param[in] mype MPI rank
!> @param[in] grid_id Output grid identifier
!> @param[out] rc Return code: return code
!>
!> @author Dusan Jovic @date Nov 1, 2017
!> @author Dusan Jovic @date Nov 1, 2017
subroutine write_netcdf(wrtfb, filename, &
use_parallel_netcdf, mpi_comm, mype, &
grid_id, rc)
Expand Down Expand Up @@ -737,12 +737,12 @@ end subroutine write_netcdf

!> Get global attribute.
!>
!> @param[in] fldbundle ???
!> @param[in] fldbundle ESMF field bundle
!> @param[in] ncid NetCDF file ID.
!> @param[in] mype ???
!> @param[out] rc Return code: ???
!> @param[in] mype MPI rank
!> @param[out] rc Return code: return code
!>
!> @author Dusan Jovic @date Nov 1, 2017
!> @author Dusan Jovic @date Nov 1, 2017
subroutine get_global_attr(fldbundle, ncid, mype, rc)
type(ESMF_FieldBundle), intent(in) :: fldbundle
integer, intent(in) :: ncid
Expand Down Expand Up @@ -813,13 +813,13 @@ end subroutine get_global_attr

!> Get grid attribute.
!>
!> @param[in] grid ???
!> @param[in] prefix ???
!> @param[in] grid ESMF output grid
!> @param[in] prefix grid attribute prefix
!> @param[in] ncid NetCDF file ID.
!> @param[in] varid NetCDF variable ID.
!> @param[out] rc Return code: ???
!> @param[out] rc Return code: return code
!>
!> @author Dusan Jovic @date Nov 1, 2017
!> @author Dusan Jovic @date Nov 1, 2017
subroutine get_grid_attr(grid, prefix, ncid, varid, rc)
type(ESMF_Grid), intent(in) :: grid
character(len=*), intent(in) :: prefix
Expand Down Expand Up @@ -889,11 +889,11 @@ end subroutine get_grid_attr
!> @param[in] dim_name Dimension name.
!> @param[in] dimid Dimension ID.
!> @param[in] grpid Group ID.
!> @param[in] grid ???
!> @param[in] mtype ???
!> @param[out] rc Return code: ???
!> @param[in] grid ESMF output grid
!> @param[in] mype MPI rank
!> @param[out] rc Return code: retrun code
!>
!> @author Dusan Jovic @date Nov 1, 2017
!> @author Dusan Jovic @date Nov 1, 2017
subroutine add_dim(ncid, dim_name, dimid, grid, mype, rc)
integer, intent(in) :: ncid
character(len=*), intent(in) :: dim_name
Expand Down

0 comments on commit c1e16a2

Please sign in to comment.