Skip to content

Commit 19589c3

Browse files
committed
seaice updates/fixes
1 parent 48611f7 commit 19589c3

2 files changed

Lines changed: 16 additions & 14 deletions

File tree

src/core_atmosphere/physics/mpas_atmphys_driver_sfclayer.F

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ subroutine allocate_sfclayer(configs)
148148
if(.not.allocated(xland_p) ) allocate(xland_p(ims:ime,jms:jme) )
149149
if(.not.allocated(zol_p) ) allocate(zol_p(ims:ime,jms:jme) )
150150
if(.not.allocated(znt_p) ) allocate(znt_p(ims:ime,jms:jme) )
151+
if(.not.allocated(xice_p) ) allocate(xice_p(ims:ime,jms:jme) )
151152

152153
if(config_frac_seaice) then
153154
if(.not.allocated(sst_p) ) allocate(sst_p(ims:ime,jms:jme) )
154-
if(.not.allocated(xice_p) ) allocate(xice_p(ims:ime,jms:jme) )
155155

156156
if(.not.allocated(br_sea) ) allocate(br_sea(ims:ime,jms:jme) )
157157
if(.not.allocated(chs_sea) ) allocate(chs_sea(ims:ime,jms:jme) )
@@ -324,10 +324,10 @@ subroutine deallocate_sfclayer(configs)
324324
if(allocated(xland_p) ) deallocate(xland_p )
325325
if(allocated(zol_p) ) deallocate(zol_p )
326326
if(allocated(znt_p) ) deallocate(znt_p )
327-
327+
if(allocated(xice_p) ) deallocate(xice_p )
328+
328329
if(config_frac_seaice) then
329330
if(allocated(sst_p) ) deallocate(sst_p )
330-
if(allocated(xice_p) ) deallocate(xice_p )
331331

332332
if(allocated(br_sea) ) deallocate(br_sea )
333333
if(allocated(gz1oz0_sea) ) deallocate(gz1oz0_sea )
@@ -482,7 +482,8 @@ subroutine sfclayer_from_MPAS(configs,mesh,diag_physics,sfc_input,its,ite)
482482
call mpas_pool_get_array(diag_physics,'mavail' ,mavail )
483483
call mpas_pool_get_array(sfc_input ,'skintemp',skintemp)
484484
call mpas_pool_get_array(sfc_input ,'xland' ,xland )
485-
485+
call mpas_pool_get_array(sfc_input ,'xice' ,xice )
486+
486487
!inout variables:
487488
call mpas_pool_get_array(diag_physics,'br' ,br )
488489
call mpas_pool_get_array(diag_physics,'cpm' ,cpm )
@@ -516,7 +517,8 @@ subroutine sfclayer_from_MPAS(configs,mesh,diag_physics,sfc_input,its,ite)
516517
mavail_p(i,j) = mavail(i)
517518
tsk_p(i,j) = skintemp(i)
518519
xland_p(i,j) = xland(i)
519-
520+
xice_p(i,j) = xice(i)
521+
520522
!inout variables:
521523
br_p(i,j) = br(i)
522524
cpm_p(i,j) = cpm(i)
@@ -559,11 +561,9 @@ subroutine sfclayer_from_MPAS(configs,mesh,diag_physics,sfc_input,its,ite)
559561

560562
if(config_frac_seaice) then
561563
call mpas_pool_get_array(sfc_input,'sst' ,sst)
562-
call mpas_pool_get_array(sfc_input,'xice',xice)
563564
do j = jts,jte
564565
do i = its,ite
565566
sst_p(i,j) = sst(i)
566-
xice_p(i,j) = xice(i)
567567

568568
!input variables:
569569
mavail_sea(i,j) = mavail(i)
@@ -1401,17 +1401,18 @@ subroutine driver_sfclayer(itimestep,configs,mesh,diag_physics,sfc_input,its,ite
14011401
cqs = cqs_p , cqs2 = cqs2_p , cpm = cpm_p , &
14021402
znt = znt_p , qgh = qgh_p , &
14031403
ust = ust_p , pblh = hpbl_p , mavail = mavail_p , &
1404-
zol = zol_p , mol = mol_p , &
1404+
zol = zol_p , mol = mol_p , &
14051405
psim = psim_p , psih = psih_p , xland = xland_p , &
14061406
hfx = hfx_p , qfx = qfx_p , lh = lh_p , &
14071407
tsk = tsk_p , flhc = flhc_p , flqc = flqc_p , &
1408-
qsfc = qsfc_p , rmol = rmol_p , &
1408+
qsfc = qsfc_p , rmol = rmol_p , &
14091409
u10 = u10_p , v10 = v10_p , th2 = th2m_p , &
14101410
t2 = t2m_p , q2 = q2_p , snowh = snowh_p , &
14111411
gz1oz0 = gz1oz0_p , wspd = wspd_p , br = br_p , &
1412-
isfflx = isfflx , dx = dx_p , &
1412+
isfflx = isfflx , dx = dx_p , &
14131413
ustm = ustm_p , ck = ck_p , cka = cka_p , &
14141414
cd = cd_p , cda = cda_p , ch = ch_p , &
1415+
xice =xice_P , xice_threshold = xice_threshold , &
14151416
spp_pbl = spp_pbl , &
14161417
sf_mynn_sfcflux_land = sf_mynn_sfcflux_land , &
14171418
sf_mynn_sfcflux_water = sf_mynn_sfcflux_water , &
@@ -1434,17 +1435,18 @@ subroutine driver_sfclayer(itimestep,configs,mesh,diag_physics,sfc_input,its,ite
14341435
cqs = cqs_sea , cqs2 = cqs2_sea , cpm = cpm_sea , &
14351436
znt = znt_sea , qgh = qgh_sea , &
14361437
ust = ust_sea , pblh = hpbl_p , mavail = mavail_sea , &
1437-
zol = zol_sea , mol = mol_sea , &
1438+
zol = zol_sea , mol = mol_sea , &
14381439
psim = psim_sea , psih = psih_sea , xland = xland_sea , &
14391440
hfx = hfx_sea , qfx = qfx_sea , lh = lh_sea , &
14401441
tsk = tsk_sea , flhc = flhc_sea , flqc = flqc_sea , &
1441-
qsfc = qsfc_sea , rmol = rmol_sea , &
1442+
qsfc = qsfc_sea , rmol = rmol_sea , &
14421443
u10 = u10_sea , v10 = v10_sea , th2 = th2m_sea , &
14431444
t2 = t2m_sea , q2 = q2_sea , snowh = snowh_p , &
14441445
gz1oz0 = gz1oz0_sea , wspd = wspd_sea , br = br_sea , &
1445-
isfflx = isfflx , dx = dx_p , &
1446+
isfflx = isfflx , dx = dx_p , &
14461447
ustm = ustm_sea , ck = ck_sea , cka = cka_sea , &
14471448
cd = cd_sea , cda = cda_sea , ch = ch_sea , &
1449+
xice =xice_P , xice_threshold = xice_threshold , &
14481450
spp_pbl = spp_pbl , &
14491451
sf_mynn_sfcflux_land = sf_mynn_sfcflux_land , &
14501452
sf_mynn_sfcflux_water = sf_mynn_sfcflux_water , &

0 commit comments

Comments
 (0)