-
Notifications
You must be signed in to change notification settings - Fork 0
Compute brightness temperature for a MODIS infrared band Terra or Aqua.
License
gpcureton/ModisL1B_Rad2BT
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
############################################################# # # # MODIS: Radiance to Brightness Temperature # # # ############################################################# #----------------------------------------------------------------------- #!F77 # #!DESCRIPTION: # Compute brightness temperature for a MODIS infrared band # on Terra or Aqua. # # Spectral responses for each IR detector were obtained from MCST: # ftp://ftp.mcst.ssai.biz/pub/permanent/MCST in directories # PFM_L1B_LUT_4-30-99 (Terra) and FM1_RSR_LUT_07-10-01 (Aqua). # # An average spectral response for all detectors in each band was # computed. The detector-averaged spectral response data were used # to compute the effective central wavenumbers and temperature # correction coefficients included in this module. # # NOTE: The plaform name ('Terra' or 'Aqua') is passed to this # function via the common block defined in 'platform_name.inc'. # #!INPUT PARAMETERS: # RAD (REAL) Planck radiance (units are determined by UNITS) # PLATFORM (LONG) Platform Name: Terra=0 or Aqua=1 # BAND (LONG) MODIS IR band number (20-25, 27-36) # UNITS (LONG) Flag defining radiance units # 0 => milliWatts per square meter per # steradian per inverse centimeter # 1 => Watts per square meter per # steradian per micron # #!OUTPUT PARAMETERS: # MODIS_BRIGHT Brightness temperature (Kelvin) # Note that a value of -1.0 is returned if # RAD .LE. 0.0, or BAND is not in range 20-25, 27-36. # #!REVISION HISTORY: # Liam.Gumley@ssec.wisc.edu # #!TEAM-UNIQUE HEADER: # Developed by the MODIS Group, CIMSS/SSEC, UW-Madison. # #!END #----------------------------------------------------------------------- I got a hold of Liam's radiance to BT code, and ran it through f2py to make the python module mod_br.so I have included the commands I ran in f2py_commands.txt. The first generates the mod_br.pyf file... f2py modis_bright.f bright_m.f brite_m.f -m mod_br -h mod_br.pyf --overwrite-signature which you then edit to put in the "intent" statments in the variable declarations. The second command generates the module file... f2py -c mod_br.pyf modis_bright.f bright_m.f brite_m.f I ended up inlining the included code, and removing Liam's common block. f2py doesn't seem to know what to do with included code (or I don't know the f2py command to do it properly). The main function is modis_bright(radiance,platform,band,units). Check modis_bright.f for the definitions. But for platform, 0==Terra, 1==Aqua This is how I used the module... import mod_br as mod_br import scipy as spy import numpy as np mod_br.modis_bright(12.,1,31,1) Out[16]: 316.25592041015625 radiance = np.linspace(5.,12.,10) modBT = np.vectorize(mod_br.modis_bright) brightTempsAqua = modBT(radiance,1,31,1) print brightTempsAqua [ 261.40756226 269.14404297 276.27868652 282.92977905 289.18231201 295.09991455 300.73129272 306.11483765 311.28134155 316.25592041] ---- Geoff Cureton SSEC, Oct 2008
About
Compute brightness temperature for a MODIS infrared band Terra or Aqua.
Topics
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published