Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,11 @@ intel-mpi: # BUILDTARGET Intel compiler suite with Intel MPI library
"CC_SERIAL = icc" \
"CXX_SERIAL = icpc" \
"FFLAGS_PROMOTION = -real-size 64" \
"FFLAGS_OPT = -O3 -convert big_endian -free -align array64byte" \
"CFLAGS_OPT = -O3" \
"CXXFLAGS_OPT = -O3" \
"FFLAGS_OPT = -O3 -xBROADWELL -fma -fp-model precise -traceback -no-wrap-margin -convert big_endian -free -align array64byte" \
"CFLAGS_OPT = -O3 -xBROADWELL -fma -fp-model precise -traceback" \
"CXXFLAGS_OPT = -O3 -xBROADWELL -fma -fp-model precise -traceback" \
"LDFLAGS_OPT = -O3" \
"FFLAGS_DEBUG = -g -convert big_endian -free -CU -CB -check all -fpe0 -traceback" \
"FFLAGS_DEBUG = -g -convert big_endian -free -CU -CB -check all -fpe0 -traceback -no-wrap-margin" \
"CFLAGS_DEBUG = -g -traceback" \
"CXXFLAGS_DEBUG = -g -traceback" \
"LDFLAGS_DEBUG = -g -fpe0 -traceback" \
Expand Down Expand Up @@ -660,7 +660,7 @@ ifneq "$(LAPACK)" ""
endif

RM = rm -f
CPP = cpp -P -traditional
CPP = ${CXX_SERIAL} -E # Modified for use with the Intel C++ compiler
RANLIB = ranlib

ifdef CORE
Expand Down Expand Up @@ -875,7 +875,7 @@ ifeq "$(findstring clean, $(MAKECMDGOALS))" "clean" # CHECK FOR CLEAN TARGET
override AUTOCLEAN=false
endif # END OF CLEAN TARGET CHECK

VER=$(shell git describe --dirty 2> /dev/null)
VER="v7.3.develop.EPA_FDDA" # Hard-coded specific version identifier
#override CPPFLAGS += -DMPAS_GIT_VERSION=$(VER)

ifeq "$(findstring v, $(VER))" "v"
Expand Down
156 changes: 156 additions & 0 deletions src/core_atmosphere/Registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,23 @@
<var name="rniblten"/>
<var name="rthratensw"/>
<var name="rthratenlw"/>
<<<<<<< atmosphere/develop-EPA_FDDA
<var name="rthfddaten"/>
<var name="rqvfddaten"/>
<var name="rufddaten"/>
<var name="rvfddaten"/>
<var name="th_fdda_old"/>
<var name="qv_fdda_old"/>
<var name="u_fdda_old"/>
<var name="v_fdda_old"/>
<var name="th_fdda_new"/>
<var name="qv_fdda_new"/>
<var name="u_fdda_new"/>
<var name="v_fdda_new"/>
<var name="pin"/>
<var name="ozmixm"/>
=======
>>>>>>> develop
<var name="isltyp"/>
<var name="ivgtyp"/>
<var name="mminlu"/>
Expand Down Expand Up @@ -1097,6 +1114,18 @@
#endif
</stream>

<stream name="fdda"
type="input"
filename_template="x1.40962.fdda.nc"
input_interval="6:00:00"
immutable="true">

<var name="qv_fdda_new"/>
<var name="th_fdda_new"/>
<var name="u_fdda_new"/>
<var name="v_fdda_new"/>
</stream>

<stream name="iau"
type="input"
filename_template="x1.40962.AmB.$Y-$M-$D_$h.$m.$s.nc"
Expand Down Expand Up @@ -1519,6 +1548,34 @@
#endif
</var_struct>

<var_struct name="fdda" time_levs="1">

<var name="qv_fdda_new" type="real" dimensions="nVertLevels nCells Time" units="kg kg^{-1}"
description="new water vapor mixing ratio for FDDA grid nudging"/>

<var name="th_fdda_new" type="real" dimensions="nVertLevels nCells Time" units="K"
description="new potential temperature for FDDA grid nudging"/>

<var name="u_fdda_new" type="real" dimensions="nVertLevels nCells Time" units="m s^{-1}"
description="new zonal wind component for FDDA grid nudging"/>

<var name="v_fdda_new" type="real" dimensions="nVertLevels nCells Time" units="m s^{-1}"
description="new meridional wind component for FDDA grid nudging"/>

<var name="qv_fdda_old" type="real" dimensions="nVertLevels nCells Time" units="kg kg^{-1}"
description="old water vapor mixing ratio for FDDA grid nudging"/>

<var name="th_fdda_old" type="real" dimensions="nVertLevels nCells Time" units="K"
description="old potential temperature for FDDA grid nudging"/>

<var name="u_fdda_old" type="real" dimensions="nVertLevels nCells Time" units="m s^{-1}"
description="old zonal wind component for FDDA grid nudging"/>

<var name="v_fdda_old" type="real" dimensions="nVertLevels nCells Time" units="m s^{-1}"
description="old meridional wind component for FDDA grid nudging"/>

</var_struct>

<var_struct name="diag" time_levs="1">

<!-- coefficients for the vertical tridiagonal solve -->
Expand Down Expand Up @@ -2066,6 +2123,86 @@
description="threshold above which the accumulated grid-scale precipitation is reset"
possible_values="Positive real values"/>

<nml_option name="config_fdda_scheme" type="character" default_value="suite" in_defaults="false"
units="-"
description="configuration for four-dimensional data assimilation"
possible_values="`suite',`analysis',`scaled',`off'"/>

<nml_option name="config_fdda_int" type="real" default_value="21600." in_defaults="false"
units="s"
description="nudging time interval"
possible_values="Positive real values"/>

<nml_option name="config_fdda_scale_min" type="real" default_value="0." in_defaults="false"
units="-"
description="nudging scale factor minimum"
possible_values="Positive real values"/>

<nml_option name="config_fdda_scale_max" type="real" default_value="100000." in_defaults="false"
units="-"
description="nudging scale factor maximum"
possible_values="Positive real values"/>

<nml_option name="config_fdda_t" type="logical" default_value="false" in_defaults="false"
units="-"
description="whether to enable temperature nudging"
possible_values=".true. or .false."/>

<nml_option name="config_fdda_t_coef" type="real" default_value="3.0e-4" in_defaults="false"
units="s^{-1}"
description="nudging coefficient for temperature"
possible_values="Positive real values"/>

<nml_option name="config_fdda_t_in_pbl" type="logical" default_value="true" in_defaults="false"
units="-"
description="whether to enable temperature nudging within the PBL"
possible_values=".true. or .false."/>

<nml_option name="config_fdda_t_min_layer" type="integer" default_value="0" in_defaults="false"
units="-"
description="model level above which nudging is enabled for temperature"
possible_values="Positive integers"/>

<nml_option name="config_fdda_q" type="logical" default_value="false" in_defaults="false"
units="-"
description="whether to enable water vapor nudging"
possible_values=".true. or .false."/>

<nml_option name="config_fdda_q_coef" type="real" default_value="3.0e-4" in_defaults="false"
units="s^{-1}"
description="nudging coefficient for water vapor"
possible_values="Positive real values"/>

<nml_option name="config_fdda_q_in_pbl" type="logical" default_value="true" in_defaults="false"
units="-"
description="whether to enable water vapor nudging within the PBL"
possible_values=".true. or .false."/>

<nml_option name="config_fdda_q_min_layer" type="integer" default_value="0" in_defaults="false"
units="-"
description="model level above which nudging is enabled for water vapor"
possible_values="Positive integers"/>

<nml_option name="config_fdda_uv" type="logical" default_value="false" in_defaults="false"
units="-"
description="whether to enable u and v nudging"
possible_values=".true. or .false."/>

<nml_option name="config_fdda_uv_coef" type="real" default_value="3.0e-4" in_defaults="false"
units="s^{-1}"
description="nudging coefficient for u and v"
possible_values="Positive real values"/>

<nml_option name="config_fdda_uv_in_pbl" type="logical" default_value="true" in_defaults="false"
units="-"
description="whether to enable u and v nudging within the PBL"
possible_values=".true. or .false."/>

<nml_option name="config_fdda_uv_min_layer" type="integer" default_value="0" in_defaults="false"
units="-"
description="model level above which nudging is enabled for u and v"
possible_values="Positive integers"/>

<nml_option name="config_oml1d" type="logical" default_value="false" in_defaults="false"
units="-"
description="Whether to activate the 1-d ocean mixed-layer model"
Expand Down Expand Up @@ -2907,6 +3044,25 @@
persistence="scratch" />

#ifdef DO_PHYSICS
<!-- ================================================================================================== -->
<!-- TENDENCIES FROM FOUR DIMENSIONAL DATA ASSIMILATION: -->
<!-- ================================================================================================== -->

<var name="rthfddaten" type="real" dimensions="nVertLevels nCells Time" units="K s^{-1}"
description="tendency of potential temperature due to FDDA"/>

<var name="rqvfddaten" type="real" dimensions="nVertLevels nCells Time" units="kg kg^{-1} s^{-1}"
description="tendency of water vapor mixing ratio due to FDDA"/>

<var name="rufddaten" type="real" dimensions="nVertLevels nCells Time" units="m s^{-1}"
description="tendency of zonal wind component due to FDDA"/>

<var name="rvfddaten" type="real" dimensions="nVertLevels nCells Time" units="m s^{-1}"
description="tendency of meridional wind component due to FDDA"/>

<var name="rufddaten_Edge" type="real" dimensions="nVertLevels nEdges Time"/>


<!-- ================================================================================================== -->
<!-- TENDENCIES FROM PARAMETERIZATION OF CONVECTION: -->
<!-- ================================================================================================== -->
Expand Down
7 changes: 7 additions & 0 deletions src/core_atmosphere/physics/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ OBJS = \
mpas_atmphys_driver.o \
mpas_atmphys_driver_cloudiness.o \
mpas_atmphys_driver_convection.o \
mpas_atmphys_fdda.o \
mpas_atmphys_driver_gwdo.o \
mpas_atmphys_driver_lsm.o \
mpas_atmphys_driver_microphysics.o \
Expand Down Expand Up @@ -72,6 +73,7 @@ mpas_atmphys_control.o: \
mpas_atmphys_driver.o: \
mpas_atmphys_driver_cloudiness.o \
mpas_atmphys_driver_convection.o \
mpas_atmphys_fdda.o \
mpas_atmphys_driver_gwdo.o \
mpas_atmphys_driver_lsm.o \
mpas_atmphys_driver_pbl.o \
Expand All @@ -93,6 +95,11 @@ mpas_atmphys_driver_convection.o: \
mpas_atmphys_utilities.o \
mpas_atmphys_vars.o

mpas_atmphys_fdda.o: \
mpas_atmphys_constants.o \
mpas_atmphys_utilities.o \
mpas_atmphys_vars.o

mpas_atmphys_driver_gwdo.o: \
mpas_atmphys_vars.o

Expand Down
21 changes: 20 additions & 1 deletion src/core_atmosphere/physics/mpas_atmphys_control.F
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ module mpas_atmphys_control
! Laura D. Fowler (laura@ucar.edu) / 2014-09-18.
! * renamed "wsm6" to "mp_wsm6" and "kessler" to "mp_kessler".
! Laura D. Fowler (laura@ucar.edu) / 2016-03-09.
! * added four-dimensional data assimilation scheme (based on WRF FDDA scheme).
! O. Russell Bullock Jr. (bullock.russell@epa.gov) / 2016-03-21.
! * renamed "kain_fritsch" to "cu_kain_fritsch" and "tiedtke" to "cu_tiedtke".
! Laura D. Fowler (laura@ucar.edu) / 2016-03-22.
! * renamed "ysu" to "bl_ysu", "ysu_gwdo" to "bl_gwdo_ysu", and "monin_obukhov" to "sf_monin_obukhov".
Expand Down Expand Up @@ -94,7 +96,8 @@ subroutine physics_namelist_check(configs)
config_radt_cld_scheme, &
config_radt_lw_scheme, &
config_radt_sw_scheme, &
config_sfclayer_scheme
config_sfclayer_scheme, &
config_fdda_scheme

!-----------------------------------------------------------------------------------------------------------------
!call mpas_log_write('')
Expand All @@ -110,6 +113,7 @@ subroutine physics_namelist_check(configs)
call mpas_pool_get_config(configs,'config_radt_lw_scheme' ,config_radt_lw_scheme )
call mpas_pool_get_config(configs,'config_radt_sw_scheme' ,config_radt_sw_scheme )
call mpas_pool_get_config(configs,'config_sfclayer_scheme' ,config_sfclayer_scheme )
call mpas_pool_get_config(configs,'config_fdda_scheme' ,config_fdda_scheme )

call mpas_log_write('')
call mpas_log_write('----- Setting up physics suite '''//trim(config_physics_suite)//''' -----')
Expand All @@ -128,6 +132,7 @@ subroutine physics_namelist_check(configs)
if (trim(config_radt_cld_scheme) == 'suite') config_radt_cld_scheme = 'cld_fraction'
if (trim(config_sfclayer_scheme) == 'suite') config_sfclayer_scheme = 'sf_monin_obukhov'
if (trim(config_lsm_scheme) == 'suite') config_lsm_scheme = 'noah'
if (trim(config_fdda_scheme) == 'suite') config_fdda_scheme = 'off'

else if (trim(config_physics_suite) == 'convection_permitting') then

Expand All @@ -140,6 +145,7 @@ subroutine physics_namelist_check(configs)
if (trim(config_radt_cld_scheme) == 'suite') config_radt_cld_scheme = 'cld_fraction'
if (trim(config_sfclayer_scheme) == 'suite') config_sfclayer_scheme = 'sf_mynn'
if (trim(config_lsm_scheme) == 'suite') config_lsm_scheme = 'noah'
if (trim(config_fdda_scheme) == 'suite') config_fdda_scheme = 'off'

else if (trim(config_physics_suite) == 'none') then

Expand All @@ -152,6 +158,7 @@ subroutine physics_namelist_check(configs)
if (trim(config_radt_cld_scheme) == 'suite') config_radt_cld_scheme = 'off'
if (trim(config_sfclayer_scheme) == 'suite') config_sfclayer_scheme = 'off'
if (trim(config_lsm_scheme) == 'suite') config_lsm_scheme = 'off'
if (trim(config_fdda_scheme) == 'suite') config_fdda_scheme = 'off'

else

Expand All @@ -161,6 +168,17 @@ subroutine physics_namelist_check(configs)

end if

!fdda scheme:
if(.not. (config_fdda_scheme .eq. 'off' .or. &
config_fdda_scheme .eq. 'analysis' .or. &
config_fdda_scheme .eq. 'scaled' )) then

write(mpas_err_message,'(A,A10)') 'illegal value for config_fdda_scheme:', &
trim(config_fdda_scheme)
call physics_error_fatal(mpas_err_message)

endif

!cloud microphysics scheme:
if(.not. (config_microp_scheme .eq. 'off' .or. &
config_microp_scheme .eq. 'mp_kessler' .or. &
Expand Down Expand Up @@ -307,6 +325,7 @@ subroutine physics_namelist_check(configs)
call mpas_log_write(' config_radt_sw_scheme = '//trim(config_radt_sw_scheme))
call mpas_log_write(' config_sfclayer_scheme = '//trim(config_sfclayer_scheme))
call mpas_log_write(' config_lsm_scheme = '//trim(config_lsm_scheme))
call mpas_log_write(' config_fdda_scheme = '//trim(config_fdda_scheme))
call mpas_log_write('')

end subroutine physics_namelist_check
Expand Down
Loading