-
Notifications
You must be signed in to change notification settings - Fork 17
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
base: gsl/develop
Are you sure you want to change the base?
Changes from all commits
a6a902a
bc43ecd
524a6b5
b846153
bba5416
3b8f02d
e2e0327
16c974f
2bb18fe
fbdcecf
04871d3
474c82d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,8 +58,9 @@ function atm_core_init(domain, startTimeStamp) result(ierr) | |
real (kind=RKIND), pointer :: dt | ||
type (block_type), pointer :: block | ||
|
||
logical, pointer :: config_do_restart | ||
|
||
logical, pointer :: config_do_restart | ||
logical, pointer :: config_do_DAcycling | ||
type (mpas_pool_type), pointer :: state | ||
type (mpas_pool_type), pointer :: mesh | ||
type (mpas_pool_type), pointer :: diag | ||
|
@@ -116,6 +117,7 @@ function atm_core_init(domain, startTimeStamp) result(ierr) | |
end if | ||
|
||
call mpas_pool_get_config(domain % blocklist % configs, 'config_do_restart', config_do_restart) | ||
call mpas_pool_get_config(domain % blocklist % configs, 'config_do_DAcycling', config_do_DAcycling) | ||
call mpas_pool_get_config(domain % blocklist % configs, 'config_dt', dt) | ||
|
||
! | ||
|
@@ -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' | ||
else | ||
init_stream_name = 'input' | ||
end if | ||
|
@@ -158,6 +162,7 @@ function atm_core_init(domain, startTimeStamp) result(ierr) | |
|
||
call MPAS_stream_mgr_reset_alarms(domain % streamManager, streamID='input', direction=MPAS_STREAM_INPUT, ierr=ierr) | ||
call MPAS_stream_mgr_reset_alarms(domain % streamManager, streamID='restart', direction=MPAS_STREAM_INPUT, ierr=ierr) | ||
call MPAS_stream_mgr_reset_alarms(domain % streamManager, streamID='da_state', direction=MPAS_STREAM_INPUT, ierr=ierr) | ||
call mpas_log_write(' ----- done reading initial state -----') | ||
|
||
|
||
|
@@ -642,6 +647,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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will Line 650 complain if Since da_state only applies to DAcycling, maybe we can add an if block here?
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point. Then I think it is fine. Thanks! |
||
|
||
! Also, for restart runs, avoid writing the initial history or diagnostics fields to avoid overwriting those from the preceding run | ||
if (config_do_restart) then | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1162,6 +1162,7 @@ subroutine driver_sfclayer(itimestep,configs,mesh,diag_physics,sfc_input,its,ite | |
|
||
!local pointers: | ||
logical,pointer:: config_do_restart,config_frac_seaice | ||
logical,pointer:: config_do_DAcycling | ||
character(len=StrKIND),pointer:: sfclayer_scheme | ||
real(kind=RKIND),dimension(:),pointer:: areaCell | ||
|
||
|
@@ -1181,10 +1182,11 @@ subroutine driver_sfclayer(itimestep,configs,mesh,diag_physics,sfc_input,its,ite | |
errmsg = ' ' | ||
errflg = 0 | ||
|
||
call mpas_pool_get_config(configs,'config_do_restart' ,config_do_restart ) | ||
call mpas_pool_get_config(configs,'config_frac_seaice' ,config_frac_seaice) | ||
call mpas_pool_get_config(configs,'config_sfclayer_scheme',sfclayer_scheme ) | ||
|
||
call mpas_pool_get_config(configs,'config_do_restart' ,config_do_restart ) | ||
call mpas_pool_get_config(configs,'config_frac_seaice' ,config_frac_seaice ) | ||
call mpas_pool_get_config(configs,'config_sfclayer_scheme',sfclayer_scheme ) | ||
call mpas_pool_get_config(configs,'config_do_DAcycling' ,config_do_DAcycling) | ||
|
||
call mpas_pool_get_array(mesh,'areaCell',areaCell) | ||
|
||
!copy all MPAS arrays to rectanguler grid: | ||
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tanyasmirnova Could you help me understand what There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. initflag = 1 for cold-start, and initflag=0 for restart and DAcycling. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got it. Thanks! |
||
|
||
sfclayer_select: select case (trim(sfclayer_scheme)) | ||
|
||
|
@@ -1413,7 +1415,10 @@ subroutine driver_sfclayer(itimestep,configs,mesh,diag_physics,sfc_input,its,ite | |
ustm = ustm_p , ck = ck_p , cka = cka_p , & | ||
cd = cd_p , cda = cda_p , ch = ch_p , & | ||
qcg = qcg_p , spp_pbl = spp_pbl , isftcflx = isftcflx , & | ||
iz0tlnd = iz0tlnd , itimestep = initflag , & | ||
iz0tlnd = iz0tlnd , & | ||
itimestep= itimestep , initflag = initflag , & | ||
restart = config_do_restart , & | ||
cycling = config_do_DAcycling , & | ||
errmsg = errmsg , errflg = errflg , & | ||
ids = ids , ide = ide , jds = jds , jde = jde , kds = kds , kde = kde , & | ||
ims = ims , ime = ime , jms = jms , jme = jme , kms = kms , kme = kme , & | ||
|
@@ -1445,7 +1450,10 @@ subroutine driver_sfclayer(itimestep,configs,mesh,diag_physics,sfc_input,its,ite | |
ustm = ustm_sea , ck = ck_sea , cka = cka_sea , & | ||
cd = cd_sea , cda = cda_sea , ch = ch_sea , & | ||
qcg = qcg_p , spp_pbl = spp_pbl , isftcflx = isftcflx , & | ||
iz0tlnd = iz0tlnd , itimestep = initflag , & | ||
iz0tlnd = iz0tlnd , & | ||
itimestep= itimestep , initflag = initflag , & | ||
restart = config_do_restart , & | ||
cycling = config_do_DAcycling , & | ||
errmsg = errmsg , errflg = errflg , & | ||
ids = ids , ide = ide , jds = jds , jde = jde , kds = kds , kde = kde , & | ||
ims = ims , ime = ime , jms = jms , jme = jme , kms = kms , kme = kme , & | ||
|
Uh oh!
There was an error while loading. Please reload this page.
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.
does there need to be an alarm reset like init/restart on lines 163/164 added below line 164?
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.
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)
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 line to reset the alarm for da_state is added.