Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSMIS upp decoder #1612

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
Open

SSMIS upp decoder #1612

wants to merge 11 commits into from

Conversation

BenjaminRuston
Copy link
Collaborator

Description

Decoder for SSMIS unified pre-processor files

Issue(s) addressed

Resolves #1611

Dependencies

Impact

IODa files for SSMIS from unified pre-processor

Checklist

  • I have performed a self-review of my own code
  • I have run the unit tests before creating the PR

@BenjaminRuston BenjaminRuston requested a review from fcvdb February 4, 2025 02:28
@BenjaminRuston BenjaminRuston changed the title initial commit of a non functioning SSMIS upp decoder SSMIS upp decoder Feb 4, 2025
@BenjaminRuston
Copy link
Collaborator Author

@fcvdb this is almost there, it's something with the time object now quite sure what but think I've seen it before:

              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/benr/work/JCSDA/JEDI/jedi-bundle/build/lib/python3.11/pyiodaconv/ioda_conv_engines.py", line 166, in VerifyDateTime
    if (dtvar.dtype == np.dtype('object')):

maybe will ask @srherbener but know I"ve seen this... something with the type on input.. here some values being passed in

(Pdb) obs_data[('dateTime', 'MetaData')][-10:]
[1719896976, 1719896976, 1719896977, 1719896977, 1719896978, 1719896978, 1719896978, 1719896979, 1719896979, 1719896980]
(Pdb) obs_data[('dateTime', 'MetaData')][:10]
[1719890580, 1719890580, 1719890581, 1719890581, 1719890582, 1719890582, 1719890582, 1719890583, 1719890583, 1719890584]
(Pdb) np.mean(obs_data[('dateTime', 'MetaData')])

all these look ok too:

(Pdb) VarDims
{'brightnessTemperature': ['Location', 'Channel'], 'sensorChannelNumber': ['Channel']}
(Pdb) VarAttrs
OrderedDefaultDict(<function main.<locals>.<lambda> at 0x102c6aa20>, DefaultOrderedDict([(('sensorZenithAngle', 'MetaData'), OrderedDefaultDict(<class 'dict'>, DefaultOrderedDict([('units', 'degree')]))), (('sensorViewAngle', 'MetaData'), OrderedDefaultDict(<class 'dict'>, DefaultOrderedDict([('units', 'degree')]))), (('sensorAzimuthAngle', 'MetaData'), OrderedDefaultDict(<class 'dict'>, DefaultOrderedDict([('units', 'degree')]))), (('dateTime', 'MetaData'), OrderedDefaultDict(<class 'dict'>, DefaultOrderedDict([('units', 'seconds since 1970-01-01T00:00:00Z'), ('_FillValue', -9223372036854775806)]))), (('brightnessTemperature', 'ObsValue'), OrderedDefaultDict(<class 'dict'>, DefaultOrderedDict([('units', 'K'), ('_FillValue', 9.969209968386869e+36)]))), (('brightnessTemperature', 'ObsError'), OrderedDefaultDict(<class 'dict'>, DefaultOrderedDict([('units', 'K'), ('_FillValue', 9.969209968386869e+36)]))), (('brightnessTemperature', 'PreQC'), OrderedDefaultDict(<class 'dict'>, DefaultOrderedDict([('_FillValue', -2147483647)])))]))
(Pdb) GlobalAttrs
{'platformCommonName': 'SSMIS', 'platformLongDescription': 'SSMIS Brightness Temperature Data', 'sensorCentralFrequency': [50.3, 52.8, 53.596, 54.4, 55.5, 57.29, 59.4, 150.0, 183.31, 183.31, 183.31, 19.35, 19.35, 22.235, 37.0, 37.0, 91.655, 91.655, 63.283248, 60.792668, 60.792668, 60.792668, 60.792668, 60.792668], 'datetimeRange': array(['2024-07-02T03:23:00Z', '2024-07-02T05:09:40Z'], dtype=object), 'converter': 'ssmis_upp_2ioda.py'}

@BenjaminRuston
Copy link
Collaborator Author

hmmm, will keep digging:

(('dateTime', 'MetaData'), OrderedDefaultDict(<class 'dict'>, DefaultOrderedDict([('units', 'seconds since 1970-01-01T00:00:00Z')

@BenjaminRuston BenjaminRuston marked this pull request as ready for review February 6, 2025 23:44
@BenjaminRuston
Copy link
Collaborator Author

I've got it sorted.... @srherbener if you saw this at all the error was not converting all the input items in the dictionary to numpy array, or something that would have dtype in their object

it is working now and think @fcvdb and I should be able to finish this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SSMIS converter for unified pre-processor files
1 participant