Adding large-scale blending step to regional_workflow.#540
Conversation
| v_w = np.float64(coldnc["v_w"][:, :, :]) # (128, 768, 769) | ||
|
|
||
| # grid data - usually has 2x as many grid points, so we need every other value. | ||
| gridx = np.float64(gridnc["x"][0:-1:2, 0:-1:2]) |
There was a problem hiding this comment.
do you know why this has 2x as many points? is this the super grid?
There was a problem hiding this comment.
No, I'm not sure why it has 2x as many. For example:
ncdump -h /lfs/h2/emc/global/noscrub/emc.global/FIX/fix/orog/20220805/C768/C768_grid.tile1.nc
netcdf C768_grid.tile1 {
dimensions:
string = 255 ;
nx = 1536 ;
ny = 1536 ;
nxp = 1537 ;
nyp = 1537 ;
I just know that this part is related only to the wind rotation part which I was able to reproduce within rounding error.
| # is because the radiance DA in EnKF relies the radiance procedures in the GSI-observer, | ||
| # which is mainly controled by DO_RADDA. | ||
| # | ||
| # DO_BLENDING: |
There was a problem hiding this comment.
suggest changing DO_BLENDING to "DO_ENS_BLENDING" to make it more clear.
It is possible that we may do blending for the deterministic part in the future.
| #echo first_cycle date : ${DATE_FIRST_CYCL}${STARTHOUR} | ||
| #echo first blended cycle date : $FIRST_BLENDED_CYCLE_DATE | ||
| if [[ $cdate_crnt_fhr -ge ${FIRST_BLENDED_CYCLE_DATE} ]]; then | ||
| if [[ $DO_BLENDING == "TRUE" && $EXTRN_MDL_NAME_ICS == "GDASENKF" ]]; then |
There was a problem hiding this comment.
Logically, lines 721-726 is expected to be put inside the if DO_BLENDING block.
There was a problem hiding this comment.
Also, it looks like lines 726 and 727 can be combined into one line.
| SKEBNORM="1" | ||
| SKEB_VDOF="10" | ||
| USE_ZMTNBLCK="FALSE" | ||
| BLENDING_LENGTHSCALE="960" # (Lx) in kilometers |
There was a problem hiding this comment.
Suggest changing to "ENS_BLENDING_LENGTHSCAL"
… ENS_BLENDING_LENGTHSCALE.
|
I'm going to close this PR and open an new PR in the new rrfs-workflow repo (https://github.com/NOAA-EMC/rrfs-workflow). |
…w BKTYPE=3 (warm start from blended ics).
|
I initially closed this to put into the other workflow, but I'm not sure where that stands so I reopened this one to get this in quicker. I also made some updates especially in run prep script for BKTYPE=3 which is warm starting from blended ics. |
| ln_vrfy -sf $EXECDIR/raymond.cpython-38-x86_64-linux-gnu.so . | ||
| ln_vrfy -sf $EXECDIR/chgres_winds.cpython-38-x86_64-linux-gnu.so . | ||
| ln_vrfy -sf $EXECDIR/remap_scalar.cpython-38-x86_64-linux-gnu.so . | ||
| ln_vrfy -sf $EXECDIR/remap_dwinds.cpython-38-x86_64-linux-gnu.so . |
There was a problem hiding this comment.
We can remove the "cpython-38-x86_64-linux-gnu" text now
There was a problem hiding this comment.
@guoqing-noaa Right. Also, EXECDIR needs to be something like LIB64DIR? I don't see the path to lib64 defined anywhere.
There was a problem hiding this comment.
I had thought about installing those *.so files into bin/.
With this, it will be good that we change CMAKE_INSTALL_LIBDIR to CMAKE_INSTALL_BINDIR when building your blending code. CMAKE_INSTALL_LIBDIR currently holds intermediate results instead of final results. And I think these four *so files are final results.
If you agree, you may create a PR to rrfs_utl to make changes and we don't need to change EXECDIR here. Thanks!
| bndy=./gfs.bndy.nc | ||
|
|
||
| # Run convert coldstart files to fv3 restart (rotate winds and remap). | ||
| python da_chgres_cold2fv3.py $warm $cold $grid $akbk $akbkcold $orog |
There was a problem hiding this comment.
change "python" to "${BLENDINGPYTHON}"
| trcr=./fv_tracer.res.tile1.nc | ||
|
|
||
| # Blend. | ||
| python da_blending_fv3.py $Lx $glb $reg $trcr |
There was a problem hiding this comment.
change "python" to "${BLENDINGPYTHON}"
| @@ -0,0 +1,229 @@ | |||
| MACHINE="wcoss2" | |||
There was a problem hiding this comment.
This should be merged with config.sh_rrfs_a_enks_c3_retro
There was a problem hiding this comment.
@hu5970 , I removed both of my blending specific configs and merged what was needed into config.sh_rrfs_a_enks_c3_retro.
| @@ -0,0 +1,142 @@ | |||
| MACHINE="wcoss2" | |||
There was a problem hiding this comment.
This should be merged with config.sh_rrfs_a_c3_retro
| </dependency> | ||
| </task> | ||
| {%- endif %} | ||
| {%- if do_ens_blending and not do_ensinit and do_spinup %} |
There was a problem hiding this comment.
This should be combined with the recenter task in line 1282 - 1316
…moved blending specific configs.
DESCRIPTION OF CHANGES:
Two python scripts were added to perform the blending and pre-blending steps: da_blending_fv3.py and da_chgres_cold2fv3.py. These python scripts perform the blending and pre-blending steps respectively by calling chgres_winds, remap_dwinds, and chgres_winds *.so files which should be compiled using f2py (see NOAA-GSL/rrfs_utl#38) such that they can be imported as python modules. The python scripts fit into the exregional_make_ics.sh script where all the necessary files are also linked or copied into the appropriate locations. Some default values for DO_BLENDING etc were also updated.
TESTS CONDUCTED:
Timing: Total added run time is about 90s. This is possible since the python scripts make use of the f2py modules and the netcdf4 library. The python is just used as glue and doesn't perform any expensive calculations.
Have tested these scripts in the context of a retro to make sure everything is called correctly, but there has not yet been any scientific evaluation. There have also not been any forecasts run from the newly blended files.
DEPENDENCIES:
Add blending and associated pre-processing tools to rrfs_utl:
NOAA-GSL/rrfs_utl#38
DOCUMENTATION:
BlendingGlobal_to_Regional_Proposal ppt: https://docs.google.com/presentation/d/1AGXqGar1rNtKOXXhoTTD_tZ6nFg8LeZQ/edit#slide=id.p1
Large Scale Blending Tests ppt:
https://docs.google.com/presentation/d/1dVN3ZphUlVv8EIpf9Tev3ZciTMHi3oUHbNUNBJjayKE/edit?pli=1#slide=id.g21875f2a523_0_15
Simplified schematic of how the blending steps fit into the workflow:
