-
Notifications
You must be signed in to change notification settings - Fork 146
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
Github issue #37: fix for broken generate_ens=T option #283
Conversation
dfe6a14
to
0b26ca0
Compare
@jswhit2 While running the regression tests, two test configurations failed:
Both test configurations failed due to segfault with the following output:
The changes in this PR won't be able to go out for review and be merged to the authoritative repo until these two configurations are able to run. If you have any questions or would like assistance to track this issue down, please let me know. |
@MichaelLueken-NOAA I updated the branch with a change that I think should fix it, but for some reason I can't run the regression tests on hera (they all fail). |
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 have done a visual review of the branch and found it to be acceptable for merge.
There was one stray ,
that could/should be removed, as noted in the review.
I have noted some points in the review that will hopefully help in readability and debugging.
I have also noted some commented calls which are no longer necessary.
This PR:
- fixes a previously broken functionality of generating an ensemble by sampling the static BECM (for the GFS)
- adds an option to write out the generated ensemble in a netCDF file.
src/gsi/control2model.f90
Outdated
@@ -173,7 +173,7 @@ subroutine control2model(xhat,sval,bval) | |||
! Apply sqrt of variance, as well as vertical & horizontal parts of background | |||
! error | |||
|
|||
call ckgcov(xhat%step(jj)%values(:),wbundle,size(xhat%step(jj)%values(:))) | |||
call ckgcov(grd_a,,xhat%step(jj)%values(:),wbundle,size(xhat%step(jj)%values(:))) |
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 the extra ,
is an oversight.
src/gsi/cplr_gfs_ensmod.f90
Outdated
!if ( mype == 0 ) then | ||
! write(6,*) 'write_gfsncatm is not adapted to write out perturbations yet' | ||
! iret = 999 | ||
!endif |
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.
It is safe to remove these comments, no?
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.
yes done
@@ -2256,6 +2261,447 @@ subroutine write_atm_ (grd,sp_a,filename,mype_out,gfs_bundle,ibin) | |||
|
|||
end subroutine write_atm_ | |||
|
|||
subroutine write_atm_pert_ (grd,sp_a,filename,mype_out,gfs_bundle,ibin) |
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.
The code in this subroutine here references to write_atm
or write_ncatm
.
The print
statements etc would be cleaner if it used my_name
which should also be corrected to WRITE_GFSNCATM_PERT
.
The code here works. These changes will likely improve readability and help debugging.
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.
my_name changed to WRITE_GFSNCATM_PERT
! depends on model changes from Jeff Whitaker | ||
nfhour = fhour(1) | ||
|
||
atmanl = create_dataset(filename, atmges, & |
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.
should this not be atmpert
?
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.
fixed
@@ -487,7 +487,8 @@ subroutine prewgt(mype) | |||
end do | |||
|
|||
! Special case of dssv for qoption=2 and cw | |||
if (qoption==2) call compute_qvar3d | |||
!if (qoption==2) call compute_qvar3d |
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 there a reason to save the commented line?
I am not familiar if qoption /= 2
, supports the calling of this function.
@@ -4017,7 +4051,7 @@ subroutine hybens_localization_setup | |||
if(verbose .and. mype == 0)print_verbose=.true. | |||
|
|||
! Allocate | |||
call create_hybens_localization_parameters | |||
!call create_hybens_localization_parameters |
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 now called in glbsoi
during the initialization.
It can be removed from here, no?
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.
yes done
@jswhit2 , this PR dates back to early 2022. Do we still want the changes in this PR to be merged into NOAA-EMC/GSI develop? If so, feature/generate_ens needs to be updated to the current head of develop. |
@jswhit2 , this PR dates back to January 2022. What is the status of this PR. I assume the changes in this PR are still needed in the GSI. Is this true? |
@RussTreadon-NOAA if we want the generate_ens namelist parameter to actually work, then this should remain open. I can update the branch to the latest develop so more testing can be done to make sure this fix doesn't break anything else. |
Thank you, @jswhit2 , for the quick reply. Yes, please update your branch to the head of develop and ensure the updated branch works as intended. I'll add myself as a reviewer. |
now up-to-date with GSI develop |
@jswhit2 , merger of PR #460 into develop generated a conflict with this PR (#283). Would you please update jswhit2:feature/generate_ens to the current head, 3a4484d4. I can then review and merge this PR into develop. |
@RussTreadon-NOAA I have updated jswhit2:feature/generate_ens to the current NOAA-EMC/GSI/develop. |
Thank you, @jswhit2 . I'll review the changes and run regression tests. |
@jswhit2 , I ran the standard suite of 19 regression tests on Hera. 5 out of 19 tests fail
I individually reran the failed tests. 4 of the 5 tests still fail. Job run directories for all jobs are in
The global_fv3_4denvar_C192 and global_C96_fv3aero fails are not fatal fails. The other 2 fails are due to non-reproducible results. These failures should be examined more closely. The |
generate_ens test Build and run feature/generate_ens gsi.x with the following settings in namelist HYBRID_ENSEMBLE
Jobs submitted on WCOSS2 and Hera. gsi.x ran to completion on both machines. Rerun with
Jobs submitted on WCOSS2 and Hera. gsi.x seg faulted on both machines. Debugging thus far has not identified specifically where the failure occurs in the ens_pert write. @jswhit2, have you successfully run gsi.x with |
generate_ens test follow up Problem found to be with the length of the character variable containing the name of the output ensemble perturbation file.
For my runs the name of the output filename was As a test, increase the length of
successfully ran to completion. |
|
||
type(sub2grid_info), intent(in) :: grd | ||
type(spec_vars), intent(in) :: sp_a | ||
character(len=24), intent(in) :: filename ! file to open and write to |
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.
Increase to at least len=70
to be consistent with size of filename
in cplr_gfs_ensmod.f90
. Is there a way to move away from a fixed character length? It's possible len=70
could fail.
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.
19 regression tests run on Hera. Two cases fail with non-reproducible results.
global_4dvar_T62
global_lanczos_T62
It would be good to examine these case and determine why results are not reproducible.
Need to increase the declared length of filename
in netcdfgfs_io.f90
len=24
was not sufficient in a test case with WRITE_GENERATED_ENS = T
.
@jswhit2 , this PR has two remaining issues:
Issue 1 is easily resolved. Resolving issue 2 may prove challenging. |
@jswhit2 , just a quick check on the status of this PR. The GSI Review team meets in a few weeks (2/13). |
@RussTreadon-NOAA this has fallen down in the priority queue for me, so I don't think I will be able to revisit this before the next meeting |
@jswhit2 , thank you for your reply. With your permission I can commit changes to your branch which
I'll try to look at non-reproducibility when using lanczos as time permits. |
@jswhit2 , I have a working copy of your forked |
@RussTreadon-NOAA if you have time to do that I would very much appreciate it. |
Thanks @jswhit2 for the green light. I tried but unfortunately got the following when I tried to push the updated master to your fork
|
With the transition to JEDI for UFS DA this PR is closed. Hash As noted above setting |
supersedes PR#42