From 967df8cddf66f66945006f5dffb727a7fba9834a Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Thu, 18 Jan 2024 08:00:54 -0700 Subject: [PATCH 01/13] more doxygen changes --- io/post_fv3.F90 | 84 +++++++++++++++++++++++++-------------- io/post_nems_routines.F90 | 82 ++++++++++++++++++++++---------------- 2 files changed, 102 insertions(+), 64 deletions(-) diff --git a/io/post_fv3.F90 b/io/post_fv3.F90 index 97962bdd9..beb445653 100644 --- a/io/post_fv3.F90 +++ b/io/post_fv3.F90 @@ -1,3 +1,26 @@ +!> @file Run post on write grid comp. +!> @brief ??? +!> @author Jun Wang @date Jul, 2019 + +!> @brief Run post on write grid comp. +!> +!> ## Module History +!> +!> Date | Programmer | Modification +!> -----|------------|------------- +!> Jul 2019 | J. Wang | create interface to run inline post for FV3 +!> Sep 2020 | J. Dong/J. Wang | create interface to run inline post for FV3-LAM +!> Apr 2021 | R. Sun | Added variables for Thomspon MP +!> Apr 2022 | W. Meng | 1)unify global and regional inline post interfaces +!> Apr 2022 | W. Meng | 2)add bug fix for dx/dy computation +!> Apr 2022 | W. Meng | 3)add reading pwat from FV3 +!> Apr 2022 | W. Meng | 4)remove some variable initializations +!> Apr 2022 | W. Meng | 5)read max/min 2m T from tmax_max2m/tmin_min2m for GFS, and from t02max/min for RRFS and HAFS. +!> Apr 2022 | W. Meng | 6)read 3D cloud fraction from cld_amt for GFDL MP, and from cldfra for other MPs. +!> Jun 2022 | J. Meng | 2D decomposition +!> Jul 2022 | W. Meng | 1)output lat/lon of four corner point for rotated lat-lon grid. 2)read instant model top logwave +!> +!> @author Jun Wang @date Jul, 2019 module post_fv3 use mpi @@ -10,35 +33,26 @@ module post_fv3 implicit none - public post_run_fv3 + public post_run_fv3 !< ??? contains + !> ??? + !> + !> @param[in] wrt_int_state ??? + !> @param[in] grid_id ??? + !> @param[in] mype ??? + !> @param[in] mpicomp ??? + !> @param[in] lead_write ??? + !> @param[in] itasks ??? + !> @param[in] jtasks ??? + !> @param[in] mynfhr ??? + !> @param[in] mynfmin ??? + !> @param[in] mynfsec + !> + !> @author Jun Wang @date Jul, 2019 subroutine post_run_fv3(wrt_int_state,grid_id,mype,mpicomp,lead_write, & itasks,jtasks,mynfhr,mynfmin,mynfsec) -! -! revision history: -! Jul 2019 J. Wang create interface to run inline post for FV3 -! Sep 2020 J. Dong/J. Wang create interface to run inline post for FV3-LAM -! Apr 2021 R. Sun Added variables for Thomspon MP -! Apr 2022 W. Meng 1)unify global and regional inline post interfaces -! 2)add bug fix for dx/dy computation -! 3)add reading pwat from FV3 -! 4)remove some variable initializations -! 5)read max/min 2m T from tmax_max2m/tmin_min2m -! for GFS, and from t02max/min for RRFS -! and HAFS. -! 6)read 3D cloud fraction from cld_amt for GFDL MP, -! and from cldfra for other MPs. -! Jun 2022 J. Meng 2D decomposition -! Jul 2022 W. Meng 1)output lat/lon of four corner point for rotated -! lat-lon grid. -! 2)read instant model top logwave -! -!----------------------------------------------------------------------- -!*** run post on write grid comp -!----------------------------------------------------------------------- -! use ctlblk_mod, only : komax,ifhr,ifmin,modelname,datapd,fld_info, & npset,grib,jsta, & jend,ista,iend, im, nsoil, filenameflat,numx @@ -215,9 +229,13 @@ subroutine post_run_fv3(wrt_int_state,grid_id,mype,mpicomp,lead_write, & call post_finalize('grib2') end subroutine post_run_fv3 -! -!----------------------------------------------------------------------- -! + + !> ??? + !> + !> @param[in] wrt_int_state ??? + !> @param[in] grid_id ??? + !> + !> @author Jun Wang @date Jul, 2019 subroutine post_getattr_fv3(wrt_int_state,grid_id) ! use esmf @@ -485,9 +503,15 @@ subroutine post_getattr_fv3(wrt_int_state,grid_id) enddo !end nfb ! end subroutine post_getattr_fv3 -! -!----------------------------------------------------------------------- -! + + !> ??? + !> + !> @param[in] wrt_int_state ??? + !> @param[in] grid_id ??? + !> @param[in] mype ??? + !> @param[in] mpicomp + !> + !> @author Jun Wang @date Jul 2019 subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp) ! ! revision history: diff --git a/io/post_nems_routines.F90 b/io/post_nems_routines.F90 index 337139b1d..4fc88d91c 100644 --- a/io/post_nems_routines.F90 +++ b/io/post_nems_routines.F90 @@ -1,19 +1,33 @@ -!----------------------------------------------------------------------- -!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -!----------------------------------------------------------------------- -! - subroutine post_alctvars(imi,jmi,lmi,mype,nwtlpes,lead_write, mpicomp, & - jts,jte,jtsgrp,jtegrp,its,ite,itsgrp,itegrp) -! -! -! revision history: -! Jul 2019 Jun Wang: allocate arrays for post processing -! Feb 2022 J. Meng/B. Cui: create interface to run inline post with post_2d_decomp -! -!----------------------------------------------------------------------- -!*** allocate post variables -!----------------------------------------------------------------------- -! +!> @file +!> @brief ??? +!> @author Jun Wang @date Oct 8, 2019 + +!> Allocate post variables. +!> +!> ## Subroutine History +!> Date | Programmer | Modification +!> Jul 2019 | Jun Wang | allocate arrays for post processing +!> Feb 2022 | J. Meng/B. Cui | create interface to run inline post with post_2d_decomp +!> +!> @param[in] imi ??? +!> @param[in] jmi ??? +!> @param[in] lmi ??? +!> @param[in] mype ??? +!> @param[in] nwtlpes ??? +!> @param[in] lead_write ??? +!> @param[in] mpicomp ??? +!> @param[in] jts ??? +!> @param[in] jte ??? +!> @param[in] jtsgrp ??? +!> @param[in] jtegrp ??? +!> @param[in] its ??? +!> @param[in] ite ??? +!> @param[in] itsgrp ??? +!> @param[in] itegrp ??? +!> +!> @author Jun Wang @date Oct 8 2019 +subroutine post_alctvars(imi,jmi,lmi,mype,nwtlpes,lead_write, mpicomp, & + jts,jte,jtsgrp,jtegrp,its,ite,itsgrp,itegrp) use vrbls4d use vrbls3d use vrbls2d @@ -215,11 +229,18 @@ subroutine post_alctvars(imi,jmi,lmi,mype,nwtlpes,lead_write, mpicomp, & end do end do end subroutine post_alctvars -! -!--------------------------------------------------------------------- -!&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& -!--------------------------------------------------------------------- -! + + !> Read post namelist. + !> + !> @param[in] kpo ??? + !> @param[in] kth ??? + !> @param[in] kpv ??? + !> @param[in] po ??? + !> @param[in] th ??? + !> @param[in] pv ??? + !> @param[in] post_namelist ??? + !> + !> @author Jun Wang @date Jul 2019 subroutine read_postnmlt(kpo,kth,kpv,po,th,pv,post_namelist) ! use ctlblk_mod, only : komax,fileNameD3D,lsm,lsmp1,spl,spldef, & @@ -228,10 +249,6 @@ subroutine read_postnmlt(kpo,kth,kpv,po,th,pv,post_namelist) isf_surface_physics,modelname,submodelname,& rdaod,d2d_chem,nasa_on,gccpp_on use upp_ifi_mod, only: write_ifi_debug_files -! -! revision history: -! Jul 2019 Jun Wang: read post namelist -! implicit none !--- character (len=*), intent(in) :: post_namelist @@ -335,16 +352,13 @@ subroutine read_postnmlt(kpo,kth,kpv,po,th,pv,post_namelist) 1000 continue end subroutine read_postnmlt -! -!--------------------------------------------------------------------- -!&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& -!--------------------------------------------------------------------- -! + + !> ??? + !> + !> @param[in] post_gribversion ??? + !> + !> @author Jun Wang @date Jul 2019 subroutine post_finalize(post_gribversion) -! -! revision history: -! Jul 2019 Jun Wang: finalize post step -! use grib2_module, only : grib_info_finalize ! character(*),intent(in) :: post_gribversion From 49ee7e054381ef3e88e403d01260194b1016618d Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Thu, 18 Jan 2024 08:04:10 -0700 Subject: [PATCH 02/13] more doxygen changes --- io/post_nems_routines.F90 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/io/post_nems_routines.F90 b/io/post_nems_routines.F90 index 4fc88d91c..6f780413e 100644 --- a/io/post_nems_routines.F90 +++ b/io/post_nems_routines.F90 @@ -5,7 +5,9 @@ !> Allocate post variables. !> !> ## Subroutine History +!> !> Date | Programmer | Modification +!> -----|------------|------------- !> Jul 2019 | Jun Wang | allocate arrays for post processing !> Feb 2022 | J. Meng/B. Cui | create interface to run inline post with post_2d_decomp !> @@ -353,7 +355,7 @@ subroutine read_postnmlt(kpo,kth,kpv,po,th,pv,post_namelist) end subroutine read_postnmlt - !> ??? + !> Finalize post step. !> !> @param[in] post_gribversion ??? !> From fe98c79dd9e035440739b22cdcc3b3a3b81ccfe0 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Thu, 18 Jan 2024 10:28:50 -0700 Subject: [PATCH 03/13] doxygen changes --- io/module_wrt_grid_comp.F90 | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/io/module_wrt_grid_comp.F90 b/io/module_wrt_grid_comp.F90 index b7e93e28f..a922d383d 100644 --- a/io/module_wrt_grid_comp.F90 +++ b/io/module_wrt_grid_comp.F90 @@ -1,5 +1,18 @@ -!----------------------------------------------------------------------- -! +!> @file +!> @brief write gridded component. +!> @author J. Wang/G. Theurich @date Jul, 2017 + +!> @brief Run post on write grid comp. +!> +!> ## Module History +!> +!> Date | Programmer | Modification +!> -----|------------|------------- +!> Jul 2017 | J. Wang/G. Theurich | initial code for fv3 write grid component +!> Mar 2018 | S Moorthi | changing cfhour to accommodate up to 99999 hours +!> Aug 2019 | J. Wang | add inline post +!> +!> @author Jun Wang @date Jul, 2019 module module_wrt_grid_comp ! !----------------------------------------------------------------------- @@ -20,9 +33,6 @@ module module_wrt_grid_comp !*** !*** Revision history !*** -! Jul 2017: J. Wang/G. Theurich - initial code for fv3 write grid component -! Mar 2018: S Moorthi - changing cfhour to accommodate up to 99999 hours -! Aug 2019: J. Wang - add inline post ! !--------------------------------------------------------------------------------- ! From b690bf2d7d95e77b2edf33823f23320194f1e34e Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Thu, 18 Jan 2024 10:29:39 -0700 Subject: [PATCH 04/13] minor documentation fix --- io/post_fv3.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/io/post_fv3.F90 b/io/post_fv3.F90 index beb445653..9f9efee0d 100644 --- a/io/post_fv3.F90 +++ b/io/post_fv3.F90 @@ -1,5 +1,5 @@ -!> @file Run post on write grid comp. -!> @brief ??? +!> @file +!> @brief Run post on write grid comp. !> @author Jun Wang @date Jul, 2019 !> @brief Run post on write grid comp. From 9e00ad61675aa3cccde68dfc060d31523117c52a Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Thu, 18 Jan 2024 10:55:39 -0700 Subject: [PATCH 05/13] more doxygen changes --- io/module_wrt_grid_comp.F90 | 289 ++++++++++++++++++++++++++---------- 1 file changed, 207 insertions(+), 82 deletions(-) diff --git a/io/module_wrt_grid_comp.F90 b/io/module_wrt_grid_comp.F90 index a922d383d..ad3708163 100644 --- a/io/module_wrt_grid_comp.F90 +++ b/io/module_wrt_grid_comp.F90 @@ -1,8 +1,21 @@ !> @file -!> @brief write gridded component. +!> @brief Write grid component module. !> @author J. Wang/G. Theurich @date Jul, 2017 -!> @brief Run post on write grid comp. +!> @brief Write grid component. +!> +!> At initialization step, write grid is defined. The forecast field +!> bundle is mirrored and output field information inside the field +!> bundle is used to create ESMF field on the write grid and added in +!> the output field bundle on write grid component. Also the IO_BaseTime +!> is set to the initial clock time. +!> +!> At the run step, output time is set from the write grid comp clock +!> the ESMF field bundles that contains the data on write grid are +!> written out through ESMF field bundle write to netcdf files. +!> The ESMF field bundle write uses parallel write, so if output grid +!> is cubed sphere grid, the six tiles file will be written out at +!> same time. !> !> ## Module History !> @@ -14,28 +27,6 @@ !> !> @author Jun Wang @date Jul, 2019 module module_wrt_grid_comp -! -!----------------------------------------------------------------------- -!*** This module includes the functionality of write gridded component. -!----------------------------------------------------------------------- -!*** At initialization step, write grid is defined. The forecast field -!*** bundle is mirrored and output field information inside the field -!*** bundle is used to create ESMF field on the write grid and added in -!*** the output field bundle on write grid component. Also the IO_BaseTime -!*** is set to the initial clock time. -!*** At the run step, output time is set from the write grid comp clock -!*** the ESMF field bundles that contains the data on write grid are -!*** written out through ESMF field bundle write to netcdf files. -!*** The ESMF field bundle write uses parallel write, so if output grid -!*** is cubed sphere grid, the six tiles file will be written out at -!*** same time. -!----------------------------------------------------------------------- -!*** -!*** Revision history -!*** -! -!--------------------------------------------------------------------------------- -! use mpi use esmf use fms @@ -69,31 +60,34 @@ module module_wrt_grid_comp !----------------------------------------------------------------------- ! ! - integer,save :: lead_write_task !<-- Rank of the first write task in the write group - integer,save :: last_write_task !<-- Rank of the last write task in the write group - integer,save :: ntasks !<-- # of write tasks in the current group - integer,save :: itasks, jtasks !<-- # of write tasks in i/j direction in the current group - integer,save :: ngrids - - integer,save :: wrt_mpi_comm !<-- the mpi communicator in the write comp - integer,save :: idate(7), start_time(7) - logical,save :: write_nsflip - logical,save :: change_wrtidate=.false. - integer,save :: frestart(999) = -1 - integer,save :: calendar_type = 3 - logical :: lprnt + integer,save :: lead_write_task !< Rank of the first write task in the write group. + integer,save :: last_write_task !< Rank of the last write task in the write group. + integer,save :: ntasks !< Number of write tasks in the current group. + integer,save :: itasks !< Number of write tasks in i direction in the current group. + integer,save :: jtasks !< Number of write tasks in j direction in the current group. + integer,save :: ngrids !< ??? + + integer,save :: wrt_mpi_comm !< The mpi communicator in the write comp. + integer,save :: idate(7) !< ??? + integer,save :: start_time(7) !< ??? + logical,save :: write_nsflip !< ??? + logical,save :: change_wrtidate=.false. !< ??? + integer,save :: frestart(999) = -1 !< ??? + integer,save :: calendar_type = 3 !< ??? + logical :: lprnt !< ??? ! !----------------------------------------------------------------------- ! - type(ESMF_FieldBundle) :: gridFB - integer :: FBCount - character(len=esmf_maxstr),allocatable :: fcstItemNameList(:) - logical :: top_parent_is_global + type(ESMF_FieldBundle) :: gridFB !< ??? + integer :: FBCount !< ??? + character(len=esmf_maxstr),allocatable :: fcstItemNameList(:) !< ??? + logical :: top_parent_is_global !< ??? ! !----------------------------------------------------------------------- - REAL(KIND=8) :: btim,btim0 - REAL(KIND=8),PUBLIC,SAVE :: write_init_tim, write_run_tim - REAL(KIND=8), parameter :: radi=180.0d0/pi + REAL(KIND=8) :: btim,btim0 !< ??? + REAL(KIND=8),PUBLIC,SAVE :: write_init_tim !< ??? + REAL(KIND=8),PUBLIC,SAVE :: write_run_tim !< ??? + REAL(KIND=8), parameter :: radi=180.0d0/pi !< ??? !----------------------------------------------------------------------- ! public SetServices @@ -104,16 +98,18 @@ module module_wrt_grid_comp end interface splat ! type optimizeT - type(ESMF_State) :: state - type(ESMF_GridComp), allocatable :: comps(:) + type(ESMF_State) :: state !< ??? + type(ESMF_GridComp), allocatable :: comps(:) !< ??? end type contains -! -!----------------------------------------------------------------------- -!####################################################################### -!----------------------------------------------------------------------- -! + + !> ??? + !> + !> @param wrt_comp ??? + !> @param rc Return code. + !> + !> @author J. Wang/G. Theurich @date Jul, 2017 subroutine SetServices(wrt_comp, rc) type(ESMF_GridComp) :: wrt_comp integer, intent(out) :: rc @@ -141,11 +137,16 @@ subroutine SetServices(wrt_comp, rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return end subroutine SetServices -! -!----------------------------------------------------------------------- -!####################################################################### -!----------------------------------------------------------------------- -! + + !> ??? + !> + !> @param wrt_comp ??? + !> @param imp_state_write ??? + !> @param exp_state_write ??? + !> @param clock ??? + !> @param[out] rc Return code. + !> + !> @author J. Wang/G. Theurich @date Jul, 2017 subroutine wrt_initialize_p1(wrt_comp, imp_state_write, exp_state_write, clock, rc) ! !----------------------------------------------------------------------- @@ -1549,6 +1550,15 @@ end subroutine wrt_initialize_p1 !####################################################################### !----------------------------------------------------------------------- ! + !> ??? + !> + !> @param wrt_comp ??? + !> @param imp_state_write ??? + !> @param exp_state_write ??? + !> @param clock ??? + !> @param[out] rc Return code. + !> + !> @author J. Wang/G. Theurich @date Jul, 2017 subroutine wrt_initialize_p2(wrt_comp, imp_state_write, exp_state_write, clock, rc) ! !----------------------------------------------------------------------- @@ -1644,11 +1654,16 @@ subroutine wrt_initialize_p2(wrt_comp, imp_state_write, exp_state_write, clock, !----------------------------------------------------------------------- ! end subroutine wrt_initialize_p2 -! -!----------------------------------------------------------------------- -!####################################################################### -!----------------------------------------------------------------------- -! + + !> ??? + !> + !> @param wrt_comp ??? + !> @param imp_state_write ??? + !> @param exp_state_write ??? + !> @param clock ??? + !> @param[out] rc Return code. + !> + !> @author J. Wang/G. Theurich @date Jul, 2017 subroutine wrt_initialize_p3(wrt_comp, imp_state_write, exp_state_write, clock, rc) ! !----------------------------------------------------------------------- @@ -1743,11 +1758,16 @@ subroutine wrt_initialize_p3(wrt_comp, imp_state_write, exp_state_write, clock, !----------------------------------------------------------------------- ! end subroutine wrt_initialize_p3 -! -!----------------------------------------------------------------------- -!####################################################################### -!----------------------------------------------------------------------- -! + + !> ??? + !> + !> @param wrt_comp ??? + !> @param imp_state_write ??? + !> @param exp_state_write ??? + !> @param clock ??? + !> @param[out] rc Return code. + !> + !> @author J. Wang/G. Theurich @date Jul, 2017 subroutine wrt_run(wrt_comp, imp_state_write, exp_state_write,clock,rc) ! !----------------------------------------------------------------------- @@ -2481,11 +2501,16 @@ subroutine wrt_run(wrt_comp, imp_state_write, exp_state_write,clock,rc) !----------------------------------------------------------------------- ! END SUBROUTINE wrt_run -! -!----------------------------------------------------------------------- -!&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& -!----------------------------------------------------------------------- -! + + !> ??? + !> + !> @param wrt_comp ??? + !> @param imp_state_write ??? + !> @param exp_state_write ??? + !> @param clock ??? + !> @param[out] rc Return code. + !> + !> @author J. Wang/G. Theurich @date Jul, 2017 subroutine wrt_finalize(wrt_comp, imp_state_write, exp_state_write, clock, rc) ! !----------------------------------------------------------------------- @@ -2534,6 +2559,12 @@ end subroutine wrt_finalize ! !----------------------------------------------------------------------- ! + !> ??? + !> + !> @param[in] file_bundle ??? + !> @param[out] rc Return code. + !> + !> @author J. Wang/G. Theurich @date Jul, 2017 subroutine recover_fields(file_bundle,rc) type(ESMF_FieldBundle), intent(in) :: file_bundle @@ -2773,6 +2804,12 @@ end subroutine recover_fields ! !----------------------------------------------------------------------- ! + !> ??? + !> + !> @param[in] file_bundle ??? + !> @param[out] rc Return code. + !> + !> @author J. Wang/G. Theurich @date Jul, 2017 subroutine mask_fields(file_bundle,rc) type(ESMF_FieldBundle), intent(in) :: file_bundle @@ -3031,6 +3068,19 @@ end subroutine mask_fields !----------------------------------------------------------------------- ! + !> ??? + !> + !> @param[in] file_bundle ??? + !> @param[in] fileName ??? + !> @param[in] convention ??? + !> @param[in] purpose ??? + !> @param[in] status ??? + !> @param[in] timeslice ??? + !> @param[in] state ??? + !> @param[in] comps ??? + !> @param[out] rc Return code. + !> + !> @author J. Wang/G. Theurich @date Jul, 2017 subroutine ESMFproto_FieldBundleWrite(fieldbundle, fileName, & convention, purpose, status, timeslice, state, comps, rc) type(ESMF_FieldBundle), intent(in) :: fieldbundle @@ -3339,6 +3389,12 @@ end subroutine ESMFproto_FieldBundleWrite !----------------------------------------------------------------------------- + !> ??? + !> + !> @param[in] comp ??? + !> @param[out] rc Return code. + !> + !> @author J. Wang/G. Theurich @date Jul, 2017 subroutine ioCompSS(comp, rc) type(ESMF_GridComp) :: comp integer, intent(out) :: rc @@ -3354,6 +3410,15 @@ subroutine ioCompSS(comp, rc) !----------------------------------------------------------------------------- + !> ??? + !> + !> @param comp ??? + !> @param importState ??? + !> @param exportState ??? + !> @param clock ??? + !> @param[out] rc Return code. + !> + !> @author J. Wang/G. Theurich @date Jul, 2017 subroutine ioCompRun(comp, importState, exportState, clock, rc) use netcdf @@ -3729,6 +3794,12 @@ subroutine ioCompRun(comp, importState, exportState, clock, rc) contains + !> ??? + !> + !> @param[in] dimLablel ??? + !> @param[out] rc Return code. + !> + !> @author J. Wang/G. Theurich @date Jul, 2017 subroutine write_out_ungridded_dim_atts(dimLabel, rc) character(len=*) :: dimLabel integer, intent(out) :: rc @@ -3872,6 +3943,13 @@ subroutine write_out_ungridded_dim_atts(dimLabel, rc) endif end subroutine write_out_ungridded_dim_atts + !> ??? + !> + !> @param[in] field ??? + !> @param[in] dimLablel ??? + !> @param[out] rc Return code. + !> + !> @author J. Wang/G. Theurich @date Jul, 2017 subroutine write_out_ungridded_dim_atts_from_field(field, dimLabel, rc) type(ESMF_Field),intent(in) :: field @@ -4017,6 +4095,15 @@ end subroutine ioCompRun !----------------------------------------------------------------------------- + !> ??? + !> + !> @param[in] field ??? + !> @param[in] tile ??? + !> @param[in] tileField ??? + !> @param[in] petList ??? + !> @param[out] rc Return code. + !> + !> @author J. Wang/G. Theurich @date Jul, 2017 subroutine ESMFproto_FieldMakeSingleTile(field, tile, tileField, petList, rc) type(ESMF_Field), intent(in) :: field integer, intent(in) :: tile @@ -4216,8 +4303,13 @@ subroutine ESMFproto_FieldMakeSingleTile(field, tile, tileField, petList, rc) end subroutine ESMFproto_FieldMakeSingleTile -! -!----------------------------------------------------------------------- + !> ??? + !> + !> @param[in] idrt ??? + !> @param[in] jmax ??? + !> @param[out] aslat ??? + !> + !> @author J. Wang/G. Theurich @date Jul, 2017 subroutine splat4(idrt,jmax,aslat) implicit none @@ -4327,7 +4419,14 @@ subroutine splat4(idrt,jmax,aslat) ENDIF ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - end subroutine splat4 -!---------------------------------------------------------------------- + + !> ??? + !> + !> @param[in] idrt ??? + !> @param[in] jmax ??? + !> @param[out] aslat ??? + !> + !> @author J. Wang/G. Theurich @date Jul, 2017 subroutine splat8(idrt,jmax,aslat) !$$$ implicit none @@ -4436,8 +4535,17 @@ subroutine splat8(idrt,jmax,aslat) ENDIF ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - end subroutine splat8 -! -! + + !> ??? + !> + !> @param[in] tlmd ??? + !> @param[in] tphd ??? + !> @param[in] almd ??? + !> @param[in] aphd ??? + !> @param[in] tlm0d ??? + !> @param[in] tph0d ??? + !> + !> @author J. Wang/G. Theurich @date Jul, 2017 subroutine rtll(tlmd,tphd,almd,aphd,tlm0d,tph0d) !------------------------------------------------------------------------------- real(ESMF_KIND_R8), intent(in) :: tlmd, tphd @@ -4488,9 +4596,20 @@ subroutine rtll(tlmd,tphd,almd,aphd,tlm0d,tph0d) return ! end subroutine rtll -! -!----------------------------------------------------------------------- -! + + !> ??? + !> + !> @param[in] stlat1 ??? + !> @param[in] stlat2 ??? + !> @param[in] c_lat ??? + !> @param[in] c_lon ??? + !> @param[inout] glon ??? + !> @param[inout] glat ??? + !> @param[inout] x ??? + !> @param[inout] y ??? + !> @param[in] inv ??? + !> + !> @author J. Wang/G. Theurich @date Jul, 2017 subroutine lambert(stlat1,stlat2,c_lat,c_lon,glon,glat,x,y,inv) !------------------------------------------------------------------------------- @@ -4550,9 +4669,15 @@ subroutine lambert(stlat1,stlat2,c_lat,c_lon,glon,glat,x,y,inv) return end subroutine lambert -! -!----------------------------------------------------------------------- -! + + !> ??? + !> + !> @param[in] nfl ??? + !> @param[in] filename ??? + !> @param[in] outfile_name ??? + !> @param[in] noutfile ??? + !> + !> @author J. Wang/G. Theurich @date Jul, 2017 subroutine get_outfile(nfl, filename, outfile_name, noutfile) integer, intent(in) :: nfl character(*), intent(in) :: filename(:,:) From 03e35a04cbeeba395458e25d8b89909d80056c7a Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Fri, 19 Jan 2024 03:15:00 -0700 Subject: [PATCH 06/13] more doxygen --- io/module_write_internal_state.F90 | 99 ++++++++++++++++-------------- 1 file changed, 54 insertions(+), 45 deletions(-) diff --git a/io/module_write_internal_state.F90 b/io/module_write_internal_state.F90 index 9ab449c0e..a2a399092 100644 --- a/io/module_write_internal_state.F90 +++ b/io/module_write_internal_state.F90 @@ -1,16 +1,11 @@ -!----------------------------------------------------------------------- +!> @file +!> @brief Internal state of the write component. +!> @author J. Wang/G. Theurich @date Feb, 2017 + +!> @brief Internal state of the write component. +!> +!> @author Jun Wang @date Feb, 2017 module write_internal_state -! -!----------------------------------------------------------------------- -!*** the internal state of the write component. -!----------------------------------------------------------------------- -!*** -!*** revision history -!*** -! Feb 2017: J. Wang - Initial code -! -!----------------------------------------------------------------------- -! use esmf ! !----------------------------------------------------------------------- @@ -20,12 +15,27 @@ module write_internal_state !----------------------------------------------------------------------- ! type output_grid_info - integer :: im, jm, lm - integer :: i_start,i_end, j_start,j_end - real,dimension(:,:),allocatable :: lonPtr, latPtr - integer,dimension(:),allocatable :: i_start_wrtgrp, i_end_wrtgrp, j_start_wrtgrp, j_end_wrtgrp - real :: latse, latnw, lonse, lonnw - real :: latstart, latlast, lonstart, lonlast + 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 !< ??? end type output_grid_info type wrt_internal_state @@ -34,72 +44,71 @@ module write_internal_state ! pe information and task layout !-------------------------------- ! - integer :: mype - integer :: petcount + integer :: mype !< ??? + integer :: petcount !< ??? ! !-------------------- !*** grid information !-------------------- - type(esmf_grid) :: wrtgrid + type(esmf_grid) :: wrtgrid !< ??? - type(output_grid_info) ,dimension(:), allocatable :: out_grid_info + type(output_grid_info) ,dimension(:), allocatable :: out_grid_info !< ??? ! !-------------------------- !*** file bundle for output !-------------------------- - integer :: FBCount + integer :: FBCount !< ??? ! !----------------------------------------------------------------------- !*** THE OUTPUT FILE !----------------------------------------------------------------------- ! - integer :: num_files + integer :: num_files !< ??? ! !----------------------------------------------------------------------- !*** THE OUTPUT FILE !----------------------------------------------------------------------- ! - type(ESMF_FieldBundle),dimension(:),allocatable :: wrtFB + type(ESMF_FieldBundle),dimension(:),allocatable :: wrtFB !< ??? ! !------------------------------------- !*** Times used in history filenames !------------------------------------- ! - type(ESMF_Time) :: io_basetime - integer :: idate(7) - integer :: fdate(7) + type(ESMF_Time) :: io_basetime !< ??? + integer :: idate(7) !< ??? + integer :: fdate(7) !< ??? ! !----------------------------------------- !*** I/O direction flags (Read or Write) !----------------------------------------- ! - logical :: output_history + logical :: output_history !< ??? ! !----------------------------------------- !*** 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,bk + 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 !< ??? !----------------------------------------------------------------------- ! end type wrt_internal_state ! -!----------------------------------------------------------------------- -!*** THIS STATE IS SUPPORTED BY C POINTERS BUT NOT F90 POINTERS -!*** THEREFORE WE NEED THIS WRAP. -!----------------------------------------------------------- -! + + !> This state is supported by c pointers but not f90 pointers + !> therefore we need this wrap. type write_wrap - type(wrt_internal_state),pointer :: write_int_state + type(wrt_internal_state),pointer :: write_int_state !< ??? end type write_wrap !----------------------------------------------------------- From 91522936ff512421b18c292e2a24d898eb17e197 Mon Sep 17 00:00:00 2001 From: Jun Wang Date: Sat, 20 Jan 2024 02:20:50 +0000 Subject: [PATCH 07/13] update post document --- io/post_fv3.F90 | 40 ++++++++++++++++---------------- io/post_nems_routines.F90 | 48 +++++++++++++++++++-------------------- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/io/post_fv3.F90 b/io/post_fv3.F90 index 9f9efee0d..c7e9426a4 100644 --- a/io/post_fv3.F90 +++ b/io/post_fv3.F90 @@ -33,22 +33,22 @@ module post_fv3 implicit none - public post_run_fv3 !< ??? + public post_run_fv3 !< Interface to run inline post contains - !> ??? + !> Interface to run inline post !> - !> @param[in] wrt_int_state ??? - !> @param[in] grid_id ??? - !> @param[in] mype ??? - !> @param[in] mpicomp ??? - !> @param[in] lead_write ??? - !> @param[in] itasks ??? - !> @param[in] jtasks ??? - !> @param[in] mynfhr ??? - !> @param[in] mynfmin ??? - !> @param[in] mynfsec + !> @param[in] wrt_int_state write grid component internal state + !> @param[in] grid_id id number of the output grid + !> @param[in] mype MPI rank + !> @param[in] mpicomp MPI communicator of the write grid component + !> @param[in] lead_write lead task of the write group + !> @param[in] itasks number of MPI tasks in i direction of output domain + !> @param[in] jtasks number of MPI tasks in j direction of output domain + !> @param[in] mynfhr output forecast hours on the write grid component + !> @param[in] mynfmin output forecast minutes on the write grid component + !> @param[in] mynfsec output forecast secondson the write grid component !> !> @author Jun Wang @date Jul, 2019 subroutine post_run_fv3(wrt_int_state,grid_id,mype,mpicomp,lead_write, & @@ -230,10 +230,10 @@ subroutine post_run_fv3(wrt_int_state,grid_id,mype,mpicomp,lead_write, & end subroutine post_run_fv3 - !> ??? + !> Subroutine to get attributes for post processing !> - !> @param[in] wrt_int_state ??? - !> @param[in] grid_id ??? + !> @param[in] wrt_int_state write grid component internal state + !> @param[in] grid_id id number of the output grid !> !> @author Jun Wang @date Jul, 2019 subroutine post_getattr_fv3(wrt_int_state,grid_id) @@ -504,12 +504,12 @@ subroutine post_getattr_fv3(wrt_int_state,grid_id) ! end subroutine post_getattr_fv3 - !> ??? + !> Subroutine to set post variables !> - !> @param[in] wrt_int_state ??? - !> @param[in] grid_id ??? - !> @param[in] mype ??? - !> @param[in] mpicomp + !> @param[in] wrt_int_state write grid component internal state + !> @param[in] grid_id id number of the output grid + !> @param[in] mype MPI rank + !> @param[in] mpicomp MPI communicator of the write grid component !> !> @author Jun Wang @date Jul 2019 subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp) diff --git a/io/post_nems_routines.F90 b/io/post_nems_routines.F90 index 6f780413e..4685067aa 100644 --- a/io/post_nems_routines.F90 +++ b/io/post_nems_routines.F90 @@ -1,5 +1,5 @@ !> @file -!> @brief ??? +!> @brief miscellaneous subroutines to support inline post !> @author Jun Wang @date Oct 8, 2019 !> Allocate post variables. @@ -11,21 +11,21 @@ !> Jul 2019 | Jun Wang | allocate arrays for post processing !> Feb 2022 | J. Meng/B. Cui | create interface to run inline post with post_2d_decomp !> -!> @param[in] imi ??? -!> @param[in] jmi ??? -!> @param[in] lmi ??? -!> @param[in] mype ??? -!> @param[in] nwtlpes ??? -!> @param[in] lead_write ??? -!> @param[in] mpicomp ??? -!> @param[in] jts ??? -!> @param[in] jte ??? -!> @param[in] jtsgrp ??? -!> @param[in] jtegrp ??? -!> @param[in] its ??? -!> @param[in] ite ??? -!> @param[in] itsgrp ??? -!> @param[in] itegrp ??? +!> @param[in] imi i dimension size of the output grid +!> @param[in] jmi j dimension size of the output grid +!> @param[in] lmi l (layer) dimension size of the output grid +!> @param[in] mype MPI rank +!> @param[in] nwtlpes number of write tasks in the write group +!> @param[in] lead_write lead task of the write group +!> @param[in] mpicomp MPI communicator of the write grid component +!> @param[in] jts start index in j dimention in a task subdomain +!> @param[in] jte end index in j dimention in a task subdomain +!> @param[in] jtsgrp start index in j dimention of all write tasks +!> @param[in] jtegrp end idex in j dimention of all write tasks +!> @param[in] its start index in i dimention in a task subdomain +!> @param[in] ite end index in j dimention in a task subdomain +!> @param[in] itsgrp start index in i dimention of all write tasks +!> @param[in] itegrp end idex in i dimention of all write tasks !> !> @author Jun Wang @date Oct 8 2019 subroutine post_alctvars(imi,jmi,lmi,mype,nwtlpes,lead_write, mpicomp, & @@ -234,13 +234,13 @@ end subroutine post_alctvars !> Read post namelist. !> - !> @param[in] kpo ??? - !> @param[in] kth ??? - !> @param[in] kpv ??? - !> @param[in] po ??? - !> @param[in] th ??? - !> @param[in] pv ??? - !> @param[in] post_namelist ??? + !> @param[in] kpo number of pressure levels + !> @param[in] kth number of isentropic levels + !> @param[in] kpv number of potential vorticity levels + !> @param[in] po pressure levels to output + !> @param[in] th isentropic levels to output + !> @param[in] pv potential vorticity levels to output + !> @param[in] post_namelist post namelist array !> !> @author Jun Wang @date Jul 2019 subroutine read_postnmlt(kpo,kth,kpv,po,th,pv,post_namelist) @@ -357,7 +357,7 @@ end subroutine read_postnmlt !> Finalize post step. !> - !> @param[in] post_gribversion ??? + !> @param[in] post_gribversion grib version(1 or 2) used in post !> !> @author Jun Wang @date Jul 2019 subroutine post_finalize(post_gribversion) From 8e7d6e654b28921069c28e2b2951989a622c7553 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Wed, 24 Jan 2024 06:46:50 -0700 Subject: [PATCH 08/13] minor changes --- io/post_nems_routines.F90 | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/io/post_nems_routines.F90 b/io/post_nems_routines.F90 index 4685067aa..6028f6336 100644 --- a/io/post_nems_routines.F90 +++ b/io/post_nems_routines.F90 @@ -11,21 +11,21 @@ !> Jul 2019 | Jun Wang | allocate arrays for post processing !> Feb 2022 | J. Meng/B. Cui | create interface to run inline post with post_2d_decomp !> -!> @param[in] imi i dimension size of the output grid -!> @param[in] jmi j dimension size of the output grid -!> @param[in] lmi l (layer) dimension size of the output grid -!> @param[in] mype MPI rank -!> @param[in] nwtlpes number of write tasks in the write group -!> @param[in] lead_write lead task of the write group -!> @param[in] mpicomp MPI communicator of the write grid component -!> @param[in] jts start index in j dimention in a task subdomain -!> @param[in] jte end index in j dimention in a task subdomain -!> @param[in] jtsgrp start index in j dimention of all write tasks -!> @param[in] jtegrp end idex in j dimention of all write tasks -!> @param[in] its start index in i dimention in a task subdomain -!> @param[in] ite end index in j dimention in a task subdomain -!> @param[in] itsgrp start index in i dimention of all write tasks -!> @param[in] itegrp end idex in i dimention of all write tasks +!> @param[in] imi i dimension size of the output grid. +!> @param[in] jmi j dimension size of the output grid. +!> @param[in] lmi l (layer) dimension size of the output grid. +!> @param[in] mype MPI rank. +!> @param[in] nwtlpes number of write tasks in the write group. +!> @param[in] lead_write lead task of the write group. +!> @param[in] mpicomp MPI communicator of the write grid component. +!> @param[in] jts start index in j dimention in a task subdomain. +!> @param[in] jte end index in j dimention in a task subdomain. +!> @param[in] jtsgrp start index in j dimention of all write tasks. +!> @param[in] jtegrp end index in j dimention of all write tasks. +!> @param[in] its start index in i dimention in a task subdomain. +!> @param[in] ite end index in j dimention in a task subdomain. +!> @param[in] itsgrp start index in i dimention of all write tasks. +!> @param[in] itegrp end idex in i dimention of all write tasks. !> !> @author Jun Wang @date Oct 8 2019 subroutine post_alctvars(imi,jmi,lmi,mype,nwtlpes,lead_write, mpicomp, & From 3b7004d0d2b7c60ff251d62af6ff0d41281449e6 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Wed, 24 Jan 2024 06:54:25 -0700 Subject: [PATCH 09/13] fixes --- io/post_fv3.F90 | 38 +++++++++++++++++++------------------- io/post_nems_routines.F90 | 18 +++++++++--------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/io/post_fv3.F90 b/io/post_fv3.F90 index c7e9426a4..1105432ca 100644 --- a/io/post_fv3.F90 +++ b/io/post_fv3.F90 @@ -37,18 +37,18 @@ module post_fv3 contains - !> Interface to run inline post + !> Interface to run inline post. !> - !> @param[in] wrt_int_state write grid component internal state - !> @param[in] grid_id id number of the output grid - !> @param[in] mype MPI rank - !> @param[in] mpicomp MPI communicator of the write grid component - !> @param[in] lead_write lead task of the write group - !> @param[in] itasks number of MPI tasks in i direction of output domain - !> @param[in] jtasks number of MPI tasks in j direction of output domain - !> @param[in] mynfhr output forecast hours on the write grid component - !> @param[in] mynfmin output forecast minutes on the write grid component - !> @param[in] mynfsec output forecast secondson the write grid component + !> @param[in] wrt_int_state write grid component internal state. + !> @param[in] grid_id id number of the output grid. + !> @param[in] mype MPI rank. + !> @param[in] mpicomp MPI communicator of the write grid component. + !> @param[in] lead_write lead task of the write group. + !> @param[in] itasks number of MPI tasks in i direction of output domain. + !> @param[in] jtasks number of MPI tasks in j direction of output domain. + !> @param[in] mynfhr output forecast hours on the write grid component. + !> @param[in] mynfmin output forecast minutes on the write grid component. + !> @param[in] mynfsec output forecast secondson the write grid component. !> !> @author Jun Wang @date Jul, 2019 subroutine post_run_fv3(wrt_int_state,grid_id,mype,mpicomp,lead_write, & @@ -230,10 +230,10 @@ subroutine post_run_fv3(wrt_int_state,grid_id,mype,mpicomp,lead_write, & end subroutine post_run_fv3 - !> Subroutine to get attributes for post processing + !> Subroutine to get attributes for post processing. !> - !> @param[in] wrt_int_state write grid component internal state - !> @param[in] grid_id id number of the output grid + !> @param[in] wrt_int_state write grid component internal state. + !> @param[in] grid_id id number of the output grid. !> !> @author Jun Wang @date Jul, 2019 subroutine post_getattr_fv3(wrt_int_state,grid_id) @@ -504,12 +504,12 @@ subroutine post_getattr_fv3(wrt_int_state,grid_id) ! end subroutine post_getattr_fv3 - !> Subroutine to set post variables + !> Subroutine to set post variables. !> - !> @param[in] wrt_int_state write grid component internal state - !> @param[in] grid_id id number of the output grid - !> @param[in] mype MPI rank - !> @param[in] mpicomp MPI communicator of the write grid component + !> @param[in] wrt_int_state write grid component internal state. + !> @param[in] grid_id id number of the output grid. + !> @param[in] mype MPI rank. + !> @param[in] mpicomp MPI communicator of the write grid component. !> !> @author Jun Wang @date Jul 2019 subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp) diff --git a/io/post_nems_routines.F90 b/io/post_nems_routines.F90 index 6028f6336..8234a5c23 100644 --- a/io/post_nems_routines.F90 +++ b/io/post_nems_routines.F90 @@ -1,5 +1,5 @@ !> @file -!> @brief miscellaneous subroutines to support inline post +!> @brief Miscellaneous subroutines to support inline post. !> @author Jun Wang @date Oct 8, 2019 !> Allocate post variables. @@ -234,13 +234,13 @@ end subroutine post_alctvars !> Read post namelist. !> - !> @param[in] kpo number of pressure levels - !> @param[in] kth number of isentropic levels - !> @param[in] kpv number of potential vorticity levels - !> @param[in] po pressure levels to output - !> @param[in] th isentropic levels to output - !> @param[in] pv potential vorticity levels to output - !> @param[in] post_namelist post namelist array + !> @param[in] kpo number of pressure levels. + !> @param[in] kth number of isentropic levels. + !> @param[in] kpv number of potential vorticity levels. + !> @param[in] po pressure levels to output. + !> @param[in] th isentropic levels to output. + !> @param[in] pv potential vorticity levels to output. + !> @param[in] post_namelist post namelist array. !> !> @author Jun Wang @date Jul 2019 subroutine read_postnmlt(kpo,kth,kpv,po,th,pv,post_namelist) @@ -357,7 +357,7 @@ end subroutine read_postnmlt !> Finalize post step. !> - !> @param[in] post_gribversion grib version(1 or 2) used in post + !> @param[in] post_gribversion grib version(1 or 2) used in post. !> !> @author Jun Wang @date Jul 2019 subroutine post_finalize(post_gribversion) From 728ebab6800f894edfa66ca1c36ba0a7773cbb5c Mon Sep 17 00:00:00 2001 From: Jun Wang Date: Wed, 14 Feb 2024 20:36:22 +0000 Subject: [PATCH 10/13] update write grid comp document --- io/module_wrt_grid_comp.F90 | 238 +++++++++++++++++++----------------- 1 file changed, 125 insertions(+), 113 deletions(-) diff --git a/io/module_wrt_grid_comp.F90 b/io/module_wrt_grid_comp.F90 index ad3708163..4f041e0c6 100644 --- a/io/module_wrt_grid_comp.F90 +++ b/io/module_wrt_grid_comp.F90 @@ -65,29 +65,29 @@ module module_wrt_grid_comp integer,save :: ntasks !< Number of write tasks in the current group. integer,save :: itasks !< Number of write tasks in i direction in the current group. integer,save :: jtasks !< Number of write tasks in j direction in the current group. - integer,save :: ngrids !< ??? + integer,save :: ngrids !< Number of output grids integer,save :: wrt_mpi_comm !< The mpi communicator in the write comp. - integer,save :: idate(7) !< ??? - integer,save :: start_time(7) !< ??? - logical,save :: write_nsflip !< ??? - logical,save :: change_wrtidate=.false. !< ??? - integer,save :: frestart(999) = -1 !< ??? - integer,save :: calendar_type = 3 !< ??? - logical :: lprnt !< ??? + integer,save :: idate(7) !< IO base time array + integer,save :: start_time(7) !< Experiment starting time + logical,save :: write_nsflip !< Flag to flip vertical coordinate + logical,save :: change_wrtidate=.false. !< Flag to change output time + integer,save :: frestart(999) = -1 !< Restart time/frequency array + integer,save :: calendar_type = 3 !< Calendar type + logical :: lprnt !< Flag for debug prints ! !----------------------------------------------------------------------- ! - type(ESMF_FieldBundle) :: gridFB !< ??? - integer :: FBCount !< ??? - character(len=esmf_maxstr),allocatable :: fcstItemNameList(:) !< ??? - logical :: top_parent_is_global !< ??? + type(ESMF_FieldBundle) :: gridFB !< Temporary field bundle for axes information + integer :: FBCount !< Number of field bundles + character(len=esmf_maxstr),allocatable :: fcstItemNameList(:) !< Forecast item name list + logical :: top_parent_is_global !< Flag, .true. when the top partent domain is global ! !----------------------------------------------------------------------- - REAL(KIND=8) :: btim,btim0 !< ??? - REAL(KIND=8),PUBLIC,SAVE :: write_init_tim !< ??? - REAL(KIND=8),PUBLIC,SAVE :: write_run_tim !< ??? - REAL(KIND=8), parameter :: radi=180.0d0/pi !< ??? + REAL(KIND=8) :: btim0 !< Begining time + REAL(KIND=8),PUBLIC,SAVE :: write_init_tim !< Write grid component initialization time + REAL(KIND=8),PUBLIC,SAVE :: write_run_tim !< Write grid component run time + REAL(KIND=8), parameter :: radi=180.0d0/pi !< Radius !----------------------------------------------------------------------- ! public SetServices @@ -98,15 +98,16 @@ module module_wrt_grid_comp end interface splat ! type optimizeT - type(ESMF_State) :: state !< ??? - type(ESMF_GridComp), allocatable :: comps(:) !< ??? + type(ESMF_State) :: state !< ESMF state + type(ESMF_GridComp), allocatable :: comps(:) !< ESMF grid components end type contains - !> ??? + !> NUOPC Interface to indicate the generic component being specialized + !> and register any specialization points !> - !> @param wrt_comp ??? + !> @param wrt_comp write grid component !> @param rc Return code. !> !> @author J. Wang/G. Theurich @date Jul, 2017 @@ -138,12 +139,12 @@ subroutine SetServices(wrt_comp, rc) end subroutine SetServices - !> ??? + !> Write grid component initialization phase 1 !> - !> @param wrt_comp ??? - !> @param imp_state_write ??? - !> @param exp_state_write ??? - !> @param clock ??? + !> @param wrt_comp Write grid component + !> @param imp_state_write Write grid component import state + !> @param exp_state_write Write grid component export state + !> @param clock ESMF clock for the write grid component !> @param[out] rc Return code. !> !> @author J. Wang/G. Theurich @date Jul, 2017 @@ -1550,12 +1551,12 @@ end subroutine wrt_initialize_p1 !####################################################################### !----------------------------------------------------------------------- ! - !> ??? + !> Write grid component initialization phase 2 !> - !> @param wrt_comp ??? - !> @param imp_state_write ??? - !> @param exp_state_write ??? - !> @param clock ??? + !> @param wrt_comp Write grid component + !> @param imp_state_write Write grid component import state + !> @param exp_state_write Write grid component export state + !> @param clock ESMF clock for the write grid component !> @param[out] rc Return code. !> !> @author J. Wang/G. Theurich @date Jul, 2017 @@ -1655,12 +1656,12 @@ subroutine wrt_initialize_p2(wrt_comp, imp_state_write, exp_state_write, clock, ! end subroutine wrt_initialize_p2 - !> ??? + !> Write grid component initialization phase 3 !> - !> @param wrt_comp ??? - !> @param imp_state_write ??? - !> @param exp_state_write ??? - !> @param clock ??? + !> @param wrt_comp Write grid component + !> @param imp_state_write Write grid component import state + !> @param exp_state_write Write grid component export state + !> @param clock ESMF clock for the write grid component !> @param[out] rc Return code. !> !> @author J. Wang/G. Theurich @date Jul, 2017 @@ -1759,12 +1760,12 @@ subroutine wrt_initialize_p3(wrt_comp, imp_state_write, exp_state_write, clock, ! end subroutine wrt_initialize_p3 - !> ??? + !> Write grid component run phase !> - !> @param wrt_comp ??? - !> @param imp_state_write ??? - !> @param exp_state_write ??? - !> @param clock ??? + !> @param wrt_comp Write grid component + !> @param imp_state_write Write grid component import state + !> @param exp_state_write Write grid component export state + !> @param clock ESMF clock for the write grid component !> @param[out] rc Return code. !> !> @author J. Wang/G. Theurich @date Jul, 2017 @@ -2502,12 +2503,12 @@ subroutine wrt_run(wrt_comp, imp_state_write, exp_state_write,clock,rc) ! END SUBROUTINE wrt_run - !> ??? + !> Write grid component finalize phase !> - !> @param wrt_comp ??? - !> @param imp_state_write ??? - !> @param exp_state_write ??? - !> @param clock ??? + !> @param wrt_comp Write grid component + !> @param imp_state_write Write grid component import state + !> @param exp_state_write Write grid component export state + !> @param clock ESMF clock for the write grid component !> @param[out] rc Return code. !> !> @author J. Wang/G. Theurich @date Jul, 2017 @@ -2559,9 +2560,9 @@ end subroutine wrt_finalize ! !----------------------------------------------------------------------- ! - !> ??? + !> Recover the fields interpolated through vector interpolation !> - !> @param[in] file_bundle ??? + !> @param[in] file_bundle Field bundle !> @param[out] rc Return code. !> !> @author J. Wang/G. Theurich @date Jul, 2017 @@ -2804,9 +2805,9 @@ end subroutine recover_fields ! !----------------------------------------------------------------------- ! - !> ??? + !> Add undefined value mask to ESMF fields in an output file bundle !> - !> @param[in] file_bundle ??? + !> @param[in] file_bundle Output field bundle !> @param[out] rc Return code. !> !> @author J. Wang/G. Theurich @date Jul, 2017 @@ -3068,16 +3069,16 @@ end subroutine mask_fields !----------------------------------------------------------------------- ! - !> ??? + !> ESMF prototype interface to write out tiled field bundles !> - !> @param[in] file_bundle ??? - !> @param[in] fileName ??? - !> @param[in] convention ??? - !> @param[in] purpose ??? - !> @param[in] status ??? - !> @param[in] timeslice ??? - !> @param[in] state ??? - !> @param[in] comps ??? + !> @param[in] file_bundle Output ESMF field bundles + !> @param[in] fileName File name + !> @param[in] convention Convention of attribute package + !> @param[in] purpose Purpose of attribute package + !> @param[in] status ESMF file status flag + !> @param[in] timeslice Time slice + !> @param[in] state ESMF state + !> @param[in] comps ESMF grid component !> @param[out] rc Return code. !> !> @author J. Wang/G. Theurich @date Jul, 2017 @@ -3389,9 +3390,9 @@ end subroutine ESMFproto_FieldBundleWrite !----------------------------------------------------------------------------- - !> ??? + !> IO component set services !> - !> @param[in] comp ??? + !> @param[in] comp ESMF grid component !> @param[out] rc Return code. !> !> @author J. Wang/G. Theurich @date Jul, 2017 @@ -3410,15 +3411,15 @@ subroutine ioCompSS(comp, rc) !----------------------------------------------------------------------------- - !> ??? + !> IO component run phase !> - !> @param comp ??? - !> @param importState ??? - !> @param exportState ??? - !> @param clock ??? + !> @param comp The ESMF grid component + !> @param importState Import state + !> @param exportState Export State + !> @param clock ESMF clock !> @param[out] rc Return code. !> - !> @author J. Wang/G. Theurich @date Jul, 2017 + !> @author G. Theurich @date Jul, 2017 subroutine ioCompRun(comp, importState, exportState, clock, rc) use netcdf @@ -3794,12 +3795,12 @@ subroutine ioCompRun(comp, importState, exportState, clock, rc) contains - !> ??? + !> Write out ungridded dimension attributes !> - !> @param[in] dimLablel ??? + !> @param[in] dimLablel Dimension label !> @param[out] rc Return code. !> - !> @author J. Wang/G. Theurich @date Jul, 2017 + !> @author G. Theurich @date Jul, 2017 subroutine write_out_ungridded_dim_atts(dimLabel, rc) character(len=*) :: dimLabel integer, intent(out) :: rc @@ -3943,10 +3944,10 @@ subroutine write_out_ungridded_dim_atts(dimLabel, rc) endif end subroutine write_out_ungridded_dim_atts - !> ??? + !> Write out ungridded dimension attributes from the ESMF fields !> - !> @param[in] field ??? - !> @param[in] dimLablel ??? + !> @param[in] field ESMF field + !> @param[in] dimLabel Dimension label !> @param[out] rc Return code. !> !> @author J. Wang/G. Theurich @date Jul, 2017 @@ -4095,15 +4096,15 @@ end subroutine ioCompRun !----------------------------------------------------------------------------- - !> ??? + !> ESMF prototype to geta field on a single tile from a field on multitiles !> - !> @param[in] field ??? - !> @param[in] tile ??? - !> @param[in] tileField ??? - !> @param[in] petList ??? + !> @param[in] field ESMF field + !> @param[in] tile Tile number + !> @param[in] tileField ESMF field on the single tile + !> @param[in] petList PET list on the single tile !> @param[out] rc Return code. !> - !> @author J. Wang/G. Theurich @date Jul, 2017 + !> @author G. Theurich @date Jul, 2017 subroutine ESMFproto_FieldMakeSingleTile(field, tile, tileField, petList, rc) type(ESMF_Field), intent(in) :: field integer, intent(in) :: tile @@ -4303,13 +4304,13 @@ subroutine ESMFproto_FieldMakeSingleTile(field, tile, tileField, petList, rc) end subroutine ESMFproto_FieldMakeSingleTile - !> ??? + !> Compute sine latitiude in real(4) from grid type !> - !> @param[in] idrt ??? - !> @param[in] jmax ??? - !> @param[out] aslat ??? + !> @param[in] idrt Data representation type + !> @param[in] jmax Maximum on j-direction + !> @param[out] aslat SINE of latitude in real(4) !> - !> @author J. Wang/G. Theurich @date Jul, 2017 + !> @author J. Wang @date Jul, 2017 subroutine splat4(idrt,jmax,aslat) implicit none @@ -4420,13 +4421,13 @@ subroutine splat4(idrt,jmax,aslat) ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - end subroutine splat4 - !> ??? + !> Compute sine latitiude in real(8) from grid type !> - !> @param[in] idrt ??? - !> @param[in] jmax ??? - !> @param[out] aslat ??? + !> @param[in] idrt Data representation type + !> @param[in] jmax Maximum on j-direction + !> @param[out] aslat SINE of latitude in real(8) !> - !> @author J. Wang/G. Theurich @date Jul, 2017 + !> @author J. Wang @date Jul, 2017 subroutine splat8(idrt,jmax,aslat) !$$$ implicit none @@ -4536,16 +4537,16 @@ subroutine splat8(idrt,jmax,aslat) ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - end subroutine splat8 - !> ??? + !> Compute rotated lat/lon grid !> - !> @param[in] tlmd ??? - !> @param[in] tphd ??? - !> @param[in] almd ??? - !> @param[in] aphd ??? - !> @param[in] tlm0d ??? - !> @param[in] tph0d ??? + !> @param[in] tlmd Longitude + !> @param[in] tphd Latitude + !> @param[in] almd Rotated longitude + !> @param[in] aphd Rotated latitude + !> @param[in] tlm0d Central longitude + !> @param[in] tph0d Central latitude !> - !> @author J. Wang/G. Theurich @date Jul, 2017 + !> @author D. Jovic @date Jul, 2017 subroutine rtll(tlmd,tphd,almd,aphd,tlm0d,tph0d) !------------------------------------------------------------------------------- real(ESMF_KIND_R8), intent(in) :: tlmd, tphd @@ -4597,19 +4598,19 @@ subroutine rtll(tlmd,tphd,almd,aphd,tlm0d,tph0d) ! end subroutine rtll - !> ??? + !> Compute lambert comformal projection !> - !> @param[in] stlat1 ??? - !> @param[in] stlat2 ??? - !> @param[in] c_lat ??? - !> @param[in] c_lon ??? - !> @param[inout] glon ??? - !> @param[inout] glat ??? - !> @param[inout] x ??? - !> @param[inout] y ??? - !> @param[in] inv ??? + !> @param[in] stlat1 First standard parallel + !> @param[in] stlat2 Second standard parallel + !> @param[in] c_lat Central latitude + !> @param[in] c_lon Central longitude + !> @param[inout] glon Longitude + !> @param[inout] glat Latitude + !> @param[inout] x Lambert X coordinate + !> @param[inout] y Lambert Y coordinate + !> @param[in] inv Transformation indicator !> - !> @author J. Wang/G. Theurich @date Jul, 2017 + !> @author D. Jovic @date Jul, 2017 subroutine lambert(stlat1,stlat2,c_lat,c_lon,glon,glat,x,y,inv) !------------------------------------------------------------------------------- @@ -4670,14 +4671,14 @@ subroutine lambert(stlat1,stlat2,c_lat,c_lon,glon,glat,x,y,inv) return end subroutine lambert - !> ??? + !> Get output file names !> - !> @param[in] nfl ??? - !> @param[in] filename ??? - !> @param[in] outfile_name ??? - !> @param[in] noutfile ??? + !> @param[in] nfl Number of fields + !> @param[in] filename File name specified in each fiels + !> @param[in] outfile_name Output file names + !> @param[in] noutfile Number of output files !> - !> @author J. Wang/G. Theurich @date Jul, 2017 + !> @author J. Wang @date Jul, 2017 subroutine get_outfile(nfl, filename, outfile_name, noutfile) integer, intent(in) :: nfl character(*), intent(in) :: filename(:,:) @@ -4714,6 +4715,11 @@ subroutine get_outfile(nfl, filename, outfile_name, noutfile) end subroutine get_outfile + !> Trim the regridding interpolation method in a string suffix + !> + !> @param[in] string String with suffix + !> + !> @author J. Wang @date Jul, 2017 pure function trim_regridmethod_suffix(string) result(trimmed_string) character(len=*), intent(in) :: string character(len=:), allocatable :: trimmed_string @@ -4726,6 +4732,12 @@ pure function trim_regridmethod_suffix(string) result(trimmed_string) end function trim_regridmethod_suffix + !> Trim the suffix from a string + !> + !> @param[in] string String with suffix + !> @param[in] suffix Suffix string + !> + !> @author J. Wang @date Jul, 2017 pure function trim_suffix(string, suffix) result(trimmed_string) character(len=*), intent(in) :: string, suffix character(len=:), allocatable :: trimmed_string From 6c38a196caa83bdfc0b70183ad14a31f1369bbc7 Mon Sep 17 00:00:00 2001 From: Jun Wang Date: Thu, 15 Feb 2024 00:39:40 +0000 Subject: [PATCH 11/13] fixes from comments --- io/module_wrt_grid_comp.F90 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/io/module_wrt_grid_comp.F90 b/io/module_wrt_grid_comp.F90 index 4f041e0c6..128a449be 100644 --- a/io/module_wrt_grid_comp.F90 +++ b/io/module_wrt_grid_comp.F90 @@ -70,7 +70,7 @@ module module_wrt_grid_comp integer,save :: wrt_mpi_comm !< The mpi communicator in the write comp. integer,save :: idate(7) !< IO base time array integer,save :: start_time(7) !< Experiment starting time - logical,save :: write_nsflip !< Flag to flip vertical coordinate + logical,save :: write_nsflip !< Flag to flip y-coordinate logical,save :: change_wrtidate=.false. !< Flag to change output time integer,save :: frestart(999) = -1 !< Restart time/frequency array integer,save :: calendar_type = 3 !< Calendar type @@ -4537,12 +4537,12 @@ subroutine splat8(idrt,jmax,aslat) ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - end subroutine splat8 - !> Compute rotated lat/lon grid + !> Compute geographical lat/lon from rotated lat/lon grid !> - !> @param[in] tlmd Longitude - !> @param[in] tphd Latitude - !> @param[in] almd Rotated longitude - !> @param[in] aphd Rotated latitude + !> @param[in] tlmd Rotated Longitude + !> @param[in] tphd Rotated Latitude + !> @param[out] almd Geographical longitude + !> @param[out] aphd Geographical latitude !> @param[in] tlm0d Central longitude !> @param[in] tph0d Central latitude !> @@ -4675,8 +4675,8 @@ end subroutine lambert !> !> @param[in] nfl Number of fields !> @param[in] filename File name specified in each fiels - !> @param[in] outfile_name Output file names - !> @param[in] noutfile Number of output files + !> @param[inout] outfile_name Output file names + !> @param[inout] noutfile Number of output files !> !> @author J. Wang @date Jul, 2017 subroutine get_outfile(nfl, filename, outfile_name, noutfile) From b32d8a97ec15a9411bca4323bd21f53d4601f623 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Thu, 9 Jan 2025 13:17:55 -0700 Subject: [PATCH 12/13] updated CI --- .github/workflows/GCC.yml | 15 +--- .github/workflows/docs.yml | 138 +++++++++++++++++++++++++++++++++++++ 2 files changed, 141 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/GCC.yml b/.github/workflows/GCC.yml index 86d0bf668..4f8bbf7b5 100644 --- a/.github/workflows/GCC.yml +++ b/.github/workflows/GCC.yml @@ -74,8 +74,8 @@ jobs: steps: - # Only do Doxygen and gcovr build for one job - - name: decide-doc-gcovr-build + # Only do gcovr build for one job + - name: decide-gcovr-build run: | if [[ "${{ matrix.cmake_opts }}" == "-D32BIT=ON" && "${{ matrix.gcc_ver }}" == 12 && "${{ matrix.mpi }}" == mpich ]]; then echo 'devbuild=ON' | tee -a ${GITHUB_ENV} @@ -86,7 +86,6 @@ jobs: - name: install-utilities run: | - sudo apt-get install doxygen graphviz python3 -m pip install gcovr - name: install-cmake @@ -121,7 +120,7 @@ jobs: export CC=mpicc export CXX=mpicxx export FC=mpif90 - cmake ${GITHUB_WORKSPACE}/fv3atm -DBUILD_TESTING=ON ${{ matrix.cmake_opts }} -DENABLE_DOCS=ON ${{ env.gcov_cmake }} + cmake ${GITHUB_WORKSPACE}/fv3atm -DBUILD_TESTING=ON ${{ matrix.cmake_opts }} ${{ env.gcov_cmake }} make -j2 - name: run-tests @@ -144,14 +143,6 @@ jobs: ${{ github.workspace }}/build/*.html ${{ github.workspace }}/build/*.css - - name: upload-docs - uses: actions/upload-artifact@v4 - if: ${{ env.devbuild == 'ON' }} - with: - name: docs-fv3atm - path: | - build/docs/html - - name: debug-artifacts uses: actions/upload-artifact@v4 if: ${{ failure() }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000..fbc145e65 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,138 @@ +# This is a CI workflow for the fv3atm project. +# +# This workflow builds the fv3atm doxygen documentation. +# +# Ed Hartnett, 1/9/25 + +name: docs +on: + push: + branches: + - develop + pull_request: + branches: + - develop + +jobs: + build_spack: + runs-on: ubuntu-latest + + strategy: + matrix: + gcc_ver: ["12"] + mpi: ["mpich"] + + steps: + + - name: checkout-fv3atm + uses: actions/checkout@v4 + with: + path: ${{ github.workspace }}/fv3atm + submodules: recursive + + - name: install-cmake + run: | + cd ${{ github.workspace }} + curl -f -s -S -R -L https://github.com/Kitware/CMake/releases/download/v3.29.2/cmake-3.29.2-Linux-x86_64.tar.gz | tar -zx + echo "${{ github.workspace }}/cmake-3.29.2-linux-x86_64/bin" >> $GITHUB_PATH + + - name: cache-spack + id: cache-spack + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}/spack-develop + key: spack-${{ hashFiles('fv3atm/ci/spack.yaml') }}-gcc${{ matrix.gcc_ver }}-${{ matrix.mpi }} + + # Building dependencies takes 40+ min + - name: spack-install + if: steps.cache-spack.outputs.cache-hit != 'true' + run: | + wget --no-verbose https://github.com/spack/spack/archive/refs/heads/develop.zip + unzip develop.zip -d ${GITHUB_WORKSPACE}/ &> unzip.out + . ${GITHUB_WORKSPACE}/spack-develop/share/spack/setup-env.sh + spack env create gcc${{ matrix.gcc_ver }} ${GITHUB_WORKSPACE}/fv3atm/ci/spack.yaml + spack env activate gcc${{ matrix.gcc_ver }} + spack compiler find | grep gcc@${{ matrix.gcc_ver }} + spack external find gmake cmake git git-lfs perl python ${{ matrix.mpi }} + spack config add "packages:all:require:['%gcc@${{ matrix.gcc_ver }}']" + spack config add "packages:mpi:require:'${{ matrix.mpi }}'" + spack concretize |& tee ${SPACK_ENV}/log.concretize + spack install -j2 --fail-fast + echo "spackrc=$?" >> ${GITHUB_ENV} + spack clean --all + + build_docs: + needs: build_spack + runs-on: ubuntu-latest + + strategy: + matrix: + cmake_opts: ["-D32BIT=ON"] + gcc_ver: ["12"] + mpi: ["mpich"] + + steps: + + # Only do Doxygen and gcovr build for one job + - name: decide-doc-gcovr-build + run: | + if [[ "${{ matrix.cmake_opts }}" == "-D32BIT=ON" && "${{ matrix.gcc_ver }}" == 12 && "${{ matrix.mpi }}" == mpich ]]; then + echo 'devbuild=ON' | tee -a ${GITHUB_ENV} + echo 'gcov_cmake="-DCMAKE_Fortran_FLAGS=-fprofile-abs-path -fprofile-arcs -ftest-coverage -O0"' | tee -a ${GITHUB_ENV} + else + echo 'devbuild=OFF' | tee -a ${GITHUB_ENV} + fi + + - name: install-utilities + run: | + sudo apt-get install doxygen graphviz + + - name: install-cmake + run: | + cd ${{ github.workspace }} + curl -f -s -S -R -L https://github.com/Kitware/CMake/releases/download/v3.29.2/cmake-3.29.2-Linux-x86_64.tar.gz | tar -zx + echo "${{ github.workspace }}/cmake-3.29.2-linux-x86_64/bin" >> $GITHUB_PATH + + - name: checkout-fv3atm + uses: actions/checkout@v4 + with: + path: ${{ github.workspace }}/fv3atm + submodules: recursive + + - name: cache-spack + id: cache-spack + uses: actions/cache/restore@v4 + with: + path: ${{ github.workspace }}/spack-develop + key: spack-${{ hashFiles('fv3atm/ci/spack.yaml') }}-gcc${{ matrix.gcc_ver }}-${{ matrix.mpi }} + + - name: docs-build + run: | + . ${GITHUB_WORKSPACE}/spack-develop/share/spack/setup-env.sh + spack env activate gcc${{ matrix.gcc_ver }} + spack load $(spack find --format "{name}") + cd ${GITHUB_WORKSPACE}/fv3atm + git clone https://github.com/NOAA-EMC/CMakeModules + git clone --recurse-submodules https://github.com/NOAA-PSL/stochastic_physics stochastic_physics_repo + mkdir ${GITHUB_WORKSPACE}/build + cd ${GITHUB_WORKSPACE}/build + export CC=mpicc + export CXX=mpicxx + export FC=mpif90 + cmake ${GITHUB_WORKSPACE}/fv3atm -DBUILD_TESTING=ON ${{ matrix.cmake_opts }} -DENABLE_FV3ATM_DOCS=ON ${{ env.gcov_cmake }} + make doxygen_doc + + - name: upload-docs + uses: actions/upload-artifact@v4 + if: ${{ env.devbuild == 'ON' }} + with: + name: docs-fv3atm + path: | + build/docs/html + + - name: debug-artifacts + uses: actions/upload-artifact@v4 + if: ${{ failure() }} + with: + name: ccpp_prebuild_logs-gcc${{ matrix.gcc_ver }}-${{ matrix.mpi }}-${{ matrix.cmake_opts }} + path: ${{ github.workspace }}/build/ccpp/ccpp_prebuild.* From 0ae56b784d91629dbfaae6aa3fe578ccd79ddef4 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Thu, 9 Jan 2025 13:22:49 -0700 Subject: [PATCH 13/13] fixed cmake build for docs --- CMakeLists.txt | 4 ++-- docs/CMakeLists.txt | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cdf597df2..15e64d18b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,10 +4,10 @@ cmake_minimum_required(VERSION 3.19) # Handle user build options. -option(ENABLE_DOCS "Enable generation of doxygen-based documentation." OFF) +option(ENABLE_FV3ATM_DOCS "Enable generation of doxygen-based documentation." OFF) # Determine whether or not to generate documentation. -if(ENABLE_DOCS) +if(ENABLE_FV3ATM_DOCS) find_package(Doxygen REQUIRED) add_subdirectory(docs) endif() diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 6273869d8..7e89f275a 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -2,8 +2,6 @@ # # Ed Hartnett 12/28/23 -IF(ENABLE_DOCS) - # Create doxyfile. SET(abs_top_srcdir "${CMAKE_SOURCE_DIR}") SET(abs_top_builddir "${CMAKE_BINARY_DIR}") @@ -13,5 +11,4 @@ IF(ENABLE_DOCS) WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Generating API Documentation with Doxygen" VERBATIM) -ENDIF(ENABLE_DOCS)