OpenFAST
Wind turbine multiphysics simulator
|
This module contains I/O-related variables and routines with non-system-specific logic. More...
Data Types | |
interface | allocary |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
interface | allocpary |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
interface | checkrealvar |
This routine checks that real values are finite and not NaNs. More... | |
interface | dispnvd |
This routine displays the name of the program, its version, and its release date. More... | |
type | fnlist_type |
This type stores a linked list of file names, used in MLB-style input file parsing (currently used in AirfoilInfo) More... | |
interface | initfileinfo |
interface | num2lstr |
This function returns a left-adjusted string representing the passed numeric value. More... | |
interface | parseary |
interface | parsevar |
This subroutine parses the specified line of text for two words. More... | |
interface | parsevarwdefault |
This subroutine parses the specified line of text for two words. More... | |
type | progdesc |
interface | readary |
This routine reads a AryLen values separated by whitespace (or other Fortran record delimiters such as commas) into an array (either on same line or multiple lines). More... | |
interface | readarylines |
This routine reads a AryLen values into a real array from the next AryLen lines of the input file (one value per line). More... | |
interface | readvar |
This routine reads a variable from the next line of the input file. More... | |
interface | readvarwdefault |
This routine reads a scalar variable from the next line of the input file. More... | |
interface | wrmatrix |
This routine writes all the values of a 1- or 2-dimensional array, A, of real numbers to unit Un, using ReFmt for each individual value in the array. More... | |
interface | wrnumaryfilenr |
This routine writes out a real array to the file connected to Unit without following it with a new line. More... | |
interface | wrpartialmatrix |
Based on nwtc_io::wrmatrix, this routine writes a matrix to an already-open text file. More... | |
Functions/Subroutines | |
character(200) function | getnvd (ProgInfo) |
This function extracts the Name field from the ProgDesc data type. More... | |
subroutine | dispnvd0 () |
This routine displays the name of the program, its version, and its release date. More... | |
subroutine | dispnvd1 (ProgInfo, DispNWTCVer) |
This routine displays the name of the program, its version, and its release date. More... | |
subroutine | dispnvd2 (Name, Ver) |
This routine displays the name of the program, its version, and its release date passed in as strings This routine is depricated and for legacy purposes only. More... | |
character(11) function | int2lstr (Num) |
This function returns a left-adjusted string representing the passed numeric value. More... | |
character(15) function | r2lstr4 (FltNum) |
character(15) function | r2lstr8 (FltNum) |
character(15) function | r2lstr16 (FltNum) |
subroutine | adjrealstr (NumStr) |
This routine adjusts strings created from real numbers (4, 8, or 16-byte) More... | |
recursive subroutine | wrscr (InStr) |
This routine writes out a string to the screen. More... | |
subroutine | wrscr1 (Str) |
This routine writes out a string to the screen after a blank line. More... | |
subroutine | getnewunit (UnIn, ErrStat, ErrMsg) |
This routine returns the next unit number greater than 9 that is not currently in use. More... | |
subroutine | conv2uc (Str) |
This routine converts all the text in a string to upper case. More... | |
subroutine | openfinpfile (Un, InFile, ErrStat, ErrMsg) |
subroutine | openfoutfile (Un, OutFile, ErrStat, ErrMsg) |
subroutine | waittime (WaitSecs) |
This routine pauses program executaion for a specified number of seconds. More... | |
subroutine | progpause () |
This routine pauses the program. More... | |
subroutine | progwarn (Message) |
This routine outputs non-fatal warning messages and returns to the calling routine. More... | |
subroutine | progabort (Message, TrapErrors, TimeWait, ErrLevel) |
This routine outputs fatal error messages and stops the program. More... | |
character(11) function | curdate () |
This function returns a character string encoded with today's date in the form dd-mmm-ccyy. More... | |
character(8) function | curtime () |
This function returns a character string encoded with the time in the form "hh:mm:ss". More... | |
subroutine | findline (Str, MaxLen, StrEnd) |
This routine finds one line of text with a maximum length of MaxLen from the Str. More... | |
subroutine | nameofile (InArg, OutExten, OutFile, ErrStat) |
subroutine | getroot (GivenFil, RootName) |
Let's parse the root file name from the name of the given file. More... | |
subroutine | allcary1 (Ary, AryDim1, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | allcary2 (Ary, AryDim1, AryDim2, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | allcary3 (Ary, AryDim1, AryDim2, AryDim3, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | alli1bary1 (Ary, AryDim1, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | alli2bary1 (Ary, AryDim1, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | alli4bary1 (Ary, AryDim1, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | alliary2 (Ary, AryDim1, AryDim2, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | alliary3 (Ary, AryDim1, AryDim2, AryDim3, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | allipary1 (Ary, AryDim1, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | allipary2 (Ary, AryDim1, AryDim2, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | allfpary1 (Ary, AryDim1, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | allrpary2 (Ary, AryDim1, AryDim2, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | allr4pary3 (Ary, AryDim1, AryDim2, AryDim3, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | allr8pary3 (Ary, AryDim1, AryDim2, AryDim3, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | allr16pary3 (Ary, AryDim1, AryDim2, AryDim3, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | alllary1 (Ary, AryDim1, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | alllary2 (Ary, AryDim1, AryDim2, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | alllary3 (Ary, AryDim1, AryDim2, AryDim3, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | allr4ary1 (Ary, AryDim1, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | allr8ary1 (Ary, AryDim1, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | allr16ary1 (Ary, AryDim1, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | allr4ary2 (Ary, AryDim1, AryDim2, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | allr8ary2 (Ary, AryDim1, AryDim2, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | allr16ary2 (Ary, AryDim1, AryDim2, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | allr4ary3 (Ary, AryDim1, AryDim2, AryDim3, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | allr8ary3 (Ary, AryDim1, AryDim2, AryDim3, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | allr16ary3 (Ary, AryDim1, AryDim2, AryDim3, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | allr4ary4 (Ary, AryDim1, AryDim2, AryDim3, AryDim4, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | allr8ary4 (Ary, AryDim1, AryDim2, AryDim3, AryDim4, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | allr16ary4 (Ary, AryDim1, AryDim2, AryDim3, AryDim4, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | allr4ary5 (Ary, AryDim1, AryDim2, AryDim3, AryDim4, AryDim5, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | allr8ary5 (Ary, AryDim1, AryDim2, AryDim3, AryDim4, AryDim5, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | allr16ary5 (Ary, AryDim1, AryDim2, AryDim3, AryDim4, AryDim5, Descr, ErrStat, ErrMsg) |
This routine allocates an array to the size specified in the AryDim input arguement(s). More... | |
subroutine | chkparsedata (Words, ExpVarName, FileName, FileLineNum, NameIndx, ErrStat, ErrMsg) |
This subroutine checks the data to be parsed to make sure it finds the expected variable name and an associated value. More... | |
subroutine | chkrealfmtstr (RealFmt, RealFmtVar, FmtWidth, ErrStat, ErrMsg) |
This routine tests to make sure we have a valid format string for real numbers (i.e., it doesn't produce "****"). More... | |
subroutine | checkios (IOS, Fil, Variable, VarType, ErrStat, ErrMsg, TrapErrors) |
This routine checks the I/O status and prints either an end-of-file or an invalid-input message, and then aborts the program or returns an appropriate error level and message. More... | |
subroutine | checkr4var (RealVar, RealDesc, ErrStat, ErrMsg) |
This routine checks that real values are finite and not NaNs. More... | |
subroutine | checkr8var (RealVar, RealDesc, ErrStat, ErrMsg) |
This routine checks that real values are finite and not NaNs. More... | |
subroutine | checkr16var (RealVar, RealDesc, ErrStat, ErrMsg) |
This routine checks that real values are finite and not NaNs. More... | |
integer function | countwords (Line) |
This subroutine is used to count the number of "words" in a line of text. More... | |
subroutine | dispcopyrightlicense (ProgramName, AdditionalComment) |
This routine displays some text about copyright and license. More... | |
subroutine | dlltypepack (InData, ReKiBuf, DbKiBuf, IntKiBuf, ErrStat, ErrMsg, SizeOnly) |
This routine packs the DLL_Type (nwtc_base::dll_type) data into an integer buffer. More... | |
subroutine | dlltypeunpack (OutData, ReKiBuf, DbKiBuf, IntKiBuf, ErrStat, ErrMsg) |
This routine unpacks the DLL_Type data from an integer buffer. More... | |
character(13) function | geterrstr (ErrID) |
This function returns a text description of the ErrID (ErrStat) code. More... | |
subroutine | getpath (GivenFil, PathName, FileName) |
Let's parse the path name from the name of the given file. More... | |
subroutine | gettokens (Line, NumTok, Tokens, Error) |
This routine will parse Line for NumTok "tokens" and return them in the Tokens array. More... | |
subroutine | getwords (Line, Words, NumWords) |
This subroutine is used to get the NumWords "words" from a line of text. More... | |
subroutine | intary2str (IntAry, Str, ErrStat, ErrMsg) |
This routine converts an ASCII array of integers into an equivalent string (character array). More... | |
logical function | iscomment (StringToCheck) |
This function returns true if and only if the first character of the input StringToCheck matches on the of comment characters nwtc_io::commchars. More... | |
subroutine | nameofile (InArg, OutExten, OutFile, ErrStat, ErrMsg) |
This routine gets the name of the input file from the InArgth command-line argument, removes the extension if there is one, and appends OutExten to the end. More... | |
subroutine | normstop () |
This routine performs a normal termination of the program. More... | |
subroutine | nwtc_displaysyntax (DefaultInputFile, ThisProgName) |
This routine displays the expected command-line syntax for most software developed at the NWTC. More... | |
subroutine | openbinpfile (Un, InFile, ErrStat, ErrMsg) |
This routine opens a binary input file. More... | |
subroutine | openboutfile (Un, OutFile, ErrStat, ErrMsg) |
This routine opens a binary output file with stream access, implemented in standrad Fortran 2003. More... | |
subroutine | openecho (Un, OutFile, ErrStat, ErrMsg, ProgVer) |
This routine opens a formatted output file for the echo file. More... | |
subroutine | openfinpfile (Un, InFile, ErrStat, ErrMsg) |
This routine opens a formatted input file. More... | |
subroutine | openfoutfile (Un, OutFile, ErrStat, ErrMsg) |
This routine opens a formatted output file. More... | |
subroutine | openfunkfile (Un, OutFile, FailAbt, Failed, Exists, ErrStat, ErrMsg) |
This routine opens a formatted output file and returns a flag telling if it already existed. More... | |
subroutine | openfunkfileappend (Un, OutFile, ErrStat, ErrMsg) |
This routine opens a formatted output file in append mode if it exists, otherwise opens a new file. | |
subroutine | openuinbefile (Un, InFile, RecLen, ErrStat, ErrMsg) |
This routine opens an unformatted input file of RecLen-byte data records stored in Big Endian format. More... | |
subroutine | openuinfile (Un, InFile, ErrStat, ErrMsg) |
This routine opens an unformatted input file. More... | |
subroutine | openuoutfile (Un, OutFile, ErrStat, ErrMsg) |
This routine opens an unformatted output file. More... | |
subroutine | print_fileinfo_struct (U, FileInfo) |
This subroutine prints the contents of the FileInfo data structure to the screen This may be useful for diagnostic purposes. More... | |
subroutine | parsechary (FileInfo, LineNum, AryName, Ary, AryLen, ErrStat, ErrMsg, UnEc) |
This subroutine parses the specified line of text for AryLen CHARACTER values. More... | |
subroutine | parsecom (FileInfo, LineNum, Var, ErrStat, ErrMsg, UnEc) |
This subroutine parses a comment line. More... | |
subroutine | parsechvar (FileInfo, LineNum, ExpVarName, Var, ErrStat, ErrMsg, UnEc) |
This subroutine parses the specified line of text for two words. More... | |
subroutine | parsechvarwdefault (FileInfo, LineNum, ExpVarName, Var, VarDefault, ErrStat, ErrMsg, UnEc) |
This subroutine parses the specified line of text for two words. More... | |
subroutine | parser8ary (FileInfo, LineNum, AryName, Ary, AryLen, ErrStat, ErrMsg, UnEc) |
This subroutine parses the specified line of text for AryLen REAL values. More... | |
subroutine | parser8var (FileInfo, LineNum, ExpVarName, Var, ErrStat, ErrMsg, UnEc) |
This subroutine parses the specified line of text for two words. More... | |
subroutine | parser8varwdefault (FileInfo, LineNum, ExpVarName, Var, VarDefault, ErrStat, ErrMsg, UnEc) |
This subroutine parses the specified line of text for two words. More... | |
subroutine | parsequary (FileInfo, LineNum, AryName, Ary, AryLen, ErrStat, ErrMsg, UnEc) |
This subroutine parses the specified line of text for AryLen REAL values. More... | |
subroutine | parsequvar (FileInfo, LineNum, ExpVarName, Var, ErrStat, ErrMsg, UnEc) |
This subroutine parses the specified line of text for two words. More... | |
subroutine | parsequvarwdefault (FileInfo, LineNum, ExpVarName, Var, VarDefault, ErrStat, ErrMsg, UnEc) |
This subroutine parses the specified line of text for two words. More... | |
subroutine | parseinary (FileInfo, LineNum, AryName, Ary, AryLen, ErrStat, ErrMsg, UnEc) |
subroutine | parseinclinfo (InclInfo, RelativePathFileName, FileName, RangeBeg, RangeEnd, ErrStat, ErrMsg) |
This subroutine parses the include information that occurs after a "@" when processing an input file. More... | |
subroutine | parseinvar (FileInfo, LineNum, ExpVarName, Var, ErrStat, ErrMsg, UnEc) |
This subroutine parses the specified line of text for two words. More... | |
subroutine | parseinvarwdefault (FileInfo, LineNum, ExpVarName, Var, VarDefault, ErrStat, ErrMsg, UnEc) |
This subroutine parses the specified line of text for two words. More... | |
subroutine | parseloary (FileInfo, LineNum, AryName, Ary, AryLen, ErrStat, ErrMsg, UnEc) |
subroutine | parselovar (FileInfo, LineNum, ExpVarName, Var, ErrStat, ErrMsg, UnEc) |
This subroutine parses the specified line of text for two words. More... | |
subroutine | parselovarwdefault (FileInfo, LineNum, ExpVarName, Var, VarDefault, ErrStat, ErrMsg, UnEc) |
This subroutine parses the specified line of text for two words. More... | |
subroutine | parsesiary (FileInfo, LineNum, AryName, Ary, AryLen, ErrStat, ErrMsg, UnEc) |
subroutine | parsesivar (FileInfo, LineNum, ExpVarName, Var, ErrStat, ErrMsg, UnEc) |
This subroutine parses the specified line of text for two words. More... | |
subroutine | parsesivarwdefault (FileInfo, LineNum, ExpVarName, Var, VarDefault, ErrStat, ErrMsg, UnEc) |
This subroutine parses the specified line of text for two words. More... | |
logical function | pathisrelative (GivenFil) |
This routine determines if the given file name is absolute or relative. More... | |
subroutine | premeof (Fil, Variable, TrapErrors, ErrMsg) |
This routine prints out an end-of-file message and aborts the program. More... | |
subroutine | initfileinfo_fromnullcstring (FileString, FileInfo, ErrStat, ErrMsg) |
The following takes an input file as a C_Char string with C_NULL_CHAR deliniating line endings. More... | |
subroutine | initfileinfo_fromstringarray (StringArray, FileInfo, ErrStat, ErrMsg) |
subroutine | processcomfile (TopFileName, FileInfo, ErrStat, ErrMsg) |
This routine calls ScanComFile (nwtc_io::scancomfile) and ReadComFile (nwtc_io::readcomfile) to move non-comments in a set of nested files starting with TopFile into the FileInfo (nwtc_io::fileinfo) structure. More... | |
character(15) function | r2lstr4 (Num, Fmt_in) |
This function returns a left-adjusted string representing the passed numeric value. More... | |
character(15) function | r2lstr8 (Num, Fmt_in) |
This function returns a left-adjusted string representing the passed numeric value. More... | |
character(15) function | r2lstr16 (Num, Fmt_in) |
This function returns a left-adjusted string representing the passed numeric value. More... | |
subroutine | readcary (UnIn, Fil, Ary, AryLen, AryName, AryDescr, ErrStat, ErrMsg, UnEc) |
This routine reads a AryLen values separated by whitespace (or other Fortran record delimiters such as commas) into an array (either on same line or multiple lines). More... | |
subroutine | readcaryfromstr (Str, Ary, AryLen, AryName, AryDescr, ErrStat, ErrMsg, UnEc) |
This routine reads a AryLen values separated by whitespace (or other Fortran record delimiters such as commas) into an array (either on same line or multiple lines) from an input string Use ReadAry (nwtc_io::readary) instead of directly calling a specific routine in the generic interface. More... | |
subroutine | readcarylines (UnIn, Fil, Ary, AryLen, AryName, AryDescr, ErrStat, ErrMsg, UnEc) |
This routine reads a AryLen values into a real array from the next AryLen lines of the input file (one value per line). More... | |
subroutine | readcom (UnIn, Fil, ComName, ErrStat, ErrMsg, UnEc, Comment) |
This routine reads a comment from the next line of the input file. More... | |
recursive subroutine | readcomfile (FileInfo, FileIndx, AryInd, StartLine, LastLine, ErrStat, ErrMsg) |
This routine opens and reads the contents of a file with comments and stores the good stuff in the FileInfo structure. More... | |
subroutine | readcvar (UnIn, Fil, Var, VarName, VarDescr, ErrStat, ErrMsg, UnEc) |
This routine reads a variable from the next line of the input file. More... | |
subroutine | readfastbin (UnIn, Init, FASTdata, ErrStat, ErrMsg) |
This routine reads the contents of a FAST binary output file (FASTbinFile) and stores it in FASTdata. More... | |
subroutine | readiary (UnIn, Fil, Ary, AryLen, AryName, AryDescr, ErrStat, ErrMsg, UnEc) |
This routine reads a AryLen values separated by whitespace (or other Fortran record delimiters such as commas) into an array (either on same line or multiple lines). More... | |
subroutine | readivar (UnIn, Fil, Var, VarName, VarDescr, ErrStat, ErrMsg, UnEc) |
This routine reads a variable from the next line of the input file. More... | |
subroutine | readivarwdefault (UnIn, Fil, Var, VarName, VarDescr, VarDefault, ErrStat, ErrMsg, UnEc) |
This routine reads a scalar variable from the next line of the input file. More... | |
subroutine | readlvarwdefault (UnIn, Fil, Var, VarName, VarDescr, VarDefault, ErrStat, ErrMsg, UnEc) |
This routine reads a logical variable from the next line of the input file. More... | |
subroutine | readlary (UnIn, Fil, Ary, AryLen, AryName, AryDescr, ErrStat, ErrMsg, UnEc) |
This routine reads a AryLen values separated by whitespace (or other Fortran record delimiters such as commas) into an array (either on same line or multiple lines). More... | |
subroutine | readline (UnIn, CommentChars, Line, LineLen, IOStat) |
This routine reads a line from the specified input file and returns the non-comment portion of the line. More... | |
subroutine | readlvar (UnIn, Fil, Var, VarName, VarDescr, ErrStat, ErrMsg, UnEc) |
This routine reads a variable from the next line of the input file. More... | |
subroutine | readnum (UnIn, Fil, Word, VarName, ErrStat, ErrMsg) |
This routine reads a single word from a file and tests to see if it's a pure number (no true or false). More... | |
subroutine | readoutputlist (UnIn, Fil, CharAry, AryLenRead, AryName, AryDescr, ErrStat, ErrMsg, UnEc) |
This routine reads up to MaxAryLen values from an input file and store them in CharAry(:). More... | |
subroutine | readoutputlistfromfileinfo (FileInfo, LineNum, CharAry, AryLenRead, AryName, AryDescr, ErrStat, ErrMsg, UnEc) |
This routine reads up to MaxAryLen values from an input file and store them in CharAry(:). More... | |
subroutine | readr4ary (UnIn, Fil, Ary, AryLen, AryName, AryDescr, ErrStat, ErrMsg, UnEc) |
This routine reads a AryLen values separated by whitespace (or other Fortran record delimiters such as commas) into an array (either on same line or multiple lines). More... | |
subroutine | readr4aryfromstr (Str, Ary, AryLen, AryName, AryDescr, ErrStat, ErrMsg, UnEc) |
This routine reads a AryLen values separated by whitespace (or other Fortran record delimiters such as commas) into an array (either on same line or multiple lines) from an input string Use ReadAry (nwtc_io::readary) instead of directly calling a specific routine in the generic interface. More... | |
subroutine | readr8ary (UnIn, Fil, Ary, AryLen, AryName, AryDescr, ErrStat, ErrMsg, UnEc) |
This routine reads a AryLen values separated by whitespace (or other Fortran record delimiters such as commas) into an array (either on same line or multiple lines). More... | |
subroutine | readr8aryfromstr (Str, Ary, AryLen, AryName, AryDescr, ErrStat, ErrMsg, UnEc) |
This routine reads a AryLen values separated by whitespace (or other Fortran record delimiters such as commas) into an array (either on same line or multiple lines) from an input string Use ReadAry (nwtc_io::readary) instead of directly calling a specific routine in the generic interface. More... | |
subroutine | readr16ary (UnIn, Fil, Ary, AryLen, AryName, AryDescr, ErrStat, ErrMsg, UnEc) |
This routine reads a AryLen values separated by whitespace (or other Fortran record delimiters such as commas) into an array (either on same line or multiple lines). More... | |
subroutine | readr16aryfromstr (Str, Ary, AryLen, AryName, AryDescr, ErrStat, ErrMsg, UnEc) |
This routine reads a AryLen values separated by whitespace (or other Fortran record delimiters such as commas) into an array (either on same line or multiple lines) from an input string Use ReadAry (nwtc_io::readary) instead of directly calling a specific routine in the generic interface. More... | |
subroutine | readr4arylines (UnIn, Fil, Ary, AryLen, AryName, AryDescr, ErrStat, ErrMsg, UnEc) |
This routine reads a AryLen values into a real array from the next AryLen lines of the input file (one value per line). More... | |
subroutine | readr8arylines (UnIn, Fil, Ary, AryLen, AryName, AryDescr, ErrStat, ErrMsg, UnEc) |
This routine reads a AryLen values into a real array from the next AryLen lines of the input file (one value per line). More... | |
subroutine | readr16arylines (UnIn, Fil, Ary, AryLen, AryName, AryDescr, ErrStat, ErrMsg, UnEc) |
This routine reads a AryLen values into a real array from the next AryLen lines of the input file (one value per line). More... | |
subroutine | readr4var (UnIn, Fil, Var, VarName, VarDescr, ErrStat, ErrMsg, UnEc) |
This routine reads a variable from the next line of the input file. More... | |
subroutine | readr4varwdefault (UnIn, Fil, Var, VarName, VarDescr, VarDefault, ErrStat, ErrMsg, UnEc) |
This routine reads a scalar variable from the next line of the input file. More... | |
subroutine | readr8var (UnIn, Fil, Var, VarName, VarDescr, ErrStat, ErrMsg, UnEc) |
This routine reads a variable from the next line of the input file. More... | |
subroutine | readr8varwdefault (UnIn, Fil, Var, VarName, VarDescr, VarDefault, ErrStat, ErrMsg, UnEc) |
This routine reads a scalar variable from the next line of the input file. More... | |
subroutine | readr16var (UnIn, Fil, Var, VarName, VarDescr, ErrStat, ErrMsg, UnEc) |
This routine reads a variable from the next line of the input file. More... | |
subroutine | readr16varwdefault (UnIn, Fil, Var, VarName, VarDescr, VarDefault, ErrStat, ErrMsg, UnEc) |
This routine reads a scalar variable from the next line of the input file. More... | |
subroutine | readstr (UnIn, Fil, CharVar, VarName, VarDescr, ErrStat, ErrMsg, UnEc) |
This routine reads a string from the next line of the input file. More... | |
subroutine | removenullchar (Str) |
This routine removes trailing C_NULL characters, which can be present when passing strings between C and Fortran. More... | |
recursive subroutine | scancomfile (FirstFile, ThisFile, LastFile, StartLine, LastLine, NumLines, ErrStat, ErrMsg) |
This routine opens and scans the contents of a file with comments counting non-comment lines. More... | |
subroutine | str2intary (Str, IntAry, ErrStat, ErrMsg) |
This routine converts a string (character array) into an equivalent ASCII array of integers. More... | |
subroutine | wrbinfast (FileName, FileID, DescStr, ChanName, ChanUnit, TimeData, AllOutData, ErrStat, ErrMsg) |
This subroutine opens a binary file named FileName, and writes a the AllOutData Matrix to a 16-bit packed binary file. More... | |
subroutine | wrfilenr (Unit, Str) |
This routine writes out a string to the file connected to Unit without following it with a new line. More... | |
subroutine | wrmatrix1r4 (A, Un, ReFmt, MatName) |
This routine writes all the values of a 1- or 2-dimensional array, A, of real numbers to unit Un, using ReFmt for each individual value in the array. More... | |
subroutine | wrmatrix1r8 (A, Un, ReFmt, MatName) |
This routine writes all the values of a 1- or 2-dimensional array, A, of real numbers to unit Un, using ReFmt for each individual value in the array. More... | |
subroutine | wrmatrix1r16 (A, Un, ReFmt, MatName) |
This routine writes all the values of a 1- or 2-dimensional array, A, of real numbers to unit Un, using ReFmt for each individual value in the array. More... | |
subroutine | wrmatrix2r4 (A, Un, ReFmt, MatName) |
This routine writes all the values of a 1- or 2-dimensional array, A, of real numbers to unit Un, using ReFmt for each individual value in the array. More... | |
subroutine | wrmatrix2r8 (A, Un, ReFmt, MatName) |
This routine writes all the values of a 1- or 2-dimensional array, A, of real numbers to unit Un, using ReFmt for each individual value in the array. More... | |
subroutine | wrmatrix2r16 (A, Un, ReFmt, MatName) |
This routine writes all the values of a 1- or 2-dimensional array, A, of real numbers to unit Un, using ReFmt for each individual value in the array. More... | |
subroutine | wrpartialmatrix1r8 (A, Un, ReFmt, MatName, UseCol, UseAllCols, ExtCol) |
Based on nwtc_io::wrmatrix, this routine writes a matrix to an already-open text file. More... | |
subroutine | wrpartialmatrix2r8 (A, Un, ReFmt, MatName, UseRow, UseCol, UseAllRows, UseAllCols, ExtCol) |
Based on nwtc_io::wrmatrix, this routine writes a matrix to an already-open text file. More... | |
subroutine | wrpr (Str) |
This routine writes out a prompt to the screen without following it with a new line, though a new line precedes it. More... | |
subroutine | wrr4aryfilenr (Unit, Ary, Fmt, ErrStat, ErrMsg) |
This routine writes out a real array to the file connected to Unit without following it with a new line. More... | |
subroutine | wriaryfilenr (Unit, Ary, Fmt, ErrStat, ErrMsg) |
This routine writes out an integer array to the file connected to Unit without following it with a new line. More... | |
subroutine | wrr8aryfilenr (Unit, Ary, Fmt, ErrStat, ErrMsg) |
This routine writes out a real array to the file connected to Unit without following it with a new line. More... | |
subroutine | wrr16aryfilenr (Unit, Ary, Fmt, ErrStat, ErrMsg) |
This routine writes out a real array to the file connected to Unit without following it with a new line. More... | |
subroutine | wrvtk_header (FileName, NumberOfPoints, NumberOfLines, NumberOfPolys, Un, ErrStat, ErrMsg) |
This routine writes out the heading for an vtk xml file (associated footer generated in nwtc_io::wrvtk_footer). More... | |
subroutine | wrvtk_footer (Un) |
This routine writes out the footer for an vtk xml file (associated header generated in nwtc_io::wrvtk_header). More... | |
subroutine | readvtk_sp_info (FileName, descr, dims, origin, gridSpacing, vecLabel, Un, ErrStat, ErrMsg) |
This routine reads the header for a vtk, ascii, structured_points dataset file, including all the information about the structured points. More... | |
subroutine | readvtk_sp_vectors (FileName, Un, dims, gridVals, ErrStat, ErrMsg) |
This routine reads the vector data for a vtk, ascii, structured_points dataset file, The Unit number of the file is already assumed to be valid via a previous call to ReadVTK_SP_info. More... | |
subroutine | wrvtk_sp_header (FileName, descr, Un, ErrStat, ErrMsg) |
This routine writes out the heading for an vtk, ascii, structured_points dataset file . More... | |
subroutine | wrvtk_sp_vectors3d (Un, dataDescr, dims, origin, gridSpacing, gridVals, ErrStat, ErrMsg) |
Variables | |
character(20) | progname = ' ' |
The name of the calling program. More... | |
character(99) | progver = ' ' |
The version (including date) of the calling program. More... | |
character(1), parameter | tab = CHAR( 9 ) |
The tab character. More... | |
type(progdesc), parameter | nwtc_ver = ProgDesc( 'NWTC Subroutine Library', 'reduced_by_TMcCoy', '3-Dec-2013') |
The name, version, and date of the NWTC Subroutine Library. | |
integer(intki), parameter | explicitloose = 1 |
parameter for global coupling scheme explicit-loose type | |
integer(intki), parameter | flgtype = 1 |
Switch for telling if a variable is a flag (logical). More... | |
integer(intki), parameter | numtype = 2 |
Switch for telling if a variable is a number. More... | |
integer(intki), parameter | strtype = 3 |
Switch for telling if a variable is a string. More... | |
integer(b2ki), parameter | filefmtid_withtime = 1 |
ID for FAST Output File Format, specifies that the time channel is included in the output file (use if the output can occur at variable times) | |
integer(b2ki), parameter | filefmtid_withouttime = 2 |
ID for FAST Output File Format, specifies that the time channel is not included in the output file (used only with constant time-step output) | |
integer(b2ki), parameter | filefmtid_nocompresswithouttime = 3 |
ID for FAST Output File Format, specifies that the time channel is not included in the output file (used only with constant time-step output), and data is not compressed, but written as double-precision floats. | |
integer(b2ki), parameter | filefmtid_chanlen_in = 4 |
ID for FAST Output File Format, specifies that the time channel is not included in the output file, and channel length is included in the file. | |
logical | beep = .TRUE. |
Flag that specifies whether or not to beep for error messages and program terminations. More... | |
character(*), parameter | commchars = '!#%' |
Comment characters that mark the end of useful input. | |
integer(intki), parameter | nwtc_sizeofnumword = 200 |
maximum length of the words containing numeric input (for ParseVar routines) | |
integer(intki), parameter | nwtc_maxarylen = 100 |
the maximum length of arrays that can be printed with the array formats below (used to make sure we don't crash when trying to write too many): | |
character(*), parameter | ec_straryfrmt = "(15X,A,T30,' - ',A,/,2X,100('""',A,'""',:,1X))" |
Output format for array of string parameters. More... | |
character(*), parameter | ec_strfrmt = "(15X,A,T30,' - ',A,/,2X, A )" |
Output format for string parameters. | |
character(*), parameter | ec_rearyfrmt = "(15X,A,T30,' - ',A,/,100(2X,ES11.4e2,:))" |
Output format for array of real parameters. More... | |
character(*), parameter | ec_refrmt = "( 2X, ES11.4e2,2X,A,T30,' - ',A )" |
Output format for real parameters. | |
character(*), parameter | ec_lgaryfrmt = "(15X,A,T30,' - ',A,/,100(2X,L11,:))" |
Output format for array of logical parameters. More... | |
character(*), parameter | ec_lgfrmt = "( 2X, L11,2X,A,T30,' - ',A )" |
Output format for logical parameters. | |
character(*), parameter | ec_intaryfrmt = "(15X,A,T30,' - ',A,/,100(2X,I11,:))" |
Output format for array of integer parameters. More... | |
character(*), parameter | ec_intfrmt = "( 2X, I11,2X,A,T30,' - ',A )" |
Output format for integer parameters. | |
character(*), parameter | ec_ch11frmt = "( 2X, A11,2X,A,T30,' - ',A )" |
Output format for 11-character string parameters. | |
This module contains I/O-related variables and routines with non-system-specific logic.
subroutine nwtc_io::adjrealstr | ( | NumStr | ) |
This routine adjusts strings created from real numbers (4, 8, or 16-byte)
[in,out] | numstr | String representing a real number (e.g., from R2LStr4) |
subroutine nwtc_io::allcary1 | ( | character(*), dimension (:), allocatable | Ary, |
integer, intent(in) | AryDim1, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
subroutine nwtc_io::allcary2 | ( | character(*), dimension (:,:), allocatable | Ary, |
integer, intent(in) | AryDim1, | ||
integer, intent(in) | AryDim2, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | arydim2 | The size of the second dimension of the array. |
subroutine nwtc_io::allcary3 | ( | character(*), dimension (:,:,:), allocatable | Ary, |
integer, intent(in) | AryDim1, | ||
integer, intent(in) | AryDim2, | ||
integer, intent(in) | AryDim3, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | arydim2 | The size of the second dimension of the array. |
[in] | arydim3 | The size of the third dimension of the array. |
subroutine nwtc_io::allfpary1 | ( | real(c_float), dimension (:), pointer | Ary, |
integer, intent(in) | AryDim1, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type POINTER. If the array pointer is already associated on entry to this routine, the array it points to will be deallocated first.
Use AllocPAry (nwtc_io::allocpary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | descr | Brief array description. |
[out] | errstat | Error status |
subroutine nwtc_io::alli1bary1 | ( | integer(b1ki), dimension (:), allocatable | Ary, |
integer(intki), intent(in) | AryDim1, | ||
character(*), intent(in) | Descr, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
subroutine nwtc_io::alli2bary1 | ( | integer(b2ki), dimension (:), allocatable | Ary, |
integer(intki), intent(in) | AryDim1, | ||
character(*), intent(in) | Descr, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
subroutine nwtc_io::alli4bary1 | ( | integer(b4ki), dimension (:), allocatable | Ary, |
integer(intki), intent(in) | AryDim1, | ||
character(*), intent(in) | Descr, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
subroutine nwtc_io::alliary2 | ( | integer(intki), dimension (:,:), allocatable | Ary, |
integer, intent(in) | AryDim1, | ||
integer, intent(in) | AryDim2, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | arydim2 | The size of the second dimension of the array. |
subroutine nwtc_io::alliary3 | ( | integer(intki), dimension (:,:,:), allocatable | Ary, |
integer, intent(in) | AryDim1, | ||
integer, intent(in) | AryDim2, | ||
integer, intent(in) | AryDim3, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | arydim2 | The size of the second dimension of the array. |
[in] | arydim3 | The size of the third dimension of the array. |
subroutine nwtc_io::allipary1 | ( | integer, dimension (:), pointer | Ary, |
integer, intent(in) | AryDim1, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type POINTER. If the array pointer is already associated on entry to this routine, the array it points to will be deallocated first.
Use AllocPAry (nwtc_io::allocpary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | descr | Brief array description. |
subroutine nwtc_io::allipary2 | ( | integer, dimension (:,:), pointer | Ary, |
integer, intent(in) | AryDim1, | ||
integer, intent(in) | AryDim2, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type POINTER. If the array pointer is already associated on entry to this routine, the array it points to will be deallocated first.
Use AllocPAry (nwtc_io::allocpary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | descr | Brief array description. |
[in] | arydim2 | The size of the second dimension of the array. |
subroutine nwtc_io::alllary1 | ( | logical, dimension (:), allocatable | Ary, |
integer, intent(in) | AryDim1, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
subroutine nwtc_io::alllary2 | ( | logical, dimension (:,:), allocatable | Ary, |
integer, intent(in) | AryDim1, | ||
integer, intent(in) | AryDim2, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | arydim2 | The size of the second dimension of the array. |
subroutine nwtc_io::alllary3 | ( | logical, dimension (:,:,:), allocatable | Ary, |
integer, intent(in) | AryDim1, | ||
integer, intent(in) | AryDim2, | ||
integer, intent(in) | AryDim3, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | arydim2 | The size of the second dimension of the array. |
[in] | arydim3 | The size of the third dimension of the array. |
subroutine nwtc_io::allr16ary1 | ( | real(quki), dimension (:), allocatable | Ary, |
integer, intent(in) | AryDim1, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
subroutine nwtc_io::allr16ary2 | ( | real(quki), dimension (:,:), allocatable | Ary, |
integer, intent(in) | AryDim1, | ||
integer, intent(in) | AryDim2, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | arydim2 | The size of the second dimension of the array. |
subroutine nwtc_io::allr16ary3 | ( | real(quki), dimension (:,:,:), allocatable | Ary, |
integer, intent(in) | AryDim1, | ||
integer, intent(in) | AryDim2, | ||
integer, intent(in) | AryDim3, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | arydim2 | The size of the second dimension of the array. |
[in] | arydim3 | The size of the third dimension of the array. |
subroutine nwtc_io::allr16ary4 | ( | real(quki), dimension (:,:,:,:), allocatable | Ary, |
integer, intent(in) | AryDim1, | ||
integer, intent(in) | AryDim2, | ||
integer, intent(in) | AryDim3, | ||
integer, intent(in) | AryDim4, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | arydim2 | The size of the second dimension of the array. |
[in] | arydim3 | The size of the third dimension of the array. |
[in] | arydim4 | The size of the fourth dimension of the array. |
subroutine nwtc_io::allr16ary5 | ( | real(quki), dimension (:,:,:,:,:), allocatable | Ary, |
integer, intent(in) | AryDim1, | ||
integer, intent(in) | AryDim2, | ||
integer, intent(in) | AryDim3, | ||
integer, intent(in) | AryDim4, | ||
integer, intent(in) | AryDim5, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | arydim2 | The size of the second dimension of the array. |
[in] | arydim3 | The size of the third dimension of the array. |
[in] | arydim4 | The size of the fourth dimension of the array. |
[in] | arydim5 | The size of the fourth dimension of the array. |
subroutine nwtc_io::allr16pary3 | ( | real(quki), dimension (:,:,:), pointer | Ary, |
integer, intent(in) | AryDim1, | ||
integer, intent(in) | AryDim2, | ||
integer, intent(in) | AryDim3, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type POINTER. If the array pointer is already associated on entry to this routine, the array it points to will be deallocated first.
Use AllocPAry (nwtc_io::allocpary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | descr | Brief array description. |
[in] | arydim2 | The size of the second dimension of the array. |
[in] | arydim3 | The size of the third dimension of the array. |
subroutine nwtc_io::allr4ary1 | ( | real(siki), dimension (:), allocatable | Ary, |
integer, intent(in) | AryDim1, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
subroutine nwtc_io::allr4ary2 | ( | real(siki), dimension (:,:), allocatable | Ary, |
integer, intent(in) | AryDim1, | ||
integer, intent(in) | AryDim2, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | arydim2 | The size of the second dimension of the array. |
subroutine nwtc_io::allr4ary3 | ( | real(siki), dimension (:,:,:), allocatable | Ary, |
integer, intent(in) | AryDim1, | ||
integer, intent(in) | AryDim2, | ||
integer, intent(in) | AryDim3, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | arydim2 | The size of the second dimension of the array. |
[in] | arydim3 | The size of the third dimension of the array. |
subroutine nwtc_io::allr4ary4 | ( | real(siki), dimension (:,:,:,:), allocatable | Ary, |
integer, intent(in) | AryDim1, | ||
integer, intent(in) | AryDim2, | ||
integer, intent(in) | AryDim3, | ||
integer, intent(in) | AryDim4, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | arydim2 | The size of the second dimension of the array. |
[in] | arydim3 | The size of the third dimension of the array. |
[in] | arydim4 | The size of the fourth dimension of the array. |
subroutine nwtc_io::allr4ary5 | ( | real(siki), dimension (:,:,:,:,:), allocatable | Ary, |
integer, intent(in) | AryDim1, | ||
integer, intent(in) | AryDim2, | ||
integer, intent(in) | AryDim3, | ||
integer, intent(in) | AryDim4, | ||
integer, intent(in) | AryDim5, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | arydim2 | The size of the second dimension of the array. |
[in] | arydim3 | The size of the third dimension of the array. |
[in] | arydim4 | The size of the fourth dimension of the array. |
[in] | arydim5 | The size of the fourth dimension of the array. |
subroutine nwtc_io::allr4pary3 | ( | real(siki), dimension (:,:,:), pointer | Ary, |
integer, intent(in) | AryDim1, | ||
integer, intent(in) | AryDim2, | ||
integer, intent(in) | AryDim3, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type POINTER. If the array pointer is already associated on entry to this routine, the array it points to will be deallocated first.
Use AllocPAry (nwtc_io::allocpary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | descr | Brief array description. |
[in] | arydim2 | The size of the second dimension of the array. |
[in] | arydim3 | The size of the third dimension of the array. |
subroutine nwtc_io::allr8ary1 | ( | real(r8ki), dimension (:), allocatable | Ary, |
integer, intent(in) | AryDim1, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
subroutine nwtc_io::allr8ary2 | ( | real(r8ki), dimension (:,:), allocatable | Ary, |
integer, intent(in) | AryDim1, | ||
integer, intent(in) | AryDim2, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | arydim2 | The size of the second dimension of the array. |
subroutine nwtc_io::allr8ary3 | ( | real(r8ki), dimension (:,:,:), allocatable | Ary, |
integer, intent(in) | AryDim1, | ||
integer, intent(in) | AryDim2, | ||
integer, intent(in) | AryDim3, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | arydim2 | The size of the second dimension of the array. |
[in] | arydim3 | The size of the third dimension of the array. |
subroutine nwtc_io::allr8ary4 | ( | real(r8ki), dimension (:,:,:,:), allocatable | Ary, |
integer, intent(in) | AryDim1, | ||
integer, intent(in) | AryDim2, | ||
integer, intent(in) | AryDim3, | ||
integer, intent(in) | AryDim4, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | arydim2 | The size of the second dimension of the array. |
[in] | arydim3 | The size of the third dimension of the array. |
[in] | arydim4 | The size of the fourth dimension of the array. |
subroutine nwtc_io::allr8ary5 | ( | real(r8ki), dimension (:,:,:,:,:), allocatable | Ary, |
integer, intent(in) | AryDim1, | ||
integer, intent(in) | AryDim2, | ||
integer, intent(in) | AryDim3, | ||
integer, intent(in) | AryDim4, | ||
integer, intent(in) | AryDim5, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type ALLOCATABLE. If the array is already allocated on entry to this routine, an error will be generated.
Use AllocAry (nwtc_io::allocary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[in] | descr | Brief array description (for error message). |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | arydim2 | The size of the second dimension of the array. |
[in] | arydim3 | The size of the third dimension of the array. |
[in] | arydim4 | The size of the fourth dimension of the array. |
[in] | arydim5 | The size of the fourth dimension of the array. |
subroutine nwtc_io::allr8pary3 | ( | real(r8ki), dimension (:,:,:), pointer | Ary, |
integer, intent(in) | AryDim1, | ||
integer, intent(in) | AryDim2, | ||
integer, intent(in) | AryDim3, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type POINTER. If the array pointer is already associated on entry to this routine, the array it points to will be deallocated first.
Use AllocPAry (nwtc_io::allocpary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | descr | Brief array description. |
[in] | arydim2 | The size of the second dimension of the array. |
[in] | arydim3 | The size of the third dimension of the array. |
subroutine nwtc_io::allrpary2 | ( | real(reki), dimension (:,:), pointer | Ary, |
integer, intent(in) | AryDim1, | ||
integer, intent(in) | AryDim2, | ||
character(*), intent(in) | Descr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine allocates an array to the size specified in the AryDim input arguement(s).
Arrays are of type POINTER. If the array pointer is already associated on entry to this routine, the array it points to will be deallocated first.
Use AllocPAry (nwtc_io::allocpary) instead of directly calling a specific routine in the generic interface.
ary | Array to be allocated | |
[in] | arydim1 | The size of the first dimension of the array. |
[out] | errstat | Error status |
[out] | errmsg | Error message corresponding to ErrStat |
[in] | descr | Brief array description. |
[in] | arydim2 | The size of the second dimension of the array. |
subroutine nwtc_io::checkios | ( | integer, intent(in) | IOS, |
character(*), intent(in) | Fil, | ||
character(*), intent(in) | Variable, | ||
integer, intent(in) | VarType, | ||
integer, intent(out), optional | ErrStat, | ||
character(*), intent(out), optional | ErrMsg, | ||
logical, intent(in), optional | TrapErrors | ||
) |
This routine checks the I/O status and prints either an end-of-file or an invalid-input message, and then aborts the program or returns an appropriate error level and message.
[in] | ios | I/O status |
[in] | fil | Name of input file |
[in] | variable | Variable name |
[in] | vartype | Type of variable |
[in] | traperrors | Determines if the program should abort or return to calling function |
[out] | errstat | Error status |
[out] | errmsg | Error message (if present, no message is written to the screen) |
subroutine nwtc_io::checkr16var | ( | real(quki), intent(in) | RealVar, |
character(*), intent(in) | RealDesc, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine checks that real values are finite and not NaNs.
[in] | realvar | Real value to check |
[in] | realdesc | description of RealVar |
[out] | errstat | Error status |
[out] | errmsg | Error message |
[in] | realvar | Real value to check |
[in] | realdesc | description of RealVar |
[out] | errstat | Error status |
[out] | errmsg | Error message |
subroutine nwtc_io::checkr4var | ( | real(siki), intent(in) | RealVar, |
character(*), intent(in) | RealDesc, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine checks that real values are finite and not NaNs.
[in] | realvar | Real value to check |
[in] | realdesc | description of RealVar |
[out] | errstat | Error status |
[out] | errmsg | Error message |
subroutine nwtc_io::checkr8var | ( | real(r8ki), intent(in) | RealVar, |
character(*), intent(in) | RealDesc, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine checks that real values are finite and not NaNs.
[in] | realvar | Real value to check |
[in] | realdesc | description of RealVar |
[out] | errstat | Error status |
[out] | errmsg | Error message |
[in] | realvar | Real value to check |
[in] | realdesc | description of RealVar |
[out] | errstat | Error status |
[out] | errmsg | Error message |
subroutine nwtc_io::chkparsedata | ( | character(*), dimension (2), intent(in) | Words, |
character(*), intent(in) | ExpVarName, | ||
character(*), intent(in) | FileName, | ||
integer(intki), intent(in) | FileLineNum, | ||
integer(intki), intent(out) | NameIndx, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This subroutine checks the data to be parsed to make sure it finds the expected variable name and an associated value.
[out] | errstat | The error status. |
[in] | filelinenum | The number of the line in the file being parsed. |
[out] | nameindx | The index into the Words array that points to the variable name. |
[out] | errmsg | The error message, if ErrStat /= 0. |
[in] | expvarname | The expected variable name. |
[in] | filename | The name of the file being parsed. |
[in] | words | The two words to be parsed from the line. |
subroutine nwtc_io::chkrealfmtstr | ( | character(*), intent(in) | RealFmt, |
character(*), intent(in) | RealFmtVar, | ||
integer(intki), intent(out) | FmtWidth, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine tests to make sure we have a valid format string for real numbers (i.e., it doesn't produce "****").
[out] | errstat | An error level to be returned to the calling routine. |
[out] | fmtwidth | The number of characters that will result from writes. |
[out] | errmsg | An error message to be returned to the calling routine. |
[in] | realfmt | The proposed format string. |
[in] | realfmtvar | The name of the variable storing the format string. |
subroutine nwtc_io::conv2uc | ( | Str | ) |
This routine converts all the text in a string to upper case.
[in,out] | str | The string to be converted to UC (upper case). |
integer function nwtc_io::countwords | ( | character(*), intent(in) | Line | ) |
This subroutine is used to count the number of "words" in a line of text.
It uses spaces, tabs, commas, semicolons, single quotes, and double quotes ("whitespace") as word separators. Use GetWords (nwtc_io::getwords) to return the words from the line.
[in] | line | Count the words in this text string. |
character(11) function nwtc_io::curdate | ( | ) |
This function returns a character string encoded with today's date in the form dd-mmm-ccyy.
character(8) function nwtc_io::curtime | ( | ) |
This function returns a character string encoded with the time in the form "hh:mm:ss".
subroutine nwtc_io::dispcopyrightlicense | ( | character(*), intent(in) | ProgramName, |
character(*), intent(in), optional | AdditionalComment | ||
) |
This routine displays some text about copyright and license.
[in] | programname | The name of the program being run |
[in] | additionalcomment | An additional comment displayed in the copyright notice. Typically used to describe alpha versions or one-off versions. |
subroutine nwtc_io::dispnvd0 | ( | ) |
This routine displays the name of the program, its version, and its release date.
Use DispNVD (nwtc_io::dispnvd) instead of directly calling a specific routine in the generic interface.
subroutine nwtc_io::dispnvd1 | ( | ProgInfo | , |
DispNWTCVer | |||
) |
This routine displays the name of the program, its version, and its release date.
Use DispNVD (nwtc_io::dispnvd) instead of directly calling a specific routine in the generic interface.
[in] | proginfo | Contains the name and version info |
[in] | dispnwtcver | Option to display what version of the library is linked with the code |
subroutine nwtc_io::dispnvd2 | ( | Name | , |
Ver | |||
) |
This routine displays the name of the program, its version, and its release date passed in as strings This routine is depricated and for legacy purposes only.
Please don't use for any new code (Dec-2012).
[in] | name | String containing the name of the program using the library |
[in] | ver | String containing the version and date info |
subroutine nwtc_io::dlltypepack | ( | type(dll_type), intent(in) | InData, |
real(reki), dimension(:), intent(out), allocatable | ReKiBuf, | ||
real(dbki), dimension(:), intent(out), allocatable | DbKiBuf, | ||
integer(intki), dimension(:), intent(out), allocatable | IntKiBuf, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
logical, intent(in), optional | SizeOnly | ||
) |
This routine packs the DLL_Type (nwtc_base::dll_type) data into an integer buffer.
It is required for the FAST Registry. It is the inverse of DLLTypeUnPack (nwtc_io::dlltypeunpack).
[in] | indata | DLL data to pack (store in arrays of type ReKi, DbKi, and/or IntKi) |
[out] | rekibuf | buffer with real (ReKi) data from InData structure |
[out] | dbkibuf | buffer with double (DbKi) data from InData structure |
[out] | intkibuf | buffer with integer (IntKi) data from InData structure |
[out] | errstat | error status |
[out] | errmsg | error message |
[in] | sizeonly | flag to determine if we're just looking for the size of the buffers instead of the packed data |
subroutine nwtc_io::dlltypeunpack | ( | type(dll_type), intent(out) | OutData, |
real(reki), dimension(:), intent(in), allocatable | ReKiBuf, | ||
real(dbki), dimension(:), intent(in), allocatable | DbKiBuf, | ||
integer(intki), dimension(:), intent(in), allocatable | IntKiBuf, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine unpacks the DLL_Type data from an integer buffer.
It is required for the FAST Registry. It is the inverse of DLLTypePack (nwtc_io::dlltypepack).
[in] | rekibuf | buffer with real (ReKi) data to place in the OutData structure |
[in] | dbkibuf | buffer with real (DbKi) data to place in the OutData structure |
[in] | intkibuf | buffer with integer (IntKi) data to place in the OutData structure |
[out] | outdata | the reconstituted OutData structure, created from 3 buffers |
[out] | errstat | error status/level |
[out] | errmsg | message corresponding to ErrStat |
subroutine nwtc_io::findline | ( | Str | , |
MaxLen | , | ||
StrEnd | |||
) |
This routine finds one line of text with a maximum length of MaxLen from the Str.
It tries to break the line at a blank.
[in] | maxlen | The maximum length of the string. |
[out] | strend | The location of the end of the string. |
[in] | str | The string to search. |
character(13) function nwtc_io::geterrstr | ( | integer(intki), intent(in) | ErrID | ) |
This function returns a text description of the ErrID (ErrStat) code.
[in] | errid | error status/level |
subroutine nwtc_io::getnewunit | ( | UnIn | , |
ErrStat | , | ||
ErrMsg | |||
) |
This routine returns the next unit number greater than 9 that is not currently in use.
If it cannot find any unit between 10 and 99 that is available, it either aborts or returns an appropriate error status/message.
[out] | unin | Logical unit for the file. |
[out] | errstat | The error status code; If not present code aborts |
[out] | errmsg | The error message, if an error occurred |
character(200) function nwtc_io::getnvd | ( | ProgInfo | ) |
This function extracts the Name field from the ProgDesc data type.
[in] | proginfo | Contains the name, date, and version info |
subroutine nwtc_io::getpath | ( | character(*), intent(in) | GivenFil, |
character(*), intent(out) | PathName, | ||
character(*), intent(out), optional | FileName | ||
) |
Let's parse the path name from the name of the given file.
We'll count everything before (and including) the last "\" or "/".
[in] | givenfil | The name of the given file. |
[out] | pathname | The path name of the given file (based solely on the GivenFil text string). |
[out] | filename | The name of the given file without the PathName (based solely on the GivenFil text string). |
subroutine nwtc_io::getroot | ( | GivenFil | , |
RootName | |||
) |
Let's parse the root file name from the name of the given file.
We'll count everything after the last period as the extension.
[in] | givenfil | The name of the given file. |
[out] | rootname | The parsed root name of the given file. |
subroutine nwtc_io::gettokens | ( | character(*), intent(inout) | Line, |
integer, intent(in) | NumTok, | ||
character(*), dimension (:), intent(out) | Tokens, | ||
logical, intent(out) | Error | ||
) |
This routine will parse Line for NumTok "tokens" and return them in the Tokens array.
This routine differs from GetWords() (nwtc_io::getwords) in that it uses only spaces as token separators.
[in] | numtok | The number of "words" to look for. |
[out] | error | Error flag to indicate an insuffient number of tokens were found. |
[in,out] | line | The string to search. |
[out] | tokens | The tokens that were found. |
subroutine nwtc_io::getwords | ( | character(*), intent(in) | Line, |
character(*), dimension(numwords), intent(out) | Words, | ||
integer, intent(in) | NumWords | ||
) |
This subroutine is used to get the NumWords "words" from a line of text.
It uses spaces, tabs, commas, semicolons, single quotes, and double quotes ("whitespace") as word separators. If there aren't NumWords in the line, the remaining array elements will remain empty. Use CountWords (nwtc_io::countwords) to count the number of words in a line.
[in] | numwords | The number of words to look for. |
[in] | line | The string to search. |
[out] | words | The array of found words. |
subroutine nwtc_io::initfileinfo_fromnullcstring | ( | character(kind=c_char,len=*), intent(in) | FileString, |
type(fileinfotype), intent(out) | FileInfo, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
The following takes an input file as a C_Char string with C_NULL_CHAR deliniating line endings.
[in] | filestring | input file as single C string with C_NULL_CHAR separated lines |
character(11) function nwtc_io::int2lstr | ( | Num | ) |
This function returns a left-adjusted string representing the passed numeric value.
It eliminates trailing zeroes and even the decimal point if it is not a fraction.
Use Num2LStr (nwtc_io::num2lstr) instead of directly calling a specific routine in the generic interface.
[in] | num | The number to convert to a left-justified string. |
subroutine nwtc_io::intary2str | ( | integer(intki), dimension(:), intent(in) | IntAry, |
character(*), intent(out) | Str, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine converts an ASCII array of integers into an equivalent string (character array).
This routine is the inverse of the Str2IntAry() (nwtc_io::str2intary) routine.
[in] | intary | ASCII array to convert to a string |
[out] | str | The string representation of IntAry |
[out] | errstat | Error status |
[out] | errmsg | Error message associated with ErrStat |
logical function nwtc_io::iscomment | ( | character(*), intent(in) | StringToCheck | ) |
This function returns true if and only if the first character of the input StringToCheck matches on the of comment characters nwtc_io::commchars.
subroutine nwtc_io::nameofile | ( | integer, intent(in) | InArg, |
character(*), intent(in) | OutExten, | ||
character(*), intent(out) | OutFile, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine gets the name of the input file from the InArgth command-line argument, removes the extension if there is one, and appends OutExten to the end.
[out] | errstat | Error status; if present, program does not abort on error |
[in] | inarg | The number of the command-line argument that should hold the input file name. |
[in] | outexten | The requested extension for the output file. |
[out] | outfile | The name of the output file. |
[out] | errmsg | Description of error |
subroutine nwtc_io::normstop | ( | ) |
This routine performs a normal termination of the program.
subroutine nwtc_io::nwtc_displaysyntax | ( | character(*), intent(in) | DefaultInputFile, |
character(*), intent(in) | ThisProgName | ||
) |
This routine displays the expected command-line syntax for most software developed at the NWTC.
[in] | defaultinputfile | the default name of the input file, if any |
[in] | thisprogname | the name of the executable to be displayed in the calling syntax |
subroutine nwtc_io::openbinpfile | ( | integer(intki), intent(in) | Un, |
character(*), intent(in) | InFile, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine opens a binary input file.
[in] | un | Logical unit for the input file. |
[out] | errstat | Error status: returns "fatal" if the file doesn't exist or can't be opened |
[out] | errmsg | Error message |
[in] | infile | Name of the input file. |
subroutine nwtc_io::openboutfile | ( | integer(intki), intent(in) | Un, |
character(*), intent(in) | OutFile, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine opens a binary output file with stream access, implemented in standrad Fortran 2003.
Valid in gfortran 4.6.1 and IVF 10.1 and later
[in] | un | Logical unit for the output file |
[out] | errstat | Error status |
[out] | errmsg | Error message |
[in] | outfile | Name of the output file |
subroutine nwtc_io::openecho | ( | integer, intent(inout) | Un, |
character(*), intent(in) | OutFile, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
type(progdesc), intent(in), optional | ProgVer | ||
) |
This routine opens a formatted output file for the echo file.
[in,out] | un | Logical unit for the input file. |
[in] | outfile | Name of the input file. |
[out] | errstat | Error status |
[out] | errmsg | Error message |
[in] | progver | Program version info to display in echo file |
subroutine nwtc_io::openfinpfile | ( | integer, intent(in) | Un, |
character(*), intent(in) | InFile, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine opens a formatted input file.
[in] | un | Logical unit for the input file. |
[in] | infile | Name of the input file. |
[out] | errstat | Error status |
[out] | errmsg | Error message |
subroutine nwtc_io::openfoutfile | ( | integer, intent(in) | Un, |
character(*), intent(in) | OutFile, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine opens a formatted output file.
[in] | un | Logical unit for the output file. |
[in] | outfile | Name of the output file. |
[out] | errstat | Error status |
[out] | errmsg | Error message |
subroutine nwtc_io::openfunkfile | ( | integer, intent(in) | Un, |
character(*), intent(in) | OutFile, | ||
logical, intent(in) | FailAbt, | ||
logical, intent(out) | Failed, | ||
logical, intent(out) | Exists, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine opens a formatted output file and returns a flag telling if it already existed.
[in] | un | Logical unit for the output file. |
[out] | errstat | Error status: returns "fatal" if the file doesn't exist or can't be opened |
[out] | errmsg | Error message |
[out] | exists | Flag that indicates if the file already existedo. |
[in] | failabt | Flag that tells this routine to abort if the open fails. |
[out] | failed | Flag that indicates if the open failed. |
[in] | outfile | Name of the output file. |
subroutine nwtc_io::openuinbefile | ( | integer, intent(in) | Un, |
character(*), intent(in) | InFile, | ||
integer, intent(in) | RecLen, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine opens an unformatted input file of RecLen-byte data records stored in Big Endian format.
[in] | un | Logical unit for the input file |
[in] | infile | Name of the input file |
[in] | reclen | The input file's record length in bytes |
[out] | errstat | Error status: returns "fatal" if the file doesn't exist or can't be opened |
[out] | errmsg | Error message |
subroutine nwtc_io::openuinfile | ( | integer, intent(in) | Un, |
character(*), intent(in) | InFile, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine opens an unformatted input file.
[in] | un | Logical unit for the input file |
[out] | errstat | Error status: returns "fatal" if the file doesn't exist or can't be opened |
[out] | errmsg | Error message |
[in] | infile | Name of the input file |
subroutine nwtc_io::openuoutfile | ( | integer, intent(in) | Un, |
character(*), intent(in) | OutFile, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine opens an unformatted output file.
[in] | un | Logical unit for the output file |
[out] | errstat | Error status: returns "fatal" if the file doesn't exist or can't be opened |
[out] | errmsg | Error message |
[in] | outfile | Name of the output file |
subroutine nwtc_io::parsechary | ( | type (fileinfotype), intent(in) | FileInfo, |
integer(intki), intent(inout) | LineNum, | ||
character(*), intent(in) | AryName, | ||
character(*), dimension(arylen), intent(out) | Ary, | ||
integer, intent(in) | AryLen, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This subroutine parses the specified line of text for AryLen CHARACTER values.
Generate an error message if the value is the wrong type. Use ParseAry (nwtc_io::parseary) instead of directly calling a specific routine in the generic interface.
[in] | arylen | The length of the array to parse. |
[in] | fileinfo | The derived type for holding the file information. |
[in,out] | linenum | The number of the line to parse. |
[in] | aryname | The array name we are trying to fill. |
[out] | ary | The array to receive the input values. |
[out] | errstat | The error status. |
[out] | errmsg | The error message, if ErrStat /= 0. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc. |
subroutine nwtc_io::parsechvar | ( | type (fileinfotype), intent(in) | FileInfo, |
integer(intki), intent(inout) | LineNum, | ||
character(*), intent(in) | ExpVarName, | ||
character(*), intent(out) | Var, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This subroutine parses the specified line of text for two words.
One should be a the name of a variable and the other the value of the variable. Generate an error message if the value is the wrong type or if only one "word" is found.
WARNING: This routine assumes the "words" containing the variable name and value are <= 20 characters.
Use ParseVar (nwtc_io::parsevar) instead of directly calling a specific routine in the generic interface.
[out] | errstat | The error status. |
[in,out] | linenum | The number of the line to parse. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc. |
[out] | var | The variable to receive the input value. |
[out] | errmsg | The error message, if ErrStat /= 0. |
[in] | expvarname | The expected variable name. |
[in] | fileinfo | The derived type for holding the file information. |
subroutine nwtc_io::parsechvarwdefault | ( | type (fileinfotype), intent(in) | FileInfo, |
integer(intki), intent(inout) | LineNum, | ||
character(*), intent(in) | ExpVarName, | ||
character(*), intent(out) | Var, | ||
character(*), intent(in) | VarDefault, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This subroutine parses the specified line of text for two words.
One should be a the name of a variable and the other a value for the variable. If the variable is the character string "DEFAULT", a default value will be used to set the variable. Generate an error message if the value is the wrong type or if only one "word" is found.
WARNING: This routine assumes the "words" containing the variable name and value are <= 20 characters. Use ParseVarWDefault (nwtc_io::parsevarwdefault) instead of directly calling a specific routine in the generic interface.
[out] | errstat | The error status. |
[in,out] | linenum | The number of the line to parse. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc. |
[out] | var | The variable to receive the input value. |
[in] | vardefault | The default value for the variable. |
[out] | errmsg | The error message, if ErrStat /= 0. |
[in] | expvarname | The expected variable name. |
[in] | fileinfo | The derived type for holding the file information. |
subroutine nwtc_io::parsecom | ( | type (fileinfotype), intent(in) | FileInfo, |
integer(intki), intent(inout) | LineNum, | ||
character(*), intent(out) | Var, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This subroutine parses a comment line.
[out] | errstat | The error status. |
[in,out] | linenum | The number of the line to parse. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc. |
[out] | var | The variable to receive the comment |
[out] | errmsg | The error message, if ErrStat /= 0. |
[in] | fileinfo | The derived type for holding the file information. |
subroutine nwtc_io::parseinary | ( | type (fileinfotype), intent(in) | FileInfo, |
integer(intki), intent(inout) | LineNum, | ||
character(*), intent(in) | AryName, | ||
integer, dimension (arylen), intent(out) | Ary, | ||
integer, intent(in) | AryLen, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
subroutine nwtc_io::parseinclinfo | ( | character(*), intent(inout) | InclInfo, |
character(*), intent(in) | RelativePathFileName, | ||
character(*), intent(out) | FileName, | ||
integer, intent(out) | RangeBeg, | ||
integer, intent(out) | RangeEnd, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This subroutine parses the include information that occurs after a "@" when processing an input file.
[out] | errstat | The error status. |
[out] | rangebeg | The beginning of a range of lines to be processed in an included file. |
[out] | rangeend | The end of a range of lines to be processed in an included file. |
[out] | errmsg | The error message, if ErrStat /= 0. |
[out] | filename | The file name that was parsed from InclInfo. |
[in,out] | inclinfo | The text following the "@" on an input line being processed. |
[in] | relativepathfilename | The name of the file that any new file is relative to. |
subroutine nwtc_io::parseinvar | ( | type (fileinfotype), intent(in) | FileInfo, |
integer(intki), intent(inout) | LineNum, | ||
character(*), intent(in) | ExpVarName, | ||
integer, intent(out) | Var, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This subroutine parses the specified line of text for two words.
One should be a the name of a variable and the other the value of the variable. Generate an error message if the value is the wrong type or if only one "word" is found.
WARNING: This routine assumes the "words" containing the variable name and value are <= 20 characters.
Use ParseVar (nwtc_io::parsevar) instead of directly calling a specific routine in the generic interface.
[out] | errstat | The error status. |
[in,out] | linenum | The number of the line to parse. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc. |
[out] | var | The variable to receive the input value. |
[out] | errmsg | The error message, if ErrStat /= 0. |
[in] | expvarname | The expected variable name. |
[in] | fileinfo | The derived type for holding the file information. |
subroutine nwtc_io::parseinvarwdefault | ( | type (fileinfotype), intent(in) | FileInfo, |
integer(intki), intent(inout) | LineNum, | ||
character(*), intent(in) | ExpVarName, | ||
integer(intki), intent(out) | Var, | ||
integer(intki), intent(in) | VarDefault, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This subroutine parses the specified line of text for two words.
One should be a the name of a variable and the other a value for the variable. If the variable is the character string "DEFAULT", a default value will be used to set the variable. Generate an error message if the value is the wrong type or if only one "word" is found.
WARNING: This routine assumes the "words" containing the variable name and value are <= 20 characters. Use ParseVarWDefault (nwtc_io::parsevarwdefault) instead of directly calling a specific routine in the generic interface.
[out] | errstat | The error status. |
[in,out] | linenum | The number of the line to parse. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc. |
[out] | var | The variable to receive the input value. |
[in] | vardefault | The default value for the variable. |
[out] | errmsg | The error message, if ErrStat /= 0. |
[in] | expvarname | The expected variable name. |
[in] | fileinfo | The derived type for holding the file information. |
subroutine nwtc_io::parseloary | ( | type (fileinfotype), intent(in) | FileInfo, |
integer(intki), intent(inout) | LineNum, | ||
character(*), intent(in) | AryName, | ||
logical, dimension (arylen), intent(out) | Ary, | ||
integer, intent(in) | AryLen, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
subroutine nwtc_io::parselovar | ( | type (fileinfotype), intent(in) | FileInfo, |
integer(intki), intent(inout) | LineNum, | ||
character(*), intent(in) | ExpVarName, | ||
logical, intent(out) | Var, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This subroutine parses the specified line of text for two words.
One should be a the name of a variable and the other the value of the variable. Generate an error message if the value is the wrong type or if only one "word" is found.
WARNING: This routine assumes the "words" containing the variable name and value are <= 20 characters.
Use ParseVar (nwtc_io::parsevar) instead of directly calling a specific routine in the generic interface.
[out] | errstat | The error status. |
[in,out] | linenum | The number of the line to parse. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc. |
[out] | var | The variable to receive the input value. |
[out] | errmsg | The error message, if ErrStat /= 0. |
[in] | expvarname | The expected variable name. |
[in] | fileinfo | The derived type for holding the file information. |
subroutine nwtc_io::parselovarwdefault | ( | type (fileinfotype), intent(in) | FileInfo, |
integer(intki), intent(inout) | LineNum, | ||
character(*), intent(in) | ExpVarName, | ||
logical, intent(out) | Var, | ||
logical, intent(in) | VarDefault, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This subroutine parses the specified line of text for two words.
One should be a the name of a variable and the other a value for the variable. If the variable is the character string "DEFAULT", a default value will be used to set the variable. Generate an error message if the value is the wrong type or if only one "word" is found.
WARNING: This routine assumes the "words" containing the variable name and value are <= 20 characters. Use ParseVarWDefault (nwtc_io::parsevarwdefault) instead of directly calling a specific routine in the generic interface.
[out] | errstat | The error status. |
[in,out] | linenum | The number of the line to parse. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc. |
[out] | var | The variable to receive the input value. |
[in] | vardefault | The default value for the variable. |
[out] | errmsg | The error message, if ErrStat /= 0. |
[in] | expvarname | The expected variable name. |
[in] | fileinfo | The derived type for holding the file information. |
subroutine nwtc_io::parsequary | ( | type (fileinfotype), intent(in) | FileInfo, |
integer(intki), intent(inout) | LineNum, | ||
character(*), intent(in) | AryName, | ||
real(quki), dimension (arylen), intent(out) | Ary, | ||
integer, intent(in) | AryLen, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This subroutine parses the specified line of text for AryLen REAL values.
Generate an error message if the value is the wrong type. Use ParseAry (nwtc_io::parseary) instead of directly calling a specific routine in the generic interface.
[in] | arylen | The length of the array to parse. |
[out] | ary | The array to receive the input values. |
[out] | errstat | The error status. |
[in,out] | linenum | The number of the line to parse. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc. |
[in] | aryname | The array name we are trying to fill. |
[out] | errmsg | The error message, if ErrStat /= 0. |
[in] | fileinfo | The derived type for holding the file information. |
subroutine nwtc_io::parsequvar | ( | type (fileinfotype), intent(in) | FileInfo, |
integer(intki), intent(inout) | LineNum, | ||
character(*), intent(in) | ExpVarName, | ||
real(quki), intent(out) | Var, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This subroutine parses the specified line of text for two words.
One should be a the name of a variable and the other the value of the variable. Generate an error message if the value is the wrong type or if only one "word" is found.
WARNING: This routine assumes the "words" containing the variable name and value are <= 20 characters.
Use ParseVar (nwtc_io::parsevar) instead of directly calling a specific routine in the generic interface.
[out] | errstat | The error status. |
[in,out] | linenum | The number of the line to parse. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc. |
[out] | var | The variable to receive the input value. |
[out] | errmsg | The error message, if ErrStat /= 0. |
[in] | expvarname | The expected variable name. |
[in] | fileinfo | The derived type for holding the file information. |
subroutine nwtc_io::parsequvarwdefault | ( | type (fileinfotype), intent(in) | FileInfo, |
integer(intki), intent(inout) | LineNum, | ||
character(*), intent(in) | ExpVarName, | ||
real(quki), intent(out) | Var, | ||
real(quki), intent(in) | VarDefault, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This subroutine parses the specified line of text for two words.
One should be a the name of a variable and the other a value for the variable. If the variable is the character string "DEFAULT", a default value will be used to set the variable. Generate an error message if the value is the wrong type or if only one "word" is found.
WARNING: This routine assumes the "words" containing the variable name and value are <= 20 characters. Use ParseVarWDefault (nwtc_io::parsevarwdefault) instead of directly calling a specific routine in the generic interface.
[out] | errstat | The error status. |
[in,out] | linenum | The number of the line to parse. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc. |
[out] | var | The variable to receive the input value. |
[in] | vardefault | The default value for the variable. |
[out] | errmsg | The error message, if ErrStat /= 0. |
[in] | expvarname | The expected variable name. |
[in] | fileinfo | The derived type for holding the file information. |
subroutine nwtc_io::parser8ary | ( | type (fileinfotype), intent(in) | FileInfo, |
integer(intki), intent(inout) | LineNum, | ||
character(*), intent(in) | AryName, | ||
real(r8ki), dimension (arylen), intent(out) | Ary, | ||
integer, intent(in) | AryLen, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This subroutine parses the specified line of text for AryLen REAL values.
Generate an error message if the value is the wrong type. Use ParseAry (nwtc_io::parseary) instead of directly calling a specific routine in the generic interface.
[in] | arylen | The length of the array to parse. |
[out] | ary | The array to receive the input values. |
[out] | errstat | The error status. |
[in,out] | linenum | The number of the line to parse. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc. |
[in] | aryname | The array name we are trying to fill. |
[out] | errmsg | The error message, if ErrStat /= 0. |
[in] | fileinfo | The derived type for holding the file information. |
subroutine nwtc_io::parser8var | ( | type (fileinfotype), intent(in) | FileInfo, |
integer(intki), intent(inout) | LineNum, | ||
character(*), intent(in) | ExpVarName, | ||
real(r8ki), intent(out) | Var, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This subroutine parses the specified line of text for two words.
One should be a the name of a variable and the other the value of the variable. Generate an error message if the value is the wrong type or if only one "word" is found.
WARNING: This routine assumes the "words" containing the variable name and value are <= 20 characters.
Use ParseVar (nwtc_io::parsevar) instead of directly calling a specific routine in the generic interface.
[out] | errstat | The error status. |
[in,out] | linenum | The number of the line to parse. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc. |
[out] | var | The variable to receive the input value. |
[out] | errmsg | The error message, if ErrStat /= 0. |
[in] | expvarname | The expected variable name. |
[in] | fileinfo | The derived type for holding the file information. |
subroutine nwtc_io::parser8varwdefault | ( | type (fileinfotype), intent(in) | FileInfo, |
integer(intki), intent(inout) | LineNum, | ||
character(*), intent(in) | ExpVarName, | ||
real(r8ki), intent(out) | Var, | ||
real(r8ki), intent(in) | VarDefault, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This subroutine parses the specified line of text for two words.
One should be a the name of a variable and the other a value for the variable. If the variable is the character string "DEFAULT", a default value will be used to set the variable. Generate an error message if the value is the wrong type or if only one "word" is found.
WARNING: This routine assumes the "words" containing the variable name and value are <= 20 characters. Use ParseVarWDefault (nwtc_io::parsevarwdefault) instead of directly calling a specific routine in the generic interface.
[out] | errstat | The error status. |
[in,out] | linenum | The number of the line to parse. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc. |
[out] | var | The variable to receive the input value. |
[in] | vardefault | The default value for the variable. |
[out] | errmsg | The error message, if ErrStat /= 0. |
[in] | expvarname | The expected variable name. |
[in] | fileinfo | The derived type for holding the file information. |
subroutine nwtc_io::parsesiary | ( | type (fileinfotype), intent(in) | FileInfo, |
integer(intki), intent(inout) | LineNum, | ||
character(*), intent(in) | AryName, | ||
real(siki), dimension (arylen), intent(out) | Ary, | ||
integer, intent(in) | AryLen, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
subroutine nwtc_io::parsesivar | ( | type (fileinfotype), intent(in) | FileInfo, |
integer(intki), intent(inout) | LineNum, | ||
character(*), intent(in) | ExpVarName, | ||
real(siki), intent(out) | Var, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This subroutine parses the specified line of text for two words.
One should be a the name of a variable and the other the value of the variable. Generate an error message if the value is the wrong type or if only one "word" is found.
WARNING: This routine assumes the "words" containing the variable name and value are <= 20 characters.
Use ParseVar (nwtc_io::parsevar) instead of directly calling a specific routine in the generic interface.
[out] | errstat | The error status. |
[in,out] | linenum | The number of the line to parse. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc. |
[out] | var | The variable to receive the input value. |
[out] | errmsg | The error message, if ErrStat /= 0. |
[in] | expvarname | The expected variable name. |
[in] | fileinfo | The derived type for holding the file information. |
subroutine nwtc_io::parsesivarwdefault | ( | type (fileinfotype), intent(in) | FileInfo, |
integer(intki), intent(inout) | LineNum, | ||
character(*), intent(in) | ExpVarName, | ||
real(siki), intent(out) | Var, | ||
real(siki), intent(in) | VarDefault, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This subroutine parses the specified line of text for two words.
One should be a the name of a variable and the other a value for the variable. If the variable is the character string "DEFAULT", a default value will be used to set the variable. Generate an error message if the value is the wrong type or if only one "word" is found.
WARNING: This routine assumes the "words" containing the variable name and value are <= 20 characters. Use ParseVarWDefault (nwtc_io::parsevarwdefault) instead of directly calling a specific routine in the generic interface.
[out] | errstat | The error status. |
[in,out] | linenum | The number of the line to parse. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc. |
[out] | var | The variable to receive the input value. |
[in] | vardefault | The default value for the variable. |
[out] | errmsg | The error message, if ErrStat /= 0. |
[in] | expvarname | The expected variable name. |
[in] | fileinfo | The derived type for holding the file information. |
logical function nwtc_io::pathisrelative | ( | character(*), intent(in) | GivenFil | ) |
This routine determines if the given file name is absolute or relative.
We will consider an absolute path one that satisfies one of the following four criteria:
All others are considered relative.
[in] | givenfil | The name of the given file. |
subroutine nwtc_io::premeof | ( | character(*), intent(in) | Fil, |
character(*), intent(in) | Variable, | ||
logical, intent(in), optional | TrapErrors, | ||
character(*), intent(out), optional | ErrMsg | ||
) |
This routine prints out an end-of-file message and aborts the program.
[in] | fil | The name of the file that ran out of data. |
[in] | variable | The name of the variable we were trying to read at the time. |
[in] | traperrors | Determines if the program should abort or return to calling function |
[out] | errmsg | The name of the file that ran out of data. |
subroutine nwtc_io::print_fileinfo_struct | ( | integer(intki), intent(in) | U, |
type(fileinfotype), intent(in) | FileInfo | ||
) |
This subroutine prints the contents of the FileInfo data structure to the screen This may be useful for diagnostic purposes.
this is written to unit U
[in] | u | Unit number to print to |
[in] | fileinfo | derived type containing everything read from file |
subroutine nwtc_io::processcomfile | ( | character(*), intent(in) | TopFileName, |
type (fileinfotype), intent(out) | FileInfo, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine calls ScanComFile (nwtc_io::scancomfile) and ReadComFile (nwtc_io::readcomfile) to move non-comments in a set of nested files starting with TopFile into the FileInfo (nwtc_io::fileinfo) structure.
[out] | errstat | Error status. |
[out] | errmsg | Error message. |
[in] | topfilename | The name of the top file in the nested structure. |
[out] | fileinfo | The derived type for holding the file information. |
subroutine nwtc_io::progabort | ( | Message | , |
TrapErrors | , | ||
TimeWait | , | ||
ErrLevel | |||
) |
This routine outputs fatal error messages and stops the program.
[in] | timewait | Tells whether to wait for TimeWait s, or pause if < 0. |
[in] | errlevel | The error level to report to the OS. |
[in] | traperrors | Determines if the program should abort or return to calling function |
[in] | message | Error message. |
subroutine nwtc_io::progpause | ( | ) |
This routine pauses the program.
subroutine nwtc_io::progwarn | ( | Message | ) |
This routine outputs non-fatal warning messages and returns to the calling routine.
It beeps if ntwc_io::beep is true.
[in] | message | Warning message to print |
character(15) function nwtc_io::r2lstr16 | ( | real(quki), intent(in) | Num, |
character(*), optional | Fmt_in | ||
) |
This function returns a left-adjusted string representing the passed numeric value.
It eliminates trailing zeroes and even the decimal point if it is not a fraction.
Use Num2LStr (nwtc_io::num2lstr) instead of directly calling a specific routine in the generic interface.
[in] | num | The number to convert to a left-justified string. |
character(15) function nwtc_io::r2lstr4 | ( | real(siki), intent(in) | Num, |
character(*), optional | Fmt_in | ||
) |
This function returns a left-adjusted string representing the passed numeric value.
It eliminates trailing zeroes and even the decimal point if it is not a fraction.
Use Num2LStr (nwtc_io::num2lstr) instead of directly calling a specific routine in the generic interface.
[in] | num | The number to convert to a left-justified string. |
character(15) function nwtc_io::r2lstr8 | ( | real(r8ki), intent(in) | Num, |
character(*), optional | Fmt_in | ||
) |
This function returns a left-adjusted string representing the passed numeric value.
It eliminates trailing zeroes and even the decimal point if it is not a fraction.
Use Num2LStr (nwtc_io::num2lstr) instead of directly calling a specific routine in the generic interface.
[in] | num | The number to convert to a left-justified string. |
subroutine nwtc_io::readcary | ( | integer, intent(in) | UnIn, |
character(*), intent(in) | Fil, | ||
character(*), dimension(arylen), intent(out) | Ary, | ||
integer, intent(in) | AryLen, | ||
character(*), intent(in) | AryName, | ||
character(*), intent(in) | AryDescr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a AryLen values separated by whitespace (or other Fortran record delimiters such as commas) into an array (either on same line or multiple lines).
Use ReadAry (nwtc_io::readary) instead of directly calling a specific routine in the generic interface.
[in] | arylen | Length of the array. |
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status |
[out] | errmsg | Error message describing ErrStat |
[out] | ary | Array being read. |
[in] | arydescr | Text string describing the variable. |
[in] | aryname | Text string containing the variable name. |
[in] | fil | Name of the input file. |
subroutine nwtc_io::readcaryfromstr | ( | character(*), intent(in) | Str, |
character(*), dimension(arylen), intent(out) | Ary, | ||
integer, intent(in) | AryLen, | ||
character(*), intent(in) | AryName, | ||
character(*), intent(in) | AryDescr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a AryLen values separated by whitespace (or other Fortran record delimiters such as commas) into an array (either on same line or multiple lines) from an input string Use ReadAry (nwtc_io::readary) instead of directly calling a specific routine in the generic interface.
[in] | str | String to read from |
[in] | arylen | Length of the array. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status |
[out] | errmsg | Error message describing ErrStat |
[out] | ary | Array being read. |
[in] | arydescr | Text string describing the variable. |
[in] | aryname | Text string containing the variable name. |
subroutine nwtc_io::readcarylines | ( | integer, intent(in) | UnIn, |
character(*), intent(in) | Fil, | ||
character(*), dimension(arylen), intent(out) | Ary, | ||
integer, intent(in) | AryLen, | ||
character(*), intent(in) | AryName, | ||
character(*), intent(in) | AryDescr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a AryLen values into a real array from the next AryLen lines of the input file (one value per line).
Use ReadAryLines (nwtc_io::readarylines) instead of directly calling a specific routine in the generic interface.
[in] | arylen | Length of the array. |
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status |
[out] | errmsg | Error message describing ErrStat |
[out] | ary | Array variable being read. |
[in] | fil | Name of the input file. |
[in] | arydescr | Text string describing the variable. |
[in] | aryname | Text string containing the variable name. |
subroutine nwtc_io::readcom | ( | integer, intent(in) | UnIn, |
character(*), intent(in) | Fil, | ||
character(*), intent(in) | ComName, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc, | ||
character(*), intent(out), optional | Comment | ||
) |
This routine reads a comment from the next line of the input file.
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[in] | fil | Name of the input file. |
[in] | comname | Text string containing the comment name. |
[out] | errstat | Error status; if present, program does not abort on error |
[out] | errmsg | Error message |
[out] | comment | Text string containing the comment. |
recursive subroutine nwtc_io::readcomfile | ( | type (fileinfotype), intent(inout) | FileInfo, |
integer(intki), intent(in) | FileIndx, | ||
integer(intki), intent(inout) | AryInd, | ||
integer(intki), intent(in) | StartLine, | ||
integer(intki), intent(in) | LastLine, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine opens and reads the contents of a file with comments and stores the good stuff in the FileInfo structure.
You need to call ScanComFile() first to count the number of lines and get the list of files in the recursive tree. This information needs to be stored in the FileInfo structure before calling this routine.
[in,out] | aryind | The current index into the FileInfo arrays. |
[out] | errstat | Error status. |
[in] | fileindx | The pointer to file name in the list of files. |
[in] | lastline | The last line to read from this file. Includes blank and comment lines. Zero means read to the end of file. |
[in] | startline | The line at which to start processing this file. Includes blank and comment lines. |
[out] | errmsg | Error message. |
[in,out] | fileinfo | The derived type for holding the file information. |
subroutine nwtc_io::readcvar | ( | integer, intent(in) | UnIn, |
character(*), intent(in) | Fil, | ||
character(*), intent(out) | Var, | ||
character(*), intent(in) | VarName, | ||
character(*), intent(in) | VarDescr, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a variable from the next line of the input file.
Use ReadVar (nwtc_io::readvar) instead of directly calling a specific routine in the generic interface.
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status; if present, program does not abort on error |
[out] | errmsg | Error message |
[out] | var | Variable being read |
[in] | fil | Name of the input file. |
[in] | vardescr | Text string describing the variable. |
[in] | varname | Text string containing the variable name. |
subroutine nwtc_io::readfastbin | ( | integer(intki), intent(inout) | UnIn, |
logical, intent(in) | Init, | ||
type (fastdatatype), intent(inout) | FASTdata, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine reads the contents of a FAST binary output file (FASTbinFile) and stores it in FASTdata.
It is assumed that the name of the binary file is preloaded into FASTdataFile by the calling procedure.
[out] | errstat | An optional error level to be returned to the calling routine. |
[in,out] | unin | The IO unit for the FAST binary file. |
[in] | init | A flag to tell the routine to read only the file header for initialization purposes. |
[out] | errmsg | An optional error message to be returned to the calling routine. |
[in,out] | fastdata | The derived type for holding FAST output data. |
subroutine nwtc_io::readiary | ( | integer, intent(in) | UnIn, |
character(*), intent(in) | Fil, | ||
integer, dimension(arylen), intent(out) | Ary, | ||
integer, intent(in) | AryLen, | ||
character(*), intent(in) | AryName, | ||
character(*), intent(in) | AryDescr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a AryLen values separated by whitespace (or other Fortran record delimiters such as commas) into an array (either on same line or multiple lines).
Use ReadAry (nwtc_io::readary) instead of directly calling a specific routine in the generic interface.
[in] | arylen | Length of the array. |
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status |
[out] | errmsg | Error message describing ErrStat |
[out] | ary | Array being read. |
[in] | arydescr | Text string describing the variable. |
[in] | aryname | Text string containing the variable name. |
[in] | fil | Name of the input file. |
subroutine nwtc_io::readivar | ( | integer, intent(in) | UnIn, |
character(*), intent(in) | Fil, | ||
integer, intent(out) | Var, | ||
character(*), intent(in) | VarName, | ||
character(*), intent(in) | VarDescr, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a variable from the next line of the input file.
Use ReadVar (nwtc_io::readvar) instead of directly calling a specific routine in the generic interface.
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status; if present, program does not abort on error |
[out] | errmsg | Error message |
[out] | var | Variable being read |
[in] | fil | Name of the input file. |
[in] | vardescr | Text string describing the variable. |
[in] | varname | Text string containing the variable name. WARNING: this routine limits the size of the number being read to 30 characters |
subroutine nwtc_io::readivarwdefault | ( | integer, intent(in) | UnIn, |
character(*), intent(in) | Fil, | ||
integer, intent(out) | Var, | ||
character(*), intent(in) | VarName, | ||
character(*), intent(in) | VarDescr, | ||
integer, intent(in) | VarDefault, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a scalar variable from the next line of the input file.
Use ReadVarWDefault (nwtc_io::readvarwdefault) instead of directly calling a specific routine in the generic interface. WARNING: this routine limits the size of the number being read to 30 characters
[out] | var | variable being read |
[in] | vardefault | default value of variable being read |
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status; if present, program does not abort on error |
[out] | errmsg | Error message |
[in] | fil | Name of the input file. |
[in] | vardescr | Text string describing the variable. |
[in] | varname | Text string containing the variable name. |
subroutine nwtc_io::readlary | ( | integer, intent(in) | UnIn, |
character(*), intent(in) | Fil, | ||
logical, dimension(arylen), intent(out) | Ary, | ||
integer, intent(in) | AryLen, | ||
character(*), intent(in) | AryName, | ||
character(*), intent(in) | AryDescr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a AryLen values separated by whitespace (or other Fortran record delimiters such as commas) into an array (either on same line or multiple lines).
Use ReadAry (nwtc_io::readary) instead of directly calling a specific routine in the generic interface.
[in] | arylen | Length of the array. |
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status |
[out] | errmsg | Error message describing ErrStat |
[out] | ary | Array being read. |
[in] | arydescr | Text string describing the variable. |
[in] | aryname | Text string containing the variable name. |
[in] | fil | Name of the input file. |
subroutine nwtc_io::readline | ( | integer, intent(in) | UnIn, |
character(*), intent(in) | CommentChars, | ||
character(*), intent(out) | Line, | ||
integer, intent(out) | LineLen, | ||
integer(intki), intent(out) | IOStat | ||
) |
This routine reads a line from the specified input file and returns the non-comment portion of the line.
[out] | iostat | IOS error status from file read. |
[in] | unin | The unit number for the file being read. |
[out] | linelen | The length of the line returned from ReadLine(). |
[in] | commentchars | The list of possible comment characters. |
[out] | line | The decommented line being returned to the calling routine. |
subroutine nwtc_io::readlvar | ( | integer, intent(in) | UnIn, |
character(*), intent(in) | Fil, | ||
logical, intent(out) | Var, | ||
character(*), intent(in) | VarName, | ||
character(*), intent(in) | VarDescr, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a variable from the next line of the input file.
Use ReadVar (nwtc_io::readvar) instead of directly calling a specific routine in the generic interface.
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status; if present, program does not abort on error |
[out] | errmsg | Error message |
[out] | var | Variable being read |
[in] | fil | Name of the input file. |
[in] | vardescr | Text string describing the variable. |
[in] | varname | Text string containing the variable name. |
subroutine nwtc_io::readlvarwdefault | ( | integer, intent(in) | UnIn, |
character(*), intent(in) | Fil, | ||
logical, intent(out) | Var, | ||
character(*), intent(in) | VarName, | ||
character(*), intent(in) | VarDescr, | ||
logical, intent(in) | VarDefault, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a logical variable from the next line of the input file.
Use ReadVarWDefault (nwtc_io::readvarwdefault) instead of directly calling a specific routine in the generic interface. WARNING: this routine limits the size of the number being read to 30 characters
[out] | var | variable being read |
[in] | vardefault | default value of variable being read |
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status; if present, program does not abort on error |
[out] | errmsg | Error message |
[in] | fil | Name of the input file. |
[in] | vardescr | Text string describing the variable. |
[in] | varname | Text string containing the variable name. |
subroutine nwtc_io::readnum | ( | integer, intent(in) | UnIn, |
character(*), intent(in) | Fil, | ||
character(*), intent(out) | Word, | ||
character(*), intent(in) | VarName, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine reads a single word from a file and tests to see if it's a pure number (no true or false).
[in] | unin | I/O unit for input file. |
[out] | errstat | Error status; if present, program does not abort on error |
[out] | errmsg | Error message |
[in] | fil | Name of the input file. |
[in] | varname | Text string containing the variable name. |
[out] | word | Text string containing the first word from the input line. |
subroutine nwtc_io::readoutputlist | ( | integer, intent(in) | UnIn, |
character(*), intent(in) | Fil, | ||
character(*), dimension(:), intent(out) | CharAry, | ||
integer, intent(out) | AryLenRead, | ||
character(*), intent(in) | AryName, | ||
character(*), intent(in) | AryDescr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in) | UnEc | ||
) |
This routine reads up to MaxAryLen values from an input file and store them in CharAry(:).
These values represent the names of output channels, and they are specified in the format required for OutList(:) in FAST input files. The end of this list is specified with the line beginning with the 3 characters "END".
[out] | arylenread | Length of the array that was actually read. |
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file (if > 0). |
[out] | errstat | Error status |
[out] | errmsg | Error message |
[out] | charary | Character array being read (calling routine dimensions it to max allowable size). |
[in] | fil | Name of the input file. |
[in] | arydescr | Text string describing the variable. |
[in] | aryname | Text string containing the variable name. |
subroutine nwtc_io::readoutputlistfromfileinfo | ( | type (fileinfotype), intent(in) | FileInfo, |
integer(intki), intent(inout) | LineNum, | ||
character(*), dimension(:), intent(out) | CharAry, | ||
integer, intent(out) | AryLenRead, | ||
character(*), intent(in) | AryName, | ||
character(*), intent(in) | AryDescr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads up to MaxAryLen values from an input file and store them in CharAry(:).
These values represent the names of output channels, and they are specified in the format required for OutList(:) in FAST input files. The end of this list is specified with the line beginning with the 3 characters "END".
[in] | fileinfo | The derived type for holding the file information. |
[in,out] | linenum | The number of the line to parse. |
[out] | arylenread | Length of the array that was actually read. |
[in] | unec | I/O unit for echo file (if > 0). |
[out] | errstat | Error status |
[out] | errmsg | Error message |
[out] | charary | Character array being read (calling routine dimensions it to max allowable size). |
[in] | arydescr | Text string describing the variable. |
[in] | aryname | Text string containing the variable name. |
subroutine nwtc_io::readr16ary | ( | integer, intent(in) | UnIn, |
character(*), intent(in) | Fil, | ||
real(quki), dimension(arylen), intent(inout) | Ary, | ||
integer, intent(in) | AryLen, | ||
character(*), intent(in) | AryName, | ||
character(*), intent(in) | AryDescr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a AryLen values separated by whitespace (or other Fortran record delimiters such as commas) into an array (either on same line or multiple lines).
Use ReadAry (nwtc_io::readary) instead of directly calling a specific routine in the generic interface.
[in] | arylen | Length of the array. |
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status |
[out] | errmsg | Error message describing ErrStat |
[out] | ary | Array being read. |
[in] | arydescr | Text string describing the variable. |
[in] | aryname | Text string containing the variable name. |
[in] | fil | Name of the input file. |
subroutine nwtc_io::readr16aryfromstr | ( | character(*), intent(in) | Str, |
real(quki), dimension(arylen), intent(inout) | Ary, | ||
integer, intent(in) | AryLen, | ||
character(*), intent(in) | AryName, | ||
character(*), intent(in) | AryDescr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a AryLen values separated by whitespace (or other Fortran record delimiters such as commas) into an array (either on same line or multiple lines) from an input string Use ReadAry (nwtc_io::readary) instead of directly calling a specific routine in the generic interface.
[in] | str | String to read from |
[in] | arylen | Length of the array. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status |
[out] | errmsg | Error message describing ErrStat |
[in] | arydescr | Text string describing the variable. |
[in] | aryname | Text string containing the variable name. |
subroutine nwtc_io::readr16arylines | ( | integer, intent(in) | UnIn, |
character(*), intent(in) | Fil, | ||
real(quki), dimension(arylen), intent(out) | Ary, | ||
integer, intent(in) | AryLen, | ||
character(*), intent(in) | AryName, | ||
character(*), intent(in) | AryDescr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a AryLen values into a real array from the next AryLen lines of the input file (one value per line).
Use ReadAryLines (nwtc_io::readarylines) instead of directly calling a specific routine in the generic interface.
[in] | arylen | Length of the array. |
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status |
[out] | errmsg | Error message describing ErrStat |
[out] | ary | Array variable being read. |
[in] | fil | Name of the input file. |
[in] | arydescr | Text string describing the variable. |
[in] | aryname | Text string containing the variable name. |
subroutine nwtc_io::readr16var | ( | integer, intent(in) | UnIn, |
character( *), intent(in) | Fil, | ||
real(quki), intent(out) | Var, | ||
character( *), intent(in) | VarName, | ||
character( *), intent(in) | VarDescr, | ||
integer(intki), intent(out), optional | ErrStat, | ||
character(*), intent(out), optional | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a variable from the next line of the input file.
Use ReadVar (nwtc_io::readvar) instead of directly calling a specific routine in the generic interface.
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status; if present, program does not abort on error |
[out] | errmsg | Error message |
[out] | var | Variable being read |
[in] | fil | Name of the input file. |
[in] | vardescr | Text string describing the variable. |
[in] | varname | Text string containing the variable name. WARNING: this routine limits the size of the number being read to 30 characters |
subroutine nwtc_io::readr16varwdefault | ( | integer, intent(in) | UnIn, |
character( *), intent(in) | Fil, | ||
real(quki), intent(out) | Var, | ||
character( *), intent(in) | VarName, | ||
character( *), intent(in) | VarDescr, | ||
real(quki), intent(in) | VarDefault, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a scalar variable from the next line of the input file.
Use ReadVarWDefault (nwtc_io::readvarwdefault) instead of directly calling a specific routine in the generic interface. WARNING: this routine limits the size of the number being read to 30 characters
[out] | var | variable being read |
[in] | vardefault | default value of variable being read |
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status; if present, program does not abort on error |
[out] | errmsg | Error message |
[in] | fil | Name of the input file. |
[in] | vardescr | Text string describing the variable. |
[in] | varname | Text string containing the variable name. |
[out] | var | Variable being read |
[in] | vardefault | Default value for variable being read |
[out] | errstat | Error status; if present, program does not abort on error |
[out] | errmsg | Error message |
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[in] | fil | Name of the input file. |
[in] | vardescr | Text string describing the variable. |
[in] | varname | Text string containing the variable name. |
subroutine nwtc_io::readr4ary | ( | integer, intent(in) | UnIn, |
character(*), intent(in) | Fil, | ||
real(siki), dimension(arylen), intent(inout) | Ary, | ||
integer, intent(in) | AryLen, | ||
character(*), intent(in) | AryName, | ||
character(*), intent(in) | AryDescr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a AryLen values separated by whitespace (or other Fortran record delimiters such as commas) into an array (either on same line or multiple lines).
Use ReadAry (nwtc_io::readary) instead of directly calling a specific routine in the generic interface.
[in] | arylen | Length of the array. |
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status |
[out] | errmsg | Error message describing ErrStat |
[out] | ary | Array being read. |
[in] | arydescr | Text string describing the variable. |
[in] | aryname | Text string containing the variable name. |
[in] | fil | Name of the input file. |
subroutine nwtc_io::readr4aryfromstr | ( | character(*), intent(in) | Str, |
real(siki), dimension(arylen), intent(inout) | Ary, | ||
integer, intent(in) | AryLen, | ||
character(*), intent(in) | AryName, | ||
character(*), intent(in) | AryDescr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a AryLen values separated by whitespace (or other Fortran record delimiters such as commas) into an array (either on same line or multiple lines) from an input string Use ReadAry (nwtc_io::readary) instead of directly calling a specific routine in the generic interface.
[in] | str | String to read from |
[in] | arylen | Length of the array. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status |
[out] | errmsg | Error message describing ErrStat |
[in] | arydescr | Text string describing the variable. |
[in] | aryname | Text string containing the variable name. |
subroutine nwtc_io::readr4arylines | ( | integer, intent(in) | UnIn, |
character(*), intent(in) | Fil, | ||
real(siki), dimension(arylen), intent(out) | Ary, | ||
integer, intent(in) | AryLen, | ||
character(*), intent(in) | AryName, | ||
character(*), intent(in) | AryDescr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a AryLen values into a real array from the next AryLen lines of the input file (one value per line).
Use ReadAryLines (nwtc_io::readarylines) instead of directly calling a specific routine in the generic interface.
[in] | arylen | Length of the array. |
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status |
[out] | errmsg | Error message describing ErrStat |
[out] | ary | Array variable being read. |
[in] | fil | Name of the input file. |
[in] | arydescr | Text string describing the variable. |
[in] | aryname | Text string containing the variable name. |
subroutine nwtc_io::readr4var | ( | integer, intent(in) | UnIn, |
character( *), intent(in) | Fil, | ||
real(siki), intent(out) | Var, | ||
character( *), intent(in) | VarName, | ||
character( *), intent(in) | VarDescr, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a variable from the next line of the input file.
Use ReadVar (nwtc_io::readvar) instead of directly calling a specific routine in the generic interface.
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status; if present, program does not abort on error |
[out] | errmsg | Error message |
[out] | var | Variable being read |
[in] | fil | Name of the input file. |
[in] | vardescr | Text string describing the variable. |
[in] | varname | Text string containing the variable name. WARNING: this routine limits the size of the number being read to 30 characters |
subroutine nwtc_io::readr4varwdefault | ( | integer, intent(in) | UnIn, |
character( *), intent(in) | Fil, | ||
real(siki), intent(out) | Var, | ||
character( *), intent(in) | VarName, | ||
character( *), intent(in) | VarDescr, | ||
real(siki), intent(in) | VarDefault, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a scalar variable from the next line of the input file.
Use ReadVarWDefault (nwtc_io::readvarwdefault) instead of directly calling a specific routine in the generic interface. WARNING: this routine limits the size of the number being read to 30 characters
[out] | var | variable being read |
[in] | vardefault | default value of variable being read |
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status; if present, program does not abort on error |
[out] | errmsg | Error message |
[in] | fil | Name of the input file. |
[in] | vardescr | Text string describing the variable. |
[in] | varname | Text string containing the variable name. |
subroutine nwtc_io::readr8ary | ( | integer, intent(in) | UnIn, |
character(*), intent(in) | Fil, | ||
real(r8ki), dimension(arylen), intent(inout) | Ary, | ||
integer, intent(in) | AryLen, | ||
character(*), intent(in) | AryName, | ||
character(*), intent(in) | AryDescr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a AryLen values separated by whitespace (or other Fortran record delimiters such as commas) into an array (either on same line or multiple lines).
Use ReadAry (nwtc_io::readary) instead of directly calling a specific routine in the generic interface.
[in] | arylen | Length of the array. |
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status |
[out] | errmsg | Error message describing ErrStat |
[out] | ary | Array being read. |
[in] | arydescr | Text string describing the variable. |
[in] | aryname | Text string containing the variable name. |
[in] | fil | Name of the input file. |
subroutine nwtc_io::readr8aryfromstr | ( | character(*), intent(in) | Str, |
real(r8ki), dimension(arylen), intent(inout) | Ary, | ||
integer, intent(in) | AryLen, | ||
character(*), intent(in) | AryName, | ||
character(*), intent(in) | AryDescr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a AryLen values separated by whitespace (or other Fortran record delimiters such as commas) into an array (either on same line or multiple lines) from an input string Use ReadAry (nwtc_io::readary) instead of directly calling a specific routine in the generic interface.
[in] | str | String to read from |
[in] | arylen | Length of the array. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status |
[out] | errmsg | Error message describing ErrStat |
[in] | arydescr | Text string describing the variable. |
[in] | aryname | Text string containing the variable name. |
subroutine nwtc_io::readr8arylines | ( | integer, intent(in) | UnIn, |
character(*), intent(in) | Fil, | ||
real(r8ki), dimension(arylen), intent(out) | Ary, | ||
integer, intent(in) | AryLen, | ||
character(*), intent(in) | AryName, | ||
character(*), intent(in) | AryDescr, | ||
integer, intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a AryLen values into a real array from the next AryLen lines of the input file (one value per line).
Use ReadAryLines (nwtc_io::readarylines) instead of directly calling a specific routine in the generic interface.
[in] | arylen | Length of the array. |
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status |
[out] | errmsg | Error message describing ErrStat |
[out] | ary | Array variable being read. |
[in] | fil | Name of the input file. |
[in] | arydescr | Text string describing the variable. |
[in] | aryname | Text string containing the variable name. |
subroutine nwtc_io::readr8var | ( | integer, intent(in) | UnIn, |
character( *), intent(in) | Fil, | ||
real(r8ki), intent(out) | Var, | ||
character( *), intent(in) | VarName, | ||
character( *), intent(in) | VarDescr, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a variable from the next line of the input file.
Use ReadVar (nwtc_io::readvar) instead of directly calling a specific routine in the generic interface.
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status; if present, program does not abort on error |
[out] | errmsg | Error message |
[out] | var | Variable being read |
[in] | fil | Name of the input file. |
[in] | vardescr | Text string describing the variable. |
[in] | varname | Text string containing the variable name. WARNING: this routine limits the size of the number being read to 30 characters |
subroutine nwtc_io::readr8varwdefault | ( | integer, intent(in) | UnIn, |
character( *), intent(in) | Fil, | ||
real(r8ki), intent(out) | Var, | ||
character( *), intent(in) | VarName, | ||
character( *), intent(in) | VarDescr, | ||
real(r8ki), intent(in) | VarDefault, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a scalar variable from the next line of the input file.
Use ReadVarWDefault (nwtc_io::readvarwdefault) instead of directly calling a specific routine in the generic interface. WARNING: this routine limits the size of the number being read to 30 characters
[out] | var | variable being read |
[in] | vardefault | default value of variable being read |
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status; if present, program does not abort on error |
[out] | errmsg | Error message |
[in] | fil | Name of the input file. |
[in] | vardescr | Text string describing the variable. |
[in] | varname | Text string containing the variable name. |
[out] | var | Variable being read |
[in] | vardefault | Default value for variable being read |
[out] | errstat | Error status; if present, program does not abort on error |
[out] | errmsg | Error message |
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[in] | fil | Name of the input file. |
[in] | vardescr | Text string describing the variable. |
[in] | varname | Text string containing the variable name. |
subroutine nwtc_io::readstr | ( | integer, intent(in) | UnIn, |
character(*), intent(in) | Fil, | ||
character(*), intent(out) | CharVar, | ||
character(*), intent(in) | VarName, | ||
character(*), intent(in) | VarDescr, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
integer, intent(in), optional | UnEc | ||
) |
This routine reads a string from the next line of the input file.
[in] | unin | I/O unit for input file. |
[in] | unec | I/O unit for echo file. If present and > 0, write to UnEc |
[out] | errstat | Error status; if present, program does not abort on error |
[out] | errmsg | Error message |
[out] | charvar | Integer variable being read. |
[in] | fil | Name of the input file. |
[in] | vardescr | Text string describing the variable. |
[in] | varname | Text string containing the variable name. |
subroutine nwtc_io::readvtk_sp_info | ( | character(*), intent(in) | FileName, |
character(1024), intent(out) | descr, | ||
integer(intki), dimension(3), intent(out) | dims, | ||
real(reki), dimension(3), intent(out) | origin, | ||
real(reki), dimension(3), intent(out) | gridSpacing, | ||
character(1024), intent(out) | vecLabel, | ||
integer(intki), intent(inout) | Un, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine reads the header for a vtk, ascii, structured_points dataset file, including all the information about the structured points.
It tries to open a text file for reading and returns the Unit number of the opened file. The caller is responsible for closing the file unit unless caller set Un = -1!
[in] | filename | Name of output file |
[out] | descr | Line describing the contents of the file |
[out] | dims | dimension of the 3D grid (nX,nY,nZ) |
[out] | origin | the lower-left corner of the 3D grid (X0,Y0,Z0) |
[out] | gridspacing | spacing between grid points in each of the 3 directions (dX,dY,dZ) |
[in,out] | un | unit number of opened file |
[out] | errstat | error level/status of OpenFOutFile operation |
[out] | errmsg | message when error occurs |
subroutine nwtc_io::readvtk_sp_vectors | ( | character(*), intent(in) | FileName, |
integer(intki), intent(in) | Un, | ||
integer(intki), dimension(3), intent(in) | dims, | ||
real(siki), dimension(:,:,:,:), intent(out) | gridVals, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine reads the vector data for a vtk, ascii, structured_points dataset file, The Unit number of the file is already assumed to be valid via a previous call to ReadVTK_SP_info.
[in] | filename | Name of output file |
[in] | un | unit number of opened file |
[in] | dims | dimension of the 3D grid (nX,nY,nZ) |
[out] | gridvals | 4D array of data, size (3,nX,nY,nZ), must be pre-allocated |
[out] | errstat | error level/status of OpenFOutFile operation |
[out] | errmsg | message when error occurs |
subroutine nwtc_io::removenullchar | ( | character(*), intent(inout) | Str | ) |
This routine removes trailing C_NULL characters, which can be present when passing strings between C and Fortran.
[in,out] | str | string that will be truncated before the null character |
recursive subroutine nwtc_io::scancomfile | ( | type (fnlist_type), intent(in), pointer | FirstFile, |
type (fnlist_type), intent(in), pointer | ThisFile, | ||
type (fnlist_type), intent(inout), pointer | LastFile, | ||
integer(intki), intent(in) | StartLine, | ||
integer(intki), intent(in) | LastLine, | ||
integer(intki), intent(inout) | NumLines, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine opens and scans the contents of a file with comments counting non-comment lines.
If a line has "@Filename" on a line, it recursively scans that file to add the non-comment lines to the total. This routine is typically called before ReadComFile() (nwtc_io::readcomfile) to count the number on non-comment lines that will need to be stored. It also adds to a linked list of unique file names that are in the call chain.
[out] | errstat | Error status. |
[in] | lastline | The last line to read from this file. Includes blank and comment lines. Zero means read to the end of file. |
[in,out] | numlines | The total number of non-comment lines scanned so far. |
[in] | startline | The line at which to start processing this file. Includes blank and comment lines. |
[out] | errmsg | Error message. |
[in] | firstfile | The first file in the linked list. |
[in,out] | lastfile | The last file in the linked list. |
[in] | thisfile | The last file in the linked list. |
subroutine nwtc_io::str2intary | ( | character(*), intent(in) | Str, |
integer(intki), dimension(:), intent(out) | IntAry, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine converts a string (character array) into an equivalent ASCII array of integers.
This routine is the inverse of the IntAry2Str() routine.
[in] | str | The string to convert |
[out] | intary | ASCII representation of Str |
[out] | errstat | Error status |
[out] | errmsg | Error message associated with ErrStat |
subroutine nwtc_io::waittime | ( | WaitSecs | ) |
This routine pauses program executaion for a specified number of seconds.
[in] | waitsecs | The number of seconds to wait. |
subroutine nwtc_io::wrbinfast | ( | character(*), intent(in) | FileName, |
integer(b2ki), intent(in) | FileID, | ||
character(*), intent(in) | DescStr, | ||
character(chanlen), dimension(:), intent(in) | ChanName, | ||
character(chanlen), dimension(:), intent(in) | ChanUnit, | ||
real(dbki), dimension(:), intent(in) | TimeData, | ||
real(reki), dimension(:,:), intent(in) | AllOutData, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This subroutine opens a binary file named FileName, and writes a the AllOutData Matrix to a 16-bit packed binary file.
A text DescStr is written to the file as well as the text in the ChanName and ChanUnit arrays. The file is closed at the end of this subroutine call (and on error).
NOTE: Developers may wish to inquire if the file can be opened at the start of a simulation to ensure that it's available before running the simulation (i.e., don't run a code for a long time only to find out that the file cannot be opened for writing).
[in] | timedata | The time being output to the file (if using FileFmtID_WithoutTime: element 1 is the first output time, element 2 is the delta t) |
[in] | alloutdata | All of the data being written to the file (except time; note that the channels are the rows and time is the column–this is done for speed of saving the array) |
[out] | errstat | Indicates whether an error occurred (see NWTC_Library) |
[in] | fileid | File ID, used to determine format of output file (use FileFmtID_WithTime or FileFmtID_WithoutTime) |
[in] | channame | The output channel names (including Time) |
[in] | chanunit | The output channel units (including Time) |
[in] | descstr | Description to write to the binary file (e.g., program version, date, & time) |
[out] | errmsg | Error message associated with the ErrStat |
[in] | filename | Name of the file to write the output in |
subroutine nwtc_io::wrfilenr | ( | integer, intent(in) | Unit, |
character(*), intent(in) | Str | ||
) |
This routine writes out a string to the file connected to Unit without following it with a new line.
subroutine nwtc_io::wriaryfilenr | ( | integer, intent(in) | Unit, |
integer(intki), dimension (:), intent(in) | Ary, | ||
character(*), intent(in) | Fmt, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine writes out an integer array to the file connected to Unit without following it with a new line.
Use WrNumAryFileNR (nwtc_io::wrnumaryfilenr) instead of directly calling a specific routine in the generic interface.
[in] | unit | I/O unit for input file. |
[in] | ary | Array to be written without a newline at the end. |
[in] | fmt | Fmt of one element to be written. |
[out] | errstat | Error status |
[out] | errmsg | Error message associated with ErrStat |
subroutine nwtc_io::wrmatrix1r16 | ( | real(quki), dimension(:), intent(in) | A, |
integer, intent(in) | Un, | ||
character(*), intent(in) | ReFmt, | ||
character(*), intent(in), optional | MatName | ||
) |
This routine writes all the values of a 1- or 2-dimensional array, A, of real numbers to unit Un, using ReFmt for each individual value in the array.
If MatName is present, it also preceeds the matrix with "MatName" and the number of rows (dimension 1 of A) and columns (dimension 2 of A). It is useful for debugging and/or writing summary files. Use WrMatrix (nwtc_io::wrmatrix) instead of directly calling a specific routine in the generic interface.
[in] | a | vector/matrix to be written |
[in] | un | Fortran unit number where matrix will be written |
[in] | refmt | Format for printing numbers |
[in] | matname | name of matrix |
subroutine nwtc_io::wrmatrix1r4 | ( | real(siki), dimension(:), intent(in) | A, |
integer, intent(in) | Un, | ||
character(*), intent(in) | ReFmt, | ||
character(*), intent(in), optional | MatName | ||
) |
This routine writes all the values of a 1- or 2-dimensional array, A, of real numbers to unit Un, using ReFmt for each individual value in the array.
If MatName is present, it also preceeds the matrix with "MatName" and the number of rows (dimension 1 of A) and columns (dimension 2 of A). It is useful for debugging and/or writing summary files. Use WrMatrix (nwtc_io::wrmatrix) instead of directly calling a specific routine in the generic interface.
[in] | a | vector/matrix to be written |
[in] | un | Fortran unit number where matrix will be written |
[in] | refmt | Format for printing numbers |
[in] | matname | name of matrix |
subroutine nwtc_io::wrmatrix1r8 | ( | real(r8ki), dimension(:), intent(in) | A, |
integer, intent(in) | Un, | ||
character(*), intent(in) | ReFmt, | ||
character(*), intent(in), optional | MatName | ||
) |
This routine writes all the values of a 1- or 2-dimensional array, A, of real numbers to unit Un, using ReFmt for each individual value in the array.
If MatName is present, it also preceeds the matrix with "MatName" and the number of rows (dimension 1 of A) and columns (dimension 2 of A). It is useful for debugging and/or writing summary files. Use WrMatrix (nwtc_io::wrmatrix) instead of directly calling a specific routine in the generic interface.
[in] | a | vector/matrix to be written |
[in] | un | Fortran unit number where matrix will be written |
[in] | refmt | Format for printing numbers |
[in] | matname | name of matrix |
subroutine nwtc_io::wrmatrix2r16 | ( | real(quki), dimension(:,:), intent(in) | A, |
integer, intent(in) | Un, | ||
character(*), intent(in) | ReFmt, | ||
character(*), intent(in), optional | MatName | ||
) |
This routine writes all the values of a 1- or 2-dimensional array, A, of real numbers to unit Un, using ReFmt for each individual value in the array.
If MatName is present, it also preceeds the matrix with "MatName" and the number of rows (dimension 1 of A) and columns (dimension 2 of A). It is useful for debugging and/or writing summary files. Use WrMatrix (nwtc_io::wrmatrix) instead of directly calling a specific routine in the generic interface.
[in] | a | vector/matrix to be written |
[in] | un | Fortran unit number where matrix will be written |
[in] | refmt | Format for printing numbers |
[in] | matname | name of matrix |
subroutine nwtc_io::wrmatrix2r4 | ( | real(siki), dimension(:,:), intent(in) | A, |
integer, intent(in) | Un, | ||
character(*), intent(in) | ReFmt, | ||
character(*), intent(in), optional | MatName | ||
) |
This routine writes all the values of a 1- or 2-dimensional array, A, of real numbers to unit Un, using ReFmt for each individual value in the array.
If MatName is present, it also preceeds the matrix with "MatName" and the number of rows (dimension 1 of A) and columns (dimension 2 of A). It is useful for debugging and/or writing summary files. Use WrMatrix (nwtc_io::wrmatrix) instead of directly calling a specific routine in the generic interface.
[in] | a | vector/matrix to be written |
[in] | un | Fortran unit number where matrix will be written |
[in] | refmt | Format for printing numbers |
[in] | matname | name of matrix |
subroutine nwtc_io::wrmatrix2r8 | ( | real(r8ki), dimension(:,:), intent(in) | A, |
integer, intent(in) | Un, | ||
character(*), intent(in) | ReFmt, | ||
character(*), intent(in), optional | MatName | ||
) |
This routine writes all the values of a 1- or 2-dimensional array, A, of real numbers to unit Un, using ReFmt for each individual value in the array.
If MatName is present, it also preceeds the matrix with "MatName" and the number of rows (dimension 1 of A) and columns (dimension 2 of A). It is useful for debugging and/or writing summary files. Use WrMatrix (nwtc_io::wrmatrix) instead of directly calling a specific routine in the generic interface.
[in] | a | vector/matrix to be written |
[in] | un | Fortran unit number where matrix will be written |
[in] | refmt | Format for printing numbers |
[in] | matname | name of matrix |
subroutine nwtc_io::wrpartialmatrix1r8 | ( | real(r8ki), dimension(:), intent(in) | A, |
integer, intent(in) | Un, | ||
character(*), intent(in) | ReFmt, | ||
character(*), intent(in) | MatName, | ||
logical, dimension(:), intent(in), optional | UseCol, | ||
logical, intent(in), optional | UseAllCols, | ||
real(r8ki), dimension(:), intent(in), optional | ExtCol | ||
) |
Based on nwtc_io::wrmatrix, this routine writes a matrix to an already-open text file.
It allows the user to omit rows and columns of A in the the file. Use WrPartialMatrix (nwtc_io::wrpartialmatrix) instead of directly calling a specific routine in the generic interface.
[in] | a | matrix to write |
[in] | un | unit where matrix will be written |
[in] | refmt | Format for printing ReKi numbers |
[in] | matname | name of the matrix to write |
[in] | usecol | must be size(A,2); this routine will print only the columns where UseCol is true |
[in] | useallcols | a scalar that, if set to true, overrides UseCol and will print all columns |
[in] | extcol | columns to add to the end of matrix A |
subroutine nwtc_io::wrpartialmatrix2r8 | ( | real(r8ki), dimension(:,:), intent(in) | A, |
integer, intent(in) | Un, | ||
character(*), intent(in) | ReFmt, | ||
character(*), intent(in) | MatName, | ||
logical, dimension(:), intent(in), optional | UseRow, | ||
logical, dimension(:), intent(in), optional | UseCol, | ||
logical, intent(in), optional | UseAllRows, | ||
logical, intent(in), optional | UseAllCols, | ||
real(r8ki), dimension(:,:), intent(in), optional | ExtCol | ||
) |
Based on nwtc_io::wrmatrix, this routine writes a matrix to an already-open text file.
It allows the user to omit rows and columns of A in the the file. Use WrPartialMatrix (nwtc_io::wrpartialmatrix) instead of directly calling a specific routine in the generic interface.
[in] | a | matrix to write |
[in] | un | unit where matrix will be written |
[in] | refmt | Format for printing ReKi numbers |
[in] | matname | name of the matrix to write |
[in] | usecol | must be size(A,2); this routine will print only the columns where UseCol is true |
[in] | useallcols | a scalar that, if set to true, overrides UseCol and will print all columns |
[in] | extcol | columns to add to the end of matrix A |
[in] | userow | must be size(A,1); this routine will print only the rows where UseRow is true |
[in] | useallrows | a scalar that, if set to true, overrides UseRow and will print all rows |
subroutine nwtc_io::wrpr | ( | character(*), intent(in) | Str | ) |
This routine writes out a prompt to the screen without following it with a new line, though a new line precedes it.
[in] | str | The prompt string to print. |
subroutine nwtc_io::wrr16aryfilenr | ( | integer, intent(in) | Unit, |
real(quki), dimension (:), intent(in) | Ary, | ||
character(*), intent(in) | Fmt, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine writes out a real array to the file connected to Unit without following it with a new line.
Use WrNumAryFileNR (nwtc_io::wrnumaryfilenr) instead of directly calling a specific routine in the generic interface.
[in] | unit | I/O unit for input file. |
[in] | ary | Array to be written without a newline at the end. |
[in] | fmt | Fmt of one element to be written. |
[out] | errstat | Error status |
[out] | errmsg | Error message associated with ErrStat |
subroutine nwtc_io::wrr4aryfilenr | ( | integer, intent(in) | Unit, |
real(siki), dimension (:), intent(in) | Ary, | ||
character(*), intent(in) | Fmt, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine writes out a real array to the file connected to Unit without following it with a new line.
Use WrNumAryFileNR (nwtc_io::wrnumaryfilenr) instead of directly calling a specific routine in the generic interface.
[in] | unit | I/O unit for input file. |
[in] | ary | Array to be written without a newline at the end. |
[in] | fmt | Fmt of one element to be written. |
[out] | errstat | Error status |
[out] | errmsg | Error message associated with ErrStat |
subroutine nwtc_io::wrr8aryfilenr | ( | integer, intent(in) | Unit, |
real(r8ki), dimension (:), intent(in) | Ary, | ||
character(*), intent(in) | Fmt, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine writes out a real array to the file connected to Unit without following it with a new line.
Use WrNumAryFileNR (nwtc_io::wrnumaryfilenr) instead of directly calling a specific routine in the generic interface.
[in] | unit | I/O unit for input file. |
[in] | ary | Array to be written without a newline at the end. |
[in] | fmt | Fmt of one element to be written. |
[out] | errstat | Error status |
[out] | errmsg | Error message associated with ErrStat |
recursive subroutine nwtc_io::wrscr | ( | InStr | ) |
This routine writes out a string to the screen.
[in] | instr | The input string to write to the screen. |
subroutine nwtc_io::wrscr1 | ( | Str | ) |
This routine writes out a string to the screen after a blank line.
str | The string to print. |
subroutine nwtc_io::wrvtk_footer | ( | integer(intki), intent(in) | Un | ) |
This routine writes out the footer for an vtk xml file (associated header generated in nwtc_io::wrvtk_header).
It closes the file Un.
[in] | un | unit number of opened file |
subroutine nwtc_io::wrvtk_header | ( | character(*), intent(in) | FileName, |
integer(intki), intent(in) | NumberOfPoints, | ||
integer(intki), intent(in) | NumberOfLines, | ||
integer(intki), intent(in) | NumberOfPolys, | ||
integer(intki), intent(out) | Un, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine writes out the heading for an vtk xml file (associated footer generated in nwtc_io::wrvtk_footer).
It tries to open a text file for writing and returns the Unit number of the opened file.
[in] | filename | Name of output file |
[in] | numberofpoints | Number of points in this VTK file |
[in] | numberoflines | Number of lines in this VTK file |
[in] | numberofpolys | Number of polygons in this VTK file |
[out] | un | unit number of opened file |
[out] | errstat | error level/status of OpenFOutFile operation |
[out] | errmsg | message when error occurs |
subroutine nwtc_io::wrvtk_sp_header | ( | character(*), intent(in) | FileName, |
character(*), intent(in) | descr, | ||
integer(intki), intent(out) | Un, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine writes out the heading for an vtk, ascii, structured_points dataset file .
It tries to open a text file for writing and returns the Unit number of the opened file.
[in] | filename | Name of output file |
[in] | descr | Line describing the contents of the file |
[out] | un | unit number of opened file |
[out] | errstat | error level/status of OpenFOutFile operation |
[out] | errmsg | message when error occurs |
subroutine nwtc_io::wrvtk_sp_vectors3d | ( | integer(intki), intent(in) | Un, |
character(*), intent(in) | dataDescr, | ||
integer(intki), dimension(3), intent(in) | dims, | ||
real(reki), dimension(3), intent(in) | origin, | ||
real(reki), dimension(3), intent(in) | gridSpacing, | ||
real(siki), dimension(:,:,:,:), intent(in) | gridVals, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
[in] | un | unit number of previously opened file (via call to WrVTK_SP_header) |
[in] | datadescr | Short label describing the vector data |
[in] | dims | dimension of the 3D grid (nX,nY,nZ) |
[in] | origin | the lower-left corner of the 3D grid (X0,Y0,Z0) |
[in] | gridspacing | spacing between grid points in each of the 3 directions (dX,dY,dZ) |
[in] | gridvals | 3D array of data, size (nX,nY,nZ) |
[out] | errstat | error level/status of OpenFOutFile operation |
[out] | errmsg | message when error occurs |
logical nwtc_io::beep = .TRUE. |
Flag that specifies whether or not to beep for error messages and program terminations.
character(*), parameter nwtc_io::ec_intaryfrmt = "(15X,A,T30,' - ',A,/,100(2X,I11,:))" |
Output format for array of integer parameters.
character(*), parameter nwtc_io::ec_lgaryfrmt = "(15X,A,T30,' - ',A,/,100(2X,L11,:))" |
Output format for array of logical parameters.
character(*), parameter nwtc_io::ec_rearyfrmt = "(15X,A,T30,' - ',A,/,100(2X,ES11.4e2,:))" |
Output format for array of real parameters.
character(*), parameter nwtc_io::ec_straryfrmt = "(15X,A,T30,' - ',A,/,2X,100('""',A,'""',:,1X))" |
Output format for array of string parameters.
integer(intki), parameter nwtc_io::flgtype = 1 |
Switch for telling if a variable is a flag (logical).
integer(intki), parameter nwtc_io::numtype = 2 |
Switch for telling if a variable is a number.
character(20) nwtc_io::progname = ' ' |
The name of the calling program.
DO NOT USE THIS IN NEW PROGRAMS (Modules)
character(99) nwtc_io::progver = ' ' |
The version (including date) of the calling program.
DO NOT USE THIS IN NEW PROGRAMS
integer(intki), parameter nwtc_io::strtype = 3 |
Switch for telling if a variable is a string.
character(1), parameter nwtc_io::tab = CHAR( 9 ) |
The tab character.