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

Stage bias files for UFSDA aerosols #1370

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c4d208e
changes related to UFS-DA aero (#1313)
RussTreadon-NOAA Mar 3, 2023
f196d3a
clean up analysis.py based on reviewer suggestions (#1313)
RussTreadon-NOAA Mar 4, 2023
5e8cb1c
replace obfile loop with replace in get_bias_dict (#1313)
RussTreadon-NOAA Mar 6, 2023
34650d4
Merge branch 'NOAA-EMC:develop' into feature/update_jediaero
RussTreadon-NOAA Mar 7, 2023
5182c50
Merge branch 'NOAA-EMC:develop' into feature/update_jediaero
RussTreadon-NOAA Mar 8, 2023
0685678
Merge branch 'NOAA-EMC:develop' into feature/update_jediaero
RussTreadon-NOAA Mar 10, 2023
3200e17
Merge branch 'NOAA-EMC:develop' into feature/update_jediaero
RussTreadon-NOAA Mar 13, 2023
74efd03
Merge branch 'NOAA-EMC:develop' into feature/update_jediaero
RussTreadon-NOAA Mar 15, 2023
b1cc1b6
Merge branch 'NOAA-EMC:develop' into feature/update_jediaero
RussTreadon-NOAA Mar 17, 2023
e97d43d
Merge branch 'NOAA-EMC:develop' into feature/update_jediaero
RussTreadon-NOAA Mar 21, 2023
f96949d
Merge branch 'NOAA-EMC:develop' into feature/update_jediaero
RussTreadon-NOAA Mar 22, 2023
c35cde7
Merge branch 'NOAA-EMC:develop' into feature/update_jediaero
RussTreadon-NOAA Mar 22, 2023
cebcbcd
Merge branch 'NOAA-EMC:develop' into feature/update_jediaero
RussTreadon-NOAA Mar 23, 2023
07e23ed
Merge branch 'NOAA-EMC:develop' into feature/update_jediaero
RussTreadon-NOAA Mar 24, 2023
aa858ec
Merge branch 'develop' into feature/update_jediaero
RussTreadon-NOAA Mar 27, 2023
3e7a509
rename obs_dict as bias_dict for clarity in analysis.py (#1313)
RussTreadon-NOAA Mar 27, 2023
7556a11
remove blank line from analysis.py (#1313)
RussTreadon-NOAA Mar 27, 2023
fb3204f
Merge branch 'NOAA-EMC:develop' into feature/update_jediaero
RussTreadon-NOAA Mar 28, 2023
76e22e7
Merge branch 'NOAA-EMC:develop' into feature/update_jediaero
RussTreadon-NOAA Mar 28, 2023
a022aef
update aero_crtm_coef.yaml to new g-w format (#1313)
RussTreadon-NOAA Mar 28, 2023
a789094
Merge branch 'NOAA-EMC:develop' into feature/update_jediaero
RussTreadon-NOAA Mar 29, 2023
82cf879
replace YAMLFile with parse_j2yaml in analysis.py (#1313)
RussTreadon-NOAA Mar 30, 2023
8d166d6
Merge branch 'NOAA-EMC:develop' into feature/update_jediaero
RussTreadon-NOAA Mar 31, 2023
9b068f3
Merge branch 'NOAA-EMC:develop' into feature/update_jediaero
RussTreadon-NOAA Mar 31, 2023
f369a36
Merge branch 'NOAA-EMC:develop' into feature/update_jediaero
RussTreadon-NOAA Apr 4, 2023
b023df5
Merge branch 'NOAA-EMC:develop' into feature/update_jediaero
RussTreadon-NOAA Apr 4, 2023
ef5da49
streamline radiance bias correction file processing based on reviewer…
RussTreadon-NOAA Apr 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion env/JET.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if [[ $# -ne 1 ]]; then

echo "Must specify an input argument to set runtime environment variables!"
echo "argument can be any one of the following:"
echo "atmanalrun atmensanalrun"
echo "atmanalrun atmensanalrun aeroanlrun"
echo "anal sfcanl fcst post vrfy metp"
echo "eobs eupd ecen efcs epos"
echo "postsnd awips gempak"
Expand Down Expand Up @@ -59,6 +59,14 @@ elif [[ "${step}" = "atmensanalrun" ]]; then
[[ ${NTHREADS_ATMENSANAL} -gt ${nth_max} ]] && export NTHREADS_ATMENSANAL=${nth_max}
export APRUN_ATMENSANAL="${launcher} ${npe_atmensanalrun}"

elif [[ "${step}" = "aeroanlrun" ]]; then

nth_max=$((npe_node_max / npe_node_aeroanlrun))

export NTHREADS_AEROANL=${nth_aeroanlrun:-${nth_max}}
[[ ${NTHREADS_AEROANL} -gt ${nth_max} ]] && export NTHREADS_AEROANL=${nth_max}
export APRUN_AEROANL="${launcher} ${npe_aeroanlrun}"

elif [[ "${step}" = "anal" ]]; then

nth_max=$((npe_node_max / npe_node_anal))
Expand Down
2 changes: 1 addition & 1 deletion parm/config/config.aeroanl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ export io_layout_x=@IO_LAYOUT_X@
export io_layout_y=@IO_LAYOUT_Y@

export JEDIVAREXE=${HOMEgfs}/exec/fv3jedi_var.x
export CRTM_VER="2.3.0"
export crtm_VERSION="2.3.0"

echo "END: config.aeroanl"
5 changes: 3 additions & 2 deletions parm/config/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,12 @@ if [ ${step} = "prep" ]; then
export memory_prep="40G"
fi

elif [ ${step} = "aerosol_init" ]; then
elif [[ "${step}" = "aerosol_init" ]]; then
RussTreadon-NOAA marked this conversation as resolved.
Show resolved Hide resolved
export wtime_aerosol_init="00:05:00"
export npe_aerosol_init=1
export nth_aerosol_init=1
export npe_node_aerosol_init=$(echo "${npe_node_max} / ${nth_aerosol_init}" | bc)
npe_node_aerosol_init=$(echo "${npe_node_max} / ${nth_aerosol_init}" | bc)
export npe_node_aerosol_init
export NTASKS=${npe_aerosol_init}
export memory_aerosol_init="6G"

Expand Down
32 changes: 11 additions & 21 deletions parm/parm_gdas/aero_crtm_coeff.yaml
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/]
42 changes: 42 additions & 0 deletions ush/python/pygfs/task/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -64,6 +68,44 @@ 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']
obdir = os.path.dirname(obfile)
basename = os.path.basename(obfile)
prefix = '.'.join(basename.split('.')[:-2])
for file in ['satbias.nc4', 'satbias_cov.nc4', 'tlapse.txt']:
bfile = f"{prefix}.{file}"
copylist.append([os.path.join(self.task_config.comin_ges_atm, bfile), os.path.join(obdir, bfile)])

bias_dict = {
'mkdir': [os.path.join(self.runtime_config.DATA, 'bc')],
'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
Expand Down