OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
water_vapor.c
Go to the documentation of this file.
1 #include <math.h>
2 
3 /* Returns SeaWiFS water-vapor transmittance */
4 float water_vapor(int iband, float uH2O, float airmass) {
5  static float a[4] = {-8.62884, -6.94310, -5.81033, -5.51066};
6  static float b[4] = {0.766159, 0.813607, 0.617758, 0.678041};
7 
8  int i = iband - 4;
9 
10  if (i < 0 || i > 3)
11  return (1.0);
12  else
13  return (exp(-exp(a[i] + b[i] * log(airmass * uH2O))));
14 }
15 
16 void water_vapor_(int *iband, float *uH2O, float *airmass, float *t_h2o) {
17  *t_h2o = water_vapor(*iband, *uH2O, *airmass);
18  return;
19 }
20 
21 
22 /*
23 From: Jacques Descloitres <jack@modland.nascom.nasa.gov>
24 
25 I used Anne Vermeulen's computations to produce a fit of the water vapor
26 transmittance. She once used 6S to compute the gaseous transmittance in many
27 different conditions, using the exact SeaWiFS bands.
28 These computations use the temperature and pressure vertical profiles of a
29 US62 atmospheric profile.
30 These computations give a comprehensive set of transmittance values in all
31 SeaWiFS bands for a whole range of viewing conditions and water vapor content.
32 
33 Based on these simulations, I came up with the following expression to
34 approximate the transmittance:
35 tH2O=exp(-exp(a+b*log(m*uH2O))),
36 where m is the air mass: 1/mus+1/muv
37  uH2O is the total water vapor content in g/cm2
38 
39 Band 5: a=-8.62884 b=0.766159 RMSE=9.21441e-06
40 Band 6: a=-6.9431 b=0.813607 RMSE=7.44725e-05
41 Band 7: a=-5.81033 b=0.617758 RMSE=9.91917e-05
42 Band 8: a=-5.51066 b=0.678041 RMSE=0.000112495
43 
44 Note that this approximation is close to what is used for the MODIS land
45 atmospheric correction.
46 
47 As you can see the root mean square error is lower than 1e-4, which is much
48 more accurate than necessary.
49  */
void water_vapor_(int *iband, float *uH2O, float *airmass, float *t_h2o)
Definition: water_vapor.c:16
data_t b[NROOTS+1]
Definition: decode_rs.h:77
int i
Definition: decode_rs.h:71
PGE01 indicating that PGE02 PGE01 V6 for and PGE01 V2 for MOD03 were used to produce the granule By convention adopted in all MODIS Terra PGE02 code versions are The fourth digit of the PGE02 version denotes the LUT version used to produce the granule The source of the metadata environment variable ProcessingCenter was changed from a QA LUT value to the Process Configuration A sign used in error in the second order term was changed to a
Definition: HISTORY.txt:424
float water_vapor(int iband, float uH2O, float airmass)
Definition: water_vapor.c:4