diff --git a/src/Coefficients/SpcCoeff/SpcCoeff_BIN2NC/SpcCoeff_BIN2NC.f90 b/src/Coefficients/SpcCoeff/SpcCoeff_BIN2NC/SpcCoeff_BIN2NC.f90 index 6599137..9070d33 100644 --- a/src/Coefficients/SpcCoeff/SpcCoeff_BIN2NC/SpcCoeff_BIN2NC.f90 +++ b/src/Coefficients/SpcCoeff/SpcCoeff_BIN2NC/SpcCoeff_BIN2NC.f90 @@ -35,9 +35,9 @@ PROGRAM SpcCoeff_BIN2NC INTEGER :: err_stat CHARACTER(256) :: msg CHARACTER(256) :: BIN_filename - CHARACTER(256) :: NC_filename - CHARACTER(256) :: answer + CHARACTER(256) :: NC_filename, tmp_filename CHARACTER(256) :: version_str + INTEGER :: n_args ! Program header CALL CRTM_Version(version_str) @@ -45,17 +45,27 @@ PROGRAM SpcCoeff_BIN2NC 'Program to convert a CRTM SpcCoeff data file from Binary to netCDF format.', & 'CRTM Version: '//TRIM(version_str) ) - ! Get the filenames - IF ( Big_Endian() ) THEN - WRITE(*,FMT='(/5x,"Enter the INPUT Binary [Big Endian] SpcCoeff filename : ")', ADVANCE='NO') - ELSE - WRITE(*,FMT='(/5x,"Enter the INPUT Binary [Little Endian] SpcCoeff filename : ")', ADVANCE='NO') + ! Get the filename ! Check for command line argument + n_args = COMMAND_ARGUMENT_COUNT() + IF ( n_args > 0 ) THEN + CALL GET_COMMAND_ARGUMENT(1, BIN_filename) + tmp_filename = BIN_filename(1:LEN_TRIM(BIN_filename) - 4)//".nc" + NC_filename = TRIM(ADJUSTL(tmp_filename)) + PRINT *, "NC_filename:", NC_filename + ELSE + ! Get the filenames + IF ( Big_Endian() ) THEN + WRITE(*,FMT='(/5x,"Enter the INPUT Binary [Big Endian] SpcCoeff filename : ")', ADVANCE='NO') + ELSE + WRITE(*,FMT='(/5x,"Enter the INPUT Binary [Little Endian] SpcCoeff filename : ")', ADVANCE='NO') + END IF + READ(*,'(a)') BIN_filename + BIN_filename = ADJUSTL(BIN_filename) + WRITE(*,FMT='(/5x,"Enter the OUTPUT netCDF SpcCoeff filename: ")', ADVANCE='NO') + READ(*,'(a)') NC_filename + NC_filename = ADJUSTL(NC_filename) END IF - READ(*,'(a)') BIN_filename - BIN_filename = ADJUSTL(BIN_filename) - WRITE(*,FMT='(/5x,"Enter the OUTPUT netCDF SpcCoeff filename: ")', ADVANCE='NO') - READ(*,'(a)') NC_filename - NC_filename = ADJUSTL(NC_filename) + ! ...Sanity check that they're not the same IF ( bin_filename == nc_filename ) THEN diff --git a/src/Coefficients/SpcCoeff/SpcCoeff_Binary_IO.f90 b/src/Coefficients/SpcCoeff/SpcCoeff_Binary_IO.f90 index e20ed5f..1c4b4e8 100644 --- a/src/Coefficients/SpcCoeff/SpcCoeff_Binary_IO.f90 +++ b/src/Coefficients/SpcCoeff/SpcCoeff_Binary_IO.f90 @@ -693,7 +693,7 @@ FUNCTION SpcCoeff_Binary_WriteFile( & CALL Write_Cleanup(); RETURN END IF ! ...Write the channel data - IF(SpcCoeff%Version > 2) THEN + IF(SpcCoeff%Version > 3) THEN WRITE( fid, IOSTAT=io_stat ) & SpcCoeff%Sensor_Channel , & SpcCoeff%Polarization , & @@ -707,7 +707,7 @@ FUNCTION SpcCoeff_Binary_WriteFile( & SpcCoeff%Band_C2 , & SpcCoeff%Cosmic_Background_Radiance, & SpcCoeff%Solar_Irradiance - ELSE IF(SpcCoeff%Version < 3) THEN + ELSE IF(SpcCoeff%Version < 4) THEN WRITE( fid, IOSTAT=io_stat ) & SpcCoeff%Sensor_Channel , & SpcCoeff%Polarization , & diff --git a/src/Coefficients/SpcCoeff/SpcCoeff_IO.f90 b/src/Coefficients/SpcCoeff/SpcCoeff_IO.f90 index c691731..ead7e49 100644 --- a/src/Coefficients/SpcCoeff/SpcCoeff_IO.f90 +++ b/src/Coefficients/SpcCoeff/SpcCoeff_IO.f90 @@ -26,8 +26,11 @@ MODULE SpcCoeff_IO USE SpcCoeff_netCDF_IO , ONLY: SpcCoeff_netCDF_InquireFile, & SpcCoeff_netCDF_ReadFile , & SpcCoeff_netCDF_WriteFile - USE ACCoeff_netCDF_IO , ONLY: ACCoeff_netCDF_ReadFile - USE NLTECoeff_netCDF_IO, ONLY: NLTECoeff_netCDF_ReadFile + USE ACCoeff_Define , ONLY: ACCoeff_Associated + USE NLTECoeff_Define , ONLY: NLTECoeff_Associated + USE ACCoeff_netCDF_IO , ONLY: ACCoeff_netCDF_ReadFile, ACCoeff_netCDF_WriteFile + USE NLTECoeff_netCDF_IO, ONLY: NLTECoeff_netCDF_ReadFile, NLTECoeff_netCDF_WriteFile + ! Disable implicit typing IMPLICIT NONE @@ -820,26 +823,62 @@ FUNCTION SpcCoeff_Binary_to_netCDF( & END IF END IF - ! Read the substructure netCDF filenames + + ! Read the substructure netCDF filenames ! ...ACCoeff sub_filename = TRIM(spccoeff%Sensor_Id)//'.ACCoeff.nc' IF ( File_Exists(sub_filename) ) THEN err_stat = ACCoeff_netCDF_ReadFile( sub_filename, spccoeff%AC, Quiet = Quiet ) IF ( err_stat /= SUCCESS ) THEN - msg = 'Error reading netCDF file '//TRIM(sub_filename) + msg = 'Error reading existing ACCoeff netCDF file '//TRIM(sub_filename) CALL Display_Message( ROUTINE_NAME, msg, err_stat ) RETURN END IF + ELSE + IF ( ACCoeff_Associated(spccoeff%AC) ) THEN + !** there's no external file, but there's an ACCoeff structure + !** yoink the spccoeff%AC into sub_filename + err_stat = ACCoeff_netCDF_WriteFile( & + sub_filename , & + spccoeff%AC , & + Quiet = Quiet , & + Title = "Earth, Platform, Space antenna efficiencies for "//trim(adjustl(spccoeff%sensor_id))//" for each fov, channel.", & + History = "Extracted from "//trim(adjustl(BIN_Filename))//" using "//trim(adjustl(ROUTINE_NAME))//" Benjamin.T.Johnson@noaa.gov" , & + Comment = "" ) + IF ( err_stat /= SUCCESS ) THEN + msg = 'Error creating ACCoeff netCDF file '//TRIM(sub_filename) + CALL Display_Message( ROUTINE_NAME, msg, err_stat ) + RETURN + END IF + END IF END IF + ! ...NLTECoeff sub_filename = TRIM(spccoeff%Sensor_Id)//'.NLTECoeff.nc' IF ( File_Exists(sub_filename) ) THEN - err_stat = NLTECoeff_netCDF_ReadFile( sub_filename, spccoeff%NC, Quiet = Quiet ) - IF ( err_stat /= SUCCESS ) THEN - msg = 'Error reading netCDF file '//TRIM(sub_filename) - CALL Display_Message( ROUTINE_NAME, msg, err_stat ) - RETURN - END IF + err_stat = NLTECoeff_netCDF_ReadFile( sub_filename, spccoeff%NC, Quiet = Quiet ) + IF ( err_stat /= SUCCESS ) THEN + msg = 'Error reading netCDF file '//TRIM(sub_filename) + CALL Display_Message( ROUTINE_NAME, msg, err_stat ) + RETURN + END IF + ELSE + IF ( NLTECoeff_Associated(spccoeff%NC) ) THEN + !** there's no external file, but there's an NLTECoeff structure + !** yoink the spccoeff%NC into sub_filename + err_stat = NLTECoeff_netCDF_WriteFile( & + sub_filename , & + spccoeff%NC , & + Quiet = Quiet , & + Title = "NLTE Coefficients for "//TRIM(ADJUSTL(spccoeff%sensor_id))//"." , & + History = "Extracted from "//TRIM(ADJUSTL(BIN_Filename))//" using "//TRIM(ADJUSTL(ROUTINE_NAME))//" Benjamin.T.Johnson@noaa.gov" , & + Comment = "" ) + IF ( err_stat /= SUCCESS ) THEN + msg = 'Error creating NLTECoeff netCDF file '//TRIM(sub_filename) + CALL Display_Message( ROUTINE_NAME, msg, err_stat ) + RETURN + END IF + END IF END IF diff --git a/src/Coefficients/SpcCoeff/SpcCoeff_Inspect/SpcCoeff_Inspect.f90 b/src/Coefficients/SpcCoeff/SpcCoeff_Inspect/SpcCoeff_Inspect.f90 index eaf1081..d283509 100644 --- a/src/Coefficients/SpcCoeff/SpcCoeff_Inspect/SpcCoeff_Inspect.f90 +++ b/src/Coefficients/SpcCoeff/SpcCoeff_Inspect/SpcCoeff_Inspect.f90 @@ -1,7 +1,7 @@ ! ! SpcCoeff_Inspect ! -! Program to inspect the contents of a CRTM Binary format SpcCoeff file. +! Program to inspect the contents of a CRTM SpcCoeff file (binary or netCDF) ! ! ! CREATION HISTORY: @@ -19,7 +19,7 @@ PROGRAM SpcCoeff_Inspect USE Message_Handler , ONLY: SUCCESS, FAILURE, Program_Message, Display_Message USE SpcCoeff_Define , ONLY: SpcCoeff_type, SpcCoeff_Destroy, & Inspect => SpcCoeff_Inspect - USE SpcCoeff_Binary_IO, ONLY: SpcCoeff_Binary_ReadFile + USE SpcCoeff_IO, ONLY: SpcCoeff_ReadFile ! Disable implicit typing IMPLICIT NONE @@ -36,6 +36,7 @@ PROGRAM SpcCoeff_Inspect CHARACTER(256) :: filename, msg INTEGER :: n_args TYPE(SpcCoeff_type) :: sc + LOGICAL :: is_nc, is_bin ! Generate a string containing the SpcCoeff release for info WRITE(msg,'(i10)') sc%Release @@ -44,7 +45,7 @@ PROGRAM SpcCoeff_Inspect ! Output program header CALL Program_Message( PROGRAM_NAME, & 'Program to display the contents of a CRTM '//& - 'Binary format R'//TRIM(ADJUSTL(msg))//' SpcCoeff '//& + 'Binary/netCDF format R'//TRIM(ADJUSTL(msg))//' SpcCoeff '//& 'file to stdout.', & '$Revision$' ) @@ -53,7 +54,7 @@ PROGRAM SpcCoeff_Inspect IF ( n_args > 0 ) THEN CALL GET_COMMAND_ARGUMENT(1, filename) ELSE - WRITE( *,FMT='(/5x,"Enter the Binary SpcCoeff filename: ")',ADVANCE='NO' ) + WRITE( *,FMT='(/5x,"Enter the SpcCoeff filename: ")',ADVANCE='NO' ) READ( *,'(a)' ) filename END IF filename = ADJUSTL(filename) @@ -62,10 +63,19 @@ PROGRAM SpcCoeff_Inspect CALL Display_Message( PROGRAM_NAME, msg, FAILURE ); STOP END IF - ! Read the binary data file - err_stat = SpcCoeff_Binary_ReadFile( filename, sc ) + ! Check if filename ends in ".nc" + is_nc = (INDEX(TRIM(filename), '.nc') == LEN_TRIM(filename) - 2) + + ! Check if filename ends in ".bin" + is_bin = (INDEX(TRIM(filename), '.bin') == LEN_TRIM(filename) - 3) + + err_stat = FAILURE + ! Read the data file + If (is_bin) err_stat = SpcCoeff_ReadFile( filename, sc ) + IF (is_nc) err_stat = SpcCoeff_ReadFile( filename, sc, netCDF=.TRUE. ) + IF ( err_stat /= SUCCESS ) THEN - msg = 'Error reading Binary SpcCoeff file '//TRIM(filename) + msg = 'Error reading SpcCoeff file '//TRIM(filename) CALL Display_Message( PROGRAM_NAME, msg, FAILURE ); STOP END IF diff --git a/src/Coefficients/SpcCoeff/SpcCoeff_NC2BIN/SpcCoeff_NC2BIN.f90 b/src/Coefficients/SpcCoeff/SpcCoeff_NC2BIN/SpcCoeff_NC2BIN.f90 index 64c3dbe..e4e710e 100644 --- a/src/Coefficients/SpcCoeff/SpcCoeff_NC2BIN/SpcCoeff_NC2BIN.f90 +++ b/src/Coefficients/SpcCoeff/SpcCoeff_NC2BIN/SpcCoeff_NC2BIN.f90 @@ -36,9 +36,8 @@ PROGRAM SpcCoeff_NC2BIN INTEGER :: err_stat CHARACTER(256) :: msg, version_str CHARACTER(256) :: nc_filename - CHARACTER(256) :: bin_filename - CHARACTER(256) :: answer - INTEGER :: version + CHARACTER(256) :: bin_filename, tmp_filename + INTEGER :: n_args ! Program header CALL CRTM_Version (version_str) @@ -46,18 +45,28 @@ PROGRAM SpcCoeff_NC2BIN 'Program to convert a CRTM SpcCoeff data file '//& 'from netCDF to Binary format.', & 'CRTM Version:'//trim(version_str) ) - - ! Get the filenames - WRITE(*,FMT='(/5x,"Enter the INPUT netCDF SpcCoeff filename : ")', ADVANCE='NO') - READ(*,'(a)') nc_filename - nc_filename = ADJUSTL(nc_filename) - WRITE(*,FMT='(/5x,"Enter the OUTPUT Binary SpcCoeff filename: ")', ADVANCE='NO') - READ(*,'(a)') bin_filename - bin_filename = ADJUSTL(bin_filename) - ! ...Sanity check that they're not the same - IF ( bin_filename == nc_filename ) THEN - msg = 'SpcCoeff netCDF and Binary filenames are the same!' - CALL Display_Message( PROGRAM_NAME, msg, FAILURE ); STOP + + ! Get the filename + n_args = COMMAND_ARGUMENT_COUNT() + IF ( n_args > 0 ) THEN + CALL GET_COMMAND_ARGUMENT(1, nc_filename) + !** automatically generate the binary filename based on the command line netcdf filename + tmp_filename = nc_filename(1:LEN_TRIM(nc_filename) - 3)//".bin" + bin_filename = TRIM(ADJUSTL(tmp_filename)) + PRINT *, "Output filename:", bin_filename + ELSE + ! Get the filenames + WRITE(*,FMT='(/5x,"Enter the INPUT netCDF SpcCoeff filename : ")', ADVANCE='NO') + READ(*,'(a)') nc_filename + nc_filename = ADJUSTL(nc_filename) + WRITE(*,FMT='(/5x,"Enter the OUTPUT Binary SpcCoeff filename: ")', ADVANCE='NO') + READ(*,'(a)') bin_filename + bin_filename = ADJUSTL(bin_filename) + ! ...Sanity check that they're not the same + IF ( bin_filename == nc_filename ) THEN + msg = 'SpcCoeff netCDF and Binary filenames are the same!' + CALL Display_Message( PROGRAM_NAME, msg, FAILURE ); STOP + END IF END IF ! Perform the conversion (no change to version) diff --git a/src/Coefficients/SpcCoeff/SpcCoeff_netCDF_IO.f90 b/src/Coefficients/SpcCoeff/SpcCoeff_netCDF_IO.f90 index 6730b1e..265fc6e 100644 --- a/src/Coefficients/SpcCoeff/SpcCoeff_netCDF_IO.f90 +++ b/src/Coefficients/SpcCoeff/SpcCoeff_netCDF_IO.f90 @@ -598,7 +598,7 @@ FUNCTION SpcCoeff_netCDF_WriteFile( & CALL Write_Cleanup(); RETURN END IF ! ...Polarization angle variable - IF( SpcCoeff%Version > 2 ) THEN + IF( SpcCoeff%Version > 3 ) THEN NF90_Status = NF90_INQ_VARID( FileId,POLANGLE_VARNAME,VarId ) IF ( NF90_Status /= NF90_NOERR ) THEN msg = 'Error inquiring '//TRIM(Filename)//' for '//POLANGLE_VARNAME//& @@ -983,7 +983,7 @@ FUNCTION SpcCoeff_netCDF_ReadFile( & CALL Read_Cleanup(); RETURN END IF ! ...Polarization angle variable - IF ( SpcCoeff%Version > 2 ) THEN + IF ( SpcCoeff%Version > 3 ) THEN nf90_status = NF90_INQ_VARID( fileid,POLANGLE_VARNAME,varid ) IF ( nf90_status /= NF90_NOERR ) THEN msg = 'Error inquiring '//TRIM(Filename)//' for '//POLANGLE_VARNAME//& @@ -1591,24 +1591,29 @@ FUNCTION CreateFile( & msg = 'Error writing '//POLARIZATION_VARNAME//' variable attributes to '//TRIM(Filename) CALL Create_Cleanup(); RETURN END IF - ! ...Polarization angle variable - nf90_status = NF90_DEF_VAR( FileID, & - POLANGLE_VARNAME, & - POLANGLE_TYPE, & - dimIDs=(/n_channels_dimid/), & - varID=variD ) - IF ( nf90_status /= NF90_NOERR ) THEN - msg = 'Error defining '//POLANGLE_VARNAME//' variable in '//& - TRIM(Filename)//' - '//TRIM(NF90_STRERROR( nf90_status )) - CALL Create_Cleanup(); RETURN - END IF - put_status(1) = NF90_PUT_ATT( FileID,varid,LONGNAME_ATTNAME ,POLANGLE_LONGNAME ) - put_status(2) = NF90_PUT_ATT( FileID,varid,DESCRIPTION_ATTNAME,POLANGLE_DESCRIPTION ) - put_status(3) = NF90_PUT_ATT( FileID,varid,UNITS_ATTNAME ,POLANGLE_UNITS ) - put_status(4) = NF90_PUT_ATT( FileID,varid,FILLVALUE_ATTNAME ,POLANGLE_FILLVALUE ) - IF ( ANY(put_status /= NF90_NOERR) ) THEN - msg = 'Error writing '//POLANGLE_VARNAME//' variable attributes to '//TRIM(Filename) - CALL Create_Cleanup(); RETURN + + IF ( PRESENT(VERSION) ) THEN + IF (VERSION > 3) THEN + ! ...Polarization angle variable + nf90_status = NF90_DEF_VAR( FileID, & + POLANGLE_VARNAME, & + POLANGLE_TYPE, & + dimIDs=(/n_channels_dimid/), & + varID=variD ) + IF ( nf90_status /= NF90_NOERR ) THEN + msg = 'Error defining '//POLANGLE_VARNAME//' variable in '//& + TRIM(Filename)//' - '//TRIM(NF90_STRERROR( nf90_status )) + CALL Create_Cleanup(); RETURN + END IF + put_status(1) = NF90_PUT_ATT( FileID,varid,LONGNAME_ATTNAME ,POLANGLE_LONGNAME ) + put_status(2) = NF90_PUT_ATT( FileID,varid,DESCRIPTION_ATTNAME,POLANGLE_DESCRIPTION ) + put_status(3) = NF90_PUT_ATT( FileID,varid,UNITS_ATTNAME ,POLANGLE_UNITS ) + put_status(4) = NF90_PUT_ATT( FileID,varid,FILLVALUE_ATTNAME ,POLANGLE_FILLVALUE ) + IF ( ANY(put_status /= NF90_NOERR) ) THEN + msg = 'Error writing '//POLANGLE_VARNAME//' variable attributes to '//TRIM(Filename) + CALL Create_Cleanup(); RETURN + END IF + END IF END IF ! ...Channel_Flag variable nf90_status = NF90_DEF_VAR( FileID, & diff --git a/src/Coefficients/TauCoeff/ODAS/ODAS_BIN2NC/ODAS_BIN2NC.f90 b/src/Coefficients/TauCoeff/ODAS/ODAS_BIN2NC/ODAS_BIN2NC.f90 index 9ff2a6e..6eb31a8 100644 --- a/src/Coefficients/TauCoeff/ODAS/ODAS_BIN2NC/ODAS_BIN2NC.f90 +++ b/src/Coefficients/TauCoeff/ODAS/ODAS_BIN2NC/ODAS_BIN2NC.f90 @@ -34,36 +34,47 @@ PROGRAM ODAS_BIN2NC ! --------- ! Variables ! --------- - INTEGER :: Error_Status - CHARACTER(256) :: NC_Filename + INTEGER :: Error_Status, n_args + CHARACTER(256) :: NC_Filename, tmp_filename CHARACTER(256) :: BIN_Filename TYPE(ODAS_type) :: ODAS TYPE(ODAS_type) :: ODAS_Test - ! Output prgram header - CALL Program_Message( PROGRAM_NAME, & - 'Program to convert netCDF format ODAS files to '//& - 'their CRTM Binary format.', & - '$Revision$' ) - ! Get the input and output filenames - WRITE( *, FMT = '( /5x, "Enter the INPUT Binary ODAS file: " )', & - ADVANCE = 'NO' ) - READ( *, '( a )' ) BIN_Filename - BIN_Filename = ADJUSTL( BIN_FileNAME ) - IF ( .NOT. File_Exists( TRIM( BIN_Filename ) ) ) THEN - CALL Display_Message( PROGRAM_NAME, & - 'File '//TRIM( BIN_Filename )//' not found.', & - FAILURE ) - STOP + ! Get the filename + n_args = COMMAND_ARGUMENT_COUNT() + IF ( n_args > 0 ) THEN + CALL GET_COMMAND_ARGUMENT(1, BIN_filename) + !** automatically generate the binary filename based on the command line netcdf filename + tmp_filename = BIN_filename(1:LEN_TRIM(BIN_filename) - 4)//".nc" + NC_filename = TRIM(ADJUSTL(tmp_filename)) + PRINT *, "Output filename:", NC_filename + ELSE + ! Output prgram header + CALL Program_Message( PROGRAM_NAME, & + 'Program to convert netCDF format ODAS files to '//& + 'their CRTM Binary format.', & + '$Revision$' ) + + ! Get the input and output filenames + WRITE( *, FMT = '( /5x, "Enter the INPUT Binary ODAS file: " )', & + ADVANCE = 'NO' ) + READ( *, '( a )' ) BIN_Filename + BIN_Filename = ADJUSTL( BIN_FileNAME ) + IF ( .NOT. File_Exists( TRIM( BIN_Filename ) ) ) THEN + CALL Display_Message( PROGRAM_NAME, & + 'File '//TRIM( BIN_Filename )//' not found.', & + FAILURE ) + STOP + END IF + + WRITE( *, FMT = '( /5x, "Enter the OUTPUT netCDF ODAS file: " )', & + ADVANCE = 'NO' ) + READ( *, '( a )' ) NC_Filename + NC_Filename = ADJUSTL( NC_Filename ) END IF - WRITE( *, FMT = '( /5x, "Enter the OUTPUT netCDF ODAS file: " )', & - ADVANCE = 'NO' ) - READ( *, '( a )' ) NC_Filename - NC_Filename = ADJUSTL( NC_Filename ) - ! Check that the BIN file isn't accidentally overwritten IF ( TRIM( BIN_Filename ) == TRIM( NC_Filename ) ) THEN CALL Display_Message( PROGRAM_NAME, & diff --git a/src/Coefficients/TauCoeff/ODAS/ODAS_NC2BIN/ODAS_NC2BIN.f90 b/src/Coefficients/TauCoeff/ODAS/ODAS_NC2BIN/ODAS_NC2BIN.f90 index b531640..5775270 100644 --- a/src/Coefficients/TauCoeff/ODAS/ODAS_NC2BIN/ODAS_NC2BIN.f90 +++ b/src/Coefficients/TauCoeff/ODAS/ODAS_NC2BIN/ODAS_NC2BIN.f90 @@ -34,36 +34,46 @@ PROGRAM ODAS_NC2BIN ! --------- ! Variables ! --------- - INTEGER :: Error_Status - CHARACTER(256) :: NC_Filename + INTEGER :: Error_Status, n_args + CHARACTER(256) :: NC_Filename, tmp_filename CHARACTER(256) :: BIN_Filename TYPE(ODAS_type) :: ODAS TYPE(ODAS_type) :: ODAS_Test - - ! Output prgram header - CALL Program_Message( PROGRAM_NAME, & - 'Program to convert netCDF format ODAS files to '//& - 'their CRTM Binary format.', & - '$Revision$' ) - - ! Get the input and output filenames - WRITE( *, FMT = '( /5x, "Enter the INPUT netCDF ODAS file: " )', & - ADVANCE = 'NO' ) - READ( *, '( a )' ) NC_Filename - NC_Filename = ADJUSTL( NC_Filename ) - IF ( .NOT. File_Exists( TRIM( NC_Filename ) ) ) THEN - CALL Display_Message( PROGRAM_NAME, & - 'File '//TRIM( NC_Filename )//' not found.', & - FAILURE ) - STOP + ! Get the filename + n_args = COMMAND_ARGUMENT_COUNT() + IF ( n_args > 0 ) THEN + CALL GET_COMMAND_ARGUMENT(1, NC_Filename) + !** automatically generate the binary Filename based on the command line netcdf Filename + tmp_filename = NC_Filename(1:LEN_TRIM(NC_Filename) - 3)//".bin" + BIN_Filename = TRIM(ADJUSTL(tmp_filename)) + PRINT *, "Output filename:", BIN_Filename + + ELSE + ! Output prgram header + CALL Program_Message( PROGRAM_NAME, & + 'Program to convert netCDF format ODAS files to '//& + 'their CRTM Binary format.', & + '$Revision$' ) + + ! Get the input and output filenames + WRITE( *, FMT = '( /5x, "Enter the INPUT netCDF ODAS file: " )', & + ADVANCE = 'NO' ) + READ( *, '( a )' ) NC_Filename + NC_Filename = ADJUSTL( NC_Filename ) + IF ( .NOT. File_Exists( TRIM( NC_Filename ) ) ) THEN + CALL Display_Message( PROGRAM_NAME, & + 'File '//TRIM( NC_Filename )//' not found.', & + FAILURE ) + STOP + END IF + + WRITE( *, FMT = '( /5x, "Enter the OUTPUT Binary ODAS file: " )', & + ADVANCE = 'NO' ) + READ( *, '( a )' ) BIN_Filename + BIN_Filename = ADJUSTL( BIN_Filename ) END IF - WRITE( *, FMT = '( /5x, "Enter the OUTPUT Binary ODAS file: " )', & - ADVANCE = 'NO' ) - READ( *, '( a )' ) BIN_Filename - BIN_Filename = ADJUSTL( BIN_FileNAME ) - ! Check that the netCDF file isn't accidentally overwritten IF ( TRIM( NC_Filename ) == TRIM( BIN_Filename ) ) THEN CALL Display_Message( PROGRAM_NAME, & diff --git a/src/Coefficients/TauCoeff/ODPS/ODPS_BIN2NC/Makefile b/src/Coefficients/TauCoeff/ODPS/ODPS_BIN2NC/Makefile deleted file mode 100644 index 011f1ea..0000000 --- a/src/Coefficients/TauCoeff/ODPS/ODPS_BIN2NC/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -#============================================================================== -# -# Makefile for ODPS_BIN2NC program -# -#============================================================================== - -# Define macros -include $(CRTM_SOURCE_ROOT)/make.macros - -# This makefile -MAKE_FILE = Makefile - -# Executable files -EXE_FILE = ODPS_BIN2NC - -# Source files to link -SRC_FILES = Type_Kinds.f90 \ - File_Utility.f90 \ - Message_Handler.f90 \ - Compare_Float_Numbers.f90 \ - Binary_File_Utility.f90 \ - Endian_Utility.f90 \ - Sort_Utility.f90 \ - netCDF_Utility.f90 \ - netCDF_Dimension_Utility.f90 \ - netCDF_Variable_Utility.f90 \ - netCDF_Attribute_Utility.f90 \ - ODPS_Define.f90 \ - ODPS_Binary_IO.f90 \ - ODPS_netCDF_IO.f90 - -# Obj files used in link phase -OBJ_FILES = ${SRC_FILES:.f90=.o} \ - $(EXE_FILE).o - -# Include and library definitions -INCLUDES = -I$(HOME)/local/netcdf/include -LIBRARIES = -L$(HOME)/local/netcdf/lib -lnetcdf - -# Define common make targets (all, build, clean, install) -include $(CRTM_SOURCE_ROOT)/make.common_targets - -# Source file link creation and removal -create_links: - @linkfiles $(CRTM_SOURCE_ROOT) $(SRC_FILES) - -remove_links: - @unlinkfiles $(SRC_FILES) - -# Squeaky clean target -realclean: clean remove_links - -# Source dependency lists -include make.dependencies - -# Define default rules -include $(CRTM_SOURCE_ROOT)/make.rules diff --git a/src/Coefficients/TauCoeff/ODPS/ODPS_BIN2NC/ODPS_BIN2NC.f90 b/src/Coefficients/TauCoeff/ODPS/ODPS_BIN2NC/ODPS_BIN2NC.f90 index 3b715d3..dc768f3 100644 --- a/src/Coefficients/TauCoeff/ODPS/ODPS_BIN2NC/ODPS_BIN2NC.f90 +++ b/src/Coefficients/TauCoeff/ODPS/ODPS_BIN2NC/ODPS_BIN2NC.f90 @@ -34,8 +34,8 @@ PROGRAM ODPS_BIN2NC ! --------- ! Variables ! --------- - INTEGER :: Error_Status - CHARACTER(256) :: NC_Filename + INTEGER :: Error_Status, n_args + CHARACTER(256) :: NC_Filename, tmp_filename CHARACTER(256) :: BIN_Filename TYPE(ODPS_type) :: ODPS TYPE(ODPS_type) :: ODPS_Test @@ -48,30 +48,40 @@ PROGRAM ODPS_BIN2NC '$Revision$' ) ! Get the input and output filenames - WRITE( *, FMT = '( /5x, "Enter the INPUT Binary ODPS file: " )', & - ADVANCE = 'NO' ) - READ( *, '( a )' ) BIN_Filename - BIN_Filename = ADJUSTL( BIN_FileNAME ) - IF ( .NOT. File_Exists( TRIM( BIN_Filename ) ) ) THEN - CALL Display_Message( PROGRAM_NAME, & - 'File '//TRIM( BIN_Filename )//' not found.', & - FAILURE ) - STOP + ! Get the filename + n_args = COMMAND_ARGUMENT_COUNT() + IF ( n_args > 0 ) THEN + CALL GET_COMMAND_ARGUMENT(1, BIN_filename) + !** automatically generate the binary filename based on the command line netcdf filename + tmp_filename = BIN_filename(1:LEN_TRIM(BIN_filename) - 4)//".nc" + NC_filename = TRIM(ADJUSTL(tmp_filename)) + PRINT *, "Output filename:", NC_filename + ELSE + WRITE( *, FMT = '( /5x, "Enter the INPUT Binary ODPS file: " )', & + ADVANCE = 'NO' ) + READ( *, '( a )' ) BIN_Filename + BIN_Filename = ADJUSTL( BIN_FileNAME ) + IF ( .NOT. File_Exists( TRIM( BIN_Filename ) ) ) THEN + CALL Display_Message( PROGRAM_NAME, & + 'File '//TRIM( BIN_Filename )//' not found.', & + FAILURE ) + STOP + END IF + + WRITE( *, FMT = '( /5x, "Enter the OUTPUT netCDF ODPS file: " )', & + ADVANCE = 'NO' ) + READ( *, '( a )' ) NC_Filename + NC_Filename = ADJUSTL( NC_Filename ) END IF - WRITE( *, FMT = '( /5x, "Enter the OUTPUT netCDF ODPS file: " )', & - ADVANCE = 'NO' ) - READ( *, '( a )' ) NC_Filename - NC_Filename = ADJUSTL( NC_Filename ) - ! Check that the BIN file isn't accidentally overwritten IF ( TRIM( BIN_Filename ) == TRIM( NC_Filename ) ) THEN - CALL Display_Message( PROGRAM_NAME, & - 'Output filename is the same as the input filename!', & - FAILURE ) - STOP + CALL Display_Message( PROGRAM_NAME, & + 'Output filename is the same as the input filename!', & + FAILURE ) + STOP END IF - + ! Read the input binary file WRITE( *, '( /5x, "Reading Binary ODPS data ..." )' ) Error_Status = Read_ODPS_Binary( BIN_Filename, ODPS ) diff --git a/src/Coefficients/TauCoeff/ODPS/ODPS_BIN2NC/make.dependencies b/src/Coefficients/TauCoeff/ODPS/ODPS_BIN2NC/make.dependencies deleted file mode 100644 index 7112d4f..0000000 --- a/src/Coefficients/TauCoeff/ODPS/ODPS_BIN2NC/make.dependencies +++ /dev/null @@ -1,15 +0,0 @@ -Binary_File_Utility.o : Binary_File_Utility.f90 Endian_Utility.o Message_Handler.o File_Utility.o Type_Kinds.o -Compare_Float_Numbers.o : Compare_Float_Numbers.f90 Type_Kinds.o -Endian_Utility.o : Endian_Utility.f90 Type_Kinds.o -File_Utility.o : File_Utility.f90 -Message_Handler.o : Message_Handler.f90 File_Utility.o -ODPS_Binary_IO.o : ODPS_Binary_IO.f90 ODPS_Define.o Binary_File_Utility.o File_Utility.o Message_Handler.o Type_Kinds.o -ODPS_Define.o : ODPS_Define.f90 Sort_Utility.o Compare_Float_Numbers.o Message_Handler.o Type_Kinds.o -ODPS_NC2BIN.o : ODPS_NC2BIN.f90 ODPS_netCDF_IO.o ODPS_Binary_IO.o ODPS_Define.o Message_Handler.o File_Utility.o -ODPS_netCDF_IO.o : ODPS_netCDF_IO.f90 netCDF_Utility.o ODPS_Define.o Message_Handler.o Type_Kinds.o -Sort_Utility.o : Sort_Utility.f90 Type_Kinds.o -Type_Kinds.o : Type_Kinds.f90 -netCDF_Attribute_Utility.o : netCDF_Attribute_Utility.f90 Message_Handler.o Type_Kinds.o -netCDF_Dimension_Utility.o : netCDF_Dimension_Utility.f90 Message_Handler.o Type_Kinds.o -netCDF_Utility.o : netCDF_Utility.f90 netCDF_Attribute_Utility.o netCDF_Variable_Utility.o netCDF_Dimension_Utility.o Message_Handler.o Type_Kinds.o -netCDF_Variable_Utility.o : netCDF_Variable_Utility.f90 Message_Handler.o Type_Kinds.o diff --git a/src/Coefficients/TauCoeff/ODPS/ODPS_NC2BIN/Makefile b/src/Coefficients/TauCoeff/ODPS/ODPS_NC2BIN/Makefile deleted file mode 100644 index 76e91b1..0000000 --- a/src/Coefficients/TauCoeff/ODPS/ODPS_NC2BIN/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -#============================================================================== -# -# Makefile for ODPS_NC2BIN program -# -#============================================================================== - -# Define macros -include $(CRTM_SOURCE_ROOT)/make.macros - -# This makefile -MAKE_FILE = Makefile - -# Executable files -EXE_FILE = ODPS_NC2BIN -SCRIPT_FILE = run_ODPS_NC2BIN.sh - -# Source files to link -SRC_FILES = Type_Kinds.f90 \ - File_Utility.f90 \ - Message_Handler.f90 \ - Compare_Float_Numbers.f90 \ - Binary_File_Utility.f90 \ - Endian_Utility.f90 \ - Sort_Utility.f90 \ - netCDF_Utility.f90 \ - netCDF_Dimension_Utility.f90 \ - netCDF_Variable_Utility.f90 \ - netCDF_Attribute_Utility.f90 \ - ODPS_Define.f90 \ - ODPS_Binary_IO.f90 \ - ODPS_netCDF_IO.f90 \ - CRTM_Parameters.f90 - -# Obj files used in link phase -OBJ_FILES = ${SRC_FILES:.f90=.o} \ - $(EXE_FILE).o - -# Include and library definitions -INCLUDES = -I$(HOME)/local/include -LIBRARIES = -L$(HOME)/local/lib -lnetcdff - -# Define common make targets (all, build, clean, install) -include $(CRTM_SOURCE_ROOT)/make.common_targets - -# Source file link creation and removal -create_links:: - @$(LINK_SCRIPT) $(CRTM_SOURCE_ROOT) $(SRC_FILES) - -remove_links:: - @$(UNLINK_SCRIPT) $(SRC_FILES) - -# Script install target -install_script: - @$(COPY) $(SCRIPT_FILE) ${HOME}/bin - - -# Source dependency lists -include make.dependencies - -# Define default rules -include $(CRTM_SOURCE_ROOT)/make.rules diff --git a/src/Coefficients/TauCoeff/ODPS/ODPS_NC2BIN/ODPS_NC2BIN.f90 b/src/Coefficients/TauCoeff/ODPS/ODPS_NC2BIN/ODPS_NC2BIN.f90 index 2f4433b..0cd2d6a 100644 --- a/src/Coefficients/TauCoeff/ODPS/ODPS_NC2BIN/ODPS_NC2BIN.f90 +++ b/src/Coefficients/TauCoeff/ODPS/ODPS_NC2BIN/ODPS_NC2BIN.f90 @@ -38,36 +38,44 @@ PROGRAM ODPS_NC2BIN ! --------- ! Variables ! --------- - INTEGER :: Error_Status - CHARACTER(256) :: NC_Filename + INTEGER :: Error_Status, n_args + CHARACTER(256) :: NC_Filename, tmp_filename CHARACTER(256) :: BIN_Filename TYPE(ODPS_type) :: ODPS TYPE(ODPS_type) :: ODPS_Test - ! Output prgram header CALL Program_Message( PROGRAM_NAME, & 'Program to convert netCDF format ODPS files to '//& 'their CRTM Binary format.', & '$Revision$' ) - - ! Get the input and output filenames - WRITE( *, FMT = '( /5x, "Enter the INPUT netCDF ODPS file: " )', & - ADVANCE = 'NO' ) - READ( *, '( a )' ) NC_Filename - NC_Filename = ADJUSTL( NC_Filename ) - IF ( .NOT. File_Exists( TRIM( NC_Filename ) ) ) THEN - CALL Display_Message( PROGRAM_NAME, & - 'File '//TRIM( NC_Filename )//' not found.', & - FAILURE ) - STOP + ! Get the filename + n_args = COMMAND_ARGUMENT_COUNT() + IF ( n_args > 0 ) THEN + CALL GET_COMMAND_ARGUMENT(1, NC_Filename) + !** automatically generate the binary Filename based on the command line netcdf Filename + tmp_filename = NC_Filename(1:LEN_TRIM(NC_Filename) - 3)//".bin" + BIN_Filename = TRIM(ADJUSTL(tmp_filename)) + PRINT *, "Output filename:", BIN_Filename + ELSE + ! Get the input and output filenames + WRITE( *, FMT = '( /5x, "Enter the INPUT netCDF ODPS file: " )', & + ADVANCE = 'NO' ) + READ( *, '( a )' ) NC_Filename + NC_Filename = ADJUSTL( NC_Filename ) + IF ( .NOT. File_Exists( TRIM( NC_Filename ) ) ) THEN + CALL Display_Message( PROGRAM_NAME, & + 'File '//TRIM( NC_Filename )//' not found.', & + FAILURE ) + STOP + END IF + + WRITE( *, FMT = '( /5x, "Enter the OUTPUT Binary ODPS file: " )', & + ADVANCE = 'NO' ) + READ( *, '( a )' ) BIN_Filename + BIN_Filename = ADJUSTL( BIN_FileNAME ) END IF - WRITE( *, FMT = '( /5x, "Enter the OUTPUT Binary ODPS file: " )', & - ADVANCE = 'NO' ) - READ( *, '( a )' ) BIN_Filename - BIN_Filename = ADJUSTL( BIN_FileNAME ) - ! Check that the netCDF file isn't accidentally overwritten IF ( TRIM( NC_Filename ) == TRIM( BIN_Filename ) ) THEN CALL Display_Message( PROGRAM_NAME, & diff --git a/src/Coefficients/TauCoeff/ODPS/ODPS_NC2BIN/make.dependencies b/src/Coefficients/TauCoeff/ODPS/ODPS_NC2BIN/make.dependencies deleted file mode 100644 index 6072df6..0000000 --- a/src/Coefficients/TauCoeff/ODPS/ODPS_NC2BIN/make.dependencies +++ /dev/null @@ -1,16 +0,0 @@ -Binary_File_Utility.o : Binary_File_Utility.f90 Endian_Utility.o Message_Handler.o File_Utility.o Type_Kinds.o -CRTM_Parameters.o : CRTM_Parameters.f90 Type_Kinds.o -Compare_Float_Numbers.o : Compare_Float_Numbers.f90 Type_Kinds.o -Endian_Utility.o : Endian_Utility.f90 Type_Kinds.o -File_Utility.o : File_Utility.f90 -Message_Handler.o : Message_Handler.f90 File_Utility.o -ODPS_Binary_IO.o : ODPS_Binary_IO.f90 ODPS_Define.o Binary_File_Utility.o File_Utility.o Message_Handler.o Type_Kinds.o -ODPS_Define.o : ODPS_Define.f90 CRTM_Parameters.o Sort_Utility.o Compare_Float_Numbers.o Message_Handler.o Type_Kinds.o -ODPS_NC2BIN.o : ODPS_NC2BIN.f90 ODPS_netCDF_IO.o ODPS_Binary_IO.o ODPS_Define.o Message_Handler.o File_Utility.o -ODPS_netCDF_IO.o : ODPS_netCDF_IO.f90 netCDF_Utility.o ODPS_Define.o Message_Handler.o Type_Kinds.o -Sort_Utility.o : Sort_Utility.f90 Type_Kinds.o -Type_Kinds.o : Type_Kinds.f90 -netCDF_Attribute_Utility.o : netCDF_Attribute_Utility.f90 Message_Handler.o Type_Kinds.o -netCDF_Dimension_Utility.o : netCDF_Dimension_Utility.f90 Message_Handler.o Type_Kinds.o -netCDF_Utility.o : netCDF_Utility.f90 netCDF_Attribute_Utility.o netCDF_Variable_Utility.o netCDF_Dimension_Utility.o Message_Handler.o Type_Kinds.o -netCDF_Variable_Utility.o : netCDF_Variable_Utility.f90 Message_Handler.o Type_Kinds.o diff --git a/src/Coefficients/TauCoeff/ODPS/ODPS_NC2BIN/run_ODPS_NC2BIN.sh b/src/Coefficients/TauCoeff/ODPS/ODPS_NC2BIN/run_ODPS_NC2BIN.sh deleted file mode 100755 index bfc6d05..0000000 --- a/src/Coefficients/TauCoeff/ODPS/ODPS_NC2BIN/run_ODPS_NC2BIN.sh +++ /dev/null @@ -1,129 +0,0 @@ -#!/bin/sh - -usage() -{ - echo " Usage: run_ODPS_NC2BIN -l|b[fh]" - echo - echo " Convert any netCDF format ODPS TauCoeff files in the current" - echo " directory to Binary format. File with the suffix *.TauCoeff.nc" - echo " are converted into *.TauCoeff.bin files." - echo - echo " l Produce little-endian binary output files" - echo - echo " b Produce big-endian binary output files" - echo - echo " f Force overwrite of output file if it already exists." - echo " Default behaviour is to skip conversion if the output" - echo " file is already present." - echo - echo " h Print this message and exit" - echo - echo " Note the endian-ness option is only setup for the following" - echo " compilers that allow for run-time conversion via environment" - echo " variables:" - echo " - AIX xlf" - echo " - Linux gfortran" - echo " - Linux ifort (Intel)" - echo " - Linux g95" - echo -} - - -# Define defaults -ENDIAN_TYPE="NONE" -OVERWRITE="NO" - - -# Parse command line options -while getopts :hlbf OPTVAL; do - - # If option argument looks like another option exit the loop - case ${OPTARG} in - -*) break;; - esac - - # Parse the valid options here - case ${OPTVAL} in - l) ENDIAN_TYPE="little";; - b) ENDIAN_TYPE="big";; - f) OVERWRITE="YES";; - h) usage - exit 0;; - :|\?) OPTVAL=${OPTARG} - break;; - esac - -done - -# Remove the options processed -shift `expr ${OPTIND} - 1` - -# Now output invalidities based on OPTVAL -# Need to do this as getopts does not handle -# the situations where an option is passed -# as an argument to another option. -case ${OPTVAL} in - - # If OPTVAL contains nothing, then all options - # have been successfully parsed - \?) if [ $# -ne 0 ]; then - ( echo " Invalid argument(s) $*" ; echo ; usage ) | more - exit 2 - fi;; - - # Invalid option - ?) ( echo " Invalid option '-${OPTARG}'" ; usage ) | more - exit 2;; - -esac - -# Check endian type for run time options -# ...Save the current envar options -XLFRTEOPTS_SAVE=${XLFRTEOPTS} -GFORTRAN_CONVERT_UNIT_SAVE=${GFORTRAN_CONVERT_UNIT} -F_UFMTENDIAN_SAVE=${F_UFMTENDIAN} -G95_ENDIAN_SAVE=${G95_ENDIAN} -# ...Set the non-switchable envars -case ${ENDIAN_TYPE} in - "little") export XLFRTEOPTS="ufmt_littleendian=-100";; - "big") export XLFRTEOPTS="";; - *) ( echo " Must specify and endian type, -l or -b" ; echo ; usage ) | more - exit 2;; -esac -# ...Switchable envars -export GFORTRAN_CONVERT_UNIT="${ENDIAN_TYPE}_endian" -export F_UFMTENDIAN="${ENDIAN_TYPE}" -export G95_ENDIAN="${ENDIAN_TYPE}" - - -# Assign processing parameters -EXE_FILE="ODPS_NC2BIN" -LOG_FILE="${EXE_FILE}.${ENDIAN_TYPE}_endian.log" - - -# Process netCDF TauCoeff files -for NC_FILE in `ls *.TauCoeff.nc`; do - - # Create binary filename - BIN_FILE="`basename ${NC_FILE} .nc`.bin" - - # Check to see if the output file exists - if [ -f ${BIN_FILE} -a ${OVERWRITE} = "NO" ]; then - echo " Output file ${BIN_FILE} already exists. Skipping to next file..." - continue - fi - - # Convert the file - echo " Converting ${NC_FILE} to ${ENDIAN_TYPE} endian binary format file ${BIN_FILE}..." - ${EXE_FILE} <<-NoMoreInput >> ${LOG_FILE} - ${NC_FILE} - ${BIN_FILE} - NoMoreInput -done - - -# Restore the run-time option environment variables -export XLFRTEOPTS="${XLFRTEOPTS_SAVE}" -export GFORTRAN_CONVERT_UNIT="${GFORTRAN_CONVERT_UNIT_SAVE}" -export F_UFMTENDIAN="${F_UFMTENDIAN_SAVE}" -export G95_ENDIAN="${G95_ENDIAN_SAVE}" diff --git a/test/mains/application/check_tropics.f90 b/test/mains/application/check_tropics.f90 index 83b0a37..7346072 100644 --- a/test/mains/application/check_tropics.f90 +++ b/test/mains/application/check_tropics.f90 @@ -88,14 +88,15 @@ PROGRAM check_crtm INTEGER, PARAMETER :: N_AEROSOLS = 1 ! Sensor information - INTEGER , PARAMETER :: N_SENSORS = 1 - CHARACTER(*), PARAMETER :: SENSOR_ID(N_SENSORS) = (/'tms_tropics-07'/) -! 'tms_tropics-02', & -! 'tms_tropics-03', & -! 'tms_tropics-04', & -! 'tms_tropics-01', & -! 'tms_tropics-06', & -! 'tms_tropics-05' /) + INTEGER , PARAMETER :: N_SENSORS = 7 + CHARACTER(*), PARAMETER :: SENSOR_ID(N_SENSORS) = (/'tms_tropics-01', & + 'tms_tropics-02', & + 'tms_tropics-03', & + 'tms_tropics-04', & + 'tms_tropics-05', & + 'tms_tropics-06', & + 'tms_tropics-07' /) + ! Some pretend geometry angles. The scan angle is based ! on the default Re (earth radius) and h (satellite height) REAL(fp), PARAMETER :: ZENITH_ANGLE = 30.0_fp @@ -166,7 +167,7 @@ PROGRAM check_crtm DO i = 1,2 if (i==2) Coeff_Format = 'Binary' IF (i==1) Coeff_Format = 'netCDF' - + ! ... Coefficient table format IF ( Coeff_Format == 'Binary' ) THEN AerosolCoeff_Format = 'Binary' @@ -300,8 +301,6 @@ PROGRAM check_crtm Sensor_Scan_Angle = SCAN_ANGLE ) ! ========================================================================== - - ! ========================================================================== ! STEP 7. **** INITIALIZE THE K-MATRIX ARGUMENTS **** !