diff --git a/.gitignore b/.gitignore index b690d43..12fb8c6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,10 @@ .DS_Store *.o +*.tgz +.ipynb* +build +fix/ +**/Build/ +build.bash +rebuild.bash +.gitignore \ No newline at end of file diff --git a/configuration/ifort.setup b/configuration/ifort.setup index f8c0e81..fc241c8 100644 --- a/configuration/ifort.setup +++ b/configuration/ifort.setup @@ -5,9 +5,6 @@ hostname=$(hostname) export FC="ifort" -export NC4_DIR="/opt/netcdf4/4.6.2-intel-18.0.3" -export HDF_DIR="/opt/hdf5/1.8.21-intel-18.0.3" -#export HDF4_DIR="/opt/hdf4/4.2.14-intel-18.0.3" export OMP_NUM_THREADS=4 #set here for testing purposes, probably want to override this @@ -25,11 +22,11 @@ HDF5DISC="/usr/local/other/hdf5/1.13.0/intel-19.1.0.16_impi-20.0.0.166/" if [[ "$hostname" == "s4-submit.ssec.wisc.edu" ]] ; then #S4 export LIBS="\ - -L $NC4_DIR/lib -lnetcdf -lnetcdff \ - -L $HDF_DIR/lib -lhdf5 \ + -L ${NC4_LIB} -lnetcdf -lnetcdff \ + -L ${HDF5_LIB} -lhdf5 \ -g -fpp -traceback -check bounds \ - -I $NC4_DIR/include \ - -I $HDF_DIR/include " + -I ${NC4_INC} \ + -I ${HDF5_INC} " elif [[ "$hostname" == "discover"* ]] ; then # NCCS Discover export LIBS="\ -L $NETCDF/lib -lnetcdf -lnetcdff \ @@ -40,4 +37,3 @@ elif [[ "$hostname" == "discover"* ]] ; then # NCCS Discover else export LIBS="" fi - diff --git a/src/AtmAbsorption/ODPS/ODPS_CoordinateMapping.f90 b/src/AtmAbsorption/ODPS/ODPS_CoordinateMapping.f90 index 4cba28d..984621c 100644 --- a/src/AtmAbsorption/ODPS/ODPS_CoordinateMapping.f90 +++ b/src/AtmAbsorption/ODPS/ODPS_CoordinateMapping.f90 @@ -43,6 +43,7 @@ MODULE ODPS_CoordinateMapping PUBLIC :: Interpolate_Profile_F1_TL PUBLIC :: Interpolate_Profile_F1_AD PUBLIC :: Compute_Interp_Index + PUBLIC :: Geopotential_Height ! Parameters used in the geopotential height calculation routines ! a factor used in the virtual temperature Tv calculation diff --git a/src/AtmOptics/AOvar_Define.f90 b/src/AtmOptics/AOvar_Define.f90 index 5a9b1f4..919d935 100644 --- a/src/AtmOptics/AOvar_Define.f90 +++ b/src/AtmOptics/AOvar_Define.f90 @@ -9,6 +9,10 @@ ! Written by: Paul van Delst, 01-Jul-2013 ! paul.vandelst@noaa.gov ! +! Modified by: Isaac Moradi, Isaac.Moradi@nasa.gov +! 14-Nov-2021 +! Added the backscat_coefficient +! MODULE AOvar_Define @@ -90,6 +94,7 @@ MODULE AOvar_Define REAL(fp), ALLOCATABLE :: optical_depth(:) REAL(fp), ALLOCATABLE :: bs(:) REAL(fp), ALLOCATABLE :: w(:) + REAL(fp), ALLOCATABLE :: Backscat_Coefficient(:) END TYPE AOvar_type @@ -134,6 +139,7 @@ ELEMENTAL SUBROUTINE AOvar_Create( & ALLOCATE( self%optical_depth(n_Layers), & self%bs(n_Layers), & self%w(n_Layers), & + self%Backscat_Coefficient(n_layers), & STAT = alloc_stat ) IF ( alloc_stat /= 0 ) RETURN @@ -164,6 +170,8 @@ SUBROUTINE AOvar_Inspect( self) WRITE(*,'(5(1x,es22.15,:))') self%bs WRITE(*,'(3x,"Single scatter albedo (w) :")') WRITE(*,'(5(1x,es22.15,:))') self%w + WRITE(*,'(3x,"Backscattering coefficient :")') + WRITE(*,'(5(1x,es22.15,:))') self%Backscat_Coefficient END SUBROUTINE AOvar_Inspect @@ -471,6 +479,12 @@ FUNCTION AOvar_ReadFile( & msg = 'Error reading single scatter albedo - '//TRIM(io_msg) CALL Read_Cleanup(); RETURN END IF + ! ...Backscattering coefficient + READ( fid, IOSTAT=io_stat, IOMSG=io_msg ) AOvar%Backscat_Coefficient + IF ( io_stat /= 0 ) THEN + msg = 'Error reading backscattering coefficient - '//TRIM(io_msg) + CALL Read_Cleanup(); RETURN + END IF ! Close the file @@ -631,6 +645,12 @@ FUNCTION AOvar_WriteFile( & msg = 'Error writing single scatter albedo - '//TRIM(io_msg) CALL Write_Cleanup(); RETURN END IF + ! ...backscattering coefficient + WRITE( fid, IOSTAT=io_stat, IOMSG=io_msg ) AOvar%Backscat_Coefficient + IF ( io_stat /= 0 ) THEN + msg = 'Error writing backscattering coefficient - '//TRIM(io_msg) + CALL Write_Cleanup(); RETURN + END IF ! Close the file @@ -690,10 +710,12 @@ ELEMENTAL FUNCTION AOvar_Equal( x, y ) RESULT( is_equal ) ! ...Dimensions IF ( (x%n_Layers /= y%n_Layers ) ) RETURN ! ...Data - IF ( (x%transmittance .EqualTo. y%transmittance ) .AND. & - ALL(x%optical_depth .EqualTo. y%optical_depth ) .AND. & - ALL(x%bs .EqualTo. y%bs ) .AND. & - ALL(x%w .EqualTo. y%w ) ) & + IF ( (x%transmittance .EqualTo. y%transmittance ) .AND. & + ALL(x%optical_depth .EqualTo. y%optical_depth ) .AND. & + ALL(x%bs .EqualTo. y%bs ) .AND. & + ALL(x%w .EqualTo. y%w ) .AND. & + ALL(x%Backscat_Coefficient .EqualTo. y%Backscat_Coefficient ) & + ) & is_equal = .TRUE. END FUNCTION AOvar_Equal diff --git a/src/AtmOptics/CRTM_AtmOptics.f90 b/src/AtmOptics/CRTM_AtmOptics.f90 index 37e3cb3..83ba94f 100644 --- a/src/AtmOptics/CRTM_AtmOptics.f90 +++ b/src/AtmOptics/CRTM_AtmOptics.f90 @@ -9,6 +9,12 @@ ! Paul van Delst, paul.vandelst@noaa.gov ! 08-Jun-2005 ! +! Modified by: Isaac Moradi, Isaac.Moradi@nasa.gov +! 14-Nov-2021 +! Added the backscat_coefficient as well as layer to +! TOA transmittance with its AD and TL +! + MODULE CRTM_AtmOptics @@ -209,7 +215,6 @@ SUBROUTINE CRTM_Compute_Transmittance( atmoptics, transmittance ) transmittance = EXP(-ONE*SUM(atmoptics%optical_depth(1:k))) END SUBROUTINE CRTM_Compute_Transmittance - !-------------------------------------------------------------------------------- !:sdoc+: ! @@ -386,8 +391,9 @@ SUBROUTINE CRTM_AtmOptics_Combine( & ! Save the unmodified optical parameters - AOvar%Optical_Depth(k) = AtmOptics%Optical_Depth(k) - AOvar%bs(k) = AtmOptics%Single_Scatter_Albedo(k) + AOvar%Optical_Depth(k) = AtmOptics%Optical_Depth(k) + AOvar%bs(k) = AtmOptics%Single_Scatter_Albedo(k) + AOvar%Backscat_Coefficient(k) = AtmOptics%Backscat_Coefficient(k) ! ...Initialise scattering dependent terms AOvar%w(k) = ZERO @@ -404,8 +410,8 @@ SUBROUTINE CRTM_AtmOptics_Combine( & ! ...Normalization requirement for energy conservation AtmOptics%Phase_Coefficient(0,i,k) = POINT_5 END DO - AtmOptics%Delta_Truncation(k) = AtmOptics%Phase_Coefficient(AtmOptics%n_Legendre_Terms,1,k) + AtmOptics%Delta_Truncation(k) = AtmOptics%Phase_Coefficient(AtmOptics%n_Legendre_Terms,1,k) ! Redfine the total optical depth and single scattering ! albedo for the delta-function adjustment @@ -413,7 +419,6 @@ SUBROUTINE CRTM_AtmOptics_Combine( & AtmOptics%Optical_Depth(k) AtmOptics%Single_Scatter_Albedo(k) = ( ONE - AtmOptics%Delta_Truncation(k) ) * AOvar%w(k) / & ( ONE - ( AtmOptics%Delta_Truncation(k) * AOvar%w(k) ) ) - END IF Significant_Scattering diff --git a/src/AtmOptics/CRTM_AtmOptics_Define.f90 b/src/AtmOptics/CRTM_AtmOptics_Define.f90 index a5d0bf9..b1f3cec 100644 --- a/src/AtmOptics/CRTM_AtmOptics_Define.f90 +++ b/src/AtmOptics/CRTM_AtmOptics_Define.f90 @@ -8,6 +8,10 @@ ! Written by: Paul van Delst, 11-Oct-2011 ! paul.vandelst@noaa.gov ! +! Modified by: Isaac Moradi, 11-Nov-2021 +! isaac.moradi@nasa.gov +! Modifications to include back scattering information +! MODULE CRTM_AtmOptics_Define @@ -114,6 +118,7 @@ MODULE CRTM_AtmOptics_Define REAL(fp), ALLOCATABLE :: Optical_Depth(:) ! K-Max REAL(fp), ALLOCATABLE :: Single_Scatter_Albedo(:) ! K-Max REAL(fp), ALLOCATABLE :: Asymmetry_Factor(:) ! K-Max + REAL(fp), ALLOCATABLE :: Backscat_Coefficient(:) ! K-Max REAL(fp), ALLOCATABLE :: Delta_Truncation(:) ! K-Max REAL(fp), ALLOCATABLE :: Phase_Coefficient(:,:,:) ! 0:Ic-Max x Ip-Max x K-Max END TYPE CRTM_AtmOptics_type @@ -302,6 +307,7 @@ PURE SUBROUTINE AtmOptics_Allocate(self,alloc_stat) ALLOCATE( self%Optical_Depth( n_Layers ), & self%Single_Scatter_Albedo( n_Layers ), & self%Asymmetry_Factor( n_Layers ), & + self%Backscat_Coefficient( n_Layers ), & self%Delta_Truncation( n_Layers ), & self%Phase_Coefficient( 0:n_Legendre_Terms, n_Phase_Elements, n_Layers ), & STAT = alloc_stat ) @@ -347,6 +353,7 @@ ELEMENTAL SUBROUTINE CRTM_AtmOptics_Zero( self ) self%Optical_Depth = ZERO self%Single_Scatter_Albedo = ZERO self%Asymmetry_Factor = ZERO + self%Backscat_Coefficient = ZERO self%Delta_Truncation = ZERO self%Phase_Coefficient = ZERO END SUBROUTINE CRTM_AtmOptics_Zero @@ -393,6 +400,8 @@ SUBROUTINE Scalar_Inspect(self) WRITE(*,'(5(1x,es22.15,:))') self%Single_Scatter_Albedo(1:self%n_Layers) WRITE(*,'(3x,"Asymmetry_Factor :")') WRITE(*,'(5(1x,es22.15,:))') self%Asymmetry_Factor(1:self%n_Layers) + WRITE(*,'(3x,"Backscat_Coefficient Backscattering coefficient :")') + WRITE(*,'(5(1x,es22.15,:))') self%Backscat_Coefficient(1:self%n_Layers) WRITE(*,'(3x,"Delta_Truncation :")') WRITE(*,'(5(1x,es22.15,:))') self%Delta_Truncation(1:self%n_Layers) WRITE(*,'(3x,"Phase_Coefficient Legendre polynomial coefficients :")') @@ -628,6 +637,10 @@ ELEMENTAL FUNCTION CRTM_AtmOptics_Compare( & x%Asymmetry_Factor(1:k), & y%Asymmetry_Factor(1:k), & n ))) .OR. & + (.NOT. ALL(Compares_Within_Tolerance( & + x%Backscat_Coefficient(1:k), & + y%Backscat_Coefficient(1:k), & + n ))) .OR. & (.NOT. ALL(Compares_Within_Tolerance( & x%Delta_Truncation(1:k), & y%Delta_Truncation(1:k), & @@ -1022,6 +1035,7 @@ FUNCTION CRTM_AtmOptics_ReadFile( & AtmOptics(n)%Optical_Depth , & AtmOptics(n)%Single_Scatter_Albedo, & AtmOptics(n)%Asymmetry_Factor , & + AtmOptics(n)%Backscat_Coefficient , & AtmOptics(n)%Delta_Truncation IF ( io_stat /= 0 ) THEN msg = 'Error reading profile data '//TRIM(count_msg)//' from '//& @@ -1277,6 +1291,7 @@ FUNCTION CRTM_AtmOptics_WriteFile( & AtmOptics(n)%Optical_Depth(1:AtmOptics(n)%n_Layers) , & AtmOptics(n)%Single_Scatter_Albedo(1:AtmOptics(n)%n_Layers), & AtmOptics(n)%Asymmetry_Factor(1:AtmOptics(n)%n_Layers) , & + AtmOptics(n)%Backscat_Coefficient(1:AtmOptics(n)%n_Layers) , & AtmOptics(n)%Delta_Truncation(1:AtmOptics(n)%n_Layers) IF ( io_stat /= 0 ) THEN msg = 'Error writing profile data '//TRIM(count_msg)//' to '//& @@ -1400,6 +1415,7 @@ ELEMENTAL FUNCTION CRTM_AtmOptics_Equal( x, y ) RESULT( is_equal ) IF ( .NOT. (ALL(x%Optical_Depth(1:k) .EqualTo. y%Optical_Depth(1:k) ) .AND. & ALL(x%Single_Scatter_Albedo(1:k) .EqualTo. y%Single_Scatter_Albedo(1:k)) .AND. & ALL(x%Asymmetry_Factor(1:k) .EqualTo. y%Asymmetry_Factor(1:k) ) .AND. & + ALL(x%Backscat_Coefficient(1:k) .EqualTo. y%Backscat_Coefficient(1:k) ) .AND. & ALL(x%Delta_Truncation(1:k) .EqualTo. y%Delta_Truncation(1:k) ) .AND. & ALL(x%Phase_Coefficient(0:ic, 1:ip, 1:k) .EqualTo. & y%Phase_Coefficient(0:ic, 1:ip, 1:k))) ) RETURN @@ -1471,6 +1487,7 @@ ELEMENTAL FUNCTION CRTM_AtmOptics_Add( ao1, ao2 ) RESULT( aosum ) aosum%Optical_Depth(1:k) = aosum%Optical_Depth(1:k) + ao2%Optical_Depth(1:k) aosum%Single_Scatter_Albedo(1:k) = aosum%Single_Scatter_Albedo(1:k) + ao2%Single_Scatter_Albedo(1:k) aosum%Asymmetry_Factor(1:k) = aosum%Asymmetry_Factor(1:k) + ao2%Asymmetry_Factor(1:k) + aosum%Backscat_Coefficient(1:k) = aosum%Backscat_Coefficient(1:k) + ao2%Backscat_Coefficient(1:k) aosum%Delta_Truncation(1:k) = aosum%Delta_Truncation(1:k) + ao2%Delta_Truncation(1:k) aosum%Phase_Coefficient(0:ic,1:ip,1:k) = aosum%Phase_Coefficient(0:ic,1:ip,1:k) + ao2%Phase_Coefficient(0:ic,1:ip,1:k) @@ -1536,6 +1553,7 @@ ELEMENTAL FUNCTION CRTM_AtmOptics_Subtract( ao1, ao2 ) RESULT( aodiff ) aodiff%Optical_Depth(1:k) = aodiff%Optical_Depth(1:k) - ao2%Optical_Depth(1:k) aodiff%Single_Scatter_Albedo(1:k) = aodiff%Single_Scatter_Albedo(1:k) - ao2%Single_Scatter_Albedo(1:k) aodiff%Asymmetry_Factor(1:k) = aodiff%Asymmetry_Factor(1:k) - ao2%Asymmetry_Factor(1:k) + aodiff%Backscat_Coefficient(1:k) = aodiff%Backscat_Coefficient(1:k) - ao2%Backscat_Coefficient(1:k) aodiff%Delta_Truncation(1:k) = aodiff%Delta_Truncation(1:k) - ao2%Delta_Truncation(1:k) aodiff%Phase_Coefficient(0:ic,1:ip,1:k) = aodiff%Phase_Coefficient(0:ic,1:ip,1:k) - ao2%Phase_Coefficient(0:ic,1:ip,1:k) diff --git a/src/AtmScatter/CRTM_AOD_Module.f90 b/src/AtmScatter/CRTM_AOD_Module.f90 index 0774e27..084e917 100644 --- a/src/AtmScatter/CRTM_AOD_Module.f90 +++ b/src/AtmScatter/CRTM_AOD_Module.f90 @@ -225,7 +225,6 @@ FUNCTION CRTM_AOD( & ! ------------ Profile_Loop: DO m = 1, n_Profiles - ! Check the aerosol coeff. data for cases with aerosols IF( Atmosphere(m)%n_Aerosols > 0 .AND. .NOT. CRTM_AerosolCoeff_IsLoaded() )THEN Error_Status = FAILURE diff --git a/src/AtmScatter/CRTM_CloudScatter.f90 b/src/AtmScatter/CRTM_CloudScatter.f90 index 39b791d..7d87ccc 100644 --- a/src/AtmScatter/CRTM_CloudScatter.f90 +++ b/src/AtmScatter/CRTM_CloudScatter.f90 @@ -14,6 +14,10 @@ ! Modified by: James Rosinski, 08-Feb-2019 ! Rosinski@ucar.edu ! +! Modified by: Isaac Moradi, 18-Sept-2021 +! Isaac.Moradi@nasa.gov +! +! (C) Copyright 2019 UCAR ! MODULE CRTM_CloudScatter @@ -24,7 +28,8 @@ MODULE CRTM_CloudScatter ! Module use USE Type_Kinds, ONLY: fp USE Message_Handler, ONLY: SUCCESS, FAILURE, Display_Message - USE CRTM_Parameters, ONLY: ZERO, ONE, POINT_5, ONEpointFIVE, & + USE CRTM_Parameters, ONLY: ZERO, ONE, ONE_THOUSAND, & + POINT_5, ONEpointFIVE, & MAX_N_LAYERS, & MAX_N_CLOUDS, & WATER_CONTENT_THRESHOLD, & @@ -34,17 +39,53 @@ MODULE CRTM_CloudScatter HGPHASE ! <<< NEED TO REMOVE THIS IN FUTURE USE CRTM_SpcCoeff, ONLY: SC, & SpcCoeff_IsMicrowaveSensor , & - SpcCoeff_IsInfraredSensor , & + SpcCoeff_IsInfraredSensor , & SpcCoeff_IsVisibleSensor , & SpcCoeff_IsUltravioletSensor - USE CRTM_CloudCoeff, ONLY: CloudC + USE CRTM_CloudCoeff, ONLY: CloudC, & + INVALID_CLOUDCOEFF, & + MIE_TAMU_CLOUDCOEFF, & + DDA_ARTS_CLOUDCOEFF + USE CRTM_Atmosphere_Define, ONLY: CRTM_Atmosphere_type, & WATER_CLOUD, & ICE_CLOUD, & RAIN_CLOUD, & SNOW_CLOUD, & GRAUPEL_CLOUD, & - HAIL_CLOUD + HAIL_CLOUD, & + PlateType1 , & + ColumnType1 , & + SixBulletRosette, & + Perpendicular4_BulletRosette, & + Flat3_BulletRosette, & + IconCloudIce, & + SectorSnowflake, & + EvansSnowAggregate, & + EightColumnAggregate, & + LargePlateAggregate, & + LargeColumnAggregate, & + LargeBlockAggregate, & + IconSnow, & + IconHail, & + GemGraupel, & + GemSnow, & + GemHail, & + IceSphere, & + LiquidSphere, & + ! Parameters used for simplifying interpolation + ! of cloud optical properties + CLOUD_TYPE_MIE_TAMU, & + CLOUD_INDEX_MIE_TAMU, & + CLOUD_STATE_MIE_TAMU, & + CLOUD_TYPE_DDA_ARTS, & + CLOUD_INDEX_DDA_ARTS, & + CLOUD_STATE_DDA_ARTS, & + N_VALID_CLOUDS_MIE_TAMU, & + N_VALID_CLOUDS_DDA_ARTS, & + LIQUID, & + FROZEN + USE CRTM_GeometryInfo_Define, ONLY: CRTM_GeometryInfo_type USE CRTM_Interpolation, ONLY: NPTS , & LPoly_type , & @@ -67,8 +108,7 @@ MODULE CRTM_CloudScatter CSinterp_type, & CSvar_Associated, & CSvar_Destroy , & - CSvar_Create - + CSvar_Create ! Disable implicit typing IMPLICIT NONE @@ -180,6 +220,7 @@ MODULE CRTM_CloudScatter FUNCTION CRTM_Compute_CloudScatter( & Atm , & ! Input + GeometryInfo, & ! Input SensorIndex , & ! Input ChannelIndex, & ! Input CScat , & ! Output @@ -187,6 +228,7 @@ FUNCTION CRTM_Compute_CloudScatter( & RESULT( Error_Status ) ! Arguments TYPE(CRTM_Atmosphere_type), INTENT(IN) :: Atm + TYPE(CRTM_GeometryInfo_type), INTENT(IN) :: GeometryInfo INTEGER , INTENT(IN) :: SensorIndex INTEGER , INTENT(IN) :: ChannelIndex TYPE(CRTM_AtmOptics_type) , INTENT(IN OUT) :: CScat @@ -197,7 +239,7 @@ FUNCTION CRTM_Compute_CloudScatter( & CHARACTER(*), PARAMETER :: ROUTINE_NAME = 'CRTM_Compute_CloudScatter' ! Local variables CHARACTER(ML) :: Message - INTEGER :: k, kc, l, m, n + INTEGER :: k, kc, l, m, n, j REAL(fp) :: Frequency_MW, Frequency_IR LOGICAL :: Layer_Mask(Atm%n_Layers) INTEGER :: Layer_Index(Atm%n_Layers) @@ -237,12 +279,10 @@ FUNCTION CRTM_Compute_CloudScatter( & END IF END SELECT - ! --------------------------------------------- ! Loop over the different clouds in the profile ! --------------------------------------------- Cloud_loop: DO n = 1, Atm%n_Clouds - ! Only process clouds with more ! than the threshold water amount Layer_Mask = Atm%Cloud(n)%Water_Content > WATER_CONTENT_THRESHOLD @@ -253,18 +293,20 @@ FUNCTION CRTM_Compute_CloudScatter( & ! Loop over the current cloud's layers ! ------------------------------------ Layer_Index(1:nCloud_Layers) = PACK((/(k, k=1,Atm%Cloud(n)%n_Layers)/), Layer_Mask) + Cloud_Layer_loop: DO k = 1, nCloud_Layers kc = Layer_Index(k) - ! Call sensor specific routines IF ( SpcCoeff_IsMicrowaveSensor(SC(SensorIndex)) ) THEN CALL Get_Cloud_Opt_MW(CScat , & ! Input Frequency_MW , & ! Input Atm%Cloud(n)%Type , & ! Input + Atm%Cloud(n)%Water_Density(kc) , & ! Input Atm%Cloud(n)%Effective_Radius(kc), & ! Input Atm%Temperature(kc) , & ! Input CSV%ke(kc,n) , & ! Output + CSV%kb(kc,n) , & ! Output CSV%w(kc,n) , & ! Output CSV%pcoeff(:,:,kc,n) , & ! Output CSV%csi(kc,n) ) ! Interpolation @@ -277,11 +319,13 @@ FUNCTION CRTM_Compute_CloudScatter( & Atm%Cloud(n)%Type , & ! Input Atm%Cloud(n)%Effective_Radius(kc), & ! Input CSV%ke(kc,n) , & ! Output + CSV%kb(kc,n) , & ! Output CSV%w(kc,n) , & ! Output CSV%pcoeff(:,:,kc,n) , & ! Output CSV%csi(kc,n) ) ! Interpolation ELSE CSV%ke(kc,n) = ZERO + CSV%kb(kc,n) = ZERO CSV%w(kc,n) = ZERO CSV%pcoeff(:,:,kc,n) = ZERO END IF @@ -289,17 +333,19 @@ FUNCTION CRTM_Compute_CloudScatter( & ! interpolation quality control IF( CSV%ke(kc,n) <= ZERO ) THEN CSV%ke(kc,n) = ZERO + CSV%kb(kc,n) = ZERO CSV%w(kc,n) = ZERO END IF IF( CSV%w(kc,n) <= ZERO ) THEN CSV%w(kc,n) = ZERO + CSV%kb(kc,n) = ZERO CSV%pcoeff(:,:,kc,n) = ZERO END IF IF( CSV%w(kc,n) >= ONE ) THEN CSV%w(kc,n) = ONE - END IF - + END IF + ! Compute the optical depth (absorption + scattering) ! tau = rho.ke @@ -317,7 +363,11 @@ FUNCTION CRTM_Compute_CloudScatter( & ! compute the single scatter albedo in the Layer_loop below. CScat%Optical_Depth(kc) = CScat%Optical_Depth(kc) + & (CSV%ke(kc,n)*Atm%Cloud(n)%Water_Content(kc)) - + IF ( SC(SensorIndex)%Is_Active_Sensor .and. CScat%Include_Scattering ) THEN + CScat%Backscat_Coefficient(kc) = CScat%Backscat_Coefficient(kc) + & + (CSV%kb(kc,n)*Atm%Cloud(n)%Water_Content(kc)) + END IF + ! Compute the phase matrix coefficients ! p = p + p(LUT)*bs ! where @@ -335,8 +385,8 @@ FUNCTION CRTM_Compute_CloudScatter( & bs = Atm%Cloud(n)%Water_Content(kc) * CSV%ke(kc,n) * CSV%w(kc,n) CSV%Total_bs(kc) = CSV%Total_bs(kc) + bs CScat%Single_Scatter_Albedo(kc) = CScat%Single_Scatter_Albedo(kc) + bs - - DO m = 1, CScat%n_Phase_Elements + + DO m = 1, CScat%n_Phase_Elements DO l = 1, CScat%n_Legendre_Terms CScat%Phase_Coefficient(l,m,kc) = CScat%Phase_Coefficient(l,m,kc) + & (CSV%pcoeff(l,m,kc,n) * bs) @@ -443,6 +493,7 @@ FUNCTION CRTM_Compute_CloudScatter_TL( & Atm , & ! FWD Input CScat , & ! FWD Input Atm_TL , & ! TL Input + GeometryInfo, & ! Input SensorIndex , & ! Input ChannelIndex, & ! Input CScat_TL , & ! TL Output @@ -452,6 +503,7 @@ FUNCTION CRTM_Compute_CloudScatter_TL( & TYPE(CRTM_Atmosphere_type), INTENT(IN) :: Atm TYPE(CRTM_AtmOptics_type) , INTENT(IN) :: CScat TYPE(CRTM_Atmosphere_type), INTENT(IN) :: Atm_TL + TYPE(CRTM_GeometryInfo_type), INTENT(IN) :: GeometryInfo INTEGER , INTENT(IN) :: SensorIndex INTEGER , INTENT(IN) :: ChannelIndex TYPE(CRTM_AtmOptics_type) , INTENT(IN OUT) :: CScat_TL @@ -467,7 +519,7 @@ FUNCTION CRTM_Compute_CloudScatter_TL( & LOGICAL :: Layer_Mask(Atm%n_Layers) INTEGER :: Layer_Index(Atm%n_Layers) INTEGER :: nCloud_Layers - REAL(fp) :: ke_TL, w_TL + REAL(fp) :: ke_TL, w_TL, kb_TL REAL(fp) :: pcoeff_TL(0:CScat%n_Legendre_Terms, CScat%n_Phase_Elements) REAL(fp) :: bs, bs_TL @@ -484,12 +536,10 @@ FUNCTION CRTM_Compute_CloudScatter_TL( & n_Phase_Elements = CScat_TL%n_Phase_Elements CScat_TL%lOffset = CScat%lOffset - ! --------------------------------------------- ! Loop over the different clouds in the profile ! --------------------------------------------- Cloud_loop: DO n = 1, Atm%n_Clouds - ! Only process clouds with more ! than the threshold water amount Layer_Mask = Atm%Cloud(n)%Water_Content > WATER_CONTENT_THRESHOLD @@ -508,10 +558,14 @@ FUNCTION CRTM_Compute_CloudScatter_TL( & CALL Get_Cloud_Opt_MW_TL(CScat_TL , & ! Input Atm%Cloud(n)%Type , & ! Input CSV%ke(kc,n) , & ! Input + CSV%kb(kc,n) , & ! Input CSV%w(kc,n) , & ! Input + SC(SensorIndex)%Is_Active_Sensor , & ! Input + Atm_TL%Cloud(n)%Water_Density(kc) , & ! TL Input Atm_TL%Cloud(n)%Effective_Radius(kc), & ! TL Input Atm_TL%Temperature(kc) , & ! TL Input ke_TL , & ! TL Output + kb_TL , & ! TL Output w_TL , & ! TL Output pcoeff_TL , & ! TL Output CSV%csi(kc,n) ) ! Interpolation @@ -521,14 +575,18 @@ FUNCTION CRTM_Compute_CloudScatter_TL( & CALL Get_Cloud_Opt_IR_TL(CScat_TL , & ! Input Atm%Cloud(n)%Type , & ! Input CSV%ke(kc,n) , & ! Input + CSV%kb(kc,n) , & ! Input CSV%w(kc,n) , & ! Input + SC(SensorIndex)%Is_Active_Sensor , & ! Input Atm_TL%Cloud(n)%Effective_Radius(kc), & ! TL Input ke_TL , & ! TL Output + kb_TL , & ! TL Output w_TL , & ! TL Output pcoeff_TL , & ! TL Output CSV%csi(kc,n) ) ! Interpolation ELSE ke_TL = ZERO + kb_TL = ZERO w_TL = ZERO pcoeff_TL = ZERO END IF @@ -536,10 +594,12 @@ FUNCTION CRTM_Compute_CloudScatter_TL( & ! interpolation quality control IF( CSV%ke(kc,n) <= ZERO ) THEN ke_TL = ZERO + kb_TL = ZERO w_TL = ZERO END IF IF( CSV%w(kc,n) <= ZERO ) THEN w_TL = ZERO + kb_TL = ZERO pcoeff_TL = ZERO END IF IF( CSV%w(kc,n) >= ONE ) THEN @@ -550,6 +610,12 @@ FUNCTION CRTM_Compute_CloudScatter_TL( & CScat_TL%Optical_Depth(kc) = CScat_TL%Optical_Depth(kc) + & (ke_TL * Atm%Cloud(n)%Water_Content(kc)) + & (CSV%ke(kc,n) * Atm_TL%Cloud(n)%Water_Content(kc)) + + ! Compute the Backscatering coefficient + CScat_TL%Backscat_Coefficient(kc) = CScat_TL%Backscat_Coefficient(kc) + & + (kb_TL * Atm%Cloud(n)%Water_Content(kc)) + & + (CSV%kb(kc,n) * Atm_TL%Cloud(n)%Water_Content(kc)) + ! Compute the phase matrix coefficients IF( n_Phase_Elements > 0 .and. CScat%Include_Scattering ) THEN ! Compute the volume scattering coefficient @@ -672,6 +738,7 @@ FUNCTION CRTM_Compute_CloudScatter_AD( & Atm , & ! FWD Input CScat , & ! FWD Input CScat_AD , & ! AD Input + GeometryInfo, & ! Input SensorIndex , & ! Input ChannelIndex, & ! Input Atm_AD , & ! AD Output @@ -681,6 +748,7 @@ FUNCTION CRTM_Compute_CloudScatter_AD( & TYPE(CRTM_Atmosphere_type), INTENT(IN) :: Atm TYPE(CRTM_AtmOptics_type) , INTENT(IN) :: CScat TYPE(CRTM_AtmOptics_type) , INTENT(IN OUT) :: CScat_AD + TYPE(CRTM_GeometryInfo_type), INTENT(IN) :: GeometryInfo INTEGER , INTENT(IN) :: SensorIndex INTEGER , INTENT(IN) :: ChannelIndex TYPE(CRTM_Atmosphere_type), INTENT(IN OUT) :: Atm_AD @@ -696,7 +764,7 @@ FUNCTION CRTM_Compute_CloudScatter_AD( & LOGICAL :: Layer_Mask(Atm%n_Layers) INTEGER :: Layer_Index(Atm%n_Layers) INTEGER :: nCloud_Layers - REAL(fp) :: ke_AD, w_AD + REAL(fp) :: ke_AD, w_AD, kb_AD REAL(fp) :: pcoeff_AD(0:CScat%n_Legendre_Terms, CScat%n_Phase_Elements) REAL(fp) :: bs, bs_AD @@ -712,19 +780,17 @@ FUNCTION CRTM_Compute_CloudScatter_AD( & n_Legendre_Terms = CScat_AD%n_Legendre_Terms n_Phase_Elements = CScat_AD%n_Phase_Elements CScat_AD%lOffset = CScat%lOffset - + ! --------------------------------------------- ! Loop over the different clouds in the profile ! --------------------------------------------- Cloud_loop: DO n = 1, Atm%n_Clouds - ! Only process clouds with more ! than the threshold water amount Layer_Mask = Atm%Cloud(n)%Water_Content > WATER_CONTENT_THRESHOLD nCloud_Layers = COUNT(Layer_Mask) IF ( nCloud_Layers == 0 ) CYCLE Cloud_loop - ! ------------------------------------ ! Loop over the current cloud's layers ! ------------------------------------ @@ -737,6 +803,7 @@ FUNCTION CRTM_Compute_CloudScatter_AD( & bs_AD = ZERO pcoeff_AD = ZERO ke_AD = ZERO + kb_AD = ZERO w_AD = ZERO ! Compute the adjoint of the @@ -765,9 +832,14 @@ FUNCTION CRTM_Compute_CloudScatter_AD( & (CSV%ke(kc,n) * CScat_AD%Optical_Depth(kc)) ke_AD = ke_AD + (Atm%Cloud(n)%Water_Content(kc) * CScat_AD%Optical_Depth(kc)) + IF ( SC(SensorIndex)%Is_Active_Sensor .and. CScat%Include_Scattering ) THEN + Atm_AD%Cloud(n)%Water_Content(kc) = Atm_AD%Cloud(n)%Water_Content(kc) + & + (CSV%kb(kc,n) * CScat_AD%Backscat_Coefficient(kc)) + kb_AD = kb_AD + (Atm%Cloud(n)%Water_Content(kc) * CScat_AD%Backscat_Coefficient(kc)) + END IF + ! Compute the adjoint of the volume ! scattering coefficient. - ke_AD = ke_AD + (Atm%Cloud(n)%Water_Content(kc) * bs_AD * CSV%w(kc,n) ) Atm_AD%Cloud(n)%Water_Content(kc) = Atm_AD%Cloud(n)%Water_Content(kc) + & ( bs_AD * CSV%ke(kc,n) * CSV%w(kc,n) ) @@ -778,10 +850,17 @@ FUNCTION CRTM_Compute_CloudScatter_AD( & END IF IF( CSV%ke(kc,n) <= ZERO ) THEN ke_AD = ZERO + kb_AD = ZERO w_AD = ZERO END IF + + IF( CSV%kb(kc,n) <= ZERO ) THEN + kb_AD = ZERO + END IF + IF( CSV%w(kc,n) <= ZERO ) THEN w_AD = ZERO + kb_AD = ZERO pcoeff_AD = ZERO END IF @@ -790,10 +869,14 @@ FUNCTION CRTM_Compute_CloudScatter_AD( & CALL Get_Cloud_Opt_MW_AD(CScat_AD , & ! Input Atm%Cloud(n)%Type , & ! Input CSV%ke(kc,n) , & ! Input + CSV%kb(kc,n) , & ! Input CSV%w(kc,n) , & ! Input + SC(SensorIndex)%Is_Active_Sensor , & ! Input ke_AD , & ! AD Input + kb_AD , & ! AD Input w_AD , & ! AD Input pcoeff_AD , & ! AD Input + Atm_AD%Cloud(n)%Water_Density(kc) , & ! AD Output Atm_AD%Cloud(n)%Effective_Radius(kc), & ! AD Output Atm_AD%Temperature(kc) , & ! AD Output CSV%csi(kc,n) ) ! Interpolation @@ -803,14 +886,18 @@ FUNCTION CRTM_Compute_CloudScatter_AD( & CALL Get_Cloud_Opt_IR_AD(CScat_AD , & ! Input Atm%Cloud(n)%Type , & ! Input CSV%ke(kc,n) , & ! Input + CSV%kb(kc,n) , & ! Input CSV%w(kc,n) , & ! Input + SC(SensorIndex)%Is_Active_Sensor , & ! Input ke_AD , & ! AD Input + kb_AD , & ! AD Input w_AD , & ! AD Input pcoeff_AD , & ! AD Input Atm_AD%Cloud(n)%Effective_Radius(kc), & ! AD Output CSV%csi(kc,n) ) ! Interpolation ELSE ke_AD = ZERO + kb_AD = ZERO w_AD = ZERO pcoeff_AD = ZERO END IF @@ -842,6 +929,7 @@ SUBROUTINE Get_Cloud_Opt_IR( CloudScatter, & ! Input CloudScatter structure cloud_type , & ! Input see CRTM_Cloud_Define.f90 Reff , & ! Input effective radius (mm) ke , & ! Output optical depth for 1 mm water content + kb , & ! Output optical depth for 1 mm water content w , & ! Output single scattering albedo pcoeff , & ! Output spherical Legendre coefficients csi ) ! Output interpolation data @@ -850,7 +938,7 @@ SUBROUTINE Get_Cloud_Opt_IR( CloudScatter, & ! Input CloudScatter structure REAL(fp) , INTENT(IN) :: Frequency INTEGER , INTENT(IN) :: Cloud_Type REAL(fp) , INTENT(IN) :: Reff - REAL(fp) , INTENT(OUT) :: ke + REAL(fp) , INTENT(OUT) :: ke, kb REAL(fp) , INTENT(OUT) :: w REAL(fp) , INTENT(IN OUT) :: pcoeff(0:,:) TYPE(CSinterp_type) , INTENT(IN OUT) :: csi @@ -881,17 +969,19 @@ SUBROUTINE Get_Cloud_Opt_IR( CloudScatter, & ! Input CloudScatter structure ! based on CloudC LUT organisation ! ---------------------------------------------- SELECT CASE (Cloud_Type) - CASE(WATER_CLOUD) ; k=0 ! Liquid - CASE(ICE_CLOUD) ; k=3 ! Solid - CASE(RAIN_CLOUD) ; k=0 ! Liquid - CASE(SNOW_CLOUD) ; k=1 ! Solid - CASE(GRAUPEL_CLOUD); k=2 ! Solid - CASE(HAIL_CLOUD) ; k=3 ! Solid + CASE(WATER_CLOUD) ; k=1 ! Liquid + CASE(ICE_CLOUD) ; k=4 ! Solid + CASE(RAIN_CLOUD) ; k=1 ! Liquid + CASE(SNOW_CLOUD) ; k=2 ! Solid + CASE(GRAUPEL_CLOUD); k=3 ! Solid + CASE(HAIL_CLOUD) ; k=4 ! Solid + CASE DEFAULT ; k=HUGE(k) ! Case not found: Hopefully induce code to fail END SELECT ! Perform interpolation ! --------------------- CALL interp_2D( CloudC%ke_IR(csi%i1:csi%i2,csi%j1:csi%j2,k), csi%wlp, csi%xlp, ke ) + CALL interp_2D( CloudC%kb_IR(csi%i1:csi%i2,csi%j1:csi%j2,k), csi%wlp, csi%xlp, kb ) CALL interp_2D( CloudC%w_IR(csi%i1:csi%i2,csi%j1:csi%j2,k) , csi%wlp, csi%xlp, w ) IF (CloudScatter%n_Phase_Elements > 0 .and. CloudScatter%Include_Scattering ) THEN pcoeff(0,1) = POINT_5 @@ -916,20 +1006,24 @@ END SUBROUTINE Get_Cloud_Opt_IR ! scattereing coefficient (w_TL) ! spherical Legendre coefficients (pcoeff_TL) ! --------------------------------------------- - SUBROUTINE Get_Cloud_Opt_IR_TL( CloudScatter_TL, & ! Input CloudScatter TL structure - cloud_type , & ! Input see CRTM_Cloud_Define.f90 - ke , & ! Input - w , & ! Input - Reff_TL , & ! TL Input effective radius (mm) - ke_TL , & ! TL Output extinction coefficient (=~ optical depth for 1 mm water content) - w_TL , & ! TL Output single scattering albedo - pcoeff_TL , & ! TL Output spherical Legendre coefficients + SUBROUTINE Get_Cloud_Opt_IR_TL( CloudScatter_TL , & ! Input CloudScatter TL structure + cloud_type , & ! Input see CRTM_Cloud_Define.f90 + ke , & ! Input + kb , & ! Input + w , & ! Input + Is_Active_Sensor, & ! Input + Reff_TL , & ! TL Input effective radius (mm) + ke_TL , & ! TL Output extinction coefficient (=~ optical depth for 1 mm water content) + kb_TL , & ! TL Output backscat coefficient + w_TL , & ! TL Output single scattering albedo + pcoeff_TL , & ! TL Output spherical Legendre coefficients csi ) ! Input interpolation data ! Arguments TYPE(CRTM_AtmOptics_type), INTENT(IN) :: CloudScatter_TL INTEGER , INTENT(IN) :: Cloud_Type - REAL(fp), INTENT(IN) :: ke, w, Reff_TL - REAL(fp), INTENT(OUT) :: ke_TL + REAL(fp), INTENT(IN) :: ke, kb, w, Reff_TL + LOGICAL, INTENT(IN) :: Is_Active_Sensor + REAL(fp), INTENT(OUT) :: ke_TL, kb_TL REAL(fp), INTENT(OUT) :: w_TL REAL(fp), INTENT(IN OUT) :: pcoeff_TL(0:,:) TYPE(CSinterp_type), INTENT(IN) :: csi @@ -949,6 +1043,7 @@ SUBROUTINE Get_Cloud_Opt_IR_TL( CloudScatter_TL, & ! Input CloudScatter TL ! are outside LUT bounds IF ( csi%f_outbound .AND. csi%r_outbound ) THEN ke_TL = ZERO + kb_TL = ZERO w_TL = ZERO pcoeff_TL = ZERO RETURN @@ -979,12 +1074,13 @@ SUBROUTINE Get_Cloud_Opt_IR_TL( CloudScatter_TL, & ! Input CloudScatter TL ! based on CloudC LUT organisation ! ---------------------------------------------- SELECT CASE (Cloud_Type) - CASE(WATER_CLOUD) ; k=0 ! Liquid - CASE(ICE_CLOUD) ; k=3 ! Solid - CASE(RAIN_CLOUD) ; k=0 ! Liquid - CASE(SNOW_CLOUD) ; k=1 ! Solid - CASE(GRAUPEL_CLOUD); k=2 ! Solid - CASE(HAIL_CLOUD) ; k=3 ! Solid + CASE(WATER_CLOUD) ; k=1 ! Liquid + CASE(ICE_CLOUD) ; k=4 ! Solid + CASE(RAIN_CLOUD) ; k=1 ! Liquid + CASE(SNOW_CLOUD) ; k=2 ! Solid + CASE(GRAUPEL_CLOUD); k=3 ! Solid + CASE(HAIL_CLOUD) ; k=4 ! Solid + CASE DEFAULT ; k=HUGE(k) ! Case not found: Hopefully induce code to fail END SELECT @@ -995,6 +1091,11 @@ SUBROUTINE Get_Cloud_Opt_IR_TL( CloudScatter_TL, & ! Input CloudScatter TL CALL interp_2D_TL( z , csi%wlp, csi%xlp, & ! FWD Input z_TL, wlp_TL , xlp_TL , & ! TL Input ke_TL ) ! TL Output + ! Extinction coefficient + z => CloudC%kb_IR(csi%i1:csi%i2,csi%j1:csi%j2,k) + CALL interp_2D_TL( z , csi%wlp, csi%xlp, & ! FWD Input + z_TL, wlp_TL , xlp_TL , & ! TL Input + kb_TL ) ! TL Output ! Single scatter albedo z => CloudC%w_IR(csi%i1:csi%i2,csi%j1:csi%j2,k) CALL interp_2D_TL( z , csi%wlp, csi%xlp, & ! FWD Input @@ -1030,22 +1131,26 @@ END SUBROUTINE Get_Cloud_Opt_IR_TL ! IR bulk optical properties of a cloud: ! effective radius (Reff_AD) ! --------------------------------------------- - SUBROUTINE Get_Cloud_Opt_IR_AD( CloudScatter_AD, & ! Input CloudScatter AD structure - cloud_type , & ! Input see CRTM_Cloud_Define.f90 - ke , & ! Input - w , & ! Input - ke_AD , & ! AD Input extinction coefficient (=~ optical depth for 1 mm water content) - w_AD , & ! AD Input single scattering albedo - pcoeff_AD , & ! AD Input spherical Legendre coefficients - Reff_AD , & ! AD Output effective radius (mm) + SUBROUTINE Get_Cloud_Opt_IR_AD( CloudScatter_AD , & ! Input CloudScatter AD structure + cloud_type , & ! Input see CRTM_Cloud_Define.f90 + ke , & ! Input + kb , & ! Input + w , & ! Input + Is_Active_Sensor, & ! Input + ke_AD , & ! AD Input extinction coefficient (=~ optical depth for 1 mm water content) + kb_AD , & ! AD Input Backscatering coefficient + w_AD , & ! AD Input single scattering albedo + pcoeff_AD , & ! AD Input spherical Legendre coefficients + Reff_AD , & ! AD Output effective radius (mm) csi ) ! Input interpolation data ! Arguments TYPE(CRTM_AtmOptics_type), INTENT(IN) :: CloudScatter_AD INTEGER , INTENT(IN) :: Cloud_Type - REAL(fp), INTENT(IN) :: ke, w - REAL(fp), INTENT(IN OUT) :: ke_AD ! AD Input - REAL(fp), INTENT(IN OUT) :: w_AD ! AD Input - REAL(fp), INTENT(IN OUT) :: pcoeff_AD(0:,:) ! AD Input + REAL(fp), INTENT(IN) :: ke, kb, w + LOGICAL, INTENT(IN) :: Is_Active_Sensor + REAL(fp), INTENT(IN OUT) :: ke_AD, kb_AD ! AD Input + REAL(fp), INTENT(IN OUT) :: w_AD ! AD Input + REAL(fp), INTENT(IN OUT) :: pcoeff_AD(0:,:) ! AD Input REAL(fp), INTENT(IN OUT) :: Reff_AD ! AD Output TYPE(CSinterp_type), INTENT(IN) :: csi ! Local variables @@ -1065,6 +1170,7 @@ SUBROUTINE Get_Cloud_Opt_IR_AD( CloudScatter_AD, & ! Input CloudScatter AD IF ( csi%f_outbound .AND. csi%r_outbound ) THEN Reff_AD = ZERO ke_AD = ZERO + kb_AD = ZERO w_AD = ZERO pcoeff_AD = ZERO RETURN @@ -1083,12 +1189,13 @@ SUBROUTINE Get_Cloud_Opt_IR_AD( CloudScatter_AD, & ! Input CloudScatter AD ! based on CloudC LUT organisation ! ---------------------------------------------- SELECT CASE (Cloud_Type) - CASE(WATER_CLOUD) ; k=0 ! Liquid - CASE(ICE_CLOUD) ; k=3 ! Solid - CASE(RAIN_CLOUD) ; k=0 ! Liquid - CASE(SNOW_CLOUD) ; k=1 ! Solid - CASE(GRAUPEL_CLOUD); k=2 ! Solid - CASE(HAIL_CLOUD) ; k=3 ! Solid + CASE(WATER_CLOUD) ; k=1 ! Liquid + CASE(ICE_CLOUD) ; k=4 ! Solid + CASE(RAIN_CLOUD) ; k=1 ! Liquid + CASE(SNOW_CLOUD) ; k=2 ! Solid + CASE(GRAUPEL_CLOUD); k=3 ! Solid + CASE(HAIL_CLOUD) ; k=4 ! Solid + CASE DEFAULT ; k=HUGE(k) ! Case not found: Hopefully induce code to fail END SELECT ! Perform interpolation @@ -1123,6 +1230,11 @@ SUBROUTINE Get_Cloud_Opt_IR_AD( CloudScatter_AD, & ! Input CloudScatter AD CALL interp_2D_AD( z , csi%wlp, csi%xlp, & ! FWD Input ke_AD , & ! AD Input z_AD, wlp_AD, xlp_AD ) ! AD Output + ! Backscatering coefficient + z => CloudC%kb_IR(csi%i1:csi%i2,csi%j1:csi%j2,k) + CALL interp_2D_AD( z , csi%wlp, csi%xlp, & ! FWD Input + kb_AD , & ! AD Input + z_AD, wlp_AD, xlp_AD ) ! AD Output NULLIFY(z) @@ -1154,27 +1266,37 @@ END SUBROUTINE Get_Cloud_Opt_IR_AD ! asymmetry factor (g), and ! spherical Legendre coefficients (pcoeff) ! ------------------------------------------ - SUBROUTINE Get_Cloud_Opt_MW( CloudScatter, & ! Input CloudScatter structure - Frequency , & ! Input Frequency (GHz) - cloud_type , & ! Input see CRTM_Cloud_Define.f90 - Reff , & ! Input effective radius (mm) - Temperature , & ! Input cloudy temperature - ke , & ! Input optical depth for 1 mm water content - w , & ! Input single scattering albedo - pcoeff , & ! Output spherical Legendre coefficients - csi ) ! Output interpolation data + SUBROUTINE Get_Cloud_Opt_MW( CloudScatter , & ! Input CloudScatter structure + Frequency , & ! Input Frequency (GHz) + cloud_type , & ! Input see CRTM_Cloud_Define.f90 + Water_Density , & ! Input water density (kg.m^-3) + Reff , & ! Input effective radius (mm) + Temperature , & ! Input cloudy temperature + ke , & ! Input optical depth for 1 mm water content + kb , & ! Input Backscatering coeff for 1 mm water content + w , & ! Input single scattering albedo + pcoeff , & ! Output spherical Legendre coefficients + csi ) ! Output interpolation data ! Arguments - TYPE(CRTM_AtmOptics_type), INTENT(IN) :: CloudScatter + TYPE(CRTM_AtmOptics_type) , INTENT(IN) :: CloudScatter REAL(fp) , INTENT(IN) :: Frequency INTEGER , INTENT(IN) :: Cloud_Type + REAL(fp) , INTENT(IN) :: Water_Density REAL(fp) , INTENT(IN) :: Reff REAL(fp) , INTENT(IN) :: Temperature - REAL(fp) , INTENT(OUT) :: ke + REAL(fp) , INTENT(OUT) :: ke, kb REAL(fp) , INTENT(OUT) :: w REAL(fp) , INTENT(IN OUT) :: pcoeff(0:,:) TYPE(CSinterp_type) , INTENT(IN OUT) :: csi + ! Local variables + INTEGER :: cloud_state, cloud_loc + INTEGER :: Error_Status INTEGER :: j, k, l, m + CHARACTER(ML) :: Message + + ! Local parameters + CHARACTER(*), PARAMETER :: ROUTINE_NAME = 'Get_Cloud_Opt_MW' ! Initialise results that may ! not be interpolated @@ -1183,17 +1305,37 @@ SUBROUTINE Get_Cloud_Opt_MW( CloudScatter, & ! Input CloudScatter structure pcoeff = ZERO - ! Find the frequency, effective radius + ! Find the frequency, effective radius (or water content) ! and temperature indices for interpolation ! ----------------------------------------- csi%f_int = MAX(MIN(CloudC%Frequency_MW(CloudC%n_MW_Frequencies),Frequency),CloudC%Frequency_MW(1)) CALL find_index(CloudC%Frequency_MW, csi%f_int, csi%i1,csi%i2, csi%f_outbound) csi%f = CloudC%Frequency_MW(csi%i1:csi%i2) - csi%r_int = MAX(MIN(CloudC%Reff_MW(CloudC%n_MW_Radii),Reff),CloudC%Reff_MW(1)) - CALL find_index(CloudC%Reff_MW, csi%r_int, csi%j1,csi%j2, csi%r_outbound) - csi%r = CloudC%Reff_MW(csi%j1:csi%j2) - + ! If all Reff_MW existed in the CloudCoeff then CloudC%Reff_MW should be greater than zero and + ! will use Reff for interpolation otherwise will use the water content + IF (ALL(CloudC%Reff_MW .GT. ZERO)) THEN + csi%r_int = MAX(MIN(CloudC%Reff_MW(CloudC%n_MW_Radii),Reff),CloudC%Reff_MW(1)) + CALL find_index(CloudC%Reff_MW, csi%r_int, csi%j1,csi%j2, csi%r_outbound) + csi%r = CloudC%Reff_MW(csi%j1:csi%j2) + + ! Find the index of the given cloud type (k) in CloudCoeff + ! The array index starts from zero but findloc starts from 1 + cloud_loc = FINDLOC(CLOUD_TYPE_MIE_TAMU, Cloud_Type, DIM=1) - 1 + cloud_state = CLOUD_STATE_MIE_TAMU(cloud_loc) + k = CLOUD_INDEX_MIE_TAMU(cloud_loc) + ELSE + csi%r_int = MAX(MIN(CloudC%Water_Density_MW(CloudC%n_MW_Radii),Water_Density),CloudC%Water_Density_MW(1)) + CALL find_index(CloudC%Water_Density_MW, csi%r_int, csi%j1,csi%j2, csi%r_outbound) + csi%r = CloudC%Water_Density_MW(csi%j1:csi%j2) + + ! Find the index of the given cloud type (k) in CloudCoeff + ! The array index starts from zero but findloc starts from 1 + cloud_loc = FINDLOC(CLOUD_TYPE_DDA_ARTS, Cloud_Type, DIM=1) - 1 + cloud_state = CLOUD_STATE_DDA_ARTS(cloud_loc) + k = CLOUD_INDEX_DDA_ARTS(cloud_loc) + ENDIF + csi%t_int = MAX(MIN(CloudC%Temperature(CloudC%n_Temperatures),Temperature),CloudC%Temperature(1)) CALL find_index(CloudC%Temperature, csi%t_int, csi%k1,csi%k2, csi%t_outbound) csi%t = CloudC%Temperature(csi%k1:csi%k2) @@ -1212,65 +1354,63 @@ SUBROUTINE Get_Cloud_Opt_MW( CloudScatter, & ! Input CloudScatter structure ! Perform interpolation based on cloud type ! ----------------------------------------- - SELECT CASE (Cloud_Type) - ! Only 2-D interpolation of extinction coefficient as a - ! fn. of frequency and temperature for water cloud; i.e. - ! we're only considering Rayleigh scattering here. - CASE (WATER_CLOUD) - j = 1 - CALL interp_2D( CloudC%ke_L_MW(csi%i1:csi%i2,j,csi%k1:csi%k2), csi%wlp, csi%ylp, ke ) - - ! All 3-D interpolations for rain cloud! - CASE (RAIN_CLOUD) - CALL interp_3D( CloudC%ke_L_MW(csi%i1:csi%i2,csi%j1:csi%j2,csi%k1:csi%k2), csi%wlp, csi%xlp, csi%ylp, ke ) - CALL interp_3D( CloudC%w_L_MW(csi%i1:csi%i2,csi%j1:csi%j2,csi%k1:csi%k2) , csi%wlp, csi%xlp, csi%ylp, w ) - IF ( CloudScatter%n_Phase_Elements > 0 .and. CloudScatter%Include_Scattering ) THEN - pcoeff(0,1) = POINT_5 - DO m = 1, CloudScatter%n_Phase_Elements - DO l = 1, CloudScatter%n_Legendre_Terms - CALL interp_3D( CloudC%pcoeff_L_MW(csi%i1:csi%i2,csi%j1:csi%j2,csi%k1:csi%k2,l+CloudScatter%lOffset,m), & - csi%wlp, csi%xlp, csi%ylp, pcoeff(l,m) ) - END DO - END DO - + SELECT CASE (cloud_state) + CASE (LIQUID) + ! Only 2-D interpolation of extinction coefficient as a + ! fn. of frequency and temperature for water cloud; i.e. + ! we're only considering Rayleigh scattering here. + IF(Cloud_Type .EQ. WATER_CLOUD) THEN + j = 1 + CALL interp_2D( CloudC%ke_L_MW(csi%i1:csi%i2,j,csi%k1:csi%k2), csi%wlp, csi%ylp, ke ) + CALL interp_2D( CloudC%kb_L_MW(csi%i1:csi%i2,j,csi%k1:csi%k2), csi%wlp, csi%ylp, kb ) + ! All 3-D interpolations for rain cloud! ELSE - ! Absorption coefficient - ke = ke * (ONE - w) - END IF - - ! Only 1-D interpolation of extinction coefficient as a - ! fn. of frequency for ice cloud - CASE (ICE_CLOUD) - j = 1; k = 3 - CALL interp_1D( CloudC%ke_S_MW(csi%i1:csi%i2,j,k), csi%wlp, ke ) - - ! The remaining cloud types have 2-D interpolation - ! as a fn. of frequency and radius - CASE DEFAULT - ! Select the LUT density - SELECT CASE (Cloud_Type) - CASE (GRAUPEL_CLOUD); k = 2 - CASE (HAIL_CLOUD) ; k = 3 - CASE DEFAULT ; k = 1 - END SELECT - ! Perform interpolation - CALL interp_2D( CloudC%ke_S_MW(csi%i1:csi%i2,csi%j1:csi%j2,k), csi%wlp, csi%xlp, ke ) - CALL interp_2D( CloudC%w_S_MW(csi%i1:csi%i2,csi%j1:csi%j2,k) , csi%wlp, csi%xlp, w ) - IF (CloudScatter%n_Phase_Elements > 0 .and. CloudScatter%Include_Scattering ) THEN - pcoeff(0,1) = POINT_5 - DO m = 1, CloudScatter%n_Phase_Elements - DO l = 1, CloudScatter%n_Legendre_Terms - CALL interp_2D( CloudC%pcoeff_S_MW(csi%i1:csi%i2,csi%j1:csi%j2,k,l+CloudScatter%lOffset,m), & - csi%wlp, csi%xlp, pcoeff(l,m) ) - END DO - END DO - + CALL interp_3D( CloudC%ke_L_MW(csi%i1:csi%i2,csi%j1:csi%j2,csi%k1:csi%k2), csi%wlp, csi%xlp, csi%ylp, ke ) + CALL interp_3D( CloudC%kb_L_MW(csi%i1:csi%i2,csi%j1:csi%j2,csi%k1:csi%k2), csi%wlp, csi%xlp, csi%ylp, kb ) + CALL interp_3D( CloudC%w_L_MW(csi%i1:csi%i2,csi%j1:csi%j2,csi%k1:csi%k2) , csi%wlp, csi%xlp, csi%ylp, w ) + IF ( CloudScatter%n_Phase_Elements > 0 .and. CloudScatter%Include_Scattering ) THEN + pcoeff(0,1) = POINT_5 + DO m = 1, CloudScatter%n_Phase_Elements + DO l = 1, CloudScatter%n_Legendre_Terms + CALL interp_3D( CloudC%pcoeff_L_MW(csi%i1:csi%i2,csi%j1:csi%j2,csi%k1:csi%k2,l+CloudScatter%lOffset,m), & + csi%wlp, csi%xlp, csi%ylp, pcoeff(l,m) ) + END DO + END DO + ELSE + ! Absorption coefficient + ke = ke * (ONE - w) + END IF ! Cloud scatter + ENDIF !Cloud_Type + CASE (FROZEN) + IF (Cloud_Type .EQ. ICE_CLOUD) THEN + j = 1 + CALL interp_1D( CloudC%ke_S_MW(csi%i1:csi%i2,j,k), csi%wlp, ke ) + CALL interp_1D( CloudC%kb_S_MW(csi%i1:csi%i2,j,k), csi%wlp, kb ) ELSE - ! Absorption coefficient - ke = ke * (ONE - w) - END IF - + ! Perform interpolation + CALL interp_2D( CloudC%ke_S_MW(csi%i1:csi%i2,csi%j1:csi%j2,k), csi%wlp, csi%xlp, ke ) + CALL interp_2D( CloudC%kb_S_MW(csi%i1:csi%i2,csi%j1:csi%j2,k), csi%wlp, csi%xlp, kb ) + CALL interp_2D( CloudC%w_S_MW(csi%i1:csi%i2,csi%j1:csi%j2,k) , csi%wlp, csi%xlp, w ) + IF (CloudScatter%n_Phase_Elements > 0 .and. CloudScatter%Include_Scattering ) THEN + pcoeff(0,1) = POINT_5 + DO m = 1, CloudScatter%n_Phase_Elements + DO l = 1, CloudScatter%n_Legendre_Terms + CALL interp_2D( CloudC%pcoeff_S_MW(csi%i1:csi%i2,csi%j1:csi%j2,k,l+CloudScatter%lOffset,m), & + csi%wlp, csi%xlp, pcoeff(l,m) ) + END DO + END DO + + ELSE + ! Absorption coefficient + ke = ke * (ONE - w) + END IF + END IF ! ICE_Cloud etc interpol + CASE DEFAULT + Error_Status = FAILURE + WRITE(Message,'("Cloud state not defined")') + CALL Display_Message( ROUTINE_NAME,Message,Error_Status ) + RETURN END SELECT END SUBROUTINE Get_Cloud_Opt_MW @@ -1283,22 +1423,28 @@ END SUBROUTINE Get_Cloud_Opt_MW ! scattereing coefficient (w_TL) ! spherical Legendre coefficients (pcoeff_TL) ! --------------------------------------------- - SUBROUTINE Get_Cloud_Opt_MW_TL( CloudScatter_TL, & ! Input CloudScatter TL structure - cloud_type , & ! Input see CRTM_Cloud_Define.f90 - ke , & ! Input - w , & ! Input - Reff_TL , & ! TL Input effective radius (mm) - Temperature_TL , & ! TL Input cloudy temperature - ke_TL , & ! TL Output extinction coefficient (=~ optical depth for 1 mm water content) - w_TL , & ! TL Output single scattering albedo - pcoeff_TL , & ! TL Output spherical Legendre coefficients - csi ) ! Input interpolation data + SUBROUTINE Get_Cloud_Opt_MW_TL( CloudScatter_TL , & ! Input CloudScatter TL structure + cloud_type , & ! Input see CRTM_Cloud_Define.f90 + ke , & ! Input + kb , & ! Input + w , & ! Input + Is_Active_Sensor , & ! Input + Water_Density_TL , & ! TL Input effective radius (mm) + Reff_TL , & ! TL Input effective radius (mm) + Temperature_TL , & ! TL Input cloudy temperature + ke_TL , & ! TL Output extinction coefficient (=~ optical depth for 1 mm water content) + kb_TL , & ! TL Output Backscatering coefficient + w_TL , & ! TL Output single scattering albedo + pcoeff_TL , & ! TL Output spherical Legendre coefficients + csi ) ! Input interpolation data ! Arguments TYPE(CRTM_AtmOptics_type), INTENT(IN) :: CloudScatter_TL INTEGER , INTENT(IN) :: Cloud_Type - REAL(fp), INTENT(IN) :: ke, w, Reff_TL + REAL(fp), INTENT(IN) :: ke, kb, w, Reff_TL + REAL(fp), INTENT(IN) :: Water_Density_TL REAL(fp), INTENT(IN) :: Temperature_TL - REAL(fp), INTENT(OUT) :: ke_TL + LOGICAL, INTENT(IN) :: Is_Active_Sensor + REAL(fp), INTENT(OUT) :: ke_TL, kb_TL REAL(fp), INTENT(OUT) :: w_TL REAL(fp), INTENT(IN OUT) :: pcoeff_TL(0:,:) TYPE(CSinterp_type), INTENT(IN) :: csi @@ -1309,6 +1455,10 @@ SUBROUTINE Get_Cloud_Opt_MW_TL( CloudScatter_TL, & ! Input CloudScatter TL str REAL(fp) :: z2_TL(NPTS,NPTS) REAL(fp) :: z3_TL(NPTS,NPTS,NPTS) TYPE(LPoly_type) :: wlp_TL, xlp_TL, ylp_TL + + ! Variables to find the cloud index and state + INTEGER :: cloud_state, cloud_loc + !JR Static initialization means only 1 copy of the variable. OpenMP over profiles !JR means $OPENMP_NUM_THREADS copies are needed. So change to run-time initialization !JR REAL(fp), POINTER :: z2(:,:) => NULL() @@ -1327,14 +1477,31 @@ SUBROUTINE Get_Cloud_Opt_MW_TL( CloudScatter_TL, & ! Input CloudScatter TL str ! The local TL inputs f_int_TL = ZERO f_TL = ZERO - r_int_TL = Reff_TL r_TL = ZERO t_int_TL = Temperature_TL t_TL = ZERO z2_TL = ZERO z3_TL = ZERO - + ! If all Reff_MW existed in the CloudCoeff then CloudC%Reff_MW should be greater than zero and + ! will use Reff for interpolation otherwise will use the water content + IF (ALL(CloudC%Reff_MW .GT. ZERO)) THEN + ! Find the index of the given cloud type (k) in CloudCoeff + ! The array index starts from zero but findloc starts from 1 + cloud_loc = FINDLOC(CLOUD_TYPE_MIE_TAMU, Cloud_Type, DIM=1) - 1 + cloud_state = CLOUD_STATE_MIE_TAMU(cloud_loc) + k = CLOUD_INDEX_MIE_TAMU(cloud_loc) + r_int_TL = Reff_TL + ELSE + ! Find the index of the given cloud type (k) in CloudCoeff + ! The array index starts from zero but findloc starts from 1 + cloud_loc = FINDLOC(CLOUD_TYPE_DDA_ARTS, Cloud_Type, DIM=1) - 1 + cloud_state = CLOUD_STATE_DDA_ARTS(cloud_loc) + k = CLOUD_INDEX_DDA_ARTS(cloud_loc) + r_int_TL = Water_Density_TL + END IF + + ! Calculate the TL interpolating polynomials ! ------------------------------------------ ! Frequency term (always zero. This is a placeholder for testing) @@ -1342,7 +1509,7 @@ SUBROUTINE Get_Cloud_Opt_MW_TL( CloudScatter_TL, & ! Input CloudScatter TL str csi%wlp, & ! FWD Input f_TL, f_int_TL, & ! TL Input wlp_TL ) ! TL Output - ! Effective radius term + ! size term: effective radius or water content CALL LPoly_TL( csi%r, csi%r_int, & ! FWD Input csi%xlp, & ! FWD Input r_TL, r_int_TL, & ! TL Input @@ -1353,116 +1520,132 @@ SUBROUTINE Get_Cloud_Opt_MW_TL( CloudScatter_TL, & ! Input CloudScatter TL str t_TL, t_int_TL, & ! TL Input ylp_TL ) ! TL Output - ! Perform interpolation based on cloud type ! ----------------------------------------- - SELECT CASE (Cloud_Type) - - ! Only 2-D interpolation of extinction coefficient as a - ! fn. of frequency and temperature for water cloud; i.e. - ! we're only considering Rayleigh scattering here. - CASE (WATER_CLOUD) - ! No TL output when all dimensions - ! are outside LUT bounds - IF ( csi%f_outbound .AND. csi%t_outbound ) THEN - ke_TL = ZERO - RETURN - END IF - j = 1 - z2 => CloudC%ke_L_MW(csi%i1:csi%i2,j,csi%k1:csi%k2) - CALL interp_2D_TL( z2 , csi%wlp, csi%ylp, & ! FWD Input - z2_TL, wlp_TL , ylp_TL , & ! TL Input - ke_TL ) ! TL Output - - ! All 3-D interpolations for rain cloud! - CASE (RAIN_CLOUD) - ! No TL output when all dimensions - ! are outside LUT bounds - IF ( csi%f_outbound .AND. csi%r_outbound .AND. csi%t_outbound ) THEN - ke_TL = ZERO - RETURN - END IF - ! Extinction coefficient - z3 => CloudC%ke_L_MW(csi%i1:csi%i2,csi%j1:csi%j2,csi%k1:csi%k2) - CALL interp_3D_TL( z3 , csi%wlp, csi%xlp, csi%ylp, & ! FWD Input - z3_TL, wlp_TL , xlp_TL , ylp_TL , & ! TL Input - ke_TL ) ! TL Output - ! Single scatter albedo - z3 => CloudC%w_L_MW(csi%i1:csi%i2,csi%j1:csi%j2,csi%k1:csi%k2) - CALL interp_3D_TL( z3 , csi%wlp, csi%xlp, csi%ylp, & ! FWD Input - z3_TL, wlp_TL , xlp_TL , ylp_TL , & ! TL Input - w_TL ) ! TL Output - ! Phase matrix coefficients - IF ( CloudScatter_TL%n_Phase_Elements > 0 .and. CloudScatter_TL%Include_Scattering ) THEN - pcoeff_TL(0,1) = ZERO - DO m = 1, CloudScatter_TL%n_Phase_Elements - DO l = 1, CloudScatter_TL%n_Legendre_Terms - z3 => CloudC%pcoeff_L_MW(csi%i1:csi%i2,csi%j1:csi%j2,csi%k1:csi%k2,l+CloudScatter_TL%lOffset,m) + SELECT CASE (cloud_state) + CASE (LIQUID) + IF(Cloud_Type .EQ. WATER_CLOUD) THEN + ! Only 2-D interpolation of extinction coefficient as a + ! fn. of frequency and temperature for water cloud; i.e. + ! we're only considering Rayleigh scattering here. + ! No TL output when all dimensions + ! are outside LUT bounds + IF ( csi%f_outbound .AND. csi%t_outbound ) THEN + ke_TL = ZERO + kb_TL = ZERO + RETURN + END IF + j = 1 + z2 => CloudC%ke_L_MW(csi%i1:csi%i2,j,csi%k1:csi%k2) + CALL interp_2D_TL( z2 , csi%wlp, csi%ylp, & ! FWD Input + z2_TL, wlp_TL , ylp_TL , & ! TL Input + ke_TL ) ! TL Output + z2 => CloudC%kb_L_MW(csi%i1:csi%i2,j,csi%k1:csi%k2) + CALL interp_2D_TL( z2 , csi%wlp, csi%ylp, & ! FWD Input + z2_TL, wlp_TL , ylp_TL , & ! TL Input + kb_TL ) ! TL Output + ELSE ! Rain_Cloud + ! All 3-D interpolations for rain cloud! + ! No TL output when all dimensions + ! are outside LUT bounds + IF ( csi%f_outbound .AND. csi%r_outbound .AND. csi%t_outbound ) THEN + ke_TL = ZERO + kb_TL = ZERO + RETURN + END IF + ! Extinction coefficient + z3 => CloudC%ke_L_MW(csi%i1:csi%i2,csi%j1:csi%j2,csi%k1:csi%k2) + CALL interp_3D_TL( z3 , csi%wlp, csi%xlp, csi%ylp, & ! FWD Input + z3_TL, wlp_TL , xlp_TL , ylp_TL , & ! TL Input + ke_TL ) ! TL Output + ! Backscatering coefficient + IF ( Is_Active_Sensor .and. CloudScatter_TL%Include_Scattering ) THEN + z3 => CloudC%kb_L_MW(csi%i1:csi%i2,csi%j1:csi%j2,csi%k1:csi%k2) CALL interp_3D_TL( z3 , csi%wlp, csi%xlp, csi%ylp, & ! FWD Input z3_TL, wlp_TL , xlp_TL , ylp_TL , & ! TL Input - pcoeff_TL(l,m) ) ! TL Output - END DO - END DO - ELSE - ! Absorption coefficient - IF( w < ONE ) THEN - ke_TL = ke_TL * (ONE - w) - ke/(ONE -w) * w_TL - ELSE - ke_TL = ZERO - END IF - END IF - - ! No TL interpolation of extinction coefficient as it - ! is only a fn. of frequency for ice cloud - CASE (ICE_CLOUD) - ke_TL = ZERO - - ! The remaining cloud types have 2-D interpolation - ! as a fn. of frequency and radius - CASE DEFAULT - ! No TL output when all dimensions - ! are outside LUT bounds - IF ( csi%f_outbound .AND. csi%r_outbound ) THEN - ke_TL = ZERO - RETURN - END IF - ! Select the LUT temperature - SELECT CASE (Cloud_Type) - CASE (GRAUPEL_CLOUD); k = 2 - CASE (HAIL_CLOUD) ; k = 3 - CASE DEFAULT ; k = 1 - END SELECT - ! Extinction coefficient - z2 => CloudC%ke_S_MW(csi%i1:csi%i2,csi%j1:csi%j2,k) - CALL interp_2D_TL( z2 , csi%wlp, csi%xlp, & ! FWD Input - z2_TL, wlp_TL , xlp_TL , & ! TL Input - ke_TL ) ! TL Output - ! Single scatter albedo - z2 => CloudC%w_S_MW(csi%i1:csi%i2,csi%j1:csi%j2,k) - CALL interp_2D_TL( z2 , csi%wlp, csi%xlp, & ! FWD Input - z2_TL, wlp_TL , xlp_TL , & ! TL Input - w_TL ) ! TL Output - ! Phase matrix coefficients - IF ( CloudScatter_TL%n_Phase_Elements > 0 .and. CloudScatter_TL%Include_Scattering ) THEN - pcoeff_TL(0,1) = ZERO - DO m = 1, CloudScatter_TL%n_Phase_Elements - DO l = 1, CloudScatter_TL%n_Legendre_Terms - z2 => CloudC%pcoeff_S_MW(csi%i1:csi%i2,csi%j1:csi%j2,k,l+CloudScatter_TL%lOffset,m) - CALL interp_2D_TL( z2 , csi%wlp, csi%xlp, & ! FWD Input - z2_TL, wlp_TL , xlp_TL , & ! TL Input - pcoeff_TL(l,m) ) ! TL Output - END DO - END DO - - ELSE - ! Absorption coefficient - IF( w < ONE ) THEN - ke_TL = ke_TL * (ONE - w) - ke/(ONE -w) * w_TL - ELSE - ke_TL = ZERO - END IF + kb_TL ) ! TL Output + END IF + ! Single scatter albedo + z3 => CloudC%w_L_MW(csi%i1:csi%i2,csi%j1:csi%j2,csi%k1:csi%k2) + CALL interp_3D_TL( z3 , csi%wlp, csi%xlp, csi%ylp, & ! FWD Input + z3_TL, wlp_TL , xlp_TL , ylp_TL , & ! TL Input + w_TL ) ! TL Output + ! Phase matrix coefficients + IF ( CloudScatter_TL%n_Phase_Elements > 0 .and. CloudScatter_TL%Include_Scattering ) THEN + pcoeff_TL(0,1) = ZERO + DO m = 1, CloudScatter_TL%n_Phase_Elements + DO l = 1, CloudScatter_TL%n_Legendre_Terms + z3 => CloudC%pcoeff_L_MW(csi%i1:csi%i2,csi%j1:csi%j2,csi%k1:csi%k2,l+CloudScatter_TL%lOffset,m) + CALL interp_3D_TL( z3 , csi%wlp, csi%xlp, csi%ylp, & ! FWD Input + z3_TL, wlp_TL , xlp_TL , ylp_TL , & ! TL Input + pcoeff_TL(l,m) ) ! TL Output + END DO + END DO + ELSE + ! Absorption coefficient + IF( w < ONE ) THEN + ke_TL = ke_TL * (ONE - w) - ke/(ONE -w) * w_TL + ELSE + ke_TL = ZERO + END IF + END IF + END IF ! Cloud_Type + CASE (FROZEN) + IF (Cloud_Type .EQ. ICE_CLOUD) THEN + ! No TL interpolation of extinction coefficient as it + ! is only a fn. of frequency for ice cloud + ke_TL = ZERO + kb_TL = ZERO + ELSE ! All other frozen habits + ! The remaining cloud types have 2-D interpolation + ! as a fn. of frequency and radius + ! No TL output when all dimensions + ! are outside LUT bounds + IF ( csi%f_outbound .AND. csi%r_outbound ) THEN + ke_TL = ZERO + kb_TL = ZERO + RETURN + END IF + + ! Extinction coefficient + z2 => CloudC%ke_S_MW(csi%i1:csi%i2,csi%j1:csi%j2,k) + CALL interp_2D_TL( z2 , csi%wlp, csi%xlp, & ! FWD Input + z2_TL, wlp_TL , xlp_TL , & ! TL Input + ke_TL ) ! TL Output + ! Backscatering coefficient + IF (Is_Active_Sensor .and. CloudScatter_TL%Include_Scattering ) THEN + z2 => CloudC%kb_S_MW(csi%i1:csi%i2,csi%j1:csi%j2,k) + CALL interp_2D_TL( z2 , csi%wlp, csi%xlp, & ! FWD Input + z2_TL, wlp_TL , xlp_TL , & ! TL Input + kb_TL ) ! TL Output + END IF + ! Single scatter albedo + z2 => CloudC%w_S_MW(csi%i1:csi%i2,csi%j1:csi%j2,k) + CALL interp_2D_TL( z2 , csi%wlp, csi%xlp, & ! FWD Input + z2_TL, wlp_TL , xlp_TL , & ! TL Input + w_TL ) ! TL Output + ! Phase matrix coefficients + IF ( CloudScatter_TL%n_Phase_Elements > 0 .and. CloudScatter_TL%Include_Scattering ) THEN + pcoeff_TL(0,1) = ZERO + DO m = 1, CloudScatter_TL%n_Phase_Elements + DO l = 1, CloudScatter_TL%n_Legendre_Terms + z2 => CloudC%pcoeff_S_MW(csi%i1:csi%i2,csi%j1:csi%j2,k,l+CloudScatter_TL%lOffset,m) + CALL interp_2D_TL( z2 , csi%wlp, csi%xlp, & ! FWD Input + z2_TL, wlp_TL , xlp_TL , & ! TL Input + pcoeff_TL(l,m) ) ! TL Output + END DO + END DO + ELSE + ! Absorption coefficient + IF( w < ONE ) THEN + ke_TL = ke_TL * (ONE - w) - ke/(ONE -w) * w_TL + ELSE + ke_TL = ZERO + END IF + END IF END IF END SELECT + NULLIFY(z2, z3) END SUBROUTINE Get_Cloud_Opt_MW_TL @@ -1474,25 +1657,31 @@ END SUBROUTINE Get_Cloud_Opt_MW_TL ! effective radius (Reff_AD), ! temperature (temperature_AD) ! --------------------------------------------- - SUBROUTINE Get_Cloud_Opt_MW_AD(CloudScatter_AD, & ! Input CloudScatter AD structure - cloud_type , & ! Input see CRTM_Cloud_Define.f90 - ke , & ! Input - w , & ! Input - ke_AD , & ! AD Input extinction coefficient (=~ optical depth for 1 mm water content) - w_AD , & ! AD Input single scattering albedo - pcoeff_AD , & ! AD Input spherical Legendre coefficients - Reff_AD , & ! AD Output effective radius (mm) - Temperature_AD , & ! AD Output temperature - csi ) ! Input interpolation data + SUBROUTINE Get_Cloud_Opt_MW_AD(CloudScatter_AD , & ! Input CloudScatter AD structure + cloud_type , & ! Input see CRTM_Cloud_Define.f90 + ke , & ! Input + kb , & ! Input + w , & ! Input + Is_Active_Sensor , & ! Input + ke_AD , & ! AD Input extinction coefficient (=~ optical depth for 1 mm water content) + kb_AD , & ! AD Input Backscatering coefficient + w_AD , & ! AD Input single scattering albedo + pcoeff_AD , & ! AD Input spherical Legendre coefficients + Water_Density_AD , & ! AD Output water content (kg.m^-3) + Reff_AD , & ! AD Output effective radius (mm) + Temperature_AD , & ! AD Output temperature + csi ) ! Input interpolation data ! Arguments TYPE(CRTM_AtmOptics_type), INTENT(IN) :: CloudScatter_AD INTEGER , INTENT(IN) :: Cloud_Type - REAL(fp), INTENT(IN) :: ke, w - REAL(fp), INTENT(IN OUT) :: ke_AD ! AD Input - REAL(fp), INTENT(IN OUT) :: w_AD ! AD Input - REAL(fp), INTENT(IN OUT) :: pcoeff_AD(0:,:) ! AD Input - REAL(fp), INTENT(IN OUT) :: Reff_AD ! AD Output - REAL(fp), INTENT(IN OUT) :: Temperature_AD ! AD Output + REAL(fp), INTENT(IN) :: ke, kb, w + LOGICAL, INTENT(IN) :: Is_Active_Sensor + REAL(fp), INTENT(IN OUT) :: ke_AD, kb_AD ! AD Input + REAL(fp), INTENT(IN OUT) :: w_AD ! AD Input + REAL(fp), INTENT(IN OUT) :: pcoeff_AD(0:,:) ! AD Input + REAL(fp), INTENT(IN OUT) :: Water_Density_AD ! AD Output + REAL(fp), INTENT(IN OUT) :: Reff_AD ! AD Output + REAL(fp), INTENT(IN OUT) :: Temperature_AD ! AD Output TYPE(CSinterp_type), INTENT(IN) :: csi ! Local variables INTEGER :: j, k, l, m @@ -1508,6 +1697,9 @@ SUBROUTINE Get_Cloud_Opt_MW_AD(CloudScatter_AD, & ! Input CloudScatter AD REAL(fp), POINTER :: z2(:,:) REAL(fp), POINTER :: z3(:,:,:) + ! Cloud index and state in CloudCoeff + INTEGER :: cloud_state, cloud_loc + NULLIFY(z2) NULLIFY(z3) ! Setup @@ -1525,182 +1717,220 @@ SUBROUTINE Get_Cloud_Opt_MW_AD(CloudScatter_AD, & ! Input CloudScatter AD CALL Clear_LPoly(xlp_AD) CALL Clear_LPoly(ylp_AD) - - ! Perform interpolation based on cloud type - ! ----------------------------------------- - SELECT CASE (Cloud_Type) + ! If all Reff_MW existed in the CloudCoeff then CloudC%Reff_MW should be greater than zero and + ! will use Reff for interpolation otherwise will use the water content + IF (ALL(CloudC%Reff_MW .GT. ZERO)) THEN + ! Find the index of the given cloud type (k) in CloudCoeff + ! The array index starts from zero but findloc starts from 1 + cloud_loc = FINDLOC(CLOUD_TYPE_MIE_TAMU, Cloud_Type, DIM=1) - 1 + cloud_state = CLOUD_STATE_MIE_TAMU(cloud_loc) + k = CLOUD_INDEX_MIE_TAMU(cloud_loc) + ELSE + ! Find the index of the given cloud type (k) in CloudCoeff + ! The array index starts from zero but findloc starts from 1 + cloud_loc = FINDLOC(CLOUD_TYPE_DDA_ARTS, Cloud_Type, DIM=1) - 1 + cloud_state = CLOUD_STATE_DDA_ARTS(cloud_loc) + k = CLOUD_INDEX_DDA_ARTS(cloud_loc) + END IF - ! Only 2-D interpolation of extinction coefficient as a - ! fn. of frequency and temperature for water cloud; i.e. - ! we're only considering Rayleigh scattering here. - ! ------------------------------------------------------ - CASE (WATER_CLOUD) - ! No AD output when all dimensions - ! are outside LUT bounds - IF ( csi%f_outbound .AND. csi%t_outbound ) THEN - ke_AD = ZERO - w_AD = ZERO - pcoeff_AD = ZERO - RETURN - END IF - ! Perform the AD interpolations - j = 1 - z2 => CloudC%ke_L_MW(csi%i1:csi%i2,j,csi%k1:csi%k2) - CALL interp_2D_AD( z2 , csi%wlp, csi%ylp, & ! FWD Input - ke_AD , & ! AD Input - z2_AD, wlp_AD, ylp_AD ) ! AD Output - ! Compute the AD of the interpolating polynomials - ! Temperature term - CALL LPoly_AD( csi%t, csi%t_int, & ! FWD Input - csi%ylp, & ! FWD Input - ylp_AD, & ! AD Input - t_AD, t_int_AD ) ! AD Output - ! Frequency term (always zero. This is a placeholder for testing) - CALL LPoly_AD( csi%f, csi%f_int, & ! FWD Input - csi%wlp, & ! FWD Input - wlp_AD, & ! AD Input - f_AD, f_int_AD ) ! AD Output - ! The AD outputs - Temperature_AD = Temperature_AD + t_int_AD - - - ! All 3-D interpolations for rain cloud! - ! -------------------------------------- - CASE (RAIN_CLOUD) - ! No AD output when all dimensions - ! are outside LUT bounds - IF ( csi%f_outbound .AND. csi%r_outbound .AND. csi%t_outbound ) THEN - ke_AD = ZERO - w_AD = ZERO - pcoeff_AD = ZERO - RETURN - END IF - ! Perform the AD interpolations - ! Phase matrix coefficients - IF (CloudScatter_AD%n_Phase_Elements > 0 .and. CloudScatter_AD%Include_Scattering ) THEN - DO m = 1, CloudScatter_AD%n_Phase_Elements - DO l = 1, CloudScatter_AD%n_Legendre_Terms - z3 => CloudC%pcoeff_L_MW(csi%i1:csi%i2,csi%j1:csi%j2,csi%k1:csi%k2,l+CloudScatter_AD%lOffset,m) + ! Perform interpolation based on cloud type + ! ----------------------------------------- + SELECT CASE (cloud_state) + CASE (LIQUID) + IF(Cloud_Type .EQ. WATER_CLOUD) THEN + ! Only 2-D interpolation of extinction coefficient as a + ! fn. of frequency and temperature for water cloud; i.e. + ! we're only considering Rayleigh scattering here. + ! ------------------------------------------------------ + ! No AD output when all dimensions + ! are outside LUT bounds + IF ( csi%f_outbound .AND. csi%t_outbound ) THEN + ke_AD = ZERO + kb_AD = ZERO + w_AD = ZERO + pcoeff_AD = ZERO + RETURN + END IF + ! Perform the AD interpolations + j = 1 + z2 => CloudC%ke_L_MW(csi%i1:csi%i2,j,csi%k1:csi%k2) + CALL interp_2D_AD( z2 , csi%wlp, csi%ylp, & ! FWD Input + ke_AD , & ! AD Input + z2_AD, wlp_AD, ylp_AD ) ! AD Output + + IF (Is_Active_Sensor .and. CloudScatter_AD%Include_Scattering ) THEN + z2 => CloudC%kb_L_MW(csi%i1:csi%i2,j,csi%k1:csi%k2) + CALL interp_2D_AD( z2 , csi%wlp, csi%ylp, & ! FWD Input + kb_AD , & ! AD Input + z2_AD, wlp_AD, ylp_AD ) ! AD Output + END IF + ! Compute the AD of the interpolating polynomials + ! Temperature term + CALL LPoly_AD( csi%t, csi%t_int, & ! FWD Input + csi%ylp, & ! FWD Input + ylp_AD, & ! AD Input + t_AD, t_int_AD ) ! AD Output + ! Frequency term (always zero. This is a placeholder for testing) + CALL LPoly_AD( csi%f, csi%f_int, & ! FWD Input + csi%wlp, & ! FWD Input + wlp_AD, & ! AD Input + f_AD, f_int_AD ) ! AD Output + ! The AD outputs + Temperature_AD = Temperature_AD + t_int_AD + ! All 3-D interpolations for rain cloud! + ! -------------------------------------- + ELSE + ! No AD output when all dimensions + ! are outside LUT bounds + IF ( csi%f_outbound .AND. csi%r_outbound .AND. csi%t_outbound ) THEN + ke_AD = ZERO + kb_AD = ZERO + w_AD = ZERO + pcoeff_AD = ZERO + RETURN + END IF + ! Perform the AD interpolations + ! Phase matrix coefficients + IF (CloudScatter_AD%n_Phase_Elements > 0 .and. CloudScatter_AD%Include_Scattering ) THEN + DO m = 1, CloudScatter_AD%n_Phase_Elements + DO l = 1, CloudScatter_AD%n_Legendre_Terms + z3 => CloudC%pcoeff_L_MW(csi%i1:csi%i2,csi%j1:csi%j2,csi%k1:csi%k2,l+CloudScatter_AD%lOffset,m) + CALL interp_3D_AD( z3 , csi%wlp, csi%xlp, csi%ylp, & ! FWD Input + pcoeff_AD(l,m) , & ! AD Input + z3_AD, wlp_AD , xlp_AD , ylp_AD ) ! AD Output + END DO + END DO + pcoeff_AD(0,1) = ZERO + + ELSE + ! Absorption coefficient + IF( w < ONE ) THEN + w_AD = w_AD - ke/(ONE -w) * ke_AD + ke_AD = ke_AD * (ONE - w) + ELSE + ke_AD = ZERO + END IF + END IF + ! Single scatter albedo + z3 => CloudC%w_L_MW(csi%i1:csi%i2,csi%j1:csi%j2,csi%k1:csi%k2) + CALL interp_3D_AD( z3 , csi%wlp, csi%xlp, csi%ylp, & ! FWD Input + w_AD , & ! AD Input + z3_AD, wlp_AD , xlp_AD , ylp_AD ) ! AD Output + ! Extinction coefficient + z3 => CloudC%ke_L_MW(csi%i1:csi%i2,csi%j1:csi%j2,csi%k1:csi%k2) + CALL interp_3D_AD( z3 , csi%wlp, csi%xlp, csi%ylp, & ! FWD Input + ke_AD , & ! AD Input + z3_AD, wlp_AD , xlp_AD , ylp_AD ) ! AD Output + ! Backscatering coefficient + IF (Is_Active_Sensor .and. CloudScatter_AD%Include_Scattering ) THEN + z3 => CloudC%kb_L_MW(csi%i1:csi%i2,csi%j1:csi%j2,csi%k1:csi%k2) CALL interp_3D_AD( z3 , csi%wlp, csi%xlp, csi%ylp, & ! FWD Input - pcoeff_AD(l,m) , & ! AD Input + kb_AD , & ! AD Input z3_AD, wlp_AD , xlp_AD , ylp_AD ) ! AD Output - END DO - END DO - pcoeff_AD(0,1) = ZERO - - ELSE - ! Absorption coefficient - IF( w < ONE ) THEN - w_AD = w_AD - ke/(ONE -w) * ke_AD - ke_AD = ke_AD * (ONE - w) - ELSE - ke_AD = ZERO - END IF + END IF + ! Compute the AD of the interpolating polynomials + ! Temperature term + CALL LPoly_AD( csi%t, csi%t_int, & ! FWD Input + csi%ylp, & ! FWD Input + ylp_AD, & ! AD Input + t_AD, t_int_AD ) ! AD Output + ! Effective radius term + CALL LPoly_AD( csi%r, csi%r_int, & ! FWD Input + csi%xlp, & ! FWD Input + xlp_AD, & ! AD Input + r_AD, r_int_AD ) ! AD Output + ! Frequency term (always zero. This is a placeholder for testing) + CALL LPoly_AD( csi%f, csi%f_int, & ! FWD Input + csi%wlp, & ! FWD Input + wlp_AD, & ! AD Input + f_AD, f_int_AD ) ! AD Output + ! The AD outputs + Temperature_AD = Temperature_AD + t_int_AD + IF (ALL(CloudC%Reff_MW .GT. ZERO)) THEN + Reff_AD = Reff_AD + r_int_AD + ELSE + Water_Density_AD = Water_Density_AD + r_int_AD + END IF END IF - ! Single scatter albedo - z3 => CloudC%w_L_MW(csi%i1:csi%i2,csi%j1:csi%j2,csi%k1:csi%k2) - CALL interp_3D_AD( z3 , csi%wlp, csi%xlp, csi%ylp, & ! FWD Input - w_AD , & ! AD Input - z3_AD, wlp_AD , xlp_AD , ylp_AD ) ! AD Output - ! Extinction coefficient - z3 => CloudC%ke_L_MW(csi%i1:csi%i2,csi%j1:csi%j2,csi%k1:csi%k2) - CALL interp_3D_AD( z3 , csi%wlp, csi%xlp, csi%ylp, & ! FWD Input - ke_AD , & ! AD Input - z3_AD, wlp_AD , xlp_AD , ylp_AD ) ! AD Output - ! Compute the AD of the interpolating polynomials - ! Temperature term - CALL LPoly_AD( csi%t, csi%t_int, & ! FWD Input - csi%ylp, & ! FWD Input - ylp_AD, & ! AD Input - t_AD, t_int_AD ) ! AD Output - ! Effective radius term - CALL LPoly_AD( csi%r, csi%r_int, & ! FWD Input - csi%xlp, & ! FWD Input - xlp_AD, & ! AD Input - r_AD, r_int_AD ) ! AD Output - ! Frequency term (always zero. This is a placeholder for testing) - CALL LPoly_AD( csi%f, csi%f_int, & ! FWD Input - csi%wlp, & ! FWD Input - wlp_AD, & ! AD Input - f_AD, f_int_AD ) ! AD Output - ! The AD outputs - Temperature_AD = Temperature_AD + t_int_AD - Reff_AD = Reff_AD + r_int_AD - - - ! No AD interpolation as it is only a fn. - ! of frequency for ice cloud - ! --------------------------------------- - CASE (ICE_CLOUD) - ke_AD = ZERO - w_AD = ZERO - pcoeff_AD = ZERO - - - ! The remaining cloud types have 2-D interpolation - ! as a fn. of frequency and radius - ! ------------------------------------------------ - CASE DEFAULT - ! No TL output when all dimensions - ! are outside LUT bounds - IF ( csi%f_outbound .AND. csi%r_outbound ) THEN - ke_AD = ZERO - w_AD = ZERO - pcoeff_AD = ZERO - RETURN - END IF - ! Select the LUT temperature - SELECT CASE (Cloud_Type) - CASE (GRAUPEL_CLOUD); k = 2 - CASE (HAIL_CLOUD) ; k = 3 - CASE DEFAULT ; k = 1 - END SELECT - ! Perform the AD interpolations - ! Phase matrix coefficients - IF (CloudScatter_AD%n_Phase_Elements > 0 .and. CloudScatter_AD%Include_Scattering ) THEN - DO m = 1, CloudScatter_AD%n_Phase_Elements - DO l = 1, CloudScatter_AD%n_Legendre_Terms - z2 => CloudC%pcoeff_S_MW(csi%i1:csi%i2,csi%j1:csi%j2,k,l+CloudScatter_AD%lOffset,m) + CASE (FROZEN) + IF (Cloud_Type .EQ. ICE_CLOUD) THEN + ! No AD interpolation as it is only a fn. + ! of frequency for ice cloud + ! --------------------------------------- + ke_AD = ZERO + kb_AD = ZERO + w_AD = ZERO + pcoeff_AD = ZERO + ELSE ! All other frozen habits + ! The remaining cloud types have 2-D interpolation + ! as a fn. of frequency and radius + ! ------------------------------------------------ + ! No TL output when all dimensions + ! are outside LUT bounds + IF ( csi%f_outbound .AND. csi%r_outbound ) THEN + ke_AD = ZERO + kb_AD = ZERO + w_AD = ZERO + pcoeff_AD = ZERO + RETURN + END IF + ! Perform the AD interpolations + ! Phase matrix coefficients + IF (CloudScatter_AD%n_Phase_Elements > 0 .and. CloudScatter_AD%Include_Scattering ) THEN + DO m = 1, CloudScatter_AD%n_Phase_Elements + DO l = 1, CloudScatter_AD%n_Legendre_Terms + z2 => CloudC%pcoeff_S_MW(csi%i1:csi%i2,csi%j1:csi%j2,k,l+CloudScatter_AD%lOffset,m) + CALL interp_2D_AD( z2 , csi%wlp, csi%xlp, & ! FWD Input + pcoeff_AD(l,m) , & ! AD Input + z2_AD, wlp_AD , xlp_AD ) ! AD Output + END DO + END DO + pcoeff_AD(0,1) = ZERO + ELSE + ! Absorption coefficient + IF( w < ONE ) THEN + w_AD = w_AD - ke/(ONE -w) * ke_AD + ke_AD = ke_AD * (ONE - w) + ELSE + ke_AD = ZERO + END IF + END IF + ! Single scatter albedo + z2 => CloudC%w_S_MW(csi%i1:csi%i2,csi%j1:csi%j2,k) + CALL interp_2D_AD( z2 , csi%wlp, csi%xlp, & ! FWD Input + w_AD , & ! AD Input + z2_AD, wlp_AD , xlp_AD ) ! AD Output + ! Extinction coefficient + z2 => CloudC%ke_S_MW(csi%i1:csi%i2,csi%j1:csi%j2,k) + CALL interp_2D_AD( z2 , csi%wlp, csi%xlp, & ! FWD Input + ke_AD , & ! AD Input + z2_AD, wlp_AD , xlp_AD ) ! AD Output + ! Backscatering coefficient + IF ( Is_Active_Sensor .and. CloudScatter_AD%Include_Scattering ) THEN + z2 => CloudC%kb_S_MW(csi%i1:csi%i2,csi%j1:csi%j2,k) CALL interp_2D_AD( z2 , csi%wlp, csi%xlp, & ! FWD Input - pcoeff_AD(l,m) , & ! AD Input + kb_AD , & ! AD Input z2_AD, wlp_AD , xlp_AD ) ! AD Output - END DO - END DO - pcoeff_AD(0,1) = ZERO - ELSE - ! Absorption coefficient - IF( w < ONE ) THEN - w_AD = w_AD - ke/(ONE -w) * ke_AD - ke_AD = ke_AD * (ONE - w) - ELSE - ke_AD = ZERO - END IF - - END IF - ! Single scatter albedo - z2 => CloudC%w_S_MW(csi%i1:csi%i2,csi%j1:csi%j2,k) - CALL interp_2D_AD( z2 , csi%wlp, csi%xlp, & ! FWD Input - w_AD , & ! AD Input - z2_AD, wlp_AD , xlp_AD ) ! AD Output - ! Extinction coefficient - z2 => CloudC%ke_S_MW(csi%i1:csi%i2,csi%j1:csi%j2,k) - CALL interp_2D_AD( z2 , csi%wlp, csi%xlp, & ! FWD Input - ke_AD , & ! AD Input - z2_AD, wlp_AD , xlp_AD ) ! AD Output - ! Compute the AD of the interpolating polynomials - ! Effective radius term - CALL LPoly_AD( csi%r, csi%r_int, & ! FWD Input - csi%xlp, & ! FWD Input - xlp_AD, & ! AD Input - r_AD, r_int_AD ) ! AD Output - ! Frequency term (always zero. This is a placeholder for testing) - CALL LPoly_AD( csi%f, csi%f_int, & ! FWD Input - csi%wlp, & ! FWD Input - wlp_AD, & ! AD Input - f_AD, f_int_AD ) ! AD Output - ! The AD outputs - Reff_AD = Reff_AD + r_int_AD + END IF + ! Compute the AD of the interpolating polynomials + ! Effective radius term + CALL LPoly_AD( csi%r, csi%r_int, & ! FWD Input + csi%xlp, & ! FWD Input + xlp_AD, & ! AD Input + r_AD, r_int_AD ) ! AD Output + ! Frequency term (always zero. This is a placeholder for testing) + CALL LPoly_AD( csi%f, csi%f_int, & ! FWD Input + csi%wlp, & ! FWD Input + wlp_AD, & ! AD Input + f_AD, f_int_AD ) ! AD Output + ! The AD outputs + IF (ALL(CloudC%Reff_MW .GT. ZERO)) THEN + Reff_AD = Reff_AD + r_int_AD + ELSE + Water_Density_AD = Water_Density_AD + r_int_AD + END IF + END IF ! Cloud_Type END SELECT NULLIFY(z2, z3) diff --git a/src/AtmScatter/CloudScatter/CSvar_Define.f90 b/src/AtmScatter/CloudScatter/CSvar_Define.f90 index 88c018f..da1961e 100644 --- a/src/AtmScatter/CloudScatter/CSvar_Define.f90 +++ b/src/AtmScatter/CloudScatter/CSvar_Define.f90 @@ -120,6 +120,7 @@ MODULE CSvar_Define TYPE(CSinterp_type), ALLOCATABLE :: csi(:,:) ! I3 x I4 ! The interpolation results REAL(fp), ALLOCATABLE :: ke(:,:) ! I3 x I4 Mass extinction coefficient + REAL(fp), ALLOCATABLE :: kb(:,:) ! I3 x I4 Mass backscattering coefficient REAL(fp), ALLOCATABLE :: w(:,:) ! I3 x I4 Single Scatter Albedo REAL(fp), ALLOCATABLE :: g(:,:) ! I3 x I4 Asymmetry factor REAL(fp), ALLOCATABLE :: pcoeff(:,:,:,:) ! 0:I1 x I2 x I3 x I4 Phase coefficients @@ -180,6 +181,7 @@ ELEMENTAL SUBROUTINE CSvar_Create( & ! Perform the allocation ALLOCATE( self%csi(n_Layers, n_Clouds), & self%ke(n_Layers, n_Clouds), & + self%kb(n_Layers, n_Clouds), & self%w(n_Layers, n_Clouds), & self%g(n_Layers, n_Clouds), & self%pcoeff(0:n_Legendre_Terms,n_Phase_Elements,n_Layers, n_Clouds), & @@ -220,6 +222,11 @@ SUBROUTINE CSvar_Inspect( self) WRITE(*,'(5x,"ke Cloud index #",i0)') i4 WRITE(*,'(5(1x,es22.15,:))') self%ke(:,i4) END DO + WRITE(*,'(3x,"Mass backscattering coefficient (kb) :")') + DO i4 = 1, self%n_Clouds + WRITE(*,'(5x,"kb Cloud index #",i0)') i4 + WRITE(*,'(5(1x,es22.15,:))') self%kb(:,i4) + END DO WRITE(*,'(3x,"Single scatter albedo (w) :")') DO i4 = 1, self%n_Clouds WRITE(*,'(5x,"w Cloud index #",i0)') i4 @@ -563,6 +570,13 @@ FUNCTION CSvar_ReadFile( & msg = 'Error reading mass extinction coefficient - '//TRIM(io_msg) CALL Read_Cleanup(); RETURN END IF + ! ...Mass extinction coefficient + READ( fid, IOSTAT=io_stat, IOMSG=io_msg ) & + CSvar%kb + IF ( io_stat /= 0 ) THEN + msg = 'Error reading backscattering coefficient - '//TRIM(io_msg) + CALL Read_Cleanup(); RETURN + END IF ! ...Single scatter albedo READ( fid, IOSTAT=io_stat, IOMSG=io_msg ) & CSvar%w @@ -738,6 +752,13 @@ FUNCTION CSvar_WriteFile( & msg = 'Error writing mass extinction coefficient - '//TRIM(io_msg) CALL Write_Cleanup(); RETURN END IF + ! ...Mass backscattering coefficient + WRITE( fid, IOSTAT=io_stat, IOMSG=io_msg ) & + CSvar%kb + IF ( io_stat /= 0 ) THEN + msg = 'Error writing mass backscattering coefficient - '//TRIM(io_msg) + CALL Write_Cleanup(); RETURN + END IF ! ...Single scatter albedo WRITE( fid, IOSTAT=io_stat, IOMSG=io_msg ) & CSvar%w @@ -829,6 +850,7 @@ ELEMENTAL FUNCTION CSvar_Equal( x, y ) RESULT( is_equal ) (x%n_Clouds /= y%n_Clouds ) ) RETURN ! ...Arrays IF ( ALL(x%ke .EqualTo. y%ke ) .AND. & + ALL(x%kb .EqualTo. y%kb ) .AND. & ALL(x%w .EqualTo. y%w ) .AND. & ALL(x%g .EqualTo. y%g ) .AND. & ALL(x%pcoeff .EqualTo. y%pcoeff ) .AND. & diff --git a/src/Atmosphere/CRTM_Atmosphere.f90 b/src/Atmosphere/CRTM_Atmosphere.f90 index 5c18ef0..4951161 100644 --- a/src/Atmosphere/CRTM_Atmosphere.f90 +++ b/src/Atmosphere/CRTM_Atmosphere.f90 @@ -8,6 +8,11 @@ ! Written by: Paul van Delst, 29-Oct-2007 ! paul.vandelst@noaa.gov ! +! Isaac Moradi isaac.moradi@nasa.gov +! 30-Nov-2021 +! Modified the code to avoid adding layers when +! Add_Extra_Layers is set to .FALSE. +! MODULE CRTM_Atmosphere @@ -261,6 +266,12 @@ FUNCTION CRTM_Atmosphere_AddLayers( & err_stat = SUCCESS + IF (.NOT. Atm_In%Add_Extra_Layers) THEN + ! This will just copy Atm_In to Atm_Out + Atm_Out = CRTM_Atmosphere_AddLayerCopy(Atm_In, 0) + RETURN + END IF + ! If extra layers are NOT needed, ! then simply copy the structure IF ( Atm_In%Level_Pressure(0) <= TOA_PRESSURE) THEN @@ -371,6 +382,7 @@ FUNCTION CRTM_Atmosphere_AddLayers( & Atm_Out%Cloud(i)%Effective_Radius(1:n) = ZERO Atm_Out%Cloud(i)%Effective_Variance(1:n) = ZERO Atm_Out%Cloud(i)%Water_Content(1:n) = ZERO + Atm_Out%Cloud(i)%Water_Density(1:n) = ZERO END DO END IF ! ...Aerosols @@ -460,6 +472,11 @@ FUNCTION CRTM_Atmosphere_AddLayers_TL( & ! Set up err_stat = SUCCESS + IF (.NOT. Atm_In%Add_Extra_Layers) THEN + ! This will just copy Atm_In_TL to Atm_Out_TL + atm_out_TL = CRTM_Atmosphere_AddLayerCopy( Atm_In_TL, 0 ) + RETURN + END IF ! If extra layers are NOT needed, ! then simply copy the structure @@ -570,14 +587,14 @@ FUNCTION CRTM_Atmosphere_AddLayers_AD( & ! Set up err_stat = SUCCESS - ! If extra layers are NOT needed, then simply perform ! the adjoint sum. Remember the TL form is ! Atm_Out_TL = Atm_In_TL ! so the adjoint form is ! Atm_In_AD = Atm_In_AD + Atm_Out_AD ! Atm_Out_AD = ZERO - IF ( Atm_In%Level_Pressure(0) <= TOA_PRESSURE) THEN + IF (( Atm_In%Level_Pressure(0) <= TOA_PRESSURE) .OR. & + (.NOT. Atm_In%Add_Extra_Layers )) THEN Atm_In_AD = Atm_In_AD + Atm_Out_AD CALL CRTM_Atmosphere_Zero( Atm_Out_AD ) RETURN @@ -613,6 +630,8 @@ FUNCTION CRTM_Atmosphere_AddLayers_AD( & DO i = 1, Atm_In_AD%n_Clouds Atm_In_AD%Cloud(i)%Water_Content(1:no) = Atm_In_AD%Cloud(i)%Water_Content(1:no) + & Atm_Out_AD%Cloud(i)%Water_Content(n+1:nt) + Atm_In_AD%Cloud(i)%Water_Density(1:no) = Atm_In_AD%Cloud(i)%Water_Density(1:no) + & + Atm_Out_AD%Cloud(i)%Water_Density(n+1:nt) Atm_In_AD%Cloud(i)%Effective_Variance(1:no) = Atm_In_AD%Cloud(i)%Effective_Variance(1:no) + & Atm_Out_AD%Cloud(i)%Effective_Variance(n+1:nt) Atm_In_AD%Cloud(i)%Effective_Radius(1:no) = Atm_In_AD%Cloud(i)%Effective_Radius(1:no) + & diff --git a/src/Atmosphere/CRTM_Atmosphere_Define.f90 b/src/Atmosphere/CRTM_Atmosphere_Define.f90 index b1e2b7d..bfc508d 100644 --- a/src/Atmosphere/CRTM_Atmosphere_Define.f90 +++ b/src/Atmosphere/CRTM_Atmosphere_Define.f90 @@ -11,10 +11,21 @@ ! Modified by Yingtao Ma, 2020/6/11 ! yingtao.ma@noaa.gov ! Implemented CMAQ aerosol +! +! Modified by: Isaac Moradi isaac.moradi@nasa.gov +! 24-Sept-2021 +! Several new variables were added to later simpify the interpolation +! of cloud optical properties +! +! Isaac Moradi isaac.moradi@nasa.gov +! 30-Nov-2021 +! Added Add_Extra_Layers with default value set to .TRUE. +! ! Modified by: Cheng Dang, 17-Aug-2022 ! dangch@ucar.edu ! Add relative humidity calculation ! + MODULE CRTM_Atmosphere_Define ! ----------------- @@ -41,8 +52,40 @@ MODULE CRTM_Atmosphere_Define SNOW_CLOUD, & GRAUPEL_CLOUD, & HAIL_CLOUD, & + PlateType1 , & + ColumnType1 , & + SixBulletRosette, & + Perpendicular4_BulletRosette, & + Flat3_BulletRosette, & + IconCloudIce, & + SectorSnowflake, & + EvansSnowAggregate, & + EightColumnAggregate, & + LargePlateAggregate, & + LargeColumnAggregate, & + LargeBlockAggregate, & + IconSnow, & + IconHail, & + GemGraupel, & + GemSnow, & + GemHail, & + IceSphere, & + LiquidSphere, & CLOUD_CATEGORY_NAME, & CRTM_Cloud_type, & + ! Parameters used for simplifying interpolation + ! of cloud optical properties + CLOUD_TYPE_MIE_TAMU, & + CLOUD_INDEX_MIE_TAMU, & + CLOUD_STATE_MIE_TAMU, & + CLOUD_TYPE_DDA_ARTS, & + CLOUD_INDEX_DDA_ARTS, & + CLOUD_STATE_DDA_ARTS, & + N_VALID_CLOUDS_MIE_TAMU, & + N_VALID_CLOUDS_DDA_ARTS, & + LIQUID, & + FROZEN, & + ! ------------------------------------ OPERATOR(==), & OPERATOR(+), & OPERATOR(-), & @@ -108,7 +151,42 @@ MODULE CRTM_Atmosphere_Define PUBLIC :: SNOW_CLOUD PUBLIC :: GRAUPEL_CLOUD PUBLIC :: HAIL_CLOUD + PUBLIC :: PlateType1 + PUBLIC :: ColumnType1 + PUBLIC :: SixBulletRosette + PUBLIC :: Perpendicular4_BulletRosette + PUBLIC :: Flat3_BulletRosette + PUBLIC :: IconCloudIce + PUBLIC :: SectorSnowflake + PUBLIC :: EvansSnowAggregate + PUBLIC :: EightColumnAggregate + PUBLIC :: LargePlateAggregate + PUBLIC :: LargeColumnAggregate + PUBLIC :: LargeBlockAggregate + PUBLIC :: IconSnow + PUBLIC :: IconHail + PUBLIC :: GemGraupel + PUBLIC :: GemSnow + PUBLIC :: GemHail + PUBLIC :: IceSphere + PUBLIC :: LiquidSphere + PUBLIC :: CLOUD_CATEGORY_NAME + + ! Cloud Lists used for simplifying the interpoaltion + PUBLIC :: CLOUD_TYPE_MIE_TAMU + PUBLIC :: CLOUD_INDEX_MIE_TAMU + PUBLIC :: CLOUD_STATE_MIE_TAMU + PUBLIC :: CLOUD_TYPE_DDA_ARTS + PUBLIC :: CLOUD_INDEX_DDA_ARTS + PUBLIC :: CLOUD_STATE_DDA_ARTS + + PUBLIC :: N_VALID_CLOUDS_MIE_TAMU + PUBLIC :: N_VALID_CLOUDS_DDA_ARTS + + PUBLIC :: LIQUID + PUBLIC :: FROZEN + ! ...Structures PUBLIC :: CRTM_Cloud_type ! ...Procedures @@ -353,6 +431,7 @@ MODULE CRTM_Atmosphere_Define TYPE :: CRTM_Atmosphere_type ! Allocation indicator LOGICAL :: Is_Allocated = .FALSE. + LOGICAL :: Add_Extra_Layers = .TRUE. ! Dimension values INTEGER :: Max_Layers = 0 ! K dimension INTEGER :: n_Layers = 0 ! Kuse dimension @@ -370,6 +449,7 @@ MODULE CRTM_Atmosphere_Define INTEGER, ALLOCATABLE :: Absorber_Units(:) ! J ! Profile LEVEL and LAYER quantities REAL(fp), ALLOCATABLE :: Level_Pressure(:) ! 0:K + REAL(fp), ALLOCATABLE :: Height(:) ! 0:K in km REAL(fp), ALLOCATABLE :: Pressure(:) ! K REAL(fp), ALLOCATABLE :: Temperature(:) ! K REAL(fp), ALLOCATABLE :: Absorber(:,:) ! K x J @@ -550,6 +630,7 @@ ELEMENTAL SUBROUTINE CRTM_Atmosphere_Create( & ALLOCATE( Atm%Absorber_ID( n_Absorbers ), & Atm%Absorber_Units( n_Absorbers ), & Atm%Level_Pressure( 0:n_Layers ), & + Atm%Height( 0:n_Layers ), & Atm%Pressure( n_Layers ), & Atm%Temperature( n_Layers ), & Atm%Relative_Humidity ( n_Layers ), & @@ -596,6 +677,7 @@ ELEMENTAL SUBROUTINE CRTM_Atmosphere_Create( & Atm%Absorber_ID = INVALID_ABSORBER_ID Atm%Absorber_Units = INVALID_ABSORBER_UNITS Atm%Level_Pressure = ZERO + Atm%Height = ZERO Atm%Pressure = ZERO Atm%Temperature = ZERO Atm%Relative_Humidity = ZERO @@ -681,6 +763,7 @@ ELEMENTAL FUNCTION CRTM_Atmosphere_AddLayerCopy( & no = atm%n_Layers nt = atm_out%n_Layers atm_out%Level_Pressure(na:nt) = atm%Level_Pressure(0:no) + atm_out%Height(na:nt) = atm%Height(0:no) atm_out%Pressure(na+1:nt) = atm%Pressure(1:no) atm_out%Temperature(na+1:nt) = atm%Temperature(1:no) atm_out%Relative_Humidity(na+1:nt) = atm%Relative_Humidity(1:no) @@ -799,6 +882,7 @@ ELEMENTAL SUBROUTINE CRTM_Atmosphere_Zero( Atmosphere ) ! Zero out the data Atmosphere%Level_Pressure = ZERO Atmosphere%Pressure = ZERO + Atmosphere%Height = ZERO Atmosphere%Temperature = ZERO Atmosphere%Relative_Humidity = ZERO Atmosphere%Absorber = ZERO @@ -1030,6 +1114,8 @@ SUBROUTINE Scalar_Inspect( Atm, Unit ) k = Atm%n_Layers WRITE(fid, '(3x,"Level pressure:")') WRITE(fid, '(5(1x,es22.15,:))') Atm%Level_Pressure(0:k) + WRITE(fid, '(3x,"Height [km]:")') + WRITE(fid, '(5(1x,es22.15,:))') Atm%Height(0:k) WRITE(fid, '(3x,"Layer pressure:")') WRITE(fid, '(5(1x,es22.15,:))') Atm%Pressure(1:k) WRITE(fid, '(3x,"Layer temperature:")') @@ -1157,6 +1243,7 @@ ELEMENTAL FUNCTION CRTM_Atmosphere_Compare( & ANY(x%Absorber_Units(1:j) /= y%Absorber_Units(1:j)) ) RETURN ! ...Floating point arrays IF ( (.NOT. ALL(Compares_Within_Tolerance(x%Level_Pressure ,y%Level_Pressure ,n))) .OR. & + (.NOT. ALL(Compares_Within_Tolerance(x%Height ,y%Height ,n))) .OR. & (.NOT. ALL(Compares_Within_Tolerance(x%Pressure ,y%Pressure ,n))) .OR. & (.NOT. ALL(Compares_Within_Tolerance(x%Temperature ,y%Temperature ,n))) .OR. & (.NOT. ALL(Compares_Within_Tolerance(x%Relative_Humidity ,y%Relative_Humidity ,n))) .OR. & diff --git a/src/Atmosphere/Cloud/CRTM_Cloud_Define.f90 b/src/Atmosphere/Cloud/CRTM_Cloud_Define.f90 index aaec907..5ffc601 100644 --- a/src/Atmosphere/Cloud/CRTM_Cloud_Define.f90 +++ b/src/Atmosphere/Cloud/CRTM_Cloud_Define.f90 @@ -11,6 +11,11 @@ ! Paul van Delst, paul.vandelst@noaa.gov ! 20-Feb-2004 ! +! Modified by: Isaac Moradi isaac.moradi@nasa.gov +! 24-Sept-2021 +! Several new variables were added to later simpify the interpolation +! of cloud optical properties +! MODULE CRTM_Cloud_Define @@ -40,15 +45,50 @@ MODULE CRTM_Cloud_Define ! Everything private by default PRIVATE ! Cloud Parameters - PUBLIC :: N_VALID_CLOUD_CATEGORIES - PUBLIC :: INVALID_CLOUD - PUBLIC :: WATER_CLOUD - PUBLIC :: ICE_CLOUD - PUBLIC :: RAIN_CLOUD - PUBLIC :: SNOW_CLOUD - PUBLIC :: GRAUPEL_CLOUD - PUBLIC :: HAIL_CLOUD PUBLIC :: CLOUD_CATEGORY_NAME + PUBLIC :: N_VALID_CLOUD_CATEGORIES + PUBLIC :: INVALID_CLOUD ! 0 + PUBLIC :: WATER_CLOUD ! -99 + PUBLIC :: RAIN_CLOUD ! -99 + PUBLIC :: ICE_CLOUD ! + PUBLIC :: SNOW_CLOUD ! + PUBLIC :: GRAUPEL_CLOUD ! + PUBLIC :: HAIL_CLOUD ! + PUBLIC :: PlateType1 ! 1 + PUBLIC :: ColumnType1 ! 2 + PUBLIC :: SixBulletRosette ! 3 + PUBLIC :: Perpendicular4_BulletRosette ! 4 + PUBLIC :: Flat3_BulletRosette ! 5 + PUBLIC :: IconCloudIce ! 6 + PUBLIC :: SectorSnowflake ! 7 + PUBLIC :: EvansSnowAggregate ! 8 + PUBLIC :: EightColumnAggregate ! 9 + PUBLIC :: LargePlateAggregate ! 10 + PUBLIC :: LargeColumnAggregate ! 11 + PUBLIC :: LargeBlockAggregate ! 12 + PUBLIC :: IconSnow ! 13 + PUBLIC :: IconHail ! 14 + PUBLIC :: GemGraupel ! 15 + PUBLIC :: GemSnow ! 16 + PUBLIC :: GemHail ! 17 + PUBLIC :: IceSphere ! 18 + PUBLIC :: LiquidSphere ! 19 + + + ! Cloud Lists used for simplifying the interpoaltion + PUBLIC :: CLOUD_TYPE_MIE_TAMU + PUBLIC :: CLOUD_INDEX_MIE_TAMU + PUBLIC :: CLOUD_STATE_MIE_TAMU + PUBLIC :: CLOUD_TYPE_DDA_ARTS + PUBLIC :: CLOUD_INDEX_DDA_ARTS + PUBLIC :: CLOUD_STATE_DDA_ARTS + + PUBLIC :: N_VALID_CLOUDS_MIE_TAMU + PUBLIC :: N_VALID_CLOUDS_DDA_ARTS + + PUBLIC :: LIQUID + PUBLIC :: FROZEN + ! Datatypes PUBLIC :: CRTM_Cloud_type ! Operators @@ -104,7 +144,8 @@ MODULE CRTM_Cloud_Define ! Module parameters ! ----------------- ! The valid cloud categories and names - INTEGER, PARAMETER :: N_VALID_CLOUD_CATEGORIES = 6 + INTEGER, PARAMETER :: N_VALID_CLOUD_CATEGORIES = 6 + 19 ! This is the max cloud cat + INTEGER, PARAMETER :: N_DEFAULT_CLOUDS = 6 INTEGER, PARAMETER :: INVALID_CLOUD = 0 INTEGER, PARAMETER :: WATER_CLOUD = 1 INTEGER, PARAMETER :: ICE_CLOUD = 2 @@ -112,6 +153,28 @@ MODULE CRTM_Cloud_Define INTEGER, PARAMETER :: SNOW_CLOUD = 4 INTEGER, PARAMETER :: GRAUPEL_CLOUD = 5 INTEGER, PARAMETER :: HAIL_CLOUD = 6 + ! Non default Chalmers DDA clouds - need to be specified by name + ! The number actually shows the index for cloud type in the CloudCoef file + INTEGER, PARAMETER :: PlateType1 = N_DEFAULT_CLOUDS + 1 ! 1 + INTEGER, PARAMETER :: ColumnType1 = N_DEFAULT_CLOUDS + 2 ! 2 + INTEGER, PARAMETER :: SixBulletRosette = N_DEFAULT_CLOUDS + 3 ! 3 + INTEGER, PARAMETER :: Perpendicular4_BulletRosette = N_DEFAULT_CLOUDS + 4 ! 4 + INTEGER, PARAMETER :: Flat3_BulletRosette = N_DEFAULT_CLOUDS + 5 ! 5 + INTEGER, PARAMETER :: IconCloudIce = N_DEFAULT_CLOUDS + 6 ! 6 + INTEGER, PARAMETER :: SectorSnowflake = N_DEFAULT_CLOUDS + 7 ! 7 + INTEGER, PARAMETER :: EvansSnowAggregate = N_DEFAULT_CLOUDS + 8 ! 8 + INTEGER, PARAMETER :: EightColumnAggregate = N_DEFAULT_CLOUDS + 9 ! 9 + INTEGER, PARAMETER :: LargePlateAggregate = N_DEFAULT_CLOUDS + 10 ! 10 + INTEGER, PARAMETER :: LargeColumnAggregate = N_DEFAULT_CLOUDS + 11 ! 11 + INTEGER, PARAMETER :: LargeBlockAggregate = N_DEFAULT_CLOUDS + 12 ! 12 + INTEGER, PARAMETER :: IconSnow = N_DEFAULT_CLOUDS + 13 ! 13 + INTEGER, PARAMETER :: IconHail = N_DEFAULT_CLOUDS + 14 ! 14 + INTEGER, PARAMETER :: GemGraupel = N_DEFAULT_CLOUDS + 15 ! 15 + INTEGER, PARAMETER :: GemSnow = N_DEFAULT_CLOUDS + 16 ! 16 + INTEGER, PARAMETER :: GemHail = N_DEFAULT_CLOUDS + 17 ! 17 + INTEGER, PARAMETER :: IceSphere = N_DEFAULT_CLOUDS + 18 ! 18 + INTEGER, PARAMETER :: LiquidSphere = N_DEFAULT_CLOUDS + 19 ! 19 + INTEGER, PARAMETER :: CLOUD_CATEGORY_LIST(0:N_VALID_CLOUD_CATEGORIES) = & [ INVALID_CLOUD, & WATER_CLOUD, & @@ -119,15 +182,103 @@ MODULE CRTM_Cloud_Define RAIN_CLOUD, & SNOW_CLOUD, & GRAUPEL_CLOUD, & - HAIL_CLOUD ] + HAIL_CLOUD, & + ICE_CLOUD, & + ICE_CLOUD, & + ICE_CLOUD, & + ICE_CLOUD, & + ICE_CLOUD, & + ICE_CLOUD, & + SNOW_CLOUD, & + SNOW_CLOUD, & + ICE_CLOUD, & + ICE_CLOUD, & + ICE_CLOUD, & + ICE_CLOUD, & + SNOW_CLOUD, & + HAIL_CLOUD, & + GRAUPEL_CLOUD, & + SNOW_CLOUD, & + HAIL_CLOUD, & + ICE_CLOUD, & + WATER_CLOUD & + ] CHARACTER(*), PARAMETER :: CLOUD_CATEGORY_NAME(0:N_VALID_CLOUD_CATEGORIES) = & - [ 'Invalid', & - 'Water ', & - 'Ice ', & - 'Rain ', & - 'Snow ', & - 'Graupel', & - 'Hail ' ] + [ 'Invalid ', & + 'Water ', & + 'Ice ', & + 'Rain ', & + 'Snow ', & + 'Graupel ', & + 'Hail ', & + 'PlateType1 ', & + 'ColumnType1 ', & + 'SixBulletRosette ', & + 'Perpendicular4_BulletRosette', & + 'Flat3_BulletRosette ', & + 'IconCloudIce ', & + 'SectorSnowflake ', & + 'EvansSnowAggregate ', & + 'EightColumnAggregate ', & + 'LargePlateAggregate ', & + 'LargeColumnAggregate ', & + 'LargeBlockAggregate ', & + 'IconSnow ', & + 'IconHail ', & + 'GemGraupel ', & + 'GemSnow ', & + 'GemHail ', & + 'IceSphere ', & + 'LiquidSphere ' & + ] + + ! Clouds type, status, and index in the cloud coefficients + ! Added to simplify and clean the interpolation of cloud optical properties + ! Isaac Moradi, Sept-24-2021 + INTEGER, PARAMETER :: LIQUID = 0 + INTEGER, PARAMETER :: FROZEN = 1 + INTEGER, PARAMETER :: N_VALID_CLOUDS_MIE_TAMU = 6 + INTEGER, PARAMETER :: N_VALID_CLOUDS_DDA_ARTS = N_DEFAULT_CLOUDS + 19 ! 6 default plus 19 DDA + + INTEGER, PARAMETER :: CLOUD_TYPE_MIE_TAMU(0:N_VALID_CLOUDS_MIE_TAMU) = & + [INVALID_CLOUD, WATER_CLOUD, RAIN_CLOUD, SNOW_CLOUD, GRAUPEL_CLOUD, ICE_CLOUD, HAIL_CLOUD ] + + INTEGER, PARAMETER :: CLOUD_INDEX_MIE_TAMU(0:N_VALID_CLOUDS_MIE_TAMU) = & + [ 0, -99, -99, 1, 2, 3, 3 ] + + INTEGER, PARAMETER :: CLOUD_STATE_MIE_TAMU(0:N_VALID_CLOUDS_MIE_TAMU) = & + [ INVALID_CLOUD, LIQUID, LIQUID, FROZEN, FROZEN, FROZEN, FROZEN ] + + INTEGER, PARAMETER :: CLOUD_TYPE_DDA_ARTS(0:N_VALID_CLOUDS_DDA_ARTS) = & + [INVALID_CLOUD, & + ! Default clouds + WATER_CLOUD, RAIN_CLOUD, SNOW_CLOUD, GRAUPEL_CLOUD, ICE_CLOUD, HAIL_CLOUD, & + ! Non-default from the Chalmers DDA + PlateType1, ColumnType1, SixBulletRosette, Perpendicular4_BulletRosette, & + Flat3_BulletRosette, IconCloudIce, SectorSnowflake, EvansSnowAggregate, & + EightColumnAggregate, LargePlateAggregate, LargeColumnAggregate, & + LargeBlockAggregate, IconSnow, IconHail, GemGraupel, GemSnow, GemHail, & + IceSphere, LiquidSphere] + + ! Indices of different clouds in the CloudCoef solid phase (*_S_*) parameters + INTEGER, PARAMETER :: CLOUD_INDEX_DDA_ARTS(0:N_VALID_CLOUDS_DDA_ARTS) = & + [ 0, & + ! Default clouds - Note that GemSnow, GemGraupel, IceSphere, and GemHail are used + ! for default and once can change the defaults by changing the faollowing line + -99, -99, 7, 15, 18, 17, & + ! Non default clouds + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, -99 ] + + INTEGER, PARAMETER :: CLOUD_STATE_DDA_ARTS(0:N_VALID_CLOUDS_DDA_ARTS) = & + [ INVALID_CLOUD, & + ! Default clouds + LIQUID, LIQUID, FROZEN, FROZEN, FROZEN, FROZEN, & + ! DDA + FROZEN, FROZEN, FROZEN, FROZEN, FROZEN, FROZEN, & + FROZEN, FROZEN, FROZEN, FROZEN, FROZEN, FROZEN, & + FROZEN, FROZEN, FROZEN, FROZEN, FROZEN, FROZEN, & + LIQUID] + ! Literal constants REAL(fp), PARAMETER :: ZERO = 0.0_fp REAL(fp), PARAMETER :: ONE = 1.0_fp @@ -155,6 +306,7 @@ MODULE CRTM_Cloud_Define REAL(fp), ALLOCATABLE :: Effective_Radius(:) ! K. Units are microns REAL(fp), ALLOCATABLE :: Effective_Variance(:) ! K. Units are microns^2 REAL(fp), ALLOCATABLE :: Water_Content(:) ! K. Units are kg/m^2 + REAL(fp), ALLOCATABLE :: Water_Density(:) ! K. Units are kg/m^3 END TYPE CRTM_Cloud_type !:tdoc-: @@ -316,6 +468,7 @@ ELEMENTAL SUBROUTINE CRTM_Cloud_Create( Cloud, n_Layers ) ALLOCATE( Cloud%Effective_Radius( n_Layers ), & Cloud%Effective_Variance( n_Layers ), & Cloud%Water_Content( n_Layers ), & + Cloud%Water_Density( n_Layers ), & STAT = alloc_stat ) IF ( alloc_stat /= 0 ) RETURN @@ -327,7 +480,7 @@ ELEMENTAL SUBROUTINE CRTM_Cloud_Create( Cloud, n_Layers ) Cloud%Effective_Radius = ZERO Cloud%Effective_Variance = ZERO Cloud%Water_Content = ZERO - + Cloud%Water_Density = ZERO ! Set allocation indicator Cloud%Is_Allocated = .TRUE. @@ -403,6 +556,7 @@ ELEMENTAL FUNCTION CRTM_Cloud_AddLayerCopy( & cld_out%Effective_Radius(na+1:nt) = cld%Effective_Radius(1:no) cld_out%Effective_Variance(na+1:nt) = cld%Effective_Variance(1:no) cld_out%Water_Content(na+1:nt) = cld%Water_Content(1:no) + cld_out%Water_Density(na+1:nt) = cld%Water_Density(1:no) END FUNCTION CRTM_Cloud_AddLayerCopy @@ -442,6 +596,7 @@ ELEMENTAL SUBROUTINE CRTM_Cloud_Zero( Cloud ) Cloud%Effective_Radius = ZERO Cloud%Effective_Variance = ZERO Cloud%Water_Content = ZERO + Cloud%Water_Density = ZERO END SUBROUTINE CRTM_Cloud_Zero @@ -530,6 +685,11 @@ FUNCTION CRTM_Cloud_IsValid( Cloud ) RESULT( IsValid ) CALL Display_Message( ROUTINE_NAME, TRIM(msg), INFORMATION ) IsValid = .FALSE. ENDIF + IF ( ANY(Cloud%Water_Density < ZERO ) ) THEN + msg = 'Negative cloud water density found' + CALL Display_Message( ROUTINE_NAME, TRIM(msg), INFORMATION ) + IsValid = .FALSE. + ENDIF END FUNCTION CRTM_Cloud_IsValid @@ -587,6 +747,7 @@ SUBROUTINE Scalar_Inspect( Cloud, Unit ) WRITE(fid,'(5(1x,es22.15,:))') Cloud%Effective_Radius WRITE(fid,'(3x,"Water content:")') WRITE(fid,'(5(1x,es22.15,:))') Cloud%Water_Content + WRITE(fid,'(5(1x,es22.15,:))') Cloud%Water_Density END SUBROUTINE Scalar_Inspect SUBROUTINE Rank1_Inspect( Cloud, Unit ) @@ -686,7 +847,8 @@ ELEMENTAL FUNCTION CRTM_Cloud_Compare( & IF ( CRTM_Cloud_Associated(x) .AND. CRTM_Cloud_Associated(y) ) THEN IF ( (.NOT. ALL(Compares_Within_Tolerance(x%Effective_Radius ,y%Effective_Radius ,n))) .OR. & (.NOT. ALL(Compares_Within_Tolerance(x%Effective_Variance,y%Effective_Variance,n))) .OR. & - (.NOT. ALL(Compares_Within_Tolerance(x%Water_Content ,y%Water_Content ,n))) ) RETURN + (.NOT. ALL(Compares_Within_Tolerance(x%Water_Density ,y%Water_Density ,n))) .OR. & + (.NOT. ALL(Compares_Within_Tolerance(x%Water_Content ,y%Water_Content ,n)))) RETURN END IF ! If we get here, the objects are comparable @@ -1293,7 +1455,8 @@ ELEMENTAL FUNCTION CRTM_Cloud_Equal( x, y ) RESULT( is_equal ) n = x%n_Layers IF ( .NOT. (ALL(x%Effective_Radius(1:n) .EqualTo. y%Effective_Radius(1:n) ) .AND. & ALL(x%Effective_Variance(1:n) .EqualTo. y%Effective_Variance(1:n)) .AND. & - ALL(x%Water_Content(1:n) .EqualTo. y%Water_Content(1:n) )) ) RETURN + ALL(x%Water_Density(1:n) .EqualTo. y%Water_Density(1:n) ) .AND. & + ALL(x%Water_Content(1:n) .EqualTo. y%Water_Content(1:n) ))) RETURN END IF ! If we get here, then... @@ -1399,6 +1562,7 @@ ELEMENTAL FUNCTION CRTM_Cloud_Add( cld1, cld2 ) RESULT( cldsum ) cldsum%Effective_Radius(1:n) = cldsum%Effective_Radius(1:n) + cld2%Effective_Radius(1:n) cldsum%Effective_Variance(1:n) = cldsum%Effective_Variance(1:n) + cld2%Effective_Variance(1:n) cldsum%Water_Content(1:n) = cldsum%Water_Content(1:n) + cld2%Water_Content(1:n) + cldsum%Water_Density(1:n) = cldsum%Water_Density(1:n) + cld2%Water_Density(1:n) END FUNCTION CRTM_Cloud_Add diff --git a/src/Build/CMakeFiles/3.16.0/CMakeFortranCompiler.cmake b/src/Build/CMakeFiles/3.16.0/CMakeFortranCompiler.cmake deleted file mode 100644 index e4103a1..0000000 --- a/src/Build/CMakeFiles/3.16.0/CMakeFortranCompiler.cmake +++ /dev/null @@ -1,67 +0,0 @@ -set(CMAKE_Fortran_COMPILER "/usr/bin/gfortran") -set(CMAKE_Fortran_COMPILER_ARG1 "") -set(CMAKE_Fortran_COMPILER_ID "GNU") -set(CMAKE_Fortran_COMPILER_VERSION "9.3.0") -set(CMAKE_Fortran_COMPILER_WRAPPER "") -set(CMAKE_Fortran_PLATFORM_ID "") -set(CMAKE_Fortran_SIMULATE_ID "") -set(CMAKE_Fortran_SIMULATE_VERSION "") - - -set(CMAKE_AR "/usr/bin/ar") -set(CMAKE_Fortran_COMPILER_AR "/usr/bin/gcc-ar-9") -set(CMAKE_RANLIB "/usr/bin/ranlib") -set(CMAKE_Fortran_COMPILER_RANLIB "/usr/bin/gcc-ranlib-9") -set(CMAKE_COMPILER_IS_GNUG77 1) -set(CMAKE_Fortran_COMPILER_LOADED 1) -set(CMAKE_Fortran_COMPILER_WORKS TRUE) -set(CMAKE_Fortran_ABI_COMPILED TRUE) -set(CMAKE_COMPILER_IS_MINGW ) -set(CMAKE_COMPILER_IS_CYGWIN ) -if(CMAKE_COMPILER_IS_CYGWIN) - set(CYGWIN 1) - set(UNIX 1) -endif() - -set(CMAKE_Fortran_COMPILER_ENV_VAR "FC") - -set(CMAKE_Fortran_COMPILER_SUPPORTS_F90 1) - -if(CMAKE_COMPILER_IS_MINGW) - set(MINGW 1) -endif() -set(CMAKE_Fortran_COMPILER_ID_RUN 1) -set(CMAKE_Fortran_SOURCE_FILE_EXTENSIONS f;F;fpp;FPP;f77;F77;f90;F90;for;For;FOR;f95;F95) -set(CMAKE_Fortran_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) -set(CMAKE_Fortran_LINKER_PREFERENCE 20) -if(UNIX) - set(CMAKE_Fortran_OUTPUT_EXTENSION .o) -else() - set(CMAKE_Fortran_OUTPUT_EXTENSION .obj) -endif() - -# Save compiler ABI information. -set(CMAKE_Fortran_SIZEOF_DATA_PTR "8") -set(CMAKE_Fortran_COMPILER_ABI "") -set(CMAKE_Fortran_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") - -if(CMAKE_Fortran_SIZEOF_DATA_PTR AND NOT CMAKE_SIZEOF_VOID_P) - set(CMAKE_SIZEOF_VOID_P "${CMAKE_Fortran_SIZEOF_DATA_PTR}") -endif() - -if(CMAKE_Fortran_COMPILER_ABI) - set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_Fortran_COMPILER_ABI}") -endif() - -if(CMAKE_Fortran_LIBRARY_ARCHITECTURE) - set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") -endif() - - - - - -set(CMAKE_Fortran_IMPLICIT_INCLUDE_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/9/finclude;/usr/lib/gcc/x86_64-linux-gnu/9/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include") -set(CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "gfortran;m;gomp;gcc_s;gcc;quadmath;m;gcc_s;gcc;pthread;c;gcc_s;gcc") -set(CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/9;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") -set(CMAKE_Fortran_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/src/Build/CMakeFiles/3.16.0/CMakeSystem.cmake b/src/Build/CMakeFiles/3.16.0/CMakeSystem.cmake deleted file mode 100644 index 685c4bf..0000000 --- a/src/Build/CMakeFiles/3.16.0/CMakeSystem.cmake +++ /dev/null @@ -1,15 +0,0 @@ -set(CMAKE_HOST_SYSTEM "Linux-3.10.0-957.1.3.el7.x86_64") -set(CMAKE_HOST_SYSTEM_NAME "Linux") -set(CMAKE_HOST_SYSTEM_VERSION "3.10.0-957.1.3.el7.x86_64") -set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") - - - -set(CMAKE_SYSTEM "Linux-3.10.0-957.1.3.el7.x86_64") -set(CMAKE_SYSTEM_NAME "Linux") -set(CMAKE_SYSTEM_VERSION "3.10.0-957.1.3.el7.x86_64") -set(CMAKE_SYSTEM_PROCESSOR "x86_64") - -set(CMAKE_CROSSCOMPILING "FALSE") - -set(CMAKE_SYSTEM_LOADED 1) diff --git a/src/Build/CMakeFiles/3.16.0/CompilerIdFortran/CMakeFortranCompilerId.F b/src/Build/CMakeFiles/3.16.0/CompilerIdFortran/CMakeFortranCompilerId.F deleted file mode 100644 index 3b1e181..0000000 --- a/src/Build/CMakeFiles/3.16.0/CompilerIdFortran/CMakeFortranCompilerId.F +++ /dev/null @@ -1,1040 +0,0 @@ - PROGRAM CMakeFortranCompilerId -#if 0 -! Identify the compiler -#endif -#if defined(_MSC_VER) - PRINT *, 'INFO:simulate[MSVC]' -# if _MSC_VER >= 1900 - PRINT *, 'INFO:simulate_version[019.00]' -# elif _MSC_VER >= 1800 - PRINT *, 'INFO:simulate_version[018.00]' -# elif _MSC_VER >= 1700 - PRINT *, 'INFO:simulate_version[017.00]' -# elif _MSC_VER >= 1600 - PRINT *, 'INFO:simulate_version[016.00]' -# elif _MSC_VER >= 1500 - PRINT *, 'INFO:simulate_version[015.00]' -# elif _MSC_VER >= 1400 - PRINT *, 'INFO:simulate_version[014.00]' -# elif _MSC_VER >= 1310 - PRINT *, 'INFO:simulate_version[013.01]' -# else - PRINT *, 'INFO:simulate_version[013.00]' -# endif -#endif -#if defined(__INTEL_COMPILER) || defined(__ICC) - PRINT *, 'INFO:compiler[Intel]' -# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) -# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) -# if defined(__INTEL_COMPILER_UPDATE) -# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) -# else -# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) -# endif -# if defined(__INTEL_COMPILER_BUILD_DATE) -# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) -# endif -#elif defined(__SUNPRO_F95) - PRINT *, 'INFO:compiler[SunPro]' -# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_F95>>8) -# define COMPILER_VERSION_MINOR HEX(__SUNPRO_F95>>4 & 0xF) -# define COMPILER_VERSION_PATCH HEX(__SUNPRO_F95 & 0xF) -#elif defined(__SUNPRO_F90) - PRINT *, 'INFO:compiler[SunPro]' -# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_F90>>8) -# define COMPILER_VERSION_MINOR HEX(__SUNPRO_F90>>4 & 0xF) -# define COMPILER_VERSION_PATCH HEX(__SUNPRO_F90 & 0xF) -#elif defined(_CRAYFTN) - PRINT *, 'INFO:compiler[Cray]' -# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) -# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) -#elif defined(__G95__) - PRINT *, 'INFO:compiler[G95]' -# define COMPILER_VERSION_MAJOR DEC(__G95__) -# define COMPILER_VERSION_MINOR DEC(__G95_MINOR__) -#elif defined(__PATHSCALE__) - PRINT *, 'INFO:compiler[PathScale]' -# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) -# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) -# if defined(__PATHCC_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) -# endif -#elif defined(__ABSOFT__) - PRINT *, 'INFO:compiler[Absoft]' -#elif defined(__GNUC__) - PRINT *, 'INFO:compiler[GNU]' -# define COMPILER_VERSION_MAJOR DEC(__GNUC__) -# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) -# if defined(__GNUC_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) -# endif -#elif defined(__IBMC__) -# if defined(__COMPILER_VER__) - PRINT *, 'INFO:compiler[zOS]' -# elif __IBMC__ >= 800 - PRINT *, 'INFO:compiler[XL]' -# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) -# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) -# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) -# else - PRINT *, 'INFO:compiler[VisualAge]' -# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) -# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) -# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) -# endif -#elif defined(__PGI) - PRINT *, 'INFO:compiler[PGI]' -# define COMPILER_VERSION_MAJOR DEC(__PGIC__) -# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) -# if defined(__PGIC_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) -# endif -#elif defined(__FLANG) - PRINT *, 'INFO:compiler[Flang]' -# define COMPILER_VERSION_MAJOR DEC(__FLANG_MAJOR__) -# define COMPILER_VERSION_MINOR DEC(__FLANG_MINOR__) -# if defined(__FLANG_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__FLANG_PATCHLEVEL__) -# endif -#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) - PRINT *, 'INFO:compiler[VisualAge]' -#elif defined(__hpux) || defined(__hpux__) - PRINT *, 'INFO:compiler[HP]' -#elif defined(NAGFOR) - PRINT *, 'INFO:compiler[NAG]' -#define COMPILER_VERSION_MAJOR DEC(__NAG_COMPILER_RELEASE/10) -#define COMPILER_VERSION_MINOR DEC(__NAG_COMPILER_RELEASE % 10) -#define COMPILER_VERSION_PATCH DEC(__NAG_COMPILER_BUILD) -#else - PRINT *, 'INFO:compiler[]' -#endif -#if defined(__CRAYXE) || defined(__CRAYXC) - PRINT *, 'INFO:compiler_wrapper[CrayPrgEnv]' -#endif - -#if 0 -! Identify the platform -#endif -#if defined(__linux) || defined(__linux__) || defined(linux) - PRINT *, 'INFO:platform[Linux]' -#elif defined(__CYGWIN__) - PRINT *, 'INFO:platform[Cygwin]' -#elif defined(__MINGW32__) - PRINT *, 'INFO:platform[MinGW]' -#elif defined(__APPLE__) - PRINT *, 'INFO:platform[Darwin]' -#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) - PRINT *, 'INFO:platform[Windows]' -#elif defined(__FreeBSD__) || defined(__FreeBSD) - PRINT *, 'INFO:platform[FreeBSD]' -#elif defined(__NetBSD__) || defined(__NetBSD) - PRINT *, 'INFO:platform[NetBSD]' -#elif defined(__OpenBSD__) || defined(__OPENBSD) - PRINT *, 'INFO:platform[OpenBSD]' -#elif defined(__sun) || defined(sun) - PRINT *, 'INFO:platform[SunOS]' -#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) - PRINT *, 'INFO:platform[AIX]' -#elif defined(__hpux) || defined(__hpux__) - PRINT *, 'INFO:platform[HP-UX]' -#elif defined(__HAIKU__) - PRINT *, 'INFO:platform[Haiku]' -#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) - PRINT *, 'INFO:platform[BeOS]' -#elif defined(__QNX__) || defined(__QNXNTO__) - PRINT *, 'INFO:platform[QNX]' -#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) - PRINT *, 'INFO:platform[Tru64]' -#elif defined(__riscos) || defined(__riscos__) - PRINT *, 'INFO:platform[RISCos]' -#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) - PRINT *, 'INFO:platform[SINIX]' -#elif defined(__UNIX_SV__) - PRINT *, 'INFO:platform[UNIX_SV]' -#elif defined(__bsdos__) - PRINT *, 'INFO:platform[BSDOS]' -#elif defined(_MPRAS) || defined(MPRAS) - PRINT *, 'INFO:platform[MP-RAS]' -#elif defined(__osf) || defined(__osf__) - PRINT *, 'INFO:platform[OSF1]' -#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) - PRINT *, 'INFO:platform[SCO_SV]' -#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) - PRINT *, 'INFO:platform[ULTRIX]' -#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) - PRINT *, 'INFO:platform[Xenix]' -#else - PRINT *, 'INFO:platform[]' -#endif -#if defined(_WIN32) && (defined(__INTEL_COMPILER) || defined(__ICC)) -# if defined(_M_IA64) - PRINT *, 'INFO:arch[IA64]' -# elif defined(_M_X64) || defined(_M_AMD64) - PRINT *, 'INFO:arch[x64]' -# elif defined(_M_IX86) - PRINT *, 'INFO:arch[X86]' -# endif -#endif - -#if 0 -! Encode compiler version digits -#endif -#define DEC_8(n) (((n) / 10000000) % 10) -#define DEC_7(n) (((n) / 1000000) % 10) -#define DEC_6(n) (((n) / 100000) % 10) -#define DEC_5(n) (((n) / 10000) % 10) -#define DEC_4(n) (((n) / 1000) % 10) -#define DEC_3(n) (((n) / 100) % 10) -#define DEC_2(n) (((n) / 10) % 10) -#define DEC_1(n) (((n) ) % 10) -#define HEX_8(n) ((n)>>28 & 0xF) -#define HEX_7(n) ((n)>>24 & 0xF) -#define HEX_6(n) ((n)>>20 & 0xF) -#define HEX_5(n) ((n)>>16 & 0xF) -#define HEX_4(n) ((n)>>12 & 0xF) -#define HEX_3(n) ((n)>>8 & 0xF) -#define HEX_2(n) ((n)>>4 & 0xF) -#define HEX_1(n) ((n) & 0xF) - -#if defined(COMPILER_VERSION_MAJOR) -# undef DEC -# undef HEX -# define DEC(n) DEC_1(n) -# define HEX(n) HEX_1(n) -# if COMPILER_VERSION_MAJOR == 0 - PRINT *, 'INFO:compiler_version_MAJOR_digit_1[0]' -# elif COMPILER_VERSION_MAJOR == 1 - PRINT *, 'INFO:compiler_version_MAJOR_digit_1[1]' -# elif COMPILER_VERSION_MAJOR == 2 - PRINT *, 'INFO:compiler_version_MAJOR_digit_1[2]' -# elif COMPILER_VERSION_MAJOR == 3 - PRINT *, 'INFO:compiler_version_MAJOR_digit_1[3]' -# elif COMPILER_VERSION_MAJOR == 4 - PRINT *, 'INFO:compiler_version_MAJOR_digit_1[4]' -# elif COMPILER_VERSION_MAJOR == 5 - PRINT *, 'INFO:compiler_version_MAJOR_digit_1[5]' -# elif COMPILER_VERSION_MAJOR == 6 - PRINT *, 'INFO:compiler_version_MAJOR_digit_1[6]' -# elif COMPILER_VERSION_MAJOR == 7 - PRINT *, 'INFO:compiler_version_MAJOR_digit_1[7]' -# elif COMPILER_VERSION_MAJOR == 8 - PRINT *, 'INFO:compiler_version_MAJOR_digit_1[8]' -# elif COMPILER_VERSION_MAJOR == 9 - PRINT *, 'INFO:compiler_version_MAJOR_digit_1[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_2(n) -# define HEX(n) HEX_2(n) -# if COMPILER_VERSION_MAJOR == 0 - PRINT *, 'INFO:compiler_version_MAJOR_digit_2[0]' -# elif COMPILER_VERSION_MAJOR == 1 - PRINT *, 'INFO:compiler_version_MAJOR_digit_2[1]' -# elif COMPILER_VERSION_MAJOR == 2 - PRINT *, 'INFO:compiler_version_MAJOR_digit_2[2]' -# elif COMPILER_VERSION_MAJOR == 3 - PRINT *, 'INFO:compiler_version_MAJOR_digit_2[3]' -# elif COMPILER_VERSION_MAJOR == 4 - PRINT *, 'INFO:compiler_version_MAJOR_digit_2[4]' -# elif COMPILER_VERSION_MAJOR == 5 - PRINT *, 'INFO:compiler_version_MAJOR_digit_2[5]' -# elif COMPILER_VERSION_MAJOR == 6 - PRINT *, 'INFO:compiler_version_MAJOR_digit_2[6]' -# elif COMPILER_VERSION_MAJOR == 7 - PRINT *, 'INFO:compiler_version_MAJOR_digit_2[7]' -# elif COMPILER_VERSION_MAJOR == 8 - PRINT *, 'INFO:compiler_version_MAJOR_digit_2[8]' -# elif COMPILER_VERSION_MAJOR == 9 - PRINT *, 'INFO:compiler_version_MAJOR_digit_2[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_3(n) -# define HEX(n) HEX_3(n) -# if COMPILER_VERSION_MAJOR == 0 - PRINT *, 'INFO:compiler_version_MAJOR_digit_3[0]' -# elif COMPILER_VERSION_MAJOR == 1 - PRINT *, 'INFO:compiler_version_MAJOR_digit_3[1]' -# elif COMPILER_VERSION_MAJOR == 2 - PRINT *, 'INFO:compiler_version_MAJOR_digit_3[2]' -# elif COMPILER_VERSION_MAJOR == 3 - PRINT *, 'INFO:compiler_version_MAJOR_digit_3[3]' -# elif COMPILER_VERSION_MAJOR == 4 - PRINT *, 'INFO:compiler_version_MAJOR_digit_3[4]' -# elif COMPILER_VERSION_MAJOR == 5 - PRINT *, 'INFO:compiler_version_MAJOR_digit_3[5]' -# elif COMPILER_VERSION_MAJOR == 6 - PRINT *, 'INFO:compiler_version_MAJOR_digit_3[6]' -# elif COMPILER_VERSION_MAJOR == 7 - PRINT *, 'INFO:compiler_version_MAJOR_digit_3[7]' -# elif COMPILER_VERSION_MAJOR == 8 - PRINT *, 'INFO:compiler_version_MAJOR_digit_3[8]' -# elif COMPILER_VERSION_MAJOR == 9 - PRINT *, 'INFO:compiler_version_MAJOR_digit_3[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_4(n) -# define HEX(n) HEX_4(n) -# if COMPILER_VERSION_MAJOR == 0 - PRINT *, 'INFO:compiler_version_MAJOR_digit_4[0]' -# elif COMPILER_VERSION_MAJOR == 1 - PRINT *, 'INFO:compiler_version_MAJOR_digit_4[1]' -# elif COMPILER_VERSION_MAJOR == 2 - PRINT *, 'INFO:compiler_version_MAJOR_digit_4[2]' -# elif COMPILER_VERSION_MAJOR == 3 - PRINT *, 'INFO:compiler_version_MAJOR_digit_4[3]' -# elif COMPILER_VERSION_MAJOR == 4 - PRINT *, 'INFO:compiler_version_MAJOR_digit_4[4]' -# elif COMPILER_VERSION_MAJOR == 5 - PRINT *, 'INFO:compiler_version_MAJOR_digit_4[5]' -# elif COMPILER_VERSION_MAJOR == 6 - PRINT *, 'INFO:compiler_version_MAJOR_digit_4[6]' -# elif COMPILER_VERSION_MAJOR == 7 - PRINT *, 'INFO:compiler_version_MAJOR_digit_4[7]' -# elif COMPILER_VERSION_MAJOR == 8 - PRINT *, 'INFO:compiler_version_MAJOR_digit_4[8]' -# elif COMPILER_VERSION_MAJOR == 9 - PRINT *, 'INFO:compiler_version_MAJOR_digit_4[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_5(n) -# define HEX(n) HEX_5(n) -# if COMPILER_VERSION_MAJOR == 0 - PRINT *, 'INFO:compiler_version_MAJOR_digit_5[0]' -# elif COMPILER_VERSION_MAJOR == 1 - PRINT *, 'INFO:compiler_version_MAJOR_digit_5[1]' -# elif COMPILER_VERSION_MAJOR == 2 - PRINT *, 'INFO:compiler_version_MAJOR_digit_5[2]' -# elif COMPILER_VERSION_MAJOR == 3 - PRINT *, 'INFO:compiler_version_MAJOR_digit_5[3]' -# elif COMPILER_VERSION_MAJOR == 4 - PRINT *, 'INFO:compiler_version_MAJOR_digit_5[4]' -# elif COMPILER_VERSION_MAJOR == 5 - PRINT *, 'INFO:compiler_version_MAJOR_digit_5[5]' -# elif COMPILER_VERSION_MAJOR == 6 - PRINT *, 'INFO:compiler_version_MAJOR_digit_5[6]' -# elif COMPILER_VERSION_MAJOR == 7 - PRINT *, 'INFO:compiler_version_MAJOR_digit_5[7]' -# elif COMPILER_VERSION_MAJOR == 8 - PRINT *, 'INFO:compiler_version_MAJOR_digit_5[8]' -# elif COMPILER_VERSION_MAJOR == 9 - PRINT *, 'INFO:compiler_version_MAJOR_digit_5[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_6(n) -# define HEX(n) HEX_6(n) -# if COMPILER_VERSION_MAJOR == 0 - PRINT *, 'INFO:compiler_version_MAJOR_digit_6[0]' -# elif COMPILER_VERSION_MAJOR == 1 - PRINT *, 'INFO:compiler_version_MAJOR_digit_6[1]' -# elif COMPILER_VERSION_MAJOR == 2 - PRINT *, 'INFO:compiler_version_MAJOR_digit_6[2]' -# elif COMPILER_VERSION_MAJOR == 3 - PRINT *, 'INFO:compiler_version_MAJOR_digit_6[3]' -# elif COMPILER_VERSION_MAJOR == 4 - PRINT *, 'INFO:compiler_version_MAJOR_digit_6[4]' -# elif COMPILER_VERSION_MAJOR == 5 - PRINT *, 'INFO:compiler_version_MAJOR_digit_6[5]' -# elif COMPILER_VERSION_MAJOR == 6 - PRINT *, 'INFO:compiler_version_MAJOR_digit_6[6]' -# elif COMPILER_VERSION_MAJOR == 7 - PRINT *, 'INFO:compiler_version_MAJOR_digit_6[7]' -# elif COMPILER_VERSION_MAJOR == 8 - PRINT *, 'INFO:compiler_version_MAJOR_digit_6[8]' -# elif COMPILER_VERSION_MAJOR == 9 - PRINT *, 'INFO:compiler_version_MAJOR_digit_6[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_7(n) -# define HEX(n) HEX_7(n) -# if COMPILER_VERSION_MAJOR == 0 - PRINT *, 'INFO:compiler_version_MAJOR_digit_7[0]' -# elif COMPILER_VERSION_MAJOR == 1 - PRINT *, 'INFO:compiler_version_MAJOR_digit_7[1]' -# elif COMPILER_VERSION_MAJOR == 2 - PRINT *, 'INFO:compiler_version_MAJOR_digit_7[2]' -# elif COMPILER_VERSION_MAJOR == 3 - PRINT *, 'INFO:compiler_version_MAJOR_digit_7[3]' -# elif COMPILER_VERSION_MAJOR == 4 - PRINT *, 'INFO:compiler_version_MAJOR_digit_7[4]' -# elif COMPILER_VERSION_MAJOR == 5 - PRINT *, 'INFO:compiler_version_MAJOR_digit_7[5]' -# elif COMPILER_VERSION_MAJOR == 6 - PRINT *, 'INFO:compiler_version_MAJOR_digit_7[6]' -# elif COMPILER_VERSION_MAJOR == 7 - PRINT *, 'INFO:compiler_version_MAJOR_digit_7[7]' -# elif COMPILER_VERSION_MAJOR == 8 - PRINT *, 'INFO:compiler_version_MAJOR_digit_7[8]' -# elif COMPILER_VERSION_MAJOR == 9 - PRINT *, 'INFO:compiler_version_MAJOR_digit_7[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_8(n) -# define HEX(n) HEX_8(n) -# if COMPILER_VERSION_MAJOR == 0 - PRINT *, 'INFO:compiler_version_MAJOR_digit_8[0]' -# elif COMPILER_VERSION_MAJOR == 1 - PRINT *, 'INFO:compiler_version_MAJOR_digit_8[1]' -# elif COMPILER_VERSION_MAJOR == 2 - PRINT *, 'INFO:compiler_version_MAJOR_digit_8[2]' -# elif COMPILER_VERSION_MAJOR == 3 - PRINT *, 'INFO:compiler_version_MAJOR_digit_8[3]' -# elif COMPILER_VERSION_MAJOR == 4 - PRINT *, 'INFO:compiler_version_MAJOR_digit_8[4]' -# elif COMPILER_VERSION_MAJOR == 5 - PRINT *, 'INFO:compiler_version_MAJOR_digit_8[5]' -# elif COMPILER_VERSION_MAJOR == 6 - PRINT *, 'INFO:compiler_version_MAJOR_digit_8[6]' -# elif COMPILER_VERSION_MAJOR == 7 - PRINT *, 'INFO:compiler_version_MAJOR_digit_8[7]' -# elif COMPILER_VERSION_MAJOR == 8 - PRINT *, 'INFO:compiler_version_MAJOR_digit_8[8]' -# elif COMPILER_VERSION_MAJOR == 9 - PRINT *, 'INFO:compiler_version_MAJOR_digit_8[9]' -# endif - -#endif -#if defined(COMPILER_VERSION_MINOR) -# undef DEC -# undef HEX -# define DEC(n) DEC_1(n) -# define HEX(n) HEX_1(n) -# if COMPILER_VERSION_MINOR == 0 - PRINT *, 'INFO:compiler_version_MINOR_digit_1[0]' -# elif COMPILER_VERSION_MINOR == 1 - PRINT *, 'INFO:compiler_version_MINOR_digit_1[1]' -# elif COMPILER_VERSION_MINOR == 2 - PRINT *, 'INFO:compiler_version_MINOR_digit_1[2]' -# elif COMPILER_VERSION_MINOR == 3 - PRINT *, 'INFO:compiler_version_MINOR_digit_1[3]' -# elif COMPILER_VERSION_MINOR == 4 - PRINT *, 'INFO:compiler_version_MINOR_digit_1[4]' -# elif COMPILER_VERSION_MINOR == 5 - PRINT *, 'INFO:compiler_version_MINOR_digit_1[5]' -# elif COMPILER_VERSION_MINOR == 6 - PRINT *, 'INFO:compiler_version_MINOR_digit_1[6]' -# elif COMPILER_VERSION_MINOR == 7 - PRINT *, 'INFO:compiler_version_MINOR_digit_1[7]' -# elif COMPILER_VERSION_MINOR == 8 - PRINT *, 'INFO:compiler_version_MINOR_digit_1[8]' -# elif COMPILER_VERSION_MINOR == 9 - PRINT *, 'INFO:compiler_version_MINOR_digit_1[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_2(n) -# define HEX(n) HEX_2(n) -# if COMPILER_VERSION_MINOR == 0 - PRINT *, 'INFO:compiler_version_MINOR_digit_2[0]' -# elif COMPILER_VERSION_MINOR == 1 - PRINT *, 'INFO:compiler_version_MINOR_digit_2[1]' -# elif COMPILER_VERSION_MINOR == 2 - PRINT *, 'INFO:compiler_version_MINOR_digit_2[2]' -# elif COMPILER_VERSION_MINOR == 3 - PRINT *, 'INFO:compiler_version_MINOR_digit_2[3]' -# elif COMPILER_VERSION_MINOR == 4 - PRINT *, 'INFO:compiler_version_MINOR_digit_2[4]' -# elif COMPILER_VERSION_MINOR == 5 - PRINT *, 'INFO:compiler_version_MINOR_digit_2[5]' -# elif COMPILER_VERSION_MINOR == 6 - PRINT *, 'INFO:compiler_version_MINOR_digit_2[6]' -# elif COMPILER_VERSION_MINOR == 7 - PRINT *, 'INFO:compiler_version_MINOR_digit_2[7]' -# elif COMPILER_VERSION_MINOR == 8 - PRINT *, 'INFO:compiler_version_MINOR_digit_2[8]' -# elif COMPILER_VERSION_MINOR == 9 - PRINT *, 'INFO:compiler_version_MINOR_digit_2[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_3(n) -# define HEX(n) HEX_3(n) -# if COMPILER_VERSION_MINOR == 0 - PRINT *, 'INFO:compiler_version_MINOR_digit_3[0]' -# elif COMPILER_VERSION_MINOR == 1 - PRINT *, 'INFO:compiler_version_MINOR_digit_3[1]' -# elif COMPILER_VERSION_MINOR == 2 - PRINT *, 'INFO:compiler_version_MINOR_digit_3[2]' -# elif COMPILER_VERSION_MINOR == 3 - PRINT *, 'INFO:compiler_version_MINOR_digit_3[3]' -# elif COMPILER_VERSION_MINOR == 4 - PRINT *, 'INFO:compiler_version_MINOR_digit_3[4]' -# elif COMPILER_VERSION_MINOR == 5 - PRINT *, 'INFO:compiler_version_MINOR_digit_3[5]' -# elif COMPILER_VERSION_MINOR == 6 - PRINT *, 'INFO:compiler_version_MINOR_digit_3[6]' -# elif COMPILER_VERSION_MINOR == 7 - PRINT *, 'INFO:compiler_version_MINOR_digit_3[7]' -# elif COMPILER_VERSION_MINOR == 8 - PRINT *, 'INFO:compiler_version_MINOR_digit_3[8]' -# elif COMPILER_VERSION_MINOR == 9 - PRINT *, 'INFO:compiler_version_MINOR_digit_3[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_4(n) -# define HEX(n) HEX_4(n) -# if COMPILER_VERSION_MINOR == 0 - PRINT *, 'INFO:compiler_version_MINOR_digit_4[0]' -# elif COMPILER_VERSION_MINOR == 1 - PRINT *, 'INFO:compiler_version_MINOR_digit_4[1]' -# elif COMPILER_VERSION_MINOR == 2 - PRINT *, 'INFO:compiler_version_MINOR_digit_4[2]' -# elif COMPILER_VERSION_MINOR == 3 - PRINT *, 'INFO:compiler_version_MINOR_digit_4[3]' -# elif COMPILER_VERSION_MINOR == 4 - PRINT *, 'INFO:compiler_version_MINOR_digit_4[4]' -# elif COMPILER_VERSION_MINOR == 5 - PRINT *, 'INFO:compiler_version_MINOR_digit_4[5]' -# elif COMPILER_VERSION_MINOR == 6 - PRINT *, 'INFO:compiler_version_MINOR_digit_4[6]' -# elif COMPILER_VERSION_MINOR == 7 - PRINT *, 'INFO:compiler_version_MINOR_digit_4[7]' -# elif COMPILER_VERSION_MINOR == 8 - PRINT *, 'INFO:compiler_version_MINOR_digit_4[8]' -# elif COMPILER_VERSION_MINOR == 9 - PRINT *, 'INFO:compiler_version_MINOR_digit_4[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_5(n) -# define HEX(n) HEX_5(n) -# if COMPILER_VERSION_MINOR == 0 - PRINT *, 'INFO:compiler_version_MINOR_digit_5[0]' -# elif COMPILER_VERSION_MINOR == 1 - PRINT *, 'INFO:compiler_version_MINOR_digit_5[1]' -# elif COMPILER_VERSION_MINOR == 2 - PRINT *, 'INFO:compiler_version_MINOR_digit_5[2]' -# elif COMPILER_VERSION_MINOR == 3 - PRINT *, 'INFO:compiler_version_MINOR_digit_5[3]' -# elif COMPILER_VERSION_MINOR == 4 - PRINT *, 'INFO:compiler_version_MINOR_digit_5[4]' -# elif COMPILER_VERSION_MINOR == 5 - PRINT *, 'INFO:compiler_version_MINOR_digit_5[5]' -# elif COMPILER_VERSION_MINOR == 6 - PRINT *, 'INFO:compiler_version_MINOR_digit_5[6]' -# elif COMPILER_VERSION_MINOR == 7 - PRINT *, 'INFO:compiler_version_MINOR_digit_5[7]' -# elif COMPILER_VERSION_MINOR == 8 - PRINT *, 'INFO:compiler_version_MINOR_digit_5[8]' -# elif COMPILER_VERSION_MINOR == 9 - PRINT *, 'INFO:compiler_version_MINOR_digit_5[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_6(n) -# define HEX(n) HEX_6(n) -# if COMPILER_VERSION_MINOR == 0 - PRINT *, 'INFO:compiler_version_MINOR_digit_6[0]' -# elif COMPILER_VERSION_MINOR == 1 - PRINT *, 'INFO:compiler_version_MINOR_digit_6[1]' -# elif COMPILER_VERSION_MINOR == 2 - PRINT *, 'INFO:compiler_version_MINOR_digit_6[2]' -# elif COMPILER_VERSION_MINOR == 3 - PRINT *, 'INFO:compiler_version_MINOR_digit_6[3]' -# elif COMPILER_VERSION_MINOR == 4 - PRINT *, 'INFO:compiler_version_MINOR_digit_6[4]' -# elif COMPILER_VERSION_MINOR == 5 - PRINT *, 'INFO:compiler_version_MINOR_digit_6[5]' -# elif COMPILER_VERSION_MINOR == 6 - PRINT *, 'INFO:compiler_version_MINOR_digit_6[6]' -# elif COMPILER_VERSION_MINOR == 7 - PRINT *, 'INFO:compiler_version_MINOR_digit_6[7]' -# elif COMPILER_VERSION_MINOR == 8 - PRINT *, 'INFO:compiler_version_MINOR_digit_6[8]' -# elif COMPILER_VERSION_MINOR == 9 - PRINT *, 'INFO:compiler_version_MINOR_digit_6[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_7(n) -# define HEX(n) HEX_7(n) -# if COMPILER_VERSION_MINOR == 0 - PRINT *, 'INFO:compiler_version_MINOR_digit_7[0]' -# elif COMPILER_VERSION_MINOR == 1 - PRINT *, 'INFO:compiler_version_MINOR_digit_7[1]' -# elif COMPILER_VERSION_MINOR == 2 - PRINT *, 'INFO:compiler_version_MINOR_digit_7[2]' -# elif COMPILER_VERSION_MINOR == 3 - PRINT *, 'INFO:compiler_version_MINOR_digit_7[3]' -# elif COMPILER_VERSION_MINOR == 4 - PRINT *, 'INFO:compiler_version_MINOR_digit_7[4]' -# elif COMPILER_VERSION_MINOR == 5 - PRINT *, 'INFO:compiler_version_MINOR_digit_7[5]' -# elif COMPILER_VERSION_MINOR == 6 - PRINT *, 'INFO:compiler_version_MINOR_digit_7[6]' -# elif COMPILER_VERSION_MINOR == 7 - PRINT *, 'INFO:compiler_version_MINOR_digit_7[7]' -# elif COMPILER_VERSION_MINOR == 8 - PRINT *, 'INFO:compiler_version_MINOR_digit_7[8]' -# elif COMPILER_VERSION_MINOR == 9 - PRINT *, 'INFO:compiler_version_MINOR_digit_7[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_8(n) -# define HEX(n) HEX_8(n) -# if COMPILER_VERSION_MINOR == 0 - PRINT *, 'INFO:compiler_version_MINOR_digit_8[0]' -# elif COMPILER_VERSION_MINOR == 1 - PRINT *, 'INFO:compiler_version_MINOR_digit_8[1]' -# elif COMPILER_VERSION_MINOR == 2 - PRINT *, 'INFO:compiler_version_MINOR_digit_8[2]' -# elif COMPILER_VERSION_MINOR == 3 - PRINT *, 'INFO:compiler_version_MINOR_digit_8[3]' -# elif COMPILER_VERSION_MINOR == 4 - PRINT *, 'INFO:compiler_version_MINOR_digit_8[4]' -# elif COMPILER_VERSION_MINOR == 5 - PRINT *, 'INFO:compiler_version_MINOR_digit_8[5]' -# elif COMPILER_VERSION_MINOR == 6 - PRINT *, 'INFO:compiler_version_MINOR_digit_8[6]' -# elif COMPILER_VERSION_MINOR == 7 - PRINT *, 'INFO:compiler_version_MINOR_digit_8[7]' -# elif COMPILER_VERSION_MINOR == 8 - PRINT *, 'INFO:compiler_version_MINOR_digit_8[8]' -# elif COMPILER_VERSION_MINOR == 9 - PRINT *, 'INFO:compiler_version_MINOR_digit_8[9]' -# endif - -#endif -#if defined(COMPILER_VERSION_PATCH) -# undef DEC -# undef HEX -# define DEC(n) DEC_1(n) -# define HEX(n) HEX_1(n) -# if COMPILER_VERSION_PATCH == 0 - PRINT *, 'INFO:compiler_version_PATCH_digit_1[0]' -# elif COMPILER_VERSION_PATCH == 1 - PRINT *, 'INFO:compiler_version_PATCH_digit_1[1]' -# elif COMPILER_VERSION_PATCH == 2 - PRINT *, 'INFO:compiler_version_PATCH_digit_1[2]' -# elif COMPILER_VERSION_PATCH == 3 - PRINT *, 'INFO:compiler_version_PATCH_digit_1[3]' -# elif COMPILER_VERSION_PATCH == 4 - PRINT *, 'INFO:compiler_version_PATCH_digit_1[4]' -# elif COMPILER_VERSION_PATCH == 5 - PRINT *, 'INFO:compiler_version_PATCH_digit_1[5]' -# elif COMPILER_VERSION_PATCH == 6 - PRINT *, 'INFO:compiler_version_PATCH_digit_1[6]' -# elif COMPILER_VERSION_PATCH == 7 - PRINT *, 'INFO:compiler_version_PATCH_digit_1[7]' -# elif COMPILER_VERSION_PATCH == 8 - PRINT *, 'INFO:compiler_version_PATCH_digit_1[8]' -# elif COMPILER_VERSION_PATCH == 9 - PRINT *, 'INFO:compiler_version_PATCH_digit_1[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_2(n) -# define HEX(n) HEX_2(n) -# if COMPILER_VERSION_PATCH == 0 - PRINT *, 'INFO:compiler_version_PATCH_digit_2[0]' -# elif COMPILER_VERSION_PATCH == 1 - PRINT *, 'INFO:compiler_version_PATCH_digit_2[1]' -# elif COMPILER_VERSION_PATCH == 2 - PRINT *, 'INFO:compiler_version_PATCH_digit_2[2]' -# elif COMPILER_VERSION_PATCH == 3 - PRINT *, 'INFO:compiler_version_PATCH_digit_2[3]' -# elif COMPILER_VERSION_PATCH == 4 - PRINT *, 'INFO:compiler_version_PATCH_digit_2[4]' -# elif COMPILER_VERSION_PATCH == 5 - PRINT *, 'INFO:compiler_version_PATCH_digit_2[5]' -# elif COMPILER_VERSION_PATCH == 6 - PRINT *, 'INFO:compiler_version_PATCH_digit_2[6]' -# elif COMPILER_VERSION_PATCH == 7 - PRINT *, 'INFO:compiler_version_PATCH_digit_2[7]' -# elif COMPILER_VERSION_PATCH == 8 - PRINT *, 'INFO:compiler_version_PATCH_digit_2[8]' -# elif COMPILER_VERSION_PATCH == 9 - PRINT *, 'INFO:compiler_version_PATCH_digit_2[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_3(n) -# define HEX(n) HEX_3(n) -# if COMPILER_VERSION_PATCH == 0 - PRINT *, 'INFO:compiler_version_PATCH_digit_3[0]' -# elif COMPILER_VERSION_PATCH == 1 - PRINT *, 'INFO:compiler_version_PATCH_digit_3[1]' -# elif COMPILER_VERSION_PATCH == 2 - PRINT *, 'INFO:compiler_version_PATCH_digit_3[2]' -# elif COMPILER_VERSION_PATCH == 3 - PRINT *, 'INFO:compiler_version_PATCH_digit_3[3]' -# elif COMPILER_VERSION_PATCH == 4 - PRINT *, 'INFO:compiler_version_PATCH_digit_3[4]' -# elif COMPILER_VERSION_PATCH == 5 - PRINT *, 'INFO:compiler_version_PATCH_digit_3[5]' -# elif COMPILER_VERSION_PATCH == 6 - PRINT *, 'INFO:compiler_version_PATCH_digit_3[6]' -# elif COMPILER_VERSION_PATCH == 7 - PRINT *, 'INFO:compiler_version_PATCH_digit_3[7]' -# elif COMPILER_VERSION_PATCH == 8 - PRINT *, 'INFO:compiler_version_PATCH_digit_3[8]' -# elif COMPILER_VERSION_PATCH == 9 - PRINT *, 'INFO:compiler_version_PATCH_digit_3[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_4(n) -# define HEX(n) HEX_4(n) -# if COMPILER_VERSION_PATCH == 0 - PRINT *, 'INFO:compiler_version_PATCH_digit_4[0]' -# elif COMPILER_VERSION_PATCH == 1 - PRINT *, 'INFO:compiler_version_PATCH_digit_4[1]' -# elif COMPILER_VERSION_PATCH == 2 - PRINT *, 'INFO:compiler_version_PATCH_digit_4[2]' -# elif COMPILER_VERSION_PATCH == 3 - PRINT *, 'INFO:compiler_version_PATCH_digit_4[3]' -# elif COMPILER_VERSION_PATCH == 4 - PRINT *, 'INFO:compiler_version_PATCH_digit_4[4]' -# elif COMPILER_VERSION_PATCH == 5 - PRINT *, 'INFO:compiler_version_PATCH_digit_4[5]' -# elif COMPILER_VERSION_PATCH == 6 - PRINT *, 'INFO:compiler_version_PATCH_digit_4[6]' -# elif COMPILER_VERSION_PATCH == 7 - PRINT *, 'INFO:compiler_version_PATCH_digit_4[7]' -# elif COMPILER_VERSION_PATCH == 8 - PRINT *, 'INFO:compiler_version_PATCH_digit_4[8]' -# elif COMPILER_VERSION_PATCH == 9 - PRINT *, 'INFO:compiler_version_PATCH_digit_4[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_5(n) -# define HEX(n) HEX_5(n) -# if COMPILER_VERSION_PATCH == 0 - PRINT *, 'INFO:compiler_version_PATCH_digit_5[0]' -# elif COMPILER_VERSION_PATCH == 1 - PRINT *, 'INFO:compiler_version_PATCH_digit_5[1]' -# elif COMPILER_VERSION_PATCH == 2 - PRINT *, 'INFO:compiler_version_PATCH_digit_5[2]' -# elif COMPILER_VERSION_PATCH == 3 - PRINT *, 'INFO:compiler_version_PATCH_digit_5[3]' -# elif COMPILER_VERSION_PATCH == 4 - PRINT *, 'INFO:compiler_version_PATCH_digit_5[4]' -# elif COMPILER_VERSION_PATCH == 5 - PRINT *, 'INFO:compiler_version_PATCH_digit_5[5]' -# elif COMPILER_VERSION_PATCH == 6 - PRINT *, 'INFO:compiler_version_PATCH_digit_5[6]' -# elif COMPILER_VERSION_PATCH == 7 - PRINT *, 'INFO:compiler_version_PATCH_digit_5[7]' -# elif COMPILER_VERSION_PATCH == 8 - PRINT *, 'INFO:compiler_version_PATCH_digit_5[8]' -# elif COMPILER_VERSION_PATCH == 9 - PRINT *, 'INFO:compiler_version_PATCH_digit_5[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_6(n) -# define HEX(n) HEX_6(n) -# if COMPILER_VERSION_PATCH == 0 - PRINT *, 'INFO:compiler_version_PATCH_digit_6[0]' -# elif COMPILER_VERSION_PATCH == 1 - PRINT *, 'INFO:compiler_version_PATCH_digit_6[1]' -# elif COMPILER_VERSION_PATCH == 2 - PRINT *, 'INFO:compiler_version_PATCH_digit_6[2]' -# elif COMPILER_VERSION_PATCH == 3 - PRINT *, 'INFO:compiler_version_PATCH_digit_6[3]' -# elif COMPILER_VERSION_PATCH == 4 - PRINT *, 'INFO:compiler_version_PATCH_digit_6[4]' -# elif COMPILER_VERSION_PATCH == 5 - PRINT *, 'INFO:compiler_version_PATCH_digit_6[5]' -# elif COMPILER_VERSION_PATCH == 6 - PRINT *, 'INFO:compiler_version_PATCH_digit_6[6]' -# elif COMPILER_VERSION_PATCH == 7 - PRINT *, 'INFO:compiler_version_PATCH_digit_6[7]' -# elif COMPILER_VERSION_PATCH == 8 - PRINT *, 'INFO:compiler_version_PATCH_digit_6[8]' -# elif COMPILER_VERSION_PATCH == 9 - PRINT *, 'INFO:compiler_version_PATCH_digit_6[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_7(n) -# define HEX(n) HEX_7(n) -# if COMPILER_VERSION_PATCH == 0 - PRINT *, 'INFO:compiler_version_PATCH_digit_7[0]' -# elif COMPILER_VERSION_PATCH == 1 - PRINT *, 'INFO:compiler_version_PATCH_digit_7[1]' -# elif COMPILER_VERSION_PATCH == 2 - PRINT *, 'INFO:compiler_version_PATCH_digit_7[2]' -# elif COMPILER_VERSION_PATCH == 3 - PRINT *, 'INFO:compiler_version_PATCH_digit_7[3]' -# elif COMPILER_VERSION_PATCH == 4 - PRINT *, 'INFO:compiler_version_PATCH_digit_7[4]' -# elif COMPILER_VERSION_PATCH == 5 - PRINT *, 'INFO:compiler_version_PATCH_digit_7[5]' -# elif COMPILER_VERSION_PATCH == 6 - PRINT *, 'INFO:compiler_version_PATCH_digit_7[6]' -# elif COMPILER_VERSION_PATCH == 7 - PRINT *, 'INFO:compiler_version_PATCH_digit_7[7]' -# elif COMPILER_VERSION_PATCH == 8 - PRINT *, 'INFO:compiler_version_PATCH_digit_7[8]' -# elif COMPILER_VERSION_PATCH == 9 - PRINT *, 'INFO:compiler_version_PATCH_digit_7[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_8(n) -# define HEX(n) HEX_8(n) -# if COMPILER_VERSION_PATCH == 0 - PRINT *, 'INFO:compiler_version_PATCH_digit_8[0]' -# elif COMPILER_VERSION_PATCH == 1 - PRINT *, 'INFO:compiler_version_PATCH_digit_8[1]' -# elif COMPILER_VERSION_PATCH == 2 - PRINT *, 'INFO:compiler_version_PATCH_digit_8[2]' -# elif COMPILER_VERSION_PATCH == 3 - PRINT *, 'INFO:compiler_version_PATCH_digit_8[3]' -# elif COMPILER_VERSION_PATCH == 4 - PRINT *, 'INFO:compiler_version_PATCH_digit_8[4]' -# elif COMPILER_VERSION_PATCH == 5 - PRINT *, 'INFO:compiler_version_PATCH_digit_8[5]' -# elif COMPILER_VERSION_PATCH == 6 - PRINT *, 'INFO:compiler_version_PATCH_digit_8[6]' -# elif COMPILER_VERSION_PATCH == 7 - PRINT *, 'INFO:compiler_version_PATCH_digit_8[7]' -# elif COMPILER_VERSION_PATCH == 8 - PRINT *, 'INFO:compiler_version_PATCH_digit_8[8]' -# elif COMPILER_VERSION_PATCH == 9 - PRINT *, 'INFO:compiler_version_PATCH_digit_8[9]' -# endif - -#endif -#if defined(COMPILER_VERSION_TWEAK) -# undef DEC -# undef HEX -# define DEC(n) DEC_1(n) -# define HEX(n) HEX_1(n) -# if COMPILER_VERSION_TWEAK == 0 - PRINT *, 'INFO:compiler_version_TWEAK_digit_1[0]' -# elif COMPILER_VERSION_TWEAK == 1 - PRINT *, 'INFO:compiler_version_TWEAK_digit_1[1]' -# elif COMPILER_VERSION_TWEAK == 2 - PRINT *, 'INFO:compiler_version_TWEAK_digit_1[2]' -# elif COMPILER_VERSION_TWEAK == 3 - PRINT *, 'INFO:compiler_version_TWEAK_digit_1[3]' -# elif COMPILER_VERSION_TWEAK == 4 - PRINT *, 'INFO:compiler_version_TWEAK_digit_1[4]' -# elif COMPILER_VERSION_TWEAK == 5 - PRINT *, 'INFO:compiler_version_TWEAK_digit_1[5]' -# elif COMPILER_VERSION_TWEAK == 6 - PRINT *, 'INFO:compiler_version_TWEAK_digit_1[6]' -# elif COMPILER_VERSION_TWEAK == 7 - PRINT *, 'INFO:compiler_version_TWEAK_digit_1[7]' -# elif COMPILER_VERSION_TWEAK == 8 - PRINT *, 'INFO:compiler_version_TWEAK_digit_1[8]' -# elif COMPILER_VERSION_TWEAK == 9 - PRINT *, 'INFO:compiler_version_TWEAK_digit_1[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_2(n) -# define HEX(n) HEX_2(n) -# if COMPILER_VERSION_TWEAK == 0 - PRINT *, 'INFO:compiler_version_TWEAK_digit_2[0]' -# elif COMPILER_VERSION_TWEAK == 1 - PRINT *, 'INFO:compiler_version_TWEAK_digit_2[1]' -# elif COMPILER_VERSION_TWEAK == 2 - PRINT *, 'INFO:compiler_version_TWEAK_digit_2[2]' -# elif COMPILER_VERSION_TWEAK == 3 - PRINT *, 'INFO:compiler_version_TWEAK_digit_2[3]' -# elif COMPILER_VERSION_TWEAK == 4 - PRINT *, 'INFO:compiler_version_TWEAK_digit_2[4]' -# elif COMPILER_VERSION_TWEAK == 5 - PRINT *, 'INFO:compiler_version_TWEAK_digit_2[5]' -# elif COMPILER_VERSION_TWEAK == 6 - PRINT *, 'INFO:compiler_version_TWEAK_digit_2[6]' -# elif COMPILER_VERSION_TWEAK == 7 - PRINT *, 'INFO:compiler_version_TWEAK_digit_2[7]' -# elif COMPILER_VERSION_TWEAK == 8 - PRINT *, 'INFO:compiler_version_TWEAK_digit_2[8]' -# elif COMPILER_VERSION_TWEAK == 9 - PRINT *, 'INFO:compiler_version_TWEAK_digit_2[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_3(n) -# define HEX(n) HEX_3(n) -# if COMPILER_VERSION_TWEAK == 0 - PRINT *, 'INFO:compiler_version_TWEAK_digit_3[0]' -# elif COMPILER_VERSION_TWEAK == 1 - PRINT *, 'INFO:compiler_version_TWEAK_digit_3[1]' -# elif COMPILER_VERSION_TWEAK == 2 - PRINT *, 'INFO:compiler_version_TWEAK_digit_3[2]' -# elif COMPILER_VERSION_TWEAK == 3 - PRINT *, 'INFO:compiler_version_TWEAK_digit_3[3]' -# elif COMPILER_VERSION_TWEAK == 4 - PRINT *, 'INFO:compiler_version_TWEAK_digit_3[4]' -# elif COMPILER_VERSION_TWEAK == 5 - PRINT *, 'INFO:compiler_version_TWEAK_digit_3[5]' -# elif COMPILER_VERSION_TWEAK == 6 - PRINT *, 'INFO:compiler_version_TWEAK_digit_3[6]' -# elif COMPILER_VERSION_TWEAK == 7 - PRINT *, 'INFO:compiler_version_TWEAK_digit_3[7]' -# elif COMPILER_VERSION_TWEAK == 8 - PRINT *, 'INFO:compiler_version_TWEAK_digit_3[8]' -# elif COMPILER_VERSION_TWEAK == 9 - PRINT *, 'INFO:compiler_version_TWEAK_digit_3[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_4(n) -# define HEX(n) HEX_4(n) -# if COMPILER_VERSION_TWEAK == 0 - PRINT *, 'INFO:compiler_version_TWEAK_digit_4[0]' -# elif COMPILER_VERSION_TWEAK == 1 - PRINT *, 'INFO:compiler_version_TWEAK_digit_4[1]' -# elif COMPILER_VERSION_TWEAK == 2 - PRINT *, 'INFO:compiler_version_TWEAK_digit_4[2]' -# elif COMPILER_VERSION_TWEAK == 3 - PRINT *, 'INFO:compiler_version_TWEAK_digit_4[3]' -# elif COMPILER_VERSION_TWEAK == 4 - PRINT *, 'INFO:compiler_version_TWEAK_digit_4[4]' -# elif COMPILER_VERSION_TWEAK == 5 - PRINT *, 'INFO:compiler_version_TWEAK_digit_4[5]' -# elif COMPILER_VERSION_TWEAK == 6 - PRINT *, 'INFO:compiler_version_TWEAK_digit_4[6]' -# elif COMPILER_VERSION_TWEAK == 7 - PRINT *, 'INFO:compiler_version_TWEAK_digit_4[7]' -# elif COMPILER_VERSION_TWEAK == 8 - PRINT *, 'INFO:compiler_version_TWEAK_digit_4[8]' -# elif COMPILER_VERSION_TWEAK == 9 - PRINT *, 'INFO:compiler_version_TWEAK_digit_4[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_5(n) -# define HEX(n) HEX_5(n) -# if COMPILER_VERSION_TWEAK == 0 - PRINT *, 'INFO:compiler_version_TWEAK_digit_5[0]' -# elif COMPILER_VERSION_TWEAK == 1 - PRINT *, 'INFO:compiler_version_TWEAK_digit_5[1]' -# elif COMPILER_VERSION_TWEAK == 2 - PRINT *, 'INFO:compiler_version_TWEAK_digit_5[2]' -# elif COMPILER_VERSION_TWEAK == 3 - PRINT *, 'INFO:compiler_version_TWEAK_digit_5[3]' -# elif COMPILER_VERSION_TWEAK == 4 - PRINT *, 'INFO:compiler_version_TWEAK_digit_5[4]' -# elif COMPILER_VERSION_TWEAK == 5 - PRINT *, 'INFO:compiler_version_TWEAK_digit_5[5]' -# elif COMPILER_VERSION_TWEAK == 6 - PRINT *, 'INFO:compiler_version_TWEAK_digit_5[6]' -# elif COMPILER_VERSION_TWEAK == 7 - PRINT *, 'INFO:compiler_version_TWEAK_digit_5[7]' -# elif COMPILER_VERSION_TWEAK == 8 - PRINT *, 'INFO:compiler_version_TWEAK_digit_5[8]' -# elif COMPILER_VERSION_TWEAK == 9 - PRINT *, 'INFO:compiler_version_TWEAK_digit_5[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_6(n) -# define HEX(n) HEX_6(n) -# if COMPILER_VERSION_TWEAK == 0 - PRINT *, 'INFO:compiler_version_TWEAK_digit_6[0]' -# elif COMPILER_VERSION_TWEAK == 1 - PRINT *, 'INFO:compiler_version_TWEAK_digit_6[1]' -# elif COMPILER_VERSION_TWEAK == 2 - PRINT *, 'INFO:compiler_version_TWEAK_digit_6[2]' -# elif COMPILER_VERSION_TWEAK == 3 - PRINT *, 'INFO:compiler_version_TWEAK_digit_6[3]' -# elif COMPILER_VERSION_TWEAK == 4 - PRINT *, 'INFO:compiler_version_TWEAK_digit_6[4]' -# elif COMPILER_VERSION_TWEAK == 5 - PRINT *, 'INFO:compiler_version_TWEAK_digit_6[5]' -# elif COMPILER_VERSION_TWEAK == 6 - PRINT *, 'INFO:compiler_version_TWEAK_digit_6[6]' -# elif COMPILER_VERSION_TWEAK == 7 - PRINT *, 'INFO:compiler_version_TWEAK_digit_6[7]' -# elif COMPILER_VERSION_TWEAK == 8 - PRINT *, 'INFO:compiler_version_TWEAK_digit_6[8]' -# elif COMPILER_VERSION_TWEAK == 9 - PRINT *, 'INFO:compiler_version_TWEAK_digit_6[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_7(n) -# define HEX(n) HEX_7(n) -# if COMPILER_VERSION_TWEAK == 0 - PRINT *, 'INFO:compiler_version_TWEAK_digit_7[0]' -# elif COMPILER_VERSION_TWEAK == 1 - PRINT *, 'INFO:compiler_version_TWEAK_digit_7[1]' -# elif COMPILER_VERSION_TWEAK == 2 - PRINT *, 'INFO:compiler_version_TWEAK_digit_7[2]' -# elif COMPILER_VERSION_TWEAK == 3 - PRINT *, 'INFO:compiler_version_TWEAK_digit_7[3]' -# elif COMPILER_VERSION_TWEAK == 4 - PRINT *, 'INFO:compiler_version_TWEAK_digit_7[4]' -# elif COMPILER_VERSION_TWEAK == 5 - PRINT *, 'INFO:compiler_version_TWEAK_digit_7[5]' -# elif COMPILER_VERSION_TWEAK == 6 - PRINT *, 'INFO:compiler_version_TWEAK_digit_7[6]' -# elif COMPILER_VERSION_TWEAK == 7 - PRINT *, 'INFO:compiler_version_TWEAK_digit_7[7]' -# elif COMPILER_VERSION_TWEAK == 8 - PRINT *, 'INFO:compiler_version_TWEAK_digit_7[8]' -# elif COMPILER_VERSION_TWEAK == 9 - PRINT *, 'INFO:compiler_version_TWEAK_digit_7[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_8(n) -# define HEX(n) HEX_8(n) -# if COMPILER_VERSION_TWEAK == 0 - PRINT *, 'INFO:compiler_version_TWEAK_digit_8[0]' -# elif COMPILER_VERSION_TWEAK == 1 - PRINT *, 'INFO:compiler_version_TWEAK_digit_8[1]' -# elif COMPILER_VERSION_TWEAK == 2 - PRINT *, 'INFO:compiler_version_TWEAK_digit_8[2]' -# elif COMPILER_VERSION_TWEAK == 3 - PRINT *, 'INFO:compiler_version_TWEAK_digit_8[3]' -# elif COMPILER_VERSION_TWEAK == 4 - PRINT *, 'INFO:compiler_version_TWEAK_digit_8[4]' -# elif COMPILER_VERSION_TWEAK == 5 - PRINT *, 'INFO:compiler_version_TWEAK_digit_8[5]' -# elif COMPILER_VERSION_TWEAK == 6 - PRINT *, 'INFO:compiler_version_TWEAK_digit_8[6]' -# elif COMPILER_VERSION_TWEAK == 7 - PRINT *, 'INFO:compiler_version_TWEAK_digit_8[7]' -# elif COMPILER_VERSION_TWEAK == 8 - PRINT *, 'INFO:compiler_version_TWEAK_digit_8[8]' -# elif COMPILER_VERSION_TWEAK == 9 - PRINT *, 'INFO:compiler_version_TWEAK_digit_8[9]' -# endif - -#endif - - END diff --git a/src/Build/CMakeFiles/3.16.0/CompilerIdFortran/a.out b/src/Build/CMakeFiles/3.16.0/CompilerIdFortran/a.out deleted file mode 100755 index 5e7f5c4..0000000 Binary files a/src/Build/CMakeFiles/3.16.0/CompilerIdFortran/a.out and /dev/null differ diff --git a/src/Build/CMakeFiles/3.17.1/CMakeDetermineCompilerABI_Fortran.bin b/src/Build/CMakeFiles/3.17.1/CMakeDetermineCompilerABI_Fortran.bin deleted file mode 100755 index a18b781..0000000 --- a/src/Build/CMakeFiles/3.17.1/CMakeDetermineCompilerABI_Fortran.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1459d4a96c146edcaf484f8a4230cc1dfa26cf798ac6f30179f954d669042e76 -size 802928 diff --git a/src/Build/CMakeFiles/3.17.1/CMakeFortranCompiler.cmake b/src/Build/CMakeFiles/3.17.1/CMakeFortranCompiler.cmake deleted file mode 100644 index 1c67d58..0000000 --- a/src/Build/CMakeFiles/3.17.1/CMakeFortranCompiler.cmake +++ /dev/null @@ -1,68 +0,0 @@ -set(CMAKE_Fortran_COMPILER "/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/ifort") -set(CMAKE_Fortran_COMPILER_ARG1 "") -set(CMAKE_Fortran_COMPILER_ID "Intel") -set(CMAKE_Fortran_COMPILER_VERSION "18.0.3.20180410") -set(CMAKE_Fortran_COMPILER_WRAPPER "") -set(CMAKE_Fortran_PLATFORM_ID "Linux") -set(CMAKE_Fortran_SIMULATE_ID "") -set(CMAKE_Fortran_SIMULATE_VERSION "") - - - -set(CMAKE_AR "/usr/bin/ar") -set(CMAKE_Fortran_COMPILER_AR "") -set(CMAKE_RANLIB "/usr/bin/ranlib") -set(CMAKE_Fortran_COMPILER_RANLIB "") -set(CMAKE_COMPILER_IS_GNUG77 ) -set(CMAKE_Fortran_COMPILER_LOADED 1) -set(CMAKE_Fortran_COMPILER_WORKS TRUE) -set(CMAKE_Fortran_ABI_COMPILED TRUE) -set(CMAKE_COMPILER_IS_MINGW ) -set(CMAKE_COMPILER_IS_CYGWIN ) -if(CMAKE_COMPILER_IS_CYGWIN) - set(CYGWIN 1) - set(UNIX 1) -endif() - -set(CMAKE_Fortran_COMPILER_ENV_VAR "FC") - -set(CMAKE_Fortran_COMPILER_SUPPORTS_F90 1) - -if(CMAKE_COMPILER_IS_MINGW) - set(MINGW 1) -endif() -set(CMAKE_Fortran_COMPILER_ID_RUN 1) -set(CMAKE_Fortran_SOURCE_FILE_EXTENSIONS f;F;fpp;FPP;f77;F77;f90;F90;for;For;FOR;f95;F95) -set(CMAKE_Fortran_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) -set(CMAKE_Fortran_LINKER_PREFERENCE 20) -if(UNIX) - set(CMAKE_Fortran_OUTPUT_EXTENSION .o) -else() - set(CMAKE_Fortran_OUTPUT_EXTENSION .obj) -endif() - -# Save compiler ABI information. -set(CMAKE_Fortran_SIZEOF_DATA_PTR "8") -set(CMAKE_Fortran_COMPILER_ABI "ELF") -set(CMAKE_Fortran_LIBRARY_ARCHITECTURE "") - -if(CMAKE_Fortran_SIZEOF_DATA_PTR AND NOT CMAKE_SIZEOF_VOID_P) - set(CMAKE_SIZEOF_VOID_P "${CMAKE_Fortran_SIZEOF_DATA_PTR}") -endif() - -if(CMAKE_Fortran_COMPILER_ABI) - set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_Fortran_COMPILER_ABI}") -endif() - -if(CMAKE_Fortran_LIBRARY_ARCHITECTURE) - set(CMAKE_LIBRARY_ARCHITECTURE "") -endif() - - - - - -set(CMAKE_Fortran_IMPLICIT_INCLUDE_DIRECTORIES "/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/include;/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/include;/opt/intel/18/compilers_and_libraries_2018.3.222/linux/pstl/include;/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include;/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/intel64;/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/icc;/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include;/usr/local/include;/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include;/usr/include") -set(CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "ifport;ifcoremt;imf;svml;m;ipgo;iomp5;irc;pthread;svml;c;gcc;gcc_s;irc_s;dl;c") -set(CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES "/opt/intel/18/clck/2018.3/lib/intel64;/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/lib/intel64;/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin;/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin;/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/lib/intel64/gcc4.4;/usr/lib/gcc/x86_64-redhat-linux/4.8.5;/usr/lib64;/lib64;/usr/lib;/lib") -set(CMAKE_Fortran_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/src/Build/CMakeFiles/3.17.1/CMakeSystem.cmake b/src/Build/CMakeFiles/3.17.1/CMakeSystem.cmake deleted file mode 100644 index 685c4bf..0000000 --- a/src/Build/CMakeFiles/3.17.1/CMakeSystem.cmake +++ /dev/null @@ -1,15 +0,0 @@ -set(CMAKE_HOST_SYSTEM "Linux-3.10.0-957.1.3.el7.x86_64") -set(CMAKE_HOST_SYSTEM_NAME "Linux") -set(CMAKE_HOST_SYSTEM_VERSION "3.10.0-957.1.3.el7.x86_64") -set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") - - - -set(CMAKE_SYSTEM "Linux-3.10.0-957.1.3.el7.x86_64") -set(CMAKE_SYSTEM_NAME "Linux") -set(CMAKE_SYSTEM_VERSION "3.10.0-957.1.3.el7.x86_64") -set(CMAKE_SYSTEM_PROCESSOR "x86_64") - -set(CMAKE_CROSSCOMPILING "FALSE") - -set(CMAKE_SYSTEM_LOADED 1) diff --git a/src/Build/CMakeFiles/3.17.1/CompilerIdFortran/CMakeFortranCompilerId.F b/src/Build/CMakeFiles/3.17.1/CompilerIdFortran/CMakeFortranCompilerId.F deleted file mode 100644 index 3b1e181..0000000 --- a/src/Build/CMakeFiles/3.17.1/CompilerIdFortran/CMakeFortranCompilerId.F +++ /dev/null @@ -1,1040 +0,0 @@ - PROGRAM CMakeFortranCompilerId -#if 0 -! Identify the compiler -#endif -#if defined(_MSC_VER) - PRINT *, 'INFO:simulate[MSVC]' -# if _MSC_VER >= 1900 - PRINT *, 'INFO:simulate_version[019.00]' -# elif _MSC_VER >= 1800 - PRINT *, 'INFO:simulate_version[018.00]' -# elif _MSC_VER >= 1700 - PRINT *, 'INFO:simulate_version[017.00]' -# elif _MSC_VER >= 1600 - PRINT *, 'INFO:simulate_version[016.00]' -# elif _MSC_VER >= 1500 - PRINT *, 'INFO:simulate_version[015.00]' -# elif _MSC_VER >= 1400 - PRINT *, 'INFO:simulate_version[014.00]' -# elif _MSC_VER >= 1310 - PRINT *, 'INFO:simulate_version[013.01]' -# else - PRINT *, 'INFO:simulate_version[013.00]' -# endif -#endif -#if defined(__INTEL_COMPILER) || defined(__ICC) - PRINT *, 'INFO:compiler[Intel]' -# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) -# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) -# if defined(__INTEL_COMPILER_UPDATE) -# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) -# else -# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) -# endif -# if defined(__INTEL_COMPILER_BUILD_DATE) -# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) -# endif -#elif defined(__SUNPRO_F95) - PRINT *, 'INFO:compiler[SunPro]' -# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_F95>>8) -# define COMPILER_VERSION_MINOR HEX(__SUNPRO_F95>>4 & 0xF) -# define COMPILER_VERSION_PATCH HEX(__SUNPRO_F95 & 0xF) -#elif defined(__SUNPRO_F90) - PRINT *, 'INFO:compiler[SunPro]' -# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_F90>>8) -# define COMPILER_VERSION_MINOR HEX(__SUNPRO_F90>>4 & 0xF) -# define COMPILER_VERSION_PATCH HEX(__SUNPRO_F90 & 0xF) -#elif defined(_CRAYFTN) - PRINT *, 'INFO:compiler[Cray]' -# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) -# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) -#elif defined(__G95__) - PRINT *, 'INFO:compiler[G95]' -# define COMPILER_VERSION_MAJOR DEC(__G95__) -# define COMPILER_VERSION_MINOR DEC(__G95_MINOR__) -#elif defined(__PATHSCALE__) - PRINT *, 'INFO:compiler[PathScale]' -# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) -# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) -# if defined(__PATHCC_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) -# endif -#elif defined(__ABSOFT__) - PRINT *, 'INFO:compiler[Absoft]' -#elif defined(__GNUC__) - PRINT *, 'INFO:compiler[GNU]' -# define COMPILER_VERSION_MAJOR DEC(__GNUC__) -# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) -# if defined(__GNUC_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) -# endif -#elif defined(__IBMC__) -# if defined(__COMPILER_VER__) - PRINT *, 'INFO:compiler[zOS]' -# elif __IBMC__ >= 800 - PRINT *, 'INFO:compiler[XL]' -# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) -# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) -# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) -# else - PRINT *, 'INFO:compiler[VisualAge]' -# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) -# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) -# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) -# endif -#elif defined(__PGI) - PRINT *, 'INFO:compiler[PGI]' -# define COMPILER_VERSION_MAJOR DEC(__PGIC__) -# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) -# if defined(__PGIC_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) -# endif -#elif defined(__FLANG) - PRINT *, 'INFO:compiler[Flang]' -# define COMPILER_VERSION_MAJOR DEC(__FLANG_MAJOR__) -# define COMPILER_VERSION_MINOR DEC(__FLANG_MINOR__) -# if defined(__FLANG_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__FLANG_PATCHLEVEL__) -# endif -#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) - PRINT *, 'INFO:compiler[VisualAge]' -#elif defined(__hpux) || defined(__hpux__) - PRINT *, 'INFO:compiler[HP]' -#elif defined(NAGFOR) - PRINT *, 'INFO:compiler[NAG]' -#define COMPILER_VERSION_MAJOR DEC(__NAG_COMPILER_RELEASE/10) -#define COMPILER_VERSION_MINOR DEC(__NAG_COMPILER_RELEASE % 10) -#define COMPILER_VERSION_PATCH DEC(__NAG_COMPILER_BUILD) -#else - PRINT *, 'INFO:compiler[]' -#endif -#if defined(__CRAYXE) || defined(__CRAYXC) - PRINT *, 'INFO:compiler_wrapper[CrayPrgEnv]' -#endif - -#if 0 -! Identify the platform -#endif -#if defined(__linux) || defined(__linux__) || defined(linux) - PRINT *, 'INFO:platform[Linux]' -#elif defined(__CYGWIN__) - PRINT *, 'INFO:platform[Cygwin]' -#elif defined(__MINGW32__) - PRINT *, 'INFO:platform[MinGW]' -#elif defined(__APPLE__) - PRINT *, 'INFO:platform[Darwin]' -#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) - PRINT *, 'INFO:platform[Windows]' -#elif defined(__FreeBSD__) || defined(__FreeBSD) - PRINT *, 'INFO:platform[FreeBSD]' -#elif defined(__NetBSD__) || defined(__NetBSD) - PRINT *, 'INFO:platform[NetBSD]' -#elif defined(__OpenBSD__) || defined(__OPENBSD) - PRINT *, 'INFO:platform[OpenBSD]' -#elif defined(__sun) || defined(sun) - PRINT *, 'INFO:platform[SunOS]' -#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) - PRINT *, 'INFO:platform[AIX]' -#elif defined(__hpux) || defined(__hpux__) - PRINT *, 'INFO:platform[HP-UX]' -#elif defined(__HAIKU__) - PRINT *, 'INFO:platform[Haiku]' -#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) - PRINT *, 'INFO:platform[BeOS]' -#elif defined(__QNX__) || defined(__QNXNTO__) - PRINT *, 'INFO:platform[QNX]' -#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) - PRINT *, 'INFO:platform[Tru64]' -#elif defined(__riscos) || defined(__riscos__) - PRINT *, 'INFO:platform[RISCos]' -#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) - PRINT *, 'INFO:platform[SINIX]' -#elif defined(__UNIX_SV__) - PRINT *, 'INFO:platform[UNIX_SV]' -#elif defined(__bsdos__) - PRINT *, 'INFO:platform[BSDOS]' -#elif defined(_MPRAS) || defined(MPRAS) - PRINT *, 'INFO:platform[MP-RAS]' -#elif defined(__osf) || defined(__osf__) - PRINT *, 'INFO:platform[OSF1]' -#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) - PRINT *, 'INFO:platform[SCO_SV]' -#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) - PRINT *, 'INFO:platform[ULTRIX]' -#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) - PRINT *, 'INFO:platform[Xenix]' -#else - PRINT *, 'INFO:platform[]' -#endif -#if defined(_WIN32) && (defined(__INTEL_COMPILER) || defined(__ICC)) -# if defined(_M_IA64) - PRINT *, 'INFO:arch[IA64]' -# elif defined(_M_X64) || defined(_M_AMD64) - PRINT *, 'INFO:arch[x64]' -# elif defined(_M_IX86) - PRINT *, 'INFO:arch[X86]' -# endif -#endif - -#if 0 -! Encode compiler version digits -#endif -#define DEC_8(n) (((n) / 10000000) % 10) -#define DEC_7(n) (((n) / 1000000) % 10) -#define DEC_6(n) (((n) / 100000) % 10) -#define DEC_5(n) (((n) / 10000) % 10) -#define DEC_4(n) (((n) / 1000) % 10) -#define DEC_3(n) (((n) / 100) % 10) -#define DEC_2(n) (((n) / 10) % 10) -#define DEC_1(n) (((n) ) % 10) -#define HEX_8(n) ((n)>>28 & 0xF) -#define HEX_7(n) ((n)>>24 & 0xF) -#define HEX_6(n) ((n)>>20 & 0xF) -#define HEX_5(n) ((n)>>16 & 0xF) -#define HEX_4(n) ((n)>>12 & 0xF) -#define HEX_3(n) ((n)>>8 & 0xF) -#define HEX_2(n) ((n)>>4 & 0xF) -#define HEX_1(n) ((n) & 0xF) - -#if defined(COMPILER_VERSION_MAJOR) -# undef DEC -# undef HEX -# define DEC(n) DEC_1(n) -# define HEX(n) HEX_1(n) -# if COMPILER_VERSION_MAJOR == 0 - PRINT *, 'INFO:compiler_version_MAJOR_digit_1[0]' -# elif COMPILER_VERSION_MAJOR == 1 - PRINT *, 'INFO:compiler_version_MAJOR_digit_1[1]' -# elif COMPILER_VERSION_MAJOR == 2 - PRINT *, 'INFO:compiler_version_MAJOR_digit_1[2]' -# elif COMPILER_VERSION_MAJOR == 3 - PRINT *, 'INFO:compiler_version_MAJOR_digit_1[3]' -# elif COMPILER_VERSION_MAJOR == 4 - PRINT *, 'INFO:compiler_version_MAJOR_digit_1[4]' -# elif COMPILER_VERSION_MAJOR == 5 - PRINT *, 'INFO:compiler_version_MAJOR_digit_1[5]' -# elif COMPILER_VERSION_MAJOR == 6 - PRINT *, 'INFO:compiler_version_MAJOR_digit_1[6]' -# elif COMPILER_VERSION_MAJOR == 7 - PRINT *, 'INFO:compiler_version_MAJOR_digit_1[7]' -# elif COMPILER_VERSION_MAJOR == 8 - PRINT *, 'INFO:compiler_version_MAJOR_digit_1[8]' -# elif COMPILER_VERSION_MAJOR == 9 - PRINT *, 'INFO:compiler_version_MAJOR_digit_1[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_2(n) -# define HEX(n) HEX_2(n) -# if COMPILER_VERSION_MAJOR == 0 - PRINT *, 'INFO:compiler_version_MAJOR_digit_2[0]' -# elif COMPILER_VERSION_MAJOR == 1 - PRINT *, 'INFO:compiler_version_MAJOR_digit_2[1]' -# elif COMPILER_VERSION_MAJOR == 2 - PRINT *, 'INFO:compiler_version_MAJOR_digit_2[2]' -# elif COMPILER_VERSION_MAJOR == 3 - PRINT *, 'INFO:compiler_version_MAJOR_digit_2[3]' -# elif COMPILER_VERSION_MAJOR == 4 - PRINT *, 'INFO:compiler_version_MAJOR_digit_2[4]' -# elif COMPILER_VERSION_MAJOR == 5 - PRINT *, 'INFO:compiler_version_MAJOR_digit_2[5]' -# elif COMPILER_VERSION_MAJOR == 6 - PRINT *, 'INFO:compiler_version_MAJOR_digit_2[6]' -# elif COMPILER_VERSION_MAJOR == 7 - PRINT *, 'INFO:compiler_version_MAJOR_digit_2[7]' -# elif COMPILER_VERSION_MAJOR == 8 - PRINT *, 'INFO:compiler_version_MAJOR_digit_2[8]' -# elif COMPILER_VERSION_MAJOR == 9 - PRINT *, 'INFO:compiler_version_MAJOR_digit_2[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_3(n) -# define HEX(n) HEX_3(n) -# if COMPILER_VERSION_MAJOR == 0 - PRINT *, 'INFO:compiler_version_MAJOR_digit_3[0]' -# elif COMPILER_VERSION_MAJOR == 1 - PRINT *, 'INFO:compiler_version_MAJOR_digit_3[1]' -# elif COMPILER_VERSION_MAJOR == 2 - PRINT *, 'INFO:compiler_version_MAJOR_digit_3[2]' -# elif COMPILER_VERSION_MAJOR == 3 - PRINT *, 'INFO:compiler_version_MAJOR_digit_3[3]' -# elif COMPILER_VERSION_MAJOR == 4 - PRINT *, 'INFO:compiler_version_MAJOR_digit_3[4]' -# elif COMPILER_VERSION_MAJOR == 5 - PRINT *, 'INFO:compiler_version_MAJOR_digit_3[5]' -# elif COMPILER_VERSION_MAJOR == 6 - PRINT *, 'INFO:compiler_version_MAJOR_digit_3[6]' -# elif COMPILER_VERSION_MAJOR == 7 - PRINT *, 'INFO:compiler_version_MAJOR_digit_3[7]' -# elif COMPILER_VERSION_MAJOR == 8 - PRINT *, 'INFO:compiler_version_MAJOR_digit_3[8]' -# elif COMPILER_VERSION_MAJOR == 9 - PRINT *, 'INFO:compiler_version_MAJOR_digit_3[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_4(n) -# define HEX(n) HEX_4(n) -# if COMPILER_VERSION_MAJOR == 0 - PRINT *, 'INFO:compiler_version_MAJOR_digit_4[0]' -# elif COMPILER_VERSION_MAJOR == 1 - PRINT *, 'INFO:compiler_version_MAJOR_digit_4[1]' -# elif COMPILER_VERSION_MAJOR == 2 - PRINT *, 'INFO:compiler_version_MAJOR_digit_4[2]' -# elif COMPILER_VERSION_MAJOR == 3 - PRINT *, 'INFO:compiler_version_MAJOR_digit_4[3]' -# elif COMPILER_VERSION_MAJOR == 4 - PRINT *, 'INFO:compiler_version_MAJOR_digit_4[4]' -# elif COMPILER_VERSION_MAJOR == 5 - PRINT *, 'INFO:compiler_version_MAJOR_digit_4[5]' -# elif COMPILER_VERSION_MAJOR == 6 - PRINT *, 'INFO:compiler_version_MAJOR_digit_4[6]' -# elif COMPILER_VERSION_MAJOR == 7 - PRINT *, 'INFO:compiler_version_MAJOR_digit_4[7]' -# elif COMPILER_VERSION_MAJOR == 8 - PRINT *, 'INFO:compiler_version_MAJOR_digit_4[8]' -# elif COMPILER_VERSION_MAJOR == 9 - PRINT *, 'INFO:compiler_version_MAJOR_digit_4[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_5(n) -# define HEX(n) HEX_5(n) -# if COMPILER_VERSION_MAJOR == 0 - PRINT *, 'INFO:compiler_version_MAJOR_digit_5[0]' -# elif COMPILER_VERSION_MAJOR == 1 - PRINT *, 'INFO:compiler_version_MAJOR_digit_5[1]' -# elif COMPILER_VERSION_MAJOR == 2 - PRINT *, 'INFO:compiler_version_MAJOR_digit_5[2]' -# elif COMPILER_VERSION_MAJOR == 3 - PRINT *, 'INFO:compiler_version_MAJOR_digit_5[3]' -# elif COMPILER_VERSION_MAJOR == 4 - PRINT *, 'INFO:compiler_version_MAJOR_digit_5[4]' -# elif COMPILER_VERSION_MAJOR == 5 - PRINT *, 'INFO:compiler_version_MAJOR_digit_5[5]' -# elif COMPILER_VERSION_MAJOR == 6 - PRINT *, 'INFO:compiler_version_MAJOR_digit_5[6]' -# elif COMPILER_VERSION_MAJOR == 7 - PRINT *, 'INFO:compiler_version_MAJOR_digit_5[7]' -# elif COMPILER_VERSION_MAJOR == 8 - PRINT *, 'INFO:compiler_version_MAJOR_digit_5[8]' -# elif COMPILER_VERSION_MAJOR == 9 - PRINT *, 'INFO:compiler_version_MAJOR_digit_5[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_6(n) -# define HEX(n) HEX_6(n) -# if COMPILER_VERSION_MAJOR == 0 - PRINT *, 'INFO:compiler_version_MAJOR_digit_6[0]' -# elif COMPILER_VERSION_MAJOR == 1 - PRINT *, 'INFO:compiler_version_MAJOR_digit_6[1]' -# elif COMPILER_VERSION_MAJOR == 2 - PRINT *, 'INFO:compiler_version_MAJOR_digit_6[2]' -# elif COMPILER_VERSION_MAJOR == 3 - PRINT *, 'INFO:compiler_version_MAJOR_digit_6[3]' -# elif COMPILER_VERSION_MAJOR == 4 - PRINT *, 'INFO:compiler_version_MAJOR_digit_6[4]' -# elif COMPILER_VERSION_MAJOR == 5 - PRINT *, 'INFO:compiler_version_MAJOR_digit_6[5]' -# elif COMPILER_VERSION_MAJOR == 6 - PRINT *, 'INFO:compiler_version_MAJOR_digit_6[6]' -# elif COMPILER_VERSION_MAJOR == 7 - PRINT *, 'INFO:compiler_version_MAJOR_digit_6[7]' -# elif COMPILER_VERSION_MAJOR == 8 - PRINT *, 'INFO:compiler_version_MAJOR_digit_6[8]' -# elif COMPILER_VERSION_MAJOR == 9 - PRINT *, 'INFO:compiler_version_MAJOR_digit_6[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_7(n) -# define HEX(n) HEX_7(n) -# if COMPILER_VERSION_MAJOR == 0 - PRINT *, 'INFO:compiler_version_MAJOR_digit_7[0]' -# elif COMPILER_VERSION_MAJOR == 1 - PRINT *, 'INFO:compiler_version_MAJOR_digit_7[1]' -# elif COMPILER_VERSION_MAJOR == 2 - PRINT *, 'INFO:compiler_version_MAJOR_digit_7[2]' -# elif COMPILER_VERSION_MAJOR == 3 - PRINT *, 'INFO:compiler_version_MAJOR_digit_7[3]' -# elif COMPILER_VERSION_MAJOR == 4 - PRINT *, 'INFO:compiler_version_MAJOR_digit_7[4]' -# elif COMPILER_VERSION_MAJOR == 5 - PRINT *, 'INFO:compiler_version_MAJOR_digit_7[5]' -# elif COMPILER_VERSION_MAJOR == 6 - PRINT *, 'INFO:compiler_version_MAJOR_digit_7[6]' -# elif COMPILER_VERSION_MAJOR == 7 - PRINT *, 'INFO:compiler_version_MAJOR_digit_7[7]' -# elif COMPILER_VERSION_MAJOR == 8 - PRINT *, 'INFO:compiler_version_MAJOR_digit_7[8]' -# elif COMPILER_VERSION_MAJOR == 9 - PRINT *, 'INFO:compiler_version_MAJOR_digit_7[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_8(n) -# define HEX(n) HEX_8(n) -# if COMPILER_VERSION_MAJOR == 0 - PRINT *, 'INFO:compiler_version_MAJOR_digit_8[0]' -# elif COMPILER_VERSION_MAJOR == 1 - PRINT *, 'INFO:compiler_version_MAJOR_digit_8[1]' -# elif COMPILER_VERSION_MAJOR == 2 - PRINT *, 'INFO:compiler_version_MAJOR_digit_8[2]' -# elif COMPILER_VERSION_MAJOR == 3 - PRINT *, 'INFO:compiler_version_MAJOR_digit_8[3]' -# elif COMPILER_VERSION_MAJOR == 4 - PRINT *, 'INFO:compiler_version_MAJOR_digit_8[4]' -# elif COMPILER_VERSION_MAJOR == 5 - PRINT *, 'INFO:compiler_version_MAJOR_digit_8[5]' -# elif COMPILER_VERSION_MAJOR == 6 - PRINT *, 'INFO:compiler_version_MAJOR_digit_8[6]' -# elif COMPILER_VERSION_MAJOR == 7 - PRINT *, 'INFO:compiler_version_MAJOR_digit_8[7]' -# elif COMPILER_VERSION_MAJOR == 8 - PRINT *, 'INFO:compiler_version_MAJOR_digit_8[8]' -# elif COMPILER_VERSION_MAJOR == 9 - PRINT *, 'INFO:compiler_version_MAJOR_digit_8[9]' -# endif - -#endif -#if defined(COMPILER_VERSION_MINOR) -# undef DEC -# undef HEX -# define DEC(n) DEC_1(n) -# define HEX(n) HEX_1(n) -# if COMPILER_VERSION_MINOR == 0 - PRINT *, 'INFO:compiler_version_MINOR_digit_1[0]' -# elif COMPILER_VERSION_MINOR == 1 - PRINT *, 'INFO:compiler_version_MINOR_digit_1[1]' -# elif COMPILER_VERSION_MINOR == 2 - PRINT *, 'INFO:compiler_version_MINOR_digit_1[2]' -# elif COMPILER_VERSION_MINOR == 3 - PRINT *, 'INFO:compiler_version_MINOR_digit_1[3]' -# elif COMPILER_VERSION_MINOR == 4 - PRINT *, 'INFO:compiler_version_MINOR_digit_1[4]' -# elif COMPILER_VERSION_MINOR == 5 - PRINT *, 'INFO:compiler_version_MINOR_digit_1[5]' -# elif COMPILER_VERSION_MINOR == 6 - PRINT *, 'INFO:compiler_version_MINOR_digit_1[6]' -# elif COMPILER_VERSION_MINOR == 7 - PRINT *, 'INFO:compiler_version_MINOR_digit_1[7]' -# elif COMPILER_VERSION_MINOR == 8 - PRINT *, 'INFO:compiler_version_MINOR_digit_1[8]' -# elif COMPILER_VERSION_MINOR == 9 - PRINT *, 'INFO:compiler_version_MINOR_digit_1[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_2(n) -# define HEX(n) HEX_2(n) -# if COMPILER_VERSION_MINOR == 0 - PRINT *, 'INFO:compiler_version_MINOR_digit_2[0]' -# elif COMPILER_VERSION_MINOR == 1 - PRINT *, 'INFO:compiler_version_MINOR_digit_2[1]' -# elif COMPILER_VERSION_MINOR == 2 - PRINT *, 'INFO:compiler_version_MINOR_digit_2[2]' -# elif COMPILER_VERSION_MINOR == 3 - PRINT *, 'INFO:compiler_version_MINOR_digit_2[3]' -# elif COMPILER_VERSION_MINOR == 4 - PRINT *, 'INFO:compiler_version_MINOR_digit_2[4]' -# elif COMPILER_VERSION_MINOR == 5 - PRINT *, 'INFO:compiler_version_MINOR_digit_2[5]' -# elif COMPILER_VERSION_MINOR == 6 - PRINT *, 'INFO:compiler_version_MINOR_digit_2[6]' -# elif COMPILER_VERSION_MINOR == 7 - PRINT *, 'INFO:compiler_version_MINOR_digit_2[7]' -# elif COMPILER_VERSION_MINOR == 8 - PRINT *, 'INFO:compiler_version_MINOR_digit_2[8]' -# elif COMPILER_VERSION_MINOR == 9 - PRINT *, 'INFO:compiler_version_MINOR_digit_2[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_3(n) -# define HEX(n) HEX_3(n) -# if COMPILER_VERSION_MINOR == 0 - PRINT *, 'INFO:compiler_version_MINOR_digit_3[0]' -# elif COMPILER_VERSION_MINOR == 1 - PRINT *, 'INFO:compiler_version_MINOR_digit_3[1]' -# elif COMPILER_VERSION_MINOR == 2 - PRINT *, 'INFO:compiler_version_MINOR_digit_3[2]' -# elif COMPILER_VERSION_MINOR == 3 - PRINT *, 'INFO:compiler_version_MINOR_digit_3[3]' -# elif COMPILER_VERSION_MINOR == 4 - PRINT *, 'INFO:compiler_version_MINOR_digit_3[4]' -# elif COMPILER_VERSION_MINOR == 5 - PRINT *, 'INFO:compiler_version_MINOR_digit_3[5]' -# elif COMPILER_VERSION_MINOR == 6 - PRINT *, 'INFO:compiler_version_MINOR_digit_3[6]' -# elif COMPILER_VERSION_MINOR == 7 - PRINT *, 'INFO:compiler_version_MINOR_digit_3[7]' -# elif COMPILER_VERSION_MINOR == 8 - PRINT *, 'INFO:compiler_version_MINOR_digit_3[8]' -# elif COMPILER_VERSION_MINOR == 9 - PRINT *, 'INFO:compiler_version_MINOR_digit_3[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_4(n) -# define HEX(n) HEX_4(n) -# if COMPILER_VERSION_MINOR == 0 - PRINT *, 'INFO:compiler_version_MINOR_digit_4[0]' -# elif COMPILER_VERSION_MINOR == 1 - PRINT *, 'INFO:compiler_version_MINOR_digit_4[1]' -# elif COMPILER_VERSION_MINOR == 2 - PRINT *, 'INFO:compiler_version_MINOR_digit_4[2]' -# elif COMPILER_VERSION_MINOR == 3 - PRINT *, 'INFO:compiler_version_MINOR_digit_4[3]' -# elif COMPILER_VERSION_MINOR == 4 - PRINT *, 'INFO:compiler_version_MINOR_digit_4[4]' -# elif COMPILER_VERSION_MINOR == 5 - PRINT *, 'INFO:compiler_version_MINOR_digit_4[5]' -# elif COMPILER_VERSION_MINOR == 6 - PRINT *, 'INFO:compiler_version_MINOR_digit_4[6]' -# elif COMPILER_VERSION_MINOR == 7 - PRINT *, 'INFO:compiler_version_MINOR_digit_4[7]' -# elif COMPILER_VERSION_MINOR == 8 - PRINT *, 'INFO:compiler_version_MINOR_digit_4[8]' -# elif COMPILER_VERSION_MINOR == 9 - PRINT *, 'INFO:compiler_version_MINOR_digit_4[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_5(n) -# define HEX(n) HEX_5(n) -# if COMPILER_VERSION_MINOR == 0 - PRINT *, 'INFO:compiler_version_MINOR_digit_5[0]' -# elif COMPILER_VERSION_MINOR == 1 - PRINT *, 'INFO:compiler_version_MINOR_digit_5[1]' -# elif COMPILER_VERSION_MINOR == 2 - PRINT *, 'INFO:compiler_version_MINOR_digit_5[2]' -# elif COMPILER_VERSION_MINOR == 3 - PRINT *, 'INFO:compiler_version_MINOR_digit_5[3]' -# elif COMPILER_VERSION_MINOR == 4 - PRINT *, 'INFO:compiler_version_MINOR_digit_5[4]' -# elif COMPILER_VERSION_MINOR == 5 - PRINT *, 'INFO:compiler_version_MINOR_digit_5[5]' -# elif COMPILER_VERSION_MINOR == 6 - PRINT *, 'INFO:compiler_version_MINOR_digit_5[6]' -# elif COMPILER_VERSION_MINOR == 7 - PRINT *, 'INFO:compiler_version_MINOR_digit_5[7]' -# elif COMPILER_VERSION_MINOR == 8 - PRINT *, 'INFO:compiler_version_MINOR_digit_5[8]' -# elif COMPILER_VERSION_MINOR == 9 - PRINT *, 'INFO:compiler_version_MINOR_digit_5[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_6(n) -# define HEX(n) HEX_6(n) -# if COMPILER_VERSION_MINOR == 0 - PRINT *, 'INFO:compiler_version_MINOR_digit_6[0]' -# elif COMPILER_VERSION_MINOR == 1 - PRINT *, 'INFO:compiler_version_MINOR_digit_6[1]' -# elif COMPILER_VERSION_MINOR == 2 - PRINT *, 'INFO:compiler_version_MINOR_digit_6[2]' -# elif COMPILER_VERSION_MINOR == 3 - PRINT *, 'INFO:compiler_version_MINOR_digit_6[3]' -# elif COMPILER_VERSION_MINOR == 4 - PRINT *, 'INFO:compiler_version_MINOR_digit_6[4]' -# elif COMPILER_VERSION_MINOR == 5 - PRINT *, 'INFO:compiler_version_MINOR_digit_6[5]' -# elif COMPILER_VERSION_MINOR == 6 - PRINT *, 'INFO:compiler_version_MINOR_digit_6[6]' -# elif COMPILER_VERSION_MINOR == 7 - PRINT *, 'INFO:compiler_version_MINOR_digit_6[7]' -# elif COMPILER_VERSION_MINOR == 8 - PRINT *, 'INFO:compiler_version_MINOR_digit_6[8]' -# elif COMPILER_VERSION_MINOR == 9 - PRINT *, 'INFO:compiler_version_MINOR_digit_6[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_7(n) -# define HEX(n) HEX_7(n) -# if COMPILER_VERSION_MINOR == 0 - PRINT *, 'INFO:compiler_version_MINOR_digit_7[0]' -# elif COMPILER_VERSION_MINOR == 1 - PRINT *, 'INFO:compiler_version_MINOR_digit_7[1]' -# elif COMPILER_VERSION_MINOR == 2 - PRINT *, 'INFO:compiler_version_MINOR_digit_7[2]' -# elif COMPILER_VERSION_MINOR == 3 - PRINT *, 'INFO:compiler_version_MINOR_digit_7[3]' -# elif COMPILER_VERSION_MINOR == 4 - PRINT *, 'INFO:compiler_version_MINOR_digit_7[4]' -# elif COMPILER_VERSION_MINOR == 5 - PRINT *, 'INFO:compiler_version_MINOR_digit_7[5]' -# elif COMPILER_VERSION_MINOR == 6 - PRINT *, 'INFO:compiler_version_MINOR_digit_7[6]' -# elif COMPILER_VERSION_MINOR == 7 - PRINT *, 'INFO:compiler_version_MINOR_digit_7[7]' -# elif COMPILER_VERSION_MINOR == 8 - PRINT *, 'INFO:compiler_version_MINOR_digit_7[8]' -# elif COMPILER_VERSION_MINOR == 9 - PRINT *, 'INFO:compiler_version_MINOR_digit_7[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_8(n) -# define HEX(n) HEX_8(n) -# if COMPILER_VERSION_MINOR == 0 - PRINT *, 'INFO:compiler_version_MINOR_digit_8[0]' -# elif COMPILER_VERSION_MINOR == 1 - PRINT *, 'INFO:compiler_version_MINOR_digit_8[1]' -# elif COMPILER_VERSION_MINOR == 2 - PRINT *, 'INFO:compiler_version_MINOR_digit_8[2]' -# elif COMPILER_VERSION_MINOR == 3 - PRINT *, 'INFO:compiler_version_MINOR_digit_8[3]' -# elif COMPILER_VERSION_MINOR == 4 - PRINT *, 'INFO:compiler_version_MINOR_digit_8[4]' -# elif COMPILER_VERSION_MINOR == 5 - PRINT *, 'INFO:compiler_version_MINOR_digit_8[5]' -# elif COMPILER_VERSION_MINOR == 6 - PRINT *, 'INFO:compiler_version_MINOR_digit_8[6]' -# elif COMPILER_VERSION_MINOR == 7 - PRINT *, 'INFO:compiler_version_MINOR_digit_8[7]' -# elif COMPILER_VERSION_MINOR == 8 - PRINT *, 'INFO:compiler_version_MINOR_digit_8[8]' -# elif COMPILER_VERSION_MINOR == 9 - PRINT *, 'INFO:compiler_version_MINOR_digit_8[9]' -# endif - -#endif -#if defined(COMPILER_VERSION_PATCH) -# undef DEC -# undef HEX -# define DEC(n) DEC_1(n) -# define HEX(n) HEX_1(n) -# if COMPILER_VERSION_PATCH == 0 - PRINT *, 'INFO:compiler_version_PATCH_digit_1[0]' -# elif COMPILER_VERSION_PATCH == 1 - PRINT *, 'INFO:compiler_version_PATCH_digit_1[1]' -# elif COMPILER_VERSION_PATCH == 2 - PRINT *, 'INFO:compiler_version_PATCH_digit_1[2]' -# elif COMPILER_VERSION_PATCH == 3 - PRINT *, 'INFO:compiler_version_PATCH_digit_1[3]' -# elif COMPILER_VERSION_PATCH == 4 - PRINT *, 'INFO:compiler_version_PATCH_digit_1[4]' -# elif COMPILER_VERSION_PATCH == 5 - PRINT *, 'INFO:compiler_version_PATCH_digit_1[5]' -# elif COMPILER_VERSION_PATCH == 6 - PRINT *, 'INFO:compiler_version_PATCH_digit_1[6]' -# elif COMPILER_VERSION_PATCH == 7 - PRINT *, 'INFO:compiler_version_PATCH_digit_1[7]' -# elif COMPILER_VERSION_PATCH == 8 - PRINT *, 'INFO:compiler_version_PATCH_digit_1[8]' -# elif COMPILER_VERSION_PATCH == 9 - PRINT *, 'INFO:compiler_version_PATCH_digit_1[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_2(n) -# define HEX(n) HEX_2(n) -# if COMPILER_VERSION_PATCH == 0 - PRINT *, 'INFO:compiler_version_PATCH_digit_2[0]' -# elif COMPILER_VERSION_PATCH == 1 - PRINT *, 'INFO:compiler_version_PATCH_digit_2[1]' -# elif COMPILER_VERSION_PATCH == 2 - PRINT *, 'INFO:compiler_version_PATCH_digit_2[2]' -# elif COMPILER_VERSION_PATCH == 3 - PRINT *, 'INFO:compiler_version_PATCH_digit_2[3]' -# elif COMPILER_VERSION_PATCH == 4 - PRINT *, 'INFO:compiler_version_PATCH_digit_2[4]' -# elif COMPILER_VERSION_PATCH == 5 - PRINT *, 'INFO:compiler_version_PATCH_digit_2[5]' -# elif COMPILER_VERSION_PATCH == 6 - PRINT *, 'INFO:compiler_version_PATCH_digit_2[6]' -# elif COMPILER_VERSION_PATCH == 7 - PRINT *, 'INFO:compiler_version_PATCH_digit_2[7]' -# elif COMPILER_VERSION_PATCH == 8 - PRINT *, 'INFO:compiler_version_PATCH_digit_2[8]' -# elif COMPILER_VERSION_PATCH == 9 - PRINT *, 'INFO:compiler_version_PATCH_digit_2[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_3(n) -# define HEX(n) HEX_3(n) -# if COMPILER_VERSION_PATCH == 0 - PRINT *, 'INFO:compiler_version_PATCH_digit_3[0]' -# elif COMPILER_VERSION_PATCH == 1 - PRINT *, 'INFO:compiler_version_PATCH_digit_3[1]' -# elif COMPILER_VERSION_PATCH == 2 - PRINT *, 'INFO:compiler_version_PATCH_digit_3[2]' -# elif COMPILER_VERSION_PATCH == 3 - PRINT *, 'INFO:compiler_version_PATCH_digit_3[3]' -# elif COMPILER_VERSION_PATCH == 4 - PRINT *, 'INFO:compiler_version_PATCH_digit_3[4]' -# elif COMPILER_VERSION_PATCH == 5 - PRINT *, 'INFO:compiler_version_PATCH_digit_3[5]' -# elif COMPILER_VERSION_PATCH == 6 - PRINT *, 'INFO:compiler_version_PATCH_digit_3[6]' -# elif COMPILER_VERSION_PATCH == 7 - PRINT *, 'INFO:compiler_version_PATCH_digit_3[7]' -# elif COMPILER_VERSION_PATCH == 8 - PRINT *, 'INFO:compiler_version_PATCH_digit_3[8]' -# elif COMPILER_VERSION_PATCH == 9 - PRINT *, 'INFO:compiler_version_PATCH_digit_3[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_4(n) -# define HEX(n) HEX_4(n) -# if COMPILER_VERSION_PATCH == 0 - PRINT *, 'INFO:compiler_version_PATCH_digit_4[0]' -# elif COMPILER_VERSION_PATCH == 1 - PRINT *, 'INFO:compiler_version_PATCH_digit_4[1]' -# elif COMPILER_VERSION_PATCH == 2 - PRINT *, 'INFO:compiler_version_PATCH_digit_4[2]' -# elif COMPILER_VERSION_PATCH == 3 - PRINT *, 'INFO:compiler_version_PATCH_digit_4[3]' -# elif COMPILER_VERSION_PATCH == 4 - PRINT *, 'INFO:compiler_version_PATCH_digit_4[4]' -# elif COMPILER_VERSION_PATCH == 5 - PRINT *, 'INFO:compiler_version_PATCH_digit_4[5]' -# elif COMPILER_VERSION_PATCH == 6 - PRINT *, 'INFO:compiler_version_PATCH_digit_4[6]' -# elif COMPILER_VERSION_PATCH == 7 - PRINT *, 'INFO:compiler_version_PATCH_digit_4[7]' -# elif COMPILER_VERSION_PATCH == 8 - PRINT *, 'INFO:compiler_version_PATCH_digit_4[8]' -# elif COMPILER_VERSION_PATCH == 9 - PRINT *, 'INFO:compiler_version_PATCH_digit_4[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_5(n) -# define HEX(n) HEX_5(n) -# if COMPILER_VERSION_PATCH == 0 - PRINT *, 'INFO:compiler_version_PATCH_digit_5[0]' -# elif COMPILER_VERSION_PATCH == 1 - PRINT *, 'INFO:compiler_version_PATCH_digit_5[1]' -# elif COMPILER_VERSION_PATCH == 2 - PRINT *, 'INFO:compiler_version_PATCH_digit_5[2]' -# elif COMPILER_VERSION_PATCH == 3 - PRINT *, 'INFO:compiler_version_PATCH_digit_5[3]' -# elif COMPILER_VERSION_PATCH == 4 - PRINT *, 'INFO:compiler_version_PATCH_digit_5[4]' -# elif COMPILER_VERSION_PATCH == 5 - PRINT *, 'INFO:compiler_version_PATCH_digit_5[5]' -# elif COMPILER_VERSION_PATCH == 6 - PRINT *, 'INFO:compiler_version_PATCH_digit_5[6]' -# elif COMPILER_VERSION_PATCH == 7 - PRINT *, 'INFO:compiler_version_PATCH_digit_5[7]' -# elif COMPILER_VERSION_PATCH == 8 - PRINT *, 'INFO:compiler_version_PATCH_digit_5[8]' -# elif COMPILER_VERSION_PATCH == 9 - PRINT *, 'INFO:compiler_version_PATCH_digit_5[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_6(n) -# define HEX(n) HEX_6(n) -# if COMPILER_VERSION_PATCH == 0 - PRINT *, 'INFO:compiler_version_PATCH_digit_6[0]' -# elif COMPILER_VERSION_PATCH == 1 - PRINT *, 'INFO:compiler_version_PATCH_digit_6[1]' -# elif COMPILER_VERSION_PATCH == 2 - PRINT *, 'INFO:compiler_version_PATCH_digit_6[2]' -# elif COMPILER_VERSION_PATCH == 3 - PRINT *, 'INFO:compiler_version_PATCH_digit_6[3]' -# elif COMPILER_VERSION_PATCH == 4 - PRINT *, 'INFO:compiler_version_PATCH_digit_6[4]' -# elif COMPILER_VERSION_PATCH == 5 - PRINT *, 'INFO:compiler_version_PATCH_digit_6[5]' -# elif COMPILER_VERSION_PATCH == 6 - PRINT *, 'INFO:compiler_version_PATCH_digit_6[6]' -# elif COMPILER_VERSION_PATCH == 7 - PRINT *, 'INFO:compiler_version_PATCH_digit_6[7]' -# elif COMPILER_VERSION_PATCH == 8 - PRINT *, 'INFO:compiler_version_PATCH_digit_6[8]' -# elif COMPILER_VERSION_PATCH == 9 - PRINT *, 'INFO:compiler_version_PATCH_digit_6[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_7(n) -# define HEX(n) HEX_7(n) -# if COMPILER_VERSION_PATCH == 0 - PRINT *, 'INFO:compiler_version_PATCH_digit_7[0]' -# elif COMPILER_VERSION_PATCH == 1 - PRINT *, 'INFO:compiler_version_PATCH_digit_7[1]' -# elif COMPILER_VERSION_PATCH == 2 - PRINT *, 'INFO:compiler_version_PATCH_digit_7[2]' -# elif COMPILER_VERSION_PATCH == 3 - PRINT *, 'INFO:compiler_version_PATCH_digit_7[3]' -# elif COMPILER_VERSION_PATCH == 4 - PRINT *, 'INFO:compiler_version_PATCH_digit_7[4]' -# elif COMPILER_VERSION_PATCH == 5 - PRINT *, 'INFO:compiler_version_PATCH_digit_7[5]' -# elif COMPILER_VERSION_PATCH == 6 - PRINT *, 'INFO:compiler_version_PATCH_digit_7[6]' -# elif COMPILER_VERSION_PATCH == 7 - PRINT *, 'INFO:compiler_version_PATCH_digit_7[7]' -# elif COMPILER_VERSION_PATCH == 8 - PRINT *, 'INFO:compiler_version_PATCH_digit_7[8]' -# elif COMPILER_VERSION_PATCH == 9 - PRINT *, 'INFO:compiler_version_PATCH_digit_7[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_8(n) -# define HEX(n) HEX_8(n) -# if COMPILER_VERSION_PATCH == 0 - PRINT *, 'INFO:compiler_version_PATCH_digit_8[0]' -# elif COMPILER_VERSION_PATCH == 1 - PRINT *, 'INFO:compiler_version_PATCH_digit_8[1]' -# elif COMPILER_VERSION_PATCH == 2 - PRINT *, 'INFO:compiler_version_PATCH_digit_8[2]' -# elif COMPILER_VERSION_PATCH == 3 - PRINT *, 'INFO:compiler_version_PATCH_digit_8[3]' -# elif COMPILER_VERSION_PATCH == 4 - PRINT *, 'INFO:compiler_version_PATCH_digit_8[4]' -# elif COMPILER_VERSION_PATCH == 5 - PRINT *, 'INFO:compiler_version_PATCH_digit_8[5]' -# elif COMPILER_VERSION_PATCH == 6 - PRINT *, 'INFO:compiler_version_PATCH_digit_8[6]' -# elif COMPILER_VERSION_PATCH == 7 - PRINT *, 'INFO:compiler_version_PATCH_digit_8[7]' -# elif COMPILER_VERSION_PATCH == 8 - PRINT *, 'INFO:compiler_version_PATCH_digit_8[8]' -# elif COMPILER_VERSION_PATCH == 9 - PRINT *, 'INFO:compiler_version_PATCH_digit_8[9]' -# endif - -#endif -#if defined(COMPILER_VERSION_TWEAK) -# undef DEC -# undef HEX -# define DEC(n) DEC_1(n) -# define HEX(n) HEX_1(n) -# if COMPILER_VERSION_TWEAK == 0 - PRINT *, 'INFO:compiler_version_TWEAK_digit_1[0]' -# elif COMPILER_VERSION_TWEAK == 1 - PRINT *, 'INFO:compiler_version_TWEAK_digit_1[1]' -# elif COMPILER_VERSION_TWEAK == 2 - PRINT *, 'INFO:compiler_version_TWEAK_digit_1[2]' -# elif COMPILER_VERSION_TWEAK == 3 - PRINT *, 'INFO:compiler_version_TWEAK_digit_1[3]' -# elif COMPILER_VERSION_TWEAK == 4 - PRINT *, 'INFO:compiler_version_TWEAK_digit_1[4]' -# elif COMPILER_VERSION_TWEAK == 5 - PRINT *, 'INFO:compiler_version_TWEAK_digit_1[5]' -# elif COMPILER_VERSION_TWEAK == 6 - PRINT *, 'INFO:compiler_version_TWEAK_digit_1[6]' -# elif COMPILER_VERSION_TWEAK == 7 - PRINT *, 'INFO:compiler_version_TWEAK_digit_1[7]' -# elif COMPILER_VERSION_TWEAK == 8 - PRINT *, 'INFO:compiler_version_TWEAK_digit_1[8]' -# elif COMPILER_VERSION_TWEAK == 9 - PRINT *, 'INFO:compiler_version_TWEAK_digit_1[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_2(n) -# define HEX(n) HEX_2(n) -# if COMPILER_VERSION_TWEAK == 0 - PRINT *, 'INFO:compiler_version_TWEAK_digit_2[0]' -# elif COMPILER_VERSION_TWEAK == 1 - PRINT *, 'INFO:compiler_version_TWEAK_digit_2[1]' -# elif COMPILER_VERSION_TWEAK == 2 - PRINT *, 'INFO:compiler_version_TWEAK_digit_2[2]' -# elif COMPILER_VERSION_TWEAK == 3 - PRINT *, 'INFO:compiler_version_TWEAK_digit_2[3]' -# elif COMPILER_VERSION_TWEAK == 4 - PRINT *, 'INFO:compiler_version_TWEAK_digit_2[4]' -# elif COMPILER_VERSION_TWEAK == 5 - PRINT *, 'INFO:compiler_version_TWEAK_digit_2[5]' -# elif COMPILER_VERSION_TWEAK == 6 - PRINT *, 'INFO:compiler_version_TWEAK_digit_2[6]' -# elif COMPILER_VERSION_TWEAK == 7 - PRINT *, 'INFO:compiler_version_TWEAK_digit_2[7]' -# elif COMPILER_VERSION_TWEAK == 8 - PRINT *, 'INFO:compiler_version_TWEAK_digit_2[8]' -# elif COMPILER_VERSION_TWEAK == 9 - PRINT *, 'INFO:compiler_version_TWEAK_digit_2[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_3(n) -# define HEX(n) HEX_3(n) -# if COMPILER_VERSION_TWEAK == 0 - PRINT *, 'INFO:compiler_version_TWEAK_digit_3[0]' -# elif COMPILER_VERSION_TWEAK == 1 - PRINT *, 'INFO:compiler_version_TWEAK_digit_3[1]' -# elif COMPILER_VERSION_TWEAK == 2 - PRINT *, 'INFO:compiler_version_TWEAK_digit_3[2]' -# elif COMPILER_VERSION_TWEAK == 3 - PRINT *, 'INFO:compiler_version_TWEAK_digit_3[3]' -# elif COMPILER_VERSION_TWEAK == 4 - PRINT *, 'INFO:compiler_version_TWEAK_digit_3[4]' -# elif COMPILER_VERSION_TWEAK == 5 - PRINT *, 'INFO:compiler_version_TWEAK_digit_3[5]' -# elif COMPILER_VERSION_TWEAK == 6 - PRINT *, 'INFO:compiler_version_TWEAK_digit_3[6]' -# elif COMPILER_VERSION_TWEAK == 7 - PRINT *, 'INFO:compiler_version_TWEAK_digit_3[7]' -# elif COMPILER_VERSION_TWEAK == 8 - PRINT *, 'INFO:compiler_version_TWEAK_digit_3[8]' -# elif COMPILER_VERSION_TWEAK == 9 - PRINT *, 'INFO:compiler_version_TWEAK_digit_3[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_4(n) -# define HEX(n) HEX_4(n) -# if COMPILER_VERSION_TWEAK == 0 - PRINT *, 'INFO:compiler_version_TWEAK_digit_4[0]' -# elif COMPILER_VERSION_TWEAK == 1 - PRINT *, 'INFO:compiler_version_TWEAK_digit_4[1]' -# elif COMPILER_VERSION_TWEAK == 2 - PRINT *, 'INFO:compiler_version_TWEAK_digit_4[2]' -# elif COMPILER_VERSION_TWEAK == 3 - PRINT *, 'INFO:compiler_version_TWEAK_digit_4[3]' -# elif COMPILER_VERSION_TWEAK == 4 - PRINT *, 'INFO:compiler_version_TWEAK_digit_4[4]' -# elif COMPILER_VERSION_TWEAK == 5 - PRINT *, 'INFO:compiler_version_TWEAK_digit_4[5]' -# elif COMPILER_VERSION_TWEAK == 6 - PRINT *, 'INFO:compiler_version_TWEAK_digit_4[6]' -# elif COMPILER_VERSION_TWEAK == 7 - PRINT *, 'INFO:compiler_version_TWEAK_digit_4[7]' -# elif COMPILER_VERSION_TWEAK == 8 - PRINT *, 'INFO:compiler_version_TWEAK_digit_4[8]' -# elif COMPILER_VERSION_TWEAK == 9 - PRINT *, 'INFO:compiler_version_TWEAK_digit_4[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_5(n) -# define HEX(n) HEX_5(n) -# if COMPILER_VERSION_TWEAK == 0 - PRINT *, 'INFO:compiler_version_TWEAK_digit_5[0]' -# elif COMPILER_VERSION_TWEAK == 1 - PRINT *, 'INFO:compiler_version_TWEAK_digit_5[1]' -# elif COMPILER_VERSION_TWEAK == 2 - PRINT *, 'INFO:compiler_version_TWEAK_digit_5[2]' -# elif COMPILER_VERSION_TWEAK == 3 - PRINT *, 'INFO:compiler_version_TWEAK_digit_5[3]' -# elif COMPILER_VERSION_TWEAK == 4 - PRINT *, 'INFO:compiler_version_TWEAK_digit_5[4]' -# elif COMPILER_VERSION_TWEAK == 5 - PRINT *, 'INFO:compiler_version_TWEAK_digit_5[5]' -# elif COMPILER_VERSION_TWEAK == 6 - PRINT *, 'INFO:compiler_version_TWEAK_digit_5[6]' -# elif COMPILER_VERSION_TWEAK == 7 - PRINT *, 'INFO:compiler_version_TWEAK_digit_5[7]' -# elif COMPILER_VERSION_TWEAK == 8 - PRINT *, 'INFO:compiler_version_TWEAK_digit_5[8]' -# elif COMPILER_VERSION_TWEAK == 9 - PRINT *, 'INFO:compiler_version_TWEAK_digit_5[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_6(n) -# define HEX(n) HEX_6(n) -# if COMPILER_VERSION_TWEAK == 0 - PRINT *, 'INFO:compiler_version_TWEAK_digit_6[0]' -# elif COMPILER_VERSION_TWEAK == 1 - PRINT *, 'INFO:compiler_version_TWEAK_digit_6[1]' -# elif COMPILER_VERSION_TWEAK == 2 - PRINT *, 'INFO:compiler_version_TWEAK_digit_6[2]' -# elif COMPILER_VERSION_TWEAK == 3 - PRINT *, 'INFO:compiler_version_TWEAK_digit_6[3]' -# elif COMPILER_VERSION_TWEAK == 4 - PRINT *, 'INFO:compiler_version_TWEAK_digit_6[4]' -# elif COMPILER_VERSION_TWEAK == 5 - PRINT *, 'INFO:compiler_version_TWEAK_digit_6[5]' -# elif COMPILER_VERSION_TWEAK == 6 - PRINT *, 'INFO:compiler_version_TWEAK_digit_6[6]' -# elif COMPILER_VERSION_TWEAK == 7 - PRINT *, 'INFO:compiler_version_TWEAK_digit_6[7]' -# elif COMPILER_VERSION_TWEAK == 8 - PRINT *, 'INFO:compiler_version_TWEAK_digit_6[8]' -# elif COMPILER_VERSION_TWEAK == 9 - PRINT *, 'INFO:compiler_version_TWEAK_digit_6[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_7(n) -# define HEX(n) HEX_7(n) -# if COMPILER_VERSION_TWEAK == 0 - PRINT *, 'INFO:compiler_version_TWEAK_digit_7[0]' -# elif COMPILER_VERSION_TWEAK == 1 - PRINT *, 'INFO:compiler_version_TWEAK_digit_7[1]' -# elif COMPILER_VERSION_TWEAK == 2 - PRINT *, 'INFO:compiler_version_TWEAK_digit_7[2]' -# elif COMPILER_VERSION_TWEAK == 3 - PRINT *, 'INFO:compiler_version_TWEAK_digit_7[3]' -# elif COMPILER_VERSION_TWEAK == 4 - PRINT *, 'INFO:compiler_version_TWEAK_digit_7[4]' -# elif COMPILER_VERSION_TWEAK == 5 - PRINT *, 'INFO:compiler_version_TWEAK_digit_7[5]' -# elif COMPILER_VERSION_TWEAK == 6 - PRINT *, 'INFO:compiler_version_TWEAK_digit_7[6]' -# elif COMPILER_VERSION_TWEAK == 7 - PRINT *, 'INFO:compiler_version_TWEAK_digit_7[7]' -# elif COMPILER_VERSION_TWEAK == 8 - PRINT *, 'INFO:compiler_version_TWEAK_digit_7[8]' -# elif COMPILER_VERSION_TWEAK == 9 - PRINT *, 'INFO:compiler_version_TWEAK_digit_7[9]' -# endif - -# undef DEC -# undef HEX -# define DEC(n) DEC_8(n) -# define HEX(n) HEX_8(n) -# if COMPILER_VERSION_TWEAK == 0 - PRINT *, 'INFO:compiler_version_TWEAK_digit_8[0]' -# elif COMPILER_VERSION_TWEAK == 1 - PRINT *, 'INFO:compiler_version_TWEAK_digit_8[1]' -# elif COMPILER_VERSION_TWEAK == 2 - PRINT *, 'INFO:compiler_version_TWEAK_digit_8[2]' -# elif COMPILER_VERSION_TWEAK == 3 - PRINT *, 'INFO:compiler_version_TWEAK_digit_8[3]' -# elif COMPILER_VERSION_TWEAK == 4 - PRINT *, 'INFO:compiler_version_TWEAK_digit_8[4]' -# elif COMPILER_VERSION_TWEAK == 5 - PRINT *, 'INFO:compiler_version_TWEAK_digit_8[5]' -# elif COMPILER_VERSION_TWEAK == 6 - PRINT *, 'INFO:compiler_version_TWEAK_digit_8[6]' -# elif COMPILER_VERSION_TWEAK == 7 - PRINT *, 'INFO:compiler_version_TWEAK_digit_8[7]' -# elif COMPILER_VERSION_TWEAK == 8 - PRINT *, 'INFO:compiler_version_TWEAK_digit_8[8]' -# elif COMPILER_VERSION_TWEAK == 9 - PRINT *, 'INFO:compiler_version_TWEAK_digit_8[9]' -# endif - -#endif - - END diff --git a/src/Build/CMakeFiles/3.17.1/CompilerIdFortran/a.out b/src/Build/CMakeFiles/3.17.1/CompilerIdFortran/a.out deleted file mode 100755 index 5e8a404..0000000 Binary files a/src/Build/CMakeFiles/3.17.1/CompilerIdFortran/a.out and /dev/null differ diff --git a/src/Build/CMakeFiles/CMakeError.log b/src/Build/CMakeFiles/CMakeError.log deleted file mode 100644 index cbd7112..0000000 --- a/src/Build/CMakeFiles/CMakeError.log +++ /dev/null @@ -1,76 +0,0 @@ -Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" failed. -Compiler: /opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/ifort -Build flags: -Id flags: -v - -The output was: -No such file or directory - - -Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" failed. -Compiler: /opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/ifort -Build flags: -Id flags: - -The output was: -No such file or directory - - -Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" failed. -Compiler: /opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/ifort -Build flags: -Id flags: -c - -The output was: -No such file or directory - - -Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" failed. -Compiler: /opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/ifort -Build flags: -Id flags: -fpp - -The output was: -No such file or directory - - -Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" failed. -Compiler: /opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/ifort -Build flags: -Id flags: -v - -The output was: -No such file or directory - - -Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" failed. -Compiler: /opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/ifort -Build flags: -Id flags: - -The output was: -No such file or directory - - -Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" failed. -Compiler: /opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/ifort -Build flags: -Id flags: -c - -The output was: -No such file or directory - - -Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" failed. -Compiler: /opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/ifort -Build flags: -Id flags: -fpp - -The output was: -No such file or directory - - -Checking whether the Fortran compiler is Compaq using "-what" did not match "Compaq Visual Fortran": -Checking whether the Fortran compiler is NAG using "-V" did not match "NAG Fortran Compiler": -Checking whether the Fortran compiler is Compaq using "-what" did not match "Compaq Visual Fortran": -Checking whether the Fortran compiler is NAG using "-V" did not match "NAG Fortran Compiler": diff --git a/src/Build/CMakeFiles/CMakeOutput.log b/src/Build/CMakeFiles/CMakeOutput.log deleted file mode 100644 index 2c8c9f4..0000000 --- a/src/Build/CMakeFiles/CMakeOutput.log +++ /dev/null @@ -1,612 +0,0 @@ -The system is: Linux - 3.10.0-957.1.3.el7.x86_64 - x86_64 -Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" succeeded. -Compiler: /opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/ifort -Build flags: -Id flags: -v - -The output was: -0 -ifort version 18.0.3 -/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/fpp -D__INTEL_COMPILER=1800 -D__INTEL_COMPILER_UPDATE=3 -D__unix__ -D__unix -D__linux__ -D__linux -D__gnu_linux__ -Dunix -Dlinux -D__ELF__ -D__x86_64 -D__x86_64__ -D__amd64 -D__amd64__ -D__INTEL_COMPILER_BUILD_DATE=20180410 -D__INTEL_OFFLOAD -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__ -D__pentium4 -D__pentium4__ -D__tune_pentium4__ -D__SSE2__ -D__SSE2_MATH__ -D__SSE__ -D__SSE_MATH__ -D__MMX__ -I. -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/pstl/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/intel64 -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/icc -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include -I/usr/local/include -I/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include -I/usr/include/ -I/usr/include -fixed -4Ycpp -4Ncvf -f_com=yes -MX CMakeFortranCompilerId.F /tmp/ifort2OISn4.i -#include "..." search starts here: -#include <...> search starts here: - . - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/include - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/include - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/pstl/include - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/intel64 - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/icc - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include - /usr/local/include - /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include - /usr/include/ - /usr/include -End of search list. -/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/fortcom -D__INTEL_COMPILER=1800 -D__INTEL_COMPILER_UPDATE=3 -D__unix__ -D__unix -D__linux__ -D__linux -D__gnu_linux__ -Dunix -Dlinux -D__ELF__ -D__x86_64 -D__x86_64__ -D__amd64 -D__amd64__ -D__INTEL_COMPILER_BUILD_DATE=20180410 -D__INTEL_OFFLOAD -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__ -D__pentium4 -D__pentium4__ -D__tune_pentium4__ -D__SSE2__ -D__SSE2_MATH__ -D__SSE__ -D__SSE_MATH__ -D__MMX__ -mGLOB_pack_sort_init_list -I. -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/pstl/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/intel64 -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/icc -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include -I/usr/local/include -I/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include -I/usr/include/ -I/usr/include -O2 "-reentrancy threaded" -simd -offload_host -mGLOB_em64t=TRUE -mP1OPT_version=18.0-intel64 -mGLOB_diag_file=/tmp/ifortP3gZxS.diag -mGLOB_long_size_64 -mGLOB_routine_pointer_size_64 -mGLOB_source_language=GLOB_SOURCE_LANGUAGE_F90 -mP2OPT_static_promotion -mP1OPT_print_version=FALSE -mCG_use_gas_got_workaround=F -mP2OPT_align_option_used=TRUE -mGLOB_gcc_version=485 -mGLOB_options_string=-v -mGLOB_cxx_limited_range=FALSE -mCG_extend_parms=FALSE -mGLOB_compiler_bin_directory=/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64 -mGLOB_as_output_backup_file_name=/tmp/ifortPzVbWDas_.s -mGLOB_dashboard_use_source_name -mIPOPT_activate -mIPOPT_lite -mGLOB_instruction_tuning=0x0 -mGLOB_uarch_tuning=0x0 -mGLOB_product_id_code=0x22006d90 -mCG_bnl_movbe=T -mGLOB_extended_instructions=0x8 -mP3OPT_use_mspp_call_convention -mP2OPT_subs_out_of_bound=FALSE -mP2OPT_disam_type_based_disam=2 -mGLOB_ansi_alias -mPGOPTI_value_profile_use=T -mGLOB_opt_report_use_source_name -mP2OPT_il0_array_sections=TRUE -mGLOB_offload_mode=1 -mP2OPT_offload_unique_var_string=ifort17121222466C32aa -mP2OPT_hlo_level=2 -mP2OPT_hlo -mP2OPT_hpo_rtt_control=0 -mIPOPT_args_in_regs=0 -mP2OPT_disam_assume_nonstd_intent_in=FALSE -mGLOB_imf_mapping_library=/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/libiml_attr.so -mIPOPT_single_file_compile_and_link=TRUE -mPGOPTI_gen_threadsafe_level=0 -mIPOPT_lto_object_enabled -mIPOPT_lto_object_value=1 -mIPOPT_obj_output_file_name=/tmp/ifortP3gZxS.o -mIPOPT_whole_archive_fixup_file_name=/tmp/ifortwarchbi1eF1 -mGLOB_linker_version=2.27 -mGLOB_driver_tempfile_name=/tmp/iforttempfileeP8Swd -mP3OPT_asm_target=P3OPT_ASM_TARGET_GAS -mGLOB_async_unwind_tables=TRUE -mGLOB_obj_output_file=/tmp/ifortP3gZxS.o -mGLOB_source_dialect=GLOB_SOURCE_DIALECT_FORTRAN -mP1OPT_source_file_name=CMakeFortranCompilerId.F -mP1OPT_full_source_file_name=/scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/3.17.1/CompilerIdFortran/CMakeFortranCompilerId.F -mP2OPT_symtab_type_copy=true /tmp/ifort2OISn4.i -#include "..." search starts here: -#include <...> search starts here: - . - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/include - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/include - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/pstl/include - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/intel64 - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/icc - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include - /usr/local/include - /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include - /usr/include/ - /usr/include -End of search list. -ld /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbegin.o --eh-frame-hdr --build-id -dynamic-linker /lib64/ld-linux-x86-64.so.2 -m elf_x86_64 -o a.out /opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin/for_main.o -L/opt/intel/18/clck/2018.3/lib/intel64 -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/lib/intel64 -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/lib/intel64/gcc4.4 -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/ -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/ -L/lib/../lib64 -L/lib/../lib64/ -L/usr/lib/../lib64 -L/usr/lib/../lib64/ -L/opt/intel/18/clck/2018.3/lib/intel64/ -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/lib/intel64/ -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin/ -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin/ -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/lib/intel64/gcc4.4/ -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../ -L/lib64 -L/lib/ -L/usr/lib64 -L/usr/lib /tmp/ifortP3gZxS.o -Bdynamic -Bstatic -lifport -lifcoremt -limf -lsvml -Bdynamic -lm -Bstatic -lipgo -lirc -Bdynamic -lpthread -Bstatic -lsvml -Bdynamic -lc -lgcc -lgcc_s -Bstatic -lirc_s -Bdynamic -ldl -lc /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crtn.o - - -Compilation of the Fortran compiler identification source "CMakeFortranCompilerId.F" produced "a.out" - -The Fortran compiler identification is Intel, found in "/scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/3.17.1/CompilerIdFortran/a.out" - -Determining if the Fortran compiler works passed with the following output: -Change Dir: /scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp - -Run Build Command(s):/usr/bin/gmake cmTC_bf79b/fast && /usr/bin/gmake -f CMakeFiles/cmTC_bf79b.dir/build.make CMakeFiles/cmTC_bf79b.dir/build -gmake[1]: Entering directory `/scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp' -Building Fortran object CMakeFiles/cmTC_bf79b.dir/testFortranCompiler.f.o -/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/ifort -c /scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp/testFortranCompiler.f -o CMakeFiles/cmTC_bf79b.dir/testFortranCompiler.f.o -Linking Fortran executable cmTC_bf79b -/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_bf79b.dir/link.txt --verbose=1 -/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/ifort -qopenmp CMakeFiles/cmTC_bf79b.dir/testFortranCompiler.f.o -o cmTC_bf79b -gmake[1]: Leaving directory `/scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp' - - - -Detecting Fortran compiler ABI info compiled with the following output: -Change Dir: /scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp - -Run Build Command(s):/usr/bin/gmake cmTC_32ad6/fast && /usr/bin/gmake -f CMakeFiles/cmTC_32ad6.dir/build.make CMakeFiles/cmTC_32ad6.dir/build -gmake[1]: Entering directory `/scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp' -Building Fortran object CMakeFiles/cmTC_32ad6.dir/CMakeFortranCompilerABI.F.o -/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/ifort -v -c /usr/share/cmake-3.17/Modules/CMakeFortranCompilerABI.F -o CMakeFiles/cmTC_32ad6.dir/CMakeFortranCompilerABI.F.o -ifort version 18.0.3 -/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/fpp -D__INTEL_COMPILER=1800 -D__INTEL_COMPILER_UPDATE=3 -D__unix__ -D__unix -D__linux__ -D__linux -D__gnu_linux__ -Dunix -Dlinux -D__ELF__ -D__x86_64 -D__x86_64__ -D__amd64 -D__amd64__ -D__INTEL_COMPILER_BUILD_DATE=20180410 -D__INTEL_OFFLOAD -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__ -D__pentium4 -D__pentium4__ -D__tune_pentium4__ -D__SSE2__ -D__SSE2_MATH__ -D__SSE__ -D__SSE_MATH__ -D__MMX__ -I. -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/pstl/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/intel64 -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/icc -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include -I/usr/local/include -I/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include -I/usr/include/ -I/usr/include -fixed -4Ycpp -4Ncvf -f_com=yes -MX /usr/share/cmake-3.17/Modules/CMakeFortranCompilerABI.F /tmp/ifortgZorku.i -#include "..." search starts here: -#include <...> search starts here: - . - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/include - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/include - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/pstl/include - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/intel64 - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/icc - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include - /usr/local/include - /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include - /usr/include/ - /usr/include -End of search list. -/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/fortcom -D__INTEL_COMPILER=1800 -D__INTEL_COMPILER_UPDATE=3 -D__unix__ -D__unix -D__linux__ -D__linux -D__gnu_linux__ -Dunix -Dlinux -D__ELF__ -D__x86_64 -D__x86_64__ -D__amd64 -D__amd64__ -D__INTEL_COMPILER_BUILD_DATE=20180410 -D__INTEL_OFFLOAD -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__ -D__pentium4 -D__pentium4__ -D__tune_pentium4__ -D__SSE2__ -D__SSE2_MATH__ -D__SSE__ -D__SSE_MATH__ -D__MMX__ -mGLOB_pack_sort_init_list -I/usr/share/cmake-3.17/Modules -I. -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/pstl/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/intel64 -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/icc -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include -I/usr/local/include -I/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include -I/usr/include/ -I/usr/include -O2 "-reentrancy threaded" -simd -offload_host -mGLOB_em64t=TRUE -mP1OPT_version=18.0-intel64 -mGLOB_diag_file=CMakeFiles/cmTC_32ad6.dir/CMakeFortranCompilerABI.F.diag -mGLOB_long_size_64 -mGLOB_routine_pointer_size_64 -mGLOB_source_language=GLOB_SOURCE_LANGUAGE_F90 -mP2OPT_static_promotion -mP1OPT_print_version=FALSE -mCG_use_gas_got_workaround=F -mP2OPT_align_option_used=TRUE -mGLOB_gcc_version=485 "-mGLOB_options_string=-v -c -o CMakeFiles/cmTC_32ad6.dir/CMakeFortranCompilerABI.F.o" -mGLOB_cxx_limited_range=FALSE -mCG_extend_parms=FALSE -mGLOB_compiler_bin_directory=/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64 -mGLOB_as_output_backup_file_name=/tmp/ifortnTayU7as_.s -mIPOPT_activate -mIPOPT_lite -mGLOB_instruction_tuning=0x0 -mGLOB_uarch_tuning=0x0 -mGLOB_product_id_code=0x22006d90 -mCG_bnl_movbe=T -mGLOB_extended_instructions=0x8 -mP3OPT_use_mspp_call_convention -mP2OPT_subs_out_of_bound=FALSE -mP2OPT_disam_type_based_disam=2 -mGLOB_ansi_alias -mPGOPTI_value_profile_use=T -mP2OPT_il0_array_sections=TRUE -mGLOB_offload_mode=1 -mP2OPT_offload_unique_var_string=ifort10342123004tk1WM -mP2OPT_hlo_level=2 -mP2OPT_hlo -mP2OPT_hpo_rtt_control=0 -mIPOPT_args_in_regs=0 -mP2OPT_disam_assume_nonstd_intent_in=FALSE -mGLOB_imf_mapping_library=/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/libiml_attr.so -mPGOPTI_gen_threadsafe_level=0 -mIPOPT_lto_object_enabled -mIPOPT_lto_object_value=1 -mIPOPT_obj_output_file_name=CMakeFiles/cmTC_32ad6.dir/CMakeFortranCompilerABI.F.o -mIPOPT_whole_archive_fixup_file_name=/tmp/ifortwarchLQ8Jjy -mGLOB_linker_version=2.27 -mGLOB_driver_tempfile_name=/tmp/iforttempfileioEtwL -mP3OPT_asm_target=P3OPT_ASM_TARGET_GAS -mGLOB_async_unwind_tables=TRUE -mGLOB_obj_output_file=CMakeFiles/cmTC_32ad6.dir/CMakeFortranCompilerABI.F.o -mGLOB_source_dialect=GLOB_SOURCE_DIALECT_FORTRAN -mP1OPT_source_file_name=/usr/share/cmake-3.17/Modules/CMakeFortranCompilerABI.F -mP1OPT_full_source_file_name=/usr/share/cmake-3.17/Modules/CMakeFortranCompilerABI.F -mP2OPT_symtab_type_copy=true /tmp/ifortgZorku.i -#include "..." search starts here: -#include <...> search starts here: - /usr/share/cmake-3.17/Modules - . - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/include - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/include - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/pstl/include - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/intel64 - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/icc - /opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include - /usr/local/include - /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include - /usr/include/ - /usr/include -End of search list. -Linking Fortran executable cmTC_32ad6 -/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_32ad6.dir/link.txt --verbose=1 -/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/ifort -qopenmp -v CMakeFiles/cmTC_32ad6.dir/CMakeFortranCompilerABI.F.o -o cmTC_32ad6 -ifort version 18.0.3 -/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/fortcom -mGLOB_em64t=TRUE -mP1OPT_version=18.0-intel64 -mGLOB_diag_file=CMakeFiles/cmTC_32ad6.dir/CMakeFortranCompilerABI.F.diag -mGLOB_long_size_64 -mGLOB_routine_pointer_size_64 -mGLOB_source_language=GLOB_SOURCE_LANGUAGE_F90 -mP2OPT_static_promotion -mP1OPT_print_version=FALSE -mCG_use_gas_got_workaround=F -mP2OPT_align_option_used=TRUE -mGLOB_gcc_version=485 "-mGLOB_options_string=-qopenmp -v -o cmTC_32ad6" -mGLOB_cxx_limited_range=FALSE -mCG_extend_parms=FALSE -mGLOB_compiler_bin_directory=/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64 -mGLOB_as_output_backup_file_name=/tmp/ifort7HTZWtas_.s -mGLOB_dashboard_use_source_name -mIPOPT_activate -mGLOB_product_id_code=0x22006d90 -mP3OPT_use_mspp_call_convention -mP2OPT_subs_out_of_bound=FALSE -mP2OPT_disam_type_based_disam=2 -mGLOB_ansi_alias -mPGOPTI_value_profile_use=T -mGLOB_opt_report_use_source_name -mPAROPT_openmp=TRUE -mP2OPT_il0_array_sections=TRUE -mGLOB_offload_mode=1 -mP2OPT_offload_unique_var_string=ifort1234220830TodadS -mP2OPT_hlo -mP2OPT_hpo_rtt_control=0 -mIPOPT_args_in_regs=0 -mP2OPT_disam_assume_nonstd_intent_in=FALSE -mGLOB_imf_mapping_library=/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/libiml_attr.so -mPGOPTI_gen_threadsafe_level=0 -mIPOPT_link -mIPOPT_ipo_activate -mIPOPT_mo_activate -mIPOPT_source_files_list=/tmp/ifortslisnGggNP -mIPOPT_mo_global_data -mIPOPT_link_script_file=/tmp/ifortscriptlF5Za3 "-mIPOPT_cmdline_link="/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o" "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o" "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbegin.o" "--eh-frame-hdr" "--build-id" "-dynamic-linker" "/lib64/ld-linux-x86-64.so.2" "-m" "elf_x86_64" "-o" "cmTC_32ad6" "/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin/for_main.o" "-L/opt/intel/18/clck/2018.3/lib/intel64" "-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/lib/intel64" "-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin" "-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin" "-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/lib/intel64/gcc4.4" "-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin" "-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/" "-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64" "-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/" "-L/lib/../lib64" "-L/lib/../lib64/" "-L/usr/lib/../lib64" "-L/usr/lib/../lib64/" "-L/opt/intel/18/clck/2018.3/lib/intel64/" "-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/lib/intel64/" "-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin/" "-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin/" "-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/lib/intel64/gcc4.4/" "-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../" "-L/lib64" "-L/lib/" "-L/usr/lib64" "-L/usr/lib" "CMakeFiles/cmTC_32ad6.dir/CMakeFortranCompilerABI.F.o" "-Bdynamic" "-Bstatic" "-lifport" "-lifcoremt" "-limf" "-lsvml" "-Bdynamic" "-lm" "-Bstatic" "-lipgo" "-Bdynamic" "-liomp5" "-Bstatic" "-lirc" "-Bdynamic" "-lpthread" "-Bstatic" "-lsvml" "-Bdynamic" "-lc" "-lgcc" "-lgcc_s" "-Bstatic" "-lirc_s" "-Bdynamic" "-ldl" "-lc" "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtend.o" "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crtn.o"" -mIPOPT_il_in_obj -mIPOPT_ipo_activate_warn=FALSE -mIPOPT_obj_output_file_name=/tmp/ipo_ifortzsqQux.o -mIPOPT_whole_archive_fixup_file_name=/tmp/ifortwarchJ3sw87 -mGLOB_linker_version=2.27 -mGLOB_driver_tempfile_name=/tmp/iforttempfileTSHmxl -mP3OPT_asm_target=P3OPT_ASM_TARGET_GAS -mGLOB_async_unwind_tables=TRUE -mGLOB_obj_output_file=/tmp/ipo_ifortzsqQux.o -mGLOB_source_dialect=GLOB_SOURCE_DIALECT_NONE -mP1OPT_source_file_name=ipo_out.f -mP2OPT_symtab_type_copy=true CMakeFiles/cmTC_32ad6.dir/CMakeFortranCompilerABI.F.o -mIPOPT_object_files=T -mIPOPT_assembly_files=/tmp/ifortalisjozjgY -mIPOPT_generated_tempfiles=/tmp/ifortelis7og2Db -mIPOPT_embedded_object_base_name=/tmp/iforteobjDWdL1o -mIPOPT_cmdline_link_new_name=/tmp/ifortllisJ0BvpC -ld /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbegin.o --eh-frame-hdr --build-id -dynamic-linker /lib64/ld-linux-x86-64.so.2 -m elf_x86_64 -o cmTC_32ad6 /opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin/for_main.o -L/opt/intel/18/clck/2018.3/lib/intel64 -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/lib/intel64 -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/lib/intel64/gcc4.4 -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/ -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/ -L/lib/../lib64 -L/lib/../lib64/ -L/usr/lib/../lib64 -L/usr/lib/../lib64/ -L/opt/intel/18/clck/2018.3/lib/intel64/ -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/lib/intel64/ -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin/ -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin/ -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/lib/intel64/gcc4.4/ -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../ -L/lib64 -L/lib/ -L/usr/lib64 -L/usr/lib CMakeFiles/cmTC_32ad6.dir/CMakeFortranCompilerABI.F.o -Bdynamic -Bstatic -lifport -lifcoremt -limf -lsvml -Bdynamic -lm -Bstatic -lipgo -Bdynamic -liomp5 -Bstatic -lirc -Bdynamic -lpthread -Bstatic -lsvml -Bdynamic -lc -lgcc -lgcc_s -Bstatic -lirc_s -Bdynamic -ldl -lc /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crtn.o -gmake[1]: Leaving directory `/scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp' - - - -Parsed Fortran implicit include dir info from above output: rv=done - found start of include info - found start of implicit include info - add: [.] - add: [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/include] - add: [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/include] - add: [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/pstl/include] - add: [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include] - add: [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include] - add: [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/intel64] - add: [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/icc] - add: [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include] - add: [/usr/local/include] - add: [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include] - add: [/usr/include/] - add: [/usr/include] - end of search list found - skipping relative include dir [.] - collapse include dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/include] ==> [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/include] - collapse include dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/include] ==> [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/include] - collapse include dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/pstl/include] ==> [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/pstl/include] - collapse include dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include] ==> [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include] - collapse include dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include] ==> [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include] - collapse include dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/intel64] ==> [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/intel64] - collapse include dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/icc] ==> [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/icc] - collapse include dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include] ==> [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include] - collapse include dir [/usr/local/include] ==> [/usr/local/include] - collapse include dir [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include] ==> [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include] - collapse include dir [/usr/include/] ==> [/usr/include] - collapse include dir [/usr/include] ==> [/usr/include] - implicit include dirs: [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/include;/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/include;/opt/intel/18/compilers_and_libraries_2018.3.222/linux/pstl/include;/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include;/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/intel64;/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/icc;/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include;/usr/local/include;/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include;/usr/include] - - -Parsed Fortran implicit link information from above output: - link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)] - ignore line: [Change Dir: /scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp] - ignore line: [] - ignore line: [Run Build Command(s):/usr/bin/gmake cmTC_32ad6/fast && /usr/bin/gmake -f CMakeFiles/cmTC_32ad6.dir/build.make CMakeFiles/cmTC_32ad6.dir/build] - ignore line: [gmake[1]: Entering directory `/scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp'] - ignore line: [Building Fortran object CMakeFiles/cmTC_32ad6.dir/CMakeFortranCompilerABI.F.o] - ignore line: [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/ifort -v -c /usr/share/cmake-3.17/Modules/CMakeFortranCompilerABI.F -o CMakeFiles/cmTC_32ad6.dir/CMakeFortranCompilerABI.F.o] - ignore line: [ifort version 18.0.3] - ignore line: [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/fpp -D__INTEL_COMPILER=1800 -D__INTEL_COMPILER_UPDATE=3 -D__unix__ -D__unix -D__linux__ -D__linux -D__gnu_linux__ -Dunix -Dlinux -D__ELF__ -D__x86_64 -D__x86_64__ -D__amd64 -D__amd64__ -D__INTEL_COMPILER_BUILD_DATE=20180410 -D__INTEL_OFFLOAD -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__ -D__pentium4 -D__pentium4__ -D__tune_pentium4__ -D__SSE2__ -D__SSE2_MATH__ -D__SSE__ -D__SSE_MATH__ -D__MMX__ -I. -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/pstl/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/intel64 -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/icc -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include -I/usr/local/include -I/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include -I/usr/include/ -I/usr/include -fixed -4Ycpp -4Ncvf -f_com=yes -MX /usr/share/cmake-3.17/Modules/CMakeFortranCompilerABI.F /tmp/ifortgZorku.i] - ignore line: [#include "..." search starts here:] - ignore line: [#include <...> search starts here:] - ignore line: [ .] - ignore line: [ /opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/include] - ignore line: [ /opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/include] - ignore line: [ /opt/intel/18/compilers_and_libraries_2018.3.222/linux/pstl/include] - ignore line: [ /opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include] - ignore line: [ /opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include] - ignore line: [ /opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/intel64] - ignore line: [ /opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/icc] - ignore line: [ /opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include] - ignore line: [ /usr/local/include] - ignore line: [ /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include] - ignore line: [ /usr/include/] - ignore line: [ /usr/include] - ignore line: [End of search list.] - ignore line: [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/fortcom -D__INTEL_COMPILER=1800 -D__INTEL_COMPILER_UPDATE=3 -D__unix__ -D__unix -D__linux__ -D__linux -D__gnu_linux__ -Dunix -Dlinux -D__ELF__ -D__x86_64 -D__x86_64__ -D__amd64 -D__amd64__ -D__INTEL_COMPILER_BUILD_DATE=20180410 -D__INTEL_OFFLOAD -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__ -D__pentium4 -D__pentium4__ -D__tune_pentium4__ -D__SSE2__ -D__SSE2_MATH__ -D__SSE__ -D__SSE_MATH__ -D__MMX__ -mGLOB_pack_sort_init_list -I/usr/share/cmake-3.17/Modules -I. -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/pstl/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/intel64 -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/icc -I/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include -I/usr/local/include -I/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include -I/usr/include/ -I/usr/include -O2 "-reentrancy threaded" -simd -offload_host -mGLOB_em64t=TRUE -mP1OPT_version=18.0-intel64 -mGLOB_diag_file=CMakeFiles/cmTC_32ad6.dir/CMakeFortranCompilerABI.F.diag -mGLOB_long_size_64 -mGLOB_routine_pointer_size_64 -mGLOB_source_language=GLOB_SOURCE_LANGUAGE_F90 -mP2OPT_static_promotion -mP1OPT_print_version=FALSE -mCG_use_gas_got_workaround=F -mP2OPT_align_option_used=TRUE -mGLOB_gcc_version=485 "-mGLOB_options_string=-v -c -o CMakeFiles/cmTC_32ad6.dir/CMakeFortranCompilerABI.F.o" -mGLOB_cxx_limited_range=FALSE -mCG_extend_parms=FALSE -mGLOB_compiler_bin_directory=/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64 -mGLOB_as_output_backup_file_name=/tmp/ifortnTayU7as_.s -mIPOPT_activate -mIPOPT_lite -mGLOB_instruction_tuning=0x0 -mGLOB_uarch_tuning=0x0 -mGLOB_product_id_code=0x22006d90 -mCG_bnl_movbe=T -mGLOB_extended_instructions=0x8 -mP3OPT_use_mspp_call_convention -mP2OPT_subs_out_of_bound=FALSE -mP2OPT_disam_type_based_disam=2 -mGLOB_ansi_alias -mPGOPTI_value_profile_use=T -mP2OPT_il0_array_sections=TRUE -mGLOB_offload_mode=1 -mP2OPT_offload_unique_var_string=ifort10342123004tk1WM -mP2OPT_hlo_level=2 -mP2OPT_hlo -mP2OPT_hpo_rtt_control=0 -mIPOPT_args_in_regs=0 -mP2OPT_disam_assume_nonstd_intent_in=FALSE -mGLOB_imf_mapping_library=/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/libiml_attr.so -mPGOPTI_gen_threadsafe_level=0 -mIPOPT_lto_object_enabled -mIPOPT_lto_object_value=1 -mIPOPT_obj_output_file_name=CMakeFiles/cmTC_32ad6.dir/CMakeFortranCompilerABI.F.o -mIPOPT_whole_archive_fixup_file_name=/tmp/ifortwarchLQ8Jjy -mGLOB_linker_version=2.27 -mGLOB_driver_tempfile_name=/tmp/iforttempfileioEtwL -mP3OPT_asm_target=P3OPT_ASM_TARGET_GAS -mGLOB_async_unwind_tables=TRUE -mGLOB_obj_output_file=CMakeFiles/cmTC_32ad6.dir/CMakeFortranCompilerABI.F.o -mGLOB_source_dialect=GLOB_SOURCE_DIALECT_FORTRAN -mP1OPT_source_file_name=/usr/share/cmake-3.17/Modules/CMakeFortranCompilerABI.F -mP1OPT_full_source_file_name=/usr/share/cmake-3.17/Modules/CMakeFortranCompilerABI.F -mP2OPT_symtab_type_copy=true /tmp/ifortgZorku.i] - ignore line: [#include "..." search starts here:] - ignore line: [#include <...> search starts here:] - ignore line: [ /usr/share/cmake-3.17/Modules] - ignore line: [ .] - ignore line: [ /opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/include] - ignore line: [ /opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/include] - ignore line: [ /opt/intel/18/compilers_and_libraries_2018.3.222/linux/pstl/include] - ignore line: [ /opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include] - ignore line: [ /opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/include] - ignore line: [ /opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/intel64] - ignore line: [ /opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include/icc] - ignore line: [ /opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/include] - ignore line: [ /usr/local/include] - ignore line: [ /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include] - ignore line: [ /usr/include/] - ignore line: [ /usr/include] - ignore line: [End of search list.] - ignore line: [Linking Fortran executable cmTC_32ad6] - ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_32ad6.dir/link.txt --verbose=1] - ignore line: [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/ifort -qopenmp -v CMakeFiles/cmTC_32ad6.dir/CMakeFortranCompilerABI.F.o -o cmTC_32ad6 ] - ignore line: [ifort version 18.0.3] - ignore line: [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/fortcom -mGLOB_em64t=TRUE -mP1OPT_version=18.0-intel64 -mGLOB_diag_file=CMakeFiles/cmTC_32ad6.dir/CMakeFortranCompilerABI.F.diag -mGLOB_long_size_64 -mGLOB_routine_pointer_size_64 -mGLOB_source_language=GLOB_SOURCE_LANGUAGE_F90 -mP2OPT_static_promotion -mP1OPT_print_version=FALSE -mCG_use_gas_got_workaround=F -mP2OPT_align_option_used=TRUE -mGLOB_gcc_version=485 "-mGLOB_options_string=-qopenmp -v -o cmTC_32ad6" -mGLOB_cxx_limited_range=FALSE -mCG_extend_parms=FALSE -mGLOB_compiler_bin_directory=/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64 -mGLOB_as_output_backup_file_name=/tmp/ifort7HTZWtas_.s -mGLOB_dashboard_use_source_name -mIPOPT_activate -mGLOB_product_id_code=0x22006d90 -mP3OPT_use_mspp_call_convention -mP2OPT_subs_out_of_bound=FALSE -mP2OPT_disam_type_based_disam=2 -mGLOB_ansi_alias -mPGOPTI_value_profile_use=T -mGLOB_opt_report_use_source_name -mPAROPT_openmp=TRUE -mP2OPT_il0_array_sections=TRUE -mGLOB_offload_mode=1 -mP2OPT_offload_unique_var_string=ifort1234220830TodadS -mP2OPT_hlo -mP2OPT_hpo_rtt_control=0 -mIPOPT_args_in_regs=0 -mP2OPT_disam_assume_nonstd_intent_in=FALSE -mGLOB_imf_mapping_library=/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/libiml_attr.so -mPGOPTI_gen_threadsafe_level=0 -mIPOPT_link -mIPOPT_ipo_activate -mIPOPT_mo_activate -mIPOPT_source_files_list=/tmp/ifortslisnGggNP -mIPOPT_mo_global_data -mIPOPT_link_script_file=/tmp/ifortscriptlF5Za3 "-mIPOPT_cmdline_link="/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o" "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o" "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbegin.o" "--eh-frame-hdr" "--build-id" "-dynamic-linker" "/lib64/ld-linux-x86-64.so.2" "-m" "elf_x86_64" "-o" "cmTC_32ad6" "/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin/for_main.o" "-L/opt/intel/18/clck/2018.3/lib/intel64" "-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/lib/intel64" "-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin" "-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin" "-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/lib/intel64/gcc4.4" "-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin" "-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/" "-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64" "-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/" "-L/lib/../lib64" "-L/lib/../lib64/" "-L/usr/lib/../lib64" "-L/usr/lib/../lib64/" "-L/opt/intel/18/clck/2018.3/lib/intel64/" "-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/lib/intel64/" "-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin/" "-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin/" "-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/lib/intel64/gcc4.4/" "-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../" "-L/lib64" "-L/lib/" "-L/usr/lib64" "-L/usr/lib" "CMakeFiles/cmTC_32ad6.dir/CMakeFortranCompilerABI.F.o" "-Bdynamic" "-Bstatic" "-lifport" "-lifcoremt" "-limf" "-lsvml" "-Bdynamic" "-lm" "-Bstatic" "-lipgo" "-Bdynamic" "-liomp5" "-Bstatic" "-lirc" "-Bdynamic" "-lpthread" "-Bstatic" "-lsvml" "-Bdynamic" "-lc" "-lgcc" "-lgcc_s" "-Bstatic" "-lirc_s" "-Bdynamic" "-ldl" "-lc" "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtend.o" "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crtn.o"" -mIPOPT_il_in_obj -mIPOPT_ipo_activate_warn=FALSE -mIPOPT_obj_output_file_name=/tmp/ipo_ifortzsqQux.o -mIPOPT_whole_archive_fixup_file_name=/tmp/ifortwarchJ3sw87 -mGLOB_linker_version=2.27 -mGLOB_driver_tempfile_name=/tmp/iforttempfileTSHmxl -mP3OPT_asm_target=P3OPT_ASM_TARGET_GAS -mGLOB_async_unwind_tables=TRUE -mGLOB_obj_output_file=/tmp/ipo_ifortzsqQux.o -mGLOB_source_dialect=GLOB_SOURCE_DIALECT_NONE -mP1OPT_source_file_name=ipo_out.f -mP2OPT_symtab_type_copy=true CMakeFiles/cmTC_32ad6.dir/CMakeFortranCompilerABI.F.o -mIPOPT_object_files=T -mIPOPT_assembly_files=/tmp/ifortalisjozjgY -mIPOPT_generated_tempfiles=/tmp/ifortelis7og2Db -mIPOPT_embedded_object_base_name=/tmp/iforteobjDWdL1o -mIPOPT_cmdline_link_new_name=/tmp/ifortllisJ0BvpC] - link line: [ld /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbegin.o --eh-frame-hdr --build-id -dynamic-linker /lib64/ld-linux-x86-64.so.2 -m elf_x86_64 -o cmTC_32ad6 /opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin/for_main.o -L/opt/intel/18/clck/2018.3/lib/intel64 -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/lib/intel64 -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/lib/intel64/gcc4.4 -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/ -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/ -L/lib/../lib64 -L/lib/../lib64/ -L/usr/lib/../lib64 -L/usr/lib/../lib64/ -L/opt/intel/18/clck/2018.3/lib/intel64/ -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/lib/intel64/ -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin/ -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin/ -L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/lib/intel64/gcc4.4/ -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../ -L/lib64 -L/lib/ -L/usr/lib64 -L/usr/lib CMakeFiles/cmTC_32ad6.dir/CMakeFortranCompilerABI.F.o -Bdynamic -Bstatic -lifport -lifcoremt -limf -lsvml -Bdynamic -lm -Bstatic -lipgo -Bdynamic -liomp5 -Bstatic -lirc -Bdynamic -lpthread -Bstatic -lsvml -Bdynamic -lc -lgcc -lgcc_s -Bstatic -lirc_s -Bdynamic -ldl -lc /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crtn.o] - arg [ld] ==> ignore - arg [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o] ==> ignore - arg [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o] ==> ignore - arg [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbegin.o] ==> ignore - arg [--eh-frame-hdr] ==> ignore - arg [--build-id] ==> ignore - arg [-dynamic-linker] ==> ignore - arg [/lib64/ld-linux-x86-64.so.2] ==> ignore - arg [-m] ==> ignore - arg [elf_x86_64] ==> ignore - arg [-o] ==> ignore - arg [cmTC_32ad6] ==> ignore - arg [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin/for_main.o] ==> ignore - arg [-L/opt/intel/18/clck/2018.3/lib/intel64] ==> dir [/opt/intel/18/clck/2018.3/lib/intel64] - arg [-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/lib/intel64] ==> dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/lib/intel64] - arg [-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin] ==> dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin] - arg [-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin] ==> dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin] - arg [-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/lib/intel64/gcc4.4] ==> dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/lib/intel64/gcc4.4] - arg [-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin] ==> dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin] - arg [-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/] - arg [-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64] - arg [-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/] - arg [-L/lib/../lib64] ==> dir [/lib/../lib64] - arg [-L/lib/../lib64/] ==> dir [/lib/../lib64/] - arg [-L/usr/lib/../lib64] ==> dir [/usr/lib/../lib64] - arg [-L/usr/lib/../lib64/] ==> dir [/usr/lib/../lib64/] - arg [-L/opt/intel/18/clck/2018.3/lib/intel64/] ==> dir [/opt/intel/18/clck/2018.3/lib/intel64/] - arg [-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/lib/intel64/] ==> dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/lib/intel64/] - arg [-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin/] ==> dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin/] - arg [-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin/] ==> dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin/] - arg [-L/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/lib/intel64/gcc4.4/] ==> dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/lib/intel64/gcc4.4/] - arg [-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../] - arg [-L/lib64] ==> dir [/lib64] - arg [-L/lib/] ==> dir [/lib/] - arg [-L/usr/lib64] ==> dir [/usr/lib64] - arg [-L/usr/lib] ==> dir [/usr/lib] - arg [CMakeFiles/cmTC_32ad6.dir/CMakeFortranCompilerABI.F.o] ==> ignore - arg [-Bdynamic] ==> ignore - arg [-Bstatic] ==> ignore - arg [-lifport] ==> lib [ifport] - arg [-lifcoremt] ==> lib [ifcoremt] - arg [-limf] ==> lib [imf] - arg [-lsvml] ==> lib [svml] - arg [-Bdynamic] ==> ignore - arg [-lm] ==> lib [m] - arg [-Bstatic] ==> ignore - arg [-lipgo] ==> lib [ipgo] - arg [-Bdynamic] ==> ignore - arg [-liomp5] ==> lib [iomp5] - arg [-Bstatic] ==> ignore - arg [-lirc] ==> lib [irc] - arg [-Bdynamic] ==> ignore - arg [-lpthread] ==> lib [pthread] - arg [-Bstatic] ==> ignore - arg [-lsvml] ==> lib [svml] - arg [-Bdynamic] ==> ignore - arg [-lc] ==> lib [c] - arg [-lgcc] ==> lib [gcc] - arg [-lgcc_s] ==> lib [gcc_s] - arg [-Bstatic] ==> ignore - arg [-lirc_s] ==> lib [irc_s] - arg [-Bdynamic] ==> ignore - arg [-ldl] ==> lib [dl] - arg [-lc] ==> lib [c] - arg [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtend.o] ==> ignore - arg [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crtn.o] ==> ignore - collapse library dir [/opt/intel/18/clck/2018.3/lib/intel64] ==> [/opt/intel/18/clck/2018.3/lib/intel64] - collapse library dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/lib/intel64] ==> [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/lib/intel64] - collapse library dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin] ==> [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin] - collapse library dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin] ==> [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin] - collapse library dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/lib/intel64/gcc4.4] ==> [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/lib/intel64/gcc4.4] - collapse library dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin] ==> [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin] - collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/] ==> [/usr/lib/gcc/x86_64-redhat-linux/4.8.5] - collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64] ==> [/usr/lib64] - collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/] ==> [/usr/lib64] - collapse library dir [/lib/../lib64] ==> [/lib64] - collapse library dir [/lib/../lib64/] ==> [/lib64] - collapse library dir [/usr/lib/../lib64] ==> [/usr/lib64] - collapse library dir [/usr/lib/../lib64/] ==> [/usr/lib64] - collapse library dir [/opt/intel/18/clck/2018.3/lib/intel64/] ==> [/opt/intel/18/clck/2018.3/lib/intel64] - collapse library dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/lib/intel64/] ==> [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/lib/intel64] - collapse library dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin/] ==> [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin] - collapse library dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin/] ==> [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin] - collapse library dir [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/lib/intel64/gcc4.4/] ==> [/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/lib/intel64/gcc4.4] - collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../] ==> [/usr/lib] - collapse library dir [/lib64] ==> [/lib64] - collapse library dir [/lib/] ==> [/lib] - collapse library dir [/usr/lib64] ==> [/usr/lib64] - collapse library dir [/usr/lib] ==> [/usr/lib] - implicit libs: [ifport;ifcoremt;imf;svml;m;ipgo;iomp5;irc;pthread;svml;c;gcc;gcc_s;irc_s;dl;c] - implicit dirs: [/opt/intel/18/clck/2018.3/lib/intel64;/opt/intel/18/compilers_and_libraries_2018.3.222/linux/ipp/lib/intel64;/opt/intel/18/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin;/opt/intel/18/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin;/opt/intel/18/compilers_and_libraries_2018.3.222/linux/tbb/lib/intel64/gcc4.4;/usr/lib/gcc/x86_64-redhat-linux/4.8.5;/usr/lib64;/lib64;/usr/lib;/lib] - implicit fwks: [] - - -Determining if the Fortran compiler supports Fortran 90 passed with the following output: -Change Dir: /scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp - -Run Build Command(s):/usr/bin/gmake cmTC_06c35/fast && /usr/bin/gmake -f CMakeFiles/cmTC_06c35.dir/build.make CMakeFiles/cmTC_06c35.dir/build -gmake[1]: Entering directory `/scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp' -Building Fortran object CMakeFiles/cmTC_06c35.dir/testFortranCompilerF90.f90.o -/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/ifort -c /scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp/testFortranCompilerF90.f90 -o CMakeFiles/cmTC_06c35.dir/testFortranCompilerF90.f90.o -Linking Fortran executable cmTC_06c35 -/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_06c35.dir/link.txt --verbose=1 -/opt/intel/18/compilers_and_libraries_2018.3.222/linux/bin/intel64/ifort -qopenmp CMakeFiles/cmTC_06c35.dir/testFortranCompilerF90.f90.o -o cmTC_06c35 -gmake[1]: Leaving directory `/scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp' - - - -The system is: Linux - /bin/sh: 1: /usr/bin/uname: not found - unknown -The system is: Linux - 3.10.0-957.1.3.el7.x86_64 - x86_64 -Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" succeeded. -Compiler: /usr/bin/gfortran -Build flags: -Id flags: -v - -The output was: -0 -Driving: /usr/bin/gfortran -v CMakeFortranCompilerId.F -l gfortran -l m -shared-libgcc -Using built-in specs. -COLLECT_GCC=/usr/bin/gfortran -COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -OFFLOAD_TARGET_NAMES=nvptx-none:hsa -OFFLOAD_TARGET_DEFAULT=1 -Target: x86_64-linux-gnu -Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-11ubuntu0~18.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu -Thread model: posix -gcc version 9.3.0 (Ubuntu 9.3.0-11ubuntu0~18.04.1) -COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' - /usr/lib/gcc/x86_64-linux-gnu/9/f951 CMakeFortranCompilerId.F -ffixed-form -cpp=/tmp/ccPzxOvq.f90 -quiet -v -imultiarch x86_64-linux-gnu CMakeFortranCompilerId.F -quiet -dumpbase CMakeFortranCompilerId.F -mtune=generic -march=x86-64 -auxbase CMakeFortranCompilerId -version -fintrinsic-modules-path /usr/lib/gcc/x86_64-linux-gnu/9/finclude -o /tmp/ccIs4NK7.s -GNU Fortran (Ubuntu 9.3.0-11ubuntu0~18.04.1) version 9.3.0 (x86_64-linux-gnu) - compiled by GNU C version 9.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.19-GMP - -GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 -ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu" -ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed" -ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include" -#include "..." search starts here: -#include <...> search starts here: - /usr/lib/gcc/x86_64-linux-gnu/9/finclude - /usr/lib/gcc/x86_64-linux-gnu/9/include - /usr/local/include - /usr/include/x86_64-linux-gnu - /usr/include -End of search list. -GNU Fortran2008 (Ubuntu 9.3.0-11ubuntu0~18.04.1) version 9.3.0 (x86_64-linux-gnu) - compiled by GNU C version 9.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.19-GMP - -GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 -COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' - as -v --64 -o /tmp/ccDdGO4O.o /tmp/ccIs4NK7.s -GNU assembler version 2.30 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.30 -Reading specs from /usr/lib/gcc/x86_64-linux-gnu/9/libgfortran.spec -rename spec lib to liborig -COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' -COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/ -LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/ -COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' - /usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/ccoPu0pw.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lquadmath -plugin-opt=-pass-through=-lm -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. /tmp/ccDdGO4O.o -lgfortran -lm -lgcc_s -lgcc -lquadmath -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o -COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' - - -Compilation of the Fortran compiler identification source "CMakeFortranCompilerId.F" produced "a.out" - -The Fortran compiler identification is GNU, found in "/scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/3.16.0/CompilerIdFortran/a.out" - -Determining if the Fortran compiler works passed with the following output: -Change Dir: /scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp - -Run Build Command(s):/usr/bin/make cmTC_1c9db/fast && /usr/bin/make -f CMakeFiles/cmTC_1c9db.dir/build.make CMakeFiles/cmTC_1c9db.dir/build -make[1]: Entering directory '/scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp' -Building Fortran object CMakeFiles/cmTC_1c9db.dir/testFortranCompiler.f.o -/usr/bin/gfortran -c /scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp/testFortranCompiler.f -o CMakeFiles/cmTC_1c9db.dir/testFortranCompiler.f.o -Linking Fortran executable cmTC_1c9db -/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_1c9db.dir/link.txt --verbose=1 -/usr/bin/gfortran -fopenmp CMakeFiles/cmTC_1c9db.dir/testFortranCompiler.f.o -o cmTC_1c9db -make[1]: Leaving directory '/scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp' - - - -Detecting Fortran compiler ABI info compiled with the following output: -Change Dir: /scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp - -Run Build Command(s):/usr/bin/make cmTC_84089/fast && /usr/bin/make -f CMakeFiles/cmTC_84089.dir/build.make CMakeFiles/cmTC_84089.dir/build -make[1]: Entering directory '/scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp' -Building Fortran object CMakeFiles/cmTC_84089.dir/CMakeFortranCompilerABI.F.o -/usr/bin/gfortran -v -c /usr/local/share/cmake-3.16/Modules/CMakeFortranCompilerABI.F -o CMakeFiles/cmTC_84089.dir/CMakeFortranCompilerABI.F.o -Using built-in specs. -COLLECT_GCC=/usr/bin/gfortran -OFFLOAD_TARGET_NAMES=nvptx-none:hsa -OFFLOAD_TARGET_DEFAULT=1 -Target: x86_64-linux-gnu -Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-11ubuntu0~18.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu -Thread model: posix -gcc version 9.3.0 (Ubuntu 9.3.0-11ubuntu0~18.04.1) -COLLECT_GCC_OPTIONS='-v' '-c' '-o' 'CMakeFiles/cmTC_84089.dir/CMakeFortranCompilerABI.F.o' '-mtune=generic' '-march=x86-64' - /usr/lib/gcc/x86_64-linux-gnu/9/f951 /usr/local/share/cmake-3.16/Modules/CMakeFortranCompilerABI.F -ffixed-form -cpp=/tmp/cceTh9XX.f90 -quiet -v -imultiarch x86_64-linux-gnu /usr/local/share/cmake-3.16/Modules/CMakeFortranCompilerABI.F -quiet -dumpbase CMakeFortranCompilerABI.F -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_84089.dir/CMakeFortranCompilerABI.F.o -version -fintrinsic-modules-path /usr/lib/gcc/x86_64-linux-gnu/9/finclude -o /tmp/cc6zInuG.s -GNU Fortran (Ubuntu 9.3.0-11ubuntu0~18.04.1) version 9.3.0 (x86_64-linux-gnu) - compiled by GNU C version 9.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.19-GMP - -GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 -ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu" -ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed" -ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include" -#include "..." search starts here: -#include <...> search starts here: - /usr/lib/gcc/x86_64-linux-gnu/9/finclude - /usr/lib/gcc/x86_64-linux-gnu/9/include - /usr/local/include - /usr/include/x86_64-linux-gnu - /usr/include -End of search list. -GNU Fortran2008 (Ubuntu 9.3.0-11ubuntu0~18.04.1) version 9.3.0 (x86_64-linux-gnu) - compiled by GNU C version 9.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.19-GMP - -GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 -COLLECT_GCC_OPTIONS='-v' '-c' '-o' 'CMakeFiles/cmTC_84089.dir/CMakeFortranCompilerABI.F.o' '-mtune=generic' '-march=x86-64' - as -v --64 -o CMakeFiles/cmTC_84089.dir/CMakeFortranCompilerABI.F.o /tmp/cc6zInuG.s -GNU assembler version 2.30 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.30 -COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/ -LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/ -COLLECT_GCC_OPTIONS='-v' '-c' '-o' 'CMakeFiles/cmTC_84089.dir/CMakeFortranCompilerABI.F.o' '-mtune=generic' '-march=x86-64' -Linking Fortran executable cmTC_84089 -/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_84089.dir/link.txt --verbose=1 -/usr/bin/gfortran -fopenmp -v CMakeFiles/cmTC_84089.dir/CMakeFortranCompilerABI.F.o -o cmTC_84089 -Driving: /usr/bin/gfortran -fopenmp -v CMakeFiles/cmTC_84089.dir/CMakeFortranCompilerABI.F.o -o cmTC_84089 -l gfortran -l m -shared-libgcc -Using built-in specs. -COLLECT_GCC=/usr/bin/gfortran -COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -OFFLOAD_TARGET_NAMES=nvptx-none:hsa -OFFLOAD_TARGET_DEFAULT=1 -Target: x86_64-linux-gnu -Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-11ubuntu0~18.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu -Thread model: posix -gcc version 9.3.0 (Ubuntu 9.3.0-11ubuntu0~18.04.1) -Reading specs from /usr/lib/gcc/x86_64-linux-gnu/9/libgfortran.spec -rename spec lib to liborig -COLLECT_GCC_OPTIONS='-fopenmp' '-v' '-o' 'cmTC_84089' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-pthread' -COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/ -LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/ -Reading specs from /usr/lib/gcc/x86_64-linux-gnu/9/libgomp.spec -COLLECT_GCC_OPTIONS='-fopenmp' '-v' '-o' 'cmTC_84089' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-pthread' - /usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/ccovcshX.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lquadmath -plugin-opt=-pass-through=-lm -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_84089 /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o /usr/lib/gcc/x86_64-linux-gnu/9/crtoffloadbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. CMakeFiles/cmTC_84089.dir/CMakeFortranCompilerABI.F.o -lgfortran -lm -lgomp -lgcc_s -lgcc -lquadmath -lm -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o /usr/lib/gcc/x86_64-linux-gnu/9/crtoffloadend.o -COLLECT_GCC_OPTIONS='-fopenmp' '-v' '-o' 'cmTC_84089' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-pthread' -make[1]: Leaving directory '/scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp' - - - -Parsed Fortran implicit include dir info from above output: rv=done - found start of include info - found start of implicit include info - add: [/usr/lib/gcc/x86_64-linux-gnu/9/finclude] - add: [/usr/lib/gcc/x86_64-linux-gnu/9/include] - add: [/usr/local/include] - add: [/usr/include/x86_64-linux-gnu] - add: [/usr/include] - end of search list found - collapse include dir [/usr/lib/gcc/x86_64-linux-gnu/9/finclude] ==> [/usr/lib/gcc/x86_64-linux-gnu/9/finclude] - collapse include dir [/usr/lib/gcc/x86_64-linux-gnu/9/include] ==> [/usr/lib/gcc/x86_64-linux-gnu/9/include] - collapse include dir [/usr/local/include] ==> [/usr/local/include] - collapse include dir [/usr/include/x86_64-linux-gnu] ==> [/usr/include/x86_64-linux-gnu] - collapse include dir [/usr/include] ==> [/usr/include] - implicit include dirs: [/usr/lib/gcc/x86_64-linux-gnu/9/finclude;/usr/lib/gcc/x86_64-linux-gnu/9/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include] - - -Parsed Fortran implicit link information from above output: - link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)] - ignore line: [Change Dir: /scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp] - ignore line: [] - ignore line: [Run Build Command(s):/usr/bin/make cmTC_84089/fast && /usr/bin/make -f CMakeFiles/cmTC_84089.dir/build.make CMakeFiles/cmTC_84089.dir/build] - ignore line: [make[1]: Entering directory '/scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp'] - ignore line: [Building Fortran object CMakeFiles/cmTC_84089.dir/CMakeFortranCompilerABI.F.o] - ignore line: [/usr/bin/gfortran -v -c /usr/local/share/cmake-3.16/Modules/CMakeFortranCompilerABI.F -o CMakeFiles/cmTC_84089.dir/CMakeFortranCompilerABI.F.o] - ignore line: [Using built-in specs.] - ignore line: [COLLECT_GCC=/usr/bin/gfortran] - ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:hsa] - ignore line: [OFFLOAD_TARGET_DEFAULT=1] - ignore line: [Target: x86_64-linux-gnu] - ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-11ubuntu0~18.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu] - ignore line: [Thread model: posix] - ignore line: [gcc version 9.3.0 (Ubuntu 9.3.0-11ubuntu0~18.04.1) ] - ignore line: [COLLECT_GCC_OPTIONS='-v' '-c' '-o' 'CMakeFiles/cmTC_84089.dir/CMakeFortranCompilerABI.F.o' '-mtune=generic' '-march=x86-64'] - ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/9/f951 /usr/local/share/cmake-3.16/Modules/CMakeFortranCompilerABI.F -ffixed-form -cpp=/tmp/cceTh9XX.f90 -quiet -v -imultiarch x86_64-linux-gnu /usr/local/share/cmake-3.16/Modules/CMakeFortranCompilerABI.F -quiet -dumpbase CMakeFortranCompilerABI.F -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_84089.dir/CMakeFortranCompilerABI.F.o -version -fintrinsic-modules-path /usr/lib/gcc/x86_64-linux-gnu/9/finclude -o /tmp/cc6zInuG.s] - ignore line: [GNU Fortran (Ubuntu 9.3.0-11ubuntu0~18.04.1) version 9.3.0 (x86_64-linux-gnu)] - ignore line: [ compiled by GNU C version 9.3.0 GMP version 6.1.2 MPFR version 4.0.1 MPC version 1.1.0 isl version isl-0.19-GMP] - ignore line: [] - ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] - ignore line: [ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"] - ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed"] - ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include"] - ignore line: [#include "..." search starts here:] - ignore line: [#include <...> search starts here:] - ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/9/finclude] - ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/9/include] - ignore line: [ /usr/local/include] - ignore line: [ /usr/include/x86_64-linux-gnu] - ignore line: [ /usr/include] - ignore line: [End of search list.] - ignore line: [GNU Fortran2008 (Ubuntu 9.3.0-11ubuntu0~18.04.1) version 9.3.0 (x86_64-linux-gnu)] - ignore line: [ compiled by GNU C version 9.3.0 GMP version 6.1.2 MPFR version 4.0.1 MPC version 1.1.0 isl version isl-0.19-GMP] - ignore line: [] - ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] - ignore line: [COLLECT_GCC_OPTIONS='-v' '-c' '-o' 'CMakeFiles/cmTC_84089.dir/CMakeFortranCompilerABI.F.o' '-mtune=generic' '-march=x86-64'] - ignore line: [ as -v --64 -o CMakeFiles/cmTC_84089.dir/CMakeFortranCompilerABI.F.o /tmp/cc6zInuG.s] - ignore line: [GNU assembler version 2.30 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.30] - ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/] - ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/] - ignore line: [COLLECT_GCC_OPTIONS='-v' '-c' '-o' 'CMakeFiles/cmTC_84089.dir/CMakeFortranCompilerABI.F.o' '-mtune=generic' '-march=x86-64'] - ignore line: [Linking Fortran executable cmTC_84089] - ignore line: [/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_84089.dir/link.txt --verbose=1] - ignore line: [/usr/bin/gfortran -fopenmp -v CMakeFiles/cmTC_84089.dir/CMakeFortranCompilerABI.F.o -o cmTC_84089 ] - ignore line: [Driving: /usr/bin/gfortran -fopenmp -v CMakeFiles/cmTC_84089.dir/CMakeFortranCompilerABI.F.o -o cmTC_84089 -l gfortran -l m -shared-libgcc] - ignore line: [Using built-in specs.] - ignore line: [COLLECT_GCC=/usr/bin/gfortran] - ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper] - ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:hsa] - ignore line: [OFFLOAD_TARGET_DEFAULT=1] - ignore line: [Target: x86_64-linux-gnu] - ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-11ubuntu0~18.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu] - ignore line: [Thread model: posix] - ignore line: [gcc version 9.3.0 (Ubuntu 9.3.0-11ubuntu0~18.04.1) ] - ignore line: [Reading specs from /usr/lib/gcc/x86_64-linux-gnu/9/libgfortran.spec] - ignore line: [rename spec lib to liborig] - ignore line: [COLLECT_GCC_OPTIONS='-fopenmp' '-v' '-o' 'cmTC_84089' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-pthread'] - ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/] - ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/] - ignore line: [Reading specs from /usr/lib/gcc/x86_64-linux-gnu/9/libgomp.spec] - ignore line: [COLLECT_GCC_OPTIONS='-fopenmp' '-v' '-o' 'cmTC_84089' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-pthread'] - link line: [ /usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/ccovcshX.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lquadmath -plugin-opt=-pass-through=-lm -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_84089 /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o /usr/lib/gcc/x86_64-linux-gnu/9/crtoffloadbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. CMakeFiles/cmTC_84089.dir/CMakeFortranCompilerABI.F.o -lgfortran -lm -lgomp -lgcc_s -lgcc -lquadmath -lm -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o /usr/lib/gcc/x86_64-linux-gnu/9/crtoffloadend.o] - arg [/usr/lib/gcc/x86_64-linux-gnu/9/collect2] ==> ignore - arg [-plugin] ==> ignore - arg [/usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so] ==> ignore - arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper] ==> ignore - arg [-plugin-opt=-fresolution=/tmp/ccovcshX.res] ==> ignore - arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore - arg [-plugin-opt=-pass-through=-lgcc] ==> ignore - arg [-plugin-opt=-pass-through=-lquadmath] ==> ignore - arg [-plugin-opt=-pass-through=-lm] ==> ignore - arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore - arg [-plugin-opt=-pass-through=-lgcc] ==> ignore - arg [-plugin-opt=-pass-through=-lpthread] ==> ignore - arg [-plugin-opt=-pass-through=-lc] ==> ignore - arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore - arg [-plugin-opt=-pass-through=-lgcc] ==> ignore - arg [--build-id] ==> ignore - arg [--eh-frame-hdr] ==> ignore - arg [-m] ==> ignore - arg [elf_x86_64] ==> ignore - arg [--hash-style=gnu] ==> ignore - arg [--as-needed] ==> ignore - arg [-dynamic-linker] ==> ignore - arg [/lib64/ld-linux-x86-64.so.2] ==> ignore - arg [-pie] ==> ignore - arg [-znow] ==> ignore - arg [-zrelro] ==> ignore - arg [-o] ==> ignore - arg [cmTC_84089] ==> ignore - arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o] ==> ignore - arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o] ==> ignore - arg [/usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o] ==> ignore - arg [/usr/lib/gcc/x86_64-linux-gnu/9/crtoffloadbegin.o] ==> ignore - arg [-L/usr/lib/gcc/x86_64-linux-gnu/9] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9] - arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] - arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] - arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu] - arg [-L/lib/../lib] ==> dir [/lib/../lib] - arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu] - arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib] - arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../..] - arg [CMakeFiles/cmTC_84089.dir/CMakeFortranCompilerABI.F.o] ==> ignore - arg [-lgfortran] ==> lib [gfortran] - arg [-lm] ==> lib [m] - arg [-lgomp] ==> lib [gomp] - arg [-lgcc_s] ==> lib [gcc_s] - arg [-lgcc] ==> lib [gcc] - arg [-lquadmath] ==> lib [quadmath] - arg [-lm] ==> lib [m] - arg [-lgcc_s] ==> lib [gcc_s] - arg [-lgcc] ==> lib [gcc] - arg [-lpthread] ==> lib [pthread] - arg [-lc] ==> lib [c] - arg [-lgcc_s] ==> lib [gcc_s] - arg [-lgcc] ==> lib [gcc] - arg [/usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o] ==> ignore - arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o] ==> ignore - arg [/usr/lib/gcc/x86_64-linux-gnu/9/crtoffloadend.o] ==> ignore - collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9] ==> [/usr/lib/gcc/x86_64-linux-gnu/9] - collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] - collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] ==> [/usr/lib] - collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu] - collapse library dir [/lib/../lib] ==> [/lib] - collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] - collapse library dir [/usr/lib/../lib] ==> [/usr/lib] - collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../..] ==> [/usr/lib] - implicit libs: [gfortran;m;gomp;gcc_s;gcc;quadmath;m;gcc_s;gcc;pthread;c;gcc_s;gcc] - implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/9;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib] - implicit fwks: [] - - -Determining if the Fortran compiler supports Fortran 90 passed with the following output: -Change Dir: /scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp - -Run Build Command(s):/usr/bin/make cmTC_936c0/fast && /usr/bin/make -f CMakeFiles/cmTC_936c0.dir/build.make CMakeFiles/cmTC_936c0.dir/build -make[1]: Entering directory '/scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp' -Building Fortran object CMakeFiles/cmTC_936c0.dir/testFortranCompilerF90.f90.o -/usr/bin/gfortran -c /scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp/testFortranCompilerF90.f90 -o CMakeFiles/cmTC_936c0.dir/testFortranCompilerF90.f90.o -Linking Fortran executable cmTC_936c0 -/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_936c0.dir/link.txt --verbose=1 -/usr/bin/gfortran -fopenmp CMakeFiles/cmTC_936c0.dir/testFortranCompilerF90.f90.o -o cmTC_936c0 -make[1]: Leaving directory '/scratch/long/users/bjohnson/singularity/CRTM_dev/src/Build/CMakeFiles/CMakeTmp' - - - diff --git a/src/Build/CMakeLists.txt b/src/Build/CMakeLists.txt deleted file mode 100644 index 69a0d8a..0000000 --- a/src/Build/CMakeLists.txt +++ /dev/null @@ -1,114 +0,0 @@ -# -# CRTM -# Copyright and License: see LICENSE - -cmake_minimum_required( VERSION 3.12 ) -project( crtm LANGUAGES Fortran ) - -## Ecbuild integration -find_package( ecbuild QUIET ) -include( ecbuild_system NO_POLICY_SCOPE ) -ecbuild_declare_project() -list( APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ) -set( CMAKE_DIRECTORY_LABELS ${PROJECT_NAME} ) - -## Configuration options -include( ${PROJECT_NAME}_compiler_flags ) -include(GNUInstallDirs) - -## Dependencies -find_package( OpenMP COMPONENTS Fortran ) -find_package( NetCDF REQUIRED COMPONENTS Fortran ) - -## Sources -add_subdirectory( libsrc ) - -## Install coefficients to build and install tree -# -# Coefficients will be provided in both the build-tree and the install-tree. -# -# The coefficient files are installed with the exact folder structure of the `fix` subfolders -# -# A `UFOCoeff` folder is also provided as a single flat folder of symlinks into the `fix` subfolders -# for the appropriate architecture endianness. For efficiency no extra copies of coefficients are created -# at build time or in the install tree, only symlinks are added. -# -# These locations will be exported to crtm dependencies as `crtm_COEFFICIENT_DIR` and `crtm_UFO_COEFFICIENT_DIR` -# with locations set depending on if the CRTM package was found in the build-tree or the install-tree. - -#Build-tree location for Coefficients -set(COEFFICIENT_BUILD_DIR ${CMAKE_SOURCE_DIR}/fix) -#Build-tree location for UFOCoeff -set(UFO_COEFFICIENT_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/UFOCoeff) -#Build-tree staging location in which to prepare the install-tree's UFOCoeff symlinks. -set(UFO_COEFFICIENT_PRE_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/pre-install/UFOCoeff) -#Install-tree (relative) location for crtm share data -set(CRTM_SHARE_INSTALL_DIR ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}) -#install-tree (relative) location for the UFOCoeff symlinks. -set(UFO_COEFFICIENT_INSTALL_DIR ${CRTM_SHARE_INSTALL_DIR}/UFOCoeff) - -#Test endianness of system -include(TestBigEndian) -test_big_endian(IS_BIG_ENDIAN) -if(IS_BIG_ENDIAN) - message(WARNING "CRTM detected this is a big-endian architecture. \ - Some coefficient files may not be included by default but may be obtained separately.") - set(COEFFICIENT_ENDIAN_DIR Big_Endian) -else() - set(COEFFICIENT_ENDIAN_DIR Little_Endian) -endif() - -# Symlink installed coefficients into a common directory for UFO observation operators -# List of all coefficient sub-directories -set(UFO_COEFFICIENT_SRC_DIRS AerosolCoeff/${COEFFICIENT_ENDIAN_DIR} - CloudCoeff/${COEFFICIENT_ENDIAN_DIR} - EmisCoeff/IR_Ice/SEcategory/${COEFFICIENT_ENDIAN_DIR} - EmisCoeff/IR_Land/SEcategory/${COEFFICIENT_ENDIAN_DIR} - EmisCoeff/IR_Snow/SEcategory/${COEFFICIENT_ENDIAN_DIR} - EmisCoeff/IR_Water/${COEFFICIENT_ENDIAN_DIR} - EmisCoeff/MW_Water/${COEFFICIENT_ENDIAN_DIR} - EmisCoeff/VIS_Ice/SEcategory/${COEFFICIENT_ENDIAN_DIR} - EmisCoeff/VIS_Land/SEcategory/${COEFFICIENT_ENDIAN_DIR} - EmisCoeff/VIS_Snow/SEcategory/${COEFFICIENT_ENDIAN_DIR} - EmisCoeff/VIS_Water/SEcategory/${COEFFICIENT_ENDIAN_DIR} - SpcCoeff/${COEFFICIENT_ENDIAN_DIR} - TauCoeff/ODAS/${COEFFICIENT_ENDIAN_DIR} - TauCoeff/ODPS/${COEFFICIENT_ENDIAN_DIR}) - - -#Create symlink directory structure (these will run at CMake configure-time) -file(MAKE_DIRECTORY ${UFO_COEFFICIENT_BUILD_DIR}) -file(MAKE_DIRECTORY ${UFO_COEFFICIENT_PRE_INSTALL_DIR}) -foreach(_dir IN LISTS UFO_COEFFICIENT_SRC_DIRS) - set(_src_dir ${PROJECT_SOURCE_DIR}/fix/${_dir}) - if(EXISTS ${_src_dir}) - file(GLOB _all_files RELATIVE ${_src_dir} ${_src_dir}/*.bin) - foreach(_file IN LISTS _all_files) - #Install coefficient symlinks for build-phase in-bundle testing - execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${_src_dir}/${_file} ${UFO_COEFFICIENT_BUILD_DIR}/${_file}) - #Install coefficient symlinks for install phase - execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../fix/${_dir}/${_file} ${UFO_COEFFICIENT_PRE_INSTALL_DIR}/${_file}) - endforeach() - #Install coefficient `fix` directory preserving structure for appropriate endianness coefficients only - install(DIRECTORY ${_src_dir}/ DESTINATION ${CRTM_SHARE_INSTALL_DIR}/fix/${_dir}) - else() - message(WARNING "Missing Coefficients Endianness:${COEFFICIENT_ENDIAN_DIR} At: ${_src_dir}") - endif() -endforeach() -install(DIRECTORY ${UFO_COEFFICIENT_PRE_INSTALL_DIR} DESTINATION ${CRTM_SHARE_INSTALL_DIR}) - -## Package Config -# Export variables with build-tree and install-tree locations of coefficients to fill in `crtm-config.cmake.in` template. - -ecbuild_install_project( NAME ${PROJECT_NAME} ) -#Build Tree exports -set(EXPORT_COEFFICIENT_BUILD_DIR ${PROJECT_SOURCE_DIR}/fix) #build-tree coefficient location -set(EXPORT_UFO_COEFFICIENT_BUILD_DIR ${UFO_COEFFICIENT_BUILD_DIR}) #build-tree coefficient location -#Install Tree exports -set(EXPORT_COEFFICIENT_INSTALL_DIR ${CRTM_SHARE_INSTALL_DIR}/fix) #install-tree coefficient location -set(EXPORT_UFO_COEFFICIENT_INSTALL_DIR ${UFO_COEFFICIENT_INSTALL_DIR}) #install-tree coefficient location -ecbuild_generate_project_config(${PROJECT_NAME}-config.cmake.in - PATH_VARS EXPORT_COEFFICIENT_BUILD_DIR EXPORT_UFO_COEFFICIENT_BUILD_DIR - EXPORT_COEFFICIENT_INSTALL_DIR EXPORT_UFO_COEFFICIENT_INSTALL_DIR) - -ecbuild_print_summary() diff --git a/src/Build/libsrc/make.dependencies b/src/Build/libsrc/make.dependencies index f8f86cd..2159a7d 100644 --- a/src/Build/libsrc/make.dependencies +++ b/src/Build/libsrc/make.dependencies @@ -33,10 +33,10 @@ CRTM_ChannelInfo_Define.o : CRTM_ChannelInfo_Define.f90 Sort_Utility.o SensorInf CRTM_CloudCoeff.o : CRTM_CloudCoeff.f90 CloudCoeff_IO.o CloudCoeff_Define.o Message_Handler.o CRTM_CloudCover_Define.o : CRTM_CloudCover_Define.f90 CRTM_Cloud_Define.o CRTM_Atmosphere_Define.o CRTM_Parameters.o Compare_Float_Numbers.o Message_Handler.o File_Utility.o Type_Kinds.o CRTM_Cloud_Define.o : CRTM_Cloud_Define.f90 Binary_File_Utility.o File_Utility.o Compare_Float_Numbers.o Message_Handler.o Type_Kinds.o -CRTM_CloudScatter.o : CRTM_CloudScatter.f90 CSvar_Define.o CRTM_AtmOptics_Define.o CRTM_Interpolation.o CRTM_GeometryInfo_Define.o CRTM_Atmosphere_Define.o CRTM_CloudCoeff.o CRTM_SpcCoeff.o CRTM_Parameters.o Message_Handler.o Type_Kinds.o +CRTM_CloudScatter.o : CRTM_CloudScatter.f90 CSvar_Define.o CRTM_AtmOptics_Define.o CRTM_Interpolation.o CRTM_GeometryInfo_Define.o CRTM_Atmosphere_Define.o CRTM_CloudCoeff.o CRTM_SpcCoeff.o CRTM_Parameters.o Message_Handler.o Type_Kinds.o ODPS_CoordinateMapping.o CRTM_Fastem1.o : CRTM_Fastem1.f90 CRTM_Parameters.o Type_Kinds.o CRTM_FastemX.o : CRTM_FastemX.f90 Azimuth_Emissivity_F6_Module.o Azimuth_Emissivity_Module.o Reflection_Correction_Module.o Large_Scale_Correction_Module.o Small_Scale_Correction_Module.o Foam_Utility_Module.o Liu.o Fresnel.o CRTM_Parameters.o MWwaterCoeff_Define.o Type_Kinds.o -CRTM_Forward_Module.o : CRTM_Forward_Module.f90 RTV_Define.o ASvar_Define.o CSvar_Define.o AOvar_Define.o CRTM_CloudCover_Define.o CRTM_Planck_Functions.o NLTECoeff_Define.o ACCoeff_Define.o CRTM_NLTECorrection.o CRTM_AerosolCoeff.o CRTM_CloudCoeff.o CRTM_AncillaryInput_Define.o CRTM_MoleculeScatter.o CRTM_AntennaCorrection.o CRTM_RTSolution.o CRTM_SfcOptics.o CRTM_SfcOptics_Define.o CRTM_AtmOptics.o CRTM_CloudScatter.o CRTM_AerosolScatter.o CRTM_AtmOptics_Define.o CRTM_AtmAbsorption.o CRTM_Predictor.o CRTM_Predictor_Define.o CRTM_GeometryInfo.o CRTM_GeometryInfo_Define.o CRTM_Atmosphere.o CRTM_Options_Define.o CRTM_RTSolution_Define.o CRTM_ChannelInfo_Define.o CRTM_Geometry_Define.o CRTM_Surface_Define.o CRTM_Atmosphere_Define.o CRTM_SpcCoeff.o CRTM_Parameters.o Message_Handler.o Type_Kinds.o +CRTM_Forward_Module.o : CRTM_Forward_Module.f90 RTV_Define.o ASvar_Define.o CSvar_Define.o AOvar_Define.o CRTM_CloudCover_Define.o CRTM_Planck_Functions.o NLTECoeff_Define.o ACCoeff_Define.o CRTM_NLTECorrection.o CRTM_AerosolCoeff.o CRTM_CloudCoeff.o CRTM_AncillaryInput_Define.o CRTM_MoleculeScatter.o CRTM_AntennaCorrection.o CRTM_RTSolution.o CRTM_Active_Sensor.o CRTM_SfcOptics.o CRTM_SfcOptics_Define.o CRTM_AtmOptics.o CRTM_CloudScatter.o CRTM_AerosolScatter.o CRTM_AtmOptics_Define.o CRTM_AtmAbsorption.o CRTM_Predictor.o CRTM_Predictor_Define.o CRTM_GeometryInfo.o CRTM_GeometryInfo_Define.o CRTM_Atmosphere.o CRTM_Options_Define.o CRTM_RTSolution_Define.o CRTM_ChannelInfo_Define.o CRTM_Geometry_Define.o CRTM_Surface_Define.o CRTM_Atmosphere_Define.o CRTM_SpcCoeff.o CRTM_Parameters.o Message_Handler.o Type_Kinds.o CRTM_Relative_Humidity.o : CRTM_Relative_Humidity.f90 Message_Handler.o Type_Kinds.o CRTM_Parameters.o CRTM_Geometry_Define.o : CRTM_Geometry_Define.f90 CRTM_Parameters.o Date_Utility.o Binary_File_Utility.o File_Utility.o Compare_Float_Numbers.o Message_Handler.o Type_Kinds.o CRTM_GeometryInfo_Define.o : CRTM_GeometryInfo_Define.f90 CRTM_Geometry_Define.o CRTM_Parameters.o Binary_File_Utility.o File_Utility.o Compare_Float_Numbers.o Message_Handler.o Type_Kinds.o @@ -53,7 +53,7 @@ CRTM_IR_Snow_SfcOptics.o : CRTM_IR_Snow_SfcOptics.f90 CRTM_IRsnowCoeff.o CRTM_SE CRTM_IRSSEM.o : CRTM_IRSSEM.f90 IRwaterCoeff_Define.o CRTM_Interpolation.o CRTM_Parameters.o Message_Handler.o Type_Kinds.o CRTM_IRwaterCoeff.o : CRTM_IRwaterCoeff.f90 IRwaterCoeff_Define.o IRwaterCoeff_IO.o Message_Handler.o CRTM_IR_Water_SfcOptics.o : CRTM_IR_Water_SfcOptics.f90 CRTM_IRwaterCoeff.o CRTM_IRSSEM.o CRTM_SfcOptics_Define.o CRTM_GeometryInfo_Define.o CRTM_Surface_Define.o CRTM_SpcCoeff.o CRTM_Parameters.o Message_Handler.o Type_Kinds.o -CRTM_K_Matrix_Module.o : CRTM_K_Matrix_Module.f90 RTV_Define.o ASvar_Define.o CSvar_Define.o AOvar_Define.o CRTM_CloudCover_Define.o CRTM_Planck_Functions.o NLTECoeff_Define.o ACCoeff_Define.o CRTM_NLTECorrection.o CRTM_AerosolCoeff.o CRTM_CloudCoeff.o CRTM_AncillaryInput_Define.o CRTM_MoleculeScatter.o CRTM_AntennaCorrection.o CRTM_RTSolution.o CRTM_SfcOptics.o CRTM_SfcOptics_Define.o CRTM_AtmOptics.o CRTM_CloudScatter.o CRTM_AerosolScatter.o CRTM_AtmOptics_Define.o CRTM_AtmAbsorption.o CRTM_Predictor.o CRTM_Predictor_Define.o CRTM_GeometryInfo.o CRTM_GeometryInfo_Define.o CRTM_Atmosphere.o CRTM_Options_Define.o CRTM_RTSolution_Define.o CRTM_ChannelInfo_Define.o CRTM_Geometry_Define.o CRTM_Surface_Define.o CRTM_Atmosphere_Define.o CRTM_SpcCoeff.o CRTM_Parameters.o Message_Handler.o Type_Kinds.o +CRTM_K_Matrix_Module.o : CRTM_K_Matrix_Module.f90 RTV_Define.o ASvar_Define.o CSvar_Define.o AOvar_Define.o CRTM_CloudCover_Define.o CRTM_Planck_Functions.o NLTECoeff_Define.o ACCoeff_Define.o CRTM_NLTECorrection.o CRTM_AerosolCoeff.o CRTM_CloudCoeff.o CRTM_AncillaryInput_Define.o CRTM_MoleculeScatter.o CRTM_AntennaCorrection.o CRTM_RTSolution.o CRTM_Active_Sensor.o CRTM_SfcOptics.o CRTM_SfcOptics_Define.o CRTM_AtmOptics.o CRTM_CloudScatter.o CRTM_AerosolScatter.o CRTM_AtmOptics_Define.o CRTM_AtmAbsorption.o CRTM_Predictor.o CRTM_Predictor_Define.o CRTM_GeometryInfo.o CRTM_GeometryInfo_Define.o CRTM_Atmosphere.o CRTM_Options_Define.o CRTM_RTSolution_Define.o CRTM_ChannelInfo_Define.o CRTM_Geometry_Define.o CRTM_Surface_Define.o CRTM_Atmosphere_Define.o CRTM_SpcCoeff.o CRTM_Parameters.o Message_Handler.o Type_Kinds.o CRTM_LifeCycle.o : CRTM_LifeCycle.f90 CRTM_MWwaterCoeff.o CRTM_VISiceCoeff.o CRTM_VISsnowCoeff.o CRTM_VISlandCoeff.o CRTM_VISwaterCoeff.o CRTM_IRiceCoeff.o CRTM_IRsnowCoeff.o CRTM_IRlandCoeff.o CRTM_IRwaterCoeff.o CRTM_CloudCoeff.o CRTM_AerosolCoeff.o CRTM_TauCoeff.o CRTM_SpcCoeff.o CRTM_ChannelInfo_Define.o Message_Handler.o CRTM_LowFrequency_MWSSEM.o : CRTM_LowFrequency_MWSSEM.f90 CRTM_Interpolation.o CRTM_Parameters.o Ellison.o Guillou.o Fresnel.o Type_Kinds.o CRTM_Model_Profiles.o : CRTM_Model_Profiles.f90 CRTM_Atmosphere_Define.o Type_Kinds.o @@ -70,7 +70,8 @@ CRTM_Planck_Functions.o : CRTM_Planck_Functions.f90 CRTM_SpcCoeff.o CRTM_Paramet CRTM_Predictor_Define.o : CRTM_Predictor_Define.f90 ODZeeman_AtmAbsorption.o ODPS_Predictor.o ODPS_Predictor_Define.o ODAS_Predictor.o ODAS_Predictor_Define.o CRTM_TauCoeff.o CRTM_Parameters.o Message_Handler.o Type_Kinds.o CRTM_Predictor.o : CRTM_Predictor.f90 ODZeeman_AtmAbsorption.o ODPS_Predictor.o ODPS_Predictor_Define.o ODAS_Predictor.o ODAS_Predictor_Define.o CRTM_Predictor_Define.o CRTM_AtmOptics_Define.o CRTM_GeometryInfo_Define.o CRTM_AncillaryInput_Define.o CRTM_TauCoeff.o CRTM_Atmosphere_Define.o CRTM_Parameters.o Message_Handler.o Type_Kinds.o CRTM_RTSolution_Define.o : CRTM_RTSolution_Define.f90 CRTM_Parameters.o SensorInfo_Parameters.o Binary_File_Utility.o File_Utility.o Compare_Float_Numbers.o Message_Handler.o Type_Kinds.o -CRTM_RTSolution.o : CRTM_RTSolution.f90 Emission_Module.o ADA_Module.o SOI_Module.o RTV_Define.o CRTM_Utility.o CRTM_RTSolution_Define.o CRTM_SfcOptics_Define.o CRTM_AtmOptics_Define.o CRTM_GeometryInfo_Define.o CRTM_Surface_Define.o CRTM_Atmosphere_Define.o CRTM_SpcCoeff.o Common_RTSolution.o CRTM_Parameters.o Message_Handler.o Type_Kinds.o +CRTM_RTSolution.o : CRTM_RTSolution.f90 Emission_Module.o ADA_Module.o SOI_Module.o RTV_Define.o CRTM_Utility.o CRTM_RTSolution_Define.o CRTM_SfcOptics_Define.o CRTM_AtmOptics_Define.o CRTM_GeometryInfo_Define.o CRTM_Surface_Define.o CRTM_Atmosphere_Define.o CRTM_SpcCoeff.o Common_RTSolution.o CRTM_Parameters.o Message_Handler.o Type_Kinds.o +CRTM_Active_Sensor.o : CRTM_Active_Sensor.f90 Type_Kinds.o CRTM_Parameters.o CRTM_SpcCoeff.o CRTM_AtmOptics_Define.o CRTM_RTSolution_Define.o Spectral_Units_Conversion.o Fundamental_Constants.o CRTM_SEcategory.o : CRTM_SEcategory.f90 SEcategory_Define.o CRTM_Interpolation.o CRTM_Parameters.o Message_Handler.o Type_Kinds.o CRTM_SensorData_Define.o : CRTM_SensorData_Define.f90 CRTM_Parameters.o Binary_File_Utility.o File_Utility.o Compare_Float_Numbers.o Message_Handler.o Type_Kinds.o CRTM_SensorInfo.o : CRTM_SensorInfo.f90 CRTM_Parameters.o Message_Handler.o diff --git a/src/Build/libsrc/make.filelist b/src/Build/libsrc/make.filelist index dd77366..e27a94b 100644 --- a/src/Build/libsrc/make.filelist +++ b/src/Build/libsrc/make.filelist @@ -110,6 +110,8 @@ FSRC_FILES = \ Emission_Module.f90 \ CRTM_RTSolution_Define.f90 \ Common_RTSolution.f90 \ + ODPS_CoordinateMapping.f90 \ + CRTM_Active_Sensor.f90 \ CRTM_RTSolution.f90 \ CRTM_AntennaCorrection.f90 \ CRTM_AncillaryInput_Define.f90 \ @@ -145,7 +147,6 @@ FSRC_FILES = \ ODSSU_Binary_IO.f90 \ ODSSU_TauCoeff.f90 \ Profile_Utility_Parameters.f90 \ - ODPS_CoordinateMapping.f90 \ ODZeeman_TauCoeff.f90 \ ODZeeman_AtmAbsorption.f90 \ ODZeeman_Predictor.f90 \ diff --git a/src/Build/libsrc/test/check_crtm.F90 b/src/Build/libsrc/test/check_crtm.F90 index e63ee92..050054c 100644 --- a/src/Build/libsrc/test/check_crtm.F90 +++ b/src/Build/libsrc/test/check_crtm.F90 @@ -73,8 +73,8 @@ PROGRAM check_crtm CHARACTER(*), PARAMETER :: NC_COEFFICIENT_PATH='coefficients/netcdf/' ! Aerosol/Cloud coefficient format - CHARACTER(*), PARAMETER :: Coeff_Format = 'Binary' - !CHARACTER(*), PARAMETER :: Coeff_Format = 'netCDF' + !CHARACTER(*), PARAMETER :: Coeff_Format = 'Binary' + CHARACTER(*), PARAMETER :: Coeff_Format = 'netCDF' ! Aerosol/Cloud coefficient scheme CHARACTER(*), PARAMETER :: Aerosol_Model = 'CRTM' @@ -308,8 +308,13 @@ PROGRAM check_crtm ! 7b. Inintialize the K-matrix INPUT so ! that the results are dTb/dx ! ------------------------------------- + CALL CRTM_RTSolution_Create( rts_K, N_LAYERS ) ! This is necessary for Reflectivity rts_K%Radiance = ZERO rts_K%Brightness_Temperature = ONE + DO m = 1, N_LAYERS + rts_K%Reflectivity(m) = ZERO + rts_K%Reflectivity_Attenuated(m) = ZERO + END DO ! ========================================================================== ! ========================================================================== diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 559848d..61c637c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -130,6 +130,7 @@ list( APPEND crtm_src_files RTSolution/Common_RTSolution.f90 RTSolution/CRTM_RTSolution_Define.f90 RTSolution/CRTM_RTSolution.f90 + RTSolution/CRTM_Active_Sensor.f90 RTSolution/Emission/Emission_Module.f90 RTSolution/RTV_Define.f90 RTSolution/SOI/SOI_Module.f90 diff --git a/src/CRTM_Adjoint_Module.f90 b/src/CRTM_Adjoint_Module.f90 index 099547e..0ebbee7 100644 --- a/src/CRTM_Adjoint_Module.f90 +++ b/src/CRTM_Adjoint_Module.f90 @@ -132,6 +132,9 @@ MODULE CRTM_Adjoint_Module USE CRTM_Planck_Functions, ONLY: CRTM_Planck_Temperature , & CRTM_Planck_Temperature_AD USE CRTM_CloudCover_Define, ONLY: CRTM_CloudCover_type + USE CRTM_Active_Sensor, ONLY: CRTM_Compute_Reflectivity, & + CRTM_Compute_Reflectivity_AD, & + Calculate_Cloud_Water_Density ! Internal variable definition modules ! ...AtmOptics @@ -615,9 +618,16 @@ FUNCTION profile_solution (m, Opt, AncillaryInput) RESULT( Error_Status ) CALL Display_Message( ROUTINE_NAME, Message, Error_Status ) RETURN END IF + ! Calculate cloud water density + CALL Calculate_Cloud_Water_Density(Atm) + ! ...Similarly extend a copy of the input adjoint atmosphere Atm_AD = CRTM_Atmosphere_AddLayerCopy( Atmosphere_AD(m), Atm%n_Added_Layers ) + ! Calculate the height and water density + !CALL Calculate_Cloud_Water_Density(Atm, Atm_AD) + Atm_AD%Height = Atm%Height + IF( (CloudC%N_PHASE_ELEMENTS /= AeroC%N_PHASE_ELEMENTS) .or. & (RTV%n_Stokes > 1.and.CloudC%N_PHASE_ELEMENTS < 6) ) THEN Error_Status = FAILURE @@ -745,7 +755,6 @@ FUNCTION profile_solution (m, Opt, AncillaryInput) RESULT( Error_Status ) ! Shorter name SensorIndex = ChannelInfo(n)%Sensor_Index - ! Check if antenna correction to be applied for current sensor compute_antenna_correction = ( Opt%Use_Antenna_Correction .AND. & ACCoeff_Associated( SC(SensorIndex)%AC ) .AND. & @@ -942,6 +951,7 @@ FUNCTION profile_solution (m, Opt, AncillaryInput) RESULT( Error_Status ) ! Compute the cloud particle absorption/scattering properties IF( Atm%n_Clouds > 0 ) THEN Error_Status = CRTM_Compute_CloudScatter( Atm , & ! Input + GeometryInfo, & ! Input SensorIndex , & ! Input ChannelIndex, & ! Input AtmOptics , & ! Output @@ -1135,7 +1145,16 @@ FUNCTION profile_solution (m, Opt, AncillaryInput) RESULT( Error_Status ) NLTE_Predictor, & ChannelIndex, SensorIndex, & compute_antenna_correction, GeometryInfo) - + + IF ( SC(SensorIndex)%Is_Active_Sensor .AND. AtmOptics%Include_Scattering) THEN + CALL CRTM_Compute_Reflectivity(Atm , & ! Input + AtmOptics , & ! Input + GeometryInfo , & ! Input + SensorIndex , & ! Input + ChannelIndex , & ! Input + RTSolution(ln,m)) ! Input/Output + ENDIF + IF ( SpcCoeff_IsInfraredSensor( SC(SensorIndex) ) .OR. & SpcCoeff_IsMicrowaveSensor( SC(SensorIndex) ) ) THEN ! Perform clear-sky post and pre-processing @@ -1220,6 +1239,21 @@ FUNCTION profile_solution (m, Opt, AncillaryInput) RESULT( Error_Status ) CALL Display_Message( ROUTINE_NAME, Message, Error_Status ) RETURN END IF + + ! Compute the adjoint for active sensors + ! It is prefered to keep the adjoint for active sensors here, thoguh it + ! may not be in the reverse order for TL code + IF ( SC(SensorIndex)%Is_Active_Sensor .AND. AtmOptics%Include_Scattering) THEN + CALL CRTM_Compute_Reflectivity_AD(Atm , & ! Input + AtmOptics , & ! Input + RTSolution(ln,m), & ! Input + GeometryInfo , & ! Input + SensorIndex , & ! Input + ChannelIndex, & ! Input + AtmOptics_AD , & ! Input/Output + RTSolution_AD(ln,m)) ! Input/Output + ENDIF + END DO Azimuth_Fourier_Loop @@ -1296,6 +1330,7 @@ FUNCTION profile_solution (m, Opt, AncillaryInput) RESULT( Error_Status ) Error_Status = CRTM_Compute_CloudScatter_AD( Atm , & ! FWD Input AtmOptics , & ! FWD Input AtmOptics_AD, & ! AD Input + GeometryInfo, & ! Input SensorIndex , & ! Input ChannelIndex, & ! Input Atm_AD , & ! AD Output diff --git a/src/CRTM_Forward_Module.f90 b/src/CRTM_Forward_Module.f90 index 374e1cd..855b23f 100644 --- a/src/CRTM_Forward_Module.f90 +++ b/src/CRTM_Forward_Module.f90 @@ -16,7 +16,7 @@ MODULE CRTM_Forward_Module ! ------------ USE Type_Kinds, ONLY: fp, LLong USE Message_Handler, ONLY: SUCCESS, FAILURE, WARNING, Display_Message - USE CRTM_Parameters, ONLY: SET,NOT_SET,ZERO,ONE, RT_VMOM, & + USE CRTM_Parameters, ONLY: SET,NOT_SET,ZERO,ONE, EPSILON_FP, RT_VMOM, & MAX_N_LAYERS , & MAX_N_PHASE_ELEMENTS, & MAX_N_LEGENDRE_TERMS, & @@ -96,7 +96,9 @@ MODULE CRTM_Forward_Module USE NLTECoeff_Define, ONLY: NLTECoeff_Associated USE CRTM_Planck_Functions, ONLY: CRTM_Planck_Temperature USE CRTM_CloudCover_Define, ONLY: CRTM_CloudCover_type - + USE CRTM_Active_Sensor, ONLY: CRTM_Compute_Reflectivity, & + Calculate_Cloud_Water_Density + ! Internal variable definition modules ! ...AtmOptics USE AOvar_Define, ONLY: AOvar_type, & @@ -615,6 +617,10 @@ FUNCTION profile_solution (m, Opt, AncillaryInput) RESULT( Error_Status ) CALL Display_Message( ROUTINE_NAME, Message, Error_Status ) RETURN END IF + + ! Calculate cloud water density + CALL Calculate_Cloud_Water_Density(Atm) + !$OMP PARALLEL DO NUM_THREADS(n_channel_threads) PRIVATE(Message) DO nt = 1, n_channel_threads ! Prepare the atmospheric optics structures @@ -934,6 +940,7 @@ FUNCTION profile_solution (m, Opt, AncillaryInput) RESULT( Error_Status ) ! Compute the cloud particle absorption/scattering properties IF( Atm%n_Clouds > 0 ) THEN Error_Status = CRTM_Compute_CloudScatter( Atm , & ! Input + GeometryInfo, & ! Input SensorIndex , & ! Input ChannelIndex, & ! Input AtmOptics(nt) , & ! Output @@ -1106,6 +1113,17 @@ FUNCTION profile_solution (m, Opt, AncillaryInput) RESULT( Error_Status ) RTSolution(ln,m)%Tb_clear = RTSolution(ln,m)%Brightness_Temperature RTSolution(ln,m)%R_clear = RTSolution(ln,m)%Radiance END IF + + ! Calculate reflectivity for active instruments + IF ( (SC(SensorIndex)%Is_Active_Sensor) .AND. (AtmOptics(nt)%Include_Scattering)) THEN + CALL CRTM_Compute_Reflectivity(Atm , & ! Input + AtmOptics(nt) , & ! Input + GeometryInfo , & ! Input + SensorIndex , & ! Input + ChannelIndex , & ! Input + RTSolution(ln,m)) ! Input/Output + ENDIF + END DO Channel_Loop END DO Thread_Loop !$OMP END PARALLEL DO @@ -1176,4 +1194,4 @@ SUBROUTINE Post_Process_RTSolution(Opt, rts, & END IF END SUBROUTINE Post_Process_RTSolution END FUNCTION CRTM_Forward -END MODULE CRTM_Forward_Module +END MODULE CRTM_Forward_Module \ No newline at end of file diff --git a/src/CRTM_K_Matrix_Module.f90 b/src/CRTM_K_Matrix_Module.f90 index 32b0bcf..73d73ea 100644 --- a/src/CRTM_K_Matrix_Module.f90 +++ b/src/CRTM_K_Matrix_Module.f90 @@ -130,6 +130,9 @@ MODULE CRTM_K_Matrix_Module USE CRTM_Planck_Functions, ONLY: CRTM_Planck_Temperature , & CRTM_Planck_Temperature_AD USE CRTM_CloudCover_Define, ONLY: CRTM_CloudCover_type + USE CRTM_Active_Sensor, ONLY: CRTM_Compute_Reflectivity, & + CRTM_Compute_Reflectivity_AD, & + Calculate_Cloud_Water_Density ! Internal variable definition modules ! ...AtmOptics @@ -712,6 +715,8 @@ FUNCTION profile_solution (m, Opt, AncillaryInput) RESULT( Error_Status ) CALL Display_Message( ROUTINE_NAME, Message, Error_Status ) RETURN END IF + ! Calculate cloud water density + CALL Calculate_Cloud_Water_Density(Atm) ! Prepare the atmospheric optics structures ! ...Allocate the atmospheric optics structures based on Atm extension @@ -1033,7 +1038,8 @@ FUNCTION profile_solution (m, Opt, AncillaryInput) RESULT( Error_Status ) END IF CALL CRTM_Atmosphere_Zero( Atm_Clear_K(nt) ) END IF - + !CALL Calculate_Cloud_Water_Density(Atm, Atm_K(nt)) + Atm_K(nt)%Height = Atm%Height ! Determine the number of streams (n_Full_Streams) in up+downward directions IF ( Opt%Use_N_Streams ) THEN @@ -1125,6 +1131,7 @@ FUNCTION profile_solution (m, Opt, AncillaryInput) RESULT( Error_Status ) ! Compute the cloud particle absorption/scattering properties IF( Atm%n_Clouds > 0 ) THEN Error_Status = CRTM_Compute_CloudScatter( Atm , & ! Input + GeometryInfo, & ! Input SensorIndex , & ! Input ChannelIndex, & ! Input AtmOptics(nt) , & ! Output @@ -1304,6 +1311,19 @@ FUNCTION profile_solution (m, Opt, AncillaryInput) RESULT( Error_Status ) ChannelIndex, SensorIndex, & compute_antenna_correction, GeometryInfo) + !======= Active sensor ======= + ! Calculate reflectivity for active instruments + IF ( SC(SensorIndex)%Is_Active_Sensor .AND. AtmOptics(nt)%Include_Scattering) THEN + CALL CRTM_Compute_Reflectivity(Atm , & ! Input + AtmOptics(nt) , & ! Input + GeometryInfo , & ! Input + SensorIndex , & ! Input + ChannelIndex , & ! Input + RTSolution(ln,m)) ! Input/Output + ENDIF + !============================= + + IF ( SpcCoeff_IsInfraredSensor( SC(SensorIndex) ) .OR. & SpcCoeff_IsMicrowaveSensor( SC(SensorIndex) ) ) THEN ! Perform clear-sky post and pre-processing @@ -1392,6 +1412,19 @@ FUNCTION profile_solution (m, Opt, AncillaryInput) RESULT( Error_Status ) CALL Display_Message( ROUTINE_NAME, Message, Error_Status ) CYCLE Thread_Loop END IF + ! Calculate the adjoint for the active sensor reflectivity + IF ( SC(SensorIndex)%Is_Active_Sensor .AND. AtmOptics(nt)%Include_Scattering) THEN + CALL CRTM_Compute_Reflectivity_AD(Atm , & ! Input + AtmOptics(nt) , & ! Input + RTSolution(ln,m), & ! Input + GeometryInfo , & ! Input + SensorIndex , & ! Input + ChannelIndex , & ! Input + AtmOptics_K(nt) , & ! Input/Output + RTSolution_K(ln,m)) ! Input/Output + ENDIF + + END DO Azimuth_Fourier_Loop ! The following part corresponding TL part is moved from above CRTM_Compute_RTSolution @@ -1467,6 +1500,7 @@ FUNCTION profile_solution (m, Opt, AncillaryInput) RESULT( Error_Status ) Error_Status = CRTM_Compute_CloudScatter_AD( Atm , & ! FWD Input AtmOptics(nt) , & ! FWD Input AtmOptics_K(nt) , & ! K Input + GeometryInfo , & ! Input SensorIndex , & ! Input ChannelIndex, & ! Input Atm_K(nt) , & ! K Output diff --git a/src/CRTM_LifeCycle.f90 b/src/CRTM_LifeCycle.f90 index aa3118b..1370feb 100644 --- a/src/CRTM_LifeCycle.f90 +++ b/src/CRTM_LifeCycle.f90 @@ -1277,4 +1277,4 @@ FUNCTION CRTM_IsInitialized( ChannelInfo ) RESULT( Status ) LOGICAL :: Status Status = ALL(CRTM_ChannelInfo_Associated(ChannelInfo)) END FUNCTION CRTM_IsInitialized -END MODULE CRTM_LifeCycle +END MODULE CRTM_LifeCycle \ No newline at end of file diff --git a/src/CRTM_Module.F90 b/src/CRTM_Module.F90 index 92cad1e..0a29c96 100644 --- a/src/CRTM_Module.F90 +++ b/src/CRTM_Module.F90 @@ -33,6 +33,8 @@ MODULE CRTM_Module USE CRTM_Tangent_Linear_Module USE CRTM_Adjoint_Module USE CRTM_K_Matrix_Module + USE CRTM_Active_Sensor , ONLY: Calculate_Height + ! ...The aerosol optical depth tool USE CRTM_AOD_Module diff --git a/src/CRTM_Parameters.f90 b/src/CRTM_Parameters.f90 index 2e25f31..c94dcd6 100644 --- a/src/CRTM_Parameters.f90 +++ b/src/CRTM_Parameters.f90 @@ -73,12 +73,13 @@ MODULE CRTM_Parameters REAL(fp), PUBLIC, PARAMETER :: THREE = 3.0_fp REAL(fp), PUBLIC, PARAMETER :: FOUR = 4.0_fp REAL(fp), PUBLIC, PARAMETER :: FIVE = 5.0_fp - REAL(fp), PUBLIC, PARAMETER :: TEN = 10.0_fp + REAL(fp), PUBLIC, PARAMETER :: TEN = 10.0_fp REAL(fp), PUBLIC, PARAMETER :: POINT_25 = 0.25_fp REAL(fp), PUBLIC, PARAMETER :: POINT_5 = 0.5_fp REAL(fp), PUBLIC, PARAMETER :: POINT_75 = 0.75_fp REAL(fp), PUBLIC, PARAMETER :: ONEpointFIVE = 1.5_fp - + REAL(fp), PUBLIC, PARAMETER :: ONE_THOUSAND = 1000.0_fp + REAL(fp), PUBLIC, PARAMETER :: EPSILON_FP = EPSILON(REAL(fp)) ! -------------------- ! PI-related constants @@ -115,6 +116,8 @@ MODULE CRTM_Parameters ! Default string length for SensorIDs INTEGER, PUBLIC, PARAMETER :: STRLEN = 20 + ! No backscattering for active sensors + REAL(fp), PUBLIC, PARAMETER :: MISSING_REFL = -9999.0_fp !#----------------------------------------------------------------------------# !# -- AtmAbsorption PARAMETERS -- # diff --git a/src/CRTM_Tangent_Linear_Module.f90 b/src/CRTM_Tangent_Linear_Module.f90 index ab08ccf..95e6bdb 100644 --- a/src/CRTM_Tangent_Linear_Module.f90 +++ b/src/CRTM_Tangent_Linear_Module.f90 @@ -114,6 +114,9 @@ MODULE CRTM_Tangent_Linear_Module USE CRTM_Planck_Functions, ONLY: CRTM_Planck_Temperature , & CRTM_Planck_Temperature_TL USE CRTM_CloudCover_Define, ONLY: CRTM_CloudCover_type + USE CRTM_Active_Sensor, ONLY: CRTM_Compute_Reflectivity, & + CRTM_Compute_Reflectivity_TL, & + Calculate_Cloud_Water_Density ! Internal variable definition modules ! ...AtmOptics @@ -644,6 +647,9 @@ FUNCTION profile_solution (m, Opt, AncillaryInput) RESULT( Error_Status ) RETURN END IF + ! Calculate cloud water density + CALL Calculate_Cloud_Water_Density(Atm) + Error_Status = CRTM_Atmosphere_AddLayers_TL( Atmosphere(m), Atmosphere_TL(m), Atm_TL ) IF ( Error_Status /= SUCCESS ) THEN Error_Status = FAILURE @@ -651,7 +657,9 @@ FUNCTION profile_solution (m, Opt, AncillaryInput) RESULT( Error_Status ) CALL Display_Message( ROUTINE_NAME, Message, Error_Status ) RETURN END IF - + + Atm_TL%Height = Atm%Height + ! ...Check the total number of Atm layers IF ( Atm%n_Layers > MAX_N_LAYERS .OR. Atm_TL%n_Layers > MAX_N_LAYERS) THEN Error_Status = FAILURE @@ -1064,6 +1072,7 @@ FUNCTION profile_solution (m, Opt, AncillaryInput) RESULT( Error_Status ) ! Compute the cloud particle absorption/scattering properties IF( Atm%n_Clouds > 0 ) THEN Status_FWD = CRTM_Compute_CloudScatter( Atm , & ! Input + GeometryInfo , & ! Input SensorIndex , & ! Input ChannelIndex, & ! Input AtmOptics(nt) , & ! Output @@ -1071,6 +1080,7 @@ FUNCTION profile_solution (m, Opt, AncillaryInput) RESULT( Error_Status ) Status_TL = CRTM_Compute_CloudScatter_TL( Atm , & ! FWD Input AtmOptics(nt) , & ! FWD Input Atm_TL , & ! TL Input + GeometryInfo, & ! Input SensorIndex , & ! Input ChannelIndex, & ! Input AtmOptics_TL(nt), & ! TL Output @@ -1317,6 +1327,25 @@ FUNCTION profile_solution (m, Opt, AncillaryInput) RESULT( Error_Status ) RTSolution_TL(ln,m)%Tb_Clear = RTSolution_Clear_TL(nt)%Brightness_Temperature END IF + ! Calculate reflectivity for active instruments + IF ( SC(SensorIndex)%Is_Active_Sensor .AND. AtmOptics(nt)%Include_Scattering) THEN + CALL CRTM_Compute_Reflectivity(Atm , & ! Input + AtmOptics(nt) , & ! Input + GeometryInfo , & ! Input + SensorIndex , & ! Input + ChannelIndex , & ! Input + RTSolution(ln,m)) ! Input/Output + + CALL CRTM_Compute_Reflectivity_TL(Atm , & ! Input + AtmOptics(nt) , & ! Input + AtmOptics_TL(nt) , & ! Input + GeometryInfo , & ! Input + SensorIndex , & ! Input + ChannelIndex , & ! Input + RTSolution_TL(ln,m)) ! Input/Output + ENDIF + + END DO Channel_Loop END DO Thread_Loop !$OMP END PARALLEL DO diff --git a/src/Coefficients/CRTM_CloudCoeff.f90 b/src/Coefficients/CRTM_CloudCoeff.f90 index 326dfe3..d3014d0 100644 --- a/src/Coefficients/CRTM_CloudCoeff.f90 +++ b/src/Coefficients/CRTM_CloudCoeff.f90 @@ -30,7 +30,10 @@ MODULE CRTM_CloudCoeff USE Message_Handler, ONLY: SUCCESS, FAILURE, Display_Message USE CloudCoeff_Define, ONLY: CloudCoeff_type, & CloudCoeff_Associated, & - CloudCoeff_Destroy + CloudCoeff_Destroy, & + INVALID_CLOUDCOEFF, & + MIE_TAMU_CLOUDCOEFF, & + DDA_ARTS_CLOUDCOEFF USE CloudCoeff_IO , ONLY: CloudCoeff_ReadFile ! Disable all implicit typing IMPLICIT NONE @@ -41,6 +44,11 @@ MODULE CRTM_CloudCoeff ! ------------ ! Everything private by default PRIVATE + ! The shared variables + PUBLIC :: INVALID_CLOUDCOEFF + PUBLIC :: MIE_TAMU_CLOUDCOEFF + PUBLIC :: DDA_ARTS_CLOUDCOEFF + ! The shared data PUBLIC :: CloudC ! Procedures diff --git a/src/Coefficients/CloudCoeff/CloudCoeff_Binary_IO.f90 b/src/Coefficients/CloudCoeff/CloudCoeff_Binary_IO.f90 index 86b4b42..c9d83f2 100644 --- a/src/Coefficients/CloudCoeff/CloudCoeff_Binary_IO.f90 +++ b/src/Coefficients/CloudCoeff/CloudCoeff_Binary_IO.f90 @@ -36,14 +36,11 @@ MODULE CloudCoeff_Binary_IO PUBLIC :: CloudCoeff_Binary_InquireFile PUBLIC :: CloudCoeff_Binary_ReadFile PUBLIC :: CloudCoeff_Binary_WriteFile - PUBLIC :: CloudCoeff_Binary_IOVersion - + ! ----------------- ! Module parameters ! ----------------- - CHARACTER(*), PARAMETER :: MODULE_VERSION_ID = & - '$Id: CloudCoeff_Binary_IO.f90 99117 2017-11-27 18:37:14Z tong.zhu@noaa.gov $' CHARACTER(*), PARAMETER :: WRITE_ERROR_STATUS = 'DELETE' ! Default message length INTEGER, PARAMETER :: ML = 256 @@ -226,9 +223,10 @@ FUNCTION CloudCoeff_Binary_InquireFile( & CloudCoeff%n_IR_Frequencies, & CloudCoeff%n_IR_Radii , & CloudCoeff%n_Temperatures , & - CloudCoeff%n_Densities , & + CloudCoeff%n_MW_Densities , & CloudCoeff%n_Legendre_Terms, & CloudCoeff%n_Phase_Elements + CloudCoeff%n_IR_Densities = CloudCoeff%n_MW_Densities IF ( io_stat /= 0 ) THEN WRITE( msg,'("Error reading dimensions from ",a,". IOSTAT = ",i0)' ) & TRIM(Filename), io_stat @@ -248,7 +246,7 @@ FUNCTION CloudCoeff_Binary_InquireFile( & IF ( PRESENT(n_IR_Frequencies) ) n_IR_Frequencies = CloudCoeff%n_IR_Frequencies IF ( PRESENT(n_IR_Radii ) ) n_IR_Radii = CloudCoeff%n_IR_Radii IF ( PRESENT(n_Temperatures ) ) n_Temperatures = CloudCoeff%n_Temperatures - IF ( PRESENT(n_Densities ) ) n_Densities = CloudCoeff%n_Densities + IF ( PRESENT(n_Densities ) ) n_Densities = CloudCoeff%n_MW_Densities IF ( PRESENT(n_Legendre_Terms) ) n_Legendre_Terms = CloudCoeff%n_Legendre_Terms IF ( PRESENT(n_Phase_Elements) ) n_Phase_Elements = CloudCoeff%n_Phase_Elements IF ( PRESENT(Release ) ) Release = CloudCoeff%Release @@ -384,24 +382,28 @@ FUNCTION CloudCoeff_Binary_ReadFile( & dummy%n_IR_Frequencies, & dummy%n_IR_Radii , & dummy%n_Temperatures , & - dummy%n_Densities , & + dummy%n_MW_Densities , & dummy%n_Legendre_Terms, & dummy%n_Phase_Elements + ! IR used to start from (0:3) but that changed + dummy%n_IR_Densities = dummy%n_MW_Densities + 1 IF ( io_stat /= 0 ) THEN WRITE( msg,'("Error reading data dimensions. IOSTAT = ",i0)' ) io_stat CALL Read_Cleanup(); RETURN END IF + + ! ...Allocate the object CALL CloudCoeff_Create( CloudCoeff, & dummy%n_MW_Frequencies, & dummy%n_MW_Radii , & + dummy%n_MW_Densities , & dummy%n_IR_Frequencies, & dummy%n_IR_Radii , & + dummy%n_IR_Densities , & dummy%n_Temperatures , & - dummy%n_Densities , & dummy%n_Legendre_Terms, & dummy%n_Phase_Elements ) - IF ( .NOT. CloudCoeff_Associated( CloudCoeff ) ) THEN msg = 'CloudCoeff object allocation failed.' CALL Read_Cleanup(); RETURN @@ -412,69 +414,43 @@ FUNCTION CloudCoeff_Binary_ReadFile( & CloudCoeff%Reff_MW , & CloudCoeff%Reff_IR , & CloudCoeff%Temperature , & - CloudCoeff%Density - + CloudCoeff%Density_MW + ! This is not used anywhere so just to set the values + CloudCoeff%Density_IR = 10 IF ( io_stat /= 0 ) THEN WRITE( msg,'("Error reading dimension vector data. IOSTAT = ",i0)' ) io_stat CALL Read_Cleanup(); RETURN END IF ! ...Read the microwave liquid phase data - - IF( CloudCoeff%Version <= 4 .and. dummy%Version <= 4 ) THEN - READ( fid,IOSTAT=io_stat ) CloudCoeff%ke_L_MW , & - CloudCoeff%w_L_MW , & - CloudCoeff%g_L_MW , & - CloudCoeff%pcoeff_L_MW - ELSE READ( fid,IOSTAT=io_stat ) CloudCoeff%ke_L_MW , & CloudCoeff%w_L_MW , & CloudCoeff%g_L_MW , & - CloudCoeff%kb_L_MW , & CloudCoeff%pcoeff_L_MW - END IF - IF ( io_stat /= 0 ) THEN WRITE( msg,'("Error reading microwave liquid phase data. IOSTAT = ",i0)' ) io_stat CALL Read_Cleanup(); RETURN END IF ! ...Read the microwave solid phase data - IF( CloudCoeff%Version <= 4 .and. dummy%Version <= 4 ) THEN - READ( fid,IOSTAT=io_stat ) CloudCoeff%ke_S_MW , & + READ( fid,IOSTAT=io_stat ) CloudCoeff%ke_S_MW , & CloudCoeff%w_S_MW , & CloudCoeff%g_S_MW , & CloudCoeff%pcoeff_S_MW - ELSE - READ( fid,IOSTAT=io_stat ) CloudCoeff%ke_S_MW , & - CloudCoeff%w_S_MW , & - CloudCoeff%g_S_MW , & - CloudCoeff%kb_S_MW , & - CloudCoeff%pcoeff_S_MW - END IF - IF ( io_stat /= 0 ) THEN WRITE( msg,'("Error reading microwave solid phase data. IOSTAT = ",i0)' ) io_stat CALL Read_Cleanup(); RETURN END IF ! ...Read the infrared data - IF( CloudCoeff%Version <= 4 .and. dummy%Version <= 4 ) THEN - READ( fid,IOSTAT=io_stat ) CloudCoeff%ke_IR , & + READ( fid,IOSTAT=io_stat ) CloudCoeff%ke_IR , & CloudCoeff%w_IR , & CloudCoeff%g_IR , & CloudCoeff%pcoeff_IR - ELSE - READ( fid,IOSTAT=io_stat ) CloudCoeff%ke_IR , & - CloudCoeff%w_IR , & - CloudCoeff%g_IR , & - CloudCoeff%kb_IR , & - CloudCoeff%pcoeff_IR - END IF - IF ( io_stat /= 0 ) THEN WRITE( msg,'("Error reading infrared data. IOSTAT = ",i0)' ) io_stat CALL Read_Cleanup(); RETURN END IF ! ...Assign the version number read in CloudCoeff%Version = dummy%Version + ! Close the file CLOSE( fid,IOSTAT=io_stat ) @@ -483,6 +459,7 @@ FUNCTION CloudCoeff_Binary_ReadFile( & CALL Read_Cleanup(); RETURN END IF + ! Output an info message IF ( noisy ) THEN CALL CloudCoeff_Info( CloudCoeff, msg ) @@ -631,7 +608,7 @@ FUNCTION CloudCoeff_Binary_WriteFile( & CloudCoeff%n_IR_Frequencies, & CloudCoeff%n_IR_Radii , & CloudCoeff%n_Temperatures , & - CloudCoeff%n_Densities , & + CloudCoeff%n_MW_Densities , & CloudCoeff%n_Legendre_Terms, & CloudCoeff%n_Phase_Elements IF ( io_stat /= 0 ) THEN @@ -644,7 +621,7 @@ FUNCTION CloudCoeff_Binary_WriteFile( & CloudCoeff%Reff_MW , & CloudCoeff%Reff_IR , & CloudCoeff%Temperature , & - CloudCoeff%Density + CloudCoeff%Density_MW IF ( io_stat /= 0 ) THEN WRITE( msg,'("Error writing dimension vector data. IOSTAT = ",i0)' ) io_stat CALL Write_Cleanup(); RETURN @@ -653,7 +630,6 @@ FUNCTION CloudCoeff_Binary_WriteFile( & WRITE( fid,IOSTAT=io_stat ) CloudCoeff%ke_L_MW , & CloudCoeff%w_L_MW , & CloudCoeff%g_L_MW , & - CloudCoeff%kb_L_MW , & CloudCoeff%pcoeff_L_MW IF ( io_stat /= 0 ) THEN WRITE( msg,'("Error writing microwave liquid phase data. IOSTAT = ",i0)' ) io_stat @@ -663,7 +639,6 @@ FUNCTION CloudCoeff_Binary_WriteFile( & WRITE( fid,IOSTAT=io_stat ) CloudCoeff%ke_S_MW , & CloudCoeff%w_S_MW , & CloudCoeff%g_S_MW , & - CloudCoeff%kb_S_MW , & CloudCoeff%pcoeff_S_MW IF ( io_stat /= 0 ) THEN WRITE( msg,'("Error writing microwave solid phase data. IOSTAT = ",i0)' ) io_stat @@ -673,7 +648,6 @@ FUNCTION CloudCoeff_Binary_WriteFile( & WRITE( fid,IOSTAT=io_stat ) CloudCoeff%ke_IR , & CloudCoeff%w_IR , & CloudCoeff%g_IR , & - CloudCoeff%kb_IR , & CloudCoeff%pcoeff_IR IF ( io_stat /= 0 ) THEN WRITE( msg,'("Error writing infrared data. IOSTAT = ",i0)' ) io_stat @@ -708,33 +682,4 @@ SUBROUTINE Write_CleanUp() END SUBROUTINE Write_CleanUp END FUNCTION CloudCoeff_Binary_WriteFile - - -!-------------------------------------------------------------------------------- -!:sdoc+: -! -! NAME: -! CloudCoeff_Binary_IOVersion -! -! PURPOSE: -! Subroutine to return the module version information. -! -! CALLING SEQUENCE: -! CALL CloudCoeff_Binary_IOVersion( Id ) -! -! OUTPUT ARGUMENTS: -! Id: Character string containing the version Id information -! for the module. -! UNITS: N/A -! TYPE: CHARACTER(*) -! DIMENSION: Scalar -! ATTRIBUTES: INTENT(OUT) -! -!:sdoc-: -!-------------------------------------------------------------------------------- - - SUBROUTINE CloudCoeff_Binary_IOVersion( Id ) - CHARACTER(*), INTENT(OUT) :: Id - Id = MODULE_VERSION_ID - END SUBROUTINE CloudCoeff_Binary_IOVersion END MODULE CloudCoeff_Binary_IO diff --git a/src/Coefficients/CloudCoeff/CloudCoeff_Define.f90 b/src/Coefficients/CloudCoeff/CloudCoeff_Define.f90 index 2288a75..ecb285e 100644 --- a/src/Coefficients/CloudCoeff/CloudCoeff_Define.f90 +++ b/src/Coefficients/CloudCoeff/CloudCoeff_Define.f90 @@ -10,6 +10,9 @@ ! Quanhua Liu, QSS Group, Inc; Quanhua.Liu@noaa.gov ! Paul van Delst, CIMSS/SSEC; paul.vandelst@ssec.wisc.edu ! +! Modified by: Isaac Moradi ESSIC/GMAO 24-Aug-2021 +! Isaac.Moradi@nasa.gov +! MODULE CloudCoeff_Define @@ -42,6 +45,10 @@ MODULE CloudCoeff_Define PUBLIC :: CloudCoeff_Info PUBLIC :: CloudCoeff_DefineVersion + ! Available Cloud versions + PUBLIC INVALID_CLOUDCOEFF + PUBLIC MIE_TAMU_CLOUDCOEFF + PUBLIC DDA_ARTS_CLOUDCOEFF ! --------------------- ! Procedure overloading @@ -62,8 +69,12 @@ MODULE CloudCoeff_Define ! Keyword set value INTEGER, PARAMETER :: SET = 1 ! Current valid release and version numbers - INTEGER, PARAMETER :: CLOUDCOEFF_RELEASE = 3 ! This determines structure and file formats. - INTEGER, PARAMETER :: CLOUDCOEFF_VERSION = 1 ! This is just the data version for the release. + INTEGER, PARAMETER :: CLOUDCOEFF_RELEASE = 3 ! This determines structure and file formats. + INTEGER, PARAMETER :: INVALID_CLOUDCOEFF = 0 + INTEGER, PARAMETER :: MIE_TAMU_CLOUDCOEFF = 1 + INTEGER, PARAMETER :: DDA_ARTS_CLOUDCOEFF = 2 + + ! Meggage string length INTEGER, PARAMETER :: ML = 256 @@ -91,7 +102,7 @@ MODULE CloudCoeff_Define TYPE :: CloudCoeff_type ! Release and version information INTEGER(Long) :: Release = CLOUDCOEFF_RELEASE - INTEGER(Long) :: Version = CLOUDCOEFF_VERSION + INTEGER(Long) :: Version = INVALID_CLOUDCOEFF ! Allocation indicator LOGICAL :: Is_Allocated = .FALSE. ! Dataset parameter definitions (eventually stored in the datafile) @@ -104,18 +115,21 @@ MODULE CloudCoeff_Define INTEGER(Long) :: n_IR_Frequencies = 0 ! I3 dimension INTEGER(Long) :: n_IR_Radii = 0 ! I4 dimension INTEGER(Long) :: n_Temperatures = 0 ! I5 dimension - INTEGER(Long) :: n_Densities = 0 ! I6 dimension + INTEGER(Long) :: n_MW_Densities = 0 ! I6 dimension + INTEGER(Long) :: n_IR_Densities = 0 ! I6 dimension INTEGER(Long) :: Max_Legendre_Terms = 0 ! I7 dimension INTEGER(Long) :: n_Legendre_Terms = 0 INTEGER(Long) :: Max_Phase_Elements = 0 ! I8 dimension INTEGER(Long) :: n_Phase_Elements = 0 ! LUT dimension vectors - REAL(Double), ALLOCATABLE :: Frequency_MW(:) ! I1 - REAL(Double), ALLOCATABLE :: Frequency_IR(:) ! I3 - REAL(Double), ALLOCATABLE :: Reff_MW(:) ! I2 - REAL(Double), ALLOCATABLE :: Reff_IR(:) ! I4 - REAL(Double), ALLOCATABLE :: Temperature(:) ! I5 - REAL(Double), ALLOCATABLE :: Density(:) ! I6 + REAL(Double), ALLOCATABLE :: Frequency_MW(:) ! I1 + REAL(Double), ALLOCATABLE :: Frequency_IR(:) ! I3 + REAL(Double), ALLOCATABLE :: Water_Density_MW(:) ! I2 + REAL(Double), ALLOCATABLE :: Reff_MW(:) ! I2 + REAL(Double), ALLOCATABLE :: Reff_IR(:) ! I4 + REAL(Double), ALLOCATABLE :: Temperature(:) ! I5 + REAL(Double), ALLOCATABLE :: Density_MW(:) ! I6 + REAL(Double), ALLOCATABLE :: Density_IR(:) ! I6 ! Microwave data for liquid phase clouds REAL(Double), ALLOCATABLE :: ke_L_MW(:,:,:) ! I1 x I2 x I5 REAL(Double), ALLOCATABLE :: w_L_MW(:,:,:) ! I1 x I2 x I5 @@ -224,7 +238,8 @@ ELEMENTAL SUBROUTINE CloudCoeff_Destroy( CloudCoeff ) CloudCoeff%n_IR_Frequencies = 0 CloudCoeff%n_IR_Radii = 0 CloudCoeff%n_Temperatures = 0 - CloudCoeff%n_Densities = 0 + CloudCoeff%n_MW_Densities = 0 + CloudCoeff%n_IR_Densities = 0 CloudCoeff%Max_Legendre_Terms = 0 CloudCoeff%n_Legendre_Terms = 0 CloudCoeff%Max_Phase_Elements = 0 @@ -244,10 +259,11 @@ END SUBROUTINE CloudCoeff_Destroy ! CALL CloudCoeff_Create( CloudCoeff , & ! n_MW_Frequencies, & ! n_MW_Radii , & +! n_MW_Densities , & ! n_IR_Frequencies, & ! n_IR_Radii , & +! n_IR_Densities , & ! n_Temperatures , & -! n_Densities , & ! n_Legendre_Terms, & ! n_Phase_Elements ) ! @@ -275,6 +291,14 @@ END SUBROUTINE CloudCoeff_Destroy ! DIMENSION: Scalar ! ATTRIBUTES: INTENT(IN) ! +! n_MW_Densities: The number of fixed MW densities for snow, graupel, +! and hail/ice in the LUT. +! The "I6" dimension. Must be > 0. +! UNITS: N/A +! TYPE: INTEGER +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN) +! ! n_IR_Frequencies: The number of infrared frequencies in ! the LUT ! The "I3" dimension. Must be > 0. @@ -291,17 +315,17 @@ END SUBROUTINE CloudCoeff_Destroy ! DIMENSION: Scalar ! ATTRIBUTES: INTENT(IN) ! -! n_Temperatures: The number of discrete layer temperatures -! in the LUT. -! The "I5" dimension. Must be > 0. +! n_IR_Densities: The number of fixed IR densities for snow, graupel, +! and hail/ice in the LUT. +! The "I6" dimension. Must be > 0. ! UNITS: N/A ! TYPE: INTEGER ! DIMENSION: Scalar ! ATTRIBUTES: INTENT(IN) ! -! n_Densities: The number of fixed densities for snow, graupel, -! and hail/ice in the LUT. -! The "I6" dimension. Must be > 0. +! n_Temperatures: The number of discrete layer temperatures +! in the LUT. +! The "I5" dimension. Must be > 0. ! UNITS: N/A ! TYPE: INTEGER ! DIMENSION: Scalar @@ -329,20 +353,22 @@ ELEMENTAL SUBROUTINE CloudCoeff_Create( & CloudCoeff , & n_MW_Frequencies, & n_MW_Radii , & + n_MW_Densities , & n_IR_Frequencies, & n_IR_Radii , & + n_IR_Densities , & n_Temperatures , & - n_Densities , & n_Legendre_Terms, & n_Phase_Elements ) ! Arguments TYPE(CloudCoeff_type) , INTENT(OUT) :: CloudCoeff INTEGER, INTENT(IN) :: n_MW_Frequencies INTEGER, INTENT(IN) :: n_MW_Radii + INTEGER, INTENT(IN) :: n_MW_Densities INTEGER, INTENT(IN) :: n_IR_Frequencies INTEGER, INTENT(IN) :: n_IR_Radii + INTEGER, INTENT(IN) :: n_IR_Densities INTEGER, INTENT(IN) :: n_Temperatures - INTEGER, INTENT(IN) :: n_Densities INTEGER, INTENT(IN) :: n_Legendre_Terms INTEGER, INTENT(IN) :: n_Phase_Elements ! Local parameters @@ -353,10 +379,11 @@ ELEMENTAL SUBROUTINE CloudCoeff_Create( & ! Check input IF ( n_MW_Frequencies < 1 .OR. & n_MW_Radii < 1 .OR. & + n_MW_Densities < 1 .OR. & n_IR_Frequencies < 1 .OR. & n_IR_Radii < 1 .OR. & + n_IR_Densities < 1 .OR. & n_Temperatures < 1 .OR. & - n_Densities < 1 .OR. & n_Legendre_Terms < 0 .OR. & n_Phase_Elements < 1 ) RETURN @@ -366,10 +393,12 @@ ELEMENTAL SUBROUTINE CloudCoeff_Create( & ! ...Allocate the dimension vectors ALLOCATE( CloudCoeff%Frequency_MW(n_MW_Frequencies), & CloudCoeff%Frequency_IR(n_IR_Frequencies), & + CloudCoeff%Water_Density_MW(n_MW_Radii), & CloudCoeff%Reff_MW(n_MW_Radii), & CloudCoeff%Reff_IR(n_IR_Radii), & CloudCoeff%Temperature(n_Temperatures), & - CloudCoeff%Density(n_Densities), & + CloudCoeff%Density_MW(n_MW_Densities), & + CloudCoeff%Density_IR(n_IR_Densities), & STAT = alloc_stat(1) ) ! ...Allocate the microwave liquid phase arrays ALLOCATE( CloudCoeff%ke_L_MW(n_MW_Frequencies, n_MW_Radii, n_Temperatures), & @@ -383,25 +412,25 @@ ELEMENTAL SUBROUTINE CloudCoeff_Create( & n_Phase_Elements ), & STAT = alloc_stat(2) ) ! ...Allocate the microwave solid phase arrays - ALLOCATE( CloudCoeff%ke_S_MW(n_MW_Frequencies, n_MW_Radii, n_Densities), & - CloudCoeff%w_S_MW(n_MW_Frequencies , n_MW_Radii, n_Densities), & - CloudCoeff%g_S_MW(n_MW_Frequencies , n_MW_Radii, n_Densities), & - CloudCoeff%kb_S_MW(n_MW_Frequencies , n_MW_Radii, n_Densities), & + ALLOCATE( CloudCoeff%ke_S_MW(n_MW_Frequencies, n_MW_Radii, n_MW_Densities), & + CloudCoeff%w_S_MW(n_MW_Frequencies , n_MW_Radii, n_MW_Densities), & + CloudCoeff%g_S_MW(n_MW_Frequencies , n_MW_Radii, n_MW_Densities), & + CloudCoeff%kb_S_MW(n_MW_Frequencies , n_MW_Radii, n_MW_Densities), & CloudCoeff%pcoeff_S_MW(n_MW_Frequencies , & n_MW_Radii , & - n_Densities , & + n_MW_Densities , & 0:n_Legendre_Terms, & n_Phase_Elements ), & STAT = alloc_stat(3) ) ! ...Allocate the infrared arrays - ALLOCATE( CloudCoeff%ke_IR(n_IR_Frequencies, n_IR_Radii, 0:n_Densities), & - CloudCoeff%w_IR(n_IR_Frequencies , n_IR_Radii, 0:n_Densities), & - CloudCoeff%g_IR(n_IR_Frequencies , n_IR_Radii, 0:n_Densities), & - CloudCoeff%kb_IR(n_IR_Frequencies , n_IR_Radii, 0:n_Densities), & + ALLOCATE( CloudCoeff%ke_IR(n_IR_Frequencies, n_IR_Radii, n_IR_Densities), & + CloudCoeff%w_IR(n_IR_Frequencies , n_IR_Radii, n_IR_Densities), & + CloudCoeff%g_IR(n_IR_Frequencies , n_IR_Radii, n_IR_Densities), & + CloudCoeff%kb_IR(n_IR_Frequencies , n_IR_Radii, n_IR_Densities), & CloudCoeff%pcoeff_IR(n_IR_Frequencies , & n_IR_Radii , & - 0:n_Densities , & - 0:n_Legendre_Terms, & + n_IR_Densities , & + n_Legendre_Terms, & n_Phase_Elements ), & STAT = alloc_stat(4) ) IF ( ANY(alloc_stat /= 0) ) RETURN @@ -411,21 +440,24 @@ ELEMENTAL SUBROUTINE CloudCoeff_Create( & ! ...Dimensions CloudCoeff%n_MW_Frequencies = n_MW_Frequencies CloudCoeff%n_MW_Radii = n_MW_Radii + CloudCoeff%n_MW_Densities = n_MW_Densities CloudCoeff%n_IR_Frequencies = n_IR_Frequencies CloudCoeff%n_IR_Radii = n_IR_Radii + CloudCoeff%n_IR_Densities = n_IR_Densities CloudCoeff%n_Temperatures = n_Temperatures - CloudCoeff%n_Densities = n_Densities CloudCoeff%Max_Legendre_Terms = n_Legendre_Terms CloudCoeff%n_Legendre_Terms = n_Legendre_Terms CloudCoeff%Max_Phase_Elements = n_Phase_Elements CloudCoeff%n_Phase_Elements = n_Phase_Elements ! ...Arrays - CloudCoeff%Frequency_MW = ZERO - CloudCoeff%Frequency_IR = ZERO - CloudCoeff%Reff_MW = ZERO - CloudCoeff%Reff_IR = ZERO - CloudCoeff%Temperature = ZERO - CloudCoeff%Density = ZERO + CloudCoeff%Frequency_MW = ZERO + CloudCoeff%Frequency_IR = ZERO + CloudCoeff%Water_Density_MW = ZERO + CloudCoeff%Reff_MW = ZERO + CloudCoeff%Reff_IR = ZERO + CloudCoeff%Temperature = ZERO + CloudCoeff%Density_MW = ZERO + CloudCoeff%Density_IR = ZERO CloudCoeff%ke_L_MW = ZERO CloudCoeff%w_L_MW = ZERO @@ -491,10 +523,11 @@ SUBROUTINE CloudCoeff_Inspect( CloudCoeff, Pause ) ! Dimensions WRITE(*,'(3x,"n_MW_Frequencies :",1x,i0)') CloudCoeff%n_MW_Frequencies WRITE(*,'(3x,"n_MW_Radii :",1x,i0)') CloudCoeff%n_MW_Radii + WRITE(*,'(3x,"n_MW_Densities :",1x,i0)') CloudCoeff%n_MW_Densities WRITE(*,'(3x,"n_IR_Frequencies :",1x,i0)') CloudCoeff%n_IR_Frequencies WRITE(*,'(3x,"n_IR_Radii :",1x,i0)') CloudCoeff%n_IR_Radii + WRITE(*,'(3x,"n_IR_Densities :",1x,i0)') CloudCoeff%n_IR_Densities WRITE(*,'(3x,"n_Temperatures :",1x,i0)') CloudCoeff%n_Temperatures - WRITE(*,'(3x,"n_Densities :",1x,i0)') CloudCoeff%n_Densities WRITE(*,'(3x,"n_Legendre_Terms :",1x,i0)') CloudCoeff%n_Legendre_Terms WRITE(*,'(3x,"n_Phase_Elements :",1x,i0)') CloudCoeff%n_Phase_Elements IF ( .NOT. CloudCoeff_Associated(CloudCoeff) ) RETURN @@ -509,9 +542,11 @@ SUBROUTINE CloudCoeff_Inspect( CloudCoeff, Pause ) WRITE(*,'(5x,"CloudCoeff Reff_IR :")') WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%Reff_IR WRITE(*,'(5x,"CloudCoeff Temperature :")') - WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%Temperature - WRITE(*,'(5x,"CloudCoeff Density :")') - WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%Density + WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%Temperature + WRITE(*,'(5x,"CloudCoeff Density_MW :")') + WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%Density_MW + WRITE(*,'(5x,"CloudCoeff Density_IR :")') + WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%Density_IR ! Microwave data WRITE(*,'(/3x,"Microwave data...")') @@ -525,6 +560,7 @@ SUBROUTINE CloudCoeff_Inspect( CloudCoeff, Pause ) WRITE(*,'(5x,"Microwave liquid phase mass extinction coefficients:")') WRITE(*,'(7x,"Temperature : ",es13.6)') CloudCoeff%Temperature(j) DO i = 1, CloudCoeff%n_MW_Radii + WRITE(*,'(7x,"Water Content: ",es13.6)') CloudCoeff%Water_Density_MW(i) WRITE(*,'(7x,"Effective radius: ",es13.6)') CloudCoeff%Reff_MW(i) WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%ke_L_MW(:,i,j) END DO @@ -538,6 +574,7 @@ SUBROUTINE CloudCoeff_Inspect( CloudCoeff, Pause ) WRITE(*,'(5x,"Microwave liquid phase single scatter albedo:")') WRITE(*,'(7x,"Temperature : ",es13.6)') CloudCoeff%Temperature(j) DO i = 1, CloudCoeff%n_MW_Radii + WRITE(*,'(7x,"Water Content: ",es13.6)') CloudCoeff%Water_Density_MW(i) WRITE(*,'(7x,"Effective radius: ",es13.6)') CloudCoeff%Reff_MW(i) WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%w_L_MW(:,i,j) END DO @@ -551,6 +588,7 @@ SUBROUTINE CloudCoeff_Inspect( CloudCoeff, Pause ) WRITE(*,'(5x,"Microwave liquid phase asymmetry parameter:")') WRITE(*,'(7x,"Temperature : ",es13.6)') CloudCoeff%Temperature(j) DO i = 1, CloudCoeff%n_MW_Radii + WRITE(*,'(7x,"Water Content: ",es13.6)') CloudCoeff%Water_Density_MW(i) WRITE(*,'(7x,"Effective radius: ",es13.6)') CloudCoeff%Reff_MW(i) WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%g_L_MW(:,i,j) END DO @@ -571,6 +609,7 @@ SUBROUTINE CloudCoeff_Inspect( CloudCoeff, Pause ) DO j = 1, CloudCoeff%n_Temperatures WRITE(*,'(7x,"Temperature : ",es13.6)') CloudCoeff%Temperature(j) DO i = 1, CloudCoeff%n_MW_Radii + WRITE(*,'(7x,"Water Content: ",es13.6)') CloudCoeff%Water_Density_MW(i) WRITE(*,'(7x,"Effective radius: ",es13.6)') CloudCoeff%Reff_MW(i) WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%pcoeff_L_MW(:,i,j,kidx,l) END DO @@ -584,10 +623,11 @@ SUBROUTINE CloudCoeff_Inspect( CloudCoeff, Pause ) WRITE(*,'(/5x,"Press to view the microwave solid phase mass extinction coefficients")') READ(*,*) END IF - DO j = 1, CloudCoeff%n_Densities + DO j = 1, CloudCoeff%n_MW_Densities WRITE(*,'(5x,"Microwave solid phase mass extinction coefficients:")') - WRITE(*,'(7x,"Density : ",es13.6)') CloudCoeff%Density(j) + WRITE(*,'(7x,"Density : ",es13.6)') CloudCoeff%Density_MW(j) DO i = 1, CloudCoeff%n_MW_Radii + WRITE(*,'(7x,"Water Content: ",es13.6)') CloudCoeff%Water_Density_MW(i) WRITE(*,'(7x,"Effective radius: ",es13.6)') CloudCoeff%Reff_MW(i) WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%ke_S_MW(:,i,j) END DO @@ -597,10 +637,11 @@ SUBROUTINE CloudCoeff_Inspect( CloudCoeff, Pause ) WRITE(*,'(/5x,"Press to view the microwave solid phase single scatter albedo")') READ(*,*) END IF - DO j = 1, CloudCoeff%n_Densities + DO j = 1, CloudCoeff%n_MW_Densities WRITE(*,'(5x,"Microwave solid phase single scatter albedo:")') - WRITE(*,'(7x,"Density : ",es13.6)') CloudCoeff%Density(j) + WRITE(*,'(7x,"Density_MW : ",es13.6)') CloudCoeff%Density_MW(j) DO i = 1, CloudCoeff%n_MW_Radii + WRITE(*,'(7x,"Water Content: ",es13.6)') CloudCoeff%Water_Density_MW(i) WRITE(*,'(7x,"Effective radius: ",es13.6)') CloudCoeff%Reff_MW(i) WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%w_S_MW(:,i,j) END DO @@ -610,14 +651,29 @@ SUBROUTINE CloudCoeff_Inspect( CloudCoeff, Pause ) WRITE(*,'(/5x,"Press to view the microwave solid phase asymmetry parameter")') READ(*,*) END IF - DO j = 1, CloudCoeff%n_Densities + DO j = 1, CloudCoeff%n_MW_Densities WRITE(*,'(5x,"Microwave solid phase asymmetry parameter:")') - WRITE(*,'(7x,"Density : ",es13.6)') CloudCoeff%Density(j) + WRITE(*,'(7x,"Density_MW : ",es13.6)') CloudCoeff%Density_MW(j) DO i = 1, CloudCoeff%n_MW_Radii + WRITE(*,'(7x,"Water Content: ",es13.6)') CloudCoeff%Water_Density_MW(i) WRITE(*,'(7x,"Effective radius: ",es13.6)') CloudCoeff%Reff_MW(i) WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%g_S_MW(:,i,j) END DO END DO + + IF ( wait ) THEN + WRITE(*,'(/5x,"Press to view the microwave solid phase backscattering parameter")') + READ(*,*) + END IF + DO j = 1, CloudCoeff%n_MW_Densities + WRITE(*,'(5x,"Microwave solid phase backscatter parameter:")') + WRITE(*,'(7x,"Density_MW : ",es22.15)') CloudCoeff%Density_MW(j) + DO i = 1, CloudCoeff%n_MW_Radii + WRITE(*,'(7x,"Water Content: ",es22.15)') CloudCoeff%Water_Density_MW(i) + WRITE(*,'(7x,"Effective radius: ",es22.15)') CloudCoeff%Reff_MW(i) + WRITE(*,'(5(1x,es22.15,:))') CloudCoeff%kb_S_MW(:,i,j) + END DO + END DO DO m = 1, CloudCoeff%n_Stream_Sets IF ( wait ) THEN @@ -631,9 +687,10 @@ SUBROUTINE CloudCoeff_Inspect( CloudCoeff, Pause ) DO k = 1, CloudCoeff%n_Streams(m) WRITE(*,'(7x,"Legendre term: ",i0)') k kidx = k + CloudCoeff%Legendre_Offset(m) - DO j = 1, CloudCoeff%n_Densities - WRITE(*,'(7x,"Density : ",es13.6)') CloudCoeff%Density(j) + DO j = 1, CloudCoeff%n_MW_Densities + WRITE(*,'(7x,"Density_MW : ",es13.6)') CloudCoeff%Density_MW(j) DO i = 1, CloudCoeff%n_MW_Radii + WRITE(*,'(7x,"Water Content: ",es13.6)') CloudCoeff%Water_Density_MW(i) WRITE(*,'(7x,"Effective radius: ",es13.6)') CloudCoeff%Reff_MW(i) WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%pcoeff_S_MW(:,i,j,kidx,l) END DO @@ -654,7 +711,7 @@ SUBROUTINE CloudCoeff_Inspect( CloudCoeff, Pause ) WRITE(*,'(5x,"Infrared liquid phase mass extinction coefficients:")') DO i = 1, CloudCoeff%n_IR_Radii WRITE(*,'(7x,"Effective radius: ",es13.6)') CloudCoeff%Reff_IR(i) - WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%ke_IR(:,i,0) + WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%ke_IR(:,i,1) END DO IF ( wait ) THEN @@ -664,7 +721,7 @@ SUBROUTINE CloudCoeff_Inspect( CloudCoeff, Pause ) WRITE(*,'(5x,"Infrared liquid phase single scatter albedo:")') DO i = 1, CloudCoeff%n_IR_Radii WRITE(*,'(7x,"Effective radius: ",es13.6)') CloudCoeff%Reff_IR(i) - WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%w_IR(:,i,0) + WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%w_IR(:,i,1) END DO IF ( wait ) THEN @@ -674,9 +731,19 @@ SUBROUTINE CloudCoeff_Inspect( CloudCoeff, Pause ) WRITE(*,'(5x,"Infrared liquid phase asymmetry parameter:")') DO i = 1, CloudCoeff%n_IR_Radii WRITE(*,'(7x,"Effective radius: ",es13.6)') CloudCoeff%Reff_IR(i) - WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%g_IR(:,i,0) + WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%g_IR(:,i,1) END DO + IF ( wait ) THEN + WRITE(*,'(/5x,"Press to view the infrared liquid phase backscattering parameter")') + READ(*,*) + END IF + WRITE(*,'(5x,"Infrared liquid phase asymmetry parameter:")') + DO i = 1, CloudCoeff%n_IR_Radii + WRITE(*,'(7x,"Effective radius: ",es22.15)') CloudCoeff%Reff_IR(i) + WRITE(*,'(5(1x,es22.15,:))') CloudCoeff%kb_IR(:,i,1) + END DO + DO m = 1, CloudCoeff%n_Stream_Sets IF ( wait ) THEN WRITE(*,'(/5x,"Press to view the ",i0,"-stream infrared liquid ",& @@ -689,7 +756,7 @@ SUBROUTINE CloudCoeff_Inspect( CloudCoeff, Pause ) kidx = k + CloudCoeff%Legendre_Offset(m) DO i = 1, CloudCoeff%n_IR_Radii WRITE(*,'(7x,"Effective radius: ",es13.6)') CloudCoeff%Reff_IR(i) - WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%pcoeff_IR(:,i,0,kidx,1) + WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%pcoeff_IR(:,i,1,kidx,1) END DO END DO END DO @@ -699,9 +766,9 @@ SUBROUTINE CloudCoeff_Inspect( CloudCoeff, Pause ) WRITE(*,'(/5x,"Press to view the infrared solid phase mass extinction coefficients")') READ(*,*) END IF - DO j = 1, CloudCoeff%n_Densities + DO j = 1, CloudCoeff%n_IR_Densities WRITE(*,'(5x,"Infrared solid phase mass extinction coefficients:")') - WRITE(*,'(7x,"Density : ",es13.6)') CloudCoeff%Density(j) + WRITE(*,'(7x,"Density_IR : ",es13.6)') CloudCoeff%Density_IR(j) DO i = 1, CloudCoeff%n_IR_Radii WRITE(*,'(7x,"Effective radius: ",es13.6)') CloudCoeff%Reff_IR(i) WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%ke_IR(:,i,j) @@ -712,9 +779,9 @@ SUBROUTINE CloudCoeff_Inspect( CloudCoeff, Pause ) WRITE(*,'(/5x,"Press to view the infrared solid phase single scatter albedo")') READ(*,*) END IF - DO j = 1, CloudCoeff%n_Densities + DO j = 1, CloudCoeff%n_IR_Densities WRITE(*,'(5x,"Infrared solid phase single scatter albedo:")') - WRITE(*,'(7x,"Density : ",es13.6)') CloudCoeff%Density(j) + WRITE(*,'(7x,"Density_IR : ",es13.6)') CloudCoeff%Density_IR(j) DO i = 1, CloudCoeff%n_IR_Radii WRITE(*,'(7x,"Effective radius: ",es13.6)') CloudCoeff%Reff_IR(i) WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%w_IR(:,i,j) @@ -725,15 +792,28 @@ SUBROUTINE CloudCoeff_Inspect( CloudCoeff, Pause ) WRITE(*,'(/5x,"Press to view the infrared solid phase asymmetry parameter")') READ(*,*) END IF - DO j = 1, CloudCoeff%n_Densities + DO j = 1, CloudCoeff%n_IR_Densities WRITE(*,'(5x,"Infrared solid phase asymmetry parameter:")') - WRITE(*,'(7x,"Density : ",es13.6)') CloudCoeff%Density(j) + WRITE(*,'(7x,"Density_IR : ",es13.6)') CloudCoeff%Density_IR(j) DO i = 1, CloudCoeff%n_IR_Radii WRITE(*,'(7x,"Effective radius: ",es13.6)') CloudCoeff%Reff_IR(i) WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%g_IR(:,i,j) END DO END DO + IF ( wait ) THEN + WRITE(*,'(/5x,"Press to view the infrared solid phase backscattering parameter")') + READ(*,*) + END IF + DO j = 1, CloudCoeff%n_IR_Densities + WRITE(*,'(5x,"Infrared solid phase asymmetry parameter:")') + WRITE(*,'(7x,"Density_IR : ",es22.15)') CloudCoeff%Density_IR(j) + DO i = 1, CloudCoeff%n_IR_Radii + WRITE(*,'(7x,"Effective radius: ",es22.15)') CloudCoeff%Reff_IR(i) + WRITE(*,'(5(1x,es22.15,:))') CloudCoeff%kb_IR(:,i,j) + END DO + END DO + DO m = 1, CloudCoeff%n_Stream_Sets IF ( wait ) THEN WRITE(*,'(/5x,"Press to view the ",i0,"-stream infrared solid ",& @@ -744,8 +824,8 @@ SUBROUTINE CloudCoeff_Inspect( CloudCoeff, Pause ) DO k = 1, CloudCoeff%n_Streams(m) WRITE(*,'(7x,"Legendre term: ",i0)') k kidx = k + CloudCoeff%Legendre_Offset(m) - DO j = 1, CloudCoeff%n_Densities - WRITE(*,'(7x,"Density : ",es13.6)') CloudCoeff%Density(j) + DO j = 1, CloudCoeff%n_IR_Densities + WRITE(*,'(7x,"Density_IR : ",es13.6)') CloudCoeff%Density_IR(j) DO i = 1, CloudCoeff%n_IR_Radii WRITE(*,'(7x,"Effective radius: ",es13.6)') CloudCoeff%Reff_IR(i) WRITE(*,'(5(1x,es13.6,:))') CloudCoeff%pcoeff_IR(:,i,j,kidx,1) @@ -874,7 +954,8 @@ SUBROUTINE CloudCoeff_Info( CloudCoeff, Info ) &"N_RADII(MW)=",i2,2x,& &"N_RADII(IR)=",i2,2x,& &"N_TEMPERATURES=",i2,2x,& - &"N_DENSITIES=",i2,2x,& + &"N_MW_DENSITIES=",i2,2x,& + &"N_IR_DENSITIES=",i2,2x,& &"N_LEGENDRE_TERMS=",i2,2x,& &"N_PHASE_ELEMENTS=",i2 )' ) & ACHAR(CARRIAGE_RETURN)//ACHAR(LINEFEED), & @@ -884,7 +965,8 @@ SUBROUTINE CloudCoeff_Info( CloudCoeff, Info ) CloudCoeff%n_MW_Radii , & CloudCoeff%n_IR_Radii , & CloudCoeff%n_Temperatures , & - CloudCoeff%n_Densities , & + CloudCoeff%n_MW_Densities , & + CloudCoeff%n_IR_Densities , & CloudCoeff%n_Legendre_Terms, & CloudCoeff%n_Phase_Elements @@ -985,16 +1067,19 @@ ELEMENTAL FUNCTION CloudCoeff_Equal( x, y ) RESULT( is_equal ) (x%n_MW_Radii /= y%n_MW_Radii ) .OR. & (x%n_IR_Radii /= y%n_IR_Radii ) .OR. & (x%n_Temperatures /= y%n_Temperatures ) .OR. & - (x%n_Densities /= y%n_Densities ) .OR. & + (x%n_MW_Densities /= y%n_MW_Densities ) .OR. & + (x%n_IR_Densities /= y%n_IR_Densities ) .OR. & (x%n_Legendre_Terms /= y%n_Legendre_Terms) .OR. & (x%n_Phase_Elements /= y%n_Phase_Elements) ) RETURN ! ...Data IF ( ALL(x%Frequency_MW .EqualTo. y%Frequency_MW ) .AND. & ALL(x%Frequency_IR .EqualTo. y%Frequency_IR ) .AND. & + ALL(x%Water_Density_MW .EqualTo. y%Water_Density_MW ) .AND. & ALL(x%Reff_MW .EqualTo. y%Reff_MW ) .AND. & ALL(x%Reff_IR .EqualTo. y%Reff_IR ) .AND. & ALL(x%Temperature .EqualTo. y%Temperature ) .AND. & - ALL(x%Density .EqualTo. y%Density ) .AND. & + ALL(x%Density_MW .EqualTo. y%Density_MW ) .AND. & + ALL(x%Density_IR .EqualTo. y%Density_IR ) .AND. & ALL(x%ke_L_MW .EqualTo. y%ke_L_MW ) .AND. & ALL(x%w_L_MW .EqualTo. y%w_L_MW ) .AND. & ALL(x%g_L_MW .EqualTo. y%g_L_MW ) .AND. & diff --git a/src/Coefficients/CloudCoeff/CloudCoeff_IO.f90 b/src/Coefficients/CloudCoeff/CloudCoeff_IO.f90 index 1b58e12..ac31429 100644 --- a/src/Coefficients/CloudCoeff/CloudCoeff_IO.f90 +++ b/src/Coefficients/CloudCoeff/CloudCoeff_IO.f90 @@ -75,10 +75,11 @@ MODULE CloudCoeff_IO ! netCDF = netCDF , & ! n_MW_Frequencies = n_MW_Frequencies, & ! n_MW_Radii = n_MW_Radii , & +! n_MW_Densities = n_MW_Densities , & ! n_IR_Frequencies = n_IR_Frequencies, & ! n_IR_Radii = n_IR_Radii , & +! n_IR_Densities = n_IR_Densities , & ! n_Temperatures = n_Temperatures , & -! n_Densities = n_Densities , & ! n_Legendre_Terms = n_Legendre_Terms, & ! n_Phase_Elements = n_Phase_Elements, & ! Release = Release , & @@ -120,9 +121,15 @@ MODULE CloudCoeff_IO ! TYPE: INTEGER ! DIMENSION: Scalar ! ATTRIBUTES: INTENT(OUT), OPTIONAL +! n_MW_Densities: The number of fixed densities for snow, graupel, +! and hail/ice in the MW LUT. +! UNITS: N/A +! TYPE: INTEGER +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(OUT), OPTIONAL ! ! n_IR_Frequencies: The number of infrared frequencies in -! the LUT +! the LUT ! UNITS: N/A ! TYPE: INTEGER ! DIMENSION: Scalar @@ -134,16 +141,16 @@ MODULE CloudCoeff_IO ! TYPE: INTEGER ! DIMENSION: Scalar ! ATTRIBUTES: INTENT(OUT), OPTIONAL -! -! n_Temperatures: The number of discrete layer temperatures -! in the LUT. +! n_IR_Densities: The number of fixed densities for snow, graupel, +! and hail/ice in the IR LUT. ! UNITS: N/A ! TYPE: INTEGER ! DIMENSION: Scalar ! ATTRIBUTES: INTENT(OUT), OPTIONAL ! -! n_Densities: The number of fixed densities for snow, graupel, -! and hail/ice in the LUT. +! +! n_Temperatures: The number of discrete layer temperatures +! in the LUT. ! UNITS: N/A ! TYPE: INTEGER ! DIMENSION: Scalar @@ -217,10 +224,11 @@ FUNCTION CloudCoeff_InquireFile( & netCDF , & ! Optional input n_MW_Frequencies, & ! Optional Output n_MW_Radii , & ! Optional Output + n_MW_Densities , & ! Optional Output n_IR_Frequencies, & ! Optional Output n_IR_Radii , & ! Optional Output + n_IR_Densities , & ! Optional Output n_Temperatures , & ! Optional Output - n_Densities , & ! Optional Output n_Legendre_Terms, & ! Optional Output n_Phase_Elements, & ! Optional Output Release , & ! Optional output @@ -232,15 +240,16 @@ FUNCTION CloudCoeff_InquireFile( & ! Arguments CHARACTER(*), INTENT(IN) :: Filename LOGICAL, OPTIONAL, INTENT(IN) :: netCDF - INTEGER, OPTIONAL, INTENT(OUT) :: n_MW_Frequencies - INTEGER, OPTIONAL, INTENT(OUT) :: n_MW_Radii - INTEGER, OPTIONAL, INTENT(OUT) :: n_IR_Frequencies - INTEGER, OPTIONAL, INTENT(OUT) :: n_IR_Radii - INTEGER, OPTIONAL, INTENT(OUT) :: n_Temperatures - INTEGER, OPTIONAL, INTENT(OUT) :: n_Densities - INTEGER, OPTIONAL, INTENT(OUT) :: n_Legendre_Terms - INTEGER, OPTIONAL, INTENT(OUT) :: n_Phase_Elements - INTEGER, OPTIONAL, INTENT(OUT) :: Release + INTEGER, OPTIONAL, INTENT(OUT) :: n_MW_Frequencies + INTEGER, OPTIONAL, INTENT(OUT) :: n_MW_Radii + INTEGER, OPTIONAL, INTENT(OUT) :: n_MW_Densities + INTEGER, OPTIONAL, INTENT(OUT) :: n_IR_Frequencies + INTEGER, OPTIONAL, INTENT(OUT) :: n_IR_Radii + INTEGER, OPTIONAL, INTENT(OUT) :: n_IR_Densities + INTEGER, OPTIONAL, INTENT(OUT) :: n_Temperatures + INTEGER, OPTIONAL, INTENT(OUT) :: n_Legendre_Terms + INTEGER, OPTIONAL, INTENT(OUT) :: n_Phase_Elements + INTEGER, OPTIONAL, INTENT(OUT) :: Release INTEGER, OPTIONAL, INTENT(OUT) :: Version CHARACTER(*), OPTIONAL, INTENT(OUT) :: Title CHARACTER(*), OPTIONAL, INTENT(OUT) :: History @@ -265,21 +274,23 @@ FUNCTION CloudCoeff_InquireFile( & n_MW_Radii = n_MW_Radii , & n_IR_Frequencies = n_IR_Frequencies, & n_IR_Radii = n_IR_Radii , & + n_Densities = n_IR_Densities , & n_Temperatures = n_Temperatures , & - n_Densities = n_Densities , & n_Legendre_Terms = n_Legendre_Terms, & n_Phase_Elements = n_Phase_Elements, & Release = Release , & Version = Version ) + n_MW_Densities = n_IR_Densities ELSE err_stat = CloudCoeff_netCDF_InquireFile( & Filename, & n_MW_Frequencies = n_MW_Frequencies, & n_MW_Radii = n_MW_Radii , & + n_MW_Densities = n_MW_Densities , & n_IR_Frequencies = n_IR_Frequencies, & n_IR_Radii = n_IR_Radii , & n_Temperatures = n_Temperatures , & - n_Densities = n_Densities , & + n_IR_Densities = n_IR_Densities , & n_Legendre_Terms = n_Legendre_Terms, & n_Phase_Elements = n_Phase_Elements, & Release = Release , & diff --git a/src/Coefficients/CloudCoeff/CloudCoeff_netCDF_IO.f90 b/src/Coefficients/CloudCoeff/CloudCoeff_netCDF_IO.f90 index eaecf7d..334fb9b 100644 --- a/src/Coefficients/CloudCoeff/CloudCoeff_netCDF_IO.f90 +++ b/src/Coefficients/CloudCoeff/CloudCoeff_netCDF_IO.f90 @@ -9,6 +9,9 @@ ! Written by: Paul van Delst, CIMSS/SSEC 10-Apr-2007 ! paul.vandelst@ssec.wisc.edu ! +! Modified by: Isaac Moradi, ESSIC/GMAO 25-Sept-2021 +! isaac.moradi@nasa.gov +! MODULE CloudCoeff_netCDF_IO @@ -21,14 +24,13 @@ MODULE CloudCoeff_netCDF_IO USE Message_Handler , ONLY: SUCCESS, FAILURE, INFORMATION, Display_Message USE File_Utility , ONLY: File_Exists USE String_Utility , ONLY: StrClean - USE CloudCoeff_Define, ONLY: CloudCoeff_type , & - CloudCoeff_Associated , & - CloudCoeff_Destroy , & - CloudCoeff_Create , & - CloudCoeff_Inspect , & - CloudCoeff_ValidRelease , & + USE CloudCoeff_Define, ONLY: CloudCoeff_type , & + CloudCoeff_Associated , & + CloudCoeff_Destroy , & + CloudCoeff_Create , & + CloudCoeff_Inspect , & + CloudCoeff_ValidRelease , & CloudCoeff_Info - USE netcdf ! Disable implicit typing IMPLICIT NONE @@ -63,36 +65,41 @@ MODULE CloudCoeff_netCDF_IO ! Dimension names CHARACTER(*), PARAMETER :: MW_FREQ_DIMNAME = 'n_MW_Frequencies' - CHARACTER(*), PARAMETER :: MW_REFF_DIMNAME = 'n_MW_Radii' + CHARACTER(*), PARAMETER :: MW_REFF_WC_DIMNAME = 'n_MW_Radii' CHARACTER(*), PARAMETER :: IR_FREQ_DIMNAME = 'n_IR_Frequencies' CHARACTER(*), PARAMETER :: IR_REFF_DIMNAME = 'n_IR_Radii' CHARACTER(*), PARAMETER :: TEMPERATURE_DIMNAME = 'n_Temperatures' - CHARACTER(*), PARAMETER :: DENSITY_DIMNAME = 'n_Densities' + CHARACTER(*), PARAMETER :: MW_DENSITY_DIMNAME = 'n_MW_Densities' CHARACTER(*), PARAMETER :: IR_DENSITY_DIMNAME = 'n_IR_Densities' CHARACTER(*), PARAMETER :: LEGENDRE_DIMNAME = 'n_Legendre_Terms' CHARACTER(*), PARAMETER :: PHASE_DIMNAME = 'n_Phase_Elements' ! Variable names - CHARACTER(*), PARAMETER :: FREQUENCY_MW_VARNAME = 'Frequency_MW' - CHARACTER(*), PARAMETER :: FREQUENCY_IR_VARNAME = 'Frequency_IR' - CHARACTER(*), PARAMETER :: REFF_MW_VARNAME = 'Reff_MW' - CHARACTER(*), PARAMETER :: REFF_IR_VARNAME = 'Reff_IR' - CHARACTER(*), PARAMETER :: TEMPERATURE_VARNAME = 'Temperature' - CHARACTER(*), PARAMETER :: DENSITY_VARNAME = 'Density' + CHARACTER(*), PARAMETER :: FREQUENCY_MW_VARNAME = 'Frequency_MW' + CHARACTER(*), PARAMETER :: FREQUENCY_IR_VARNAME = 'Frequency_IR' + CHARACTER(*), PARAMETER :: WC_MW_VARNAME = 'Water_Density_MW' + CHARACTER(*), PARAMETER :: REFF_MW_VARNAME = 'Reff_MW' + CHARACTER(*), PARAMETER :: REFF_IR_VARNAME = 'Reff_IR' + CHARACTER(*), PARAMETER :: TEMPERATURE_VARNAME = 'Temperature' + CHARACTER(*), PARAMETER :: MW_DENSITY_VARNAME = 'Density_MW' + CHARACTER(*), PARAMETER :: IR_DENSITY_VARNAME = 'Density_IR' CHARACTER(*), PARAMETER :: KE_L_MW_VARNAME = 'ke_L_MW' CHARACTER(*), PARAMETER :: W_L_MW_VARNAME = 'w_L_MW' CHARACTER(*), PARAMETER :: G_L_MW_VARNAME = 'g_L_MW' + CHARACTER(*), PARAMETER :: KB_L_MW_VARNAME = 'kb_L_MW' CHARACTER(*), PARAMETER :: PCOEFF_L_MW_VARNAME = 'pcoeff_L_MW' CHARACTER(*), PARAMETER :: KE_S_MW_VARNAME = 'ke_S_MW' CHARACTER(*), PARAMETER :: W_S_MW_VARNAME = 'w_S_MW' CHARACTER(*), PARAMETER :: G_S_MW_VARNAME = 'g_S_MW' + CHARACTER(*), PARAMETER :: KB_S_MW_VARNAME = 'kb_S_MW' CHARACTER(*), PARAMETER :: PCOEFF_S_MW_VARNAME = 'pcoeff_S_MW' CHARACTER(*), PARAMETER :: KE_IR_VARNAME = 'ke_IR' CHARACTER(*), PARAMETER :: W_IR_VARNAME = 'w_IR' CHARACTER(*), PARAMETER :: G_IR_VARNAME = 'g_IR' + CHARACTER(*), PARAMETER :: KB_IR_VARNAME = 'kb_IR' CHARACTER(*), PARAMETER :: PCOEFF_IR_VARNAME = 'pcoeff_IR' ! Variable long name attribute. @@ -100,24 +107,29 @@ MODULE CloudCoeff_netCDF_IO CHARACTER(*), PARAMETER :: FREQUENCY_MW_LONGNAME = 'Frequency' CHARACTER(*), PARAMETER :: FREQUENCY_IR_LONGNAME = 'Frequency' + CHARACTER(*), PARAMETER :: WC_MW_LONGNAME = 'Water Content' CHARACTER(*), PARAMETER :: REFF_MW_LONGNAME = 'Effective radius' CHARACTER(*), PARAMETER :: REFF_IR_LONGNAME = 'Effective radius' CHARACTER(*), PARAMETER :: TEMPERATURE_LONGNAME = 'Temperature' - CHARACTER(*), PARAMETER :: DENSITY_LONGNAME = 'Density' + CHARACTER(*), PARAMETER :: MW_DENSITY_LONGNAME = 'MW Density' + CHARACTER(*), PARAMETER :: IR_DENSITY_LONGNAME = 'IR Density' CHARACTER(*), PARAMETER :: KE_L_MW_LONGNAME = 'Microwave ke(L)' CHARACTER(*), PARAMETER :: W_L_MW_LONGNAME = 'Microwave w(L)' CHARACTER(*), PARAMETER :: G_L_MW_LONGNAME = 'Microwave g(L)' + CHARACTER(*), PARAMETER :: KB_L_MW_LONGNAME = 'Microwave bs(L)' CHARACTER(*), PARAMETER :: PCOEFF_L_MW_LONGNAME = 'Microwave pcoeff(L)' CHARACTER(*), PARAMETER :: KE_S_MW_LONGNAME = 'Microwave ke(S)' CHARACTER(*), PARAMETER :: W_S_MW_LONGNAME = 'Microwave w(S)' CHARACTER(*), PARAMETER :: G_S_MW_LONGNAME = 'Microwave g(S)' + CHARACTER(*), PARAMETER :: KB_S_MW_LONGNAME = 'Microwave bs(S)' CHARACTER(*), PARAMETER :: PCOEFF_S_MW_LONGNAME = 'Microwave pcoeff(S)' CHARACTER(*), PARAMETER :: KE_IR_LONGNAME = 'Infrared ke' CHARACTER(*), PARAMETER :: W_IR_LONGNAME = 'Infrared w' CHARACTER(*), PARAMETER :: G_IR_LONGNAME = 'Infrared g' + CHARACTER(*), PARAMETER :: KB_IR_LONGNAME = 'Infrared bs' CHARACTER(*), PARAMETER :: PCOEFF_IR_LONGNAME = 'Infrared pcoeff' ! Variable description attribute. @@ -125,6 +137,7 @@ MODULE CloudCoeff_netCDF_IO CHARACTER(*), PARAMETER :: FREQUENCY_MW_DESCRIPTION = 'Microwave frequency LUT dimension vector' CHARACTER(*), PARAMETER :: FREQUENCY_IR_DESCRIPTION = 'Infrared frequency LUT dimension vector' + CHARACTER(*), PARAMETER :: WC_MW_DESCRIPTION = 'Microwave water content LUT dimension vector' CHARACTER(*), PARAMETER :: REFF_MW_DESCRIPTION = 'Microwave effective radius LUT dimension vector' CHARACTER(*), PARAMETER :: REFF_IR_DESCRIPTION = 'Infrared effective radius LUT dimension vector' CHARACTER(*), PARAMETER :: TEMPERATURE_DESCRIPTION = 'Temperature LUT dimension vector' @@ -133,16 +146,19 @@ MODULE CloudCoeff_netCDF_IO CHARACTER(*), PARAMETER :: KE_L_MW_DESCRIPTION = 'Mass extinction coefficient for liquid phase microwave scatterers' CHARACTER(*), PARAMETER :: W_L_MW_DESCRIPTION = 'Single scatter albedo for liquid phase microwave scatterers' CHARACTER(*), PARAMETER :: G_L_MW_DESCRIPTION = 'Asymmetry parameter for liquid phase microwave scatterers' + CHARACTER(*), PARAMETER :: KB_L_MW_DESCRIPTION = 'Backscattering for liquid phase microwave scatterers' CHARACTER(*), PARAMETER :: PCOEFF_L_MW_DESCRIPTION = 'Phase coefficients for liquid phase microwave scatterers' CHARACTER(*), PARAMETER :: KE_S_MW_DESCRIPTION = 'Mass extinction coefficient for solid phase microwave scatterers' CHARACTER(*), PARAMETER :: W_S_MW_DESCRIPTION = 'Single scatter albedo for solid phase microwave scatterers' CHARACTER(*), PARAMETER :: G_S_MW_DESCRIPTION = 'Asymmetry parameter for solid phase microwave scatterers' + CHARACTER(*), PARAMETER :: KB_S_MW_DESCRIPTION = 'Backscattering for solid phase microwave scatterers' CHARACTER(*), PARAMETER :: PCOEFF_S_MW_DESCRIPTION = 'Phase coefficients for solid phase microwave scatterers' CHARACTER(*), PARAMETER :: KE_IR_DESCRIPTION = 'Mass extinction coefficient for infrared scatterers' CHARACTER(*), PARAMETER :: W_IR_DESCRIPTION = 'Single scatter albedo for infrared scatterers' CHARACTER(*), PARAMETER :: G_IR_DESCRIPTION = 'Asymmetry parameter for infrared scatterers' + CHARACTER(*), PARAMETER :: KB_IR_DESCRIPTION = 'Backscattering for infrared scatterers' CHARACTER(*), PARAMETER :: PCOEFF_IR_DESCRIPTION = 'Phase coefficients for infrared scatterers' @@ -154,6 +170,7 @@ MODULE CloudCoeff_netCDF_IO CHARACTER(*), PARAMETER :: FREQUENCY_MW_UNITS = 'GigaHertz (GHz)' CHARACTER(*), PARAMETER :: FREQUENCY_IR_UNITS = 'Inverse centimetres (cm^-1)' + CHARACTER(*), PARAMETER :: WC_MW_UNITS = 'Kilograms per square metre (kg.m^-2)' CHARACTER(*), PARAMETER :: REFF_MW_UNITS = 'Microns (um)' CHARACTER(*), PARAMETER :: REFF_IR_UNITS = 'Microns (um)' CHARACTER(*), PARAMETER :: TEMPERATURE_UNITS = 'Kelvin (K)' @@ -162,16 +179,19 @@ MODULE CloudCoeff_netCDF_IO CHARACTER(*), PARAMETER :: KE_L_MW_UNITS = 'Metres squared per kilogram (m^2.kg^-1)' CHARACTER(*), PARAMETER :: W_L_MW_UNITS = 'N/A' CHARACTER(*), PARAMETER :: G_L_MW_UNITS = 'N/A' + CHARACTER(*), PARAMETER :: KB_L_MW_UNITS = 'N/A' CHARACTER(*), PARAMETER :: PCOEFF_L_MW_UNITS = 'N/A' CHARACTER(*), PARAMETER :: KE_S_MW_UNITS = 'Metres squared per kilogram (m^2.kg^-1)' CHARACTER(*), PARAMETER :: W_S_MW_UNITS = 'N/A' CHARACTER(*), PARAMETER :: G_S_MW_UNITS = 'N/A' + CHARACTER(*), PARAMETER :: KB_S_MW_UNITS = 'N/A' CHARACTER(*), PARAMETER :: PCOEFF_S_MW_UNITS = 'N/A' CHARACTER(*), PARAMETER :: KE_IR_UNITS = 'Metres squared per kilogram (m^2.kg^-1)' CHARACTER(*), PARAMETER :: W_IR_UNITS = 'N/A' CHARACTER(*), PARAMETER :: G_IR_UNITS = 'N/A' + CHARACTER(*), PARAMETER :: KB_IR_UNITS = 'N/A' CHARACTER(*), PARAMETER :: PCOEFF_IR_UNITS = 'N/A' @@ -180,6 +200,7 @@ MODULE CloudCoeff_netCDF_IO REAL(Double), PARAMETER :: FREQUENCY_MW_FILLVALUE = ZERO REAL(Double), PARAMETER :: FREQUENCY_IR_FILLVALUE = ZERO + REAL(Double), PARAMETER :: WC_MW_FILLVALUE = ZERO REAL(Double), PARAMETER :: REFF_MW_FILLVALUE = ZERO REAL(Double), PARAMETER :: REFF_IR_FILLVALUE = ZERO REAL(Double), PARAMETER :: TEMPERATURE_FILLVALUE = ZERO @@ -188,22 +209,26 @@ MODULE CloudCoeff_netCDF_IO REAL(Double), PARAMETER :: KE_L_MW_FILLVALUE = ZERO REAL(Double), PARAMETER :: W_L_MW_FILLVALUE = ZERO REAL(Double), PARAMETER :: G_L_MW_FILLVALUE = ZERO + REAL(Double), PARAMETER :: KB_L_MW_FILLVALUE = ZERO REAL(Double), PARAMETER :: PCOEFF_L_MW_FILLVALUE = ZERO REAL(Double), PARAMETER :: KE_S_MW_FILLVALUE = ZERO REAL(Double), PARAMETER :: W_S_MW_FILLVALUE = ZERO REAL(Double), PARAMETER :: G_S_MW_FILLVALUE = ZERO + REAL(Double), PARAMETER :: KB_S_MW_FILLVALUE = ZERO REAL(Double), PARAMETER :: PCOEFF_S_MW_FILLVALUE = ZERO REAL(Double), PARAMETER :: KE_IR_FILLVALUE = ZERO REAL(Double), PARAMETER :: W_IR_FILLVALUE = ZERO REAL(Double), PARAMETER :: G_IR_FILLVALUE = ZERO + REAL(Double), PARAMETER :: KB_IR_FILLVALUE = ZERO REAL(Double), PARAMETER :: PCOEFF_IR_FILLVALUE = ZERO ! Variable types INTEGER, PARAMETER :: FREQUENCY_MW_TYPE = NF90_DOUBLE INTEGER, PARAMETER :: FREQUENCY_IR_TYPE = NF90_DOUBLE + INTEGER, PARAMETER :: WC_MW_TYPE = NF90_DOUBLE INTEGER, PARAMETER :: REFF_MW_TYPE = NF90_DOUBLE INTEGER, PARAMETER :: REFF_IR_TYPE = NF90_DOUBLE INTEGER, PARAMETER :: TEMPERATURE_TYPE = NF90_DOUBLE @@ -212,16 +237,19 @@ MODULE CloudCoeff_netCDF_IO INTEGER, PARAMETER :: KE_L_MW_TYPE = NF90_DOUBLE INTEGER, PARAMETER :: W_L_MW_TYPE = NF90_DOUBLE INTEGER, PARAMETER :: G_L_MW_TYPE = NF90_DOUBLE + INTEGER, PARAMETER :: KB_L_MW_TYPE = NF90_DOUBLE INTEGER, PARAMETER :: PCOEFF_L_MW_TYPE = NF90_DOUBLE INTEGER, PARAMETER :: KE_S_MW_TYPE = NF90_DOUBLE INTEGER, PARAMETER :: W_S_MW_TYPE = NF90_DOUBLE INTEGER, PARAMETER :: G_S_MW_TYPE = NF90_DOUBLE + INTEGER, PARAMETER :: KB_S_MW_TYPE = NF90_DOUBLE INTEGER, PARAMETER :: PCOEFF_S_MW_TYPE = NF90_DOUBLE INTEGER, PARAMETER :: KE_IR_TYPE = NF90_DOUBLE INTEGER, PARAMETER :: W_IR_TYPE = NF90_DOUBLE INTEGER, PARAMETER :: G_IR_TYPE = NF90_DOUBLE + INTEGER, PARAMETER :: KB_IR_TYPE = NF90_DOUBLE INTEGER, PARAMETER :: PCOEFF_IR_TYPE = NF90_DOUBLE @@ -250,10 +278,11 @@ MODULE CloudCoeff_netCDF_IO ! Filename, & ! n_MW_Frequencies = n_MW_Frequencies , & ! n_MW_Radii = n_MW_Radii , & +! n_MW_Densities = n_MW_Densities , & ! n_IR_Frequencies = n_IR_Frequencies , & ! n_IR_Radii = n_IR_Radii , & +! n_IR_Densities = n_IR_Densities , & ! n_Temperatures = n_Temperatures , & -! n_Densities = n_Densities , & ! n_Legendre_Terms = n_Legendre_Terms , & ! n_Phase_Elements = n_Phase_Elements , & ! Release = Release , & @@ -285,6 +314,13 @@ MODULE CloudCoeff_netCDF_IO ! DIMENSION: Scalar ! ATTRIBUTES: INTENT(OUT), OPTIONAL ! +! n_MW_Densities: The number of fixed MW densities for snow, graupel, +! and hail/ice in the LUT. Must be > 0. +! UNITS: N/A +! TYPE: INTEGER +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(OUT), OPTIONAL +! ! n_IR_Frequencies: The number of infrared frequencies in ! the LUT. ! UNITS: N/A @@ -299,15 +335,15 @@ MODULE CloudCoeff_netCDF_IO ! DIMENSION: Scalar ! ATTRIBUTES: INTENT(OUT), OPTIONAL ! -! n_Temperatures: The number of discrete layer temperatures -! in the LUT. +! n_IR_Densities: The number of fixed IR densities for snow, graupel, +! and hail/ice in the LUT. Must be > 0. ! UNITS: N/A ! TYPE: INTEGER ! DIMENSION: Scalar ! ATTRIBUTES: INTENT(OUT), OPTIONAL ! -! n_Densities: The number of fixed densities for snow, graupel, -! and hail/ice in the LUT. Must be > 0. +! n_Temperatures: The number of discrete layer temperatures +! in the LUT. ! UNITS: N/A ! TYPE: INTEGER ! DIMENSION: Scalar @@ -376,10 +412,11 @@ FUNCTION CloudCoeff_netCDF_InquireFile( & Filename , & ! Input n_MW_Frequencies, & ! Optional output n_MW_Radii , & ! Optional output + n_MW_Densities , & ! Optional output n_IR_Frequencies, & ! Optional output n_IR_Radii , & ! Optional output + n_IR_Densities , & ! Optional output n_Temperatures , & ! Optional output - n_Densities , & ! Optional output n_Legendre_Terms, & ! Optional output n_Phase_Elements, & ! Optional output Release , & ! Optional output @@ -391,18 +428,20 @@ FUNCTION CloudCoeff_netCDF_InquireFile( & ! Arguments CHARACTER(*), INTENT(IN) :: Filename INTEGER, OPTIONAL, INTENT(OUT) :: n_MW_Frequencies - INTEGER, OPTIONAL, INTENT(OUT) :: n_MW_Radii + INTEGER, OPTIONAL, INTENT(OUT) :: n_MW_Radii + INTEGER, OPTIONAL, INTENT(OUT) :: n_MW_Densities INTEGER, OPTIONAL, INTENT(OUT) :: n_IR_Frequencies INTEGER, OPTIONAL, INTENT(OUT) :: n_IR_Radii - INTEGER, OPTIONAL, INTENT(OUT) :: n_Temperatures - INTEGER, OPTIONAL, INTENT(OUT) :: n_Densities + INTEGER, OPTIONAL, INTENT(OUT) :: n_IR_Densities + INTEGER, OPTIONAL, INTENT(OUT) :: n_Temperatures INTEGER, OPTIONAL, INTENT(OUT) :: n_Legendre_Terms INTEGER, OPTIONAL, INTENT(OUT) :: n_Phase_Elements INTEGER, OPTIONAL, INTENT(OUT) :: Release INTEGER, OPTIONAL, INTENT(OUT) :: Version CHARACTER(*), OPTIONAL, INTENT(OUT) :: Title CHARACTER(*), OPTIONAL, INTENT(OUT) :: History - CHARACTER(*), OPTIONAL, INTENT(OUT) :: Comment + CHARACTER(*), OPTIONAL, INTENT(OUT) :: Comment + ! Function result INTEGER :: err_stat ! Function parameters @@ -430,7 +469,6 @@ FUNCTION CloudCoeff_netCDF_InquireFile( & ! ...Close the file if any error from here on Close_File = .TRUE. - ! Get the dimensions ! ...n_MW_Frequencies dimension NF90_Status = NF90_INQ_DIMID( FileId,MW_FREQ_DIMNAME,DimId ) @@ -446,15 +484,15 @@ FUNCTION CloudCoeff_netCDF_InquireFile( & CALL Inquire_Cleanup(); RETURN END IF ! ...n_MW_Radii dimension - NF90_Status = NF90_INQ_DIMID( FileId,MW_REFF_DIMNAME,DimId ) + NF90_Status = NF90_INQ_DIMID( FileId,MW_REFF_WC_DIMNAME,DimId ) IF ( NF90_Status /= NF90_NOERR ) THEN - msg = 'Error inquiring dimension ID for '//MW_REFF_DIMNAME//' - '// & + msg = 'Error inquiring dimension ID for '//MW_REFF_WC_DIMNAME//' - '// & TRIM(NF90_STRERROR( NF90_Status )) CALL Inquire_Cleanup(); RETURN END IF NF90_Status = NF90_INQUIRE_DIMENSION( FileId,DimId,Len=CloudCoeff%n_MW_Radii ) IF ( NF90_Status /= NF90_NOERR ) THEN - msg = 'Error reading dimension value for '//MW_REFF_DIMNAME//' - '// & + msg = 'Error reading dimension value for '//MW_REFF_WC_DIMNAME//' - '// & TRIM(NF90_STRERROR( NF90_Status )) CALL Inquire_Cleanup(); RETURN END IF @@ -497,19 +535,40 @@ FUNCTION CloudCoeff_netCDF_InquireFile( & TRIM(NF90_STRERROR( NF90_Status )) CALL Inquire_Cleanup(); RETURN END IF - ! ...n_Densities dimension - NF90_Status = NF90_INQ_DIMID( FileId,DENSITY_DIMNAME,DimId ) + ! ...n_MW_Densities dimension + NF90_Status = NF90_INQ_DIMID( FileId,MW_DENSITY_DIMNAME,DimId ) + IF ( NF90_Status .EQ. NF90_EBADDIM ) THEN + NF90_Status = NF90_INQ_DIMID( FileId,'n_Densities',DimId ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error inquiring dimension ID for '// 'n_Densities' //' - '// & + TRIM(NF90_STRERROR( NF90_Status )) + CALL Inquire_Cleanup(); RETURN + END IF + ELSE IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error inquiring dimension ID for '//MW_DENSITY_DIMNAME//' - '// & + TRIM(NF90_STRERROR( NF90_Status )) + CALL Inquire_Cleanup(); RETURN + END IF + NF90_Status = NF90_INQUIRE_DIMENSION( FileId,DimId,Len=CloudCoeff%n_MW_Densities ) IF ( NF90_Status /= NF90_NOERR ) THEN - msg = 'Error inquiring dimension ID for '//DENSITY_DIMNAME//' - '// & + msg = 'Error reading dimension value for '//MW_DENSITY_DIMNAME//' - '// & TRIM(NF90_STRERROR( NF90_Status )) CALL Inquire_Cleanup(); RETURN END IF - NF90_Status = NF90_INQUIRE_DIMENSION( FileId,DimId,Len=CloudCoeff%n_Densities ) + ! ...n_IR_Densities dimension + NF90_Status = NF90_INQ_DIMID( FileId,IR_DENSITY_DIMNAME,DimId ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error inquiring dimension ID for '//IR_DENSITY_DIMNAME//' - '// & + TRIM(NF90_STRERROR( NF90_Status )) + CALL Inquire_Cleanup(); RETURN + END IF + NF90_Status = NF90_INQUIRE_DIMENSION( FileId,DimId,Len=CloudCoeff%n_IR_Densities ) IF ( NF90_Status /= NF90_NOERR ) THEN - msg = 'Error reading dimension value for '//DENSITY_DIMNAME//' - '// & + msg = 'Error reading dimension value for '//IR_DENSITY_DIMNAME//' - '// & TRIM(NF90_STRERROR( NF90_Status )) CALL Inquire_Cleanup(); RETURN END IF + ! ...n_Legendre_Terms dimension NF90_Status = NF90_INQ_DIMID( FileId,LEGENDRE_DIMNAME,DimId ) IF ( NF90_Status /= NF90_NOERR ) THEN @@ -564,10 +623,11 @@ FUNCTION CloudCoeff_netCDF_InquireFile( & ! Set the return values IF ( PRESENT(n_MW_Frequencies) ) n_MW_Frequencies = CloudCoeff%n_MW_Frequencies IF ( PRESENT(n_MW_Radii ) ) n_MW_Radii = CloudCoeff%n_MW_Radii + IF ( PRESENT(n_MW_Densities ) ) n_MW_Densities = CloudCoeff%n_MW_Densities IF ( PRESENT(n_IR_Frequencies) ) n_IR_Frequencies = CloudCoeff%n_IR_Frequencies - IF ( PRESENT(n_IR_Radii ) ) n_IR_Radii = CloudCoeff%n_IR_Radii - IF ( PRESENT(n_Temperatures ) ) n_Temperatures = CloudCoeff%n_Temperatures - IF ( PRESENT(n_Densities ) ) n_Densities = CloudCoeff%n_Densities + IF ( PRESENT(n_IR_Radii ) ) n_IR_Radii = CloudCoeff%n_IR_Radii + IF ( PRESENT(n_IR_Densities ) ) n_IR_Densities = CloudCoeff%n_IR_Densities + IF ( PRESENT(n_Temperatures ) ) n_Temperatures = CloudCoeff%n_Temperatures IF ( PRESENT(n_Legendre_Terms) ) n_Legendre_Terms = CloudCoeff%n_Legendre_Terms-1 ! Indexed from 0, so subtract 1. IF ( PRESENT(n_Phase_Elements) ) n_Phase_Elements = CloudCoeff%n_Phase_Elements IF ( PRESENT(Release ) ) Release = CloudCoeff%Release @@ -714,10 +774,11 @@ FUNCTION CloudCoeff_netCDF_WriteFile( & Filename , & ! Input CloudCoeff%n_MW_Frequencies , & ! Input CloudCoeff%n_MW_Radii , & ! Input + CloudCoeff%n_MW_Densities , & ! Input CloudCoeff%n_IR_Frequencies , & ! Input CloudCoeff%n_IR_Radii , & ! Input + CloudCoeff%n_IR_Densities , & ! Input CloudCoeff%n_Temperatures , & ! Input - CloudCoeff%n_Densities , & ! Input CloudCoeff%n_Legendre_Terms , & ! Input CloudCoeff%n_Phase_Elements , & ! Input FileId , & ! Output @@ -760,20 +821,37 @@ FUNCTION CloudCoeff_netCDF_WriteFile( & ' - '//TRIM(NF90_STRERROR( NF90_Status )) CALL Write_Cleanup(); RETURN END IF - ! ...Reff_MW variable - NF90_Status = NF90_INQ_VARID( FileId,REFF_MW_VARNAME,VarId ) - IF ( NF90_Status /= NF90_NOERR ) THEN - msg = 'Error inquiring '//TRIM(Filename)//' for '//REFF_MW_VARNAME//& - ' variable ID - '//TRIM(NF90_STRERROR( NF90_Status )) - CALL Write_Cleanup(); RETURN - END IF - NF90_Status = NF90_PUT_VAR( FileId,VarID,CloudCoeff%Reff_MW ) - IF ( NF90_Status /= NF90_NOERR ) THEN - msg = 'Error writing '//REFF_MW_VARNAME//' to '//TRIM(Filename)//& - ' - '//TRIM(NF90_STRERROR( NF90_Status )) - CALL Write_Cleanup(); RETURN - END IF - ! ...Reff_IR variable + ! Determine whether to write Water_Content or Reff + IF (ALL(CloudCoeff%Water_Density_MW .GT. ZERO)) THEN + ! ...WC_MW variable + NF90_Status = NF90_INQ_VARID( FileId,WC_MW_VARNAME,VarId ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error inquiring '//TRIM(Filename)//' for '//WC_MW_VARNAME//& + ' variable ID - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Write_Cleanup(); RETURN + END IF + NF90_Status = NF90_PUT_VAR( FileId,VarID,CloudCoeff%Water_Density_MW ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error writing '//WC_MW_VARNAME//' to '//TRIM(Filename)//& + ' - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Write_Cleanup(); RETURN + END IF + ELSE + ! ...Reff_MW variable + NF90_Status = NF90_INQ_VARID( FileId,REFF_MW_VARNAME,VarId ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error inquiring '//TRIM(Filename)//' for '//REFF_MW_VARNAME//& + ' variable ID - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Write_Cleanup(); RETURN + END IF + NF90_Status = NF90_PUT_VAR( FileId,VarID,CloudCoeff%Reff_MW ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error writing '//REFF_MW_VARNAME//' to '//TRIM(Filename)//& + ' - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Write_Cleanup(); RETURN + END IF + ENDIF + ! ...Reff_IR variable NF90_Status = NF90_INQ_VARID( FileId,REFF_IR_VARNAME,VarId ) IF ( NF90_Status /= NF90_NOERR ) THEN msg = 'Error inquiring '//TRIM(Filename)//' for '//REFF_IR_VARNAME//& @@ -799,16 +877,16 @@ FUNCTION CloudCoeff_netCDF_WriteFile( & ' - '//TRIM(NF90_STRERROR( NF90_Status )) CALL Write_Cleanup(); RETURN END IF - ! ...Density variable - NF90_Status = NF90_INQ_VARID( FileId,DENSITY_VARNAME,VarId ) + ! ...MW Density variable + NF90_Status = NF90_INQ_VARID( FileId,MW_DENSITY_VARNAME,VarId ) IF ( NF90_Status /= NF90_NOERR ) THEN - msg = 'Error inquiring '//TRIM(Filename)//' for '//DENSITY_VARNAME//& + msg = 'Error inquiring '//TRIM(Filename)//' for '//MW_DENSITY_VARNAME//& ' variable ID - '//TRIM(NF90_STRERROR( NF90_Status )) CALL Write_Cleanup(); RETURN END IF - NF90_Status = NF90_PUT_VAR( FileId,VarID,CloudCoeff%Density ) + NF90_Status = NF90_PUT_VAR( FileId,VarID,CloudCoeff%Density_MW ) IF ( NF90_Status /= NF90_NOERR ) THEN - msg = 'Error writing '//DENSITY_VARNAME//' to '//TRIM(Filename)//& + msg = 'Error writing '//MW_DENSITY_VARNAME//' to '//TRIM(Filename)//& ' - '//TRIM(NF90_STRERROR( NF90_Status )) CALL Write_Cleanup(); RETURN END IF @@ -851,6 +929,19 @@ FUNCTION CloudCoeff_netCDF_WriteFile( & ' - '//TRIM(NF90_STRERROR( NF90_Status )) CALL Write_Cleanup(); RETURN END IF + ! ...kb_L_MW variable + NF90_Status = NF90_INQ_VARID( FileId,KB_L_MW_VARNAME,VarId ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error inquiring '//TRIM(Filename)//' for '//KB_L_MW_VARNAME//& + ' variable ID - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Write_Cleanup(); RETURN + END IF + NF90_Status = NF90_PUT_VAR( FileId,VarID,CloudCoeff%kb_L_MW ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error writing '//KB_L_MW_VARNAME//' to '//TRIM(Filename)//& + ' - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Write_Cleanup(); RETURN + END IF ! ...pcoeff_L_MW variable NF90_Status = NF90_INQ_VARID( FileId,PCOEFF_L_MW_VARNAME,VarId ) IF ( NF90_Status /= NF90_NOERR ) THEN @@ -903,6 +994,19 @@ FUNCTION CloudCoeff_netCDF_WriteFile( & ' - '//TRIM(NF90_STRERROR( NF90_Status )) CALL Write_Cleanup(); RETURN END IF + ! ...kb_S_MW variable + NF90_Status = NF90_INQ_VARID( FileId,KB_S_MW_VARNAME,VarId ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error inquiring '//TRIM(Filename)//' for '//KB_S_MW_VARNAME//& + ' variable ID - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Write_Cleanup(); RETURN + END IF + NF90_Status = NF90_PUT_VAR( FileId,VarID,CloudCoeff%kb_S_MW ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error writing '//KB_S_MW_VARNAME//' to '//TRIM(Filename)//& + ' - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Write_Cleanup(); RETURN + END IF ! ...pcoeff_S_MW variable NF90_Status = NF90_INQ_VARID( FileId,PCOEFF_S_MW_VARNAME,VarId ) IF ( NF90_Status /= NF90_NOERR ) THEN @@ -916,6 +1020,21 @@ FUNCTION CloudCoeff_netCDF_WriteFile( & ' - '//TRIM(NF90_STRERROR( NF90_Status )) CALL Write_Cleanup(); RETURN END IF + + ! ...IR Density variable + NF90_Status = NF90_INQ_VARID( FileId,IR_DENSITY_VARNAME,VarId ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error inquiring '//TRIM(Filename)//' for '//IR_DENSITY_VARNAME//& + ' variable ID - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Write_Cleanup(); RETURN + END IF + NF90_Status = NF90_PUT_VAR( FileId,VarID,CloudCoeff%Density_IR ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error writing '//IR_DENSITY_VARNAME//' to '//TRIM(Filename)//& + ' - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Write_Cleanup(); RETURN + END IF + ! ...ke_IR variable NF90_Status = NF90_INQ_VARID( FileId,KE_IR_VARNAME,VarId ) IF ( NF90_Status /= NF90_NOERR ) THEN @@ -955,6 +1074,19 @@ FUNCTION CloudCoeff_netCDF_WriteFile( & ' - '//TRIM(NF90_STRERROR( NF90_Status )) CALL Write_Cleanup(); RETURN END IF + ! ...kb_IR variable + NF90_Status = NF90_INQ_VARID( FileId,KB_IR_VARNAME,VarId ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error inquiring '//TRIM(Filename)//' for '//KB_IR_VARNAME//& + ' variable ID - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Write_Cleanup(); RETURN + END IF + NF90_Status = NF90_PUT_VAR( FileId,VarID,CloudCoeff%kb_IR ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error writing '//KB_IR_VARNAME//' to '//TRIM(Filename)//& + ' - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Write_Cleanup(); RETURN + END IF ! ...pcoeff_IR variable NF90_Status = NF90_INQ_VARID( FileId,PCOEFF_IR_VARNAME,VarId ) IF ( NF90_Status /= NF90_NOERR ) THEN @@ -1105,11 +1237,12 @@ FUNCTION CloudCoeff_netCDF_ReadFile( & INTEGER :: NF90_Status INTEGER :: FileId INTEGER :: n_MW_Frequencies - INTEGER :: n_MW_Radii + INTEGER :: n_MW_Radii + INTEGER :: n_MW_Densities INTEGER :: n_IR_Frequencies - INTEGER :: n_IR_Radii - INTEGER :: n_Temperatures - INTEGER :: n_Densities + INTEGER :: n_IR_Radii + INTEGER :: n_IR_Densities + INTEGER :: n_Temperatures INTEGER :: n_Legendre_Terms INTEGER :: n_Phase_Elements INTEGER :: VarId @@ -1133,10 +1266,11 @@ FUNCTION CloudCoeff_netCDF_ReadFile( & Filename, & n_MW_Frequencies = n_MW_Frequencies, & n_MW_Radii = n_MW_Radii , & + n_MW_Densities = n_MW_Densities , & n_IR_Frequencies = n_IR_Frequencies, & n_IR_Radii = n_IR_Radii , & + n_IR_Densities = n_IR_Densities , & n_Temperatures = n_Temperatures , & - n_Densities = n_Densities , & n_Legendre_Terms = n_Legendre_Terms, & n_Phase_Elements = n_Phase_Elements ) IF ( err_stat /= SUCCESS ) THEN @@ -1150,10 +1284,11 @@ FUNCTION CloudCoeff_netCDF_ReadFile( & CloudCoeff, & n_MW_Frequencies, & n_MW_Radii , & + n_MW_Densities , & n_IR_Frequencies, & n_IR_Radii , & + n_IR_Densities , & n_Temperatures , & - n_Densities , & n_Legendre_Terms, & n_Phase_Elements ) IF ( .NOT. CloudCoeff_Associated(CloudCoeff) ) THEN @@ -1219,19 +1354,42 @@ FUNCTION CloudCoeff_netCDF_ReadFile( & ' - '//TRIM(NF90_STRERROR( NF90_Status )) CALL Read_Cleanup(); RETURN END IF - ! ...Reff_MW variable - NF90_Status = NF90_INQ_VARID( FileId,REFF_MW_VARNAME,VarId ) - IF ( NF90_Status /= NF90_NOERR ) THEN - msg = 'Error inquiring '//TRIM(Filename)//' for '//REFF_MW_VARNAME//& - ' variable ID - '//TRIM(NF90_STRERROR( NF90_Status )) - CALL Read_Cleanup(); RETURN - END IF - NF90_Status = NF90_GET_VAR( FileId,VarID,CloudCoeff%Reff_MW ) - IF ( NF90_Status /= NF90_NOERR ) THEN - msg = 'Error reading '//REFF_MW_VARNAME//' from '//TRIM(Filename)//& - ' - '//TRIM(NF90_STRERROR( NF90_Status )) - CALL Read_Cleanup(); RETURN + + ! ...WC_MW variable - old CRTM CloudCoef are based on Reff but the new ones + ! use water content. Here we check to see whether the NetCDF file includes + ! the WC_MW variable or not, if not then will try to read Reff, otherwise + ! if WC_MW exist then will check to make sure that no error happended and read it + NF90_Status = NF90_INQ_VARID( FileId,WC_MW_VARNAME,VarId ) + IF ( NF90_Status .EQ. NF90_ENOTVAR ) THEN + ! ...Reff_MW variable + NF90_Status = NF90_INQ_VARID( FileId,REFF_MW_VARNAME,VarId ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error inquiring '//TRIM(Filename)//' for '//REFF_MW_VARNAME//& + ' variable ID - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Read_Cleanup(); RETURN + END IF + NF90_Status = NF90_GET_VAR( FileId,VarID,CloudCoeff%Reff_MW ) + CloudCoeff%Water_Density_MW = ZERO ! we set Water Content to zero if read Reff + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error reading '//REFF_MW_VARNAME//' from '//TRIM(Filename)//& + ' - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Read_Cleanup(); RETURN + END IF + ELSE + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error inquiring '//TRIM(Filename)//' for '//WC_MW_VARNAME//& + ' variable ID - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Read_Cleanup(); RETURN + END IF + NF90_Status = NF90_GET_VAR( FileId,VarID,CloudCoeff%Water_Density_MW ) + CloudCoeff%Reff_MW = ZERO ! we set Reff to zero if read water content + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error reading '//WC_MW_VARNAME//' from '//TRIM(Filename)//& + ' - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Read_Cleanup(); RETURN + END IF END IF + ! ...Reff_IR variable NF90_Status = NF90_INQ_VARID( FileId,REFF_IR_VARNAME,VarId ) IF ( NF90_Status /= NF90_NOERR ) THEN @@ -1258,16 +1416,23 @@ FUNCTION CloudCoeff_netCDF_ReadFile( & ' - '//TRIM(NF90_STRERROR( NF90_Status )) CALL Read_Cleanup(); RETURN END IF - ! ...Density variable - NF90_Status = NF90_INQ_VARID( FileId,DENSITY_VARNAME,VarId ) - IF ( NF90_Status /= NF90_NOERR ) THEN - msg = 'Error inquiring '//TRIM(Filename)//' for '//DENSITY_VARNAME//& + ! ...MW Density variable - old version may use Density instead of MW_Density + NF90_Status = NF90_INQ_VARID( FileId,MW_DENSITY_VARNAME,VarId ) + IF ( NF90_Status .EQ. NF90_ENOTVAR ) THEN + NF90_Status = NF90_INQ_VARID( FileId,'Density',VarId ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error inquiring '//TRIM(Filename)//' for '//'Density'//& + ' variable ID - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Read_Cleanup(); RETURN + END IF + ELSE IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error inquiring '//TRIM(Filename)//' for '//MW_DENSITY_VARNAME//& ' variable ID - '//TRIM(NF90_STRERROR( NF90_Status )) CALL Read_Cleanup(); RETURN END IF - NF90_Status = NF90_GET_VAR( FileId,VarID,CloudCoeff%Density ) + NF90_Status = NF90_GET_VAR( FileId,VarID,CloudCoeff%Density_MW ) IF ( NF90_Status /= NF90_NOERR ) THEN - msg = 'Error reading '//DENSITY_VARNAME//' from '//TRIM(Filename)//& + msg = 'Error reading '//MW_DENSITY_VARNAME//' from '//TRIM(Filename)//& ' - '//TRIM(NF90_STRERROR( NF90_Status )) CALL Read_Cleanup(); RETURN END IF @@ -1310,6 +1475,23 @@ FUNCTION CloudCoeff_netCDF_ReadFile( & ' - '//TRIM(NF90_STRERROR( NF90_Status )) CALL Read_Cleanup(); RETURN END IF + ! ...kb_L_MW variable + NF90_Status = NF90_INQ_VARID( FileId,KB_L_MW_VARNAME,VarId ) + ! Old versions of CloudCoeff may not have backscattering so ignore the error + IF ( NF90_Status .NE. NF90_ENOTVAR ) THEN + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error inquiring '//TRIM(Filename)//' for '//KB_L_MW_VARNAME//& + ' variable ID - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Read_Cleanup(); RETURN + END IF + NF90_Status = NF90_GET_VAR( FileId,VarID,CloudCoeff%kb_L_MW ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error reading '//KB_L_MW_VARNAME//' from '//TRIM(Filename)//& + ' - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Read_Cleanup(); RETURN + END IF + ENDIF + ! ...pcoeff_L_MW variable NF90_Status = NF90_INQ_VARID( FileId,PCOEFF_L_MW_VARNAME,VarId ) IF ( NF90_Status /= NF90_NOERR ) THEN @@ -1362,6 +1544,22 @@ FUNCTION CloudCoeff_netCDF_ReadFile( & ' - '//TRIM(NF90_STRERROR( NF90_Status )) CALL Read_Cleanup(); RETURN END IF + ! ...kb_S_MW variable + NF90_Status = NF90_INQ_VARID( FileId,KB_S_MW_VARNAME,VarId ) + ! Old versions of CloudCoeff may not have backscattering so ignore the error + IF ( NF90_Status .NE. NF90_ENOTVAR ) THEN + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error inquiring '//TRIM(Filename)//' for '//KB_S_MW_VARNAME//& + ' variable ID - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Read_Cleanup(); RETURN + END IF + NF90_Status = NF90_GET_VAR( FileId,VarID,CloudCoeff%kb_S_MW ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error reading '//KB_S_MW_VARNAME//' from '//TRIM(Filename)//& + ' - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Read_Cleanup(); RETURN + END IF + ENDIF ! ...pcoeff_S_MW variable NF90_Status = NF90_INQ_VARID( FileId,PCOEFF_S_MW_VARNAME,VarId ) IF ( NF90_Status /= NF90_NOERR ) THEN @@ -1375,7 +1573,38 @@ FUNCTION CloudCoeff_netCDF_ReadFile( & ' - '//TRIM(NF90_STRERROR( NF90_Status )) CALL Read_Cleanup(); RETURN END IF - ! ...ke_IR variable + + ! ...IR Density variable + NF90_Status = NF90_INQ_VARID( FileId,IR_DENSITY_VARNAME,VarId ) + ! Old version may still use Density instead of IR_Density + IF ( NF90_Status .EQ. NF90_ENOTVAR ) THEN + NF90_Status = NF90_INQ_VARID( FileId,'Density',VarId ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error inquiring '//TRIM(Filename)//' for '//'Density'//& + ' variable ID - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Read_Cleanup(); RETURN + END IF + NF90_Status = NF90_GET_VAR( FileId,VarID,CloudCoeff%Density_IR(2:) ) + CloudCoeff%Density_IR(1) = 100 + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error reading '//IR_DENSITY_VARNAME//' from '//TRIM(Filename)//& + ' - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Read_Cleanup(); RETURN + END IF + ELSE + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error inquiring '//TRIM(Filename)//' for '//IR_DENSITY_VARNAME//& + ' variable ID - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Read_Cleanup(); RETURN + END IF + NF90_Status = NF90_GET_VAR( FileId,VarID,CloudCoeff%Density_IR ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error reading '//IR_DENSITY_VARNAME//' from '//TRIM(Filename)//& + ' - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Read_Cleanup(); RETURN + END IF + END IF + ! ...ke_IR variable NF90_Status = NF90_INQ_VARID( FileId,KE_IR_VARNAME,VarId ) IF ( NF90_Status /= NF90_NOERR ) THEN msg = 'Error inquiring '//TRIM(Filename)//' for '//KE_IR_VARNAME//& @@ -1414,6 +1643,22 @@ FUNCTION CloudCoeff_netCDF_ReadFile( & ' - '//TRIM(NF90_STRERROR( NF90_Status )) CALL Read_Cleanup(); RETURN END IF + ! ...kb_IR variable + NF90_Status = NF90_INQ_VARID( FileId,KB_IR_VARNAME,VarId ) + ! Old versions of CloudCoeff may not have backscattering so ignore the error + IF ( NF90_Status .NE. NF90_ENOTVAR ) THEN + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error inquiring '//TRIM(Filename)//' for '//KB_IR_VARNAME//& + ' variable ID - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Read_Cleanup(); RETURN + END IF + NF90_Status = NF90_GET_VAR( FileId,VarID,CloudCoeff%kb_IR ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error reading '//KB_IR_VARNAME//' from '//TRIM(Filename)//& + ' - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Read_Cleanup(); RETURN + END IF + ENDIF ! ...pcoeff_IR variable NF90_Status = NF90_INQ_VARID( FileId,PCOEFF_IR_VARNAME,VarId ) IF ( NF90_Status /= NF90_NOERR ) THEN @@ -1712,10 +1957,11 @@ FUNCTION CreateFile( & Filename , & ! Input n_MW_Frequencies, & ! Input n_MW_Radii , & ! Input + n_MW_Densities , & ! Input n_IR_Frequencies, & ! Input n_IR_Radii , & ! Input + n_IR_Densities , & ! Input n_Temperatures , & ! Input - n_Densities , & ! Input n_Legendre_Terms, & ! Input n_Phase_Elements, & ! Input FileId , & ! Output @@ -1727,11 +1973,12 @@ FUNCTION CreateFile( & ! Arguments CHARACTER(*), INTENT(IN) :: Filename INTEGER , INTENT(IN) :: n_MW_Frequencies - INTEGER , INTENT(IN) :: n_MW_Radii + INTEGER , INTENT(IN) :: n_MW_Radii + INTEGER , INTENT(IN) :: n_MW_Densities INTEGER , INTENT(IN) :: n_IR_Frequencies - INTEGER , INTENT(IN) :: n_IR_Radii - INTEGER , INTENT(IN) :: n_Temperatures - INTEGER , INTENT(IN) :: n_Densities + INTEGER , INTENT(IN) :: n_IR_Radii + INTEGER , INTENT(IN) :: n_IR_Densities + INTEGER , INTENT(IN) :: n_Temperatures INTEGER , INTENT(IN) :: n_Legendre_Terms INTEGER , INTENT(IN) :: n_Phase_Elements INTEGER , INTENT(OUT) :: FileId @@ -1752,7 +1999,7 @@ FUNCTION CreateFile( & INTEGER :: n_IR_Frequencies_DimID INTEGER :: n_IR_Radii_DimID INTEGER :: n_Temperatures_DimID - INTEGER :: n_Densities_DimID + INTEGER :: n_MW_Densities_DimID INTEGER :: n_IR_Densities_DimID INTEGER :: n_Legendre_Terms_DimID INTEGER :: n_Phase_Elements_DimID @@ -1783,9 +2030,9 @@ FUNCTION CreateFile( & CALL Create_Cleanup(); RETURN END IF ! ...Number of radii for microwave data - NF90_Status = NF90_DEF_DIM( FileID,MW_REFF_DIMNAME,n_MW_Radii,n_MW_Radii_DimID ) + NF90_Status = NF90_DEF_DIM( FileID,MW_REFF_WC_DIMNAME,n_MW_Radii,n_MW_Radii_DimID ) IF ( NF90_Status /= NF90_NOERR ) THEN - msg = 'Error defining '//MW_REFF_DIMNAME//' dimension in '//& + msg = 'Error defining '//MW_REFF_WC_DIMNAME//' dimension in '//& TRIM(Filename)//' - '//TRIM(NF90_STRERROR( NF90_Status )) CALL Create_Cleanup(); RETURN END IF @@ -1811,15 +2058,15 @@ FUNCTION CreateFile( & CALL Create_Cleanup(); RETURN END IF ! ...Number of densities for microwave data - NF90_Status = NF90_DEF_DIM( FileID,DENSITY_DIMNAME,n_Densities,n_Densities_DimID ) + NF90_Status = NF90_DEF_DIM( FileID,MW_DENSITY_DIMNAME,n_MW_Densities,n_MW_Densities_DimID ) IF ( NF90_Status /= NF90_NOERR ) THEN - msg = 'Error defining '//DENSITY_DIMNAME//' dimension in '//& + msg = 'Error defining '//MW_DENSITY_DIMNAME//' dimension in '//& TRIM(Filename)//' - '//TRIM(NF90_STRERROR( NF90_Status )) CALL Create_Cleanup(); RETURN END IF ! ...Number of densities for infrared data ! ...Array indexing starts at 0, so +1 - NF90_Status = NF90_DEF_DIM( FileID,IR_DENSITY_DIMNAME,n_Densities+1,n_IR_Densities_DimID ) + NF90_Status = NF90_DEF_DIM( FileID,IR_DENSITY_DIMNAME,n_IR_Densities+1,n_IR_Densities_DimID ) IF ( NF90_Status /= NF90_NOERR ) THEN msg = 'Error defining '//IR_DENSITY_DIMNAME//' dimension in '//& TRIM(Filename)//' - '//TRIM(NF90_STRERROR( NF90_Status )) @@ -1894,6 +2141,27 @@ FUNCTION CreateFile( & msg = 'Error writing '//FREQUENCY_IR_VARNAME//' variable attributes to '//TRIM(Filename) CALL Create_Cleanup(); RETURN END IF + + ! ...WC_MW variable + NF90_Status = NF90_DEF_VAR( FileID, & + WC_MW_VARNAME, & + WC_MW_TYPE, & + dimIDs=(/n_MW_Radii_DimID/), & + varID=VarID ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error defining '//WC_MW_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 ,WC_MW_LONGNAME ) + Put_Status(2) = NF90_PUT_ATT( FileID,VarID,DESCRIPTION_ATTNAME,WC_MW_DESCRIPTION ) + Put_Status(3) = NF90_PUT_ATT( FileID,VarID,UNITS_ATTNAME ,WC_MW_UNITS ) + Put_Status(4) = NF90_PUT_ATT( FileID,VarID,FILLVALUE_ATTNAME ,WC_MW_FILLVALUE ) + IF ( ANY(Put_Status /= NF90_NOERR) ) THEN + msg = 'Error writing '//WC_MW_VARNAME//' variable attributes to '//TRIM(Filename) + CALL Create_Cleanup(); RETURN + END IF + ! ...Reff_MW variable NF90_Status = NF90_DEF_VAR( FileID, & REFF_MW_VARNAME, & @@ -1953,23 +2221,45 @@ FUNCTION CreateFile( & END IF ! ...Density variable NF90_Status = NF90_DEF_VAR( FileID, & - DENSITY_VARNAME, & + MW_DENSITY_VARNAME, & + DENSITY_TYPE, & + dimIDs=(/n_MW_Densities_DimID/), & + varID=VarID ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error defining '//MW_DENSITY_VARNAME//' variable in '//& + TRIM(Filename)//' - '//TRIM(NF90_STRERROR( NF90_Status )) + CALL Create_Cleanup(); RETURN + END IF + + NF90_Status = NF90_DEF_VAR( FileID, & + IR_DENSITY_VARNAME, & DENSITY_TYPE, & - dimIDs=(/n_Densities_DimID/), & + dimIDs=(/n_IR_Densities_DimID/), & varID=VarID ) IF ( NF90_Status /= NF90_NOERR ) THEN - msg = 'Error defining '//DENSITY_VARNAME//' variable in '//& + msg = 'Error defining '//IR_DENSITY_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 ,DENSITY_LONGNAME ) + + Put_Status(1) = NF90_PUT_ATT( FileID,VarID,LONGNAME_ATTNAME ,MW_DENSITY_LONGNAME ) + Put_Status(2) = NF90_PUT_ATT( FileID,VarID,DESCRIPTION_ATTNAME,DENSITY_DESCRIPTION ) + Put_Status(3) = NF90_PUT_ATT( FileID,VarID,UNITS_ATTNAME ,DENSITY_UNITS ) + Put_Status(4) = NF90_PUT_ATT( FileID,VarID,FILLVALUE_ATTNAME ,DENSITY_FILLVALUE ) + IF ( ANY(Put_Status /= NF90_NOERR) ) THEN + msg = 'Error writing '//MW_DENSITY_VARNAME//' variable attributes to '//TRIM(Filename) + CALL Create_Cleanup(); RETURN + END IF + + Put_Status(1) = NF90_PUT_ATT( FileID,VarID,LONGNAME_ATTNAME ,IR_DENSITY_LONGNAME ) Put_Status(2) = NF90_PUT_ATT( FileID,VarID,DESCRIPTION_ATTNAME,DENSITY_DESCRIPTION ) Put_Status(3) = NF90_PUT_ATT( FileID,VarID,UNITS_ATTNAME ,DENSITY_UNITS ) Put_Status(4) = NF90_PUT_ATT( FileID,VarID,FILLVALUE_ATTNAME ,DENSITY_FILLVALUE ) IF ( ANY(Put_Status /= NF90_NOERR) ) THEN - msg = 'Error writing '//DENSITY_VARNAME//' variable attributes to '//TRIM(Filename) + msg = 'Error writing '//IR_DENSITY_VARNAME//' variable attributes to '//TRIM(Filename) CALL Create_Cleanup(); RETURN END IF + ! ...ke_L_MW variable NF90_Status = NF90_DEF_VAR( FileID, & KE_L_MW_VARNAME, & @@ -2027,6 +2317,25 @@ FUNCTION CreateFile( & msg = 'Error writing '//G_L_MW_VARNAME//' variable attributes to '//TRIM(Filename) CALL Create_Cleanup(); RETURN END IF + ! ...kb_L_MW variable + NF90_Status = NF90_DEF_VAR( FileID, & + KB_L_MW_VARNAME, & + KB_L_MW_TYPE, & + dimIDs=(/n_MW_Frequencies_DimID, n_MW_Radii_DimID, n_Temperatures_DimID/), & + varID=VarID ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error defining '//KB_L_MW_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 ,KB_L_MW_LONGNAME ) + Put_Status(2) = NF90_PUT_ATT( FileID,VarID,DESCRIPTION_ATTNAME,KB_L_MW_DESCRIPTION ) + Put_Status(3) = NF90_PUT_ATT( FileID,VarID,UNITS_ATTNAME ,KB_L_MW_UNITS ) + Put_Status(4) = NF90_PUT_ATT( FileID,VarID,FILLVALUE_ATTNAME ,KB_L_MW_FILLVALUE ) + IF ( ANY(Put_Status /= NF90_NOERR) ) THEN + msg = 'Error writing '//KB_L_MW_VARNAME//' variable attributes to '//TRIM(Filename) + CALL Create_Cleanup(); RETURN + END IF ! ...pcoeff_L_MW variable NF90_Status = NF90_DEF_VAR( FileID, & PCOEFF_L_MW_VARNAME, & @@ -2051,7 +2360,7 @@ FUNCTION CreateFile( & NF90_Status = NF90_DEF_VAR( FileID, & KE_S_MW_VARNAME, & KE_S_MW_TYPE, & - dimIDs=(/n_MW_Frequencies_DimID, n_MW_Radii_DimID, n_Densities_DimID/), & + dimIDs=(/n_MW_Frequencies_DimID, n_MW_Radii_DimID, n_MW_Densities_DimID/), & varID=VarID ) IF ( NF90_Status /= NF90_NOERR ) THEN msg = 'Error defining '//KE_S_MW_VARNAME//' variable in '//& @@ -2070,7 +2379,7 @@ FUNCTION CreateFile( & NF90_Status = NF90_DEF_VAR( FileID, & W_S_MW_VARNAME, & W_S_MW_TYPE, & - dimIDs=(/n_MW_Frequencies_DimID, n_MW_Radii_DimID, n_Densities_DimID/), & + dimIDs=(/n_MW_Frequencies_DimID, n_MW_Radii_DimID, n_MW_Densities_DimID/), & varID=VarID ) IF ( NF90_Status /= NF90_NOERR ) THEN msg = 'Error defining '//W_S_MW_VARNAME//' variable in '//& @@ -2089,7 +2398,7 @@ FUNCTION CreateFile( & NF90_Status = NF90_DEF_VAR( FileID, & G_S_MW_VARNAME, & G_S_MW_TYPE, & - dimIDs=(/n_MW_Frequencies_DimID, n_MW_Radii_DimID, n_Densities_DimID/), & + dimIDs=(/n_MW_Frequencies_DimID, n_MW_Radii_DimID, n_MW_Densities_DimID/), & varID=VarID ) IF ( NF90_Status /= NF90_NOERR ) THEN msg = 'Error defining '//G_S_MW_VARNAME//' variable in '//& @@ -2104,11 +2413,30 @@ FUNCTION CreateFile( & msg = 'Error writing '//G_S_MW_VARNAME//' variable attributes to '//TRIM(Filename) CALL Create_Cleanup(); RETURN END IF + ! ...kb_S_MW variable + NF90_Status = NF90_DEF_VAR( FileID, & + KB_S_MW_VARNAME, & + KB_S_MW_TYPE, & + dimIDs=(/n_MW_Frequencies_DimID, n_MW_Radii_DimID, n_MW_Densities_DimID/), & + varID=VarID ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error defining '//KB_S_MW_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 ,KB_S_MW_LONGNAME ) + Put_Status(2) = NF90_PUT_ATT( FileID,VarID,DESCRIPTION_ATTNAME,KB_S_MW_DESCRIPTION ) + Put_Status(3) = NF90_PUT_ATT( FileID,VarID,UNITS_ATTNAME ,KB_S_MW_UNITS ) + Put_Status(4) = NF90_PUT_ATT( FileID,VarID,FILLVALUE_ATTNAME ,KB_S_MW_FILLVALUE ) + IF ( ANY(Put_Status /= NF90_NOERR) ) THEN + msg = 'Error writing '//KB_S_MW_VARNAME//' variable attributes to '//TRIM(Filename) + CALL Create_Cleanup(); RETURN + END IF ! ...pcoeff_S_MW variable NF90_Status = NF90_DEF_VAR( FileID, & PCOEFF_S_MW_VARNAME, & PCOEFF_S_MW_TYPE, & - dimIDs=(/n_MW_Frequencies_DimID, n_MW_Radii_DimID, n_Densities_DimID, & + dimIDs=(/n_MW_Frequencies_DimID, n_MW_Radii_DimID, n_MW_Densities_DimID, & n_Legendre_Terms_DimID, n_Phase_Elements_DimID/), & varID=VarID ) IF ( NF90_Status /= NF90_NOERR ) THEN @@ -2181,6 +2509,25 @@ FUNCTION CreateFile( & msg = 'Error writing '//G_IR_VARNAME//' variable attributes to '//TRIM(Filename) CALL Create_Cleanup(); RETURN END IF + ! ...kb_IR variable + NF90_Status = NF90_DEF_VAR( FileID, & + KB_IR_VARNAME, & + KB_IR_TYPE, & + dimIDs=(/n_IR_Frequencies_DimID, n_IR_Radii_DimID, n_IR_Densities_DimID/), & + varID=VarID ) + IF ( NF90_Status /= NF90_NOERR ) THEN + msg = 'Error defining '//KB_IR_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 ,KB_IR_LONGNAME ) + Put_Status(2) = NF90_PUT_ATT( FileID,VarID,DESCRIPTION_ATTNAME,KB_IR_DESCRIPTION ) + Put_Status(3) = NF90_PUT_ATT( FileID,VarID,UNITS_ATTNAME ,KB_IR_UNITS ) + Put_Status(4) = NF90_PUT_ATT( FileID,VarID,FILLVALUE_ATTNAME ,KB_IR_FILLVALUE ) + IF ( ANY(Put_Status /= NF90_NOERR) ) THEN + msg = 'Error writing '//KB_IR_VARNAME//' variable attributes to '//TRIM(Filename) + CALL Create_Cleanup(); RETURN + END IF ! ...pcoeff_IR variable NF90_Status = NF90_DEF_VAR( FileID, & PCOEFF_IR_VARNAME, & diff --git a/src/Coefficients/SpcCoeff/SpcCoeff_Binary_IO.f90 b/src/Coefficients/SpcCoeff/SpcCoeff_Binary_IO.f90 index 1a1a5d8..7ee67a9 100644 --- a/src/Coefficients/SpcCoeff/SpcCoeff_Binary_IO.f90 +++ b/src/Coefficients/SpcCoeff/SpcCoeff_Binary_IO.f90 @@ -9,6 +9,12 @@ ! Written by: Paul van Delst, 18-Mar-2002 ! paul.vandelst@noaa.gov ! +! Modified by: Isaac Moradi, 12-Nov-2021 +! Isaac.Moradi@NASA.GOV +! +! Included changes to determine whether the sensor +! is active or not +! MODULE SpcCoeff_Binary_IO @@ -32,6 +38,7 @@ MODULE SpcCoeff_Binary_IO USE NLTECoeff_Define , ONLY: NLTECoeff_Associated USE NLTECoeff_Binary_IO, ONLY: NLTECoeff_Binary_ReadFile , & NLTECoeff_Binary_WriteFile + USE SensorInfo_Parameters, ONLY: ACTIVE_SENSOR ! Disable implicit typing IMPLICIT NONE @@ -221,6 +228,12 @@ FUNCTION SpcCoeff_Binary_InquireFile( & CALL Inquire_Cleanup(); RETURN END IF + ! If the Sensor_Type us greater than ACTIVE_SENOR then set the Is_Active_Sensor flag + ! and subtract the numebr so that subsequently it can be defined as MW/IR/VIS/UV + IF (SpcCoeff%Sensor_Type .GT. ACTIVE_SENSOR) THEN + SpcCoeff%Is_Active_Sensor = .TRUE. + SpcCoeff%Sensor_Type = SpcCoeff%Sensor_Type - ACTIVE_SENSOR + END IF ! Close the file CLOSE( fid, IOSTAT=io_stat ) @@ -396,6 +409,14 @@ FUNCTION SpcCoeff_Binary_ReadFile( & WRITE( msg,'("Error reading sensor ids. IOSTAT = ",i0)' ) io_stat CALL Read_Cleanup(); RETURN END IF + + ! If the Sensor_Type us greater than ACTIVE_SENOR then set the Is_Active_Sensor flag + ! and subtract the numebr so that subsequently it can be defined as MW/IR/VIS/UV + IF (SpcCoeff%Sensor_Type .GT. ACTIVE_SENSOR) THEN + SpcCoeff%Is_Active_Sensor = .TRUE. + SpcCoeff%Sensor_Type = SpcCoeff%Sensor_Type - ACTIVE_SENSOR + END IF + ! ...Read the channel data IF( dummy%Version > 2 ) THEN ! Binary coefficient version 3 introduced for TROPICS instrument. @@ -588,7 +609,7 @@ END FUNCTION SpcCoeff_Binary_ReadFile FUNCTION SpcCoeff_Binary_WriteFile( & Filename, & ! Input - SpcCoeff, & ! Output + SpcCoeff, & ! Input Quiet , & ! Optional input Debug ) & ! Optional input (Debug output control) RESULT( err_stat ) @@ -609,7 +630,7 @@ FUNCTION SpcCoeff_Binary_WriteFile( & INTEGER :: fid INTEGER :: ac_present INTEGER :: nc_present - + INTEGER(long) :: Sensor_Type ! Setup err_stat = SUCCESS @@ -652,10 +673,19 @@ FUNCTION SpcCoeff_Binary_WriteFile( & WRITE( msg,'("Error writing data dimensions. IOSTAT = ",i0)' ) io_stat CALL Write_Cleanup(); RETURN END IF + + ! If it Is_Active_Sensor then add ACTIVE_SENOR to Sensor_Type + IF (SpcCoeff%Is_Active_Sensor) THEN + Sensor_Type = SpcCoeff%Sensor_Type + ACTIVE_SENSOR + ELSE + Sensor_Type = SpcCoeff%Sensor_Type + END IF + + ! ...Write the sensor info WRITE( fid, IOSTAT=io_stat ) & SpcCoeff%Sensor_Id , & - SpcCoeff%Sensor_Type , & + Sensor_Type , & SpcCoeff%WMO_Satellite_Id, & SpcCoeff%WMO_Sensor_Id IF ( io_stat /= 0 ) THEN diff --git a/src/Coefficients/SpcCoeff/SpcCoeff_Define.f90 b/src/Coefficients/SpcCoeff/SpcCoeff_Define.f90 index a46fb5b..1e504bd 100644 --- a/src/Coefficients/SpcCoeff/SpcCoeff_Define.f90 +++ b/src/Coefficients/SpcCoeff/SpcCoeff_Define.f90 @@ -17,6 +17,11 @@ ! Patrick Stegmann 2021-01-22 Added SpcCoeff_type%PolAngle for the TROPICS ! instrument polarization scheme in SfcOptics. ! +! Isaac Moradi 2021-11-12 Isaac.Moradi@nasa.gov +! Included changes to determine whether the sensor +! is active or not +! + MODULE SpcCoeff_Define ! ----------------- @@ -166,6 +171,7 @@ MODULE SpcCoeff_Define ! Sensor info CHARACTER(SL) :: Sensor_Id = '' INTEGER(Long) :: Sensor_Type = INVALID_SENSOR + LOGICAL :: Is_Active_Sensor = .FALSE. INTEGER(Long) :: WMO_Satellite_ID = INVALID_WMO_SATELLITE_ID INTEGER(Long) :: WMO_Sensor_ID = INVALID_WMO_SENSOR_ID ! Channel data arrays @@ -270,6 +276,7 @@ ELEMENTAL SUBROUTINE SpcCoeff_Destroy( SpcCoeff ) SpcCoeff%WMO_Satellite_ID = INVALID_WMO_SATELLITE_ID SpcCoeff%WMO_Sensor_ID = INVALID_WMO_SENSOR_ID SpcCoeff%Sensor_Type = INVALID_SENSOR + SpcCoeff%Is_Active_Sensor = .FALSE. END SUBROUTINE SpcCoeff_Destroy @@ -392,9 +399,14 @@ SUBROUTINE SpcCoeff_Inspect( SpcCoeff ) WRITE(*,'(3x,"Sensor_Id :",1x,a )') TRIM(SpcCoeff%Sensor_Id) WRITE(*,'(3x,"WMO_Satellite_ID :",1x,i0)') SpcCoeff%WMO_Satellite_ID WRITE(*,'(3x,"WMO_Sensor_ID :",1x,i0)') SpcCoeff%WMO_Sensor_ID + IF ( SpcCoeff%Is_Active_Sensor ) THEN + WRITE(*,'(1x,"Active Sensor")') + ENDIF WRITE(*,'(3x,"Sensor_Type :",1x,a )') TRIM(SENSOR_TYPE_NAME(SpcCoeff%Sensor_Type)) WRITE(*,'(3x,"Sensor_Channel :")') WRITE(*,'(10(1x,i5,:))') SpcCoeff%Sensor_Channel + + ! Data arrays IF ( SpcCoeff_IsMicrowaveSensor(SpcCoeff) ) THEN WRITE(*,'(3x,"Polarization :")') @@ -664,7 +676,8 @@ SUBROUTINE SpcCoeff_Subset( & ! ...First assign some scalars SC_Subset%Version = SpcCoeff%Version SC_Subset%Sensor_Id = SpcCoeff%Sensor_Id - SC_Subset%Sensor_Type = SpcCoeff%Sensor_Type + SC_Subset%Sensor_Type = SpcCoeff%Sensor_Type + SC_Subset%Is_Active_Sensor = SpcCoeff%Is_Active_Sensor SC_Subset%WMO_Satellite_ID = SpcCoeff%WMO_Satellite_ID SC_Subset%WMO_Sensor_ID = SpcCoeff%WMO_Sensor_ID ! ...and now extract the subset @@ -758,11 +771,11 @@ SUBROUTINE SpcCoeff_Concat( & ! ...Check non-channel dimensions and ids DO j = 1, n_valid i = valid_index(j) - IF ( SC_Array(i)%Sensor_Type /= SC_Array(valid_index(1))%Sensor_Type .OR. & - SC_Array(i)%WMO_Satellite_ID /= SC_Array(valid_index(1))%WMO_Satellite_ID .OR. & - SC_Array(i)%WMO_Sensor_ID /= SC_Array(valid_index(1))%WMO_Sensor_ID ) THEN - RETURN - END IF + IF ( SC_Array(i)%Sensor_Type /= SC_Array(valid_index(1))%Sensor_Type ) RETURN + IF ( SC_Array(i)%Is_Active_Sensor .NEQV. SC_Array(valid_index(1))%Is_Active_Sensor ) RETURN + IF ( SC_Array(i)%WMO_Satellite_ID /= SC_Array(valid_index(1))%WMO_Satellite_ID ) RETURN + IF ( SC_Array(i)%WMO_Sensor_ID /= SC_Array(valid_index(1))%WMO_Sensor_ID ) RETURN + END DO @@ -783,7 +796,8 @@ SUBROUTINE SpcCoeff_Concat( & ELSE SpcCoeff%Sensor_Id = SC_Array(valid_index(1))%Sensor_Id END IF - SpcCoeff%Sensor_Type = SC_Array(valid_index(1))%Sensor_Type + SpcCoeff%Sensor_Type = SC_Array(valid_index(1))%Sensor_Type + SpcCoeff%Is_Active_Sensor = SC_Array(valid_index(1))%Is_Active_Sensor SpcCoeff%WMO_Satellite_ID = SC_Array(valid_index(1))%WMO_Satellite_ID SpcCoeff%WMO_Sensor_ID = SC_Array(valid_index(1))%WMO_Sensor_ID ! ...and now concatenate the channel data @@ -1419,7 +1433,6 @@ ELEMENTAL SUBROUTINE SpcCoeff_SetUltravioletSensor( SpcCoeff ) CALL SpcCoeff_SetSensor(SpcCoeff, ULTRAVIOLET_SENSOR) END SUBROUTINE SpcCoeff_SetUltravioletSensor - !-------------------------------------------------------------------------------- !:sdoc+: ! @@ -1445,6 +1458,7 @@ END SUBROUTINE SpcCoeff_SetUltravioletSensor ELEMENTAL SUBROUTINE SpcCoeff_ClearSensor(SpcCoeff) TYPE(SpcCoeff_type), INTENT(IN OUT) :: SpcCoeff SpcCoeff%Sensor_Type = INVALID_SENSOR + SpcCoeff%Is_Active_Sensor = .FALSE. END SUBROUTINE SpcCoeff_ClearSensor @@ -1510,7 +1524,8 @@ ELEMENTAL FUNCTION SpcCoeff_Equal( x, y ) RESULT( is_equal ) IF ( (x%Sensor_Id /= y%Sensor_Id ) .OR. & (x%WMO_Satellite_ID /= y%WMO_Satellite_ID) .OR. & (x%WMO_Sensor_ID /= y%WMO_Sensor_ID ) .OR. & - (x%Sensor_Type /= y%Sensor_Type ) ) RETURN + (x%Sensor_Type /= y%Sensor_Type ) .OR. & + (x%Is_Active_Sensor .NEQV. y%Is_Active_Sensor )) RETURN ! ...Structures IF ( ACCoeff_Associated( x%AC ) .NEQV. ACCoeff_Associated( y%AC ) ) RETURN IF ( ACCoeff_Associated( x%AC ) .AND. ACCoeff_Associated( y%AC ) ) THEN diff --git a/src/Coefficients/SpcCoeff/SpcCoeff_netCDF_IO.f90 b/src/Coefficients/SpcCoeff/SpcCoeff_netCDF_IO.f90 index 536fe6a..6730b1e 100644 --- a/src/Coefficients/SpcCoeff/SpcCoeff_netCDF_IO.f90 +++ b/src/Coefficients/SpcCoeff/SpcCoeff_netCDF_IO.f90 @@ -9,6 +9,12 @@ ! Written by: Paul van Delst, 17-Dec-2002 ! paul.vandelst@noaa.gov ! +! Modified by: Isaac Moradi, 12-Nov-2021 +! Isaac.Moradi@NASA.GOV +! +! Included changes to determine whether the sensor +! is active or not +! MODULE SpcCoeff_netCDF_IO @@ -27,7 +33,8 @@ MODULE SpcCoeff_netCDF_IO SpcCoeff_Inspect , & SpcCoeff_ValidRelease , & SpcCoeff_Info - + USE SensorInfo_Parameters, ONLY: ACTIVE_SENSOR + USE netcdf ! Disable implicit typing IMPLICIT NONE @@ -503,6 +510,7 @@ FUNCTION SpcCoeff_netCDF_WriteFile( & INTEGER :: nf90_status INTEGER :: fileid INTEGER :: varid + INTEGER(long) :: Sensor_Type ! Set up err_stat = SUCCESS @@ -550,7 +558,14 @@ FUNCTION SpcCoeff_netCDF_WriteFile( & ' variable ID - '//TRIM(NF90_STRERROR( NF90_Status )) CALL Write_Cleanup(); RETURN END IF - NF90_Status = NF90_PUT_VAR( FileId,VarID,SpcCoeff%Sensor_Type ) + + ! If it Is_Active_Sensor then add ACTIVE_SENOR to Sensor_Type + IF (SpcCoeff%Is_Active_Sensor) THEN + Sensor_Type = SpcCoeff%Sensor_Type + ACTIVE_SENSOR + ELSE + Sensor_Type = SpcCoeff%Sensor_Type + END IF + NF90_Status = NF90_PUT_VAR( FileId,VarID,Sensor_Type ) IF ( NF90_Status /= NF90_NOERR ) THEN msg = 'Error writing '//SENSOR_TYPE_VARNAME//' to '//TRIM(Filename)//& ' - '//TRIM(NF90_STRERROR( NF90_Status )) @@ -934,6 +949,13 @@ FUNCTION SpcCoeff_netCDF_ReadFile( & ' - '//TRIM(NF90_STRERROR( nf90_status )) CALL Read_Cleanup(); RETURN END IF + ! If the Sensor_Type is greater than ACTIVE_SENOR then set the Is_Active_Sensor flag + ! and subtract the numebr so that subsequently it can be defined as MW/IR/VIS/UV + IF (SpcCoeff%Sensor_Type .GT. ACTIVE_SENSOR) THEN + SpcCoeff%Is_Active_Sensor = .TRUE. + SpcCoeff%Sensor_Type = SpcCoeff%Sensor_Type - ACTIVE_SENSOR + END IF + ! ...Sensor_Channel variable nf90_status = NF90_INQ_VARID( fileid,SENSOR_CHANNEL_VARNAME,varid ) IF ( nf90_status /= NF90_NOERR ) THEN diff --git a/src/InstrumentInfo/SensorInfo/SensorInfo_Parameters.f90 b/src/InstrumentInfo/SensorInfo/SensorInfo_Parameters.f90 index 2a964a0..94e1167 100644 --- a/src/InstrumentInfo/SensorInfo/SensorInfo_Parameters.f90 +++ b/src/InstrumentInfo/SensorInfo/SensorInfo_Parameters.f90 @@ -11,7 +11,7 @@ ! Date: Author: Description: ! ===== ======= ============ ! 2021-08-31 Patrick Stegmann Added PRA_POLARIZATION. -! +! 2021-11-11 Isaac Moradi Added ACTIVE_SENSOR ! MODULE SensorInfo_Parameters @@ -39,6 +39,7 @@ MODULE SensorInfo_Parameters PUBLIC :: INFRARED_SENSOR PUBLIC :: VISIBLE_SENSOR PUBLIC :: ULTRAVIOLET_SENSOR + PUBLIC :: ACTIVE_SENSOR PUBLIC :: SENSOR_TYPE_NAME ! Allowable polarisation type values and names PUBLIC :: N_POLARIZATION_TYPES @@ -75,6 +76,10 @@ MODULE SensorInfo_Parameters INTEGER, PARAMETER :: INFRARED_SENSOR = 2 INTEGER, PARAMETER :: VISIBLE_SENSOR = 3 INTEGER, PARAMETER :: ULTRAVIOLET_SENSOR = 4 + ! The number assigned to Active_Sensor should always be the largest + ! in the group (all others, MW, IR, VIS, UV should be assigned a smaller + ! Number + INTEGER, PARAMETER :: ACTIVE_SENSOR = 100 CHARACTER(*), PARAMETER, DIMENSION( 0:N_SENSOR_TYPES ) :: & SENSOR_TYPE_NAME = (/ 'Invalid ', & 'Microwave ', & diff --git a/src/RTSolution/CRTM_Active_Sensor.f90 b/src/RTSolution/CRTM_Active_Sensor.f90 new file mode 100644 index 0000000..fdd7fc3 --- /dev/null +++ b/src/RTSolution/CRTM_Active_Sensor.f90 @@ -0,0 +1,766 @@ +! +! CRTM_Active_Sensor +! +! Module containing the active sensor routines. +! +! +! CREATION HISTORY: +! Written by: Isaac Moradi - NASA GSFC March 10, 2022 +! Isaac.Moradi@NASA.GOV +! + +MODULE CRTM_Active_Sensor + + ! ----------------- + ! Environment setup + ! ----------------- + ! Module use statements + USE Type_Kinds, ONLY: FP + USE CRTM_Parameters, ONLY: ZERO, ONE, TWO, TEN, ONE_THOUSAND, MISSING_REFL, EPSILON_FP + USE CRTM_SpcCoeff, ONLY: SC, & + SpcCoeff_IsMicrowaveSensor , & + SpcCoeff_IsInfraredSensor , & + SpcCoeff_IsVisibleSensor , & + SpcCoeff_IsUltravioletSensor + USE CRTM_Atmosphere_Define, ONLY: CRTM_Atmosphere_type, & + H2O_ID + USE CRTM_AtmOptics_Define, ONLY: CRTM_AtmOptics_type + USE CRTM_RTSolution_Define, ONLY: CRTM_RTSolution_type + USE Spectral_Units_Conversion, ONLY: GHz_to_inverse_cm + USE Fundamental_Constants, ONLY: PI + USE ODPS_CoordinateMapping, ONLY: Geopotential_Height + USE CRTM_GeometryInfo_Define, ONLY: CRTM_GeometryInfo_type + + ! Disable all implicit typing + IMPLICIT NONE + + + ! ------------ + ! Visibilities + ! ------------ + PRIVATE + PUBLIC :: CRTM_Compute_Reflectivity + PUBLIC :: CRTM_Compute_Reflectivity_TL + PUBLIC :: CRTM_Compute_Reflectivity_AD + PUBLIC :: Calculate_Height + PUBLIC :: Calculate_Cloud_Water_Density + + ! ---------- + ! Parameters + ! ---------- + REAL(fp), PARAMETER :: POINT_01 = 0.01_fp + REAL(fp), PARAMETER :: Kw_2_fixed = 0.93_fp + ! 1.0d818 converts from m^3 to mm^6/m^3 (standard radar reflectivity units) + REAL(fp), PARAMETER :: M6_MM6 = 1.0d18 + REAL(fp), PARAMETER :: REFLECTIVITY_THRESHOLD = TINY(REAL(fp)) +CONTAINS + +!-------------------------------------------------------------------------------- +! +! NAME: +! Calculate_Height +! +! PURPOSE: +! Subroutine to calculate the height usig atmospheric input profiles +! +! CALLING SEQUENCE: +! Height = Calculate_Height(Atm) +! +! INPUT ARGUMENTS: +! +! Atm: Structure containing the atmospheric state data. +! UNITS: N/A +! TYPE: CRTM_Atmosphere_type +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN) +! OUTPUT ARGUMENTS: +! Height: Array containing height +! UNITS: km +! TYPE: REAL +! DIMENSION: Array +! +!-------------------------------------------------------------------------------- + +Function Calculate_Height(Atm) RESULT (Height) + + TYPE(CRTM_Atmosphere_type), INTENT(IN) :: Atm + REAL(fp) :: Height(0:Atm%n_Layers) + + INTEGER :: j, H2O_idx + + !** locate the WV absorber ID + H2O_idx = 1 + DO j = 1,Atm%n_Absorbers + IF (Atm%Absorber_ID(j) == H2O_ID) H2O_idx = j + END DO + ! Calculate the geometric heights of the pressure levels in km + CALL Geopotential_Height(Atm%Level_Pressure , & ! Input + Atm%Temperature , & ! Input + Atm%Absorber(:, H2O_idx), & ! Input + ZERO , & ! Input - surface height + Height ) ! Output in km + +END FUNCTION Calculate_Height + +!-------------------------------------------------------------------------------- +! +! NAME: +! Calculate_Cloud_Water_Density +! +! PURPOSE: +! Subroutine to calculate cloud water density (mass/volume) and also height if not set yet +! +! CALLING SEQUENCE: +! CALL Calculate_Cloud_Water_Density(Atm, GeometryInfo) +! +! INPUT ARGUMENTS: +! +! Atm: Structure containing the atmospheric state data. +! UNITS: N/A +! TYPE: CRTM_Atmosphere_type +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN/OUT) +! +! GeometryInfo: Structure containing the view geometry data. +! UNITS: N/A +! TYPE: CRTM_GeometryInfo_type +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN) +! +!-------------------------------------------------------------------------------- + +SUBROUTINE Calculate_Cloud_Water_Density(Atm, & + GeometryInfo) + TYPE(CRTM_Atmosphere_type), INTENT(IN OUT) :: Atm + TYPE(CRTM_GeometryInfo_type), OPTIONAL, INTENT(IN) :: GeometryInfo + INTEGER :: n_Layers + REAL(fp) :: Height(0:Atm%n_Layers), dZ_m(Atm%n_Layers) + Integer :: n + + n_Layers = Atm%n_Layers + + ! Calculate heights if hasn't been set already + IF (ALL(Atm%Height .LT. EPSILON_FP)) THEN + Atm%Height = Calculate_Height(Atm) + END IF + + dZ_m = (Atm%Height(0:n_Layers-1) - Atm%Height(1:n_Layers)) * ONE_THOUSAND + IF (PRESENT(GeometryInfo)) THEN + dZ_m = dZ_m / GeometryInfo%Cosine_Sensor_Zenith + ENDIF + + DO n = 1, Atm%n_Clouds + Atm%Cloud(n)%Water_Density = Atm%Cloud(n)%Water_Content / dZ_m + END DO + +END SUBROUTINE Calculate_Cloud_Water_Density + +!-------------------------------------------------------------------------------- +! +! NAME: +! Water_Permittivity_Turner_2016 +! +! PURPOSE: +! Function to calculate water permittivity using Turnet et al. 2016 Method +! +! CALLING SEQUENCE: +! CALL Water_Permittivity_Turner_2016(freq_Hz, & ! Input +! temp_K) ! Input +! RESULT(perm) ! Output +! +! INPUT ARGUMENTS: +! +! freq_Hz: Scalar representing frequency in Hz. +! UNITS: Hz +! TYPE: REAL(fp) +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN) +! +! temp_K: Array representing temperature in Kelvin. +! UNITS: Kelvin +! TYPE: REAL(fp) +! DIMENSION: 1-D Array +! ATTRIBUTES: INTENT(IN) +! +! OOUTUT ARGUMENTS: +! +! perm: Array representing water permittivity in a complex form of (real, imaginary). +! UNITS: N/A +! TYPE: REAL(fp) +! DIMENSION: 1-D Complex Array +! +!-------------------------------------------------------------------------------- + +FUNCTION Water_Permittivity_Turner_2016(freq_Hz, temp_K) RESULT(perm) + + REAL(fp), INTENT(IN) :: freq_Hz, temp_K(:) + REAL(fp), DIMENSION(SIZE(temp_K)) :: perm_re, perm_im + COMPLEX :: perm(SIZE(temp_K)) + + REAL(fp) :: a1, a2, b1, b2, c1, c2, d1, d2 + REAL(fp) :: e0, e1, e2, e3, tc + REAL(fp), DIMENSION(SIZE(temp_K)) :: delta1, delta2, tau1, tau2 + REAL(fp), DIMENSION(SIZE(temp_K)) :: term11, term12, denom1, denom2 + REAL(fp), DIMENSION(SIZE(temp_K)) :: term21, term22, temp_c, eps_s + + temp_c = temp_k - 273.15_fp + + IF (freq_Hz .GT. 500.d9) THEN + STOP + END IF + + a1 = 8.111E+1 + a2 = 2.025E+0 + + b1 = 4.434E-3 + b2 = 1.073E-2 + + c1 = 1.302E-13 + c2 = 1.012E-14 + + d1 = 6.627E+2 + d2 = 6.089E+2 + + tc = 133.1383_fp + + e0 = 87.9144_fp + e1 = 0.404399_fp + e2 = 9.58726d-4 + e3 = -1.32802d-6 + + ! static dielectric constant + eps_s = e0 + e1 * temp_c + e2 * (temp_c**TWO) + e3 * (temp_c**3.0_fp) + + delta1 = a1 * EXP(-b1 * temp_c) + delta2 = a2 * EXP(-b2 * temp_c) + + tau1 = c1 * EXP(d1 / (temp_c + tc)) + tau2 = c2 * EXP(d2 / (temp_c + tc)) + + denom1 = ONE + (TWO * PI * freq_Hz * tau1)**TWO + denom2 = ONE + (TWO * PI * freq_Hz * tau2)**TWO + + term11 = ((tau1**TWO) * delta1) / denom1 + term12 = ((tau2**TWO) * delta2) / denom2 + + term21 = (tau1 * delta1) / denom1 + term22 = (tau2 * delta2) / denom2 + + perm_re = eps_s - ((TWO * PI * freq_Hz)**TWO) * (term11 + term12) + perm_im = (TWO * PI * freq_Hz) * (term21 + term22) + + perm = cmplx(perm_re, perm_im, FP) + +END FUNCTION Water_Permittivity_Turner_2016 + +!-------------------------------------------------------------------------------- +! +! NAME: +! CRTM_Compute_Reflectivity +! +! PURPOSE: +! Subroutine to calculate the reflectivity for active sensors +! +! CALLING SEQUENCE: +! CALL CRTM_Compute_Reflectivity(Atm , & ! Input +! AtmOptics , & ! Input +! GeometryInfo , & ! Input +! SensorIndex , & ! Input +! ChannelIndex, & ! Input +! RTSolution ) ! Input/Output +! +! INPUT ARGUMENTS: +! +! Atm: Structure containing the atmospheric state data. +! UNITS: N/A +! TYPE: CRTM_Atmosphere_type +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN) +! +! AtmOptics: Structure containing the combined atmospheric +! optical properties for gaseous absorption, clouds, +! and aerosols. +! UNITS: N/A +! TYPE: CRTM_AtmOptics_type +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN) +! +! GeometryInfo: Structure containing the view geometry data. +! UNITS: N/A +! TYPE: CRTM_GeometryInfo_type +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN) +! +! SensorIndex: Sensor index id. This is a unique index associated +! with a (supported) sensor used to access the +! shared coefficient data for a particular sensor. +! See the ChannelIndex argument. +! UNITS: N/A +! TYPE: INTEGER +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN) +! +! ChannelIndex: Channel index id. This is a unique index associated +! with a (supported) sensor channel used to access the +! shared coefficient data for a particular sensor's +! channel. +! See the SensorIndex argument. +! UNITS: N/A +! TYPE: INTEGER +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN) +! +! OUTPUT ARGUMENTS: +! RTSolution: Structure containing the soluition to the RT equation +! for the given inputs. +! UNITS: N/A +! TYPE: CRTM_RTSolution_type +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN OUT) +! +!-------------------------------------------------------------------------------- + + SUBROUTINE CRTM_Compute_Reflectivity(Atm , & ! Input + AtmOptics , & ! Input + GeometryInfo , & ! Input + SensorIndex , & ! Input + ChannelIndex, & ! Input + RTSolution ) ! Input/Output + ! Arguments + TYPE(CRTM_Atmosphere_type), INTENT(IN) :: Atm + TYPE(CRTM_GeometryInfo_type), INTENT(IN) :: GeometryInfo + INTEGER , INTENT(IN) :: SensorIndex + INTEGER , INTENT(IN) :: ChannelIndex + TYPE(CRTM_AtmOptics_type) , INTENT(IN) :: AtmOptics + TYPE(CRTM_RTSolution_type), INTENT(IN OUT) :: RTSolution + + REAL(fp) :: Frequency, Wavenumber, Wavelength_m + REAL(fp) :: Reflectivity(AtmOptics%n_Layers) + REAL(fp) :: Reflectivity_Attenuated(AtmOptics%n_Layers) + REAL(fp) :: Transmittance(AtmOptics%n_Layers) + REAL(fp) :: P1(AtmOptics%n_Layers) + REAL(fp) :: Height(0:AtmOptics%n_Layers), dZ_m(AtmOptics%n_Layers) , Temp_K(AtmOptics%n_Layers) + REAL(fp), DIMENSION(AtmOptics%n_Layers) :: Kw_2, perm_re, perm_im + COMPLEX :: perm(AtmOptics%n_Layers), kw(AtmOptics%n_Layers) + INTEGER :: k + + ! Calculate heights if hasn't been set already + IF (ALL(Atm%Height .LT. EPSILON_FP)) THEN + Height = Calculate_Height(Atm) + ELSE + Height = Atm%Height + ENDIF + dZ_m = (Atm%Height(0:Atm%n_Layers-1) - Atm%Height(1:Atm%n_Layers)) * ONE_THOUSAND + dZ_m = dZ_m / GeometryInfo%Cosine_Sensor_Zenith + + IF ( SpcCoeff_IsMicrowaveSensor(SC(SensorIndex)) ) THEN + Frequency = SC(SensorIndex)%Frequency(ChannelIndex) ! GHz + Wavelength_m = POINT_01 / GHz_to_Inverse_cm( Frequency ) + ELSE IF( SpcCoeff_IsInfraredSensor(SC(SensorIndex)) ) THEN + Wavenumber = SC(SensorIndex)%Wavenumber(ChannelIndex) ! 1/cm + Wavelength_m = POINT_01 / Wavenumber + END IF + + Temp_K = 273.15_fp + perm = Water_Permittivity_Turner_2016(Frequency * 1.0d9, & ! Input + Temp_K) ! Input + + perm_re = REAL(REAL(perm)) ! Double REAL is required to avoud issues with GNU Fortran + perm_im = REAL(AIMAG(perm)) + ! perm = cmplx(perm_re, perm_im, FP) + kw = (perm - ONE )/(perm + TWO) + Kw_2 = ABS(kw)**TWO + + P1 = (M6_MM6 * Wavelength_m**4.0_fp) / (PI**5.0_fp * Kw_2) + P1 = P1 / dZ_m ! dZ_m to convert water_content to m/v or cloud water density + ! Calculate transmittance from top to layer k + DO k = 1, AtmOptics%n_layers + Transmittance(k) = EXP(-TWO * SUM(AtmOptics%optical_depth(1:k))) + END DO + + Reflectivity = P1 * (AtmOptics%Backscat_Coefficient) ! mm^6 m^-3 + Reflectivity_Attenuated = P1 * Transmittance * (AtmOptics%Backscat_Coefficient) ! mm^6 m^-3 + + ! Convert the unit to dBz + WHERE (Reflectivity .GT. REFLECTIVITY_THRESHOLD) + RTSolution%Reflectivity = TEN * LOG10(Reflectivity) ! [dBZ] + ELSE WHERE + RTSolution%Reflectivity = MISSING_REFL + END WHERE + + ! Convert the unit to dBz + ! Note that Reflectivity can be greater than zero but Reflectivity_Attenuated + ! can be still zero if Transmittance is zero + WHERE (Reflectivity_Attenuated .GT. REFLECTIVITY_THRESHOLD) + RTSolution%Reflectivity_Attenuated = TEN * LOG10(Reflectivity_Attenuated) + ELSE WHERE + RTSolution%Reflectivity_Attenuated = MISSING_REFL + END WHERE + + END SUBROUTINE CRTM_Compute_Reflectivity + + +!-------------------------------------------------------------------------------- +! +! NAME: +! CRTM_Compute_Reflectivity_TL +! +! PURPOSE: +! Subroutine to calculate the tangent-linear of reflectivity for active sensors. +! +! CALLING SEQUENCE: +! CALL CRTM_Compute_Reflectivity_TL(Atm, & ! Input +! AtmOptics , & ! Input +! AtmOptics_TL , & ! Input +! GeometryInfo , & ! Input +! SensorIndex , & ! Input +! ChannelIndex, & ! Input +! RTSolution_TL ) ! Input/Output +! +! INPUT ARGUMENTS: +! INPUT ARGUMENTS: +! Atm: Structure containing the atmospheric state data. +! UNITS: N/A +! TYPE: CRTM_Atmosphere_type +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN) +! +! AtmOptics: Structure containing the combined atmospheric +! optical properties for gaseous absorption, clouds, +! and aerosols. +! UNITS: N/A +! TYPE: CRTM_AtmOptics_type +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN) +! +! AtmOptics_TL: Structure containing the tangent-linear atmospheric +! optical properties. +! UNITS: N/A +! TYPE: CRTM_AtmOptics_type +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN) +! +! GeometryInfo: Structure containing the view geometry data. +! UNITS: N/A +! TYPE: CRTM_GeometryInfo_type +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN) +! +! SensorIndex: Sensor index id. This is a unique index associated +! with a (supported) sensor used to access the +! shared coefficient data for a particular sensor. +! See the ChannelIndex argument. +! UNITS: N/A +! TYPE: INTEGER +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN) +! +! ChannelIndex: Channel index id. This is a unique index associated +! with a (supported) sensor channel used to access the +! shared coefficient data for a particular sensor's +! channel. +! See the SensorIndex argument. +! UNITS: N/A +! TYPE: INTEGER +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN) +! +! OUTPUT ARGUMENTS: +! RTSolution_TL: Structure containing the solution to the tangent-linear +! RT equation for the given inputs. +! UNITS: N/A +! TYPE: CRTM_RTSolution_type +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN OUT) +!-------------------------------------------------------------------------------- + + SUBROUTINE CRTM_Compute_Reflectivity_TL(Atm, & ! Input + AtmOptics , & ! Input + AtmOptics_TL , & ! Input + GeometryInfo , & ! Input + SensorIndex , & ! Input + ChannelIndex, & ! Input + RTSolution_TL ) ! Input/Output + ! Arguments + TYPE(CRTM_Atmosphere_type), INTENT(IN) :: Atm + TYPE(CRTM_GeometryInfo_type), INTENT(IN) :: GeometryInfo + INTEGER , INTENT(IN) :: SensorIndex + INTEGER , INTENT(IN) :: ChannelIndex + TYPE(CRTM_AtmOptics_type) , INTENT(IN) :: AtmOptics, AtmOptics_TL + TYPE(CRTM_RTSolution_type), INTENT(IN OUT) :: RTSolution_TL + + REAL(fp) :: Frequency, Wavenumber, Wavelength_m + REAL(fp) :: Reflectivity(AtmOptics%n_Layers) + REAL(fp) :: Reflectivity_Attenuated(AtmOptics%n_Layers) + REAL(fp) :: Reflectivity_TL(AtmOptics%n_Layers) + REAL(fp) :: Reflectivity_Attenuated_TL(AtmOptics%n_Layers) + REAL(fp) :: Transmittance(AtmOptics%n_Layers) + REAL(fp) :: Transmittance_TL(AtmOptics%n_Layers) + REAL(fp) :: P1(AtmOptics%n_Layers) + REAL(fp) :: Height(0:AtmOptics%n_Layers), dZ_m(AtmOptics%n_Layers) + COMPLEX :: perm(AtmOptics%n_Layers) + REAL(fp), DIMENSION(AtmOptics%n_Layers) :: Kw_2, perm_re, perm_im + INTEGER :: k + + ! Calculate heights if hasn't been set already + IF (ALL(Atm%Height .LT. EPSILON_FP)) THEN + Height = Calculate_Height(Atm) + ELSE + Height = Atm%Height + ENDIF + dZ_m = (Atm%Height(0:Atm%n_Layers-1) - Atm%Height(1:Atm%n_Layers)) * ONE_THOUSAND + dZ_m = dZ_m / GeometryInfo%Cosine_Sensor_Zenith + + IF ( SpcCoeff_IsMicrowaveSensor(SC(SensorIndex)) ) THEN + Frequency = SC(SensorIndex)%Frequency(ChannelIndex) ! GHz + Wavelength_m = POINT_01 / GHz_to_Inverse_cm( Frequency ) + ELSE IF( SpcCoeff_IsInfraredSensor(SC(SensorIndex)) ) THEN + Wavenumber = SC(SensorIndex)%Wavenumber(ChannelIndex) ! 1/cm + Wavelength_m = POINT_01 / Wavenumber + END IF + + perm = Water_Permittivity_Turner_2016(Frequency * 1.0d9, & ! Input + Atm%Temperature) ! Input + perm_re = REAL(REAL(perm)) ! double REAL is required to avoid problems in GNU Fortran + perm_im = REAL(AIMAG(perm)) + Kw_2 = ((perm_re - ONE )/(perm_re + TWO))**TWO + + ! Calculate transmittance from top to layer k + !Transmittance(1) = ONE + DO k = 1, AtmOptics%n_layers + Transmittance(k) = EXP(-TWO * SUM(AtmOptics%optical_depth(1:k))) + END DO + + P1 = (M6_MM6 * Wavelength_m**4.0_fp) / (PI**5.0_fp * Kw_2) + P1 = P1 / dZ_m ! dZ_m to convert water_content to m/v or cloud water density + Reflectivity = P1 * AtmOptics%Backscat_Coefficient + Reflectivity_Attenuated = Transmittance * Reflectivity + + ! Tanget linear calculations + !Transmittance_TL(1) = ZERO + DO k = 1, AtmOptics%n_layers + Transmittance_TL(k) = - TWO * Transmittance(k) * SUM(AtmOptics_TL%optical_depth(1:k)) + END DO + + Reflectivity_TL = P1 * AtmOptics_TL%Backscat_Coefficient + Reflectivity_Attenuated_TL = Transmittance * Reflectivity_TL + & + Reflectivity * Transmittance_TL + + ! Convert the unit to dBz + WHERE (Reflectivity .GT. REFLECTIVITY_THRESHOLD) + RTSolution_TL%Reflectivity = TEN * Reflectivity_TL / (Reflectivity * LOG(TEN)) + ELSE WHERE + RTSolution_TL%Reflectivity = ZERO + END WHERE + + ! Convert the unit to dBz + WHERE (Reflectivity_Attenuated .GT. REFLECTIVITY_THRESHOLD) + RTSolution_TL%Reflectivity_Attenuated = TEN * Reflectivity_Attenuated_TL / & + (Reflectivity_Attenuated * LOG(TEN)) + ELSE WHERE + RTSolution_TL%Reflectivity_Attenuated = ZERO + END WHERE + + END SUBROUTINE CRTM_Compute_Reflectivity_TL + +!-------------------------------------------------------------------------------- +! +! NAME: +! CRTM_Compute_Reflectivity_AD +! +! PURPOSE: +! Subroutine to calculate the adjoint reflectivity for active instruments. +! +! CALLING SEQUENCE: +! CALL CRTM_Compute_Reflectivity_AD(Atm, & +! AtmOptics , & ! Input +! RTSolution , & ! Input +! GeometryInfo , & ! Input +! SensorIndex , & ! Input +! ChannelIndex , & ! Input +! AtmOptics_AD , & ! Input/Output +! RTSolution_AD ) ! Input/Output +! INPUT ARGUMENTS: +! Atm: Structure containing the atmospheric state data. +! UNITS: N/A +! TYPE: CRTM_Atmosphere_type +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN) +! +! AtmOptics: Structure containing the combined atmospheric +! optical properties for gaseous absorption, clouds, +! and aerosols. +! UNITS: N/A +! TYPE: CRTM_AtmOptics_type +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN) +! +! RTSolution: Structure containing the solution to the RT equation +! for the given inputs. +! UNITS: N/A +! TYPE: CRTM_RTSolution_type +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN) +! +! GeometryInfo: Structure containing the view geometry data. +! UNITS: N/A +! TYPE: CRTM_GeometryInfo_type +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN) +! +! SensorIndex: Sensor index id. This is a unique index associated +! with a (supported) sensor used to access the +! shared coefficient data for a particular sensor. +! See the ChannelIndex argument. +! UNITS: N/A +! TYPE: INTEGER +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN) +! +! ChannelIndex: Channel index id. This is a unique index associated +! with a (supported) sensor channel used to access the +! shared coefficient data for a particular sensor's +! channel. +! See the SensorIndex argument. +! UNITS: N/A +! TYPE: INTEGER +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN) +! +! OUTPUT ARGUMENTS: +! +! RTSolution_AD: Structure containing the RT solution adjoint inputs. +! UNITS: N/A +! TYPE: CRTM_RTSolution_type +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN OUT) +! +! AtmOptics_AD: Structure containing the adjoint combined atmospheric +! optical properties for gaseous absorption, clouds, +! and aerosols. +! UNITS: N/A +! TYPE: CRTM_AtmOptics_type +! DIMENSION: Scalar +! ATTRIBUTES: INTENT(IN OUT) +! +!-------------------------------------------------------------------------------- + + SUBROUTINE CRTM_Compute_Reflectivity_AD(Atm, & + AtmOptics , & ! Input + RTSolution , & ! Input + GeometryInfo , & ! Input + SensorIndex , & ! Input + ChannelIndex , & ! Input + AtmOptics_AD , & ! Input/Output + RTSolution_AD ) ! Input/Output + ! Arguments + TYPE(CRTM_Atmosphere_type), INTENT(IN) :: Atm + TYPE(CRTM_GeometryInfo_type), INTENT(IN) :: GeometryInfo + TYPE(CRTM_AtmOptics_type) , INTENT(IN) :: AtmOptics + TYPE(CRTM_RTSolution_type), TARGET, INTENT(IN) :: RTSolution + INTEGER , INTENT(IN) :: SensorIndex + INTEGER , INTENT(IN) :: ChannelIndex + TYPE(CRTM_AtmOptics_type) , INTENT(IN OUT) :: AtmOptics_AD + TYPE(CRTM_RTSolution_type), TARGET, INTENT(IN OUT) :: RTSolution_AD + !TYPE(CRTM_Atmosphere_type), INTENT(IN OUT) :: Atm_AD + + REAL(fp) :: Frequency, Wavenumber, Wavelength_m + REAL(fp) :: Transmittance(AtmOptics%n_Layers) + REAL(fp) :: Transmittance_AD(AtmOptics%n_Layers) + REAL(fp) :: P1(Atm%n_Layers) + REAL(fp) :: Height(0:AtmOptics%n_Layers), dZ_m(AtmOptics%n_Layers) + COMPLEX :: perm(Atm%n_Layers) + REAL(fp), DIMENSION(AtmOptics%n_Layers) :: Kw_2, perm_re, perm_im + INTEGER :: k, j + + ! Note Re and Rea are in dBz and Ra is attenuated reflectivity + ! and R and R_AD needs to be calculated or initilized locally + REAL(fp), DIMENSION(AtmOptics%n_Layers) :: R, Ra, R_AD, Ra_AD + REAL(fp), POINTER, DIMENSION(:) :: Re_AD, Rea_AD + REAL(fp), POINTER, DIMENSION(:) :: Re, Rea + NULLIFY(Re, Rea, Re_AD, Rea_AD) + + ! Calculate heights if hasn't been set already + IF (ALL(Atm%Height .LT. EPSILON_FP)) THEN + Height = Calculate_Height(Atm) + ELSE + Height = Atm%Height + ENDIF + dZ_m = (Atm%Height(0:Atm%n_Layers-1) - Atm%Height(1:Atm%n_Layers)) * ONE_THOUSAND + dZ_m = dZ_m / GeometryInfo%Cosine_Sensor_Zenith + + IF ( SpcCoeff_IsMicrowaveSensor(SC(SensorIndex)) ) THEN + Frequency = SC(SensorIndex)%Frequency(ChannelIndex) ! GHz + Wavelength_m = POINT_01 / GHz_to_Inverse_cm( Frequency ) + ELSE IF( SpcCoeff_IsInfraredSensor(SC(SensorIndex)) ) THEN + Wavenumber = SC(SensorIndex)%Wavenumber(ChannelIndex) ! 1/cm + Wavelength_m = POINT_01 / Wavenumber + END IF + + perm = Water_Permittivity_Turner_2016(Frequency * 1.0d9, & ! Input + Atm%Temperature) ! Input + + perm_re = REAL(REAL(perm)) + perm_im = REAL(AIMAG(perm)) + Kw_2 = ((perm_re - ONE )/(perm_re + TWO))**TWO + + ! Calculate transmittance from top to layer k + DO k = 1, AtmOptics%n_layers + Transmittance(k) = EXP(-TWO * SUM(AtmOptics%optical_depth(1:k))) + END DO + + P1 = (M6_MM6 * Wavelength_m**4.0_fp) / (PI**5.0_fp * Kw_2) + P1 = P1 / dZ_m ! dZ_m to convert water_content to m/v or cloud water density + R = P1 * AtmOptics%Backscat_Coefficient + Ra = Transmittance * R + + ! This is just to avoid recalculating the effective reflectivities + Re => RTSolution%Reflectivity ! dBz + Rea => RTSolution%Reflectivity_Attenuated ! dBz + + !============================================================================ + ! Adjoint calcualtions + Re_AD => RTSolution_AD%Reflectivity ! dBz + Rea_AD => RTSolution_AD%Reflectivity_Attenuated ! dBz + R_AD = ZERO ! mm^6 m^-3 + Ra_AD = ZERO ! mm^6 m^-3 + Transmittance_AD = ZERO + + WHERE (R .GT. REFLECTIVITY_THRESHOLD) + R_AD = R_AD + TEN * Re_AD / (R * LOG(TEN)) + ELSE WHERE + R_AD = R_AD + ZERO + END WHERE + ! Note that if transmittance is zero then Ra will be zeroo but not R + WHERE (Ra .GT. REFLECTIVITY_THRESHOLD) + Ra_AD = Ra_AD + TEN * Rea_AD / (Ra * LOG(TEN)) + ELSE WHERE + Ra_AD = Ra_AD + ZERO + END WHERE + + Transmittance_AD = Transmittance_AD + R * Ra_AD + ! Note that the follwing two lines are mrged into one line + ! R_AD = R_AD + Transmittance * Ra_AD + ! AtmOptics_AD%Backscat_Coefficient = AtmOptics_AD%Backscat_Coefficient + P1 * R_AD + AtmOptics_AD%Backscat_Coefficient = AtmOptics_AD%Backscat_Coefficient + & + P1 * R_AD + & + P1 * Transmittance * Ra_AD + + ! Calculate transmittance from top (satellite) to layer k + !AtmOptics_AD%optical_depth = ZERO + DO k = 1, AtmOptics%n_layers + Do j = 1, k + AtmOptics_AD%optical_depth(j) = AtmOptics_AD%optical_depth(j) & + - TWO * Transmittance(k) * Transmittance_AD(k) + END DO + END DO + + R_AD = ZERO + Ra_AD = ZERO + Re_AD = ZERO + Rea_AD = ZERO + !============================================================================ + + END SUBROUTINE CRTM_Compute_Reflectivity_AD + +END MODULE CRTM_Active_Sensor diff --git a/src/RTSolution/CRTM_RTSolution_Define.f90 b/src/RTSolution/CRTM_RTSolution_Define.f90 index 713a89b..5110189 100644 --- a/src/RTSolution/CRTM_RTSolution_Define.f90 +++ b/src/RTSolution/CRTM_RTSolution_Define.f90 @@ -153,6 +153,8 @@ MODULE CRTM_RTSolution_Define ! Radiative transfer results for a single channel REAL(fp) :: Radiance = ZERO REAL(fp) :: Brightness_Temperature = ZERO + REAL(fp), ALLOCATABLE :: Reflectivity(:) + REAL(fp), ALLOCATABLE :: Reflectivity_Attenuated(:) REAL(fp) :: Stokes(4) REAL(fp) :: SolarIrradiance = ZERO END TYPE CRTM_RTSolution_type @@ -284,6 +286,8 @@ ELEMENTAL SUBROUTINE CRTM_RTSolution_Create( RTSolution, n_Layers ) RTSolution%Upwelling_Overcast_Radiance(n_Layers), & RTSolution%Layer_Optical_Depth(n_Layers), & RTSolution%Single_Scatter_Albedo(n_Layers), & + RTSolution%Reflectivity(n_Layers), & + RTSolution%Reflectivity_Attenuated(n_Layers), & STAT = alloc_stat ) IF ( alloc_stat /= 0 ) RETURN @@ -295,6 +299,8 @@ ELEMENTAL SUBROUTINE CRTM_RTSolution_Create( RTSolution, n_Layers ) RTSolution%Upwelling_Overcast_Radiance = ZERO RTSolution%Layer_Optical_Depth = ZERO RTSolution%Single_Scatter_Albedo = ZERO + RTSolution%Reflectivity = ZERO + RTSolution%Reflectivity_Attenuated = ZERO ! Set allocation indicator RTSolution%Is_Allocated = .TRUE. @@ -355,7 +361,9 @@ ELEMENTAL SUBROUTINE CRTM_RTSolution_Zero( RTSolution ) RTSolution%Upwelling_Radiance = ZERO RTSolution%Upwelling_Overcast_Radiance = ZERO RTSolution%Layer_Optical_Depth = ZERO - RTSolution%Single_Scatter_Albedo = ZERO + RTSolution%Single_Scatter_Albedo = ZERO + RTSolution%Reflectivity = ZERO + RTSolution%Reflectivity_Attenuated = ZERO END IF END SUBROUTINE CRTM_RTSolution_Zero @@ -437,6 +445,8 @@ SUBROUTINE Scalar_Inspect( RTSolution, Unit ) WRITE(fid,'(5(1x,es22.15,:))') RTSolution%Upwelling_Radiance WRITE(fid,'(3x,"Layer Optical Depth :")') WRITE(fid,'(5(1x,es22.15,:))') RTSolution%Layer_Optical_Depth + WRITE(fid,'(5(1x,es22.15,:))') RTSolution%Reflectivity + WRITE(fid,'(5(1x,es22.15,:))') RTSolution%Reflectivity_Attenuated END IF FLUSH(fid) END SUBROUTINE Scalar_Inspect @@ -581,7 +591,9 @@ ELEMENTAL FUNCTION CRTM_RTSolution_Compare( & IF ( CRTM_RTSolution_Associated(x) .AND. CRTM_RTSolution_Associated(y) ) THEN IF ( (.NOT. ALL(Compares_Within_Tolerance(x%Upwelling_Overcast_Radiance, y%Upwelling_Overcast_Radiance, n))) .OR. & (.NOT. ALL(Compares_Within_Tolerance(x%Upwelling_Radiance , y%Upwelling_Radiance , n))) .OR. & - (.NOT. ALL(Compares_Within_Tolerance(x%Layer_Optical_Depth , y%Layer_Optical_Depth , n))) ) RETURN + (.NOT. ALL(Compares_Within_Tolerance(x%Layer_Optical_Depth , y%Layer_Optical_Depth , n))) .OR. & + (.NOT. ALL(Compares_Within_Tolerance(x%Reflectivity , y%Reflectivity , n))) .OR. & + (.NOT. ALL(Compares_Within_Tolerance(x%Reflectivity_Attenuated , y%Reflectivity_Attenuated , n)))) RETURN END IF ! If we get here, the structures are comparable @@ -1224,7 +1236,9 @@ ELEMENTAL FUNCTION CRTM_RTSolution_Equal( x, y ) RESULT( is_equal ) is_equal = is_equal .AND. & ALL(x%Upwelling_Overcast_Radiance .EqualTo. y%Upwelling_Overcast_Radiance ) .AND. & ALL(x%Upwelling_Radiance .EqualTo. y%Upwelling_Radiance ) .AND. & - ALL(x%Layer_Optical_Depth .EqualTo. y%Layer_Optical_Depth ) + ALL(x%Layer_Optical_Depth .EqualTo. y%Layer_Optical_Depth ) .AND. & + ALL(x%Reflectivity .EqualTo. y%Reflectivity ) .AND. & + ALL(x%Reflectivity_Attenuated .EqualTo. y%Reflectivity_Attenuated ) END IF END FUNCTION CRTM_RTSolution_Equal @@ -1306,6 +1320,12 @@ ELEMENTAL FUNCTION CRTM_RTSolution_Add( rts1, rts2 ) RESULT( rtssum ) rtssum%Layer_Optical_Depth(1:k) = rtssum%Layer_Optical_Depth(1:k) + & rts2%Layer_Optical_Depth(1:k) + + rtssum%Reflectivity(1:k) = rtssum%Reflectivity(1:k) + & + rts2%Reflectivity(1:k) + + rtssum%Reflectivity_Attenuated(1:k) = rtssum%Reflectivity_Attenuated(1:k) + & + rts2%Reflectivity_Attenuated(1:k) END IF END FUNCTION CRTM_RTSolution_Add @@ -1387,6 +1407,12 @@ ELEMENTAL FUNCTION CRTM_RTSolution_Subtract( rts1, rts2 ) RESULT( rtsdiff ) rtsdiff%Layer_Optical_Depth(1:k) = rtsdiff%Layer_Optical_Depth(1:k) - & rts2%Layer_Optical_Depth(1:k) + + rtsdiff%Reflectivity(1:k) = rtsdiff%Reflectivity(1:k) - & + rts2%Reflectivity(1:k) + + rtsdiff%Reflectivity_Attenuated(1:k) = rtsdiff%Reflectivity_Attenuated(1:k) - & + rts2%Reflectivity_Attenuated(1:k) END IF END FUNCTION CRTM_RTSolution_Subtract @@ -1460,6 +1486,8 @@ ELEMENTAL FUNCTION CRTM_RTSolution_Exponent( rts, power ) RESULT( rts_power ) rts_power%Upwelling_Overcast_Radiance(1:k) = (rts_power%Upwelling_Overcast_Radiance(1:k))**power rts_power%Upwelling_Radiance(1:k) = (rts_power%Upwelling_Radiance(1:k) )**power rts_power%Layer_Optical_Depth(1:k) = (rts_power%Layer_Optical_Depth(1:k) )**power + rts_power%Reflectivity(1:k) = (rts_power%Reflectivity(1:k) )**power + rts_power%Reflectivity_Attenuated(1:k) = (rts_power%Reflectivity_Attenuated(1:k) )**power END IF END FUNCTION CRTM_RTSolution_Exponent @@ -1534,6 +1562,8 @@ ELEMENTAL FUNCTION CRTM_RTSolution_Normalise( rts, factor ) RESULT( rts_normal ) rts_normal%Upwelling_Overcast_Radiance(1:k) = rts_normal%Upwelling_Overcast_Radiance(1:k)/factor rts_normal%Upwelling_Radiance(1:k) = rts_normal%Upwelling_Radiance(1:k) /factor rts_normal%Layer_Optical_Depth(1:k) = rts_normal%Layer_Optical_Depth(1:k) /factor + rts_normal%Reflectivity(1:k) = rts_normal%Reflectivity(1:k) /factor + rts_normal%Reflectivity_Attenuated(1:k) = rts_normal%Reflectivity_Attenuated(1:k) /factor END IF END FUNCTION CRTM_RTSolution_Normalise @@ -1600,6 +1630,8 @@ ELEMENTAL FUNCTION CRTM_RTSolution_Sqrt( rts ) RESULT( rts_sqrt ) rts_sqrt%Upwelling_Overcast_Radiance(1:k) = SQRT(rts_sqrt%Upwelling_Overcast_Radiance(1:k)) rts_sqrt%Upwelling_Radiance(1:k) = SQRT(rts_sqrt%Upwelling_Radiance(1:k) ) rts_sqrt%Layer_Optical_Depth(1:k) = SQRT(rts_sqrt%Layer_Optical_Depth(1:k) ) + rts_sqrt%Reflectivity(1:k) = SQRT(rts_sqrt%Reflectivity(1:k) ) + rts_sqrt%Reflectivity_Attenuated(1:k) = SQRT(rts_sqrt%Reflectivity_Attenuated(1:k) ) END IF END FUNCTION CRTM_RTSolution_Sqrt @@ -1693,7 +1725,9 @@ FUNCTION Read_Record( & READ( fid,IOSTAT=io_stat,IOMSG=io_msg ) & rts%Upwelling_Overcast_Radiance , & rts%Upwelling_Radiance, & - rts%Layer_Optical_Depth + rts%Layer_Optical_Depth, & + rts%Reflectivity, & + rts%Reflectivity_Attenuated IF ( io_stat /= 0 ) THEN msg = 'Error reading array intermediate results - '//TRIM(io_msg) CALL Read_Record_Cleanup(); RETURN @@ -1801,7 +1835,9 @@ FUNCTION Write_Record( & WRITE( fid,IOSTAT=io_stat,IOMSG=io_msg ) & rts%Upwelling_Overcast_Radiance , & rts%Upwelling_Radiance, & - rts%Layer_Optical_Depth + rts%Layer_Optical_Depth, & + rts%Reflectivity, & + rts%Reflectivity_Attenuated IF ( io_stat /= 0 ) THEN msg = 'Error writing array intermediate results - '//TRIM(io_msg) CALL Write_Record_Cleanup(); RETURN diff --git a/src/RTSolution/Common_RTSolution.f90 b/src/RTSolution/Common_RTSolution.f90 index 75c6033..ffe6a04 100644 --- a/src/RTSolution/Common_RTSolution.f90 +++ b/src/RTSolution/Common_RTSolution.f90 @@ -3089,6 +3089,6 @@ SUBROUTINE Normalize_Phase_AD( k, RTV, Pff, Pbb, Pff_AD, Pbb_AD ) n_Factor_AD = ZERO END DO Sum_Fac_AD(0) = ZERO - END SUBROUTINE Normalize_Phase_AD - -END MODULE Common_RTSolution + END SUBROUTINE Normalize_Phase_AD + +END MODULE Common_RTSolution \ No newline at end of file diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a0edfc2..b6f4297 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -471,6 +471,71 @@ foreach(regtype IN LISTS regression_types) endforeach() +#--------------------------------------------------------------------------------- +# Active sensor module AD/TL test +ecbuild_add_executable ( + TARGET "test_Active_Sensor" + SOURCES mains/unit/Unit_Test/test_active_sensor.f90 + LIBS crtm + NOINSTALL + ) + +ecbuild_add_test( + TARGET "test_Active_Sensor" + COMMAND "test_Active_Sensor" + OMP $ENV{OMP_NUM_THREADS} + ) + +ecbuild_add_executable ( + TARGET "test_AD_Active_Sensor" + SOURCES mains/unit/Unit_Test/test_AD_Active_Sensor.f90 + LIBS crtm + NOINSTALL + ) + +ecbuild_add_test( + TARGET "test_AD_Active_Sensor" + COMMAND "test_AD_Active_Sensor" + OMP $ENV{OMP_NUM_THREADS} + ) + +ecbuild_add_executable ( + TARGET "test_TL_convergence_active_sensor" + SOURCES mains/unit/Unit_Test/test_TL_convergence_active_sensor.f90 + LIBS crtm + NOINSTALL + ) + +ecbuild_add_test( + TARGET "test_TL_convergence_active_sensor" + COMMAND "test_TL_convergence_active_sensor" + OMP $ENV{OMP_NUM_THREADS} + ) + +#================================================================================= +#OpenMP regression tests +foreach(regtype IN LISTS regression_types) + string(COMPARE EQUAL ${regtype} "k_matrix" isregtype) + if (isregtype) + continue() #skip all k_matrix tests + endif() + foreach(testtype IN LISTS omp_tests) + ecbuild_add_executable( TARGET "test_${regtype}_test_${testtype}" + SOURCES "mains/regression/${regtype}/test_${testtype}/test_${testtype}.F90" + LIBS crtm + NOINSTALL) + + foreach(sensor_id IN LISTS ${testtype}_Sensor_Ids) + + ecbuild_add_test( TARGET "test_${regtype}_${testtype}_${sensor_id}" + OMP $ENV{OMP_NUM_THREADS} + COMMAND "test_${regtype}_test_${testtype}" + ARGS "${sensor_id}" + TEST_DEPENDS get_crtm_coeffs) + endforeach() + endforeach() +endforeach() + ##################################################################### # Files for CRTM tests @@ -484,6 +549,7 @@ AerosolCoeff/Little_Endian/AerosolCoeff.bin AerosolCoeff/netCDF/AerosolCoeff.nc4 CloudCoeff/Little_Endian/CloudCoeff.bin CloudCoeff/netCDF/CloudCoeff.nc4 +CloudCoeff/netCDF/CloudCoeff_DDA_ARTS.nc4 EmisCoeff/MW_Water/Little_Endian/FASTEM6.MWwater.EmisCoeff.bin EmisCoeff/IR_Ice/SEcategory/Little_Endian/NPOESS.IRice.EmisCoeff.bin EmisCoeff/IR_Ice/SEcategory/netCDF/NPOESS.IRice.EmisCoeff.nc4 diff --git a/test/mains/unit/Unit_Test/test_AD_Active_Sensor.f90 b/test/mains/unit/Unit_Test/test_AD_Active_Sensor.f90 new file mode 100644 index 0000000..db3dbd6 --- /dev/null +++ b/test/mains/unit/Unit_Test/test_AD_Active_Sensor.f90 @@ -0,0 +1,499 @@ +! +! test_AD +! +! Program to provide a (relatively) simple example of how +! to test the CRTM adjoint function. +! +! The code checks whether the Jacobian from the Tangent-Linear +! and the Adjoint are consistent. +! +! Copyright Patrick Stegmann, 2020 +! +! Modified by Isaac Moradi Isaac.Moradi@NASA.GOV +! Nov-30-2021 +! Modified to work with active sensor module +! + +PROGRAM test_AD + + ! ============================================================================ + ! **** ENVIRONMENT SETUP FOR RTM USAGE **** + ! + ! Module usage + USE CRTM_Module + USE CRTM_SpcCoeff, ONLY: SC + + ! Disable all implicit typing + IMPLICIT NONE + ! ============================================================================ + + ! ---------- + ! Parameters + ! ---------- + CHARACTER(*), PARAMETER :: PROGRAM_NAME = 'test_AD' + CHARACTER(*), PARAMETER :: COEFFICIENTS_PATH = './testinput/' + CHARACTER(*), PARAMETER :: NC_COEFFICIENT_PATH='./testinput/' + CHARACTER(*), PARAMETER :: RESULTS_PATH = './results/unit/' + + ! ============================================================================ + ! 0. **** SOME SET UP PARAMETERS FOR THIS EXAMPLE **** + ! + ! Profile dimensions... + INTEGER, PARAMETER :: N_PROFILES = 2 + INTEGER, PARAMETER :: N_LAYERS = 92 + INTEGER, PARAMETER :: N_ABSORBERS = 2 + INTEGER, PARAMETER :: N_CLOUDS = 1 + INTEGER, PARAMETER :: N_AEROSOLS = 0 + ! ...but only ONE Sensor at a time + INTEGER, PARAMETER :: N_SENSORS = 1 + INTEGER, PARAMETER :: SensorIndex = 1 + + ! Test GeometryInfo angles. The test scan angle is based + ! on the default Re (earth radius) and h (satellite height) + REAL(fp), PARAMETER :: ZENITH_ANGLE = 1.0_fp + REAL(fp), PARAMETER :: SCAN_ANGLE = 1.0_fp + ! ============================================================================ + + + ! --------- + ! Variables + ! --------- + CHARACTER(256) :: Message + CHARACTER(256) :: Version + CHARACTER(256) :: Sensor_Id + INTEGER :: Error_Status + INTEGER :: Allocate_Status + INTEGER :: n_Channels + INTEGER :: l, m + INTEGER :: test_result + ! Declarations for Jacobian comparisons + INTEGER :: n_la, n_ma + INTEGER :: n_ls, n_ms + INTEGER :: i1, j1, jj, ilev1, ilev2, iprof, ichan + CHARACTER(256) :: atmk_File, sfck_File + ! Declarations for adjoint testing + REAL(fp) :: Perturbation + REAL(fp) :: AD(N_LAYERS), TL(N_LAYERS) + REAL(fp), ALLOCATABLE :: TL_final(:), AD_final(:) + REAL(fp), DIMENSION(1,1) :: LHS + REAL(fp), DIMENSION(1,1) :: RHS + REAL(fp), PARAMETER :: TOLERANCE = 0.1_fp + REAL(fp), DIMENSION(2,1) :: x_test ! Temperature state vector for the adjoint ctest + REAL(fp), DIMENSION(2,2) :: L_operator ! Linearized operator + REAL(fp), DIMENSION(2,2) :: L_operator_T ! Linearized operator + LOGICAL :: Attenuated_Reflectivity + INTEGER :: i, n_Layer_Cloud, i_layers(N_LAYERS) + INTEGER, ALLOCATABLE :: i_Layers_Cloud(:) + + ! ============================================================================ + ! 1. **** DEFINE THE CRTM INTERFACE STRUCTURES **** + ! + TYPE(CRTM_ChannelInfo_type) :: ChannelInfo(N_SENSORS) + TYPE(CRTM_Geometry_type) :: Geometry(N_PROFILES) + + ! Define the FORWARD variables + TYPE(CRTM_Atmosphere_type) :: Atm(N_PROFILES) + TYPE(CRTM_Surface_type) :: Sfc(N_PROFILES) + TYPE(CRTM_RTSolution_type), ALLOCATABLE :: RTSolution(:,:) + + ! Define the Tangent-Linear variables + TYPE(CRTM_Atmosphere_type) :: Atmosphere_TL(N_PROFILES) + TYPE(CRTM_Surface_type) :: Surface_TL(N_PROFILES) + TYPE(CRTM_RTSolution_type), ALLOCATABLE :: RTSolution_TL(:,:) + + ! Define the Adjoint variables + TYPE(CRTM_Atmosphere_type) :: Atmosphere_AD(N_PROFILES) + TYPE(CRTM_Surface_type) :: Surface_AD(N_PROFILES) + TYPE(CRTM_RTSolution_type), ALLOCATABLE :: RTSolution_AD(:,:) + ! ============================================================================ + + + ! Directory location of coefficients +! #ifdef LITTLE_ENDIAN + CHARACTER(*), PARAMETER :: ENDIAN_TYPE='little_endian' +! #else +! CHARACTER(*), PARAMETER :: ENDIAN_TYPE='big_endian' +!#endif +! CHARACTER(*), PARAMETER :: COEFFICIENT_PATH='coefficients/'//ENDIAN_TYPE//'/' + + + ! Aerosol/Cloud coefficient format + !CHARACTER(*), PARAMETER :: Coeff_Format = 'Binary' + CHARACTER(*), PARAMETER :: Coeff_Format = 'netCDF' + + ! Aerosol/Cloud coefficient scheme + CHARACTER(*), PARAMETER :: Aerosol_Model = 'CRTM' + !CHARACTER(*), PARAMETER :: Aerosol_Model = 'CMAQ' + !CHARACTER(*), PARAMETER :: Aerosol_Model = 'GOCART-GEOS5' + !CHARACTER(*), PARAMETER :: Aerosol_Model = 'NAAPS' + CHARACTER(*), PARAMETER :: Cloud_Model = 'CRTM' + + CHARACTER(256) :: AerosolCoeff_File + CHARACTER(256) :: AerosolCoeff_Format + CHARACTER(256) :: CloudCoeff_File + CHARACTER(256) :: CloudCoeff_Format + + ! Program header + ! -------------- + CALL CRTM_Version( Version ) + CALL Program_Message( PROGRAM_NAME, & + 'Program to provide a basic test for the CRTM adjoint operator.', & + 'CRTM Version: '//TRIM(Version) ) + + + ! Get sensor id from user + ! ----------------------- + !WRITE( *,'(/5x,"Enter sensor id [hirs4_n18, amsua_metop-a, or mhs_n18]: ")',ADVANCE='NO' ) + !READ( *,'(a)' ) Sensor_Id + Sensor_Id = 'atms_n21' + Sensor_Id = ADJUSTL(Sensor_Id) + WRITE( *,'(//5x,"Running CRTM for ",a," sensor...")' ) TRIM(Sensor_Id) + + + ! ============================================================================ + ! STEP 4. **** INITIALIZE THE CRTM **** + ! + ! 4a. Initialise all the sensors at once + ! -------------------------------------- + !.. Cloud coefficient information + IF ( Coeff_Format == 'Binary' ) THEN + CloudCoeff_Format = 'Binary' + CloudCoeff_File = 'CloudCoeff.bin' + ! if netCDF I/O + ELSE IF ( Coeff_Format == 'netCDF' ) THEN + CloudCoeff_Format = 'netCDF' + CloudCoeff_File = 'CloudCoeff_DDA_ARTS.nc4' + ELSE + message = 'Aerosol/Cloud coefficient format is not supported' + CALL Display_Message( PROGRAM_NAME, message, FAILURE ) + STOP + END IF + + !.....Aerosol + IF ( Aerosol_Model == 'CRTM' ) THEN + IF ( Coeff_Format == 'Binary' ) THEN + AerosolCoeff_Format = 'Binary' + AerosolCoeff_File = 'AerosolCoeff.bin' + ELSE IF ( Coeff_Format == 'netCDF' ) THEN + AerosolCoeff_Format = 'netCDF' + AerosolCoeff_File = 'AerosolCoeff.nc4' + ELSE + message = 'Aerosol coefficient format is not supported' + CALL Display_Message( PROGRAM_NAME, message, FAILURE ) + STOP + END IF + ELSEIF ( Aerosol_Model == 'CMAQ' ) THEN + IF ( Coeff_Format == 'Binary' ) THEN + AerosolCoeff_Format = 'Binary' + AerosolCoeff_File = 'AerosolCoeff.CMAQ.bin' + ELSE IF ( Coeff_Format == 'netCDF' ) THEN + AerosolCoeff_Format = 'netCDF' + AerosolCoeff_File = 'AerosolCoeff.CMAQ.nc4' + ELSE + message = 'Aerosol coefficient format is not supported' + CALL Display_Message( PROGRAM_NAME, message, FAILURE ) + STOP + END IF + ELSEIF ( Aerosol_Model == 'GOCART-GEOS5' ) THEN + IF ( Coeff_Format == 'Binary' ) THEN + AerosolCoeff_Format = 'Binary' + AerosolCoeff_File = 'AerosolCoeff.GOCART-GEOS5.bin' + ELSE IF ( Coeff_Format == 'netCDF' ) THEN + AerosolCoeff_Format = 'netCDF' + AerosolCoeff_File = 'AerosolCoeff.GOCART-GEOS5.nc4' + ELSE + message = 'Aerosol coefficient format is not supported' + CALL Display_Message( PROGRAM_NAME, message, FAILURE ) + STOP + END IF + ELSEIF ( Aerosol_Model == 'NAAPS' ) THEN + IF ( Coeff_Format == 'Binary' ) THEN + AerosolCoeff_Format = 'Binary' + AerosolCoeff_File = 'AerosolCoeff.NAAPS.bin' + ELSE IF ( Coeff_Format == 'netCDF' ) THEN + AerosolCoeff_Format = 'netCDF' + AerosolCoeff_File = 'AerosolCoeff.NAAPS.nc4' + ELSE + message = 'Aerosol coefficient format is not supported' + CALL Display_Message( PROGRAM_NAME, message, FAILURE ) + STOP + END IF + END IF + + ! ============================================================================ + ! 2. **** INITIALIZE THE CRTM **** + ! + ! 2a. This initializes the CRTM for the sensors + ! predefined in the example SENSOR_ID parameter. + ! NOTE: The coefficient data file path is hard- + ! wired for this example. + ! -------------------------------------------------- + WRITE( *,'(/5x,"Initializing the CRTM...")' ) + + error_status = CRTM_Init( (/ sensor_ID /), & + channelInfo, & + Aerosol_Model, & + AerosolCoeff_Format, & + AerosolCoeff_File, & + Cloud_Model, & + CloudCoeff_Format, & + CloudCoeff_File, & + File_Path=COEFFICIENTS_PATH, & + NC_File_Path=NC_COEFFICIENT_PATH, & + Quiet=.TRUE.) + + IF ( Error_Status /= SUCCESS ) THEN + Message = 'Error initializing CRTM' + CALL Display_Message( PROGRAM_NAME, Message, FAILURE ) + STOP + END IF + + ! 2b. Determine the total number of channels + ! for which the CRTM was initialized + ! ------------------------------------------ + n_Channels = SUM(CRTM_ChannelInfo_n_Channels(ChannelInfo)) + ! ============================================================================ + + + + + ! ============================================================================ + ! 3. **** ALLOCATE STRUCTURE ARRAYS **** + ! + ! 3a. Allocate the ARRAYS + ! ----------------------- + ! Note that only those structure arrays with a channel + ! dimension are allocated here because we've parameterized + ! the number of profiles in the N_PROFILES parameter. + ! + ! Users can make the number of profiles dynamic also, but + ! then the INPUT arrays (Atmosphere, Surface) will also have to be allocated. + ALLOCATE( RTSolution( n_Channels, N_PROFILES ), & + RTSolution_TL( n_Channels, N_PROFILES ), & + RTSolution_AD( n_Channels, N_PROFILES ), & + STAT = Allocate_Status ) + IF ( Allocate_Status /= 0 ) THEN + Message = 'Error allocating structure arrays' + CALL Display_Message( PROGRAM_NAME, Message, FAILURE ) + STOP + END IF + + ! 3b. Allocate the STRUCTURES + ! --------------------------- + ! The input FORWARD structure + CALL CRTM_Atmosphere_Create( Atm, N_LAYERS, N_ABSORBERS, N_CLOUDS, N_AEROSOLS ) + IF ( ANY(.NOT. CRTM_Atmosphere_Associated(Atm)) ) THEN + Message = 'Error allocating CRTM Atmosphere structure' + CALL Display_Message( PROGRAM_NAME, Message, FAILURE ) + STOP + END IF + Atm%Add_Extra_Layers = .FALSE. + + ! The input TL structure + CALL CRTM_Atmosphere_Create( Atmosphere_TL, N_LAYERS, N_ABSORBERS, N_CLOUDS, N_AEROSOLS ) + IF ( ANY(.NOT. CRTM_Atmosphere_Associated(Atmosphere_TL)) ) THEN + Message = 'Error allocating CRTM Atmosphere_TL structure' + CALL Display_Message( PROGRAM_NAME, Message, FAILURE ) + STOP + END IF + Atmosphere_TL%Add_Extra_Layers = .FALSE. + + ! The output AD structure + CALL CRTM_Atmosphere_Create( Atmosphere_AD, N_LAYERS, N_ABSORBERS, N_CLOUDS, N_AEROSOLS ) + IF ( ANY(.NOT. CRTM_Atmosphere_Associated(Atmosphere_AD)) ) THEN + Message = 'Error allocating CRTM Atmosphere_AD structure' + CALL Display_Message( PROGRAM_NAME, Message, FAILURE ) + STOP + END IF + Atmosphere_AD%Add_Extra_Layers = .FALSE. + +CALL CRTM_RTSolution_Create(RTSolution,N_LAYERS) +CALL CRTM_RTSolution_Create(RTSolution_TL,N_LAYERS) +CALL CRTM_RTSolution_Create(RTSolution_AD,N_LAYERS) + + ! ============================================================================ + + ! ============================================================================ + ! 4. **** ASSIGN INPUT DATA **** + ! + ! Fill the Atmosphere structure array. + ! NOTE: This is an example program for illustrative purposes only. + ! Typically, one would not assign the data as shown below, + ! but rather read it from file + + ! 4a. Atmosphere and Surface input + ! -------------------------------- + CALL Load_Atm_Data() + CALL Load_Sfc_Data() + ilev1 = 61 + ilev2 = 77 + iprof = 1 + ichan = 16 + Attenuated_Reflectivity = .TRUE. + n_Layer_Cloud = COUNT(Atm(iprof)%Cloud(1)%Water_Content .GT. ZERO) + ALLOCATE(TL_final(n_Layer_Cloud), AD_Final(n_Layer_Cloud), i_Layers_cloud(n_Layer_Cloud)) + i_layers = (/(i, i=1,n_Layers)/) + + Do jj=1,2 + atm(jj)%Height = Calculate_Height(Atm(jj)) + Atm(jj)%Cloud(1)%Type = SNOW_CLOUD + WHERE (Atm(jj)%Cloud(1)%Water_Content .GT. 0.0_fp) + Atm(jj)%Cloud(1)%Water_Content = 5 + ENDWHERE + + Atmosphere_TL(jj)%Climatology = atm(jj)%Climatology + Atmosphere_TL(jj)%Absorber_Id = atm(jj)%Absorber_Id + Atmosphere_TL(jj)%Absorber_Units = atm(jj)%Absorber_Units + Atmosphere_TL(jj)%Height = atm(jj)%Height + + Atmosphere_AD(jj)%Climatology = atm(jj)%Climatology + Atmosphere_AD(jj)%Absorber_Id = atm(jj)%Absorber_Id + Atmosphere_AD(jj)%Absorber_Units = atm(jj)%Absorber_Units + Atmosphere_AD(jj)%Height = atm(jj)%Height + END DO + SC(SensorIndex)%Is_Active_Sensor = .TRUE. + + ! 4b. GeometryInfo input + ! ---------------------- + ! All profiles are given the same value + ! The Sensor_Scan_Angle is optional. + CALL CRTM_Geometry_SetValue( Geometry, & + Sensor_Zenith_Angle = ZENITH_ANGLE, & + Sensor_Scan_Angle = SCAN_ANGLE ) + ! ============================================================================ + ! Forwad model is not used + Error_Status = CRTM_Forward( Atm , & + Sfc , & + Geometry , & + ChannelInfo , & + RTSolution ) + + ! ============================================================================ + ! 5. **** INITIALIZE THE TL ARGUMENTS **** + + ! 5a. Zero the LT INPUT structures + ! --------------------------------------- + CALL CRTM_Atmosphere_Zero( Atmosphere_TL ) + CALL CRTM_Surface_Zero( Surface_TL ) + Perturbation = ONE ! kg/m2 + Atmosphere_TL(1)%Cloud(1)%Water_Content = Perturbation + Atmosphere_TL(2)%Cloud(1)%Water_Content = Perturbation + + Error_Status = CRTM_Tangent_Linear( Atm , & + Sfc , & + Atmosphere_TL , & + Surface_TL , & + Geometry , & + ChannelInfo , & + RTSolution , & + RTSolution_TL ) + IF ( Error_Status /= SUCCESS ) THEN + Message = 'Error in CRTM Tangent-linear Model' + CALL Display_Message( PROGRAM_NAME, Message, FAILURE ) + STOP + END IF + + ! ============================================================================ + + + ! ============================================================================ + ! 6. **** CALL THE CRTM ADJOINT MODEL **** + ! + + CALL CRTM_Atmosphere_Zero( Atmosphere_AD ) + CALL CRTM_Surface_Zero( Surface_AD ) + + ! Initialise the Adjoint INPUT to provide dR/dx derivatives + RTSolution_AD%Brightness_Temperature = ZERO + RTSolution_AD%Radiance = ZERO + + DO i1=1,n_channels + DO j1=1,n_profiles + DO jj=1, N_LAYERS + RTSolution_AD(i1,j1)%Reflectivity_Attenuated(jj) = ZERO + RTSolution_AD(i1,j1)%Reflectivity(jj) = ZERO + if (Attenuated_Reflectivity) then + RTSolution_AD(ichan,j1)%Reflectivity_Attenuated(jj) = ONE + else + RTSolution_AD(ichan,j1)%Reflectivity(jj) = ONE + endif + ENDDO + ENDDO + ENDDO + + Error_Status = CRTM_Adjoint( Atm , & + Sfc , & + RTSolution_AD, & + Geometry, & + ChannelInfo, & + Atmosphere_AD, & + Surface_AD, & + RTSolution ) + IF ( Error_Status /= SUCCESS ) THEN + Message = 'Error in Adjoint Model' + CALL Display_Message( PROGRAM_NAME, Message, FAILURE ) + STOP + END IF + ! ============================================================================ + + + ! ============================================================================ + ! **** PERFORM ADJOINT TEST **** + ! + if (Attenuated_Reflectivity) then + TL = RTSolution_TL(ichan,iprof)%Reflectivity_Attenuated + else + TL = RTSolution_TL(ichan,iprof)%Reflectivity + endif + AD = Atmosphere_AD(iprof)%Cloud(1)%Water_Content + + TL_final = PACK(TL, Atm(iprof)%Cloud(1)%Water_Content .GT. ZERO) + AD_final = PACK(AD, Atm(iprof)%Cloud(1)%Water_Content .GT. ZERO) + i_layers_Cloud = PACK(i_Layers, Atm(iprof)%Cloud(1)%Water_Content .GT. ZERO) + + WRITE(*,'(3A30)') 'TL', 'AD', 'ABS(TL-AD)/TL' + DO jj=1,N_LAYER_CLOUD + i = N_LAYER_CLOUD + 1 - jj + !if (Atm(iprof)%Cloud(1)%Water_Content(jj) .GT. 0) THEN + WRITE(*,'(3F30.10)') TL_FINAL(jj), AD_FINAL(i), ABS(TL_FINAL(jj) - AD_FINAL(i)) / TL_FINAL(jj) + !END IF + END DO + + ! ============================================================================ + ! 8. **** DESTROY THE CRTM **** + ! + WRITE( *, '( /5x, "Destroying the CRTM..." )' ) + Error_Status = CRTM_Destroy( ChannelInfo ) + IF ( Error_Status /= SUCCESS ) THEN + Message = 'Error destroying CRTM' + CALL Display_Message( PROGRAM_NAME, Message, FAILURE ) + STOP + END IF + ! ============================================================================ + + + ! ============================================================================ + ! 10. **** CLEAN UP **** + ! + ! 10a. Deallocate the structures. + ! These are the explicitly allocated structures. + ! Note that in some cases other structures, such as the Sfc + ! and RTSolution structures, will also be allocated and thus + ! should also be deallocated here. + ! --------------------------------------------------------------- + CALL CRTM_Atmosphere_Destroy(Atmosphere_TL) + CALL CRTM_Atmosphere_Destroy(Atm) + + ! 10b. Deallocate the arrays + ! -------------------------- + DEALLOCATE(RTSolution, RTSolution_TL, & + STAT = Allocate_Status) + ! ============================================================================ + + +CONTAINS + + INCLUDE 'Load_Atm_Data.inc' + INCLUDE 'Load_Sfc_Data.inc' + +END PROGRAM test_AD diff --git a/test/mains/unit/Unit_Test/test_TL_convergence_active_sensor.f90 b/test/mains/unit/Unit_Test/test_TL_convergence_active_sensor.f90 new file mode 100644 index 0000000..9f8c387 --- /dev/null +++ b/test/mains/unit/Unit_Test/test_TL_convergence_active_sensor.f90 @@ -0,0 +1,544 @@ +! +! test_TL_convergence +! +! Program to provide a (relatively) simple example of how +! to test the CRTM tangent-linear function. +! This code checks the convergence between the tangent-linear +! operator and the nonlinear CRTM Forward function when +! the magnitude of the atmospheric input state perturbation +! is step-wise reduced. +! The convergence should be monotonous, which it isn't right. +! For this reason the test in its current state will fai. +! +! Copyright Patrick Stegmann, 2020 +! +! Modified by Isaac Moradi Isaac.Moradi@NASA.GOV +! Nov-30-2021 +! Modified to work with active sensor module +! + +PROGRAM test_TL_convergence + + ! ============================================================================ + ! **** ENVIRONMENT SETUP FOR RTM USAGE **** + ! + ! Module usage + USE CRTM_Module + USE CRTM_SpcCoeff, ONLY: SC + + !USE UnitTest_Define, ONLY: UnitTest_IsEqualWithin + ! Disable all implicit typing + IMPLICIT NONE + ! ============================================================================ + + + ! ---------- + ! Parameters + ! ---------- + CHARACTER(*), PARAMETER :: PROGRAM_NAME = 'test_TL_convergence' + CHARACTER(*), PARAMETER :: RESULTS_PATH = './results/unit/' + CHARACTER(*), PARAMETER :: COEFFICIENTS_PATH = './testinput/' + CHARACTER(*), PARAMETER :: NC_COEFFICIENT_PATH='./testinput/' + + + ! ============================================================================ + ! 0. **** SOME SET UP PARAMETERS FOR THIS EXAMPLE **** + ! + ! Profile dimensions... + INTEGER, PARAMETER :: N_PROFILES = 2 + INTEGER, PARAMETER :: N_LAYERS = 92 + INTEGER, PARAMETER :: N_ABSORBERS = 2 + INTEGER, PARAMETER :: N_CLOUDS = 1 + INTEGER, PARAMETER :: N_AEROSOLS = 0 + ! ...but only ONE Sensor at a time + INTEGER, PARAMETER :: N_SENSORS = 1 + INTEGER, PARAMETER :: SensorIndex = 1 + LOGICAL :: Attenuated_Reflectivity + + ! Test GeometryInfo angles. The test scan angle is based + ! on the default Re (earth radius) and h (satellite height) + REAL(fp), PARAMETER :: ZENITH_ANGLE = 1.0_fp + REAL(fp), PARAMETER :: SCAN_ANGLE = 1.0_fp + ! ============================================================================ + + + ! --------- + ! Variables + ! --------- + CHARACTER(256) :: Message + CHARACTER(256) :: Version + CHARACTER(256) :: Sensor_Id + INTEGER :: Error_Status + INTEGER :: Allocate_Status + INTEGER :: n_Channels + INTEGER :: l, m + INTEGER :: ii, jj, isign, sign, ilev, iprof, ichan + INTEGER, PARAMETER:: nsign=2 + INTEGER :: testresult + ! Declarations for Jacobian comparisons + INTEGER :: n_la, n_ma + INTEGER :: n_ls, n_ms + CHARACTER(256) :: atmk_File, sfck_File + REAL(fp) :: Perturbation + REAL(16) :: Ratio_new(nsign), Ratio_old(nsign) + REAL(fp), PARAMETER :: TOLERANCE = 0.1_fp + REAL(fp) :: Reflectivity_Prtb(N_LAYERS), Reflectivity(N_LAYERS), Reflectivity_TL(N_LAYERS) + + ! ============================================================================ + ! 1. **** DEFINE THE CRTM INTERFACE STRUCTURES **** + ! + TYPE(CRTM_ChannelInfo_type) :: ChannelInfo(N_SENSORS) + TYPE(CRTM_Geometry_type) :: Geometry(N_PROFILES) + + ! Define the FORWARD variables + TYPE(CRTM_Atmosphere_type) :: Atm(N_PROFILES), Atm_Prtb(N_PROFILES) + TYPE(CRTM_Surface_type) :: Sfc(N_PROFILES) + TYPE(CRTM_RTSolution_type), ALLOCATABLE :: RTSolution(:,:) + TYPE(CRTM_RTSolution_type), ALLOCATABLE :: RTSolution_Perturb(:,:) + + ! Define the Tangent-Linear variables + TYPE(CRTM_Atmosphere_type) :: Atmosphere_TL(N_PROFILES) + !TYPE(CRTM_Atmosphere_type) :: Perturbation + TYPE(CRTM_Surface_type) :: Surface_TL(N_PROFILES) + TYPE(CRTM_RTSolution_type), ALLOCATABLE :: RTSolution_TL(:,:) + ! ============================================================================ + + ! Directory location of coefficients +! #ifdef LITTLE_ENDIAN + CHARACTER(*), PARAMETER :: ENDIAN_TYPE='little_endian' +! #else +! CHARACTER(*), PARAMETER :: ENDIAN_TYPE='big_endian' +!#endif + + + ! Aerosol/Cloud coefficient format + !CHARACTER(*), PARAMETER :: Coeff_Format = 'Binary' + CHARACTER(*), PARAMETER :: Coeff_Format = 'netCDF' + + ! Aerosol/Cloud coefficient scheme + CHARACTER(*), PARAMETER :: Aerosol_Model = 'CRTM' + !CHARACTER(*), PARAMETER :: Aerosol_Model = 'CMAQ' + !CHARACTER(*), PARAMETER :: Aerosol_Model = 'GOCART-GEOS5' + !CHARACTER(*), PARAMETER :: Aerosol_Model = 'NAAPS' + CHARACTER(*), PARAMETER :: Cloud_Model = 'CRTM' + + CHARACTER(256) :: AerosolCoeff_File + CHARACTER(256) :: AerosolCoeff_Format + CHARACTER(256) :: CloudCoeff_File + CHARACTER(256) :: CloudCoeff_Format + + ! Program header + ! -------------- + CALL CRTM_Version( Version ) + CALL Program_Message( PROGRAM_NAME, & + 'Program to provide a (relatively) simple example of how '//& + 'to call the CRTM K-Matrix function.', & + 'CRTM Version: '//TRIM(Version) ) + + + ! Get sensor id from user + ! ----------------------- + !WRITE( *,'(/5x,"Enter sensor id [hirs4_n18, amsua_metop-a, or mhs_n18]: ")',ADVANCE='NO' ) + !READ( *,'(a)' ) Sensor_Id + Sensor_Id = 'atms_n21' + Sensor_Id = ADJUSTL(Sensor_Id) + WRITE( *,'(//5x,"Running CRTM for ",a," sensor...")' ) TRIM(Sensor_Id) + + ! ============================================================================ + ! STEP 4. **** INITIALIZE THE CRTM **** + ! + ! 4a. Initialise all the sensors at once + ! -------------------------------------- + !.. Cloud coefficient information + IF ( Coeff_Format == 'Binary' ) THEN + CloudCoeff_Format = 'Binary' + CloudCoeff_File = 'CloudCoeff.bin' + ! if netCDF I/O + ELSE IF ( Coeff_Format == 'netCDF' ) THEN + CloudCoeff_Format = 'netCDF' + CloudCoeff_File = 'CloudCoeff_DDA_ARTS.nc4' + ELSE + message = 'Aerosol/Cloud coefficient format is not supported' + CALL Display_Message( PROGRAM_NAME, message, FAILURE ) + STOP + END IF + + !.....Aerosol + IF ( Aerosol_Model == 'CRTM' ) THEN + IF ( Coeff_Format == 'Binary' ) THEN + AerosolCoeff_Format = 'Binary' + AerosolCoeff_File = 'AerosolCoeff.bin' + ELSE IF ( Coeff_Format == 'netCDF' ) THEN + AerosolCoeff_Format = 'netCDF' + AerosolCoeff_File = 'AerosolCoeff.nc4' + ELSE + message = 'Aerosol coefficient format is not supported' + CALL Display_Message( PROGRAM_NAME, message, FAILURE ) + STOP + END IF + ELSEIF ( Aerosol_Model == 'CMAQ' ) THEN + IF ( Coeff_Format == 'Binary' ) THEN + AerosolCoeff_Format = 'Binary' + AerosolCoeff_File = 'AerosolCoeff.CMAQ.bin' + ELSE IF ( Coeff_Format == 'netCDF' ) THEN + AerosolCoeff_Format = 'netCDF' + AerosolCoeff_File = 'AerosolCoeff.CMAQ.nc4' + ELSE + message = 'Aerosol coefficient format is not supported' + CALL Display_Message( PROGRAM_NAME, message, FAILURE ) + STOP + END IF + ELSEIF ( Aerosol_Model == 'GOCART-GEOS5' ) THEN + IF ( Coeff_Format == 'Binary' ) THEN + AerosolCoeff_Format = 'Binary' + AerosolCoeff_File = 'AerosolCoeff.GOCART-GEOS5.bin' + ELSE IF ( Coeff_Format == 'netCDF' ) THEN + AerosolCoeff_Format = 'netCDF' + AerosolCoeff_File = 'AerosolCoeff.GOCART-GEOS5.nc4' + ELSE + message = 'Aerosol coefficient format is not supported' + CALL Display_Message( PROGRAM_NAME, message, FAILURE ) + STOP + END IF + ELSEIF ( Aerosol_Model == 'NAAPS' ) THEN + IF ( Coeff_Format == 'Binary' ) THEN + AerosolCoeff_Format = 'Binary' + AerosolCoeff_File = 'AerosolCoeff.NAAPS.bin' + ELSE IF ( Coeff_Format == 'netCDF' ) THEN + AerosolCoeff_Format = 'netCDF' + AerosolCoeff_File = 'AerosolCoeff.NAAPS.nc4' + ELSE + message = 'Aerosol coefficient format is not supported' + CALL Display_Message( PROGRAM_NAME, message, FAILURE ) + STOP + END IF + END IF + + ! ============================================================================ + ! 2. **** INITIALIZE THE CRTM **** + ! + ! 2a. This initializes the CRTM for the sensors + ! predefined in the example SENSOR_ID parameter. + ! NOTE: The coefficient data file path is hard- + ! wired for this example. + ! -------------------------------------------------- + WRITE( *,'(/5x,"Initializing the CRTM...")' ) + + error_status = CRTM_Init( (/ sensor_ID /), & + channelInfo, & + Aerosol_Model, & + AerosolCoeff_Format, & + AerosolCoeff_File, & + Cloud_Model, & + CloudCoeff_Format, & + CloudCoeff_File, & + File_Path=COEFFICIENTS_PATH, & + NC_File_Path=NC_COEFFICIENT_PATH, & + Quiet=.TRUE.) + + + IF ( Error_Status /= SUCCESS ) THEN + Message = 'Error initializing CRTM' + CALL Display_Message( PROGRAM_NAME, Message, FAILURE ) + STOP 1 + END IF + + ! 2b. Determine the total number of channels + ! for which the CRTM was initialized + ! ------------------------------------------ + n_Channels = SUM(CRTM_ChannelInfo_n_Channels(ChannelInfo)) + ! ============================================================================ + + + + + ! ============================================================================ + ! 3. **** ALLOCATE STRUCTURE ARRAYS **** + ! + ! 3a. Allocate the ARRAYS + ! ----------------------- + ! Note that only those structure arrays with a channel + ! dimension are allocated here because we've parameterized + ! the number of profiles in the N_PROFILES parameter. + ! + ! Users can make the number of profiles dynamic also, but + ! then the INPUT arrays (Atmosphere, Surface) will also have to be allocated. + ALLOCATE( RTSolution( n_Channels, N_PROFILES ), & + RTSolution_Perturb( n_Channels, N_PROFILES ), & + RTSolution_TL( n_Channels, N_PROFILES ), & + STAT = Allocate_Status ) + IF ( Allocate_Status /= 0 ) THEN + Message = 'Error allocating structure arrays' + CALL Display_Message( PROGRAM_NAME, Message, FAILURE ) + STOP 1 + END IF + + ! 3b. Allocate the STRUCTURES + ! --------------------------- + ! The input FORWARD structure + CALL CRTM_Atmosphere_Create( Atm, N_LAYERS, N_ABSORBERS, N_CLOUDS, N_AEROSOLS ) + IF ( ANY(.NOT. CRTM_Atmosphere_Associated(Atm)) ) THEN + Message = 'Error allocating CRTM Atmosphere structure' + CALL Display_Message( PROGRAM_NAME, Message, FAILURE ) + STOP 1 + END IF + Atm%Add_Extra_Layers = .FALSE. + + CALL CRTM_Atmosphere_Create( Atm_Prtb, N_LAYERS, N_ABSORBERS, N_CLOUDS, N_AEROSOLS ) + IF ( ANY(.NOT. CRTM_Atmosphere_Associated(Atm_Prtb)) ) THEN + Message = 'Error allocating CRTM Atmosphere structure' + CALL Display_Message( PROGRAM_NAME, Message, FAILURE ) + STOP 1 + END IF + Atm_Prtb%Add_Extra_Layers = .FALSE. + + ! The input TL structure + CALL CRTM_Atmosphere_Create( Atmosphere_TL, N_LAYERS, N_ABSORBERS, N_CLOUDS, N_AEROSOLS ) + IF ( ANY(.NOT. CRTM_Atmosphere_Associated(Atmosphere_TL)) ) THEN + Message = 'Error allocating CRTM Atmosphere_TL structure' + CALL Display_Message( PROGRAM_NAME, Message, FAILURE ) + STOP 1 + END IF + +CALL CRTM_RTSolution_Create(RTSolution,N_LAYERS) +CALL CRTM_RTSolution_Create(RTSolution_TL,N_LAYERS) +CALL CRTM_RTSolution_Create(RTSolution_Perturb,N_LAYERS) + + ! ============================================================================ + + + + + ! ============================================================================ + ! 4. **** ASSIGN INPUT DATA **** + ! + ! Fill the Atmosphere structure array. + ! NOTE: This is an example program for illustrative purposes only. + ! Typically, one would not assign the data as shown below, + ! but rather read it from file + + ! 4a. Atmosphere and Surface input + ! -------------------------------- + CALL Load_Atm_Data() + CALL Load_Sfc_Data() + + + Do ii=1,2 + atm(ii)%Height = Calculate_Height(Atm(ii)) + Atm(ii)%Cloud(1)%Type = SNOW_CLOUD + WHERE (Atm(ii)%Cloud(1)%Water_Content .GT. 0.0_fp) + Atm(ii)%Cloud(1)%Water_Content = 5 + END WHERE + + Atmosphere_TL(ii)%Climatology = atm(ii)%Climatology + Atmosphere_TL(ii)%Absorber_Id = atm(ii)%Absorber_Id + Atmosphere_TL(ii)%Absorber_Units = atm(ii)%Absorber_Units + Atmosphere_TL(ii)%Height = atm(ii)%Height + Atm_Prtb(ii) = Atm(ii) + END DO + SC(SensorIndex)%Is_Active_Sensor = .TRUE. + + ! 4b. GeometryInfo input + ! ---------------------- + ! All profiles are given the same value + ! The Sensor_Scan_Angle is optional. + CALL CRTM_Geometry_SetValue( Geometry, & + Sensor_Zenith_Angle = ZENITH_ANGLE, & + Sensor_Scan_Angle = SCAN_ANGLE ) + ! ============================================================================ + + + + + ! ============================================================================ + ! 5. **** INITIALIZE THE TL ARGUMENTS **** + ! + ! 5a. Zero the LT INPUT structures + ! --------------------------------------- + CALL CRTM_Atmosphere_Zero( Atmosphere_TL ) + CALL CRTM_Surface_Zero( Surface_TL ) + + ! ============================================================================ + ! 6. **** CALL THE CRTM FORWARD MODEL **** + ! + Error_Status = CRTM_Forward( Atm , & + Sfc , & + Geometry , & + ChannelInfo , & + RTSolution ) + IF ( Error_Status /= SUCCESS ) THEN + Message = 'Error in CRTM Forward Model' + CALL Display_Message( PROGRAM_NAME, Message, FAILURE ) + STOP 1 + END IF + + + + testresult = 0 + Ratio_old = 100.0_fp + + ilev = 70 + iprof = 1 + ichan = 3 !16 + Attenuated_Reflectivity = .TRUE. + + OPEN(500,FILE='convergence.txt',STATUS='UNKNOWN') + write(500, '(A)') 'Ratio should approach ZERO because it is ONE - [(R_Prtb - R) / R_TL)]' + write(500,'(2A)') 'Iter Refl (R) R_Prt - R R_TL WC_Prtb Ratio', & + ' -- R R_Prt - R R_TL WC_Prtb Ratio' + + write(*, '(A)') 'Ratio should approach ZERO because it is ONE - [(R_Prtb - R) / R_TL)]' + write(*,'(2A)') 'Iter Refl (R) R_Prt - R R_TL WC_Prtb Ratio', & + ' -- R R_Prt - R R_TL WC_Prtb Ratio' + + convergence_loop: DO ii = 1, 20 + sign = -1 ! we want to make sure both positive and negative signs converge + sign_loop: DO isign = 1, nsign + sign = -1 * sign + + Perturbation = Atm(1)%Cloud(1)%Water_Content(ilev)*(sign * 1.0_fp)/(2.0_fp**ii) + Atmosphere_TL(iprof)%Cloud(1)%Water_Content(ilev) = Perturbation + ! ============================================================================ + + !Atm(1)%Temperature(92) = Atm(1)%Temperature(92) + Perturbation + Atm_Prtb(iprof)%Cloud(1)%Water_Content(ilev) = Atm(iprof)%Cloud(1)%Water_Content(ilev) + Perturbation + + ! ============================================================================ + ! 6. **** CALL THE PERTURBED CRTM FORWARD MODEL **** + ! + Error_Status = CRTM_Forward( Atm_Prtb , & + Sfc , & + Geometry , & + ChannelInfo , & + RTSolution_Perturb ) + IF ( Error_Status /= SUCCESS ) THEN + Message = 'Error in perturbed CRTM Forward Model' + CALL Display_Message( PROGRAM_NAME, Message, FAILURE ) + STOP 1 + END IF + + + ! ============================================================================ + ! 6. **** CALL THE CRTM TANGENT-LINEAR MODEL **** + ! + Error_Status = CRTM_Tangent_Linear( Atm , & + Sfc , & + Atmosphere_TL , & + Surface_TL , & + Geometry , & + ChannelInfo , & + RTSolution , & + RTSolution_TL ) + IF ( Error_Status /= SUCCESS ) THEN + Message = 'Error in CRTM Tangent-linear Model' + CALL Display_Message( PROGRAM_NAME, Message, FAILURE ) + STOP 1 + END IF + + !WRITE(*,*) 'Tangent-linear Result: ', RTSolution_TL(ichan,iprof)%Reflectivity(ilev) + + ! ============================================================================ + + ! ============================================================================ + + + ! ============================================================================ + if (Attenuated_Reflectivity) THEN + Reflectivity_Prtb = RTSolution_Perturb(ichan,iprof)%Reflectivity_Attenuated + Reflectivity = RTSolution(ichan,iprof)%Reflectivity_Attenuated + Reflectivity_TL = RTSolution_TL(ichan,iprof)%Reflectivity_Attenuated + else + Reflectivity_Prtb = RTSolution_Perturb(ichan,iprof)%Reflectivity_Attenuated + Reflectivity = RTSolution(ichan,iprof)%Reflectivity_Attenuated + Reflectivity_TL = RTSolution_TL(ichan,iprof)%Reflectivity_Attenuated + endif + + Ratio_new(isign) = ONE - ((Reflectivity_Prtb(ilev) - Reflectivity(ilev)) / Reflectivity_TL(ilev)) + + + !do jj=70,80 + jj = ilev + write(500,'(I5, F8.3, 5F17.11)', advance='no') ii, Reflectivity(jj), Reflectivity_Prtb(jj) - Reflectivity(jj), Reflectivity_TL(jj), Perturbation, Ratio_new(isign) + + write(*,'(I5, F8.3, 5F17.11)', advance='no') ii, Reflectivity(jj), Reflectivity_Prtb(jj) - Reflectivity(jj), Reflectivity_TL(jj), Perturbation, Ratio_new(isign) + !ENDDO + + + ! Reassign Ratio for next iteration. + Ratio_old(isign) = Ratio_new(isign) + + END DO sign_loop + write(*,*) ! new line + write(500,*) ! new line + + + END DO convergence_loop + + ! ============================================================================ + ! 8. **** DESTROY THE CRTM **** + ! + WRITE( *, '( /5x, "Destroying the CRTM..." )' ) + Error_Status = CRTM_Destroy( ChannelInfo ) + IF ( Error_Status /= SUCCESS ) THEN + Message = 'Error destroying CRTM' + CALL Display_Message( PROGRAM_NAME, Message, FAILURE ) + STOP 1 + END IF + ! ============================================================================ + + + CLOSE(500) + + + + ! ============================================================================ + ! 10. **** CLEAN UP **** + ! + ! 10a. Deallocate the structures. + ! These are the explicitly allocated structures. + ! Note that in some cases other structures, such as the Sfc + ! and RTSolution structures, will also be allocated and thus + ! should also be deallocated here. + ! --------------------------------------------------------------- + CALL CRTM_Atmosphere_Destroy(Atmosphere_TL) + CALL CRTM_Atmosphere_Destroy(Atm) + + ! 10b. Deallocate the arrays + ! -------------------------- + DEALLOCATE(RTSolution, RTSolution_TL, & + STAT = Allocate_Status) + ! ============================================================================ + IF( ( testresult == 0 ) .AND. ( Ratio_old(1) < TOLERANCE ) .AND. ( Ratio_old(2) < TOLERANCE ) ) THEN + testresult = 0 + STOP 0 + ELSE + testresult = 1 + STOP 1 + END IF + + +CONTAINS + + INCLUDE 'Load_Atm_Data.inc' + INCLUDE 'Load_Sfc_Data.inc' + + SUBROUTINE Integrate_Reflectivity(Re, R) + IMPLICIT NONE + Real(fp), INTENT(IN) :: Re(:) + Real(fp), INTENT(OUT) :: R(:) + REAL(fp) :: Rs(SIZE(Re)) + REAL(fp), PARAMETER :: M3_to_MM6overM3 = 1.0d18 + + + WHERE (Re > -100) + Rs = 10.0_fp**(Re / 10.0_fp) / M3_to_MM6overM3 + ELSEWHERE + Rs = 0.0_fp + END WHERE + + R = Rs + !R = SUM(Rs) + + END SUBROUTINE Integrate_Reflectivity + +END PROGRAM test_TL_convergence diff --git a/test/mains/unit/Unit_Test/test_active_sensor.f90 b/test/mains/unit/Unit_Test/test_active_sensor.f90 new file mode 100644 index 0000000..d4d727a --- /dev/null +++ b/test/mains/unit/Unit_Test/test_active_sensor.f90 @@ -0,0 +1,378 @@ +! +! test_active_sensor +! +! Program to provide a (relatively) simple example of how +! to test the CRTM tangent-linear function. +! This code checks the convergence between the tangent-linear +! operator and the nonlinear CRTM Forward function when +! the magnitude of the atmospheric input state perturbation +! is step-wise reduced. +! The convergence should be monotonous, which it isn't right. +! For this reason the test in its current state will fai. +! +! +! Created by Isaac Moradi Isaac.Moradi@NASA.GOV +! June-22-2023 +! + +PROGRAM test_active_sensor + + ! ============================================================================ + ! **** ENVIRONMENT SETUP FOR RTM USAGE **** + ! + ! Module usage + USE CRTM_Module + USE CRTM_SpcCoeff, ONLY: SC + + !USE UnitTest_Define, ONLY: UnitTest_IsEqualWithin + ! Disable all implicit typing + IMPLICIT NONE + ! ============================================================================ + + + ! ---------- + ! Parameters + ! ---------- + CHARACTER(*), PARAMETER :: PROGRAM_NAME = 'test_active_sensor' + CHARACTER(*), PARAMETER :: RESULTS_PATH = './results/unit/' + CHARACTER(*), PARAMETER :: COEFFICIENTS_PATH = './testinput/' + CHARACTER(*), PARAMETER :: NC_COEFFICIENT_PATH='./testinput/' + + + ! ============================================================================ + ! 0. **** SOME SET UP PARAMETERS FOR THIS EXAMPLE **** + ! + ! Profile dimensions... + INTEGER, PARAMETER :: N_PROFILES = 2 + INTEGER, PARAMETER :: N_LAYERS = 92 + INTEGER, PARAMETER :: N_ABSORBERS = 2 + INTEGER, PARAMETER :: N_CLOUDS = 1 + INTEGER, PARAMETER :: N_AEROSOLS = 0 + ! ...but only ONE Sensor at a time + INTEGER, PARAMETER :: N_SENSORS = 1 + INTEGER, PARAMETER :: SensorIndex = 1 + + ! Test GeometryInfo angles. The test scan angle is based + ! on the default Re (earth radius) and h (satellite height) + REAL(fp), PARAMETER :: ZENITH_ANGLE = 1.0_fp + REAL(fp), PARAMETER :: SCAN_ANGLE = 1.0_fp + ! ============================================================================ + + + ! --------- + ! Variables + ! --------- + CHARACTER(256) :: Message + CHARACTER(256) :: Version + CHARACTER(256) :: Sensor_Id + INTEGER :: Error_Status + INTEGER :: Allocate_Status + INTEGER :: n_Channels + INTEGER :: l, m + INTEGER :: ii, jj, isign, sign, ilev, iprof, ichan + INTEGER, PARAMETER:: nsign=2 + INTEGER :: testresult + ! Declarations for Jacobian comparisons + INTEGER :: n_la, n_ma + INTEGER :: n_ls, n_ms + CHARACTER(256) :: atmk_File, sfck_File + REAL(fp) :: Perturbation + REAL(16) :: Ratio_new(nsign), Ratio_old(nsign) + REAL(fp), PARAMETER :: TOLERANCE = 0.1_fp + + + ! ============================================================================ + ! 1. **** DEFINE THE CRTM INTERFACE STRUCTURES **** + ! + TYPE(CRTM_ChannelInfo_type) :: ChannelInfo(N_SENSORS) + TYPE(CRTM_Geometry_type) :: Geometry(N_PROFILES) + + ! Define the FORWARD variables + TYPE(CRTM_Atmosphere_type) :: Atm(N_PROFILES) + TYPE(CRTM_Surface_type) :: Sfc(N_PROFILES) + TYPE(CRTM_RTSolution_type), ALLOCATABLE :: RTSolution(:,:) + + ! ============================================================================ + + ! Directory location of coefficients +! #ifdef LITTLE_ENDIAN + CHARACTER(*), PARAMETER :: ENDIAN_TYPE='little_endian' +! #else +! CHARACTER(*), PARAMETER :: ENDIAN_TYPE='big_endian' +!#endif + + + ! Aerosol/Cloud coefficient format + !CHARACTER(*), PARAMETER :: Coeff_Format = 'Binary' + CHARACTER(*), PARAMETER :: Coeff_Format = 'netCDF' + + ! Aerosol/Cloud coefficient scheme + CHARACTER(*), PARAMETER :: Aerosol_Model = 'CRTM' + !CHARACTER(*), PARAMETER :: Aerosol_Model = 'CMAQ' + !CHARACTER(*), PARAMETER :: Aerosol_Model = 'GOCART-GEOS5' + !CHARACTER(*), PARAMETER :: Aerosol_Model = 'NAAPS' + CHARACTER(*), PARAMETER :: Cloud_Model = 'CRTM' + + CHARACTER(256) :: AerosolCoeff_File + CHARACTER(256) :: AerosolCoeff_Format + CHARACTER(256) :: CloudCoeff_File + CHARACTER(256) :: CloudCoeff_Format + + ! Program header + ! -------------- + CALL CRTM_Version( Version ) + CALL Program_Message( PROGRAM_NAME, & + 'Program to provide a (relatively) simple example of how '//& + 'to call the CRTM K-Matrix function.', & + 'CRTM Version: '//TRIM(Version) ) + + + ! Get sensor id from user + ! ----------------------- + !WRITE( *,'(/5x,"Enter sensor id [hirs4_n18, amsua_metop-a, or mhs_n18]: ")',ADVANCE='NO' ) + !READ( *,'(a)' ) Sensor_Id + Sensor_Id = 'atms_n21' + Sensor_Id = ADJUSTL(Sensor_Id) + WRITE( *,'(//5x,"Running CRTM for ",a," sensor...")' ) TRIM(Sensor_Id) + + ! ============================================================================ + ! STEP 4. **** INITIALIZE THE CRTM **** + ! + ! 4a. Initialise all the sensors at once + ! -------------------------------------- + !.. Cloud coefficient information + IF ( Coeff_Format == 'Binary' ) THEN + CloudCoeff_Format = 'Binary' + CloudCoeff_File = 'CloudCoeff.bin' + ! if netCDF I/O + ELSE IF ( Coeff_Format == 'netCDF' ) THEN + CloudCoeff_Format = 'netCDF' + CloudCoeff_File = 'CloudCoeff_DDA_ARTS.nc4' + ELSE + message = 'Aerosol/Cloud coefficient format is not supported' + CALL Display_Message( PROGRAM_NAME, message, FAILURE ) + STOP + END IF + + !.....Aerosol + IF ( Aerosol_Model == 'CRTM' ) THEN + IF ( Coeff_Format == 'Binary' ) THEN + AerosolCoeff_Format = 'Binary' + AerosolCoeff_File = 'AerosolCoeff.bin' + ELSE IF ( Coeff_Format == 'netCDF' ) THEN + AerosolCoeff_Format = 'netCDF' + AerosolCoeff_File = 'AerosolCoeff.nc4' + ELSE + message = 'Aerosol coefficient format is not supported' + CALL Display_Message( PROGRAM_NAME, message, FAILURE ) + STOP + END IF + ELSEIF ( Aerosol_Model == 'CMAQ' ) THEN + IF ( Coeff_Format == 'Binary' ) THEN + AerosolCoeff_Format = 'Binary' + AerosolCoeff_File = 'AerosolCoeff.CMAQ.bin' + ELSE IF ( Coeff_Format == 'netCDF' ) THEN + AerosolCoeff_Format = 'netCDF' + AerosolCoeff_File = 'AerosolCoeff.CMAQ.nc4' + ELSE + message = 'Aerosol coefficient format is not supported' + CALL Display_Message( PROGRAM_NAME, message, FAILURE ) + STOP + END IF + ELSEIF ( Aerosol_Model == 'GOCART-GEOS5' ) THEN + IF ( Coeff_Format == 'Binary' ) THEN + AerosolCoeff_Format = 'Binary' + AerosolCoeff_File = 'AerosolCoeff.GOCART-GEOS5.bin' + ELSE IF ( Coeff_Format == 'netCDF' ) THEN + AerosolCoeff_Format = 'netCDF' + AerosolCoeff_File = 'AerosolCoeff.GOCART-GEOS5.nc4' + ELSE + message = 'Aerosol coefficient format is not supported' + CALL Display_Message( PROGRAM_NAME, message, FAILURE ) + STOP + END IF + ELSEIF ( Aerosol_Model == 'NAAPS' ) THEN + IF ( Coeff_Format == 'Binary' ) THEN + AerosolCoeff_Format = 'Binary' + AerosolCoeff_File = 'AerosolCoeff.NAAPS.bin' + ELSE IF ( Coeff_Format == 'netCDF' ) THEN + AerosolCoeff_Format = 'netCDF' + AerosolCoeff_File = 'AerosolCoeff.NAAPS.nc4' + ELSE + message = 'Aerosol coefficient format is not supported' + CALL Display_Message( PROGRAM_NAME, message, FAILURE ) + STOP + END IF + END IF + + ! ============================================================================ + ! 2. **** INITIALIZE THE CRTM **** + ! + ! 2a. This initializes the CRTM for the sensors + ! predefined in the example SENSOR_ID parameter. + ! NOTE: The coefficient data file path is hard- + ! wired for this example. + ! -------------------------------------------------- + WRITE( *,'(/5x,"Initializing the CRTM...")' ) + + error_status = CRTM_Init( (/ sensor_ID /), & + channelInfo, & + Aerosol_Model, & + AerosolCoeff_Format, & + AerosolCoeff_File, & + Cloud_Model, & + CloudCoeff_Format, & + CloudCoeff_File, & + File_Path=COEFFICIENTS_PATH, & + NC_File_Path=NC_COEFFICIENT_PATH, & + Quiet=.TRUE.) + + + IF ( Error_Status /= SUCCESS ) THEN + Message = 'Error initializing CRTM' + CALL Display_Message( PROGRAM_NAME, Message, FAILURE ) + STOP 1 + END IF + + ! 2b. Determine the total number of channels + ! for which the CRTM was initialized + ! ------------------------------------------ + n_Channels = SUM(CRTM_ChannelInfo_n_Channels(ChannelInfo)) + ! ============================================================================ + + + + + ! ============================================================================ + ! 3. **** ALLOCATE STRUCTURE ARRAYS **** + ! + ! 3a. Allocate the ARRAYS + ! ----------------------- + ! Note that only those structure arrays with a channel + ! dimension are allocated here because we've parameterized + ! the number of profiles in the N_PROFILES parameter. + ! + ! Users can make the number of profiles dynamic also, but + ! then the INPUT arrays (Atmosphere, Surface) will also have to be allocated. + ALLOCATE( RTSolution( n_Channels, N_PROFILES ), & + STAT = Allocate_Status ) + IF ( Allocate_Status /= 0 ) THEN + Message = 'Error allocating structure arrays' + CALL Display_Message( PROGRAM_NAME, Message, FAILURE ) + STOP 1 + END IF + + ! 3b. Allocate the STRUCTURES + ! --------------------------- + ! The input FORWARD structure + CALL CRTM_Atmosphere_Create( Atm, N_LAYERS, N_ABSORBERS, N_CLOUDS, N_AEROSOLS ) + IF ( ANY(.NOT. CRTM_Atmosphere_Associated(Atm)) ) THEN + Message = 'Error allocating CRTM Atmosphere structure' + CALL Display_Message( PROGRAM_NAME, Message, FAILURE ) + STOP 1 + END IF + Atm%Add_Extra_Layers = .FALSE. + + CALL CRTM_RTSolution_Create(RTSolution,N_LAYERS) + + ! ============================================================================ + + + ! ============================================================================ + ! 4. **** ASSIGN INPUT DATA **** + ! + ! Fill the Atmosphere structure array. + ! NOTE: This is an example program for illustrative purposes only. + ! Typically, one would not assign the data as shown below, + ! but rather read it from file + + ! 4a. Atmosphere and Surface input + ! -------------------------------- + CALL Load_Atm_Data() + CALL Load_Sfc_Data() + + + Do ii=1,2 + atm(ii)%Height = Calculate_Height(Atm(ii)) + Atm(ii)%Cloud(1)%Type = SNOW_CLOUD + WHERE (Atm(ii)%Cloud(1)%Water_Content .GT. 0.0_fp) + Atm(ii)%Cloud(1)%Water_Content = 5 + ENDWHERE + END DO + SC(SensorIndex)%Is_Active_Sensor = .TRUE. + + ! 4b. GeometryInfo input + ! ---------------------- + ! All profiles are given the same value + ! The Sensor_Scan_Angle is optional. + CALL CRTM_Geometry_SetValue( Geometry, & + Sensor_Zenith_Angle = ZENITH_ANGLE, & + Sensor_Scan_Angle = SCAN_ANGLE ) + ! ============================================================================ + + + ! ============================================================================ + ! 6. **** CALL THE CRTM FORWARD MODEL **** + ! + Error_Status = CRTM_Forward( Atm , & + Sfc , & + Geometry , & + ChannelInfo , & + RTSolution ) + IF ( Error_Status /= SUCCESS ) THEN + Message = 'Error in CRTM Forward Model' + CALL Display_Message( PROGRAM_NAME, Message, FAILURE ) + STOP 1 + END IF + + + ilev = 70 + iprof = 1 + ichan = 16 + + + OPEN(500,FILE='reflectivity.txt',STATUS='UNKNOWN') + write(500,'(4A40)') 'Layer', 'Water Content', 'Reflectivity', 'Attenuated Reflectivity' + write(*,'(4A40)') 'Layer', 'Water Content', 'Reflectivity', 'Attenuated Reflectivity' + DO ii=1,n_layers + write(500,'(i40,f40.5,f40.5,f40.5)') ii, Atm(1)%Cloud(1)%Water_Content(ii), RTSolution(ichan,iprof)%Reflectivity(ii), RTSolution(ichan,iprof)%Reflectivity_Attenuated(ii) + write(*,'(i40,f40.5,f40.5,f40.5)') ii, Atm(1)%Cloud(1)%Water_Content(ii), RTSolution(ichan,iprof)%Reflectivity(ii), RTSolution(ichan,iprof)%Reflectivity_Attenuated(ii) + ENDDO + CLOSE(500) + + + ! ============================================================================ + ! 8. **** DESTROY THE CRTM **** + ! + WRITE( *, '( /5x, "Destroying the CRTM..." )' ) + Error_Status = CRTM_Destroy( ChannelInfo ) + IF ( Error_Status /= SUCCESS ) THEN + Message = 'Error destroying CRTM' + CALL Display_Message( PROGRAM_NAME, Message, FAILURE ) + STOP 1 + END IF + ! ============================================================================ + + ! ============================================================================ + ! 10. **** CLEAN UP **** + ! + ! 10a. Deallocate the structures. + ! These are the explicitly allocated structures. + ! Note that in some cases other structures, such as the Sfc + ! and RTSolution structures, will also be allocated and thus + ! should also be deallocated here. + ! --------------------------------------------------------------- + CALL CRTM_Atmosphere_Destroy(Atm) + + ! 10b. Deallocate the arrays + ! -------------------------- + DEALLOCATE(RTSolution, & + STAT = Allocate_Status) + + +CONTAINS + + INCLUDE 'Load_Atm_Data.inc' + INCLUDE 'Load_Sfc_Data.inc' + +END PROGRAM test_active_sensor