Skip to content

Commit ac3866c

Browse files
committed
Merge branch 'hotfix-v8.2.3'
This merge addresses several issues in the MPAS-Atmosphere model and in the MPAS infrastructure. Specific changes include: * Correction of the pool from which lbc_scalar constituent indices are obtained in the init_atm_thompson_aerosols_lbc routine. Rather than obtaining index_nifa and index_nwfa from the state pool, the indices of lbc_nifa and lbc_nwfa should be obtained from the lbc_state pool. (PR #1249) * Correction to the computation of the soil temperature (TSLB) in the Noah-MP land surface scheme through the addition of initialization of the soil liquid water (SH2O) in the noahmp_init subroutine in module mpas_atmphys_lsm_noahmpinit.F prior to calling NoahmpInitMain. (PR #1244) * Correction of the units of the fields 'greenfrac', 'shdmin', 'shdmax', 'vegfra', and 'albedo12m' from "unitless" to "percent" in the init_atmosphere and atmosphere core Registry.xml files. Also, a correction to the spelling of 'greenness' in several places. (PR #1248) * Removal of a duplicate allocation of indexToEdgeID % array in the mpas_io_setup_edge_block_fields routine that was the source of a memory leak. (PR #1258) * Fix for a memory leak in mpas_block_creator_build_cell_halos by deallocating the cellLimitField field before the routine returns. (PR #1264) * Fix for a bug in the logic for determining when decompositions can be reused by the SMIOL library. In almost any practical situation, however, this bug created no issues. (PR #1288) * Changes in the init_atmosphere core to provide more reliable error messages in case config_nfglevels is not set to a value that is at least as large as the number of vertical levels in the first-guess intermediate file. (PR #1291) * Correction of the loop for Noah-MP snow initialization, capping snow water equivalent maximum at 2000 mm. (PR #1300) * Fix for a bug in the horizontal 2nd-order filter for the CAM upper absorbing layer, where the wrong level in the kdiff field was being used when enforcing a lower-bound on kdiff. This absorbing layer is active only when config_mpas_cam_coef > 0.0. (PR #1302) * Fix in the mountain wave idealized test case initialization when multiple MPI tasks are used. The 'xc' variable, which represents the center-point location of the mountain, was previously computed based on the maximum xCell values local to an MPI task, leading to inconsistent values on each MPI rank. By finding the maximum of xCell over all MPI ranks and ensuring that all MPI ranks use this global maximum, the terrain field is computed consistently between serial and parallel runs of the init_atmosphere_model program for the mountain wave test case (config_init_case = 6). (PR #1312) * Correction to the calculation of the 2-meter diagnostics (T2M, TH2M, and Q2) when using the Noah-MP land surface scheme. While the computation of 2-meter diagnostics is the same for Noah and Noah-MP over oceans, it is different between the two land surface schemes over land. In Noah-MP, the 2-meter diagnostics are weighted as functions of their respective diagnostics over bare soil and over vegetation. The updated diagnostics for Noah and Noah-MP are now computed in the new file mpas_atmphys_sfc_diagnostics.F. (PR #1242) * Fix to provide consistency in the ringing behavior of recurring alarms after their reference time has been adjusted with a call to mpas_adjust_alarm_to_reference_time. Now, adjusting the reference time for an alarm will always leave that alarm in a state such that it is considered by the mpas_is_alarm_ringing routine to be ringing at the current time. With this fix, limited-area simulations can be restarted at times between LBC updates, provided the reference_time attribute for the 'lbc_in' stream is set to the simulation initial time in the streams.atmosphere file. (PR #1290). * Correction of an indexing error for rvcuten in code blocks specific to the Grell-Freitas scheme in the convection driver. Specifically, in the convection_from_MPAS and convection_to_MPAS routines, rvcuten used (k,k) as indexing in a loop, where (k,i) is needed. Since the Grell-Freitas scheme does not provide momentum tendencies, the changes in this merge have no impact on results. (PR #1283)
2 parents 41e9a3f + cd775f3 commit ac3866c

30 files changed

+754
-152
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
MPAS-v8.2.2
1+
MPAS-v8.2.3
22
====
33

44
The Model for Prediction Across Scales (MPAS) is a collaborative project for

src/core_atmosphere/Registry.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<registry model="mpas" core="atmosphere" core_abbrev="atm" version="8.2.2">
2+
<registry model="mpas" core="atmosphere" core_abbrev="atm" version="8.2.3">
33

44
<!-- **************************************************************************************** -->
55
<!-- ************************************** Dimensions ************************************** -->
@@ -3451,10 +3451,10 @@
34513451
<var name="landmask" type="integer" dimensions="nCells" units="unitless"
34523452
description="land-ocean mask (1=land ; 0=ocean)"/>
34533453

3454-
<var name="shdmin" type="real" dimensions="nCells" units="unitless"
3454+
<var name="shdmin" type="real" dimensions="nCells" units="percent"
34553455
description="minimum fractional coverage of annual green vegetation fraction"/>
34563456

3457-
<var name="shdmax" type="real" dimensions="nCells" units="unitless"
3457+
<var name="shdmax" type="real" dimensions="nCells" units="percent"
34583458
description="maximum fractional coverage of annual green vegetation fraction"/>
34593459

34603460
<var name="snoalb" type="real" dimensions="nCells" units="unitless"
@@ -3463,11 +3463,11 @@
34633463
<var name="ter" type="real" dimensions="nCells" units="m"
34643464
description="terrain height"/>
34653465

3466-
<var name="albedo12m" type="real" dimensions="nMonths nCells" units="unitless"
3466+
<var name="albedo12m" type="real" dimensions="nMonths nCells" units="percent"
34673467
description="monthly-mean climatological surface albedo"/>
34683468

3469-
<var name="greenfrac" type="real" dimensions="nMonths nCells" units="unitless"
3470-
description="monthly-mean climatological greeness fraction"/>
3469+
<var name="greenfrac" type="real" dimensions="nMonths nCells" units="percent"
3470+
description="monthly-mean climatological greenness fraction"/>
34713471

34723472
<var name="dzs" type="real" dimensions="nSoilLevels nCells Time" units="m"
34733473
description="soil layer thickness"/>
@@ -3493,7 +3493,7 @@
34933493
<var name="tmn" type="real" dimensions="nCells Time" units="K"
34943494
description="deep soil temperature"/>
34953495

3496-
<var name="vegfra" type="real" dimensions="nCells Time" units="unitless"
3496+
<var name="vegfra" type="real" dimensions="nCells Time" units="percent"
34973497
description="vegetation fraction"/>
34983498

34993499
<var name="seaice" type="real" dimensions="nCells Time" units="unitless"

src/core_atmosphere/dynamics/mpas_atm_time_integration.F

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4692,7 +4692,7 @@ subroutine atm_compute_dyn_tend_work(nCells, nEdges, nVertices, nVertLevels_dumm
46924692
do k = nVertLevels-config_number_cam_damping_levels + 1, nVertLevels
46934693
visc2cam = 4.0*2.0833*config_len_disp*config_mpas_cam_coef
46944694
visc2cam = visc2cam*(1.0-real(nVertLevels-k)/real(config_number_cam_damping_levels))
4695-
kdiff(k ,iCell) = max(kdiff(nVertLevels ,iCell),visc2cam)
4695+
kdiff(k ,iCell) = max(kdiff(k ,iCell),visc2cam)
46964696
end do
46974697
end do
46984698

src/core_atmosphere/physics/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ OBJS = \
4848
mpas_atmphys_packages.o \
4949
mpas_atmphys_rrtmg_lwinit.o \
5050
mpas_atmphys_rrtmg_swinit.o \
51+
mpas_atmphys_sfc_diagnostics.o \
5152
mpas_atmphys_todynamics.o \
5253
mpas_atmphys_update_surface.o \
5354
mpas_atmphys_update.o \
@@ -103,6 +104,7 @@ mpas_atmphys_driver.o: \
103104
mpas_atmphys_driver_oml.o \
104105
mpas_atmphys_constants.o \
105106
mpas_atmphys_interface.o \
107+
mpas_atmphys_sfc_diagnostics.o \
106108
mpas_atmphys_update.o \
107109
mpas_atmphys_vars.o
108110

@@ -223,6 +225,10 @@ mpas_atmphys_rrtmg_swinit.o: \
223225
mpas_atmphys_constants.o \
224226
mpas_atmphys_utilities.o
225227

228+
mpas_atmphys_sfc_diagnostics.o: \
229+
mpas_atmphys_constants.o \
230+
mpas_atmphys_vars.o
231+
226232
mpas_atmphys_todynamics.o: \
227233
mpas_atmphys_constants.o \
228234
mpas_atmphys_vars.o

src/core_atmosphere/physics/Registry_noahmp.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,12 +360,18 @@
360360
<var name="t2mbxy" type="real" dimensions="nCells Time" units="K"
361361
description="2-meter temperature over bare ground" missing_value="-9999.0"/>
362362

363+
<var name="t2mxy" type="real" dimensions="nCells Time" units="K"
364+
description="grid-mean 2-meter temperature" missing_value="-9999.0"/>
365+
363366
<var name="q2mvxy" type="real" dimensions="nCells Time" units="kg kg^{-1}"
364367
description="2-meter water vapor mixing ratio over canopy" missing_value="-9999.0"/>
365368

366369
<var name="q2mbxy" type="real" dimensions="nCells Time" units="kg kg^{-1}"
367370
description="2-meter water vapor mixing ratio over bare ground" missing_value="-9999.0"/>
368371

372+
<var name="q2mxy" type="real" dimensions="nCells Time" units="kg kg^{-1}"
373+
description="grid-mean 2-meter water vapor mixing ratio" missing_value="-9999.0"/>
374+
369375
<var name="tradxy" type="real" dimensions="nCells Time" units="K"
370376
description="surface radiative temperature" missing_value="-9999.0"/>
371377

src/core_atmosphere/physics/mpas_atmphys_driver.F

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ module mpas_atmphys_driver
2323
use mpas_atmphys_driver_oml
2424
use mpas_atmphys_constants
2525
use mpas_atmphys_interface
26+
use mpas_atmphys_sfc_diagnostics,only: atmphys_sfc_diagnostics
2627
use mpas_atmphys_update
2728
use mpas_atmphys_vars, only: l_camlw,l_conv,l_radtlw,l_radtsw
2829
use mpas_timer
@@ -296,14 +297,21 @@ subroutine physics_driver(domain,itimestep,xtime_s)
296297
enddo
297298
endif
298299

299-
call allocate_seaice
300+
call allocate_seaice(block%configs)
300301
!$OMP PARALLEL DO
301302
do thread=1,nThreads
302303
call driver_seaice(block%configs,diag_physics,sfc_input, &
303304
cellSolveThreadStart(thread),cellSolveThreadEnd(thread))
304305
enddo
305306
!$OMP END PARALLEL DO
306-
call deallocate_seaice
307+
call deallocate_seaice(block%configs)
308+
309+
!$OMP PARALLEL DO
310+
do thread=1,nThreads
311+
call atmphys_sfc_diagnostics(block%configs,mesh,diag,diag_physics,sfc_input,output_noahmp, &
312+
cellSolveThreadStart(thread),cellSolveThreadEnd(thread))
313+
enddo
314+
!$OMP END PARALLEL DO
307315
endif
308316

309317
!call to pbl schemes:

src/core_atmosphere/physics/mpas_atmphys_driver_convection.F

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ subroutine convection_from_MPAS(dt_dyn,configs,mesh,sfc_input,diag_physics,tend_
744744
rqvblten_p(i,k,j) = rqvblten(k,i)
745745
rqvdynten_p(i,k,j) = rqvdynten(k,i)
746746
rucuten_p(i,k,j) = rucuten(k,i)
747-
rvcuten_p(i,k,j) = rvcuten(k,k)
747+
rvcuten_p(i,k,j) = rvcuten(k,i)
748748
enddo
749749
enddo
750750
enddo
@@ -941,7 +941,7 @@ subroutine convection_to_MPAS(configs,diag_physics,tend_physics,its,ite)
941941
qc_cu(k,i) = qccu_p(i,k,j)
942942
qi_cu(k,i) = qicu_p(i,k,j)
943943
rucuten(k,i) = rucuten_p(i,k,j)
944-
rvcuten(k,k) = rvcuten_p(i,k,j)
944+
rvcuten(k,i) = rvcuten_p(i,k,j)
945945
enddo
946946
enddo
947947
enddo

src/core_atmosphere/physics/mpas_atmphys_driver_lsm_noahmp.F

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ subroutine lsm_noahmp_fromMPAS(configs,mesh,diag,diag_physics,diag_physics_noahm
8484

8585

8686
!--- local OUT pointers (with no Noah LSM equivalent as defined in WRF):
87-
real(kind=RKIND),dimension(:),pointer:: t2mvxy,t2mbxy,q2mvxy,q2mbxy,tradxy,neexy,gppxy,nppxy,fvegxy,runsfxy, &
88-
runsbxy,ecanxy,edirxy,etranxy,fsaxy,firaxy,aparxy,psnxy,savxy,sagxy, &
89-
rssunxy,rsshaxy,bgapxy,wgapxy,tgvxy,tgbxy,chvxy,chbxy,shgxy,shcxy, &
90-
shbxy,evgxy,evbxy,ghvxy,ghbxy,irgxy,ircxy,irbxy,trxy,evcxy,chleafxy, &
91-
chucxy,chv2xy,chb2xy,rs,qtdrain
87+
real(kind=RKIND),dimension(:),pointer:: tradxy,neexy,gppxy,nppxy,fvegxy,runsfxy,runsbxy,ecanxy,edirxy, &
88+
etranxy,fsaxy,firaxy,aparxy,psnxy,savxy,sagxy,rssunxy,rsshaxy, &
89+
bgapxy,wgapxy,tgvxy,tgbxy,chvxy,chbxy,shgxy,shcxy,shbxy,evgxy, &
90+
evbxy,ghvxy,ghbxy,irgxy,ircxy,irbxy,trxy,evcxy,chleafxy,chucxy, &
91+
chv2xy,chb2xy,rs,qtdrain
9292

9393

9494
!--- local OUT additional variables:
@@ -375,10 +375,6 @@ subroutine lsm_noahmp_fromMPAS(configs,mesh,diag,diag_physics,diag_physics_noahm
375375

376376
!--- initialization of OUT (with no Noah LSM equivalent as defined in WRF), i.e.
377377
! see lines 242-290 in module NoahmpIOVarType.F90):
378-
call mpas_pool_get_array(output_noahmp,'t2mvxy' ,t2mvxy )
379-
call mpas_pool_get_array(output_noahmp,'t2mbxy' ,t2mbxy )
380-
call mpas_pool_get_array(output_noahmp,'q2mvxy' ,q2mvxy )
381-
call mpas_pool_get_array(output_noahmp,'q2mbxy' ,q2mbxy )
382378
call mpas_pool_get_array(output_noahmp,'tradxy' ,tradxy )
383379
call mpas_pool_get_array(output_noahmp,'neexy' ,neexy )
384380
call mpas_pool_get_array(output_noahmp,'gppxy' ,gppxy )
@@ -423,10 +419,6 @@ subroutine lsm_noahmp_fromMPAS(configs,mesh,diag,diag_physics,diag_physics_noahm
423419
call mpas_pool_get_array(output_noahmp,'qtdrain',qtdrain )
424420

425421
do i = its,ite
426-
mpas_noahmp%t2mvxy(i) = t2mvxy(i)
427-
mpas_noahmp%t2mbxy(i) = t2mbxy(i)
428-
mpas_noahmp%q2mvxy(i) = q2mvxy(i)
429-
mpas_noahmp%q2mbxy(i) = q2mbxy(i)
430422
mpas_noahmp%tradxy(i) = tradxy(i)
431423
mpas_noahmp%neexy(i) = neexy(i)
432424
mpas_noahmp%gppxy(i) = gppxy(i)
@@ -685,11 +677,11 @@ subroutine lsm_noahmp_toMPAS(diag_physics,diag_physics_noahmp,output_noahmp,sfc_
685677

686678

687679
!--- local OUT pointers (with no Noah LSM equivalent as defined in WRF):
688-
real(kind=RKIND),dimension(:),pointer:: t2mvxy,t2mbxy,q2mvxy,q2mbxy,tradxy,neexy,gppxy,nppxy,fvegxy,runsfxy, &
689-
runsbxy,ecanxy,edirxy,etranxy,fsaxy,firaxy,aparxy,psnxy,savxy,sagxy, &
690-
rssunxy,rsshaxy,bgapxy,wgapxy,tgvxy,tgbxy,chvxy,chbxy,shgxy,shcxy, &
691-
shbxy,evgxy,evbxy,ghvxy,ghbxy,irgxy,ircxy,irbxy,trxy,evcxy,chleafxy, &
692-
chucxy,chv2xy,chb2xy,rs,qtdrain
680+
real(kind=RKIND),dimension(:),pointer:: t2mvxy,t2mbxy,t2mxy,q2mvxy,q2mbxy,q2mxy,tradxy,neexy,gppxy,nppxy, &
681+
fvegxy,runsfxy,runsbxy,ecanxy,edirxy,etranxy,fsaxy,firaxy,aparxy, &
682+
psnxy,savxy,sagxy,rssunxy,rsshaxy,bgapxy,wgapxy,tgvxy,tgbxy,chvxy, &
683+
chbxy,shgxy,shcxy,shbxy,evgxy,evbxy,ghvxy,ghbxy,irgxy,ircxy,irbxy, &
684+
trxy,evcxy,chleafxy,chucxy,chv2xy,chb2xy,rs,qtdrain
693685

694686

695687
!--- local OUT additional variables:
@@ -865,8 +857,10 @@ subroutine lsm_noahmp_toMPAS(diag_physics,diag_physics_noahmp,output_noahmp,sfc_
865857
! lines 242-290 in module NoahmpIOVarType.F90:
866858
call mpas_pool_get_array(output_noahmp,'t2mvxy' ,t2mvxy )
867859
call mpas_pool_get_array(output_noahmp,'t2mbxy' ,t2mbxy )
860+
call mpas_pool_get_array(output_noahmp,'t2mxy' ,t2mxy )
868861
call mpas_pool_get_array(output_noahmp,'q2mvxy' ,q2mvxy )
869862
call mpas_pool_get_array(output_noahmp,'q2mbxy' ,q2mbxy )
863+
call mpas_pool_get_array(output_noahmp,'q2mxy' ,q2mxy )
870864
call mpas_pool_get_array(output_noahmp,'tradxy' ,tradxy )
871865
call mpas_pool_get_array(output_noahmp,'neexy' ,neexy )
872866
call mpas_pool_get_array(output_noahmp,'gppxy' ,gppxy )
@@ -913,8 +907,10 @@ subroutine lsm_noahmp_toMPAS(diag_physics,diag_physics_noahmp,output_noahmp,sfc_
913907
do i = its,ite
914908
t2mvxy(i) = mpas_noahmp%t2mvxy(i)
915909
t2mbxy(i) = mpas_noahmp%t2mbxy(i)
910+
t2mxy(i) = mpas_noahmp%t2mxy(i)
916911
q2mvxy(i) = mpas_noahmp%q2mvxy(i)
917912
q2mbxy(i) = mpas_noahmp%q2mbxy(i)
913+
q2mxy(i) = mpas_noahmp%q2mxy(i)
918914
tradxy(i) = mpas_noahmp%tradxy(i)
919915
neexy(i) = mpas_noahmp%neexy(i)
920916
gppxy(i) = mpas_noahmp%gppxy(i)

0 commit comments

Comments
 (0)