output_path_module Module

Output path for all output files Initialize output path - validates and creates directory if needed Get full output file path by prepending out_path to filename Open an output file with proper path handling This is a convenience wrapper that prepends out_path if set


Used by

  • module~~output_path_module~~UsedByGraph module~output_path_module output_path_module proc~co2_read co2_read proc~co2_read->module~output_path_module proc~header_aquifer header_aquifer proc~header_aquifer->module~output_path_module proc~header_channel header_channel proc~header_channel->module~output_path_module proc~header_const header_const proc~header_const->module~output_path_module proc~header_cs header_cs proc~header_cs->module~output_path_module proc~header_hyd header_hyd proc~header_hyd->module~output_path_module proc~header_lu_change header_lu_change proc~header_lu_change->module~output_path_module proc~header_mgt header_mgt proc~header_mgt->module~output_path_module proc~header_path header_path proc~header_path->module~output_path_module proc~header_pest header_pest proc~header_pest->module~output_path_module proc~header_reservoir header_reservoir proc~header_reservoir->module~output_path_module proc~header_salt header_salt proc~header_salt->module~output_path_module proc~header_sd_channel header_sd_channel proc~header_sd_channel->module~output_path_module proc~header_snutc header_snutc proc~header_snutc->module~output_path_module proc~header_water_allocation header_water_allocation proc~header_water_allocation->module~output_path_module proc~header_wetland header_wetland proc~header_wetland->module~output_path_module proc~header_write header_write proc~header_write->module~output_path_module proc~header_yield header_yield proc~header_yield->module~output_path_module proc~output_landscape_init output_landscape_init proc~output_landscape_init->module~output_path_module proc~proc_bsn proc_bsn proc~proc_bsn->module~output_path_module proc~proc_hru proc_hru proc~proc_hru->module~output_path_module proc~readcio_read readcio_read proc~readcio_read->module~output_path_module

Variables

Type Visibility Attributes Name Initial
character(len=256), public :: out_path = ""

Functions

public function get_output_filename(filename) result(full_path)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filename

Return Value character(len=512)


Subroutines

public subroutine init_output_path(path_in)

If null or empty, use current directory (no prefix needed) Copy and process the path Handle path separators based on OS On Windows: convert forward slashes to backslashes Check if this looks like a Unix absolute path on Windows (starts with /) If so, prepend C: Remove trailing backslash(es) for consistent processing On Unix: convert backslashes to forward slashes Check if this looks like a Windows path on Unix Remove trailing slash(es) for consistent processing Store path for mkdir (without trailing separator) Add trailing separator for out_path (used when building file paths) Create the directory Windows: use cmd /c to run mkdir and suppress output Unix: use mkdir -p (creates parent directories, no error if exists) Verify directory exists using INQUIRE If inquire failed, try alternate method - check via directory listing Windows check Unix check Write confirmation

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: path_in

public subroutine open_output_file(iunit, filename, recl_val)

Open with or without recl

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: iunit

unit number

character(len=*), intent(in) :: filename

output filename

integer, intent(in), optional :: recl_val

record length (optional)