FV3 Bundle
IRwaterCoeff_Define.f90
Go to the documentation of this file.
1 !
2 ! IRwaterCoeff_Define
3 !
4 ! Module defining the IRwaterCoeff object to hold coefficient
5 ! data for the infrared water surface emissivity and reflectivity models.
6 !
7 !
8 ! CREATION HISTORY:
9 ! Written by: Paul van Delst, 19-Aug-2011
10 ! paul.vandelst@noaa.gov
11 
13 
14  ! -----------------
15  ! Environment setup
16  ! -----------------
17  ! Module use
18  USE type_kinds , ONLY: fp, long, double
20  USE compare_float_numbers, ONLY: OPERATOR(.equalto.)
25  ! Disable implicit typing
26  IMPLICIT NONE
27 
28 
29  ! ------------
30  ! Visibilities
31  ! ------------
32  ! Everything private by default
33  PRIVATE
34  ! Datatypes
35  PUBLIC :: irwatercoeff_type
36  ! Operators
37  PUBLIC :: OPERATOR(==)
38  ! Procedures
39  PUBLIC :: irwatercoeff_associated
40  PUBLIC :: irwatercoeff_destroy
41  PUBLIC :: irwatercoeff_create
42  PUBLIC :: irwatercoeff_inspect
44  PUBLIC :: irwatercoeff_info
46  PUBLIC :: irwatercoeff_inquirefile
47  PUBLIC :: irwatercoeff_readfile
48  PUBLIC :: irwatercoeff_writefile
49 
50 
51  ! ---------------------
52  ! Procedure overloading
53  ! ---------------------
54  INTERFACE OPERATOR(==)
55  MODULE PROCEDURE irwatercoeff_equal
56  END INTERFACE OPERATOR(==)
57 
58 
59  ! -----------------
60  ! Module parameters
61  ! -----------------
62  CHARACTER(*), PARAMETER :: module_version_id = &
63  '$Id: IRwaterCoeff_Define.f90 60152 2015-08-13 19:19:13Z paul.vandelst@noaa.gov $'
64  ! Current valid release and version
65  INTEGER, PARAMETER :: irwatercoeff_release = 3 ! This determines structure and file formats.
66  INTEGER, PARAMETER :: irwatercoeff_version = 2 ! This is just the default data version.
67  ! Close status for write errors
68  CHARACTER(*), PARAMETER :: write_error_status = 'DELETE'
69  ! Literal constants
70  REAL(fp), PARAMETER :: zero = 0.0_fp
71  REAL(fp), PARAMETER :: one = 1.0_fp
72  ! Conversion constants
73  REAL(fp), PARAMETER :: pi = 3.141592653589793238462643383279_fp
74  REAL(fp), PARAMETER :: degrees_to_radians = pi / 180.0_fp
75  ! String lengths
76  INTEGER, PARAMETER :: ml = 256 ! Message length
77 
78 
79  ! ----------------------------------
80  ! IRwaterCoeff data type definitions
81  ! ----------------------------------
82  !:tdoc+:
84  ! Allocation indicator
85  LOGICAL :: is_allocated = .false.
86  ! Release and version information
87  INTEGER(Long) :: release = irwatercoeff_release
88  INTEGER(Long) :: version = irwatercoeff_version
89  ! Dimensions
90  INTEGER(Long) :: n_angles = 0 ! I dimension
91  INTEGER(Long) :: n_frequencies = 0 ! L dimension
92  INTEGER(Long) :: n_wind_speeds = 0 ! N dimension
93  ! Dimensional vectors
94  REAL(Double), ALLOCATABLE :: angle(:) ! I
95  REAL(Double), ALLOCATABLE :: frequency(:) ! L
96  REAL(Double), ALLOCATABLE :: wind_speed(:) ! N
97  ! Emissivity LUT data
98  REAL(Double), ALLOCATABLE :: emissivity(:,:,:) ! I x L x N
99  ! Transformed dimensional vectors
100  REAL(Double), ALLOCATABLE :: secant_angle(:) ! I
101  END TYPE irwatercoeff_type
102  !:tdoc-:
103 
104 
105 CONTAINS
106 
107 
108 !################################################################################
109 !################################################################################
110 !## ##
111 !## ## PUBLIC MODULE ROUTINES ## ##
112 !## ##
113 !################################################################################
114 !################################################################################
115 
116 !--------------------------------------------------------------------------------
117 !:sdoc+:
118 !
119 ! NAME:
120 ! IRwaterCoeff_Associated
121 !
122 ! PURPOSE:
123 ! Elemental function to test the status of the allocatable components
124 ! of the IRwaterCoeff structure.
125 !
126 ! CALLING SEQUENCE:
127 ! Status = IRwaterCoeff_Associated( IRwaterCoeff )
128 !
129 ! OBJECTS:
130 ! IRwaterCoeff: Structure which is to have its member's
131 ! status tested.
132 ! UNITS: N/A
133 ! TYPE: IRwaterCoeff_type
134 ! DIMENSION: Scalar or any rank
135 ! ATTRIBUTES: INTENT(IN)
136 !
137 ! FUNCTION RESULT:
138 ! Status: The return value is a logical value indicating the
139 ! status of the NLTE members.
140 ! .TRUE. - if ANY of the IRwaterCoeff allocatable members
141 ! are in use.
142 ! .FALSE. - if ALL of the IRwaterCoeff allocatable members
143 ! are not in use.
144 ! UNITS: N/A
145 ! TYPE: LOGICAL
146 ! DIMENSION: Same as input
147 !
148 !:sdoc-:
149 !--------------------------------------------------------------------------------
150 
151  ELEMENTAL FUNCTION irwatercoeff_associated( self ) RESULT( Status )
152  TYPE(irwatercoeff_type), INTENT(IN) :: self
153  LOGICAL :: status
154  status = self%Is_Allocated
155  END FUNCTION irwatercoeff_associated
156 
157 
158 !--------------------------------------------------------------------------------
159 !:sdoc+:
160 !
161 ! NAME:
162 ! IRwaterCoeff_Destroy
163 !
164 ! PURPOSE:
165 ! Elemental subroutine to re-initialize IRwaterCoeff objects.
166 !
167 ! CALLING SEQUENCE:
168 ! CALL IRwaterCoeff_Destroy( IRwaterCoeff )
169 !
170 ! OBJECTS:
171 ! IRwaterCoeff: Re-initialized IRwaterCoeff structure.
172 ! UNITS: N/A
173 ! TYPE: IRwaterCoeff_type
174 ! DIMENSION: Scalar or any rank
175 ! ATTRIBUTES: INTENT(OUT)
176 !
177 !:sdoc-:
178 !--------------------------------------------------------------------------------
179 
180  ELEMENTAL SUBROUTINE irwatercoeff_destroy( self )
181  TYPE(irwatercoeff_type), INTENT(OUT) :: self
182  self%Is_Allocated = .false.
183  END SUBROUTINE irwatercoeff_destroy
184 
185 
186 !--------------------------------------------------------------------------------
187 !:sdoc+:
188 !
189 ! NAME:
190 ! IRwaterCoeff_Create
191 !
192 ! PURPOSE:
193 ! Elemental subroutine to create an instance of an IRwaterCoeff object.
194 !
195 ! CALLING SEQUENCE:
196 ! CALL IRwaterCoeff_Create( IRwaterCoeff , &
197 ! n_Angles , &
198 ! n_Frequencies, &
199 ! n_Wind_Speeds )
200 !
201 ! OBJECTS:
202 ! IRwaterCoeff: IRwaterCoeff object structure.
203 ! UNITS: N/A
204 ! TYPE: IRwaterCoeff_type
205 ! DIMENSION: Scalar or any rank
206 ! ATTRIBUTES: INTENT(OUT)
207 !
208 ! INPUTS:
209 ! n_Angles: Number of angles dimension.
210 ! Must be > 0.
211 ! UNITS: N/A
212 ! TYPE: INTEGER
213 ! DIMENSION: Conformable with the IRwaterCoeff object
214 ! ATTRIBUTES: INTENT(IN)
215 !
216 ! n_Frequencies: Number of frequencies dimension.
217 ! Must be > 0.
218 ! UNITS: N/A
219 ! TYPE: INTEGER
220 ! DIMENSION: Conformable with the IRwaterCoeff object
221 ! ATTRIBUTES: INTENT(IN)
222 !
223 ! n_Wind_Speeds: Number of wind speeds dimension.
224 ! Must be > 0.
225 ! UNITS: N/A
226 ! TYPE: INTEGER
227 ! DIMENSION: Conformable with the IRwaterCoeff object
228 ! ATTRIBUTES: INTENT(IN)
229 !
230 !:sdoc-:
231 !--------------------------------------------------------------------------------
232 
233  ELEMENTAL SUBROUTINE irwatercoeff_create( &
234  self , & ! Output
235  n_Angles , & ! Input
236  n_Frequencies, & ! Input
237  n_Wind_Speeds ) ! Input
238  ! Arguments
239  TYPE(irwatercoeff_type), INTENT(OUT) :: self
240  INTEGER , INTENT(IN) :: n_angles
241  INTEGER , INTENT(IN) :: n_frequencies
242  INTEGER , INTENT(IN) :: n_wind_speeds
243  ! Local variables
244  INTEGER :: alloc_stat
245 
246  ! Check input
247  IF ( n_angles < 1 .OR. &
248  n_frequencies < 1 .OR. &
249  n_wind_speeds < 1 ) RETURN
250 
251 
252  ! Perform the allocation
253  ALLOCATE( self%Angle( n_angles ), &
254  self%Frequency( n_frequencies ), &
255  self%Wind_Speed( n_wind_speeds ), &
256  self%Emissivity( n_angles, n_frequencies, n_wind_speeds ), &
257  self%Secant_Angle( n_angles ), &
258  stat = alloc_stat )
259  IF ( alloc_stat /= 0 ) RETURN
260 
261 
262  ! Initialise
263  ! ...Dimensions
264  self%n_Angles = n_angles
265  self%n_Frequencies = n_frequencies
266  self%n_Wind_Speeds = n_wind_speeds
267  ! ...Arrays
268  self%Angle = zero
269  self%Frequency = zero
270  self%Wind_Speed = zero
271  self%Emissivity = zero
272  self%Secant_Angle = zero
273 
274  ! Set allocation indicator
275  self%Is_Allocated = .true.
276 
277  END SUBROUTINE irwatercoeff_create
278 
279 
280 !--------------------------------------------------------------------------------
281 !:sdoc+:
282 !
283 ! NAME:
284 ! IRwaterCoeff_Inspect
285 !
286 ! PURPOSE:
287 ! Subroutine to print the contents of a IRwaterCoeff object to stdout.
288 !
289 ! CALLING SEQUENCE:
290 ! CALL IRwaterCoeff_Inspect( IRwaterCoeff )
291 !
292 ! OBJECTS:
293 ! IRwaterCoeff: IRwaterCoeff object to display.
294 ! UNITS: N/A
295 ! TYPE: IRwaterCoeff_type
296 ! DIMENSION: Scalar
297 ! ATTRIBUTES: INTENT(IN)
298 !
299 !:sdoc-:
300 !--------------------------------------------------------------------------------
301 
302  SUBROUTINE irwatercoeff_inspect( self )
303  TYPE(irwatercoeff_type), INTENT(IN) :: self
304  INTEGER :: i2, i3
305  WRITE(*,'(1x,"IRwaterCoeff OBJECT")')
306  ! Release/version info
307  WRITE(*,'(3x,"Release.Version :",1x,i0,".",i0)') self%Release, self%Version
308  ! Dimensions
309  WRITE(*,'(3x,"n_Angles :",1x,i0)') self%n_Angles
310  WRITE(*,'(3x,"n_Frequencies :",1x,i0)') self%n_Frequencies
311  WRITE(*,'(3x,"n_Wind_Speeds :",1x,i0)') self%n_Wind_Speeds
312  IF ( .NOT. irwatercoeff_associated(self) ) RETURN
313  ! Dimension arrays
314  WRITE(*,'(3x,"Angle :")')
315  WRITE(*,'(5(1x,es13.6,:))') self%Angle
316  WRITE(*,'(3x,"Frequency :")')
317  WRITE(*,'(5(1x,es13.6,:))') self%Frequency
318  WRITE(*,'(3x,"Wind_Speed :")')
319  WRITE(*,'(5(1x,es13.6,:))') self%Wind_Speed
320  ! Emissivity array
321  WRITE(*,'(3x,"Emissivity :")')
322  DO i3 = 1, self%n_Wind_Speeds
323  WRITE(*,'(5x,"WIND_SPEED :",es13.6)') self%Wind_Speed(i3)
324  DO i2 = 1, self%n_Frequencies
325  WRITE(*,'(5x,"FREQUENCY :",es13.6)') self%Frequency(i2)
326  WRITE(*,'(5(1x,es13.6,:))') self%Emissivity(:,i2,i3)
327  END DO
328  END DO
329  END SUBROUTINE irwatercoeff_inspect
330 
331 
332 
333 !----------------------------------------------------------------------------------
334 !:sdoc+:
335 !
336 ! NAME:
337 ! IRwaterCoeff_ValidRelease
338 !
339 ! PURPOSE:
340 ! Function to check the IRwaterCoeff Release value.
341 !
342 ! CALLING SEQUENCE:
343 ! IsValid = IRwaterCoeff_ValidRelease( IRwaterCoeff )
344 !
345 ! INPUTS:
346 ! IRwaterCoeff: IRwaterCoeff object for which the Release component
347 ! is to be checked.
348 ! UNITS: N/A
349 ! TYPE: IRwaterCoeff_type
350 ! DIMENSION: Scalar
351 ! ATTRIBUTES: INTENT(IN)
352 !
353 ! FUNCTION RESULT:
354 ! IsValid: Logical value defining the release validity.
355 ! UNITS: N/A
356 ! TYPE: LOGICAL
357 ! DIMENSION: Scalar
358 !
359 !:sdoc-:
360 !----------------------------------------------------------------------------------
361 
362  FUNCTION irwatercoeff_validrelease( self ) RESULT( IsValid )
363  ! Arguments
364  TYPE(irwatercoeff_type), INTENT(IN) :: self
365  ! Function result
366  LOGICAL :: isvalid
367  ! Local parameters
368  CHARACTER(*), PARAMETER :: routine_name = 'IRwaterCoeff_ValidRelease'
369  ! Local variables
370  CHARACTER(ML) :: msg
371 
372  ! Set up
373  isvalid = .true.
374 
375 
376  ! Check release is not too old
377  IF ( self%Release < irwatercoeff_release ) THEN
378  isvalid = .false.
379  WRITE( msg,'("An IRwaterCoeff data update is needed. ", &
380  &"IRwaterCoeff release is ",i0,". Valid release is ",i0,"." )' ) &
381  self%Release, irwatercoeff_release
382  CALL display_message( routine_name, msg, information ); RETURN
383  END IF
384 
385 
386  ! Check release is not too new
387  IF ( self%Release > irwatercoeff_release ) THEN
388  isvalid = .false.
389  WRITE( msg,'("An IRwaterCoeff software update is needed. ", &
390  &"IRwaterCoeff release is ",i0,". Valid release is ",i0,"." )' ) &
391  self%Release, irwatercoeff_release
392  CALL display_message( routine_name, msg, information ); RETURN
393  END IF
394 
395  END FUNCTION irwatercoeff_validrelease
396 
397 
398 !--------------------------------------------------------------------------------
399 !:sdoc+:
400 !
401 ! NAME:
402 ! IRwaterCoeff_Info
403 !
404 ! PURPOSE:
405 ! Subroutine to return a string containing version and dimension
406 ! information about a IRwaterCoeff object.
407 !
408 ! CALLING SEQUENCE:
409 ! CALL IRwaterCoeff_Info( IRwaterCoeff, Info )
410 !
411 ! OBJECTS:
412 ! IRwaterCoeff: IRwaterCoeff object about which info is required.
413 ! UNITS: N/A
414 ! TYPE: IRwaterCoeff_type
415 ! DIMENSION: Scalar
416 ! ATTRIBUTES: INTENT(IN)
417 !
418 ! OUTPUTS:
419 ! Info: String containing version and dimension information
420 ! about the IRwaterCoeff object.
421 ! UNITS: N/A
422 ! TYPE: CHARACTER(*)
423 ! DIMENSION: Scalar
424 ! ATTRIBUTES: INTENT(OUT)
425 !
426 !:sdoc-:
427 !--------------------------------------------------------------------------------
428 
429  SUBROUTINE irwatercoeff_info( self, Info )
430  ! Arguments
431  TYPE(irwatercoeff_type), INTENT(IN) :: self
432  CHARACTER(*), INTENT(OUT) :: info
433  ! Parameters
434  INTEGER, PARAMETER :: carriage_return = 13
435  INTEGER, PARAMETER :: linefeed = 10
436  ! Local variables
437  CHARACTER(2000) :: long_string
438 
439  ! Write the required data to the local string
440  WRITE( long_string, &
441  '( a,1x,"IRwaterCoeff RELEASE.VERSION: ", i2, ".", i2.2, 2x, &
442  &"N_ANGLES=",i3,2x,&
443  &"N_FREQUENCIES=",i5,2x,&
444  &"N_WIND_SPEEDS=",i3 )' ) &
445  achar(carriage_return)//achar(linefeed), &
446  self%Release, self%Version, &
447  self%n_Angles, &
448  self%n_Frequencies, &
449  self%n_Wind_Speeds
450 
451  ! Trim the output based on the
452  ! dummy argument string length
453  info = long_string(1:min(len(info), len_trim(long_string)))
454 
455  END SUBROUTINE irwatercoeff_info
456 
457 
458 !--------------------------------------------------------------------------------
459 !:sdoc+:
460 !
461 ! NAME:
462 ! IRwaterCoeff_DefineVersion
463 !
464 ! PURPOSE:
465 ! Subroutine to return the module version information.
466 !
467 ! CALLING SEQUENCE:
468 ! CALL IRwaterCoeff_DefineVersion( Id )
469 !
470 ! OUTPUTS:
471 ! Id: Character string containing the version Id information
472 ! for the module.
473 ! UNITS: N/A
474 ! TYPE: CHARACTER(*)
475 ! DIMENSION: Scalar
476 ! ATTRIBUTES: INTENT(OUT)
477 !
478 !:sdoc-:
479 !--------------------------------------------------------------------------------
480 
481  SUBROUTINE irwatercoeff_defineversion( Id )
482  CHARACTER(*), INTENT(OUT) :: id
483  id = module_version_id
484  END SUBROUTINE irwatercoeff_defineversion
485 
486 
487 !------------------------------------------------------------------------------
488 !:sdoc+:
489 !
490 ! NAME:
491 ! IRwaterCoeff_InquireFile
492 !
493 ! PURPOSE:
494 ! Function to inquire a IRwaterCoeff object container file.
495 !
496 ! CALLING SEQUENCE:
497 ! Error_Status = IRwaterCoeff_InquireFile( &
498 ! Filename , &
499 ! n_Angles = n_Angles , &
500 ! n_Frequencies = n_Frequencies, &
501 ! n_Wind_Speeds = n_Wind_Speeds, &
502 ! Release = Release , &
503 ! Version = Version , &
504 ! Title = Title , &
505 ! History = History , &
506 ! Comment = Comment )
507 !
508 ! INPUTS:
509 ! Filename: Character string specifying the name of the
510 ! data file to inquire.
511 ! UNITS: N/A
512 ! TYPE: CHARACTER(*)
513 ! DIMENSION: Scalar
514 ! ATTRIBUTES: INTENT(IN)
515 !
516 ! OPTIONAL OUTPUTS:
517 ! n_Angles: Number of angles for which there are
518 ! emissivity data.
519 ! UNITS: N/A
520 ! TYPE: INTEGER
521 ! DIMENSION: Scalar
522 ! ATTRIBUTES: INTENT(OUT), OPTIONAL
523 !
524 ! n_Frequencies: Number of spectral frequencies for which there are
525 ! emissivity data.
526 ! UNITS: N/A
527 ! TYPE: INTEGER
528 ! DIMENSION: Scalar
529 ! ATTRIBUTES: INTENT(OUT), OPTIONAL
530 !
531 ! n_Wind_Speeds: Number of wind speeds for which there are
532 ! emissivity data.
533 ! UNITS: N/A
534 ! TYPE: INTEGER
535 ! DIMENSION: Scalar
536 ! ATTRIBUTES: INTENT(OUT), OPTIONAL
537 !
538 ! Release: The data/file release number. Used to check
539 ! for data/software mismatch.
540 ! UNITS: N/A
541 ! TYPE: INTEGER
542 ! DIMENSION: Scalar
543 ! ATTRIBUTES: INTENT(OUT), OPTIONAL
544 !
545 ! Version: The data/file version number. Used for
546 ! purposes only in identifying the dataset for
547 ! a particular release.
548 ! UNITS: N/A
549 ! TYPE: INTEGER
550 ! DIMENSION: Scalar
551 ! ATTRIBUTES: INTENT(OUT), OPTIONAL
552 !
553 ! Title: Character string containing a succinct description
554 ! of what is in the dataset.
555 ! UNITS: N/A
556 ! TYPE: CHARACTER(*)
557 ! DIMENSION: Scalar
558 ! ATTRIBUTES: INTENT(OUT), OPTIONAL
559 !
560 ! History: Character string containing dataset creation
561 ! history.
562 ! UNITS: N/A
563 ! TYPE: CHARACTER(*)
564 ! DIMENSION: Scalar
565 ! ATTRIBUTES: INTENT(OUT), OPTIONAL
566 !
567 ! Comment: Character string containing any comments about
568 ! the dataset.
569 ! UNITS: N/A
570 ! TYPE: CHARACTER(*)
571 ! DIMENSION: Scalar
572 ! ATTRIBUTES: INTENT(OUT), OPTIONAL
573 !
574 ! FUNCTION RESULT:
575 ! Error_Status: The return value is an integer defining the error
576 ! status. The error codes are defined in the
577 ! Message_Handler module.
578 ! If == SUCCESS the file inquire was successful
579 ! == FAILURE an unrecoverable error occurred.
580 ! UNITS: N/A
581 ! TYPE: INTEGER
582 ! DIMENSION: Scalar
583 !
584 !:sdoc-:
585 !------------------------------------------------------------------------------
586 
587  FUNCTION irwatercoeff_inquirefile( &
588  Filename , & ! Input
589  n_Angles , & ! Optional output
590  n_Frequencies, & ! Optional output
591  n_Wind_Speeds, & ! Optional output
592  Release , & ! Optional output
593  Version , & ! Optional output
594  Title , & ! Optional output
595  History , & ! Optional output
596  Comment ) & ! Optional output
597  result( err_stat )
598  ! Arguments
599  CHARACTER(*), INTENT(IN) :: filename
600  INTEGER , OPTIONAL, INTENT(OUT) :: n_angles
601  INTEGER , OPTIONAL, INTENT(OUT) :: n_frequencies
602  INTEGER , OPTIONAL, INTENT(OUT) :: n_wind_speeds
603  INTEGER , OPTIONAL, INTENT(OUT) :: release
604  INTEGER , OPTIONAL, INTENT(OUT) :: version
605  CHARACTER(*), OPTIONAL, INTENT(OUT) :: title
606  CHARACTER(*), OPTIONAL, INTENT(OUT) :: history
607  CHARACTER(*), OPTIONAL, INTENT(OUT) :: comment
608  ! Function result
609  INTEGER :: err_stat
610  ! Function parameters
611  CHARACTER(*), PARAMETER :: routine_name = 'IRwaterCoeff_InquireFile'
612  ! Function variables
613  CHARACTER(ML) :: msg
614  CHARACTER(ML) :: io_msg
615  INTEGER :: io_stat
616  INTEGER :: fid
617  TYPE(irwatercoeff_type) :: irwatercoeff
618 
619 
620  ! Setup
621  err_stat = success
622  ! ...Check that the file exists
623  IF ( .NOT. file_exists( filename ) ) THEN
624  msg = 'File '//trim(filename)//' not found.'
625  CALL inquire_cleanup(); RETURN
626  END IF
627 
628 
629  ! Open the file
630  err_stat = open_binary_file( filename, fid )
631  IF ( err_stat /= success ) THEN
632  msg = 'Error opening '//trim(filename)
633  CALL inquire_cleanup(); RETURN
634  END IF
635 
636 
637  ! Read the release and version
638  READ( fid, iostat=io_stat, iomsg=io_msg ) &
639  irwatercoeff%Release, &
640  irwatercoeff%Version
641  IF ( io_stat /= 0 ) THEN
642  msg = 'Error reading Release/Version - '//trim(io_msg)
643  CALL inquire_cleanup(); RETURN
644  END IF
645 
646 
647  ! Read the dimensions
648  READ( fid, iostat=io_stat, iomsg=io_msg ) &
649  irwatercoeff%n_Angles , &
650  irwatercoeff%n_Frequencies, &
651  irwatercoeff%n_Wind_Speeds
652  IF ( io_stat /= 0 ) THEN
653  msg = 'Error reading dimension values from '//trim(filename)//' - '//trim(io_msg)
654  CALL inquire_cleanup(); RETURN
655  END IF
656 
657 
658  ! Read the global attributes
659  err_stat = readgatts_binary_file( &
660  fid, &
661  title = title , &
662  history = history, &
663  comment = comment )
664  IF ( err_stat /= success ) THEN
665  msg = 'Error reading global attributes'
666  CALL inquire_cleanup(); RETURN
667  END IF
668 
669 
670  ! Close the file
671  CLOSE( fid, iostat=io_stat, iomsg=io_msg )
672  IF ( io_stat /= 0 ) THEN
673  msg = 'Error closing '//trim(filename)//' - '//trim(io_msg)
674  CALL inquire_cleanup(); RETURN
675  END IF
676 
677 
678  ! Assign the return arguments
679  IF ( PRESENT(n_angles ) ) n_angles = irwatercoeff%n_Angles
680  IF ( PRESENT(n_frequencies) ) n_frequencies = irwatercoeff%n_Frequencies
681  IF ( PRESENT(n_wind_speeds) ) n_wind_speeds = irwatercoeff%n_Wind_Speeds
682  IF ( PRESENT(release ) ) release = irwatercoeff%Release
683  IF ( PRESENT(version ) ) version = irwatercoeff%Version
684 
685  CONTAINS
686 
687  SUBROUTINE inquire_cleanup()
688  ! Close file if necessary
689  IF ( file_open(fid) ) THEN
690  CLOSE( fid, iostat=io_stat, iomsg=io_msg )
691  IF ( io_stat /= 0 ) &
692  msg = trim(msg)//'; Error closing input file during error cleanup - '//trim(io_msg)
693  END IF
694  ! Set error status and print error message
695  err_stat = failure
696  CALL display_message( routine_name, msg, err_stat )
697  END SUBROUTINE inquire_cleanup
698 
699  END FUNCTION irwatercoeff_inquirefile
700 
701 
702 !--------------------------------------------------------------------------------
703 !:sdoc+:
704 !
705 ! NAME:
706 ! IRwaterCoeff_ReadFile
707 !
708 ! PURPOSE:
709 ! Function to read IRwaterCoeff object files.
710 !
711 ! CALLING SEQUENCE:
712 ! Error_Status = IRwaterCoeff_ReadFile( &
713 ! IRwaterCoeff , &
714 ! Filename , &
715 ! No_Close = No_Close, &
716 ! Quiet = Quiet , &
717 ! Title = Title , &
718 ! History = History , &
719 ! Comment = Comment )
720 !
721 ! OBJECTS:
722 ! IRwaterCoeff: Object containing the data read from file.
723 ! UNITS: N/A
724 ! TYPE: IRwaterCoeff_type
725 ! DIMENSION: Scalar
726 ! ATTRIBUTES: INTENT(OUT)
727 !
728 ! INPUTS:
729 ! Filename: Character string specifying the name of the
730 ! data file to read.
731 ! UNITS: N/A
732 ! TYPE: CHARACTER(*)
733 ! DIMENSION: Scalar
734 ! ATTRIBUTES: INTENT(IN)
735 !
736 ! OPTIONAL INPUTS:
737 ! No_Close: Set this logical argument to *NOT* close the datafile
738 ! upon exiting this routine. This option is required if
739 ! the IRwaterCoeff data is embedded within another file.
740 ! If == .FALSE., File is closed upon function exit [DEFAULT].
741 ! == .TRUE., File is NOT closed upon function exit
742 ! If not specified, default is .FALSE.
743 ! UNITS: N/A
744 ! TYPE: LOGICAL
745 ! DIMENSION: Scalar
746 ! ATTRIBUTES: INTENT(IN), OPTIONAL
747 !
748 ! Quiet: Set this logical argument to suppress INFORMATION
749 ! messages being printed to stdout
750 ! If == .FALSE., INFORMATION messages are OUTPUT [DEFAULT].
751 ! == .TRUE., INFORMATION messages are SUPPRESSED.
752 ! If not specified, default is .FALSE.
753 ! UNITS: N/A
754 ! TYPE: LOGICAL
755 ! DIMENSION: Scalar
756 ! ATTRIBUTES: INTENT(IN), OPTIONAL
757 !
758 ! OPTIONAL OUTPUTS:
759 ! Title: Character string containing a succinct description
760 ! of what is in the dataset.
761 ! UNITS: N/A
762 ! TYPE: CHARACTER(*)
763 ! DIMENSION: Scalar
764 ! ATTRIBUTES: INTENT(OUT), OPTIONAL
765 !
766 ! History: Character string containing dataset creation
767 ! history.
768 ! UNITS: N/A
769 ! TYPE: CHARACTER(*)
770 ! DIMENSION: Scalar
771 ! ATTRIBUTES: INTENT(OUT), OPTIONAL
772 !
773 ! Comment: Character string containing any comments about
774 ! the dataset.
775 ! UNITS: N/A
776 ! TYPE: CHARACTER(*)
777 ! DIMENSION: Scalar
778 ! ATTRIBUTES: INTENT(OUT), OPTIONAL
779 !
780 ! FUNCTION RESULT:
781 ! Error_Status: The return value is an integer defining the error status.
782 ! The error codes are defined in the Message_Handler module.
783 ! If == SUCCESS, the file read was successful
784 ! == FAILURE, an unrecoverable error occurred.
785 ! UNITS: N/A
786 ! TYPE: INTEGER
787 ! DIMENSION: Scalar
788 !
789 !:sdoc-:
790 !------------------------------------------------------------------------------
791 
792  FUNCTION irwatercoeff_readfile( &
793  IRwaterCoeff, & ! Output
794  Filename , & ! Input
795  No_Close , & ! Optional input
796  Quiet , & ! Optional input
797  Title , & ! Optional output
798  History , & ! Optional output
799  Comment , & ! Optional output
800  Debug ) & ! Optional input (Debug output control)
801  result( err_stat )
802  ! Arguments
803  TYPE(irwatercoeff_type), INTENT(OUT) :: irwatercoeff
804  CHARACTER(*), INTENT(IN) :: filename
805  LOGICAL , OPTIONAL, INTENT(IN) :: no_close
806  LOGICAL , OPTIONAL, INTENT(IN) :: quiet
807  CHARACTER(*), OPTIONAL, INTENT(OUT) :: title
808  CHARACTER(*), OPTIONAL, INTENT(OUT) :: history
809  CHARACTER(*), OPTIONAL, INTENT(OUT) :: comment
810  LOGICAL , OPTIONAL, INTENT(IN) :: debug
811  ! Function result
812  INTEGER :: err_stat
813  ! Function parameters
814  CHARACTER(*), PARAMETER :: routine_name = 'IRwaterCoeff_ReadFile'
815  ! Function variables
816  CHARACTER(ML) :: msg
817  CHARACTER(ML) :: io_msg
818  LOGICAL :: close_file
819  LOGICAL :: noisy
820  INTEGER :: io_stat
821  INTEGER :: fid
822  TYPE(irwatercoeff_type) :: dummy
823 
824 
825  ! Setup
826  err_stat = success
827  ! ...Check No_Close argument
828  close_file = .true.
829  IF ( PRESENT(no_close) ) close_file = .NOT. no_close
830  ! ...Check Quiet argument
831  noisy = .true.
832  IF ( PRESENT(quiet) ) noisy = .NOT. quiet
833  ! ...Override Quiet settings if debug set.
834  IF ( PRESENT(debug) ) THEN
835  IF ( debug ) noisy = .true.
836  END IF
837 
838 
839  ! Check if the file is open.
840  IF ( file_open( filename ) ) THEN
841  ! ...Inquire for the logical unit number
842  INQUIRE( file=filename, number=fid )
843  ! ...Ensure it's valid
844  IF ( fid < 0 ) THEN
845  msg = 'Error inquiring '//trim(filename)//' for its FileID'
846  CALL read_cleanup(); RETURN
847  END IF
848  ELSE
849  ! ...Open the file if it exists
850  IF ( file_exists( filename ) ) THEN
851  err_stat = open_binary_file( filename, fid )
852  IF ( err_stat /= success ) THEN
853  msg = 'Error opening '//trim(filename)
854  CALL read_cleanup(); RETURN
855  END IF
856  ELSE
857  msg = 'File '//trim(filename)//' not found.'
858  CALL read_cleanup(); RETURN
859  END IF
860  END IF
861 
862 
863  ! Read and check the release and version
864  READ( fid, iostat=io_stat, iomsg=io_msg ) &
865  dummy%Release, &
866  dummy%Version
867  IF ( io_stat /= 0 ) THEN
868  msg = 'Error reading Release/Version - '//trim(io_msg)
869  CALL read_cleanup(); RETURN
870  END IF
871  IF ( .NOT. irwatercoeff_validrelease( dummy ) ) THEN
872  msg = 'IRwaterCoeff Release check failed.'
873  CALL read_cleanup(); RETURN
874  END IF
875 
876 
877  ! Read the dimensions
878  READ( fid, iostat=io_stat, iomsg=io_msg ) &
879  dummy%n_Angles , &
880  dummy%n_Frequencies, &
881  dummy%n_Wind_Speeds
882  IF ( io_stat /= 0 ) THEN
883  msg = 'Error reading dimension values from '//trim(filename)//' - '//trim(io_msg)
884  CALL read_cleanup(); RETURN
885  END IF
886  ! ...Create the return object
887  CALL irwatercoeff_create( &
888  irwatercoeff , &
889  dummy%n_Angles , &
890  dummy%n_Frequencies, &
891  dummy%n_Wind_Speeds )
892  IF ( .NOT. irwatercoeff_associated( irwatercoeff ) ) THEN
893  msg = 'IRwaterCoeff object creation failed.'
894  CALL read_cleanup(); RETURN
895  END IF
896  ! ...Explicitly assign the version number
897  irwatercoeff%Version = dummy%Version
898 
899 
900  ! Read the global attributes
901  err_stat = readgatts_binary_file( &
902  fid, &
903  title = title , &
904  history = history, &
905  comment = comment )
906  IF ( err_stat /= success ) THEN
907  msg = 'Error reading global attributes'
908  CALL read_cleanup(); RETURN
909  END IF
910 
911 
912  ! Read the coefficient data
913  ! ...Read the dimensional vectors
914  READ( fid, iostat=io_stat, iomsg=io_msg ) &
915  irwatercoeff%Angle , &
916  irwatercoeff%Frequency , &
917  irwatercoeff%Wind_Speed
918  IF ( io_stat /= 0 ) THEN
919  msg = 'Error reading dimensional vectors - '//trim(io_msg)
920  CALL read_cleanup(); RETURN
921  END IF
922  ! ...Read the emissivity data
923  READ( fid, iostat=io_stat, iomsg=io_msg ) &
924  irwatercoeff%Emissivity
925  IF ( io_stat /= 0 ) THEN
926  msg = 'Error reading emissivity data - '//trim(io_msg)
927  CALL read_cleanup(); RETURN
928  END IF
929  ! ...Compute the transformed dimensional vectors
930  irwatercoeff%Secant_Angle = one/cos(degrees_to_radians*irwatercoeff%Angle)
931 
932  ! Close the file
933  IF ( close_file ) THEN
934  CLOSE( fid, iostat=io_stat, iomsg=io_msg )
935  IF ( io_stat /= 0 ) THEN
936  msg = 'Error closing '//trim(filename)//' - '//trim(io_msg)
937  CALL read_cleanup(); RETURN
938  END IF
939  END IF
940 
941 
942  ! Output an info message
943  IF ( noisy ) THEN
944  CALL irwatercoeff_info( irwatercoeff, msg )
945  CALL display_message( routine_name, 'FILE: '//trim(filename)//'; '//trim(msg), information )
946  END IF
947 
948  CONTAINS
949 
950  SUBROUTINE read_cleanup()
951  IF ( file_open(filename) ) THEN
952  CLOSE( fid, iostat=io_stat, iomsg=io_msg )
953  IF ( io_stat /= 0 ) &
954  msg = trim(msg)//'; Error closing input file during error cleanup - '//trim(io_msg)
955  END IF
956  CALL irwatercoeff_destroy( irwatercoeff )
957  err_stat = failure
958  CALL display_message( routine_name, msg, err_stat )
959  END SUBROUTINE read_cleanup
960 
961  END FUNCTION irwatercoeff_readfile
962 
963 
964 !--------------------------------------------------------------------------------
965 !:sdoc+:
966 !
967 ! NAME:
968 ! IRwaterCoeff_WriteFile
969 !
970 ! PURPOSE:
971 ! Function to write IRwaterCoeff object container files.
972 !
973 ! CALLING SEQUENCE:
974 ! Error_Status = IRwaterCoeff_WriteFile( &
975 ! IRwaterCoeff , &
976 ! Filename , &
977 ! No_Close = No_Close, &
978 ! Quiet = Quiet , &
979 ! Title = Title , &
980 ! History = History , &
981 ! Comment = Comment )
982 !
983 ! OBJECTS:
984 ! IRwaterCoeff: Object containing the data to write to file.
985 ! UNITS: N/A
986 ! TYPE: IRwaterCoeff_type
987 ! DIMENSION: Scalar
988 ! ATTRIBUTES: INTENT(IN)
989 !
990 ! INPUTS:
991 ! Filename: Character string specifying the name of the
992 ! data file to write.
993 ! UNITS: N/A
994 ! TYPE: CHARACTER(*)
995 ! DIMENSION: Scalar
996 ! ATTRIBUTES: INTENT(IN)
997 !
998 ! OPTIONAL INPUTS:
999 ! No_Close: Set this logical argument to *NOT* close the datafile
1000 ! upon exiting this routine. This option is required if
1001 ! the IRwaterCoeff data is to be embedded within another file.
1002 ! If == .FALSE., File is closed upon function exit [DEFAULT].
1003 ! == .TRUE., File is NOT closed upon function exit
1004 ! If not specified, default is .FALSE.
1005 ! UNITS: N/A
1006 ! TYPE: LOGICAL
1007 ! DIMENSION: Scalar
1008 ! ATTRIBUTES: INTENT(IN), OPTIONAL
1009 !
1010 ! Quiet: Set this logical argument to suppress INFORMATION
1011 ! messages being printed to stdout
1012 ! If == .FALSE., INFORMATION messages are OUTPUT [DEFAULT].
1013 ! == .TRUE., INFORMATION messages are SUPPRESSED.
1014 ! If not specified, default is .FALSE.
1015 ! UNITS: N/A
1016 ! TYPE: LOGICAL
1017 ! DIMENSION: Scalar
1018 ! ATTRIBUTES: INTENT(IN), OPTIONAL
1019 !
1020 ! Title: Character string containing a succinct description
1021 ! of what is in the dataset.
1022 ! UNITS: N/A
1023 ! TYPE: CHARACTER(*)
1024 ! DIMENSION: Scalar
1025 ! ATTRIBUTES: INTENT(IN), OPTIONAL
1026 !
1027 ! History: Character string containing dataset creation
1028 ! history.
1029 ! UNITS: N/A
1030 ! TYPE: CHARACTER(*)
1031 ! DIMENSION: Scalar
1032 ! ATTRIBUTES: INTENT(IN), OPTIONAL
1033 !
1034 ! Comment: Character string containing any comments about
1035 ! the dataset.
1036 ! UNITS: N/A
1037 ! TYPE: CHARACTER(*)
1038 ! DIMENSION: Scalar
1039 ! ATTRIBUTES: INTENT(IN), OPTIONAL
1040 !
1041 ! FUNCTION RESULT:
1042 ! Error_Status: The return value is an integer defining the error status.
1043 ! The error codes are defined in the Message_Handler module.
1044 ! If == SUCCESS, the file write was successful
1045 ! == FAILURE, an unrecoverable error occurred.
1046 ! UNITS: N/A
1047 ! TYPE: INTEGER
1048 ! DIMENSION: Scalar
1049 !
1050 !:sdoc-:
1051 !------------------------------------------------------------------------------
1052 
1053  FUNCTION irwatercoeff_writefile( &
1054  IRwaterCoeff, & ! Input
1055  Filename , & ! Input
1056  No_Close , & ! Optional input
1057  Quiet , & ! Optional input
1058  Title , & ! Optional input
1059  History , & ! Optional input
1060  Comment , & ! Optional input
1061  Debug ) & ! Optional input (Debug output control)
1062  result( err_stat )
1063  ! Arguments
1064  TYPE(irwatercoeff_type), INTENT(IN) :: irwatercoeff
1065  CHARACTER(*), INTENT(IN) :: filename
1066  LOGICAL , OPTIONAL, INTENT(IN) :: no_close
1067  LOGICAL , OPTIONAL, INTENT(IN) :: quiet
1068  CHARACTER(*), OPTIONAL, INTENT(IN) :: title
1069  CHARACTER(*), OPTIONAL, INTENT(IN) :: history
1070  CHARACTER(*), OPTIONAL, INTENT(IN) :: comment
1071  LOGICAL , OPTIONAL, INTENT(IN) :: debug
1072  ! Function result
1073  INTEGER :: err_stat
1074  ! Function parameters
1075  CHARACTER(*), PARAMETER :: routine_name = 'IRwaterCoeff_WriteFile'
1076  ! Function variables
1077  CHARACTER(ML) :: msg
1078  CHARACTER(ML) :: io_msg
1079  LOGICAL :: close_file
1080  LOGICAL :: noisy
1081  INTEGER :: io_stat
1082  INTEGER :: fid
1083 
1084 
1085  ! Setup
1086  err_stat = success
1087  ! ...Check No_Close argument
1088  close_file = .true.
1089  IF ( PRESENT(no_close) ) close_file = .NOT. no_close
1090  ! ...Check Quiet argument
1091  noisy = .true.
1092  IF ( PRESENT(quiet) ) noisy = .NOT. quiet
1093  ! ...Override Quiet settings if debug set.
1094  IF ( PRESENT(debug) ) THEN
1095  IF ( debug ) noisy = .true.
1096  END IF
1097  ! ...Check there is data to write
1098  IF ( .NOT. irwatercoeff_associated( irwatercoeff ) ) THEN
1099  msg = 'IRwaterCoeff object is empty.'
1100  CALL write_cleanup(); RETURN
1101  END IF
1102 
1103 
1104  ! Check if the file is open.
1105  IF ( file_open( filename ) ) THEN
1106  ! ...Inquire for the logical unit number
1107  INQUIRE( file=filename, number=fid )
1108  ! ...Ensure it's valid
1109  IF ( fid < 0 ) THEN
1110  msg = 'Error inquiring '//trim(filename)//' for its FileID'
1111  CALL write_cleanup(); RETURN
1112  END IF
1113  ELSE
1114  ! ...Open the file for output
1115  err_stat = open_binary_file( filename, fid, for_output=.true. )
1116  IF ( err_stat /= success ) THEN
1117  msg = 'Error opening '//trim(filename)
1118  CALL write_cleanup(); RETURN
1119  END IF
1120  END IF
1121 
1122 
1123  ! Write the release and version
1124  WRITE( fid, iostat=io_stat, iomsg=io_msg ) &
1125  irwatercoeff%Release, &
1126  irwatercoeff%Version
1127  IF ( io_stat /= 0 ) THEN
1128  msg = 'Error writing Release/Version - '//trim(io_msg)
1129  CALL write_cleanup(); RETURN
1130  END IF
1131 
1132 
1133  ! Write the dimensions
1134  WRITE( fid, iostat=io_stat, iomsg=io_msg ) &
1135  irwatercoeff%n_Angles , &
1136  irwatercoeff%n_Frequencies, &
1137  irwatercoeff%n_Wind_Speeds
1138  IF ( io_stat /= 0 ) THEN
1139  msg = 'Error writing dimension values to '//trim(filename)//' - '//trim(io_msg)
1140  CALL write_cleanup(); RETURN
1141  END IF
1142 
1143 
1144  ! Write the global attributes
1145  err_stat = writegatts_binary_file( &
1146  fid, &
1147  write_module = module_version_id, &
1148  title = title , &
1149  history = history, &
1150  comment = comment )
1151  IF ( err_stat /= success ) THEN
1152  msg = 'Error writing global attributes'
1153  CALL write_cleanup(); RETURN
1154  END IF
1155 
1156 
1157  ! Write the coefficient data
1158  ! ...Write the dimensional vectors
1159  WRITE( fid, iostat=io_stat, iomsg=io_msg ) &
1160  irwatercoeff%Angle , &
1161  irwatercoeff%Frequency , &
1162  irwatercoeff%Wind_Speed
1163  IF ( io_stat /= 0 ) THEN
1164  msg = 'Error writing dimensional vectors - '//trim(io_msg)
1165  CALL write_cleanup(); RETURN
1166  END IF
1167  ! ...Write the emissivity data
1168  WRITE( fid, iostat=io_stat, iomsg=io_msg ) &
1169  irwatercoeff%Emissivity
1170  IF ( io_stat /= 0 ) THEN
1171  msg = 'Error writing emissivity data - '//trim(io_msg)
1172  CALL write_cleanup(); RETURN
1173  END IF
1174 
1175 
1176  ! Close the file
1177  IF ( close_file ) THEN
1178  CLOSE( fid, iostat=io_stat, iomsg=io_msg )
1179  IF ( io_stat /= 0 ) THEN
1180  msg = 'Error closing '//trim(filename)//' - '//trim(io_msg)
1181  CALL write_cleanup(); RETURN
1182  END IF
1183  END IF
1184 
1185 
1186  ! Output an info message
1187  IF ( noisy ) THEN
1188  CALL irwatercoeff_info( irwatercoeff, msg )
1189  CALL display_message( routine_name, 'FILE: '//trim(filename)//'; '//trim(msg), information )
1190  END IF
1191 
1192  CONTAINS
1193 
1194  SUBROUTINE write_cleanup()
1195  IF ( file_open(filename) ) THEN
1196  CLOSE( fid, status=write_error_status, iostat=io_stat, iomsg=io_msg )
1197  IF ( io_stat /= 0 ) &
1198  msg = trim(msg)//'; Error closing input file during error cleanup - '//trim(io_msg)
1199  END IF
1200  err_stat = failure
1201  CALL display_message( routine_name, msg, err_stat )
1202  END SUBROUTINE write_cleanup
1203 
1204  END FUNCTION irwatercoeff_writefile
1205 
1206 
1207 !##################################################################################
1208 !##################################################################################
1209 !## ##
1210 !## ## PRIVATE MODULE ROUTINES ## ##
1211 !## ##
1212 !##################################################################################
1213 !##################################################################################
1214 
1215 !------------------------------------------------------------------------------
1216 !
1217 ! NAME:
1218 ! IRwaterCoeff_Equal
1219 !
1220 ! PURPOSE:
1221 ! Elemental function to test the equality of two IRwaterCoeff objects.
1222 ! Used in OPERATOR(==) interface block.
1223 !
1224 ! CALLING SEQUENCE:
1225 ! is_equal = IRwaterCoeff_Equal( x, y )
1226 !
1227 ! or
1228 !
1229 ! IF ( x == y ) THEN
1230 ! ...
1231 ! END IF
1232 !
1233 ! OBJECTS:
1234 ! x, y: Two IRwaterCoeff objects to be compared.
1235 ! UNITS: N/A
1236 ! TYPE: IRwaterCoeff_type
1237 ! DIMENSION: Scalar or any rank
1238 ! ATTRIBUTES: INTENT(IN)
1239 !
1240 ! FUNCTION RESULT:
1241 ! is_equal: Logical value indicating whether the inputs are equal.
1242 ! UNITS: N/A
1243 ! TYPE: LOGICAL
1244 ! DIMENSION: Same as inputs.
1245 !
1246 !------------------------------------------------------------------------------
1247 
1248  ELEMENTAL FUNCTION irwatercoeff_equal( x, y ) RESULT( is_equal )
1249  TYPE(irwatercoeff_type), INTENT(IN) :: x, y
1250  LOGICAL :: is_equal
1251 
1252  ! Set up
1253  is_equal = .false.
1254 
1255  ! Check the object association status
1256  IF ( (.NOT. irwatercoeff_associated(x)) .OR. &
1257  (.NOT. irwatercoeff_associated(y)) ) RETURN
1258 
1259 
1260  ! Check contents
1261  ! ...Release/version info
1262  IF ( (x%Release /= y%Release) .OR. &
1263  (x%Version /= y%Version) ) RETURN
1264  ! ...Dimensions
1265  IF ( (x%n_Angles /= y%n_Angles ) .OR. &
1266  (x%n_Frequencies /= y%n_Frequencies ) .OR. &
1267  (x%n_Wind_Speeds /= y%n_Wind_Speeds ) ) RETURN
1268  ! ...Arrays
1269  IF ( all(x%Angle .equalto. y%Angle ) .AND. &
1270  all(x%Frequency .equalto. y%Frequency ) .AND. &
1271  all(x%Wind_Speed .equalto. y%Wind_Speed ) .AND. &
1272  all(x%Emissivity .equalto. y%Emissivity ) ) &
1273  is_equal = .true.
1274 
1275  END FUNCTION irwatercoeff_equal
1276 
1277 END MODULE irwatercoeff_define
integer, parameter, public failure
subroutine, public irwatercoeff_info(self, Info)
real(fp), parameter, public zero
integer, parameter, public long
Definition: Type_Kinds.f90:76
integer, parameter, public fp
Definition: Type_Kinds.f90:124
elemental subroutine, public irwatercoeff_destroy(self)
integer function, public readgatts_binary_file(fid, Write_Module, Created_On, Title, History, Comment)
integer, parameter, public double
Definition: Type_Kinds.f90:106
subroutine inquire_cleanup()
subroutine, public irwatercoeff_inspect(self)
integer, parameter ml
subroutine read_cleanup()
subroutine write_cleanup()
character(*), parameter module_version_id
elemental subroutine, public irwatercoeff_create(self, n_Angles, n_Frequencies, n_Wind_Speeds)
subroutine, public irwatercoeff_defineversion(Id)
integer function, public open_binary_file(Filename, FileID, For_Output, No_Check)
real(fp), parameter, public one
recursive subroutine, public display_message(Routine_Name, Message, Error_State, Message_Log)
integer, parameter irwatercoeff_version
real(fp), parameter, public degrees_to_radians
integer function, public writegatts_binary_file(fid, Write_Module, Created_On, Title, History, Comment)
character(*), parameter write_error_status
logical function, public irwatercoeff_validrelease(self)
integer, parameter irwatercoeff_release
#define min(a, b)
Definition: mosaic_util.h:32
integer function, public irwatercoeff_writefile(IRwaterCoeff, Filename, No_Close, Quiet, Title, History, Comment, Debug)
integer, parameter, public success
integer function, public irwatercoeff_inquirefile(Filename, n_Angles, n_Frequencies, n_Wind_Speeds, Release, Version, Title, History, Comment)
elemental logical function irwatercoeff_equal(x, y)
integer function, public irwatercoeff_readfile(IRwaterCoeff, Filename, No_Close, Quiet, Title, History, Comment, Debug)
integer, parameter, public information
real(fp), parameter, public pi
elemental logical function, public irwatercoeff_associated(self)