Skip to content

Prepare observations for the updates to the ensemble members.#2416

Closed
jiaruidong2017 wants to merge 13 commits into
NOAA-EMC:developfrom
jiaruidong2017:feature/prepsnowobs_ens
Closed

Prepare observations for the updates to the ensemble members.#2416
jiaruidong2017 wants to merge 13 commits into
NOAA-EMC:developfrom
jiaruidong2017:feature/prepsnowobs_ens

Conversation

@jiaruidong2017
Copy link
Copy Markdown
Contributor

@jiaruidong2017 jiaruidong2017 commented Mar 20, 2024

Description

This PR adds in initial configurations files and jobs to prepare the snow observations for the JEDI based snow DA updates to the EnkF ensemble members. Because IMS observations are background dependent for each ensemble member, we plan to put snow observations in the ensemble directory for the later snow analysis.

Changes to the config.resources for the new task (add epsn)
Changes to the workflow tasks for the new task (add epsn)
Addition of new config file for snow DA related options (add config.epsn)

Because the snow observations are fetched from the COM_OBS in the gdas deterministic analysis and are saved into the COM_OBS in the enkfgdas analysis for the enkfgdas run, we have to define two different COM_OBS directories (COMIN_OBS vs COMOUT_OBS) and two obs basename heads (OPREFIX_IN vs OPREFIX_OUT) to identify the enkf analysis from the gdas deterministic analysis. The MEMDIR is added to COM_OBS to identify among the different enkf members. Other minor changes include to add CASE in the IMS filename.

This PR depends on NOAA-EMC/GDASApp#998.

Type of change

  • New feature (adds jobs to prepare the snow obs for the enkf analysis)

Change characteristics

  • Is this a breaking change (a change in existing functionality)? NO

How has this been tested?

Hybrid snow DA test on Hera was successful

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

Copy link
Copy Markdown
Contributor

@WalterKolczynski-NOAA WalterKolczynski-NOAA left a comment

Choose a reason for hiding this comment

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

Conditionally approved pending successful completion of CI tests.

@WalterKolczynski-NOAA
Copy link
Copy Markdown
Contributor

We'll need to wait for #2421 to be merged to test, since the relevant tests do not currently run on Orion and the CI system is set up to run on Rocky on Hera.

@jiaruidong2017
Copy link
Copy Markdown
Contributor Author

jiaruidong2017 commented Mar 27, 2024

We'll need to wait for #2421 to be merged to test, since the relevant tests do not currently run on Orion and the CI system is set up to run on Rocky on Hera.

@WalterKolczynski-NOAA Please hold the CI test until the merge of NOAA-EMC/GDASApp#998 and the updates of the commit hash from GDASApp. Thanks.

@WalterKolczynski-NOAA WalterKolczynski-NOAA added the blocked Issue is currently being blocked by another issue. Include blocking issue # in description label Mar 27, 2024
Comment thread jobs/JGLOBAL_PREP_SNOW_OBS Outdated
##############################################
# Generate COM variables from templates
YMD=${PDY} HH=${cyc} generate_com -rx COM_OBS
RUN=${oCDUMP} MEMDIR="" YMD=${PDY} HH=${cyc} generate_com -rx COM_OBS_IN:COM_OBS_TMPL
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@aerorahul @WalterKolczynski-NOAA are you both okay with these additional variables? Something about this I don't particularly like but I don't have a good suggestion right now either.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There are a couple things I don't like here, the main one being this will not be acceptable to operations where COM_OBS_TMPL points to the obsproc space and should be strictly input for GFS. The out needs to use a different template (probably a new COM_SNOW_PREP_TMPL).

Also, if IN and OUT are going to be used in the variable name, would prefer to have it be COMIN_* and COMOUT_*. That is the pattern we plan on using when we add IN and OUT to the rest of the workflow.

Copy link
Copy Markdown
Contributor Author

@jiaruidong2017 jiaruidong2017 Apr 6, 2024

Choose a reason for hiding this comment

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

Thanks for the good suggestions, and I have made changes from COM_OBS_IN/OUT to COMIN_OBS and COMOUT_OBS. I have no idea and wait for the suggestions on using a new COM_SNOW_PREP_TMPL or not.

source "${HOMEgfs}/ush/jjob_header.sh" -e "prepsnowobs" -c "base prepsnowobs"
fi

# Restart conditions for GFS cycle come from GDAS
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what about enkfgfs?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have no idea about enkfgfs.

[[ ${RUN} == "gfs" ]] && export rCDUMP="gdas"

# Get OBS for ENKFGDAS run from GDAS
oCDUMP=${RUN}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

so we don't export oCDUMP if the run if gdas?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Do we need export oCDUMP here? Both rCDUMP and oCDUMP are used just locally.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

sorry I misread this line, but if they are only used internally then why export rCDUMP above on line 13?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I reused this by following the old version jobs/JGLOBAL_FORECAST for the GFS cycle to get the restart conditions. But I just checked and found they were modified as below:

# Restart conditions for GFS cycle come from GDAS
rCDUMP=${RUN}
export rCDUMP="${RUN/gfs/gdas}"

Do I need to make the corresponding changes?

Comment thread jobs/JGLOBAL_PREP_SNOW_OBS Outdated
RUN=${RUN} YMD=${PDY} HH=${cyc} generate_com -rx COM_OBS_OUT:COM_OBS_TMPL

RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} generate_com -rx \
RUN=${rCDUMP} YMD=${gPDY} HH=${gcyc} generate_com -rx \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

shouldn't this be GDUMP?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The rCDUMP=${RUN} is defined locally for the GFS cycle to get the restart conditions from GDAS. For the GDAS cycle, rCDUMP is the same as GDUMP.

Comment thread jobs/JGLOBAL_PREP_SNOW_OBS Outdated
RUN=${rCDUMP} YMD=${gPDY} HH=${gcyc} generate_com -rx \
COM_ATMOS_RESTART_PREV:COM_ATMOS_RESTART_TMPL

mkdir -m 775 -p "${COM_OBS_OUT}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do we know for sure COM_OBS_IN exists already?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, it is created in the gdasprep job.

COM_RTOFS_TMPL=$(compath.py "${envir}/${WAVECUR_DID}/${rtofs_ver}")
else
COM_OBS_TMPL='${ROTDIR}/${RUN}.${YMD}/${HH}/obs'
COM_OBS_TMPL='${ROTDIR}/${RUN}.${YMD}/${HH}/obs/${MEMDIR}'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is going to do this for all ob types, isn't it, is this okay @aerorahul ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pinging @aerorahul again. Are we okay with creating a $MEMDIR for all observations? Will this work as intended out of the box for the atmosphere @jiaruidong2017 ? I don't know if it is preferred to have 80 largely identical sets of directories or 1 directory for most obs and 80 directories with just snow in them?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If we want that the COM_OBS points only to the gdas directory and without memdir, we can simply add MEMDIR="" where the COM_OBS is defined in all other jobs. An example is below:

RUN=${CDUMP} MEMDIR="" YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_OBS:COM_OBS_TMPL

CoryMartin-NOAA added a commit to NOAA-EMC/GDASApp that referenced this pull request Apr 16, 2024
This PR updates several configures to prepare observations for snow DA
updates to the ensemble members. Because the snow observations are
fetched from the COM_OBS in the gdas deterministic analysis and are
saved into the COM_OBS in the enkfgdas analysis for the enkfgdas run, we
have to define two different COM_OBS directories (COMIN_OBS vs
COMOUT_OBS) and two obs basename heads (OPREFIX_IN vs OPREFIX_OUT) to
identify the enkf analysis from the gdas deterministic analysis.

This PR will contribute to
NOAA-EMC/global-workflow#2416.

---------

Co-authored-by: Cory Martin <cory.r.martin@noaa.gov>
@jiaruidong2017
Copy link
Copy Markdown
Contributor Author

@WalterKolczynski-NOAA I have updated the GDASApp to the current commit hash including the required changes by this PR. This PR is ready to proceed for a review. Thanks.

@WalterKolczynski-NOAA WalterKolczynski-NOAA removed the blocked Issue is currently being blocked by another issue. Include blocking issue # in description label May 3, 2024
@WalterKolczynski-NOAA
Copy link
Copy Markdown
Contributor

@jiaruidong2017 Sorry, I missed that this one was ready and kept skipping over it because of the blocked label. Please merge in develop and resolve any conflicts and we'll run it through CI.

@CoryMartin-NOAA
Copy link
Copy Markdown
Contributor

Hold off on that, I need to chat with @jiaruidong2017 but I think we are going to end up closing this PR due to a proposed science change.

@jiaruidong2017
Copy link
Copy Markdown
Contributor Author

@WalterKolczynski-NOAA Because the GDASApp's PR was reverted, please hold up this PR until the GDASApp's PR is re-merged. Thanks.

@CoryMartin-NOAA
Copy link
Copy Markdown
Contributor

We are going to try another direction for the ensemble update, and I'll close this PR.

DavidNew-NOAA pushed a commit to NOAA-EMC/GDASApp that referenced this pull request Jan 16, 2026
This PR updates several configures to prepare observations for snow DA
updates to the ensemble members. Because the snow observations are
fetched from the COM_OBS in the gdas deterministic analysis and are
saved into the COM_OBS in the enkfgdas analysis for the enkfgdas run, we
have to define two different COM_OBS directories (COMIN_OBS vs
COMOUT_OBS) and two obs basename heads (OPREFIX_IN vs OPREFIX_OUT) to
identify the enkf analysis from the gdas deterministic analysis.

This PR will contribute to
NOAA-EMC/global-workflow#2416.

---------

Co-authored-by: Cory Martin <cory.r.martin@noaa.gov>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants