37 PUBLIC ::
OPERATOR(==)
52 INTERFACE OPERATOR(==)
54 END INTERFACE OPERATOR(==)
62 '$Id: AerosolCoeff_Define.f90 60152 2015-08-13 19:19:13Z paul.vandelst@noaa.gov $' 67 INTEGER,
PARAMETER ::
sl = 80
68 INTEGER,
PARAMETER ::
ml = 256
70 REAL(Double),
PARAMETER ::
zero = 0.0_double
82 LOGICAL :: is_allocated = .false.
84 CHARACTER(SL) :: data_source =
'' 86 INTEGER(Long) :: n_wavelengths = 0
87 INTEGER(Long) :: n_radii = 0
88 INTEGER(Long) :: n_types = 0
89 INTEGER(Long) :: n_rh = 0
90 INTEGER(Long) :: max_legendre_terms = 0
91 INTEGER(Long) :: n_legendre_terms = 0
92 INTEGER(Long) :: max_phase_elements = 0
93 INTEGER(Long) :: n_phase_elements = 0
95 INTEGER(Long),
ALLOCATABLE ::
Type(:)
96 CHARACTER(SL),
ALLOCATABLE :: type_name(:)
97 REAL(Double),
ALLOCATABLE :: wavelength(:)
98 REAL(Double),
ALLOCATABLE :: frequency(:)
99 REAL(Double),
ALLOCATABLE :: reff(:,:)
100 REAL(Double),
ALLOCATABLE :: rh(:)
102 REAL(Double),
ALLOCATABLE :: ke(:,:,:)
103 REAL(Double),
ALLOCATABLE :: w(:,:,:)
104 REAL(Double),
ALLOCATABLE :: g(:,:,:)
105 REAL(Double),
ALLOCATABLE :: pcoeff(:,:,:,:,:)
159 status = aerosolcoeff%Is_Allocated
187 aerosolcoeff%Is_Allocated = .false.
188 aerosolcoeff%n_Wavelengths = 0
189 aerosolcoeff%n_Radii = 0
190 aerosolcoeff%n_Types = 0
191 aerosolcoeff%n_RH = 0
192 aerosolcoeff%Max_Legendre_Terms = 0
193 aerosolcoeff%n_Legendre_Terms = 0
194 aerosolcoeff%Max_Phase_Elements = 0
195 aerosolcoeff%n_Phase_Elements = 0
284 INTEGER,
INTENT(IN) :: n_wavelengths
285 INTEGER,
INTENT(IN) :: n_radii
286 INTEGER,
INTENT(IN) :: n_types
287 INTEGER,
INTENT(IN) :: n_rh
288 INTEGER,
INTENT(IN) :: n_legendre_terms
289 INTEGER,
INTENT(IN) :: n_phase_elements
291 CHARACTER(*),
PARAMETER :: routine_name =
'AerosolCoeff_Create' 293 INTEGER :: alloc_stat
296 IF ( n_wavelengths < 1 .OR. &
300 n_legendre_terms < 0 .OR. &
301 n_phase_elements < 1 )
RETURN 305 ALLOCATE( aerosolcoeff%Type( n_types ), &
306 aerosolcoeff%Type_Name( n_types ), &
307 aerosolcoeff%Wavelength( n_wavelengths ), &
308 aerosolcoeff%Frequency( n_wavelengths ), &
309 aerosolcoeff%Reff( n_radii, n_types ), &
310 aerosolcoeff%RH( n_rh ), &
311 aerosolcoeff%ke( n_wavelengths, n_radii, n_types ), &
312 aerosolcoeff%w( n_wavelengths, n_radii, n_types ), &
313 aerosolcoeff%g( n_wavelengths, n_radii, n_types ), &
314 aerosolcoeff%pcoeff( n_wavelengths , &
317 0:n_legendre_terms, &
318 n_phase_elements ), &
320 IF ( alloc_stat /= 0 )
RETURN 325 aerosolcoeff%n_Types = n_types
326 aerosolcoeff%n_Wavelengths = n_wavelengths
327 aerosolcoeff%n_Radii = n_radii
328 aerosolcoeff%n_RH = n_rh
329 aerosolcoeff%Max_Legendre_Terms = n_legendre_terms
330 aerosolcoeff%n_Legendre_Terms = n_legendre_terms
331 aerosolcoeff%Max_Phase_Elements = n_phase_elements
332 aerosolcoeff%n_Phase_Elements = n_phase_elements
334 aerosolcoeff%Type = 0
335 aerosolcoeff%Type_Name =
'' 336 aerosolcoeff%Wavelength =
zero 337 aerosolcoeff%Frequency =
zero 338 aerosolcoeff%Reff =
zero 339 aerosolcoeff%RH =
zero 340 aerosolcoeff%ke =
zero 341 aerosolcoeff%w =
zero 342 aerosolcoeff%g =
zero 343 aerosolcoeff%pcoeff =
zero 347 aerosolcoeff%Is_Allocated = .true.
377 WRITE(*,
'(1x,"AerosolCoeff OBJECT")')
378 WRITE(*,
'(3x,"Data source :",1x,a )') trim(aerosolcoeff%Data_Source)
379 WRITE(*,
'(3x,"n_Wavelengths :",1x,i0)') aerosolcoeff%n_Wavelengths
380 WRITE(*,
'(3x,"n_Radii :",1x,i0)') aerosolcoeff%n_Radii
381 WRITE(*,
'(3x,"n_Types :",1x,i0)') aerosolcoeff%n_Types
382 WRITE(*,
'(3x,"n_RH :",1x,i0)') aerosolcoeff%n_RH
383 WRITE(*,
'(3x,"n_Legendre_Terms :",1x,i0)') aerosolcoeff%n_Legendre_Terms
384 WRITE(*,
'(3x,"n_Phase_Elements :",1x,i0)') aerosolcoeff%n_Phase_Elements
386 WRITE(*,
'(3x,"AerosolCoeff Type_Name:")')
387 DO i = 1, aerosolcoeff%n_Types
388 IF ( aerosolcoeff%Type(i) < 1 .OR. &
389 aerosolcoeff%Type(i) > aerosolcoeff%n_Types )
THEN 390 WRITE(*,
'(5x,i2,") Invalid type")') i
392 WRITE(*,
'(5x,i2,") ",a)') i, trim(aerosolcoeff%Type_Name(i))
395 WRITE(*,
'(3x,"AerosolCoeff Wavelength:")')
396 WRITE(*,
'(5(1x,es13.6,:))') aerosolcoeff%Wavelength
397 WRITE(*,
'(3x,"AerosolCoeff Frequency :")')
398 WRITE(*,
'(5(1x,es13.6,:))') aerosolcoeff%Frequency
399 WRITE(*,
'(3x,"AerosolCoeff Reff :")')
400 WRITE(*,
'(5(1x,es13.6,:))') aerosolcoeff%Reff
401 WRITE(*,
'(3x,"AerosolCoeff RH :")')
402 WRITE(*,
'(5(1x,es13.6,:))') aerosolcoeff%RH
403 WRITE(*,
'(3x,"AerosolCoeff ke :")')
404 WRITE(*,
'(5(1x,es13.6,:))') aerosolcoeff%ke
405 WRITE(*,
'(3x,"AerosolCoeff w :")')
406 WRITE(*,
'(5(1x,es13.6,:))') aerosolcoeff%w
407 WRITE(*,
'(3x,"AerosolCoeff g :")')
408 WRITE(*,
'(5(1x,es13.6,:))') aerosolcoeff%g
409 WRITE(*,
'(3x,"AerosolCoeff pcoeff :")')
410 WRITE(*,
'(5(1x,es13.6,:))') aerosolcoeff%pcoeff
448 CHARACTER(*),
PARAMETER :: routine_name =
'AerosolCoeff_ValidRelease' 459 WRITE( msg,
'("A AerosolCoeff data update is needed. ", & 460 &"AerosolCoeff release is ",i0, & 461 &". Valid release is ",i0,"." )' ) &
471 WRITE( msg,
'("A AerosolCoeff software update is needed. ", & 472 &"AerosolCoeff release is ",i0, & 473 &". Valid release is ",i0,"." )' ) &
516 CHARACTER(*),
INTENT(OUT) :: info
518 INTEGER,
PARAMETER :: carriage_return = 13
519 INTEGER,
PARAMETER :: linefeed = 10
521 CHARACTER(2000) :: long_string
524 WRITE( long_string, &
525 '(a,1x,"AerosolCoeff RELEASE.VERSION: ",i2,".",i2.2,2x, & 526 &"N_WAVELENGTHS=",i4,2x,& 530 &"N_LEGENDRE_TERMS=",i2,2x,& 531 &"N_PHASE_ELEMENTS=",i2 )' ) &
532 achar(carriage_return)//achar(linefeed), &
533 aerosolcoeff%Release, aerosolcoeff%Version, &
534 aerosolcoeff%n_Wavelengths , &
535 aerosolcoeff%n_Radii , &
536 aerosolcoeff%n_Types , &
537 aerosolcoeff%n_RH , &
538 aerosolcoeff%n_Legendre_Terms, &
539 aerosolcoeff%n_Phase_Elements
543 info = long_string(1:
min(len(info), len_trim(long_string)))
603 CHARACTER(*),
INTENT(OUT) :: id
664 IF ( (x%n_Wavelengths /= y%n_Wavelengths ) .OR. &
665 (x%n_Radii /= y%n_Radii ) .OR. &
666 (x%n_Types /= y%n_Types ) .OR. &
667 (x%n_RH /= y%n_RH ) .OR. &
668 (x%Max_Legendre_Terms /= y%Max_Legendre_Terms) .OR. &
669 (x%n_Legendre_Terms /= y%n_Legendre_Terms ) .OR. &
670 (x%Max_Phase_Elements /= y%Max_Phase_Elements) .OR. &
671 (x%n_Phase_Elements /= y%n_Phase_Elements ) )
RETURN 673 IF ( all(x%Type == y%Type ) .AND. &
674 all(x%Type_Name == y%Type_Name ) .AND. &
675 all(x%Wavelength .equalto. y%Wavelength ) .AND. &
676 all(x%Frequency .equalto. y%Frequency ) .AND. &
677 all(x%Reff .equalto. y%Reff ) .AND. &
678 all(x%RH .equalto. y%RH ) .AND. &
679 all(x%ke .equalto. y%ke ) .AND. &
680 all(x%w .equalto. y%w ) .AND. &
681 all(x%g .equalto. y%g ) .AND. &
682 all(x%pcoeff .equalto. y%pcoeff ) ) &
integer, parameter, public failure
subroutine, public aerosolcoeff_inspect(AerosolCoeff)
real(double), parameter zero
elemental real(fp) function, public micron_to_inverse_cm(Wavelength)
integer, parameter, public long
integer, parameter, public fp
integer, parameter aerosolcoeff_version
integer, parameter, public double
subroutine, public aerosolcoeff_defineversion(Id)
elemental subroutine, public aerosolcoeff_destroy(AerosolCoeff)
elemental logical function, public aerosolcoeff_associated(AerosolCoeff)
elemental logical function aerosolcoeff_equal(x, y)
recursive subroutine, public display_message(Routine_Name, Message, Error_State, Message_Log)
elemental subroutine, public aerosolcoeff_create(AerosolCoeff, n_Wavelengths, n_Radii, n_Types, n_RH, n_Legendre_Terms, n_Phase_Elements)
subroutine, public aerosolcoeff_info(AerosolCoeff, Info)
character(*), parameter module_version_id
elemental subroutine, public aerosolcoeff_frequency(AerosolCoeff)
logical function, public aerosolcoeff_validrelease(AerosolCoeff)
integer, parameter, public success
integer, parameter, public information
integer, parameter aerosolcoeff_release