NCAR / wrf_hydro_nwm_public

WRF-Hydro model code
https://ral.ucar.edu/projects/wrf_hydro
Other
181 stars 139 forks source link

File Header Section Cleanup #720

Closed scrasmussen closed 4 months ago

scrasmussen commented 1 year ago

TYPE: no impact

KEYWORDS: cleanup

SOURCE: Soren Rasmussen, NCAR

DESCRIPTION OF CHANGES: Cleanup of the file header section since it is not used. Example of bash script used to automate process:

sstring="!  Program Name:
!  Author(s)/Contact(s):
!  Abstract:
!  History Log:
!  <brief list of changes to this source file>
!
!  Usage:
!  Parameters: <Specify typical arguments passed>
!  Input Files:
!        <list file names and briefly describe the data they include>
!  Output Files:
!        <list file names and briefly describe the information they include>
!
!  Condition codes:
!        <list exit condition or error codes returned >
!        If appropriate, descriptive troubleshooting instructions or
!        likely causes for failures could be mentioned here with the
!        appropriate error code
!
!  User controllable options: <if applicable>"

for f in "${filelist[@]}"; do
    hstring=$(head -n 20 "$f")
    if [ "$hstring" = "$sstring" ]; then
        tail -n +21 "$f" > temp_file
        mv temp_file "$f"
    fi
done

TESTS CONDUCTED: Not needed

NOTES: may not be an important change but it makes for easy programming during a late night bad horror movie 👻

Checklist