19 USE iso_fortran_env ,
ONLY: output_unit
24 OPERATOR(.equalto.), &
54 PUBLIC ::
OPERATOR(==)
77 INTERFACE OPERATOR(==)
79 END INTERFACE OPERATOR(==)
83 END INTERFACE OPERATOR(-)
90 '$Id: CRTM_GeometryInfo_Define.f90 60152 2015-08-13 19:19:13Z paul.vandelst@noaa.gov $' 92 REAL(fp),
PARAMETER ::
zero = 0.0_fp
93 REAL(fp),
PARAMETER ::
one = 1.0_fp
95 INTEGER,
PARAMETER ::
ml = 256
111 REAL(fp) :: sensor_scan_radian =
zero 112 REAL(fp) :: sensor_zenith_radian =
zero 113 REAL(fp) :: sensor_azimuth_radian =
zero 114 REAL(fp) :: secant_sensor_zenith =
zero 115 REAL(fp) :: cosine_sensor_zenith =
zero 117 REAL(fp) :: trans_zenith_radian =
zero 118 REAL(fp) :: secant_trans_zenith =
zero 120 REAL(fp) :: source_zenith_radian =
zero 121 REAL(fp) :: source_azimuth_radian =
zero 122 REAL(fp) :: secant_source_zenith =
zero 127 REAL(fp) :: au_ratio2 =
one 237 Geometry , & ! Optional input
238 iFOV , & ! Optional input
239 Longitude , & ! Optional input
240 Latitude , & ! Optional input
241 Surface_Altitude , & ! Optional input
242 Sensor_Scan_Angle , & ! Optional input
243 Sensor_Zenith_Angle , & ! Optional input
244 Sensor_Azimuth_Angle , & ! Optional input
245 Source_Zenith_Angle , & ! Optional input
246 Source_Azimuth_Angle , & ! Optional input
247 Flux_Zenith_Angle , & ! Optional input
248 Year , & ! Optional input
249 Month , & ! Optional input
250 Day , & ! Optional input
251 Distance_Ratio , & ! Optional input
252 Sensor_Scan_Radian , & ! Optional input
253 Sensor_Zenith_Radian , & ! Optional input
254 Sensor_Azimuth_Radian, & ! Optional input
255 Secant_Sensor_Zenith , & ! Optional input
256 Cosine_Sensor_Zenith , & ! Optional input
257 Source_Zenith_Radian , & ! Optional input
258 Source_Azimuth_Radian, & ! Optional input
259 Secant_Source_Zenith , & ! Optional input
260 Flux_Zenith_Radian , & ! Optional input
261 Secant_Flux_Zenith , & ! Optional input
262 Trans_Zenith_Radian , & ! Optional input
263 Secant_Trans_Zenith , & ! Optional input
268 INTEGER ,
OPTIONAL,
INTENT(IN) :: ifov
269 REAL(fp),
OPTIONAL,
INTENT(IN) :: longitude
270 REAL(fp),
OPTIONAL,
INTENT(IN) :: latitude
271 REAL(fp),
OPTIONAL,
INTENT(IN) :: surface_altitude
272 REAL(fp),
OPTIONAL,
INTENT(IN) :: sensor_scan_angle
273 REAL(fp),
OPTIONAL,
INTENT(IN) :: sensor_zenith_angle
274 REAL(fp),
OPTIONAL,
INTENT(IN) :: sensor_azimuth_angle
275 REAL(fp),
OPTIONAL,
INTENT(IN) :: source_zenith_angle
276 REAL(fp),
OPTIONAL,
INTENT(IN) :: source_azimuth_angle
277 REAL(fp),
OPTIONAL,
INTENT(IN) :: flux_zenith_angle
278 INTEGER,
OPTIONAL,
INTENT(IN) :: year
279 INTEGER,
OPTIONAL,
INTENT(IN) :: month
280 INTEGER,
OPTIONAL,
INTENT(IN) :: day
281 REAL(fp),
OPTIONAL,
INTENT(IN) :: distance_ratio
282 REAL(fp),
OPTIONAL,
INTENT(IN) :: sensor_scan_radian
283 REAL(fp),
OPTIONAL,
INTENT(IN) :: sensor_zenith_radian
284 REAL(fp),
OPTIONAL,
INTENT(IN) :: sensor_azimuth_radian
285 REAL(fp),
OPTIONAL,
INTENT(IN) :: secant_sensor_zenith
286 REAL(fp),
OPTIONAL,
INTENT(IN) :: cosine_sensor_zenith
287 REAL(fp),
OPTIONAL,
INTENT(IN) :: source_zenith_radian
288 REAL(fp),
OPTIONAL,
INTENT(IN) :: source_azimuth_radian
289 REAL(fp),
OPTIONAL,
INTENT(IN) :: secant_source_zenith
290 REAL(fp),
OPTIONAL,
INTENT(IN) :: flux_zenith_radian
291 REAL(fp),
OPTIONAL,
INTENT(IN) :: secant_flux_zenith
292 REAL(fp),
OPTIONAL,
INTENT(IN) :: trans_zenith_radian
293 REAL(fp),
OPTIONAL,
INTENT(IN) :: secant_trans_zenith
294 REAL(fp),
OPTIONAL,
INTENT(IN) :: au_ratio2
297 IF (
PRESENT(geometry) ) ginfo%user = geometry
300 longitude = longitude , &
301 latitude = latitude , &
302 surface_altitude = surface_altitude , &
303 sensor_scan_angle = sensor_scan_angle , &
304 sensor_zenith_angle = sensor_zenith_angle , &
305 sensor_azimuth_angle = sensor_azimuth_angle, &
306 source_zenith_angle = source_zenith_angle , &
307 source_azimuth_angle = source_azimuth_angle, &
308 flux_zenith_angle = flux_zenith_angle , &
313 IF (
PRESENT(distance_ratio ) ) ginfo%Distance_Ratio = distance_ratio
314 IF (
PRESENT(sensor_scan_radian ) ) ginfo%Sensor_Scan_Radian = sensor_scan_radian
315 IF (
PRESENT(sensor_zenith_radian ) ) ginfo%Sensor_Zenith_Radian = sensor_zenith_radian
316 IF (
PRESENT(sensor_azimuth_radian) ) ginfo%Sensor_Azimuth_Radian = sensor_azimuth_radian
317 IF (
PRESENT(secant_sensor_zenith ) ) ginfo%Secant_Sensor_Zenith = secant_sensor_zenith
318 IF (
PRESENT(cosine_sensor_zenith ) ) ginfo%Cosine_Sensor_Zenith = cosine_sensor_zenith
319 IF (
PRESENT(source_zenith_radian ) ) ginfo%Source_Zenith_Radian = source_zenith_radian
320 IF (
PRESENT(source_azimuth_radian) ) ginfo%Source_Azimuth_Radian = source_azimuth_radian
321 IF (
PRESENT(secant_source_zenith ) ) ginfo%Secant_Source_Zenith = secant_source_zenith
322 IF (
PRESENT(flux_zenith_radian ) ) ginfo%Flux_Zenith_Radian = flux_zenith_radian
323 IF (
PRESENT(secant_flux_zenith ) ) ginfo%Secant_Flux_Zenith = secant_flux_zenith
324 IF (
PRESENT(trans_zenith_radian ) ) ginfo%Trans_Zenith_Radian = trans_zenith_radian
325 IF (
PRESENT(secant_trans_zenith ) ) ginfo%Secant_Trans_Zenith = secant_trans_zenith
326 IF (
PRESENT(au_ratio2 ) ) ginfo%AU_ratio2 = au_ratio2
393 Geometry , & ! Optional output
394 iFOV , & ! Optional output
395 Longitude , & ! Optional output
396 Latitude , & ! Optional output
397 Surface_Altitude , & ! Optional output
398 Sensor_Scan_Angle , & ! Optional output
399 Sensor_Zenith_Angle , & ! Optional output
400 Sensor_Azimuth_Angle , & ! Optional output
401 Source_Zenith_Angle , & ! Optional output
402 Source_Azimuth_Angle , & ! Optional output
403 Flux_Zenith_Angle , & ! Optional output
404 Year , & ! Optional output
405 Month , & ! Optional output
406 Day , & ! Optional output
407 Distance_Ratio , & ! Optional output
408 Sensor_Scan_Radian , & ! Optional output
409 Sensor_Zenith_Radian , & ! Optional output
410 Sensor_Azimuth_Radian, & ! Optional output
411 Secant_Sensor_Zenith , & ! Optional output
412 Cosine_Sensor_Zenith , & ! Optional output
413 Source_Zenith_Radian , & ! Optional output
414 Source_Azimuth_Radian, & ! Optional output
415 Secant_Source_Zenith , & ! Optional output
416 Flux_Zenith_Radian , & ! Optional output
417 Secant_Flux_Zenith , & ! Optional output
418 Trans_Zenith_Radian , & ! Optional output
419 Secant_Trans_Zenith , & ! Optional output
424 INTEGER ,
OPTIONAL,
INTENT(OUT) :: ifov
425 REAL(fp),
OPTIONAL,
INTENT(OUT) :: longitude
426 REAL(fp),
OPTIONAL,
INTENT(OUT) :: latitude
427 REAL(fp),
OPTIONAL,
INTENT(OUT) :: surface_altitude
428 REAL(fp),
OPTIONAL,
INTENT(OUT) :: sensor_scan_angle
429 REAL(fp),
OPTIONAL,
INTENT(OUT) :: sensor_zenith_angle
430 REAL(fp),
OPTIONAL,
INTENT(OUT) :: sensor_azimuth_angle
431 REAL(fp),
OPTIONAL,
INTENT(OUT) :: source_zenith_angle
432 REAL(fp),
OPTIONAL,
INTENT(OUT) :: source_azimuth_angle
433 REAL(fp),
OPTIONAL,
INTENT(OUT) :: flux_zenith_angle
434 INTEGER,
OPTIONAL,
INTENT(OUT) :: year
435 INTEGER,
OPTIONAL,
INTENT(OUT) :: month
436 INTEGER,
OPTIONAL,
INTENT(OUT) :: day
437 REAL(fp),
OPTIONAL,
INTENT(OUT) :: distance_ratio
438 REAL(fp),
OPTIONAL,
INTENT(OUT) :: sensor_scan_radian
439 REAL(fp),
OPTIONAL,
INTENT(OUT) :: sensor_zenith_radian
440 REAL(fp),
OPTIONAL,
INTENT(OUT) :: sensor_azimuth_radian
441 REAL(fp),
OPTIONAL,
INTENT(OUT) :: secant_sensor_zenith
442 REAL(fp),
OPTIONAL,
INTENT(OUT) :: cosine_sensor_zenith
443 REAL(fp),
OPTIONAL,
INTENT(OUT) :: source_zenith_radian
444 REAL(fp),
OPTIONAL,
INTENT(OUT) :: source_azimuth_radian
445 REAL(fp),
OPTIONAL,
INTENT(OUT) :: secant_source_zenith
446 REAL(fp),
OPTIONAL,
INTENT(OUT) :: flux_zenith_radian
447 REAL(fp),
OPTIONAL,
INTENT(OUT) :: secant_flux_zenith
448 REAL(fp),
OPTIONAL,
INTENT(OUT) :: trans_zenith_radian
449 REAL(fp),
OPTIONAL,
INTENT(OUT) :: secant_trans_zenith
450 REAL(fp),
OPTIONAL,
INTENT(OUT) :: au_ratio2
453 IF (
PRESENT(geometry) ) geometry = ginfo%user
456 longitude = longitude , &
457 latitude = latitude , &
458 surface_altitude = surface_altitude , &
459 sensor_scan_angle = sensor_scan_angle , &
460 sensor_zenith_angle = sensor_zenith_angle , &
461 sensor_azimuth_angle = sensor_azimuth_angle, &
462 source_zenith_angle = source_zenith_angle , &
463 source_azimuth_angle = source_azimuth_angle, &
464 flux_zenith_angle = flux_zenith_angle , &
469 IF (
PRESENT(distance_ratio ) ) distance_ratio = ginfo%Distance_Ratio
470 IF (
PRESENT(sensor_scan_radian ) ) sensor_scan_radian = ginfo%Sensor_Scan_Radian
471 IF (
PRESENT(sensor_zenith_radian ) ) sensor_zenith_radian = ginfo%Sensor_Zenith_Radian
472 IF (
PRESENT(sensor_azimuth_radian) ) sensor_azimuth_radian = ginfo%Sensor_Azimuth_Radian
473 IF (
PRESENT(secant_sensor_zenith ) ) secant_sensor_zenith = ginfo%Secant_Sensor_Zenith
474 IF (
PRESENT(cosine_sensor_zenith ) ) cosine_sensor_zenith = ginfo%Cosine_Sensor_Zenith
475 IF (
PRESENT(source_zenith_radian ) ) source_zenith_radian = ginfo%Source_Zenith_Radian
476 IF (
PRESENT(source_azimuth_radian) ) source_azimuth_radian = ginfo%Source_Azimuth_Radian
477 IF (
PRESENT(secant_source_zenith ) ) secant_source_zenith = ginfo%Secant_Source_Zenith
478 IF (
PRESENT(flux_zenith_radian ) ) flux_zenith_radian = ginfo%Flux_Zenith_Radian
479 IF (
PRESENT(secant_flux_zenith ) ) secant_flux_zenith = ginfo%Secant_Flux_Zenith
480 IF (
PRESENT(trans_zenith_radian ) ) trans_zenith_radian = ginfo%Trans_Zenith_Radian
481 IF (
PRESENT(secant_trans_zenith ) ) secant_trans_zenith = ginfo%Secant_Trans_Zenith
482 IF (
PRESENT(au_ratio2 ) ) au_ratio2 = ginfo%AU_ratio2
572 INTEGER,
OPTIONAL,
INTENT(IN) :: unit
574 CHARACTER(*),
PARAMETER :: rfmt =
'es13.6' 580 IF (
PRESENT(unit) )
THEN 585 WRITE(fid,
'(1x,"GeometryInfo OBJECT")')
586 WRITE(fid,
'(3x,"Distance ratio :",1x,'//rfmt//
')') ginfo%Distance_Ratio
588 WRITE(fid,
'(3x,"Sensor scan radian :",1x,'//rfmt//
')') ginfo%Sensor_Scan_Radian
589 WRITE(fid,
'(3x,"Sensor zenith radian :",1x,'//rfmt//
')') ginfo%Sensor_Zenith_Radian
590 WRITE(fid,
'(3x,"Sensor azimuth radian :",1x,'//rfmt//
')') ginfo%Sensor_Azimuth_Radian
591 WRITE(fid,
'(3x,"Secant sensor zenith :",1x,'//rfmt//
')') ginfo%Secant_Sensor_Zenith
592 WRITE(fid,
'(3x,"Cosine sensor zenith :",1x,'//rfmt//
')') ginfo%Cosine_Sensor_Zenith
594 WRITE(fid,
'(3x,"Trans zenith radian :",1x,'//rfmt//
')') ginfo%Trans_Zenith_Radian
595 WRITE(fid,
'(3x,"Secant trans zenith :",1x,'//rfmt//
')') ginfo%Secant_Trans_Zenith
597 WRITE(fid,
'(3x,"Source zenith radian :",1x,'//rfmt//
')') ginfo%Source_Zenith_Radian
598 WRITE(fid,
'(3x,"Source azimuth radian :",1x,'//rfmt//
')') ginfo%Source_Azimuth_Radian
599 WRITE(fid,
'(3x,"Secant source zenith :",1x,'//rfmt//
')') ginfo%Secant_Source_Zenith
601 WRITE(fid,
'(3x,"Flux zenith radian :",1x,'//rfmt//
')') ginfo%Flux_Zenith_Radian
602 WRITE(fid,
'(3x,"Secant flux zenith :",1x,'//rfmt//
')') ginfo%Secant_Flux_Zenith
604 WRITE(fid,
'(3x,"AU ratio^2 :",1x,'//rfmt//
')') ginfo%AU_ratio2
636 CHARACTER(*),
INTENT(OUT) :: id
688 CHARACTER(*),
INTENT(IN) :: filename
689 INTEGER ,
OPTIONAL,
INTENT(OUT) :: n_profiles
693 CHARACTER(*),
PARAMETER :: routine_name =
'CRTM_GeometryInfo_InquireFile' 696 CHARACTER(ML) :: io_msg
705 msg =
'File '//trim(filename)//
' not found.' 712 IF ( err_stat /=
success )
THEN 713 msg =
'Error opening '//trim(filename)
719 READ( fid,iostat=io_stat,iomsg=io_msg ) m
720 IF ( io_stat /= 0 )
THEN 721 msg =
'Error reading dimensions from '//trim(filename)//
' - '//trim(io_msg)
726 CLOSE( fid,iostat=io_stat,iomsg=io_msg )
727 IF ( io_stat /= 0 )
THEN 728 msg =
'Error closing '//trim(filename)//
' - '//trim(io_msg)
734 IF (
PRESENT(n_profiles) ) n_profiles = m
740 CLOSE( fid,iostat=io_stat,iomsg=io_msg )
742 msg = trim(msg)//
'; Error closing input file during error cleanup - '//trim(io_msg)
815 GeometryInfo, & ! Output
816 Quiet , & ! Optional input
817 n_Profiles , & ! Optional output
821 CHARACTER(*),
INTENT(IN) :: filename
823 LOGICAL,
OPTIONAL,
INTENT(IN) :: quiet
824 INTEGER,
OPTIONAL,
INTENT(OUT) :: n_profiles
825 LOGICAL,
OPTIONAL,
INTENT(IN) :: debug
829 CHARACTER(*),
PARAMETER :: routine_name =
'CRTM_Geometry_ReadFile' 832 CHARACTER(ML) :: io_msg
833 CHARACTER(ML) :: alloc_msg
835 INTEGER :: alloc_stat
838 INTEGER :: m, n_input_profiles
845 IF (
PRESENT(quiet) ) noisy = .NOT. quiet
847 IF (
PRESENT(debug) ) noisy = debug
852 IF ( err_stat /=
success )
THEN 853 msg =
'Error opening '//trim(filename)
859 READ( fid,iostat=io_stat,iomsg=io_msg ) n_input_profiles
860 IF ( io_stat /= 0 )
THEN 861 msg =
'Error reading dimension from '//trim(filename)//
' - '//trim(io_msg)
865 ALLOCATE(geometryinfo(n_input_profiles), stat=alloc_stat, errmsg=alloc_msg)
866 IF ( alloc_stat /= 0 )
THEN 867 msg =
'Error allocating GeometryInfo array - '//trim(alloc_msg)
873 geometryinfo_loop:
DO m = 1, n_input_profiles
875 IF ( err_stat /=
success )
THEN 876 WRITE( msg,
'("Error reading GeometryInfo element #",i0," from ",a)' ) m, trim(filename)
879 END DO geometryinfo_loop
883 CLOSE( fid,iostat=io_stat,iomsg=io_msg )
884 IF ( io_stat /= 0 )
THEN 885 msg =
'Error closing '//trim(filename)//
' - '//trim(io_msg)
891 IF (
PRESENT(n_profiles) ) n_profiles = n_input_profiles
896 WRITE( msg,
'("Number of profiles read from ",a,": ",i0)' ) &
897 trim(filename), n_input_profiles
905 CLOSE( fid,iostat=io_stat,iomsg=io_msg )
906 IF ( io_stat /= 0 ) &
907 msg = trim(msg)//
'; Error closing input file during error cleanup - '//trim(io_msg)
909 IF (
ALLOCATED(geometryinfo) )
THEN 910 DEALLOCATE(geometryinfo, stat=alloc_stat, errmsg=alloc_msg)
911 IF ( alloc_stat /= 0 ) &
912 msg = trim(msg)//
'; Error deallocating GeometryInfo array during error cleanup - '//&
982 GeometryInfo, & ! Input
983 Quiet , & ! Optional input
987 CHARACTER(*),
INTENT(IN) :: filename
989 LOGICAL,
OPTIONAL,
INTENT(IN) :: quiet
990 LOGICAL,
OPTIONAL,
INTENT(IN) :: debug
994 CHARACTER(*),
PARAMETER :: routine_name =
'CRTM_GeometryInfo_WriteFile' 997 CHARACTER(ML) :: io_msg
1001 INTEGER :: m, n_profiles
1007 IF (
PRESENT(quiet) ) noisy = .NOT. quiet
1009 IF (
PRESENT(debug) ) noisy = debug
1014 IF ( err_stat /=
success )
THEN 1015 msg =
'Error opening '//trim(filename)
1021 n_profiles =
SIZE(geometryinfo)
1022 WRITE( fid, iostat=io_stat ) n_profiles
1023 IF ( io_stat /= 0 )
THEN 1024 msg =
'Error writing data dimension to '//trim(filename)//
'- '//trim(io_msg)
1030 geometryinfo_loop:
DO m = 1, n_profiles
1032 IF ( err_stat /=
success )
THEN 1033 WRITE( msg,
'("Error writing GeometryInfo element #",i0," to ",a)' ) m, trim(filename)
1036 END DO geometryinfo_loop
1040 CLOSE( fid,status=
'KEEP',iostat=io_stat,iomsg=io_msg )
1041 IF ( io_stat /= 0 )
THEN 1042 msg =
'Error closing '//trim(filename)//
'- '//trim(io_msg)
1049 WRITE( msg,
'("Number of profiles written to ",a,": ",i0)' ) trim(filename), n_profiles
1058 IF ( io_stat /= 0 ) &
1059 msg = trim(msg)//
'; Error deleting output file during error cleanup - '//trim(io_msg)
1113 is_equal = ( (x%user == y%user ) .AND. &
1114 (x%Distance_Ratio .equalto. y%Distance_Ratio ) .AND. &
1115 (x%Sensor_Scan_Radian .equalto. y%Sensor_Scan_Radian ) .AND. &
1116 (x%Sensor_Zenith_Radian .equalto. y%Sensor_Zenith_Radian ) .AND. &
1117 (x%Sensor_Azimuth_Radian .equalto. y%Sensor_Azimuth_Radian) .AND. &
1118 (x%Secant_Sensor_Zenith .equalto. y%Secant_Sensor_Zenith ) .AND. &
1119 (x%Trans_Zenith_Radian .equalto. y%Trans_Zenith_Radian ) .AND. &
1120 (x%Secant_Trans_Zenith .equalto. y%Secant_Trans_Zenith ) .AND. &
1121 (x%Cosine_Sensor_Zenith .equalto. y%Cosine_Sensor_Zenith ) .AND. &
1122 (x%Source_Zenith_Radian .equalto. y%Source_Zenith_Radian ) .AND. &
1123 (x%Source_Azimuth_Radian .equalto. y%Source_Azimuth_Radian) .AND. &
1124 (x%Secant_Source_Zenith .equalto. y%Secant_Source_Zenith ) .AND. &
1125 (x%Flux_Zenith_Radian .equalto. y%Flux_Zenith_Radian ) .AND. &
1126 (x%Secant_Flux_Zenith .equalto. y%Secant_Flux_Zenith ) .AND. &
1127 (x%AU_ratio2 .equalto. y%AU_ratio2 ) )
1172 gidiff%user = gidiff%user - gi2%user
1174 gidiff%Distance_Ratio = gidiff%Distance_Ratio - gi2%Distance_Ratio
1175 gidiff%Sensor_Scan_Radian = gidiff%Sensor_Scan_Radian - gi2%Sensor_Scan_Radian
1176 gidiff%Sensor_Zenith_Radian = gidiff%Sensor_Zenith_Radian - gi2%Sensor_Zenith_Radian
1177 gidiff%Sensor_Azimuth_Radian = gidiff%Sensor_Azimuth_Radian - gi2%Sensor_Azimuth_Radian
1178 gidiff%Secant_Sensor_Zenith = gidiff%Secant_Sensor_Zenith - gi2%Secant_Sensor_Zenith
1179 gidiff%Cosine_Sensor_Zenith = gidiff%Cosine_Sensor_Zenith - gi2%Cosine_Sensor_Zenith
1180 gidiff%Trans_Zenith_Radian = gidiff%Trans_Zenith_Radian - gi2%Trans_Zenith_Radian
1181 gidiff%Secant_Trans_Zenith = gidiff%Secant_Trans_Zenith - gi2%Secant_Trans_Zenith
1182 gidiff%Source_Zenith_Radian = gidiff%Source_Zenith_Radian - gi2%Source_Zenith_Radian
1183 gidiff%Source_Azimuth_Radian = gidiff%Source_Azimuth_Radian - gi2%Source_Azimuth_Radian
1184 gidiff%Secant_Source_Zenith = gidiff%Secant_Source_Zenith - gi2%Secant_Source_Zenith
1185 gidiff%Flux_Zenith_Radian = gidiff%Flux_Zenith_Radian - gi2%Flux_Zenith_Radian
1186 gidiff%Secant_Flux_Zenith = gidiff%Secant_Flux_Zenith - gi2%Secant_Flux_Zenith
1187 gidiff%AU_ratio2 = gidiff%AU_ratio2 - gi2%AU_ratio2
1228 FUNCTION read_record( fid, ginfo )
RESULT( err_stat )
1230 INTEGER,
INTENT(IN) :: fid
1235 CHARACTER(*),
PARAMETER :: routine_name =
'CRTM_GeometryInfo_ReadFile(Record)' 1237 CHARACTER(ML) :: msg
1238 CHARACTER(ML) :: io_msg
1247 IF ( err_stat /=
success )
THEN 1248 msg =
'Error reading embedded Geometry data' 1254 READ( fid, iostat=io_stat,iomsg=io_msg ) &
1255 ginfo%Distance_Ratio , &
1256 ginfo%Sensor_Scan_Radian , &
1257 ginfo%Sensor_Zenith_Radian , &
1258 ginfo%Sensor_Azimuth_Radian, &
1259 ginfo%Secant_Sensor_Zenith , &
1260 ginfo%Cosine_Sensor_Zenith , &
1261 ginfo%Trans_Zenith_Radian , &
1262 ginfo%Secant_Trans_Zenith , &
1263 ginfo%Source_Zenith_Radian , &
1264 ginfo%Source_Azimuth_Radian, &
1265 ginfo%Secant_Source_Zenith , &
1266 ginfo%Flux_Zenith_Radian , &
1267 ginfo%Secant_Flux_Zenith , &
1269 IF ( io_stat /= 0 )
THEN 1270 msg =
'Error reading GeometryInfo data - '//trim(io_msg)
1278 CLOSE( fid,iostat=io_stat,iomsg=io_msg )
1280 msg = trim(msg)//
'; Error closing file during error cleanup - '//trim(io_msg)
1325 INTEGER,
INTENT(IN) :: fid
1330 CHARACTER(*),
PARAMETER :: routine_name =
'CRTM_GeometryInfo_WriteFile(Record)' 1332 CHARACTER(ML) :: msg
1333 CHARACTER(ML) :: io_msg
1342 IF ( err_stat /=
success )
THEN 1343 msg =
'Error writing embedded Geometry data' 1349 WRITE( fid,iostat=io_stat,iomsg=io_msg ) &
1350 ginfo%Distance_Ratio , &
1351 ginfo%Sensor_Scan_Radian , &
1352 ginfo%Sensor_Zenith_Radian , &
1353 ginfo%Sensor_Azimuth_Radian, &
1354 ginfo%Secant_Sensor_Zenith , &
1355 ginfo%Cosine_Sensor_Zenith , &
1356 ginfo%Trans_Zenith_Radian , &
1357 ginfo%Secant_Trans_Zenith , &
1358 ginfo%Source_Zenith_Radian , &
1359 ginfo%Source_Azimuth_Radian, &
1360 ginfo%Secant_Source_Zenith , &
1361 ginfo%Flux_Zenith_Radian , &
1362 ginfo%Secant_Flux_Zenith , &
1364 IF ( io_stat /= 0 )
THEN 1365 msg =
'Error writing GeometryInfo data - '//trim(io_msg)
1374 msg = trim(msg)//
'; Error closing file during error cleanup' character(*), parameter write_error_status
integer function, public crtm_geometryinfo_inquirefile(Filename, n_Profiles)
integer, parameter, public failure
integer, parameter, public warning
integer function, public crtm_geometryinfo_readfile(Filename, GeometryInfo, Quiet, n_Profiles, Debug)
logical function, public crtm_geometryinfo_isvalid(gInfo)
integer, parameter, public fp
elemental subroutine, public crtm_geometry_getvalue(geo, iFOV, Longitude, Latitude, Surface_Altitude, Sensor_Scan_Angle, Sensor_Zenith_Angle, Sensor_Azimuth_Angle, Source_Zenith_Angle, Source_Azimuth_Angle, Flux_Zenith_Angle, Year, Month, Day)
integer function, public readgatts_binary_file(fid, Write_Module, Created_On, Title, History, Comment)
elemental subroutine, public crtm_geometry_destroy(geo)
elemental subroutine, public crtm_geometryinfo_setvalue(gInfo, Geometry, iFOV, Longitude, Latitude, Surface_Altitude, Sensor_Scan_Angle, Sensor_Zenith_Angle, Sensor_Azimuth_Angle, Source_Zenith_Angle, Source_Azimuth_Angle, Flux_Zenith_Angle, Year, Month, Day, Distance_Ratio, Sensor_Scan_Radian, Sensor_Zenith_Radian, Sensor_Azimuth_Radian, Secant_Sensor_Zenith, Cosine_Sensor_Zenith, Source_Zenith_Radian, Source_Azimuth_Radian, Secant_Source_Zenith, Flux_Zenith_Radian, Secant_Flux_Zenith, Trans_Zenith_Radian, Secant_Trans_Zenith, AU_ratio2)
subroutine inquire_cleanup()
real(fp), parameter, public diffusivity_radian
real(fp), parameter, public earth_radius
elemental type(crtm_geometryinfo_type) function crtm_geometryinfo_subtract(gi1, gi2)
real(fp), parameter, public secant_diffusivity
subroutine read_cleanup()
subroutine write_cleanup()
subroutine read_record_cleanup()
integer function, public crtm_geometry_readrecord(fid, geo)
integer function, public open_binary_file(Filename, FileID, For_Output, No_Check)
recursive subroutine, public display_message(Routine_Name, Message, Error_State, Message_Log)
elemental subroutine, public crtm_geometryinfo_destroy(gInfo)
subroutine, public crtm_geometry_inspect(geo, Unit)
elemental logical function crtm_geometryinfo_equal(x, y)
character(*), parameter module_version_id
logical function, public crtm_geometry_isvalid(geo)
elemental subroutine, public crtm_geometry_setvalue(geo, iFOV, Longitude, Latitude, Surface_Altitude, Sensor_Scan_Angle, Sensor_Zenith_Angle, Sensor_Azimuth_Angle, Source_Zenith_Angle, Source_Azimuth_Angle, Flux_Zenith_Angle, Year, Month, Day)
subroutine, public crtm_geometryinfo_inspect(gInfo, Unit)
integer, parameter, public default_n_sigfig
integer function, public writegatts_binary_file(fid, Write_Module, Created_On, Title, History, Comment)
subroutine write_record_cleanup()
integer function read_record(fid, ginfo)
integer function, public crtm_geometryinfo_writefile(Filename, GeometryInfo, Quiet, Debug)
real(fp), parameter, public satellite_height
integer function, public crtm_geometry_writerecord(fid, geo)
subroutine, public crtm_geometryinfo_defineversion(Id)
integer, parameter, public success
elemental subroutine, public crtm_geometryinfo_getvalue(gInfo, Geometry, iFOV, Longitude, Latitude, Surface_Altitude, Sensor_Scan_Angle, Sensor_Zenith_Angle, Sensor_Azimuth_Angle, Source_Zenith_Angle, Source_Azimuth_Angle, Flux_Zenith_Angle, Year, Month, Day, Distance_Ratio, Sensor_Scan_Radian, Sensor_Zenith_Radian, Sensor_Azimuth_Radian, Secant_Sensor_Zenith, Cosine_Sensor_Zenith, Source_Zenith_Radian, Source_Azimuth_Radian, Secant_Source_Zenith, Flux_Zenith_Radian, Secant_Flux_Zenith, Trans_Zenith_Radian, Secant_Trans_Zenith, AU_ratio2)
integer, parameter, public information