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

added files to the repo #22

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

Conversation

JasonWelsh-NOAA
Copy link

Added files for ascatw converter program in order for a pull request to be completed.

query: '*/WS10'

# Total Number (with respect to accumulation or average)
TotalNumber:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inconsistent nameing, start with lower case

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use Camel case, i.e. "totalNumber"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made that change. Thanks!

query: '*/ACAV'

#BackScatter Distance
BackScatterDistance:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made that change. Thanks!

query: '*/BSCD'

#Likelihood computed for solution
LikelihoodComputedForSolution:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it; thanks!

Comment on lines 94 to 105
# {
# 'name': 'windSpeed',
# 'source': 'variables/windSpeed',
# 'units': 'm/s',
# 'longName': 'Eastward Wind Component',
# },
# {
# 'name': 'windSpeed',
# 'source': 'variables/windSpeed',
# 'units': 'm/s',
# 'longName': 'Northward Wind Component',
# },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove all commented code

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I removed that commented code section and will do others.

Comment on lines 186 to 246
if satid.size == 0:
logging(comm, 'WARNING', f'category {cat[0]} does not exist in input file')
#paths = container.get_paths('variables/windDirection', cat)
#obstype = container.get('variables/windComputationMethod', cat)
#container.add('variables/obstype_uwind', obstype, paths, cat)
#container.add('variables/obstype_vwind', obstype, paths, cat)

#paths = container.get_paths('variables/windSpeed', cat)
#wsp10 = container.get('variables/windSpeed', cat)
#container.add('variables/windSpeed', wsp10, paths, cat)
# container.add('variables/windEastward', wob, paths, cat)
# container.add('variables/windNorthward', wob, paths, cat)
# print('##################################')
# print(wob)




else:
print('more stuff to be added here')
# Add new variables: ObsType/windEastward & ObsType/windNorthward
#swcm = container.get('variables/windComputationMethod', cat)
#paths = container.get_paths('variables/windSpeed', cat)
#windDirection = container.get('variables/windDirection', cat)
#windSpeed = container.get('variables/windSpeed', cat)
#uob, vob = compute_wind_components(windDirection, windSpeed)
#container.add('variables/windEastward', uob, paths, cat)
#container.add('variables/windNorthward', vob, paths, cat)




#chanfreq = container.get('variables/sensorCentralFrequency', cat)

#logging(comm, 'DEBUG', f'swcm min/max = {swcm.min()} {swcm.max()}')
#logging(comm, 'DEBUG', f'chanfreq min/max = {chanfreq.min()} {chanfreq.max()}')

#obstype = _get_obs_type(swcm, chanfreq)

#logging(comm, 'DEBUG', f'obstype = {obstype}')
#logging(comm, 'DEBUG', f'obstype min/max = {obstype.min()} {obstype.max()}')

#paths = container.get_paths('variables/windComputationMethod', cat)
#container.add('variables/obstype_uwind', obstype, paths, cat)
#container.add('variables/obstype_vwind', obstype, paths, cat)

# Add new variables: ObsValue/windEastward & ObsValue/windNorthward
#wdir = container.get('variables/windDirection', cat)
#wspd = container.get('variables/windSpeed', cat)

#logging(comm, 'DEBUG', f'wdir min/max = {wdir.min()} {wdir.max()}')
#logging(comm, 'DEBUG', f'wspd min/max = {wspd.min()} {wspd.max()}')

#uob, vob = compute_wind_components(wdir, wspd)

#logging(comm, 'DEBUG', f'uob min/max = {uob.min()} {uob.max()}')
#logging(comm, 'DEBUG', f'vob min/max = {vob.min()} {vob.max()}')

#paths = container.get_paths('variables/windSpeed', cat)
#container.add('variables/windEastward', uob, paths, cat)
#container.add('variables/windNorthward', vob, paths, cat)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code doesn't do anything. "more stuff to add" ??

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to leave it blank as I'm not sure what to do add to this and I know Emily had mentioned just looking at the YAML files and not the python script. I've made all the corrections to the Python file though.

Comment on lines 184 to 185
print(len(var_test))
print(satid)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove print statements

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the print statements. Thanks!

Comment on lines 182 to 183
satid = container.get('variables/satelliteId', cat)
var_test = container.get('variables/windDirection', cat)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

variables are not used

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed those variables. Thanks!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I remove the satid=... and try running the code; I get an error message stating that satid is not defined and it stops running. I'll leave it in for now.

Comment on lines 82 to 93
{
'name': 'ObsValue/windDirection',
'source': 'variables/windDirection',
'units': '1',
'longName': 'Observation Type based on Satellite-derived Wind Computation Method and Spectral Band',
},
{
'name': 'ObsValue/windSpeed',
'source': 'variables/windSpeed',
'units': '1',
'longName': 'Observation Type based on Satellite-derived Wind Computation Method and Spectral Band',
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are already defined in the YAML file, why need tham here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I comment this section out the python program complains and mentions that it needs "KeyError: 'name'"; I can leave it in for now but I'm open to removing it too.

Emily requested this file be deleted.
@emilyhcliu
Copy link
Collaborator

@JasonWelsh-NOAA Since you do not have Python script in this PR, you will need to drop the `bufr_scrip_backend_ascatw.yaml' test configuration file. What you need is a bufr backend test configuration file.
Please see the example for a bufr backend test configuration file.

The bufr backend configuration file can be used to test your mapping file in this PR).

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.

5 participants