hafs-community / HAFS

Hurricane Analysis and Forecast System
Other
29 stars 54 forks source link

Improve the documentation blocks in HAFS Fortran files #231

Open BinLiu-NOAA opened 9 months ago

BinLiu-NOAA commented 9 months ago

Description

From NCO SPA: Many Fortran files don't have documentation blocks, …. Please add these blocks as described in “NCO WCOSS Implementation Standards” (check also other directories).

Please continue to improve the documentation for HAFS source codes.

Here are some quick checks the HAFS Fortran codes with "authors" or "history" as the following - under /lfs/h1/ops/para/packages/hafs.v1.0.3/sorc

 find *fd/. -name "*.[fF]90" -type f > /lfs/h1/nco/ptmp/simon.hsiao/hafs.src.F90
 find *fd/. -name "*.[fF]" -type f > /lfs/h1/nco/ptmp/simon.hsiao/hafs.src.F
 grep -l -i -e "authors" -e "history" `find *fd/. -name "*.[fF]90" -type f` > /lfs/h1/nco/ptmp/simon.hsiao/hafs.src.doc.blocks.F90
 grep -l -i -e "authors" -e "history" `find *fd/. -name "*.[fF]" -type f` > /lfs/h1/nco/ptmp/simon.hsiao/hafs.src.doc.blocks.F

 for dir in `ls -d *fd`; do echo $dir; echo "total Fortran files: " `grep -e $dir /lfs//h1/nco/ptmp/simon.hsiao/hafs.src.F*|wc -l`; echo "Documentation counts: " ` grep -e $dir /lfs/h1/nco/ptmp/simon.hsiao/hafs.src.doc.blocks.F*|wc -l`  ; done                                                                                  

hafs_forecast.fd total Fortran files: 2789 Documentation counts: 1094 hafs_gsi.fd total Fortran files: 763 Documentation counts: 709 hafs_hycom_utils.fd total Fortran files: 145 Documentation counts: 8 hafs_post.fd total Fortran files: 155 Documentation counts: 97 hafs_tools.fd total Fortran files: 111 Documentation counts: 21 hafs_tracker.fd total Fortran files: 10 Documentation counts: 2 hafs_utils.fd total Fortran files: 435 Documentation counts: 78

Proposed solution

Status (optional)

Related to (optional)

BinLiu-NOAA commented 6 months ago

@yonghuiweng, could you please help to improve the documentation for the Fortran source codes under: sorc/hafs_tools.fd/sorc/hafs_datool? Note: Please make sure to include at least "Authors" and/or "History" sections/items in the source codes. Thanks!

BinLiu-NOAA commented 6 months ago

@ChuankaiWang-NOAA and @JunghoonShin-NOAA, please help to improve the documentation for the Fortran source codes under: sorc/hafs_tools.fd/sorc/hafs_vi Note: Please make sure to include at least "Authors" and/or "History" sections/items in the source codes. Thanks!

JunghoonShin-NOAA commented 6 months ago

@BinLiu-NOAA , Hello Bin, (correction in my question). I believe we can add "Authors" and/or "History" sections/items in "some major important" VI source codes of feature/hafsv2_final branch. Is this correct?

BinLiu-NOAA commented 6 months ago

@JunghoonShin-NOAA yes, that's the intention. I think as long as there is a Authors or History section (preferably near the beginning of each Fortran source code file) that will be sufficient. Please use the production/hafs.v2 branch though.

JunghoonShin-NOAA commented 6 months ago

@BinLiu-NOAA : I added author/history sections in the production/hafs.v2 branch VI codes as much as I could. I noted my code changes that I made in the HAFS-VI during the last two years. And in the subroutine codes of unknown origin, I didn’t add the author/history section or I simply noted Qingfu as the original author. Here is the location of VI codes that I added author/history sections.

/scratch1/NCEPDEV/hwrf/save/Junghoon.Shin/hafs.v2_prod/sorc/hafs_tools.fd/sorc/hafs_vi

Please let me know if you think more updates are needed. Thank you.

ChuankaiWang-NOAA commented 5 months ago

According to Junghoon's documentation, I added my part on those codes that I made changes on them. The codes locate /scratch1/NCEPDEV/hwrf/save/Chuan-kai.Wang/hafsv2_prod/sorc/hafs_tools.fd/sorc/hafs_vi/

Please let me know if there is anything I can improve on. Thanks.

ChuankaiWang-NOAA commented 5 months ago

The authors/history section has been added and pushed to production/hafs.v2 branch.