-
Notifications
You must be signed in to change notification settings - Fork 212
Stage bias files for UFSDA aerosols #1370
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
Changes from 26 commits
c4d208e
f196d3a
5e8cb1c
34650d4
5182c50
0685678
3200e17
74efd03
b1cc1b6
e97d43d
f96949d
c35cde7
cebcbcd
07e23ed
aa858ec
3e7a509
7556a11
fb3204f
76e22e7
a022aef
a789094
82cf879
8d166d6
9b068f3
f369a36
b023df5
ef5da49
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,13 @@ | ||
| mkdir: | ||
| - !ENV ${DATA}/crtm/ | ||
| - $(DATA)/crtm/ | ||
| copy: | ||
| - - !ENV ${FV3JEDI_FIX}/crtm/${CRTM_VER}/AerosolCoeff.bin | ||
| - !ENV ${DATA}/crtm/AerosolCoeff.bin | ||
| - - !ENV ${FV3JEDI_FIX}/crtm/${CRTM_VER}/CloudCoeff.bin | ||
| - !ENV ${DATA}/crtm/CloudCoeff.bin | ||
| - - !ENV ${FV3JEDI_FIX}/crtm/${CRTM_VER}/v.viirs-m_npp.SpcCoeff.bin | ||
| - !ENV ${DATA}/crtm/v.viirs-m_npp.SpcCoeff.bin | ||
| - - !ENV ${FV3JEDI_FIX}/crtm/${CRTM_VER}/v.viirs-m_npp.TauCoeff.bin | ||
| - !ENV ${DATA}/crtm/v.viirs-m_npp.TauCoeff.bin | ||
| - - !ENV ${FV3JEDI_FIX}/crtm/${CRTM_VER}/v.viirs-m_j1.SpcCoeff.bin | ||
| - !ENV ${DATA}/crtm/v.viirs-m_j1.SpcCoeff.bin | ||
| - - !ENV ${FV3JEDI_FIX}/crtm/${CRTM_VER}/v.viirs-m_j1.TauCoeff.bin | ||
| - !ENV ${DATA}/crtm/v.viirs-m_j1.TauCoeff.bin | ||
| - - !ENV ${FV3JEDI_FIX}/crtm/${CRTM_VER}/NPOESS.VISice.EmisCoeff.bin | ||
| - !ENV ${DATA}/crtm/NPOESS.VISice.EmisCoeff.bin | ||
| - - !ENV ${FV3JEDI_FIX}/crtm/${CRTM_VER}/NPOESS.VISland.EmisCoeff.bin | ||
| - !ENV ${DATA}/crtm/NPOESS.VISland.EmisCoeff.bin | ||
| - - !ENV ${FV3JEDI_FIX}/crtm/${CRTM_VER}/NPOESS.VISsnow.EmisCoeff.bin | ||
| - !ENV ${DATA}/crtm/NPOESS.VISsnow.EmisCoeff.bin | ||
| - - !ENV ${FV3JEDI_FIX}/crtm/${CRTM_VER}/NPOESS.VISwater.EmisCoeff.bin | ||
| - !ENV ${DATA}/crtm/NPOESS.VISwater.EmisCoeff.bin | ||
| - [$(FV3JEDI_FIX)/crtm/$(crtm_VERSION)/AerosolCoeff.bin, $(DATA)crtm/] | ||
| - [$(FV3JEDI_FIX)/crtm/$(crtm_VERSION)/CloudCoeff.bin, $(DATA)/crtm/] | ||
| - [$(FV3JEDI_FIX)/crtm/$(crtm_VERSION)/v.viirs-m_npp.SpcCoeff.bin, $(DATA)/crtm/] | ||
| - [$(FV3JEDI_FIX)/crtm/$(crtm_VERSION)/v.viirs-m_npp.TauCoeff.bin, $(DATA)/crtm/] | ||
| - [$(FV3JEDI_FIX)/crtm/$(crtm_VERSION)/v.viirs-m_j1.SpcCoeff.bin, $(DATA)/crtm/] | ||
| - [$(FV3JEDI_FIX)/crtm/$(crtm_VERSION)/v.viirs-m_j1.TauCoeff.bin, $(DATA)/crtm/] | ||
| - [$(FV3JEDI_FIX)/crtm/$(crtm_VERSION)/NPOESS.VISice.EmisCoeff.bin, $(DATA)/crtm/] | ||
| - [$(FV3JEDI_FIX)/crtm/$(crtm_VERSION)/NPOESS.VISland.EmisCoeff.bin, $(DATA)/crtm/] | ||
| - [$(FV3JEDI_FIX)/crtm/$(crtm_VERSION)/NPOESS.VISsnow.EmisCoeff.bin, $(DATA)/crtm/] | ||
| - [$(FV3JEDI_FIX)/crtm/$(crtm_VERSION)/NPOESS.VISwater.EmisCoeff.bin, $(DATA)/crtm/] |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -32,6 +32,10 @@ def initialize(self) -> None: | |||||||||||||||||||||||||||||||||||||
| obs_dict = self.get_obs_dict() | ||||||||||||||||||||||||||||||||||||||
| FileHandler(obs_dict).sync() | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # some analyses need to stage bias corrections | ||||||||||||||||||||||||||||||||||||||
| bias_dict = self.get_bias_dict() | ||||||||||||||||||||||||||||||||||||||
| FileHandler(bias_dict).sync() | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| @logit(logger) | ||||||||||||||||||||||||||||||||||||||
| def get_obs_dict(self: Task) -> Dict[str, Any]: | ||||||||||||||||||||||||||||||||||||||
| """Compile a dictionary of observation files to copy | ||||||||||||||||||||||||||||||||||||||
|
|
@@ -64,6 +68,49 @@ def get_obs_dict(self: Task) -> Dict[str, Any]: | |||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
| return obs_dict | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| @logit(logger) | ||||||||||||||||||||||||||||||||||||||
| def get_bias_dict(self: Task) -> Dict[str, Any]: | ||||||||||||||||||||||||||||||||||||||
| """Compile a dictionary of observation files to copy | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| This method uses the OBS_LIST configuration variable to generate a dictionary | ||||||||||||||||||||||||||||||||||||||
| from a list of YAML files that specify what observation bias correction files | ||||||||||||||||||||||||||||||||||||||
| are to be copied to the run directory from the observation input directory | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Parameters | ||||||||||||||||||||||||||||||||||||||
| ---------- | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Returns | ||||||||||||||||||||||||||||||||||||||
| ---------- | ||||||||||||||||||||||||||||||||||||||
| bias_dict: Dict | ||||||||||||||||||||||||||||||||||||||
| a dictionary containing the list of observation bias files to copy for FileHandler | ||||||||||||||||||||||||||||||||||||||
| """ | ||||||||||||||||||||||||||||||||||||||
| logger.debug(f"OBS_LIST: {self.task_config['OBS_LIST']}") | ||||||||||||||||||||||||||||||||||||||
| obs_list_config = parse_j2yaml(self.task_config["OBS_LIST"], self.task_config) | ||||||||||||||||||||||||||||||||||||||
| logger.debug(f"obs_list_config: {obs_list_config}") | ||||||||||||||||||||||||||||||||||||||
| # get observers from master dictionary | ||||||||||||||||||||||||||||||||||||||
| observers = obs_list_config['observers'] | ||||||||||||||||||||||||||||||||||||||
| copylist = [] | ||||||||||||||||||||||||||||||||||||||
| for ob in observers: | ||||||||||||||||||||||||||||||||||||||
| if 'obs bias' in ob.keys(): | ||||||||||||||||||||||||||||||||||||||
| obfile = ob['obs bias']['input file'] | ||||||||||||||||||||||||||||||||||||||
| basename = os.path.basename(obfile) | ||||||||||||||||||||||||||||||||||||||
| copylist.append([os.path.join(self.task_config.comin_ges_atm, basename), obfile]) | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| obfile = obfile.replace('satbias', 'satbias_cov') | ||||||||||||||||||||||||||||||||||||||
| basename = os.path.basename(obfile) | ||||||||||||||||||||||||||||||||||||||
| copylist.append([os.path.join(self.task_config.comin_ges_atm, basename), obfile]) | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| obfile = obfile.replace('satbias_cov', 'tlapse') | ||||||||||||||||||||||||||||||||||||||
| obfile = obfile.replace('nc4', 'txt') | ||||||||||||||||||||||||||||||||||||||
| basename = os.path.basename(obfile) | ||||||||||||||||||||||||||||||||||||||
| copylist.append([os.path.join(self.task_config.comin_ges_atm, basename), obfile]) | ||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @aerorahul , I like the consolidation. The suggested change, however, does not work. The bias correction files begin with the prefix I can remove the 10-digit string (
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I think I would suggest what I think you are proposing Russ: That should be fine right?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree w/ dropping the 10-character string with date. That seems superfluous.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @RussTreadon-NOAA Please try the updated suggestion.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will also take a look at this yaml file and see if there is a better way to loop over these files
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you @aerorahul . I tested a more verbose & less elegant way to form
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The following works
Question: When we implement UFS-DA ATM in operations after GFS v17, what naming convention do we foresee being used in operations? Will we
Whatever naming convention operations uses, the g-w
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggested change committed at ef5da49. |
||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| bias_dict = { | ||||||||||||||||||||||||||||||||||||||
| 'mkdir': [os.path.join(self.runtime_config['DATA'], 'bc')], | ||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggested change committed at ef5da49. |
||||||||||||||||||||||||||||||||||||||
| 'copy': copylist | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
| return bias_dict | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| @logit(logger) | ||||||||||||||||||||||||||||||||||||||
| def add_fv3_increments(self, inc_file_tmpl: str, bkg_file_tmpl: str, incvars: List) -> None: | ||||||||||||||||||||||||||||||||||||||
| """Add cubed-sphere increments to cubed-sphere backgrounds | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.