Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate
SW_netCDF.c
into General
, Input
and Output
- Motivation: With nc inputs coming with the branch, it is good to modularize the different functionalities - Rename current `SW_netCDF.c` to `SW_netCDF_General.c` - Create two new files including their own header file * SW_netCDF_Input.c * SW_netCDF_Output.c - SW_netCDF_General.c * Provides general functionality between itself and the two other files * This file includes - The writing/getting of attribute/values from netCDF variables/dimensions - The full creation of templates and variables - Getting dimension sizes - Reading input/output information * Most functions that were previously static in SW_netCDF.c have been converted to functions with global-level visibility or were moved to the other two files - SW_netCDF_Output.c * Contains functionality that pertains to netCDF outputs * Main functionalities that are contained within this are - Reading the output variable information into the program - Conversion from SOILWAT2 units to output units - Creation of and writing to output files - SW_netCDF_Input.c * Contains functionality that pertains to netCDF inputs * Main functionalities that are contained within this are - Creating/modifying domain/progress files - Reading user inputted values - Modified function `SW_NC_init_ptrs()` to call helper functions within Output and Input files * `SW_NCOUT_init_ptrs()` and `SW_NCIN_init_ptrs()` do mostly the same of what `SW_NC_init_ptrs()` did minus the point below - Removed commented chunk of code from `SW_OUTDOM_init_ptrs()` and placed it in `SW_NCIN_init_ptrs()` - Moved static local variables and defines to their respective file
- Loading branch information