Skip to content

Commit

Permalink
Merge pull request #59 from GEOS-ESM/feature/pcastell/debug_viirs_paths
Browse files Browse the repository at this point in the history
Feature/pcastell/debug viirs paths
  • Loading branch information
patricia-nasa authored Mar 9, 2024
2 parents 9f349b4 + 4a15fb7 commit e4773fd
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 17 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Added

- Added DB_DEEP data stream for VIIRS NNR
- scripts to plot satellite tracks for each day - focused on ASIA-AQ regions, but can be extended.
- ASIA-AQ mission directory initialized with FLUID instance from FIREX-AQ
- pyabc module added in GMAO_aeropybs. the snket class is needed in pyabc for loading ffnet .net files
Expand All @@ -21,6 +22,7 @@
- Update GMAOpyobs to v1.0.4
- Update GMAOpyobs to v1.0.5
- Update GMAOpyobs to v1.0.6
- Update GMAOpyobs to v1.0.8

## [v2.0.2] - 2023-05-25

Expand Down
2 changes: 1 addition & 1 deletion components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ MAPL:
GMAOpyobs:
local: ./src/Shared/GMAO_Shared/GMAO_pyobs@
remote: ../GMAOpyobs.git
tag: v1.0.6
tag: v1.0.8
develop: develop
9 changes: 6 additions & 3 deletions src/Applications/GAAS_App/mxd04_nnr.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
# -----------------------------
CHANNELS = dict (
LAND = ( 470, 550, 660, 870, 1200, 1600, 2100, 412, 440),
OCEAN = ( 470, 550, 660, 870, 1200, 1600, 2100 ),
OCEAN = ( 470, 550, 660, 870, 1200, 1600, 2100, 412, 440 ),
DEEP = ( 412, 470, 660 ),
)

Expand Down Expand Up @@ -162,7 +162,10 @@ def __init__(self,l2_path,prod,algo,syn_time,aer_x,slv_x,
self.aodmax = aodmax
self.aodSTD = aodSTD
self.aodLength = aodLength
self.wavs = wavs
if type(wavs) is str:
self.wavs = wavs.split(',')
else:
self.wavs = wavs

# Initialize superclass
# ---------------------
Expand Down Expand Up @@ -190,7 +193,7 @@ def __init__(self,l2_path,prod,algo,syn_time,aer_x,slv_x,
self.sChannels = SCHANNELS[algo]

if algo == "OCEAN":
self.reflectance = self.reflectance[:,0:7] #not using 412, 443, and 745 for now
self.reflectance = self.reflectance[:,0:-1] #not using 745 for now
if algo == "LAND":
self.reflectance = self.reflectance[:,0:-1] #not using 745 for now

Expand Down
2 changes: 1 addition & 1 deletion src/Applications/GAAS_App/viirs_l2a.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
pass

try:
aodLenth = cf('VIIRS_L2A_AODLENGTH')
aodLength = cf('VIIRS_L2A_AODLENGTH')
Options += " --aodLength=" + aodLength
except:
pass
Expand Down
3 changes: 2 additions & 1 deletion src/Applications/GAAS_App/vx04_l2a.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
Ident = dict( vsnppdto = ('SNPP','dt_ocean'),
vsnppdtl = ('SNPP','dt_land'),
vsnppdbo = ('SNPP','db_ocean'),
vsnppdbl = ('SNPP','db_land')
vsnppdbl = ('SNPP','db_land'),
vsnppdbd = ('SNPP','db_deep')
)

#---------------------------------------------------------------------
Expand Down
20 changes: 15 additions & 5 deletions src/Applications/GAAS_App/vx04_nnr.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ def __init__(self,l2_path,sat,algo,syn_time,aer_x,
self.aodmax = aodmax
self.aodSTD = aodSTD
self.aodLength = aodLength
self.wavs = wavs
if type(wavs) is str:
self.wavs = wavs.split(',')
else:
self.wavs = wavs

# Initialize superclass
# set anet_wav to True so MODIS wavelengths align with AERONET
Expand All @@ -117,7 +120,9 @@ def __init__(self,l2_path,sat,algo,syn_time,aer_x,
SDS=SDS,
alias=ALIAS,
Verb=verbose,
anet_wav=True)
anet_wav=True)
if "pixel_elevation" in self.__dict__:
self.pixel_elevation = self.pixel_elevation*1e-4

if self.nobs < 1:
return # no obs, nothing to do
Expand All @@ -129,10 +134,15 @@ def __init__(self,l2_path,sat,algo,syn_time,aer_x,
for i,c in enumerate(self.rChannels):
self.iGood = self.iGood & (self.reflectance[:,i]>0)

if "LAND" in algo:
if ("LAND" in algo) or ("DEEP" in algo):
self.iGood = self.iGood & (self.ScatteringAngle < scat_thresh)
for i,c in enumerate(self.sChannels):
self.iGood = self.iGood & (self.sfc_reflectance[:,i]>0)
if "LAND" in algo:
# 412 surface reflectance not used for vegetated surfaces
self.iGood = self.iGood & self.sfc_reflectance[:,0].mask & ~self.sfc_reflectance[:,1].mask & ~self.sfc_reflectance[:,2].mask

elif "DEEP" in algo:
for i,c in enumerate(self.sChannels):
self.iGood = self.iGood & ~self.sfc_reflectance[:,i].mask

if "OCEAN" in algo:
self.iGood = self.iGood & (self.GlintAngle > glint_thresh)
Expand Down
15 changes: 9 additions & 6 deletions src/Shared/GMAO_Shared/GMAO_ods/pyods_.F90
Original file line number Diff line number Diff line change
Expand Up @@ -632,12 +632,15 @@ subroutine pyods_putAll(filename, ftype, nymd,nhms, nsyn, nobs, &
ods%meta%kx_names(332) = 'Himawari Aerosol (Dark Target Land Algorithm)'
ods%meta%kx_names(333) = 'VIIRS SNPP Aerosol (Deep Blue Land Algorithm)'
ods%meta%kx_names(334) = 'VIIRS SNPP Aerosol (Deep Blue Ocean Algorithm)'
ods%meta%kx_names(335) = 'VIIRS SNPP Aerosol (Dark Target Land Algorithm)'
ods%meta%kx_names(336) = 'VIIRS SNPP Aerosol (Dark Target Ocean Algorithm)'
ods%meta%kx_names(337) = 'VIIRS NOAA-20 Aerosol (Deep Blue Land Algorithm)'
ods%meta%kx_names(338) = 'VIIRS NOAA-20 Aerosol (Deep Blue Ocean Algorithm)'
ods%meta%kx_names(339) = 'VIIRS NOAA-20 Aerosol (Dark Target Land Algorithm)'
ods%meta%kx_names(340) = 'VIIRS NOAA-20 Aerosol (Dark Target Ocean Algorithm)'
ods%meta%kx_names(335) = 'VIIRS SNPP Aerosol (Deep Blue Deep Algorithm)'
ods%meta%kx_names(336) = 'VIIRS SNPP Aerosol (Dark Target Land Algorithm)'
ods%meta%kx_names(337) = 'VIIRS SNPP Aerosol (Dark Target Ocean Algorithm)'
ods%meta%kx_names(338) = 'VIIRS NOAA-20 Aerosol (Deep Blue Land Algorithm)'
ods%meta%kx_names(339) = 'VIIRS NOAA-20 Aerosol (Deep Blue Deep Algorithm)'
ods%meta%kx_names(340) = 'VIIRS NOAA-20 Aerosol (Deep Blue Ocean Algorithm)'
ods%meta%kx_names(341) = 'VIIRS NOAA-20 Aerosol (Dark Target Land Algorithm)'
ods%meta%kx_names(342) = 'VIIRS NOAA-20 Aerosol (Dark Target Ocean Algorithm)'


call ods_put (filename, ftype, nymd, nhms, ods, rc)
if ( rc .ne. 0 ) return
Expand Down

0 comments on commit e4773fd

Please sign in to comment.