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

Update snow obs preprocessing job #2946

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

Conversation

jiaruidong2017
Copy link
Contributor

Description

This PR modifies the workflow XML configuration so that the prep snow obs job only runs on the 00z cycle.

This PR also renames the snow_obs and snowobs to the snowcover for highlighting the input IMS data source as snow cover.

Resolves (#2902)

Type of change

  • Maintenance (code refactor, clean-up, new CI test, etc.)

Change characteristics

  • Is this a breaking change (a change in existing functionality)? NO
  • Does this change require a documentation update? NO
  • Does this change require an update to any of the following submodules? NO

How has this been tested?

  • Forecast-only on Hera

Checklist

  • Any dependent changes have been merged and published
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing tests pass with my changes
  • I have made corresponding changes to the documentation if necessary

if self._app_config.do_jedisnowda:
sdate_snocvr = self._base['SDATE']
edate_snocvr = self._base['EDATE']
interval_snocvr = to_timedelta(f"24:00:00H")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
interval_snocvr = to_timedelta(f"24:00:00H")
interval_snocvr = to_timedelta('24H')

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made changes. Thanks.

task_dict = {'task_name': task_name,
'resources': resources,
'dependency': dependencies,
'envars': self.envars,
'cycledef': self.run.replace('enkf', ''),
'command': f'{self.HOMEgfs}/jobs/rocoto/prepsnowobs.sh',
'cycledef': cycledef,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'cycledef': cycledef,
'cycledef': 'gdas_prep_snocvr',

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made changes as suggested. Thanks.


deps = []
dep_dict = {'type': 'task', 'name': f'{self.run}prep'}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep=deps)

resources = self.get_resource('prepsnowobs')
task_name = f'{self.run}prepsnowobs'
cycledef = 'gdas_prep_snocvr'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
cycledef = 'gdas_prep_snocvr'

@@ -591,7 +592,10 @@ def prepsnowobs(self):
def snowanl(self):

deps = []
dep_dict = {'type': 'task', 'name': f'{self.run}prepsnowobs'}
if f'@H' == '00':
Copy link
Contributor

Choose a reason for hiding this comment

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

@H is a rocoto thing, so this doesn't have any meaning to python when this function is run and this won't work as-is. #2928 is adding support for the undocumented rocoto dependency <taskvalid>. Once that is in, we can use it to make a dependency that works here:

<or>
    <and>
        <not><taskvalid task="{self.run}prepsnowcover"/></not>
        <taskdep task="{self.run}prep"/>
    </and>
    <taskdep task="{self.run}prepsnowcover"/>
</or>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @WalterKolczynski-NOAA for the information. Your introduced <taskvalid> above is exactly what we want here. For now, I made some changes here for a place holder.

                <or>
                        <taskdep task="gdasprep"/>
                        <taskdep task="gdasprepsnowcover"/>
                </or>

@WalterKolczynski-NOAA WalterKolczynski-NOAA added the blocked Issue is currently being blocked by another issue label Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Issue is currently being blocked by another issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants