diff --git a/CMakeLists.txt b/CMakeLists.txt index 986b5fd2f..03ec1411a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,6 +60,10 @@ set_target_properties(fv3atm PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT target_include_directories(fv3atm INTERFACE $ $) +if(MULTI_GASES) + list(APPEND _fv3atm_defs_private MULTI_GASES) +endif() + target_link_libraries(fv3atm PUBLIC fv3 fv3ccpp stochastic_physics diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index 02c3bac34..8a3a75903 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit 02c3bac346792e9e974b55f256465138a9f69d8e +Subproject commit 8a3a75903de68ae15527f116087ff2020e86d717 diff --git a/ccpp/CMakeLists.txt b/ccpp/CMakeLists.txt index eda2180d7..3ebc40edc 100644 --- a/ccpp/CMakeLists.txt +++ b/ccpp/CMakeLists.txt @@ -89,6 +89,9 @@ if(MULTI_GASES) add_definitions(-DMULTI_GASES) endif() +if(IDEA_PHYS) + add_definitions(-DIDEA_PHYS) +endif() #------------------------------------------------------------------------------ # Build CCPP framework and physics diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index 242834936..c7a76e39e 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -1,4 +1,3 @@ -#undef MULTI_GASES module GFS_typedefs @@ -2185,10 +2184,10 @@ module GFS_typedefs type(ty_source_func_lw) :: sources !< RRTMGP DDT !-- GSL drag suite - real (kind=kind_phys), pointer :: varss(:) => null() !< - real (kind=kind_phys), pointer :: ocss(:) => null() !< - real (kind=kind_phys), pointer :: oa4ss(:,:) => null() !< - real (kind=kind_phys), pointer :: clxss(:,:) => null() !< + real (kind=kind_phys), pointer :: varss(:) => null() !< + real (kind=kind_phys), pointer :: ocss(:) => null() !< + real (kind=kind_phys), pointer :: oa4ss(:,:) => null() !< + real (kind=kind_phys), pointer :: clxss(:,:) => null() !< !-- 3D diagnostics integer :: rtg_ozone_index, rtg_tke_index @@ -3572,7 +3571,14 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- coupling parameters cplflx, cplice, cplocn2atm, cplwav, cplwav2atm, cplchm, & cpl_imp_mrg, cpl_imp_dbg, & - use_cice_alb, lsidea, & + use_cice_alb, & +#ifdef IDEA_PHYS + lsidea, weimer_model, f107_kp_size, f107_kp_interval, & + f107_kp_skip_size, f107_kp_data_size, f107_kp_read_in_start, & + ipe_to_wam_coupling, & +#else + lsidea, & +#endif !--- radiation parameters fhswr, fhlwr, levr, nfxr, iaerclm, iflip, isol, ico2, ialb, & isot, iems, iaer, icliq_sw, iovr, ictm, isubc_sw, & @@ -3872,6 +3878,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & print *,' LSIDEA is active but needs to be reworked for FV3 - shutting down' stop endif +#ifdef IDEA_PHYS +!--- integrated dynamics through earth's atmosphere + Model%weimer_model = weimer_model +#endif !--- calendars and time parameters and activation triggers Model%dtp = dt_phys @@ -4472,11 +4482,13 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%tracer_names(:) = tracer_names(:) Model%ntqv = 1 #ifdef MULTI_GASES - Model%nto = get_tracer_index(Model%tracer_names, 'spfo', Model%me, Model%master, Model%debug) - Model%nto2 = get_tracer_index(Model%tracer_names, 'spfo2', Model%me, Model%master, Model%debug) - Model%ntoz = get_tracer_index(Model%tracer_names, 'spfo3', Model%me, Model%master, Model%debug) + Model%nto = get_tracer_index(Model%tracer_names, 'spo', Model%me, Model%master, Model%debug) + Model%nto2 = get_tracer_index(Model%tracer_names, 'spo2', Model%me, Model%master, Model%debug) + Model%ntoz = get_tracer_index(Model%tracer_names, 'spo3', Model%me, Model%master, Model%debug) #else Model%ntoz = get_tracer_index(Model%tracer_names, 'o3mr', Model%me, Model%master, Model%debug) + if( Model%ntoz <= 0 ) & + Model%ntoz = get_tracer_index(Model%tracer_names, 'spo3', Model%me, Model%master, Model%debug) #endif Model%ntcw = get_tracer_index(Model%tracer_names, 'liq_wat', Model%me, Model%master, Model%debug) Model%ntiw = get_tracer_index(Model%tracer_names, 'ice_wat', Model%me, Model%master, Model%debug) @@ -5482,7 +5494,6 @@ subroutine control_print(Model) print *, ' cpl_imp_mrg : ', Model%cpl_imp_mrg print *, ' cpl_imp_dbg : ', Model%cpl_imp_dbg print *, ' ' - print *, 'integrated dynamics through earth atmosphere' print *, ' lsidea : ', Model%lsidea print *, ' ' print *, 'calendars and time parameters and activation triggers' diff --git a/ccpp/physics b/ccpp/physics index 7d7b3bcc4..4da495062 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 7d7b3bcc4b8009ef3491bd230b31bf5af5910bb5 +Subproject commit 4da4950625c4e6bf7cb938070c94fc4032985827 diff --git a/ccpp/suites/suite_FV3_GFS_2017_fv3wam.xml b/ccpp/suites/suite_FV3_GFS_v16_fv3wam.xml similarity index 93% rename from ccpp/suites/suite_FV3_GFS_2017_fv3wam.xml rename to ccpp/suites/suite_FV3_GFS_v16_fv3wam.xml index 7769613a2..b3de0328d 100644 --- a/ccpp/suites/suite_FV3_GFS_2017_fv3wam.xml +++ b/ccpp/suites/suite_FV3_GFS_v16_fv3wam.xml @@ -1,6 +1,6 @@ - + @@ -52,14 +52,15 @@ sfc_diag_post GFS_surface_generic_post GFS_PBL_generic_pre - hedmf + satmedmfvdifq GFS_PBL_generic_post GFS_GWD_generic_pre cires_ugwp cires_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - ozphys + ozphys_2015 + h2ophys get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre @@ -71,17 +72,17 @@ GFS_suite_interstitial_4 cnvc90 GFS_MP_generic_pre - zhaocarr_gscond - zhaocarr_precpd + gfdl_cloud_microphys GFS_MP_generic_post maximum_hourly_diagnostics - phys_tend GFS_stochastics + phys_tend + diff --git a/io/FV3GFS_io.F90 b/io/FV3GFS_io.F90 index f0f82d264..6dfe29a46 100644 --- a/io/FV3GFS_io.F90 +++ b/io/FV3GFS_io.F90 @@ -2831,7 +2831,11 @@ subroutine fv3gfs_diag_output(time, diag, atm_block, nx, ny, levs, ntcw, ntoz, & used=send_data(Diag(idx)%id, var3, Time, is_in=is_in, js_in=js_in, ks_in=1) endif !--- ozone mixing ration tendency +#ifdef MULTI_GASES + if (trim(Diag(idx)%name) == 'dspo3_dt') then +#else if (trim(Diag(idx)%name) == 'do3mr_dt') then +#endif var3(1:nx,1:ny,1:levs) = RESHAPE(Statein%qgrs(1:ngptc,levs:1:-1,ntoz:ntoz), (/nx,ny,levs/)) var3(1:nx,1:ny,1:levs) = (RESHAPE(Stateout%gq0(1:ngptc,levs:1:-1,ntoz:ntoz), (/nx,ny,levs/)) & - var3(1:nx,1:ny,1:levs))*rdt diff --git a/io/post_gfs.F90 b/io/post_gfs.F90 index 105172a86..9cca1521b 100644 --- a/io/post_gfs.F90 +++ b/io/post_gfs.F90 @@ -2172,7 +2172,11 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & endif ! model level ozone mixing ratio +#ifdef MULTI_GASES + if(trim(fieldname)=='spo3') then +#else if(trim(fieldname)=='o3mr') then +#endif !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,o3,arrayr43d) do l=1,lm do j=jsta,jend