Last modified: Fri Sep 3 16:32:04 2004.
NAME:
Create_SRF_netCDF
PURPOSE:
Function to create a netCDF SRF data file for writing.
CATEGORY:
Instrument Information: SRF
LANGUAGE:
Fortran-95
CALLING SEQUENCE:
Error_Status = Create_SRF_netCDF( NC_Filename, & ! Input
Channel_List, & ! Input
NCEP_Sensor_ID = NCEP_Sensor_ID, & ! Optional Input
WMO_Satellite_ID = WMO_Satellite_ID, & ! Optional Input
WMO_Sensor_ID = WMO_Sensor_ID, & ! Optional Input
Title = Title, & ! Optional input
History = History, & ! Optional input
Sensor_Name = Sensor_Name, & ! Optional input
Platform_Name = Platform_Name, & ! Optional input
Comment = Comment, & ! Optional input
RCS_Id = RCS_Id, & ! Revision control
Message_Log = Message_Log ) ! Error messaging
INPUT ARGUMENTS:
NC_Filename: Character string specifying the name of the
netCDF SRF format data file to create.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT( IN )
Channel_List: The list of Channel numbers to be written
to the SRF file. The N_CHANNELS
dimension is derived from this array.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Rank-1, n_Channels
ATTRIBUTES: INTENT( IN )
OPTIONAL INPUT ARGUMENTS:
NCEP_Sensor_ID: An "in-house" value used at NOAA/NCEP/EMC
to identify a satellite/sensor combination.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: INTENT( IN ), OPTIONAL
WMO_Satellite_ID: The WMO code for identifying satellite
platforms. Taken from the WMO common
code tables at:
http://www.wmo.ch/web/ddbs/Code-tables.html
The Satellite ID is from Common Code
table C-5, or code table 0 01 007 in BUFR
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: INTENT( IN ), OPTIONAL
WMO_Sensor_ID: The WMO code for identifying a satelite
sensor. Taken from the WMO common
code tables at:
http://www.wmo.ch/web/ddbs/Code-tables.html
The Sensor ID is from Common Code
table C-8, or code table 0 02 019 in BUFR
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: INTENT( IN ), OPTIONAL
Title: Character string written into the TITLE global
attribute field of the netCDF SRF file.
Should contain a succinct description of what
is in the netCDF datafile.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT( IN ), OPTIONAL
History: Character string written into the HISTORY global
attribute field of the netCDF SRF file.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT( IN ), OPTIONAL
Sensor_Name: Character string written into the SENSOR_NAME
global attribute field of the netCDF SRF
file.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT( IN ), OPTIONAL
Platform_Name: Character string written into the PLATFORM_NAME
global attribute field of the netCDF SRF
file.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT( IN ), OPTIONAL
Comment: Character string written into the COMMENT global
attribute field of the netCDF SRF file.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT( IN ), OPTIONAL
Message_Log: Character string specifying a filename in which
any messages will be logged. If not specified,
or if an error occurs opening the log file, the
default action is to output messages to standard
output.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT( IN ), OPTIONAL
OUTPUT ARGUMENTS:
None.
OPTIONAL OUTPUT ARGUMENTS:
RCS_Id: Character string containing the Revision Control
System Id field for the module.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: OPTIONAL, INTENT( OUT )
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the ERROR_HANDLER module.
If == SUCCESS the SRF netCDF file creation was successful
== FAILURE an unrecoverable error occurred
== WARNING - an error occurred writing any of the
supplied global attributes.
- an error occurred closing the netCDF file.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
CALLS:
NF90_CREATE: Function to create a netCDF data file and
place it in DEFINE mode.
SOURCE: netCDF library
NF90_DEF_DIM: Function to define a dimension in a netCDF
data file.
SOURCE: netCDF library
NF90_PUT_ATT: Function to write attribute data to a netCDF
data file.
SOURCE: netCDF library
NF90_DEF_VAR: Function to define a variable in a netCDF
data file.
SOURCE: netCDF library
NF90_PUT_VAR: Function to write variable data to a netCDF
data file.
SOURCE: netCDF library
NF90_ENDDEF: Function to take a netCDF file out of DEFINE
mode and put it in DATA mode.
SOURCE: netCDF library
NF90_REDEF: Function to put a netCDF file in DEFINE mode.
SOURCE: netCDF library
NF90_CLOSE: Function to close a netCDF file.
SOURCE: netCDF library
Display_Message: Subroutine to output messages
SOURCE: ERROR_HANDLER module
CONTAINS:
None.
EXTERNALS:
None.
COMMON BLOCKS:
None
SIDE EFFECTS:
None.
RESTRICTIONS:
None.
CREATION HISTORY:
Written by: Paul van Delst, CIMSS/SSEC 26-Apr-2002
paul.vandelst@ssec.wisc.edu
(See SRF_netCDF_IO.f90)
NAME:
Inquire_SRF_netCDF
PURPOSE:
Function to inquire a netCDF SRF format file to obtain the number of
channels, channel list, sensor IDs, and global attributes.
CATEGORY:
Instrument Information: SRF
LANGUAGE:
Fortran-95
CALLING SEQUENCE:
Error_Status = Inquire_SRF_netCDF( NC_Filename, & ! Input
n_Channels = n_Channels, & ! Optional output
n_Points = n_Points, & ! Optional output
Channel_List = Channel_List, & ! Optional output
Begin_Frequency = Begin_Frequency, & ! Optional output
End_Frequency = End_Frequency, & ! Optional output
NCEP_Sensor_ID = NCEP_Sensor_ID, & ! Optional output
WMO_Satellite_ID = WMO_Satellite_ID, & ! Optional output
WMO_Sensor_ID = WMO_Sensor_ID, & ! Optional output
Title = Title, & ! Optional output
History = History, & ! Optional output
Sensor_Name = Sensor_Name, & ! Optional output
Platform_Name = Platform_Name, & ! Optional output
Comment = Comment, & ! Optional output
RCS_Id = RCS_Id, & ! Revision control
Message_Log = Message_Log ) ! Error messaging
INPUT ARGUMENTS:
NC_Filename: Character string specifying the name of the
SRF netCDF format data file to inquire.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT( IN )
OPTIONAL INPUT ARGUMENTS:
Message_Log: Character string specifying a filename in which any
messages will be logged. If not specified, or if an
error occurs opening the log file, the default action
is to output messages to standard output.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT( IN ), OPTIONAL
OUTPUT ARGUMENTS:
None.
OPTIONAL OUTPUT ARGUMENTS:
n_Channels: The number of channels dimension of the
SRF data data.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: INTENT( OUT ), OPTIONAL
n_Points: The number of spectral points used to represent the
SRF for each channel.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Rank-1, n_Channels
ATTRIBUTES: INTENT( OUT ), OPTIONAL
Channel_List: The list of channel numbers present in the netCDF
SRF file. The list may not necessarily
start at 1 or contain contiguous values.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Rank-1, n_Channels
ATTRIBUTES: INTENT( OUT ), OPTIONAL
Begin_Frequency: The list of the begin frequency limits for
each channel's SRF.
UNITS: Inverse centimetres (cm^-1)
TYPE: REAL( fp_kind )
DIMENSION: Rank-1, n_Channels
ATTRIBUTES: INTENT( OUT ), OPTIONAL
End_Frequency: The list of the end frequency limits for
each channel's SRF.
UNITS: Inverse centimetres (cm^-1)
TYPE: REAL( fp_kind )
DIMENSION: Rank-1, n_Channels
ATTRIBUTES: INTENT( OUT ), OPTIONAL
NCEP_Sensor_ID: An "in-house" value used at NOAA/NCEP/EMC
to identify a satellite/sensor combination.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: INTENT( OUT ), OPTIONAL
WMO_Satellite_ID: The WMO code for identifying satellite
platforms. Taken from the WMO common
code tables at:
http://www.wmo.ch/web/ddbs/Code-tables.html
The Satellite ID is from Common Code
table C-5, or code table 0 01 007 in BUFR
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: INTENT( OUT ), OPTIONAL
WMO_Sensor_ID: The WMO code for identifying a satelite
sensor. Taken from the WMO common
code tables at:
http://www.wmo.ch/web/ddbs/Code-tables.html
The Sensor ID is from Common Code
table C-8, or code table 0 02 019 in BUFR
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: INTENT( OUT ), OPTIONAL
Title: Character string written into the TITLE global
attribute field of the netCDF SRF file.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT( OUT ), OPTIONAL
History: Character string written into the HISTORY global
attribute field of the netCDF SRF file.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT( OUT ), OPTIONAL
Sensor_Name: Character string written into the SENSOR_NAME global
attribute field of the netCDF SRF file.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT( OUT ), OPTIONAL
Platform_Name: Character string written into the PLATFORM_NAME global
attribute field of the netCDF SRF file.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT( OUT ), OPTIONAL
Comment: Character string written into the COMMENT global
attribute field of the netCDF SRF file.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT( OUT ), OPTIONAL
RCS_Id: Character string containing the Revision Control
System Id field for the module.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT( OUT ), OPTIONAL
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error
status. The error codes are defined in the
ERROR_HANDLER module.
If == SUCCESS the netCDF file inquiry was successful
== FAILURE - an error occurred opening the netCDF file, or
- an error occurred reading any of the
requested dimension or variable data.
== WARNING - an error occurred reading any of the
requested global attributes, or
- an error occurred closing the netCDF file.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
CALLS:
Open_SRF_netCDF: Function to open an SRF netCDF
format data file.
SOURCE: NETCDF_UTILITY module
Get_netCDF_Dimension: Function to return a dimension value from
a netCDF file given the dimension name.
SOURCE: NETCDF_UTILITY module
Get_netCDF_Variable: Function to return a variable from a
netCDF file given the variable name.
SOURCE: NETCDF_UTILITY module
Close_SRF_netCDF: Function to close a SRF netCDF
format data file.
SOURCE: NETCDF_UTILITY module
Display_Message: Subroutine to output messages
SOURCE: ERROR_HANDLER module
NF90_CLOSE: Function to close a netCDF file.
SOURCE: netCDF library
SIDE EFFECTS:
None.
RESTRICTIONS:
To successfully return any of the channel dimensioned arrays, the
dummy arguments must have the same size as the dataset in the netCDF
file. Thus, two calls to this routine are required. First, the
n_Channels dimension should be read and used either to allocate the
required data array of the correct size, or to subset an existing
array in the call.
CREATION HISTORY:
Written by: Paul van Delst, CIMSS/SSEC 26-Apr-2002
paul.vandelst@ssec.wisc.edu
(See SRF_netCDF_IO.f90)
NAME:
Write_SRF_netCDF
PURPOSE:
Function to write data in an SRF structure to a netCDF format SRF file.
CATEGORY:
Instrument Information: SRF
LANGUAGE:
Fortran-95
CALLING SEQUENCE:
Error_Status = Write_SRF_netCDF( NC_Filename, & ! Input
SRF, & ! Input
RCS_Id = RCS_Id, & ! Revision control
Message_Log = Message_Log ) ! Error messaging
INPUT ARGUMENTS:
NC_Filename: Character string specifying the name of the netCDF
format SRF data file to write to.
UNITS: N/A
TYPE: CHARACTER( * )
DIMENSION: Scalar
ATTRIBUTES: INTENT( IN )
SRF: Structure containing the SRF data to write to file.
UNITS: N/A
TYPE: SRF_type
DIMENSION: Scalar
ATTRIBUTES: INTENT( IN )
OPTIONAL INPUT ARGUMENTS:
Message_Log: Character string specifying a filename in which any
messages will be logged. If not specified, or if an
error occurs opening the log file, the default action
is to output messages to standard output.
UNITS: N/A
TYPE: CHARACTER( * )
DIMENSION: Scalar
ATTRIBUTES: INTENT( IN ), OPTIONAL
OUTPUT ARGUMENTS:
None.
OPTIONAL OUTPUT ARGUMENTS:
RCS_Id: Character string containing the Revision Control
System Id field for the module.
UNITS: N/A
TYPE: CHARACTER( * )
DIMENSION: Scalar
ATTRIBUTES: OPTIONAL, INTENT( OUT )
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error
status. The error codes are defined in the
ERROR_HANDLER module.
If == SUCCESS the netCDF data write was successful
== FAILURE an unrecoverable error occurred
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
CALLS:
Inquire_SRF_netCDF: Function to inquire a netCDF format
SRF file to obtain information
about the data dimensions and attributes.
Open_SRF_netCDF: Function to open a SRF netCDF
format file.
Close_SRF_netCDF: Function to close a SRF netCDF
format file.
Put_netCDF_Variable: Function to write a netCDF file
variable by name.
SOURCE: NETCDF_VARIABLE_UTILITY module
Put_netCDF_Attribute: Function to write a netCDF file variable
attribute by name.
SOURCE: NETCDF_VARIABLE_UTILITY module
NF90_DEF_DIM: Function to define a dimension in a netCDF
data file.
SOURCE: netCDF library
NF90_DEF_VAR: Function to define a variable in a netCDF
data file.
SOURCE: netCDF library
NF90_ENDDEF: Function to take a netCDF file out of DEFINE
mode and put it in DATA mode.
SOURCE: netCDF library
NF90_REDEF: Function to put a netCDF file in DEFINE mode.
SOURCE: netCDF library
NF90_CLOSE: Function to close a netCDF file.
SOURCE: netCDF library
Display_Message: Subroutine to output messages
SOURCE: ERROR_HANDLER module
CONTAINS:
None.
SIDE EFFECTS:
None.
RESTRICTIONS:
None.
CREATION HISTORY:
Written by: Paul van Delst, CIMSS/SSEC 26-Apr-2002
paul.vandelst@ssec.wisc.edu
(See SRF_netCDF_IO.f90)
NAME:
Read_SRF_netCDF
PURPOSE:
Function to read a selected channel's SRF data from a netCDF SRF
format file.
CATEGORY:
Instrument Information: SRF
LANGUAGE:
Fortran-95
CALLING SEQUENCE:
Error_Status = Read_SRF_netCDF( NC_Filename, & ! Input
Channel, & ! Input
SRF, & ! Output
RCS_Id = RCS_Id, & ! Revision control
Message_Log = Message_Log ) ! Error messaging
INPUT ARGUMENTS:
NC_Filename: Character string specifying the name of the netCDF SRF
format data file to read.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT( IN )
Channel: Channel number for which the SRF data is required.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: INTENT( IN )
OPTIONAL INPUT ARGUMENTS:
Message_Log: Character string specifying a filename in which any
messages will be logged. If not specified, or if an
error occurs opening the log file, the default action
is to output messages to standard output.
UNITS: N/A
TYPE: CHARACTER( * )
DIMENSION: Scalar
ATTRIBUTES: INTENT( IN ), OPTIONAL
OUTPUT ARGUMENTS:
SRF: Structure containing the requested SRF data.
UNITS: N/A
TYPE: SRF_type
DIMENSION: Scalar
ATTRIBUTES: INTENT( OUT )
OPTIONAL OUTPUT ARGUMENTS:
RCS_Id: Character string containing the Revision Control
System Id field for the module.
UNITS: N/A
TYPE: CHARACTER( * )
DIMENSION: Scalar
ATTRIBUTES: OPTIONAL, INTENT( OUT )
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error
status. The error codes are defined in the
ERROR_HANDLER module.
If == SUCCESS the netCDF data read was successful
== FAILURE an unrecoverable error occurred
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
CALLS:
Inquire_SRF_netCDF: Function to inquire a netCDF SRF format
file to obtain the number of channels
and the channel list.
Allocate_SRF: Function to allocate the pointer members
of the SRF structure.
SOURCE: SRF_DEFINE module
NF90_CLOSE: Function to close a netCDF file.
SOURCE: netCDF library
Get_netCDF_Dimension: Function to return a dimension value from
a netCDF file given the dimension name.
SOURCE: NETCDF_UTILITY module
Get_netCDF_Variable: Function to return a variable from a
netCDF file given the variable name.
SOURCE: NETCDF_UTILITY module
Display_Message: Subroutine to output messages
SOURCE: ERROR_HANDLER module
SIDE EFFECTS:
None.
RESTRICTIONS:
None.
COMMENTS:
Note the INTENT on the output SRF argument is IN OUT rather
than just OUT. This is necessary because the argument may be defined on
input. To prevent memory leaks, the IN OUT INTENT is a must.
CREATION HISTORY:
Written by: Paul van Delst, CIMSS/SSEC 03-Oct-2001
paul.vandelst@ssec.wisc.edu
(See SRF_netCDF_IO.f90)