Skip to content

Commit b1a3e20

Browse files
authored
Adding UGWP orographic drag suite to MPAS (MPAS-Dev#43)
* Added physics_gsl directory * Added progress through March 27 * Added progress through March 29 * Added progress through April 4 * Added progress through April 5 * Added progress through April 15 * Added progress through evening of April 15 * Ver 0 of core_init_atmosphere complete. Need to fix read_geogrid. * Added progress through evening of April 17 * First full working version of core_init_atmos for GSL GWD * Updated description of ls- and ss-ogwd static variables in registries * Added progress through evening of April 30, incl adding physics_wrf/module_bl_ugwp_gwdo.F * Added progress through May 3 * Added progress through May 5 * Rearranged some file * Added progress through mid-day May 7 * Ready for first core_atmosphere compilation * Updated units of UGWP diagnostics in Registry.xml * Small correction to Registry.xml * Replaced some spaces with tabs in Registry.xml * Added progress through afternoon of May 9 * Replaced physics_gsl directory with submodule GSL_gwd_physics * First compilation success * Bugfix in mpas_atmphys_control.F * Modified Registry.xml to make separate ugwp_oro_data static file * Modified Registry.xml files in core_init_atmosphere and core_atmosphere to make and read in separate ugwp_oro_data static file * Changed name of ugwp_oro stream to 'ugwp_oro_data_in' in core_atmosphere/Registry.xml * Added 'xtime' to core_init_atmosphere/Registry.xml for 'ugwp_oro_data' stream * Added time variables to 'diag_ugwp' stream * Added 'ugwp_diags' namelist variable for control of ugwp diagnostic outputs * 2 Makefile bugfixes * Updated GSL_gwd_physics and TEMPO submodules and updated VEGPARM.TBL * Small bugfix in GSL_gwd_physics * Changed name of submodule GSL_gwd_physics to UGWP * Renamed submodule GSL_gwd_physics to UGWP again * Updated readme file in submodule UGWP * Replace zl with new variable za which is the layer height AGL in UGWP * Merged with latest gsl/develop commits (PR's MPAS-Dev#41 and MPAS-Dev#42)
1 parent 09a4fd3 commit b1a3e20

18 files changed

Lines changed: 3193 additions & 100 deletions

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[submodule "src/core_atmosphere/physics/TEMPO"]
22
path = src/core_atmosphere/physics/TEMPO
33
url = https://github.com/NCAR/TEMPO.git
4+
[submodule "src/core_atmosphere/physics/UGWP"]
5+
path = src/core_atmosphere/physics/UGWP
6+
url = https://github.com/mdtoyNOAA/UGWP.git

src/core_atmosphere/Registry.xml

Lines changed: 174 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,8 +1211,64 @@
12111211
<var name="lbc_rho" />
12121212
<var name="lbc_theta" />
12131213
<var_array name="lbc_scalars" />
1214+
</stream>
12141215

1216+
<stream name="ugwp_oro_data_in"
1217+
type="input"
1218+
filename_template="x1.40962.ugwp_oro_data.nc"
1219+
input_interval="initial_only"
1220+
immutable="true">
1221+
1222+
<var name="var2dls"/>
1223+
<var name="conls"/>
1224+
<var name="oa1ls"/>
1225+
<var name="oa2ls"/>
1226+
<var name="oa3ls"/>
1227+
<var name="oa4ls"/>
1228+
<var name="ol1ls"/>
1229+
<var name="ol2ls"/>
1230+
<var name="ol3ls"/>
1231+
<var name="ol4ls"/>
1232+
<var name="var2dss"/>
1233+
<var name="conss"/>
1234+
<var name="oa1ss"/>
1235+
<var name="oa2ss"/>
1236+
<var name="oa3ss"/>
1237+
<var name="oa4ss"/>
1238+
<var name="ol1ss"/>
1239+
<var name="ol2ss"/>
1240+
<var name="ol3ss"/>
1241+
<var name="ol4ss"/>
12151242
</stream>
1243+
1244+
<stream name="diag_ugwp"
1245+
type="output"
1246+
filename_template="diag_ugwp.$Y-$M-$D_$h.$m.$s.nc"
1247+
output_interval="6:00:00"
1248+
runtime_format="separate_file">
1249+
1250+
<var name="initial_time"/>
1251+
<var name="xtime"/>
1252+
<var name="Time"/>
1253+
1254+
<var name="dtaux3d_ls" />
1255+
<var name="dtauy3d_ls" />
1256+
<var name="dtaux3d_bl" />
1257+
<var name="dtauy3d_bl" />
1258+
<var name="dtaux3d_ss" />
1259+
<var name="dtauy3d_ss" />
1260+
<var name="dtaux3d_fd" />
1261+
<var name="dtauy3d_fd" />
1262+
<var name="dusfc_ls"/>
1263+
<var name="dvsfc_ls"/>
1264+
<var name="dusfc_bl"/>
1265+
<var name="dvsfc_bl"/>
1266+
<var name="dusfc_ss"/>
1267+
<var name="dvsfc_ss"/>
1268+
<var name="dusfc_fd"/>
1269+
<var name="dvsfc_fd"/>
1270+
</stream>
1271+
12161272
</streams>
12171273

12181274

@@ -2273,7 +2329,12 @@
22732329
<nml_option name="config_gwdo_scheme" type="character" default_value="suite" in_defaults="false"
22742330
units="-"
22752331
description="configuration of gravity wave drag over orography"
2276-
possible_values="`suite',`bl_ysu_gwdo',`off'"/>
2332+
possible_values="`suite',`bl_ysu_gwdo',`bl_ugwp_gwdo',`off'"/>
2333+
2334+
<nml_option name="config_ugwp_diags" type="logical" default_value="false" in_defaults="false"
2335+
units="-"
2336+
description="logical for outputting ugwp drag suite diagnostic variables"
2337+
possible_values=".true. or .false."/>
22772338

22782339
<nml_option name="config_radt_cld_scheme" type="character" default_value="suite" in_defaults="false"
22792340
units="-"
@@ -3025,12 +3086,60 @@
30253086
<var name="dvsfcg" type="real" dimensions="nCells Time" units="Pa m s^{-1}"
30263087
description="vertically-integrated gravity wave drag over orography v-stress"/>
30273088

3089+
<var name="dusfc_ls" type="real" dimensions="nCells Time" units="Pa"
3090+
description="vertically-integrated mesoscale orog gravity wave drag u-stress"/>
3091+
3092+
<var name="dvsfc_ls" type="real" dimensions="nCells Time" units="Pa"
3093+
description="vertically-integrated mesoscale orog gravity wave drag v-stress"/>
3094+
3095+
<var name="dusfc_bl" type="real" dimensions="nCells Time" units="Pa"
3096+
description="vertically-integrated orog blocking drag u-stress"/>
3097+
3098+
<var name="dvsfc_bl" type="real" dimensions="nCells Time" units="Pa"
3099+
description="vertically-integrated orog blocking drag v-stress"/>
3100+
3101+
<var name="dusfc_ss" type="real" dimensions="nCells Time" units="Pa"
3102+
description="vertically-integrated small-scale orog gravity wave drag u-stress"/>
3103+
3104+
<var name="dvsfc_ss" type="real" dimensions="nCells Time" units="Pa"
3105+
description="vertically-integrated small-scale orog gravity wave drag v-stress"/>
3106+
3107+
<var name="dusfc_fd" type="real" dimensions="nCells Time" units="Pa"
3108+
description="vertically-integrated turb orog form drag u-stress"/>
3109+
3110+
<var name="dvsfc_fd" type="real" dimensions="nCells Time" units="Pa"
3111+
description="vertically-integrated turb orog form drag v-stress"/>
3112+
30283113
<var name="dtaux3d" type="real" dimensions="nVertLevels nCells Time" units="m s^{-1}"
30293114
description="gravity wave drag over orography u-stress"/>
30303115

30313116
<var name="dtauy3d" type="real" dimensions="nVertLevels nCells Time" units="m s^{-1}"
30323117
description="gravity wave drag over orography v-stress"/>
30333118

3119+
<var name="dtaux3d_ls" type="real" dimensions="nVertLevels nCells Time" units="m s^{-2}"
3120+
description="mesoscale orog gravity wave drag u-tendency"/>
3121+
3122+
<var name="dtauy3d_ls" type="real" dimensions="nVertLevels nCells Time" units="m s^{-2}"
3123+
description="mesoscale orog gravity wave drag v-tendency"/>
3124+
3125+
<var name="dtaux3d_bl" type="real" dimensions="nVertLevels nCells Time" units="m s^{-2}"
3126+
description="orog blocking drag u-tendency"/>
3127+
3128+
<var name="dtauy3d_bl" type="real" dimensions="nVertLevels nCells Time" units="m s^{-2}"
3129+
description="orog blocking drag v-tendency"/>
3130+
3131+
<var name="dtaux3d_ss" type="real" dimensions="nVertLevels nCells Time" units="m s^{-2}"
3132+
description="small-scale orog gravity wave drag u-tendency"/>
3133+
3134+
<var name="dtauy3d_ss" type="real" dimensions="nVertLevels nCells Time" units="m s^{-2}"
3135+
description="small-scale orog gravity wave drag v-tendency"/>
3136+
3137+
<var name="dtaux3d_fd" type="real" dimensions="nVertLevels nCells Time" units="m s^{-2}"
3138+
description="turb orog form drag u-tendency"/>
3139+
3140+
<var name="dtauy3d_fd" type="real" dimensions="nVertLevels nCells Time" units="m s^{-2}"
3141+
description="turb orog form drag v-tendency"/>
3142+
30343143
<var name="rubldiff" type="real" dimensions="nVertLevels nCells Time" units="m s^{-2}"
30353144
description="change in PBL zonal wind tendency due to gravity wave drag over orography"/>
30363145

@@ -3725,11 +3834,74 @@
37253834
<var name="ol2" type="real" dimensions="nCells" units="unitless"
37263835
description="effective orographic length for southerly flow"/>
37273836

3728-
<var name="ol3" type="real" dimensions="nCells" units="unitles"
3837+
<var name="ol3" type="real" dimensions="nCells" units="unitless"
37293838
description="effective orographic length for south-westerly flow"/>
37303839

37313840
<var name="ol4" type="real" dimensions="nCells" units="unitless"
37323841
description="effective orographic length for north-westerly flow"/>
3842+
3843+
<!-- GSL GWDO fields - meso-scale -->
3844+
<var name="var2dls" type="real" dimensions="nCells" units="m"
3845+
description="standard deviation of subgrid-scale orography (meso-scale GWD)"/>
3846+
3847+
<var name="conls" type="real" dimensions="nCells" units="unitless"
3848+
description="orographic convexity (meso-scale GWD)"/>
3849+
3850+
<var name="oa1ls" type="real" dimensions="nCells" units="unitless"
3851+
description="asymmetry of subgrid-scale orography for westerly flow (meso-scale GWD)"/>
3852+
3853+
<var name="oa2ls" type="real" dimensions="nCells" units="unitless"
3854+
description="asymmetry of subgrid-scale orography for southerly flow (meso-scale GWD)"/>
3855+
3856+
<var name="oa3ls" type="real" dimensions="nCells" units="unitless"
3857+
description="asymmetry of subgrid-scale orography for south-westerly flow (meso-scale GWD)"/>
3858+
3859+
<var name="oa4ls" type="real" dimensions="nCells" units="unitless"
3860+
description="asymmetry of subgrid-scale orography for north-westerly flow (meso-scale GWD)"/>
3861+
3862+
<var name="ol1ls" type="real" dimensions="nCells" units="unitless"
3863+
description="effective orographic length for westerly flow (meso-scale GWD)"/>
3864+
3865+
<var name="ol2ls" type="real" dimensions="nCells" units="unitless"
3866+
description="effective orographic length for southerly flow (meso-scale GWD)"/>
3867+
3868+
<var name="ol3ls" type="real" dimensions="nCells" units="unitless"
3869+
description="effective orographic length for south-westerly flow (meso-scale GWD)"/>
3870+
3871+
<var name="ol4ls" type="real" dimensions="nCells" units="unitless"
3872+
description="effective orographic length for north-westerly flow (meso-scale GWD)"/>
3873+
3874+
<!-- GSL GWDO fields - small-scale -->
3875+
<var name="var2dss" type="real" dimensions="nCells" units="m"
3876+
description="standard deviation of subgrid-scale orography (small-scale GWD)"/>
3877+
3878+
<var name="conss" type="real" dimensions="nCells" units="unitless"
3879+
description="orographic convexity (small-scale GWD)"/>
3880+
3881+
<var name="oa1ss" type="real" dimensions="nCells" units="unitless"
3882+
description="asymmetry of subgrid-scale orography for westerly flow (small-scale GWD)"/>
3883+
3884+
<var name="oa2ss" type="real" dimensions="nCells" units="unitless"
3885+
description="asymmetry of subgrid-scale orography for southerly flow (small-scale GWD)"/>
3886+
3887+
<var name="oa3ss" type="real" dimensions="nCells" units="unitless"
3888+
description="asymmetry of subgrid-scale orography for south-westerly flow (small-scale GWD)"/>
3889+
3890+
<var name="oa4ss" type="real" dimensions="nCells" units="unitless"
3891+
description="asymmetry of subgrid-scale orography for north-westerly flow (small-scale GWD)"/>
3892+
3893+
<var name="ol1ss" type="real" dimensions="nCells" units="unitless"
3894+
description="effective orographic length for westerly flow (small-scale GWD)"/>
3895+
3896+
<var name="ol2ss" type="real" dimensions="nCells" units="unitless"
3897+
description="effective orographic length for southerly flow (small-scale GWD)"/>
3898+
3899+
<var name="ol3ss" type="real" dimensions="nCells" units="unitless"
3900+
description="effective orographic length for south-westerly flow (small-scale GWD)"/>
3901+
3902+
<var name="ol4ss" type="real" dimensions="nCells" units="unitless"
3903+
description="effective orographic length for north-westerly flow (small-scale GWD)"/>
3904+
37333905
</var_struct>
37343906
#endif
37353907

src/core_atmosphere/physics/Makefile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ifeq ($(CORE),atmosphere)
44
COREDEF = -Dmpas
55
endif
66

7-
all: lookup_tables core_physics_init core_physics_mmm core_microphysics core_physics_wrf core_physics
7+
all: lookup_tables core_physics_init core_physics_mmm core_microphysics core_UGWP core_physics_wrf core_physics
88

99
dummy:
1010
echo "****** compiling physics ******"
@@ -59,7 +59,10 @@ core_microphysics: core_physics_init core_physics_mmm
5959
(if [ -f physics_wrf/module_mp_thompson.F ]; then rm physics_wrf/module_mp_thompson.F; else echo "No old module_mp_thompson.F file found"; fi)
6060
(cd TEMPO; cp ./drivers/mpas/module_mp_thompson.F90 .; $(MAKE) all COREDEF="$(COREDEF)")
6161

62-
core_physics_wrf: core_physics_init core_physics_mmm
62+
core_UGWP: core_physics_init
63+
(cd UGWP; $(MAKE) all)
64+
65+
core_physics_wrf: core_physics_init core_physics_mmm core_UGWP
6366
(cd physics_wrf; $(MAKE) all COREDEF="$(COREDEF)")
6467

6568
core_physics_init: $(OBJS_init)
@@ -221,6 +224,7 @@ clean:
221224
( cd physics_wrf; $(MAKE) clean )
222225
( cd physics_mmm; $(MAKE) clean )
223226
( cd TEMPO; $(MAKE) clean )
227+
( cd UGWP; $(MAKE) clean )
224228
@# Certain systems with intel compilers generate *.i files
225229
@# This removes them during the clean process
226230
$(RM) *.i
@@ -229,16 +233,16 @@ clean:
229233
$(RM) $@ $*.mod
230234
ifeq "$(GEN_F90)" "true"
231235
$(CPP) $(CPPFLAGS) $(COREDEF) $(HYDROSTATIC) $(CPPINCLUDES) $< > $*.f90
232-
$(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I./physics_mmm -I./physics_wrf -I./TEMPO -I.. -I../../framework -I../../external/esmf_time_f90
236+
$(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I./physics_mmm -I./physics_wrf -I./TEMPO -I./UGWP -I.. -I../../framework -I../../external/esmf_time_f90
233237
else
234-
$(FC) $(CPPFLAGS) $(COREDEF) $(HYDROSATIC) $(FFLAGS) -c $*.F $(CPPINCLUDES) $(FCINCLUDES) -I./physics_mmm -I./physics_wrf -I./TEMPO -I.. -I../../framework -I../../external/esmf_time_f90
238+
$(FC) $(CPPFLAGS) $(COREDEF) $(HYDROSATIC) $(FFLAGS) -c $*.F $(CPPINCLUDES) $(FCINCLUDES) -I./physics_mmm -I./physics_wrf -I./TEMPO -I./UGWP -I.. -I../../framework -I../../external/esmf_time_f90
235239
endif
236240

237241
.F90.o:
238242
$(RM) $@ $*.mod
239243
ifeq "$(GEN_F90)" "true"
240244
$(CPP) $(CPPFLAGS) $(COREDEF) $(HYDROSTATIC) $(CPPINCLUDES) $< > $*.f90
241-
$(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I./physics_mmm -I./physics_wrf -I./TEMPO -I.. -I../../framework -I../../external/esmf_time_f90
245+
$(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I./physics_mmm -I./physics_wrf -I./TEMPO -I./UGWP -I.. -I../../framework -I../../external/esmf_time_f90
242246
else
243-
$(FC) $(CPPFLAGS) $(COREDEF) $(HYDROSATIC) $(FFLAGS) -c $*.F90 $(CPPINCLUDES) $(FCINCLUDES) -I./physics_mmm -I./physics_wrf -I./TEMPO -I.. -I../../framework -I../../external/esmf_time_f90
247+
$(FC) $(CPPFLAGS) $(COREDEF) $(HYDROSATIC) $(FFLAGS) -c $*.F90 $(CPPINCLUDES) $(FCINCLUDES) -I./physics_mmm -I./physics_wrf -I./TEMPO -I./UGWP -I.. -I../../framework -I../../external/esmf_time_f90
244248
endif

src/core_atmosphere/physics/UGWP

Submodule UGWP added at c503ef6

src/core_atmosphere/physics/mpas_atmphys_control.F

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ subroutine physics_namelist_check(configs)
205205

206206
!gravity wave drag over orography scheme:
207207
if(.not. (config_gwdo_scheme .eq. 'off' .or. &
208-
config_gwdo_scheme .eq. 'bl_ysu_gwdo')) then
208+
config_gwdo_scheme .eq. 'bl_ysu_gwdo' .or. &
209+
config_gwdo_scheme .eq. 'bl_ugwp_gwdo')) then
209210

210211
write(mpas_err_message,'(A,A10)') 'illegal value for gwdo_scheme: ', &
211212
trim(config_gwdo_scheme)

src/core_atmosphere/physics/mpas_atmphys_driver.F

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,14 +305,14 @@ subroutine physics_driver(domain,itimestep,xtime_s)
305305

306306
!call to gravity wave drag over orography scheme:
307307
if(config_gwdo_scheme .ne. 'off') then
308-
call allocate_gwdo
308+
call allocate_gwdo(block%configs)
309309
!$OMP PARALLEL DO
310310
do thread=1,nThreads
311311
call driver_gwdo(itimestep,block%configs,mesh,sfc_input,diag_physics,tend_physics, &
312312
cellSolveThreadStart(thread),cellSolveThreadEnd(thread))
313313
end do
314314
!$OMP END PARALLEL DO
315-
call deallocate_gwdo
315+
call deallocate_gwdo(block%configs)
316316
endif
317317

318318
!call to convection scheme:

0 commit comments

Comments
 (0)