-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add stub ex-scripts, recentering class, and ctest for recentering task #916
Conversation
257cef4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see comments.
ush/soca/marine_recenter.py
Outdated
import os | ||
from logging import getLogger | ||
from typing import Dict, List, Any | ||
from wxflow import logit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from wxflow import logit | |
from wxflow import Task, logit |
import os | ||
|
||
from wxflow import Logger, cast_strdict_as_dtypedict | ||
from soca.marine_recenter import MarineRecenter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment with a TODO:
to move marine_recenter.py
to ush/python/pygfs/task
in the global-workflow so that when the time comes, it is easily achieved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it helps, it would be:
from pygfs.task.marine_recenter import MarineRecenter
|
||
class MarineRecenter(): | ||
|
||
def __init__(self, config): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add stub documentation and follow typing
hints. E.g.
def __init__(self, config): | |
def __init__(self, config: Dict) -> None: | |
"""Stub constructor for ocean recentering task | |
Parameters: | |
------------ | |
config: Dict | |
configuration of XYZ | |
Returns | |
-------- | |
None |
Please see examples of tasks in ush/python/pygfs/task
of the global-workflow.
self.task_config = AttrDict(**self.config, **self.runtime_config, **local_dict) | ||
|
||
#_soca_ensb_yaml_temp | ||
print(self.task_config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use logger.info
or logger.debug
Also, since printing a dictionary, please use pformat
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is temporary for debugging
ush/soca/marine_recenter.py
Outdated
FileHandler({'mkdir': [self.task_config.diags, | ||
self.task_config.obs_in, | ||
self.task_config.bkg_dir, | ||
self.task_config.anl_out, | ||
self.task_config.static_ens]}).sync() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be in a yaml, not in python.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I'm not sure what any of these have to do with the recentering @AndrewEichmann-NOAA . You don't need obs, diags, anl_out or static ensemble ... Let's talk off line, we'll go through the steps that needs to be implemented for this job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
Since this is going beyond stub status, I'm closing this PR and holding off until a nominally working version is ready |
Dependent on NOAA-EMC/global-workflow#2299 being merged, partially addresses #912