Skip to content

Wrapper PR for #94 (GF aerosol updates and tunings)#95

Merged
DomHeinzeller merged 7 commits into
NOAA-GSL:gsl/developfrom
climbfuji:gsl_develop_hannah_and_joe_changes_combined_20210712
Jul 19, 2021
Merged

Wrapper PR for #94 (GF aerosol updates and tunings)#95
DomHeinzeller merged 7 commits into
NOAA-GSL:gsl/developfrom
climbfuji:gsl_develop_hannah_and_joe_changes_combined_20210712

Conversation

@climbfuji
Copy link
Copy Markdown

@climbfuji climbfuji commented Jul 14, 2021

This is a wrapper PR for #94 with the correct submodule pointer and .gitmodules updates.

Associated PRs:

NOAA-GSL/ccpp-physics#99
NOAA-GSL/fv3atm#101
#95

Regression testing (updated after fixing b4b restart issues for GF):

  1. Create new baselines using rt_ccpp_dev.conf on Hera with Intel and GNU, then verify against those baselines:

    • Intel: all tests pass

rt_ccpp_dev_hera_intel_create.log
rt_ccpp_dev_hera_intel_verify.log

- GNU: all tests pass

rt_ccpp_dev_hera_gnu_create.log
rt_ccpp_dev_hera_gnu_verify.log

  1. Verify against existing baselines from authoritative repositories on Hera with Intel and GNU and make sure that only those tests fail that we expect to fail (but that they run to completion):

    • Intel: the following tests fail with b4b mismatches or missing baselines, as expected (they all run to completion)
fv3_rap
fv3_hrrr
fv3_rrfs_v1beta
fv3_rrfs_v1alpha
fv3_gsd
regional_control
regional_quilt_2threads
regional_quilt
regional_quilt_hafs
regional_quilt_netcdf_parallel
regional_quilt_RRTMGP
regional_control_debug
fv3_rrfs_v1beta_debug
fv3_rrfs_v1alpha_debug
fv3_gsd_debug
fv3_gsd_dtend_debug

rt_hera_intel_verify_against_existing.log
rt_hera_intel_verify_against_existing_fail_test.log

- GNU: the following tests fail with b4b mismatches or missing baselines, as expected (they all run to completion)
fv3_rrfs_v1beta
fv3_gsd
fv3_rrfs_v1alpha
fv3_rrfs_v1alpha_debug
fv3_gsd_dtend_debug
fv3_rrfs_v1beta_debug
fv3_gsd_debug
regional_control_debug

rt_hera_gnu_verify_against_existing.log
rt_hera_gnu_verify_against_existing_fail_test.log

Copy link
Copy Markdown
Collaborator

@SamuelTrahanNOAA SamuelTrahanNOAA left a comment

Choose a reason for hiding this comment

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

Make sure you set the submodule url and branch for FV3 back to NOAA-GSL gsl/develop before merging. Other than that, this is fine.

@hannahcbarnes
Copy link
Copy Markdown

@DomHeinzeller do you have any idea of what needs to be fixed so that the code passes the warm start test?

@climbfuji
Copy link
Copy Markdown
Author

@DomHeinzeller do you have any idea of what needs to be fixed so that the code passes the warm start test?

Not at this point. It's usually time consuming to figure this out. I'll look at the code changes, but I really wish that code changes were tested for these kind of things during the development phase and before creating the PRs. I'll test your code changes and Joe's code changes separately to get started.

@hannahcbarnes
Copy link
Copy Markdown

I noticed in part of the code I added I have an if statement that has a flag_init and not a flag_restart. Could that cause a problem?

@climbfuji
Copy link
Copy Markdown
Author

I noticed in part of the code I added I have an if statement that has a flag_init and not a flag_restart. Could that cause a problem?

My guess is that aod_gf needs to be added to the restart files.

@hannahcbarnes
Copy link
Copy Markdown

Could we avoid adding it to the restart files if I go into cu_gf_driver_pre and add aod_gf into this if statement

  if(flag_init .and. .not.flag_restart) then
    forcet(:,:)=0.0
    forceq(:,:)=0.0
    aod_gf(:)=-999.
  else

Then in cu_gf_driver change the if file_init to if aod_gf < 0

@climbfuji
Copy link
Copy Markdown
Author

In cu_gf_driver:

      ! set aod and ccn
       if (flag_init) then
         aod_gf(i)=aodc0
       else
         if((cactiv(i).eq.0) .and. (cactiv_m(i).eq.0))then
           if(aodc0>aod_gf(i)) aod_gf(i)=aod_gf(i)+((aodc0-aod_gf(i))*(dt/(aodreturn*60)))
           if(aod_gf(i)>aodc0) aod_gf(i)=aodc0
         endif
       endif

This means that you need to have valid data in aod_gf unless you coldstart the model?

@hannahcbarnes
Copy link
Copy Markdown

Yes, but if I add aod_gf to cu_gf_driver_pre like this:
if(flag_init .and. .not.flag_restart) then
forcet(:,:)=0.0
forceq(:,:)=0.0
aod_gf(:)=-999.
else

And change cu_gf_driver to
if(aod_gf(i).lt.0.)then
aod_gf(i)=aodc0
else
if((cactiv(i).eq.0) .and. (cactiv_m(i).eq.0))then
if(aodc0>aod_gf(i)) aod_gf(i)=aod_gf(i)+((aodc0-aod_gf(i))(dt/(aodreturn60)))
if(aod_gf(i)>aodc0) aod_gf(i)=aodc0
endif
endif

Shouldn't that issue be avoided.

@hannahcbarnes
Copy link
Copy Markdown

Probably also need to change the code since cactiv_m is treated the same as cactiv in cu_gf_driver_pre and cu_gf_driver_post. I am working on that now.

@climbfuji
Copy link
Copy Markdown
Author

Yes, but if I add aod_gf to cu_gf_driver_pre like this:
if(flag_init .and. .not.flag_restart) then
forcet(:,:)=0.0
forceq(:,:)=0.0
aod_gf(:)=-999.
else

And change cu_gf_driver to
if(aod_gf(i).lt.0.)then
aod_gf(i)=aodc0
else
if((cactiv(i).eq.0) .and. (cactiv_m(i).eq.0))then
if(aodc0>aod_gf(i)) aod_gf(i)=aod_gf(i)+((aodc0-aod_gf(i))_(dt/(aodreturn_60)))
if(aod_gf(i)>aodc0) aod_gf(i)=aodc0
endif
endif

Shouldn't that issue be avoided.

Which values will aod_gf have for the first call of a restart run? They would all be zero if not written to disk. Conversely, in continuous runs, they may have non-zero values. This will make a difference in line

if(aodc0>aod_gf(i)) aod_gf(i)=aod_gf(i)+((aodc0-aod_gf(i))_(dt/(aodreturn_60)))

as far as I can see. Also, because of the preceding line

if((cactiv(i).eq.0) .and. (cactiv_m(i).eq.0))then

do we need to care about those, too? For cactiv, Haiqin put code in cu_gf_driver_pre:

      cactiv(:)=nint(conv_act(:))

and conv_act is written to the restart files. But I don't see anything for cactiv_m.

@joeolson42
Copy link
Copy Markdown
Collaborator

joeolson42 commented Jul 15, 2021 via email

@hannahcbarnes
Copy link
Copy Markdown

Yes, I just added cactiv_m to the GFS_restart and cu_gf_driver_pre and cu_gf_driver_post.

Do you want me to add aod_gf to GFS_restart?

@climbfuji
Copy link
Copy Markdown
Author

Yes, I just added cactiv_m to the GFS_restart and cu_gf_driver_pre and cu_gf_driver_post.

Do you want me to add aod_gf to GFS_restart?

Yes please.

@hannahcbarnes
Copy link
Copy Markdown

Sounds good. I will have those added to the PR in a few minutes.

@hannahcbarnes
Copy link
Copy Markdown

I have those changes in my repository and they compiled for me.

Do you want to me to make a pull request for climbfuji:gsl_develop_hannah_and_joe_changes_combined_20210712?

@climbfuji
Copy link
Copy Markdown
Author

I have those changes in my repository and they compiled for me.

Do you want to me to make a pull request for climbfuji:gsl_develop_hannah_and_joe_changes_combined_20210712?

I already pulled them in, but I am getting compile errors. Let me check.

@climbfuji
Copy link
Copy Markdown
Author

I have those changes in my repository and they compiled for me.
Do you want to me to make a pull request for climbfuji:gsl_develop_hannah_and_joe_changes_combined_20210712?

I already pulled them in, but I am getting compile errors. Let me check.

I'll fix those, please no more changes in your branch.

@hannahcbarnes
Copy link
Copy Markdown

Thanks so much!

@joeolson42
Copy link
Copy Markdown
Collaborator

joeolson42 commented Jul 15, 2021 via email

@climbfuji
Copy link
Copy Markdown
Author

Dom, I found something in module_bl_mynn.F90 that was changed inadvertently, probably when merging back-n-forth with WRF code: REAL, DIMENSION(IMS:IME,KMS:KME), INTENT(inout), optional :: & &qc_bl,qi_bl,cldfra_bl The original code was not declared as optional. Any idea what the consequences may be?

If those arrays are always allocated, then none. If they are not, then the consequences can be bad (segmentation faults, ...).

@climbfuji
Copy link
Copy Markdown
Author

Dom, I found something in module_bl_mynn.F90 that was changed inadvertently, probably when merging back-n-forth with WRF code: REAL, DIMENSION(IMS:IME,KMS:KME), INTENT(inout), optional :: & &qc_bl,qi_bl,cldfra_bl The original code was not declared as optional. Any idea what the consequences may be?

If those arrays are always allocated, then none. If they are not, then the consequences can be bad (segmentation faults, ...).

Please go ahead and change it back, we'll have to redo all the testing anyway once the restart issue is resolved.

@climbfuji climbfuji force-pushed the gsl_develop_hannah_and_joe_changes_combined_20210712 branch from 8348b67 to 7677361 Compare July 15, 2021 17:47
@DomHeinzeller
Copy link
Copy Markdown

Update: still debugging. I fixed one more bug in GF, and I replaced MYNN with satmedmf. Still b4b different for restart runs. Will resume tomorrow.

@hannahcbarnes
Copy link
Copy Markdown

Sorry, about the b4b problems. Let me know how I can help.

I finally got a test restart run on hera (hera is super slow...). I got an error "forrtl: severe (408): fort: (2): Subscript #1 of the array NAME2D has value 8 which is greater than the upper bound of 7" I assume I need to increase the size of NAME2d in GFS_restart, which I did not do orginally. Would that impact the b4b error?

@DomHeinzeller
Copy link
Copy Markdown

Sorry, about the b4b problems. Let me know how I can help.

I finally got a test restart run on hera (hera is super slow...). I got an error "forrtl: severe (408): fort: (2): Subscript #1 of the array NAME2D has value 8 which is greater than the upper bound of 7" I assume I need to increase the size of NAME2d in GFS_restart, which I did not do orginally. Would that impact the b4b error?

Hi Hannah, yes, I fixed this and now GF is b4b. Will add MYNN back into the mix. I'll also commit the bug fixes, nothing you need to do at the moment. Thanks!

@climbfuji climbfuji force-pushed the gsl_develop_hannah_and_joe_changes_combined_20210712 branch from 7677361 to edb5ed8 Compare July 16, 2021 16:22
@climbfuji climbfuji force-pushed the gsl_develop_hannah_and_joe_changes_combined_20210712 branch from 21412c8 to d25402f Compare July 19, 2021 16:25
@DomHeinzeller DomHeinzeller merged commit 9909f5f into NOAA-GSL:gsl/develop Jul 19, 2021
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.

5 participants