Skip to content

Modifications for DAcycling=true #136

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

Open
wants to merge 11 commits into
base: gsl/develop
Choose a base branch
from

Conversation

tanyasmirnova
Copy link
Collaborator

@tanyasmirnova tanyasmirnova commented May 28, 2025

The title above should be a 1 line short summary of the pull request (i.e. what the project the PR represents is intended to do).

Enter a description of this PR. This should include why this PR was created, and what it does.

Testing and relations to other Pull Requests should be added as subsequent comments.

See the below examples for more information.
MPAS-Dev/MPAS#930
MPAS-Dev/MPAS#931

Information on running mandatory regression tests on Jet can be found here and the results pasted below.

regression test case results
PASTE compare_run_testcases AND/OR compare_create_testcases TEXT HERE
 version_to_compare = v8.2.2-3.12

gsl_version_baseline = v8.2.2-3.11
ncar_version_baseline = v8.2.2
test_directory = /lfs5/BMC/wrfruc/smirnova/MPAS_regression_tests/mpas_testcase/run_case/
gsl_baseline_directory = /lfs5/BMC/wrfruc/Michael.Barlage/mpas/baselines_mpas/run_case/
ncar_baseline_directory = /lfs5/BMC/wrfruc/Michael.Barlage/mpas/baselines_mpas/run_case/
compile_flag = -intdebug
test_repo_name = gsl

######################################################################

compare to previous GSL CONUS mesoscale_reference baselines A1GSL

######################################################################

=== history.2023-03-10_15.00.00.nc comparison
Files "/lfs5/BMC/wrfruc/smirnova/MPAS_regression_tests/mpas_testcase/run_case/gsl-v8.2.2-3.12-intdebug.mesoscale_reference.ncar.ncar.conus.120km.gfs.2023031015/history.2023-03-10_15.00.00.nc" and "/lfs5/BMC/wrfruc/Michael.Barlage/mpas/baselines_mpas/run_case/gsl-v8.2.2-3.11-intdebug.mesoscale_reference.ncar.ncar.conus.120km.gfs.2023031015/history.2023-03-10_15.00.00.nc" are identical.

=== history.2023-03-10_15.12.00.nc comparison
Files "/lfs5/BMC/wrfruc/smirnova/MPAS_regression_tests/mpas_testcase/run_case/gsl-v8.2.2-3.12-intdebug.mesoscale_reference.ncar.ncar.conus.120km.gfs.2023031015/history.2023-03-10_15.12.00.nc" and "/lfs5/BMC/wrfruc/Michael.Barlage/mpas/baselines_mpas/run_case/gsl-v8.2.2-3.11-intdebug.mesoscale_reference.ncar.ncar.conus.120km.gfs.2023031015/history.2023-03-10_15.12.00.nc" are identical.

=== history.2023-03-10_16.00.00.nc comparison
Files "/lfs5/BMC/wrfruc/smirnova/MPAS_regression_tests/mpas_testcase/run_case/gsl-v8.2.2-3.12-intdebug.mesoscale_reference.ncar.ncar.conus.120km.gfs.2023031015/history.2023-03-10_16.00.00.nc" and "/lfs5/BMC/wrfruc/Michael.Barlage/mpas/baselines_mpas/run_case/gsl-v8.2.2-3.11-intdebug.mesoscale_reference.ncar.ncar.conus.120km.gfs.2023031015/history.2023-03-10_16.00.00.nc" are identical.

#############################################################################

compare to previous GSL CONUS convection_permitting_none baselines F1GSL

#############################################################################

=== history.2023-03-10_15.00.00.nc comparison
Files "/lfs5/BMC/wrfruc/smirnova/MPAS_regression_tests/mpas_testcase/run_case/gsl-v8.2.2-3.12-intdebug.convection_permitting_none.ncar.ncar.conus.120km.gfs.2023031015/history.2023-03-10_15.00.00.nc" and "/lfs5/BMC/wrfruc/Michael.Barlage/mpas/baselines_mpas/run_case/gsl-v8.2.2-3.11-intdebug.convection_permitting_none.ncar.ncar.conus.120km.gfs.2023031015/history.2023-03-10_15.00.00.nc" are identical.

=== history.2023-03-10_15.12.00.nc comparison
Files "/lfs5/BMC/wrfruc/smirnova/MPAS_regression_tests/mpas_testcase/run_case/gsl-v8.2.2-3.12-intdebug.co
Files "/lfs5/BMC/wrfruc/smirnova/MPAS_regression_tests/mpas_testcase/run_case/gsl-v8.2.2-3.12-intdebug.convection_permitting_none.ncar.ncar.conus.120km.gfs.2023031015/history.2023-03-10_15.12.00.nc" and "/lfs5/BMC/wrfruc/Michael.Barlage/mpas/baselines_mpas/run_case/gsl-v8.2.2-3.11-intdebug.convection_permitting_none.ncar.ncar.conus.120km.gfs.2023031015/history.2023-03-10_15.12.00.nc" are identical.

=== history.2023-03-10_16.00.00.nc comparison
Files "/lfs5/BMC/wrfruc/smirnova/MPAS_regression_tests/mpas_testcase/run_case/gsl-v8.2.2-3.12-intdebug.convection_permitting_none.ncar.ncar.conus.120km.gfs.2023031015/history.2023-03-10_16.00.00.nc" and "/lfs5/BMC/wrfruc/Michael.Barlage/mpas/baselines_mpas/run_case/gsl-v8.2.2-3.11-intdebug.convection_permitting_none.ncar.ncar.conus.120km.gfs.2023031015/history.2023-03-10_16.00.00.nc" are identical.

########################################################################

compare to previous NCAR CONUS mesoscale_reference baselines A1NCAR

########################################################################

=== history.2023-03-10_15.00.00.nc comparison
Files "/lfs5/BMC/wrfruc/smirnova/MPAS_regression_tests/mpas_testcase/run_case/gsl-v8.2.2-3.12-intdebug.mesoscale_reference.ncar.ncar.conus.120km.gfs.2023031015/history.2023-03-10_15.00.00.nc" and "/lfs5/BMC/wrfruc/Michael.Barlage/mpas/baselines_mpas/run_case/ncar-v8.2.2-intdebug.mesoscale_reference.ncar.ncar.conus.120km.gfs.2023031015/history.2023-03-10_15.00.00.nc" are identical.

=== history.2023-03-10_15.12.00.nc comparison
Files "/lfs5/BMC/wrfruc/smirnova/MPAS_regression_tests/mpas_testcase/run_case/gsl-v8.2.2-3.12-intdebug.mesoscale_reference.ncar.ncar.conus.120km.gfs.2023031015/history.2023-03-10_15.12.00.nc" and "/lfs5/BMC/wrfruc/Michael.Barlage/mpas/baselines_mpas/run_case/ncar-v8.2.2-intdebug.mesoscale_reference.ncar.ncar.conus.120km.gfs.2023031015/history.2023-03-10_15.12.00.nc" are identical.

=== history.2023-03-10_16.00.00.nc comparison
Files "/lfs5/BMC/wrfruc/smirnova/MPAS_regression_tests/mpas_testcase/run_case/gsl-v8.2.2-3.12-intdebug.mesoscale_reference.ncar.ncar.conus.120km.gfs.2023031015/history.2023-03-10_16.00.00.nc" and "/lfs5/BMC/wrfruc/Michael.Barlage/mpas/baselines_mpas/run_case/ncar-v8.2.2-intdebug.mesoscale_reference.ncar.ncar.conus.120km.gfs.2023031015/history.2023-03-10_16.00.00.nc" are identical.

###############################################################################

compare to previous NCAR CONUS convection_permitting_none baselines F1NCAR

###############################################################################

=== history.2023-03-10_15.00.00.nc comparison
Files "/lfs5/BMC/wrfruc/smirnova/MPAS_regression_tests/mpas_testcase/run_case/gsl-v8.2.2-3.12-intdebug.convection_permitting_none.ncar.ncar.conus.120km.gfs.2023031015/history.2023-03-10_15.00.00.nc" and "/lfs5/BMC/wrfruc/Michael.Barlage/mpas/baselines_mpas/run_case/ncar-v8.2.2-intdebug.convection_permitting_none.ncar.ncar.conus.120km.gfs.2023031015/history.2023-03-10_15.00.00.nc" are identical.

=== history.2023-03-10_15.12.00.nc comparison
Files "/lfs5/BMC/wrfruc/smirnova/MPAS_regression_tests/mpas_testcase/run_case/gsl-v8.2.2-3.12-intdebug.convection_permitting_none.ncar.ncar.conus.120km.gfs.2023031015/history.2023-03-10_15.12.00.nc" and "/lfs5/BMC/wrfruc/Michael.Barlage/mpas/baselines_mpas/run_case/ncar-v8.2.2-intdebug.convection_permitting_none.ncar.ncar.conus.120km.gfs.2023031015/history.2023-03-10_15.12.00.nc" are identical.

=== history.2023-03-10_16.00.00.nc comparison
Files "/lfs5/BMC/wrfruc/smirnova/MPAS_regression_tests/mpas_testcase/run_case/gsl-v8.2.2-3.12-intdebug.convection_permitting_none.ncar.ncar.conus.120km.gfs.2023031015/history.2023-03-10_16.00.00.nc" and "/lfs5/BMC/wrfruc/Michael.Barlage/mpas/baselines_mpas/run_case/ncar-v8.2.2-intdebug.convection_permitting_none.ncar.ncar.conus.120km.gfs.2023031015/history.2023-03-10_16.00.00.nc" are identical.

@@ -308,7 +310,7 @@ subroutine physics_init(dminfo,stream_manager,clock,configs,mesh,diag,tend,state
endif

!initialization of xicem:
if(.not.config_do_restart) then
if(.not.config_do_restart .or. .not.config_do_DAcycling) then
Copy link

@guoqing-noaa guoqing-noaa May 29, 2025

Choose a reason for hiding this comment

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

@tanyasmirnova Should it be

if(.not.config_do_restart .and. .not.config_do_DAcycling)

at lines 313 and 321?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

corrected

@@ -172,7 +174,7 @@ subroutine ruclsminit(dminfo,mesh,configs,diag_physics,sfc_input)
call mpas_log_write('')


if(.not.restart) then
if(.not.restart .or. .not. cycling) then
Copy link

@guoqing-noaa guoqing-noaa May 29, 2025

Choose a reason for hiding this comment

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

Should it be "if not restart and not cycling"?
ie.

if(.not.restart .and. .not. cycling) then

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

corrected

@@ -194,7 +194,8 @@ subroutine mynnsfclay_driver( &
integer,intent(in):: ids,ide,jds,jde,kds,kde, &
ims,ime,jms,jme,kms,kme, &
its,ite,jts,jte,kts,kte
integer,intent(in):: itimestep
logical,intent(in):: restart,DAcycling

Choose a reason for hiding this comment

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

One cosmetic comment:
since restart and cycling are used in a few files in the above, to be consistent, we may want to change DAcycling here to cycling.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The change is made.

@guoqing-noaa
Copy link

@tanyasmirnova
It looks like the following files also contain "config_do_restart" but don't have the "config_do_DAcycling" logic:

core_atmosphere/physics/mpas_atmphys_control.F
core_atmosphere/physics/mpas_atmphys_driver_convection.F
core_atmosphere/physics/mpas_atmphys_driver_pbl.F
core_atmosphere/physics/mpas_atmphys_lsm_noahinit.F
core_atmosphere/physics/mpas_atmphys_driver_lsm_noahmp.F
core_atmosphere/physics/mpas_atmphys_lsm_noahmpinit.F
core_atmosphere/physics/mpas_atmphys_driver_microphysics.F

@tanyasmirnova
Copy link
Collaborator Author

Guoq

@tanyasmirnova It looks like the following files also contain "config_do_restart" but don't have the "config_do_DAcycling" logic:

core_atmosphere/physics/mpas_atmphys_control.F
core_atmosphere/physics/mpas_atmphys_driver_convection.F
core_atmosphere/physics/mpas_atmphys_driver_pbl.F
core_atmosphere/physics/mpas_atmphys_lsm_noahinit.F
core_atmosphere/physics/mpas_atmphys_driver_lsm_noahmp.F
core_atmosphere/physics/mpas_atmphys_lsm_noahmpinit.F
core_atmosphere/physics/mpas_atmphys_driver_microphysics.F

The core_atmosphere/physics/mpas_atmphys_control.F is simply specifying the levels/layers in soil domain. It will not hurt to do it in the cycling run.
Other physics developers should take care of the rest subroutines in your list: @joeolson42 @haiqinli @barlage @AndersJensen-NOAA

@@ -1193,7 +1195,7 @@ subroutine driver_sfclayer(itimestep,configs,mesh,diag_physics,sfc_input,its,ite
dx = sqrt(maxval(areaCell))

initflag = 1
if(config_do_restart .or. itimestep > 1) initflag = 0
if(config_do_restart .or. config_do_DAcycling .or. itimestep > 1) initflag = 0

Choose a reason for hiding this comment

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

@tanyasmirnova Could you help me understand what initflag means?
0 means init from cold start? 1 means init from warm start? Thanks!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

initflag = 1 for cold-start, and initflag=0 for restart and DAcycling.

Choose a reason for hiding this comment

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

Got it. Thanks!

'input' stream when configure_do_DAcycling=true.
Also, a change to avoid writing out mpasout* at initial time not to
overwrite the analysis file.
@@ -642,6 +646,8 @@ function atm_core_run(domain) result(ierr)

! Avoid writing a restart file at the initial time
call MPAS_stream_mgr_reset_alarms(domain % streamManager, streamID='restart', direction=MPAS_STREAM_OUTPUT, ierr=ierr)
! Avoid writing a mpasout file at the initial time
call MPAS_stream_mgr_reset_alarms(domain % streamManager, streamID='da_state', direction=MPAS_STREAM_OUTPUT, ierr=ierr)

Choose a reason for hiding this comment

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

Will Line 650 complain if streams.atmosphere does not define da_state?

Since da_state only applies to DAcycling, maybe we can add an if block here?

if (config_do_DAcycling) then
    call MPAS_stream_mgr_reset_alarms(domain % streamManager, streamID='da_state', direction=MPAS_STREAM_OUTPUT, ierr=ierr)
end if

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I jut copied what they do for restart, there is no 'if (restart) around it.

Choose a reason for hiding this comment

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

Good point. Then I think it is fine. Thanks!

@@ -137,6 +139,8 @@ function atm_core_init(domain, startTimeStamp) result(ierr)
call mpas_timer_start('read_ICs')
if (config_do_restart) then
init_stream_name = 'restart'
elseif (config_do_DAcycling) then
init_stream_name = 'da_state'
Copy link
Collaborator

@barlage barlage Jun 2, 2025

Choose a reason for hiding this comment

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

does there need to be an alarm reset like init/restart on lines 163/164 added below line 164?

Choose a reason for hiding this comment

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

Agree with @barlage . We need to add one line after line 164 as follows:
call MPAS_stream_mgr_reset_alarms(domain % streamManager, streamID='da_state', direction=MPAS_STREAM_INPUT, ierr=ierr)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The line to reset the alarm for da_state is added.

@tanyasmirnova tanyasmirnova marked this pull request as ready for review June 2, 2025 21:52
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