-
Notifications
You must be signed in to change notification settings - Fork 180
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
Feature/gfs config dirpath fixedfiles #1474
Feature/gfs config dirpath fixedfiles #1474
Conversation
It can be difficult to debug MPMD jobs because their logs are all written concurrently to a single file. While the use of tags to designate which task via the preamble and PS4 can help identify which line is from which task, it is still difficult to follow a single task through the log, particularly for larger MPMD jobs with dozens of tasks. Individual stdout files are now created by using the `srun` `--output` option. These files are written to the working directory (in `$DATA`). Fixes: #1468
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.
there is way too much in this PR that
a. we did not discuss in the plan
b. irrelevant to the topic
c. changes that were made that are counter to the ones in the previous PR.
|
||
# HRW: `atmos_run` will need to be defined dynamically once | ||
# additional GFS applications are added. | ||
config_attr_dict = {'aero_run': 'DO_AERO', |
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.
I think we prefer do_aero
etc. The less renaming we do, the better.
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.
That comes from this in the configuration/environment: DO_AERO False
.
'ice_cpl': 'cplice', | ||
'ice_res': 'ICERES', | ||
'ice_run': 'DO_ICE', | ||
'ocn_cpl': 'cpl', |
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 chm_cpl
is cplchm
for e.g., then why is ocn_cpl
just cpl
?
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 comes from DO_COUPLED False
or cpl False
. Which do you want to use?
self.ufs_config.FIX_orog = os.path.join(self._config.FIXgfs, 'orog') | ||
self.ufs_config.FIX_ugwd = os.path.join(self._config.FIXgfs, 'ugwd') | ||
|
||
self.ufs_config.HOMEgfs = self._config.HOMEgfs |
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.
Lets think about this:
If we use gfs
in the name of an object that is "ufs", would that cause issues?
Does ufs_config
need to know where HOMEgfs
is? It needs FIX
and parm
, but they could be independent of "HOMEgfs"
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.
Maybe not in the UFS
class but we could add it in the GFS
class.
copy: | ||
# Atmosphere mosaic file linked as the grid_spec file (atm only) | ||
- [$(FIX_orog)/$(atm_res)/$(atm_res)_mosaic.nc, $(DATA)/INPUT/grid_spec.nc] | ||
dirtree: |
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.
We don't need this dirtree
section.
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.
Does the FileHandler
know how to build the directory tree prior to copying the respective files?
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.
No. it does not, but that is not the point of these fix files.
They are containing information about what files are needed, where is the source and what is the destination. And what is the action (copy
).
Anything else is not within scope of this file.
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.
I am really confused about this. How does the directory tree get built such that the files can be copied? Last time we discussed this piece of the workflow this was needed. Why is it no longer needed?
- [$(FIX_orog)/$(atm_res)/$(atm_res)_grid.tile4.nc, $(DATA)/INPUT/] | ||
- [$(FIX_orog)/$(atm_res)/$(atm_res)_grid.tile5.nc, $(DATA)/INPUT/] | ||
- [$(FIX_orog)/$(atm_res)/$(atm_res)_grid.tile6.nc, $(DATA)/INPUT/] | ||
fixedfiles: |
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.
Keep these as they were before.
Parameters | ||
---------- | ||
|
||
config: AttrDict | ||
|
||
A Python dictionary containing the run-time configuration | ||
attributes. | ||
|
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.
There are no parameters to a class. They are to the constructor __init__
.
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.
Is this a reference to the documentation?
fixedfile_list = [item for item in self.ufs_config.fixedfile_list if ( | ||
"atmos" in item.lower() or "land" in item.lower())] |
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 where a configuration yaml is necessary to elevate this from code to yaml
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.
Agreed. I tried to keep this simple for the time-being until we are at that point.
self.config_fcstapp() | ||
|
||
@logit(logger) | ||
def build_dirtree(self: UFS) -> None: |
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.
Hold this for another PR.
|
||
with open(output_file, 'w') as fho: | ||
fho.write(file_out) | ||
|
||
@staticmethod | ||
def __get_fixedfile_list(fixedfile_path) -> List: |
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.
I don't know why we care about getting a list of all files in a directory.
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.
I thought this was what we discussed. In that path are only fixed-file YAMLs. They are relevant depending on the application of the GFS.
I am not sure how I am supposed to test the the pieces that were put in place without the remainder of the other bits. My understanding was the following:
|
Description
This PR addresses issue #1473 .
Type of change
How Has This Been Tested?
The directory tree and expected fixed files are defined/copied.
Checklist