FV3 Bundle
CRTM_MW_Snow_SfcOptics.f90
Go to the documentation of this file.
1 !
2 ! CRTM_MW_Snow_SfcOptics
3 !
4 ! Module to compute the surface optical properties for SNOW surfaces at
5 ! microwave frequencies required for determining the SNOW surface
6 ! contribution to the radiative transfer.
7 !
8 ! This module is provided to allow developers to "wrap" their existing
9 ! codes inside the provided functions to simplify integration into
10 ! the main CRTM_SfcOptics module.
11 !
12 !
13 ! CREATION HISTORY:
14 ! Written by: Paul van Delst, 23-Jun-2005
15 ! paul.vandelst@noaa.gov
16 !
17 ! Modified by: Banghua Yan, 03-Oct-2007
18 ! Banghua.Yan@noaa.gov
19 !
20 ! Modified by: Yong Chen. 09-Jul-212
21 ! Yong.Chen@noaa.gov
22 
24 
25  ! -----------------
26  ! Environment setup
27  ! -----------------
28  ! Module use
29  USE type_kinds, ONLY: fp
30  USE message_handler, ONLY: success
31  USE crtm_parameters, ONLY: zero, one
32  USE crtm_spccoeff, ONLY: sc
37  USE crtm_sensorinfo, ONLY: wmo_amsua, &
38  wmo_amsub, &
39  wmo_amsre, &
40  wmo_ssmi , &
41  wmo_msu , &
42  wmo_mhs , &
43  wmo_ssmis, &
44  wmo_atms
52  ! Disable implicit typing
53  IMPLICIT NONE
54 
55  ! ------------
56  ! Visibilities
57  ! ------------
58  ! Everything private by default
59  PRIVATE
60  ! Data types
61  PUBLIC :: ivar_type
62  ! Science routines
66 
67 
68  ! -----------------
69  ! Module parameters
70  ! -----------------
71  CHARACTER(*), PARAMETER :: module_version_id = &
72  '$Id: CRTM_MW_Snow_SfcOptics.f90 60152 2015-08-13 19:19:13Z paul.vandelst@noaa.gov $'
73 
74 
75  ! --------------------------------------
76  ! Structure definition to hold forward
77  ! variables across FWD, TL, and AD calls
78  ! --------------------------------------
79  TYPE :: ivar_type
80  PRIVATE
81  INTEGER :: dummy = 0
82  END TYPE ivar_type
83 
84 
85 CONTAINS
86 
87 
88 !----------------------------------------------------------------------------------
89 !:sdoc+:
90 !
91 ! NAME:
92 ! Compute_MW_Snow_SfcOptics
93 !
94 ! PURPOSE:
95 ! Function to compute the surface emissivity and reflectivity at microwave
96 ! frequencies over a snow surface.
97 !
98 ! This function is a wrapper for third party code.
99 !
100 ! CALLING SEQUENCE:
101 ! Error_Status = Compute_MW_Snow_SfcOptics( &
102 ! Surface , &
103 ! GeometryInfo, &
104 ! SensorIndex , &
105 ! ChannelIndex, &
106 ! SfcOptics )
107 !
108 ! INPUTS:
109 ! Surface: CRTM_Surface structure containing the surface state
110 ! data.
111 ! UNITS: N/A
112 ! TYPE: CRTM_Surface_type
113 ! DIMENSION: Scalar
114 ! ATTRIBUTES: INTENT(IN)
115 !
116 ! GeometryInfo: CRTM_GeometryInfo structure containing the
117 ! view geometry information.
118 ! UNITS: N/A
119 ! TYPE: CRTM_GeometryInfo_type
120 ! DIMENSION: Scalar
121 ! ATTRIBUTES: INTENT(IN)
122 !
123 ! SensorIndex: Sensor index id. This is a unique index associated
124 ! with a (supported) sensor used to access the
125 ! shared coefficient data for a particular sensor.
126 ! See the ChannelIndex argument.
127 ! UNITS: N/A
128 ! TYPE: INTEGER
129 ! DIMENSION: Scalar
130 ! ATTRIBUTES: INTENT(IN)
131 !
132 ! ChannelIndex: Channel index id. This is a unique index associated
133 ! with a (supported) sensor channel used to access the
134 ! shared coefficient data for a particular sensor's
135 ! channel.
136 ! See the SensorIndex argument.
137 ! UNITS: N/A
138 ! TYPE: INTEGER
139 ! DIMENSION: Scalar
140 ! ATTRIBUTES: INTENT(IN)
141 !
142 ! OUTPUTS:
143 ! SfcOptics: CRTM_SfcOptics structure containing the surface
144 ! optical properties required for the radiative
145 ! transfer calculation. On input the Angle component
146 ! is assumed to contain data.
147 ! UNITS: N/A
148 ! TYPE: CRTM_SfcOptics_type
149 ! DIMENSION: Scalar
150 ! ATTRIBUTES: INTENT(IN OUT)
151 !
152 ! FUNCTION RESULT:
153 ! Error_Status: The return value is an integer defining the error status.
154 ! The error codes are defined in the Message_Handler module.
155 ! If == SUCCESS the computation was sucessful
156 ! == FAILURE an unrecoverable error occurred
157 ! UNITS: N/A
158 ! TYPE: INTEGER
159 ! DIMENSION: Scalar
160 !
161 ! COMMENTS:
162 ! Note the INTENT on the output SfcOptics argument is IN OUT rather
163 ! than just OUT as it is assumed to contain some data upon input.
164 !
165 !:sdoc-:
166 !----------------------------------------------------------------------------------
167 
168  FUNCTION compute_mw_snow_sfcoptics( &
169  Surface , & ! Input
170  GeometryInfo, & ! Input
171  SensorIndex , & ! Input
172  ChannelIndex, & ! Input
173  SfcOptics ) & ! Output
174  result( error_status )
175  ! Arguments
176  TYPE(crtm_surface_type), INTENT(IN) :: surface
177  TYPE(crtm_geometryinfo_type), INTENT(IN) :: geometryinfo
178  INTEGER, INTENT(IN) :: sensorindex
179  INTEGER, INTENT(IN) :: channelindex
180  TYPE(crtm_sfcoptics_type), INTENT(IN OUT) :: sfcoptics
181  ! Function result
182  INTEGER :: error_status
183  ! Local parameters
184  CHARACTER(*), PARAMETER :: routine_name = 'Compute_MW_Snow_SfcOptics'
185  REAL(fp), PARAMETER :: msu_snow_temperature_threshold = 100.0_fp ! K
186  REAL(fp), PARAMETER :: msu_tb_threshold = 50.0_fp ! K
187  REAL(fp), PARAMETER :: msu_alpha_c = 0.35_fp
188  REAL(fp), PARAMETER :: msu_emissivity_threshold = 0.6_fp
189  REAL(fp), PARAMETER :: msu_default_emissivity = 0.855_fp
190  REAL(fp), PARAMETER :: frequency_threshold = 80.0_fp ! GHz
191  REAL(fp), PARAMETER :: default_emissivity = 0.90_fp
192  REAL(fp), PARAMETER :: not_used(4) = -99.9_fp
193  INTEGER, PARAMETER :: amsre_v_index(6) = (/1, 3, 5, 7, 9, 11/) ! AMSRE channels with V pol.
194  INTEGER, PARAMETER :: amsre_h_index(6) = (/2, 4, 6, 8, 10, 12/) ! AMSRE channels with H pol.
195  INTEGER, PARAMETER :: amsua_index(4) = (/1, 2, 3, 15/)
196  INTEGER, PARAMETER :: ssmis_index(8) = (/13,12,14,16,15,17,18,8/) ! With swapped polarisations
197  INTEGER, PARAMETER :: atms_index(5) = (/1, 2, 3, 16,17/) ! With mixed polarisations
198  ! Local variables
199  INTEGER :: i
200  REAL(fp) :: sensor_zenith_angle
201  REAL(fp) :: alpha
202 
203 
204  ! Set up
205  error_status = success
206  CALL crtm_geometryinfo_getvalue( geometryinfo, sensor_zenith_angle = sensor_zenith_angle )
207 
208 
209  ! Compute the surface emissivities
210  sensor_type: SELECT CASE( surface%SensorData%WMO_Sensor_ID )
211 
212  ! ATMSemissivity model
213  CASE( wmo_atms )
214  DO i = 1, sfcoptics%n_Angles
215  CALL nesdis_atms_snowem( sensor_zenith_angle, & ! Input, Degree
216  sfcoptics%Angle(i), & ! Input, Degree
217  sc(sensorindex)%Frequency(channelindex), & ! Input, GHz
218  surface%SensorData%Tb(atms_index), & ! Input, ATMS
219  surface%Snow_Temperature, & ! Input, K
220  surface%Snow_Depth, & ! Input, mm
221  sfcoptics%Emissivity(i,2), & ! Output, H component
222  sfcoptics%Emissivity(i,1) ) ! Output, V component
223  END DO
224 
225 
226  ! AMSU-A emissivity model
227  CASE( wmo_amsua )
228  DO i = 1, sfcoptics%n_Angles
229  CALL nesdis_amsu_snowem( sensor_zenith_angle, & ! Input, Degree
230  sfcoptics%Angle(i), & ! Input, Degree
231  sc(sensorindex)%Frequency(channelindex), & ! Input, GHz
232  surface%Snow_Depth, & ! Input, mm
233  surface%Snow_Temperature, & ! Input, K
234  surface%SensorData%Tb(amsua_index), & ! Input, AMSUA
235  not_used(1:2), & ! Input, AMSUB *** NO AMSU-B DATA ***
236  sfcoptics%Emissivity(i,2), & ! Output, H component
237  sfcoptics%Emissivity(i,1) ) ! Output, V component
238  END DO
239 
240  ! AMSU-B emissivity model
241  CASE( wmo_amsub)
242  DO i = 1, sfcoptics%n_Angles
243  CALL nesdis_amsu_snowem( sensor_zenith_angle, & ! Input, Degree
244  sfcoptics%Angle(i), & ! Input, Degree
245  sc(sensorindex)%Frequency(channelindex), & ! Input, GHz
246  surface%Snow_Depth, & ! Input, mm
247  surface%Snow_Temperature, & ! Input, K
248  not_used, & ! Input AMSUA *** NO AMSU-A DATA ***
249  surface%SensorData%Tb(1:2), & ! Input, AMSUB
250  sfcoptics%Emissivity(i,2), & ! Output, H component
251  sfcoptics%Emissivity(i,1) ) ! Output, V component
252  END DO
253 
254  ! MHS emissivity model
255  CASE (wmo_mhs)
256  DO i = 1, sfcoptics%n_Angles
257  CALL nesdis_snowem_mhs( sensor_zenith_angle, & ! Input, Degree
258  sfcoptics%Angle(i), & ! Input, Degree
259  sc(sensorindex)%Frequency(channelindex), & ! Input, GHz
260  surface%Snow_Temperature, & ! Input, K
261  surface%SensorData%Tb(1:2), & ! Input, AMSUB
262  sfcoptics%Emissivity(i,2), & ! Output, H component
263  sfcoptics%Emissivity(i,1) ) ! Output, V component
264  END DO
265 
266  ! AMSR-E emissivity model
267  CASE( wmo_amsre )
268  DO i = 1, sfcoptics%n_Angles
269  CALL nesdis_amsre_snow(sc(sensorindex)%Frequency(channelindex), & ! Input, GHz
270  sfcoptics%Angle(i), & ! Input, Degree
271  surface%SensorData%Tb(amsre_v_index), & ! Input, Tb_V, K
272  surface%SensorData%Tb(amsre_h_index), & ! Input, Tb_H, K
273  surface%Snow_Temperature, & ! Input, Ts, K
274  surface%Snow_Temperature, & ! Input, Tsnow, K
275  sfcoptics%Emissivity(i,2), & ! Output, H component
276  sfcoptics%Emissivity(i,1) ) ! Output, V component
277  END DO
278 
279  ! SSM/I emissivity model
280  CASE( wmo_ssmi )
281  DO i = 1, sfcoptics%n_Angles
282  CALL nesdis_ssmi_snowem(sc(sensorindex)%Frequency(channelindex), & ! Input, GHz
283  sfcoptics%Angle(i), & ! Input, Degree
284  surface%Snow_Temperature, & ! Input, K
285  surface%SensorData%Tb, & ! Input, K
286  surface%Snow_Depth, & ! Input, mm
287  sfcoptics%Emissivity(i,2), & ! Output, H component
288  sfcoptics%Emissivity(i,1) ) ! Output, V component
289  END DO
290 
291  ! SSMIS emissivity model
292  CASE( wmo_ssmis )
293  DO i = 1, sfcoptics%n_Angles
294  CALL nesdis_ssmis_snowem(sc(sensorindex)%Frequency(channelindex), & ! Input, GHz
295  sfcoptics%Angle(i), & ! Input, Degree
296  surface%Snow_Temperature, & ! Input, K
297  surface%SensorData%Tb(ssmis_index), & ! Input, K
298  surface%Snow_Depth, & ! Input, mm
299  sfcoptics%Emissivity(i,2), & ! Output, H component
300  sfcoptics%Emissivity(i,1) ) ! Output, V component
301  END DO
302 
303  ! MSU emissivity model
304  CASE( wmo_msu )
305  DO i = 1, sfcoptics%n_Angles
306  IF( surface%Snow_Temperature > msu_snow_temperature_threshold .AND. &
307  surface%SensorData%Tb(1) > msu_tb_threshold ) THEN
308  alpha = msu_alpha_c * surface%Snow_Temperature
309  sfcoptics%Emissivity(i,1) = (surface%SensorData%Tb(1)-alpha)/&
310  (surface%Snow_Temperature-alpha)
311  IF( sfcoptics%Emissivity(i,1) > one ) &
312  sfcoptics%Emissivity(i,1) = one
313  IF( sfcoptics%Emissivity(i,1) < msu_emissivity_threshold ) &
314  sfcoptics%Emissivity(i,1) = msu_emissivity_threshold
315  ELSE
316  sfcoptics%Emissivity(i,1) = msu_default_emissivity
317  END IF
318  sfcoptics%Emissivity(i,2) = sfcoptics%Emissivity(i,1)
319  END DO
320 
321  ! Default physical model
322  CASE DEFAULT
323  IF ( sc(sensorindex)%Frequency(channelindex) < frequency_threshold ) THEN
324  DO i = 1, sfcoptics%n_Angles
325  CALL nesdis_landem( sfcoptics%Angle(i), & ! Input, Degree
326  sc(sensorindex)%Frequency(channelindex), & ! Input, GHz
327  not_used(1), & ! Input, Soil_Moisture_Content, g.cm^-3
328  not_used(1), & ! Input, Vegetation_Fraction
329  surface%Snow_Temperature, & ! Input, K
330  surface%Snow_Temperature, & ! Input, K
331  surface%Lai, & ! Input, Leaf Area Index
332  surface%Soil_Type, & ! Input, Soil Type (1 - 9)
333  surface%Vegetation_Type, & ! Input, Vegetation Type (1 - 13)
334  surface%Snow_Depth, & ! Input, mm
335  sfcoptics%Emissivity(i,2), & ! Output, H component
336  sfcoptics%Emissivity(i,1) ) ! Output, V component
337  END DO
338  ELSE
339  sfcoptics%Emissivity(1:sfcoptics%n_Angles,1:2) = default_emissivity
340  END IF
341 
342  END SELECT sensor_type
343 
344 
345  ! Compute the surface reflectivities,
346  ! assuming a specular surface
347  sfcoptics%Reflectivity = zero
348  DO i = 1, sfcoptics%n_Angles
349  sfcoptics%Reflectivity(i,1,i,1) = one-sfcoptics%Emissivity(i,1)
350  sfcoptics%Reflectivity(i,2,i,2) = one-sfcoptics%Emissivity(i,2)
351  END DO
352 
353  END FUNCTION compute_mw_snow_sfcoptics
354 
355 
356 !----------------------------------------------------------------------------------
357 !:sdoc+:
358 !
359 ! NAME:
360 ! Compute_MW_Snow_SfcOptics_TL
361 !
362 ! PURPOSE:
363 ! Function to compute the tangent-linear surface emissivity and
364 ! reflectivity at microwave frequencies over a snow surface.
365 !
366 ! This function is a wrapper for third party code.
367 !
368 ! NB: CURRENTLY THIS IS A STUB FUNCTION AS THERE ARE NO TL
369 ! COMPONENTS IN THE MW SNOW SFCOPTICS COMPUTATIONS.
370 !
371 ! CALLING SEQUENCE:
372 ! Error_Status = Compute_MW_Snow_SfcOptics_TL( SfcOptics_TL )
373 !
374 ! OUTPUTS:
375 ! SfcOptics_TL: Structure containing the tangent-linear surface
376 ! optical properties required for the tangent-
377 ! linear radiative transfer calculation.
378 ! UNITS: N/A
379 ! TYPE: CRTM_SfcOptics_type
380 ! DIMENSION: Scalar
381 ! ATTRIBUTES: INTENT(IN OUT)
382 !
383 ! FUNCTION RESULT:
384 ! Error_Status: The return value is an integer defining the error status.
385 ! The error codes are defined in the Message_Handler module.
386 ! If == SUCCESS the computation was sucessful
387 ! == FAILURE an unrecoverable error occurred
388 ! UNITS: N/A
389 ! TYPE: INTEGER
390 ! DIMENSION: Scalar
391 !
392 ! COMMENTS:
393 ! Note the INTENT on the output SfcOptics_TL argument is IN OUT rather
394 ! than just OUT. This is necessary because the argument may be defined
395 ! upon input.
396 !
397 !:sdoc-:
398 !----------------------------------------------------------------------------------
399 
400  FUNCTION compute_mw_snow_sfcoptics_tl( &
401  SfcOptics_TL) & ! TL Output
402  result( err_stat )
403  ! Arguments
404  TYPE(crtm_sfcoptics_type), INTENT(IN OUT) :: sfcoptics_tl
405  ! Function result
406  INTEGER :: err_stat
407  ! Local parameters
408  CHARACTER(*), PARAMETER :: routine_name = 'Compute_MW_Snow_SfcOptics_TL'
409  ! Local variables
410 
411 
412  ! Set up
413  err_stat = success
414 
415 
416  ! Compute the tangent-linear surface optical parameters
417  ! ***No TL models yet, so default TL output is zero***
418  sfcoptics_tl%Reflectivity = zero
419  sfcoptics_tl%Emissivity = zero
420 
421  END FUNCTION compute_mw_snow_sfcoptics_tl
422 
423 
424 
425 !----------------------------------------------------------------------------------
426 !:sdoc+:
427 !
428 ! NAME:
429 ! Compute_MW_Snow_SfcOptics_AD
430 !
431 ! PURPOSE:
432 ! Function to compute the adjoint surface emissivity and
433 ! reflectivity at microwave frequencies over a snow surface.
434 !
435 ! This function is a wrapper for third party code.
436 !
437 ! NB: CURRENTLY THIS IS A STUB FUNCTION AS THERE ARE NO AD
438 ! COMPONENTS IN THE MW SNOW SFCOPTICS COMPUTATIONS.
439 !
440 ! CALLING SEQUENCE:
441 ! Error_Status = Compute_MW_Snow_SfcOptics_AD( SfcOptics_AD )
442 !
443 ! INPUTS:
444 ! SfcOptics_AD: Structure containing the adjoint surface optical
445 ! properties required for the adjoint radiative
446 ! transfer calculation.
447 ! *** COMPONENTS MODIFIED UPON OUTPUT ***
448 ! UNITS: N/A
449 ! TYPE: CRTM_SfcOptics_type
450 ! DIMENSION: Scalar
451 ! ATTRIBUTES: INTENT(IN OUT)
452 !
453 ! FUNCTION RESULT:
454 ! Error_Status: The return value is an integer defining the error status.
455 ! The error codes are defined in the Message_Handler module.
456 ! If == SUCCESS the computation was sucessful
457 ! == FAILURE an unrecoverable error occurred
458 ! UNITS: N/A
459 ! TYPE: INTEGER
460 ! DIMENSION: Scalar
461 !
462 ! COMMENTS:
463 ! Note the INTENT on the input adjoint arguments are IN OUT regardless
464 ! of their specification as "input" or "output". This is because these
465 ! arguments may contain information on input, or need to be zeroed on
466 ! output (or both).
467 !
468 !:sdoc-:
469 !----------------------------------------------------------------------------------
470 
471  FUNCTION compute_mw_snow_sfcoptics_ad( &
472  SfcOptics_AD) & ! AD Input
473  result( err_stat )
474  ! Arguments
475  TYPE(crtm_sfcoptics_type), INTENT(IN OUT) :: sfcoptics_ad
476  ! Function result
477  INTEGER :: err_stat
478  ! Local parameters
479  CHARACTER(*), PARAMETER :: routine_name = 'Compute_MW_Snow_SfcOptics_AD'
480  ! Local variables
481 
482 
483  ! Set up
484  err_stat = success
485 
486 
487  ! Compute the adjoint surface optical parameters
488  ! ***No AD models yet, so there is no impact on AD result***
489  sfcoptics_ad%Reflectivity = zero
490  sfcoptics_ad%Emissivity = zero
491 
492  END FUNCTION compute_mw_snow_sfcoptics_ad
493 
494 END MODULE crtm_mw_snow_sfcoptics
integer, parameter, public wmo_ssmi
integer, parameter, public wmo_mhs
integer, parameter, public wmo_amsre
real(fp), parameter, public zero
character(*), parameter module_version_id
subroutine, public nesdis_amsre_snow(Frequency, User_Angle, tv, th, Ts, Tsnow, Emissivity_H, Emissivity_V)
integer, parameter, public fp
Definition: Type_Kinds.f90:124
subroutine, public nesdis_landem(Angle, Frequency, Soil_Moisture_Content, Vegetation_Fraction, Soil_Temperature, t_skin, Lai, Soil_Type, Vegetation_Type, Snow_Depth, Emissivity_H, Emissivity_V)
integer function, public compute_mw_snow_sfcoptics_tl(SfcOptics_TL)
integer function, public compute_mw_snow_sfcoptics(Surface, GeometryInfo, SensorIndex, ChannelIndex, SfcOptics)
integer, parameter, public wmo_ssmis
subroutine, public nesdis_snowem_mhs(Satellite_Angle, User_Angle, frequency, Ts, tbb, Emissivity_H, Emissivity_V)
subroutine, public nesdis_amsu_snowem(Satellite_Angle, User_Angle, frequency, Snow_Depth, Ts, tba, tbb, Emissivity_H, Emissivity_V)
integer, parameter, public wmo_msu
integer function, public compute_mw_snow_sfcoptics_ad(SfcOptics_AD)
subroutine, public nesdis_atms_snowem(Satellite_Angle, User_Angle, Frequency, Tbs, Tss, Snow_Depth, Emissivity_H, Emissivity_V)
real(fp), parameter, public one
integer, parameter, public wmo_amsua
integer, parameter, public wmo_atms
subroutine, public nesdis_ssmis_snowem(frequency, Angle, Ts, tb, Depth, Emissivity_H, Emissivity_V)
type(spccoeff_type), dimension(:), allocatable, save, public sc
subroutine, public nesdis_ssmi_snowem(frequency, Angle, Ts, tb, Depth, Emissivity_H, Emissivity_V)
integer, parameter, public wmo_amsub
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)