From a9364591091c836984a40107729720705847c195 Mon Sep 17 00:00:00 2001 From: Daniel Rosen Date: Tue, 17 Sep 2024 08:51:53 -0600 Subject: [PATCH 01/10] Add two way fire coupling to fv3atm (#815) * add fire_behavior smoke coupling and flags and export variables for fire behavior * added: inst_pres_levels, inst_geop_levels, inst_zonal_wind_levels, inst_merid_wind_levels, inst_surface_roughness, inst_temp_height2m, inst_spec_humid_height2m, inst_pres_height_surface, mean_prec_rate, inst_rainfall_amount * add fire behavior tendencies to physics * add hflx_fire and evap_fire to FV3 imports * added surface emissions fire_smoke imports and initialized the variables and fsmoke tracer index --------- Co-authored-by: masih Co-authored-by: Grant Firl --- atmos_model.F90 | 75 +++++++++++++++++++++++++++++++++ ccpp/data/GFS_typedefs.F90 | 35 ++++++++++++--- ccpp/data/GFS_typedefs.meta | 46 +++++++++++++++++--- ccpp/driver/GFS_diagnostics.F90 | 13 ++++++ ccpp/physics | 2 +- cpl/module_cplfields.F90 | 12 ++++-- 6 files changed, 168 insertions(+), 15 deletions(-) diff --git a/atmos_model.F90 b/atmos_model.F90 index 6938ee4ce..5525b5b58 100644 --- a/atmos_model.F90 +++ b/atmos_model.F90 @@ -3121,6 +3121,54 @@ subroutine assign_importdata(jdat, rc) endif endif + fldname = 'hflx_fire' + if (trim(impfield_name) == trim(fldname)) then + findex = queryImportFields(fldname) + if (importFieldsValid(findex)) then +!$omp parallel do default(shared) private(i,j,nb,ix) + do j=jsc,jec + do i=isc,iec + nb = Atm_block%blkno(i,j) + ix = Atm_block%ixp(i,j) + im = GFS_control%chunk_begin(nb)+ix-1 + GFS_sfcprop%hflx_fire(im) = datar82d(i-isc+1,j-jsc+1) + enddo + enddo + endif + endif + + fldname = 'evap_fire' + if (trim(impfield_name) == trim(fldname)) then + findex = queryImportFields(fldname) + if (importFieldsValid(findex)) then +!$omp parallel do default(shared) private(i,j,nb,ix) + do j=jsc,jec + do i=isc,iec + nb = Atm_block%blkno(i,j) + ix = Atm_block%ixp(i,j) + im = GFS_control%chunk_begin(nb)+ix-1 + GFS_sfcprop%evap_fire(im) = datar82d(i-isc+1,j-jsc+1) + enddo + enddo + endif + endif + + fldname = 'smoke_fire' + if (trim(impfield_name) == trim(fldname)) then + findex = queryImportFields(fldname) + if (importFieldsValid(findex)) then +!$omp parallel do default(shared) private(i,j,nb,ix) + do j=jsc,jec + do i=isc,iec + nb = Atm_block%blkno(i,j) + ix = Atm_block%ixp(i,j) + im = GFS_control%chunk_begin(nb)+ix-1 + GFS_sfcprop%smoke_fire(im) = datar82d(i-isc+1,j-jsc+1) + enddo + enddo + endif + endif + ! write post merge import data to NetCDF file. if (GFS_control%cpl_imp_dbg) then call ESMF_FieldGet(importFields(n), grid=grid, rc=rc) @@ -3294,6 +3342,21 @@ subroutine setup_exportdata(rc) do nb = 1, Atm_block%nblks select case (trim(fieldname)) !--- Instantaneous quantities + ! Instantaneous mean layer pressure (Pa) + case ('inst_pres_levels') + call block_data_copy_or_fill(datar83d, GFS_statein%prsl, zeror8, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc) + ! Instantaneous geopotential at model layer centers (m2 s-2) + case ('inst_geop_levels') + call block_data_copy_or_fill(datar83d, GFS_statein%phil, zeror8, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc) + ! Instantaneous zonal wind (m s-1) + case ('inst_zonal_wind_levels') + call block_data_copy_or_fill(datar83d, GFS_statein%ugrs, zeror8, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc) + ! Instantaneous meridional wind (m s-1) + case ('inst_merid_wind_levels') + call block_data_copy_or_fill(datar83d, GFS_statein%vgrs, zeror8, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc) + ! Instantaneous surface roughness length (cm) + case ('inst_surface_roughness') + call block_data_copy(datar82d, GFS_sfcprop%zorl, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc) ! Instantaneous u wind (m/s) 10 m above ground case ('inst_zonal_wind_height10m') call block_data_copy(datar82d, GFS_coupling%u10mi_cpl, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc) @@ -3378,6 +3441,9 @@ subroutine setup_exportdata(rc) ! Land/Sea mask (sea:0,land:1) case ('inst_land_sea_mask', 'slmsk') call block_data_copy(datar82d, GFS_sfcprop%slmsk, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc) + ! Total precipitation amount in each time step + case ('inst_rainfall_amount') + call block_data_copy(datar82d, GFS_sfcprop%tprcp, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc) !--- Mean quantities ! MEAN Zonal compt of momentum flux (N/m**2) case ('mean_zonal_moment_flx_atm') @@ -3430,6 +3496,15 @@ subroutine setup_exportdata(rc) ! MEAN NET sfc uv+vis diffused flux (W/m**2) case ('mean_net_sw_vis_dif_flx') call block_data_copy(datar82d, GFS_coupling%nvisdf_cpl, Atm_block, nb, rtime, spval, offset=GFS_Control%chunk_begin(nb), rc=localrc) + ! MEAN precipitation rate (kg/m2/s) + case ('mean_prec_rate') + call block_data_copy(datar82d, GFS_sfcprop%tprcp, Atm_block, nb, rtimek, spval, offset=GFS_Control%chunk_begin(nb), rc=localrc) + ! MEAN convective precipitation rate (kg/m2/s) + case ('mean_prec_rate_conv') + call block_data_copy(datar82d, GFS_coupling%rainc_cpl, Atm_block, nb, rtimek, spval, offset=GFS_Control%chunk_begin(nb), rc=localrc) + ! MEAN snow precipitation rate (kg/m2/s) + case ('mean_fprec_rate') + call block_data_copy(datar82d, GFS_coupling%snow_cpl, Atm_block, nb, rtimek, spval, offset=GFS_Control%chunk_begin(nb), rc=localrc) ! oceanfrac used by atm to calculate fluxes case ('openwater_frac_in_atm') call block_data_combine_fractions(datar82d, GFS_sfcprop%oceanfrac, GFS_sfcprop%fice, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc) diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index a35ce3c13..9e8bfc7d3 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -297,6 +297,11 @@ module GFS_typedefs real (kind=kind_phys), pointer :: hflx (:) => null() !< real (kind=kind_phys), pointer :: qss (:) => null() !< +!--- fire_behavior + real (kind=kind_phys), pointer :: hflx_fire (:) => null() !< kinematic surface upward sensible heat flux of fire + real (kind=kind_phys), pointer :: evap_fire (:) => null() !< kinematic surface upward latent heat flux of fire + real (kind=kind_phys), pointer :: smoke_fire (:) => null() !< smoke emission of fire + !-- In/Out real (kind=kind_phys), pointer :: maxupmf(:) => null() !< maximum up draft mass flux for Grell-Freitas real (kind=kind_phys), pointer :: conv_act(:) => null() !< convective activity counter for Grell-Freitas @@ -766,6 +771,7 @@ module GFS_typedefs logical :: cpllnd !< default no cpllnd collection logical :: cpllnd2atm !< default no lnd->atm coupling logical :: rrfs_sd !< default no rrfs_sd collection + logical :: cpl_fire !< default no fire_behavior collection logical :: use_cice_alb !< default .false. - i.e. don't use albedo imported from the ice model logical :: cpl_imp_mrg !< default no merge import with internal forcings logical :: cpl_imp_dbg !< default no write import data to file post merge @@ -1485,6 +1491,7 @@ module GFS_typedefs integer :: nto2 !< tracer index for oxygen integer :: ntwa !< tracer index for water friendly aerosol integer :: ntia !< tracer index for ice friendly aerosol + integer :: ntfsmoke !< tracer index for fire smoke integer :: ntsmoke !< tracer index for smoke integer :: ntdust !< tracer index for dust integer :: ntcoarsepm !< tracer index for coarse PM @@ -2864,6 +2871,16 @@ subroutine sfcprop_create (Sfcprop, Model) Sfcprop%lu_qfire = clear_val endif + !--- if fire_behavior is on + if(Model%cpl_fire) then + allocate (Sfcprop%hflx_fire (IM)) + allocate (Sfcprop%evap_fire (IM)) + allocate (Sfcprop%smoke_fire (IM)) + Sfcprop%hflx_fire = zero + Sfcprop%evap_fire = zero + Sfcprop%smoke_fire = zero + endif + end subroutine sfcprop_create @@ -2923,7 +2940,7 @@ subroutine coupling_create (Coupling, Model) Coupling%tsfc_radtime = clear_val endif - if (Model%cplflx .or. Model%do_sppt .or. Model%cplchm .or. Model%ca_global .or. Model%cpllnd) then + if (Model%cplflx .or. Model%do_sppt .or. Model%cplchm .or. Model%ca_global .or. Model%cpllnd .or. Model%cpl_fire) then allocate (Coupling%rain_cpl (IM)) allocate (Coupling%snow_cpl (IM)) Coupling%rain_cpl = clear_val @@ -2952,7 +2969,7 @@ subroutine coupling_create (Coupling, Model) ! Coupling%zorlwav_cpl = clear_val ! endif - if (Model%cplflx .or. Model%cpllnd) then + if (Model%cplflx .or. Model%cpllnd .or. Model%cpl_fire) then allocate (Coupling%dlwsfci_cpl (IM)) allocate (Coupling%dswsfci_cpl (IM)) allocate (Coupling%dlwsfc_cpl (IM)) @@ -2986,7 +3003,7 @@ subroutine coupling_create (Coupling, Model) Coupling%nvisdf_cpl = clear_val end if - if (Model%cplflx) then + if (Model%cplflx .or. Model%cpl_fire) then !--- incoming quantities allocate (Coupling%slimskin_cpl (IM)) allocate (Coupling%dusfcin_cpl (IM)) @@ -3151,7 +3168,7 @@ subroutine coupling_create (Coupling, Model) Coupling%pfl_lsan = clear_val endif - if (Model%cplchm .or. Model%cplflx .or. Model%cpllnd) then + if (Model%cplchm .or. Model%cplflx .or. Model%cpllnd .or. Model%cpl_fire) then !--- accumulated convective rainfall allocate (Coupling%rainc_cpl (IM)) Coupling%rainc_cpl = clear_val @@ -3359,6 +3376,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & logical :: cpllnd = .false. !< default no cpllnd collection logical :: cpllnd2atm = .false. !< default no cpllnd2atm coupling logical :: rrfs_sd = .false. !< default no rrfs_sd collection + logical :: cpl_fire = .false. !< default no fire behavior colleciton logical :: use_cice_alb = .false. !< default no cice albedo logical :: cpl_imp_mrg = .false. !< default no merge import with internal forcings logical :: cpl_imp_dbg = .false. !< default no write import data to file post merge @@ -4006,7 +4024,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- coupling parameters cplflx, cplice, cplocn2atm, cplwav, cplwav2atm, cplaqm, & cplchm, cpllnd, cpllnd2atm, cpl_imp_mrg, cpl_imp_dbg, & - rrfs_sd, use_cice_alb, & + cpl_fire, rrfs_sd, 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, & @@ -4379,6 +4397,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- RRFS-SD Model%rrfs_sd = rrfs_sd + Model%cpl_fire = cpl_fire Model%dust_drylimit_factor = dust_drylimit_factor Model%dust_moist_correction = dust_moist_correction Model%dust_moist_opt = dust_moist_opt @@ -5191,12 +5210,14 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%nqrimef = get_tracer_index(Model%tracer_names, 'q_rimef', Model%me, Model%master, Model%debug) Model%ntwa = get_tracer_index(Model%tracer_names, 'liq_aero', Model%me, Model%master, Model%debug) Model%ntia = get_tracer_index(Model%tracer_names, 'ice_aero', Model%me, Model%master, Model%debug) + if (Model%cpl_fire) then + Model%ntfsmoke = get_tracer_index(Model%tracer_names, 'fsmoke', Model%me, Model%master, Model%debug) + endif if (Model%rrfs_sd) then Model%ntsmoke = get_tracer_index(Model%tracer_names, 'smoke', Model%me, Model%master, Model%debug) Model%ntdust = get_tracer_index(Model%tracer_names, 'dust', Model%me, Model%master, Model%debug) Model%ntcoarsepm = get_tracer_index(Model%tracer_names, 'coarsepm', Model%me, Model%master, Model%debug) endif - !--- initialize parameters for atmospheric chemistry tracers call Model%init_chemistry(tracer_types) @@ -6502,6 +6523,7 @@ subroutine control_print(Model) print *, ' cpllnd : ', Model%cpllnd print *, ' cpllnd2atm : ', Model%cpllnd2atm print *, ' rrfs_sd : ', Model%rrfs_sd + print *, ' cpl_fire : ', Model%cpl_fire print *, ' use_cice_alb : ', Model%use_cice_alb print *, ' cpl_imp_mrg : ', Model%cpl_imp_mrg print *, ' cpl_imp_dbg : ', Model%cpl_imp_dbg @@ -6973,6 +6995,7 @@ subroutine control_print(Model) print *, ' nto2 : ', Model%nto2 print *, ' ntwa : ', Model%ntwa print *, ' ntia : ', Model%ntia + print *, ' ntfsmoke : ', Model%ntfsmoke print *, ' ntsmoke : ', Model%ntsmoke print *, ' ntdust : ', Model%ntdust print *, ' ntcoarsepm : ', Model%ntcoarsepm diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index 9e4b3f25c..2fee7ba12 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -2363,6 +2363,30 @@ type = real kind = kind_phys active = (do_smoke_coupling) +[hflx_fire] + standard_name = kinematic_surface_upward_sensible_heat_flux_of_fire + long_name = kinematic surface upward sensible heat flux of fire + units = K m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + active = (do_fire_coupling) +[evap_fire] + standard_name = surface_upward_specific_humidity_flux_of_fire + long_name = kinematic surface upward latent heat flux of fire + units = kg kg-1 m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + active = (do_fire_coupling) +[smoke_fire] + standard_name = smoke_emission_of_fire + long_name = smoke emission of fire + units = kg m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + active = (do_fire_coupling) ######################################################################## [ccpp-table-properties] @@ -2472,7 +2496,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_chemistry_coupling .or. flag_for_land_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_chemistry_coupling .or. flag_for_land_coupling .or. do_fire_coupling) [snow_cpl] standard_name = cumulative_lwe_thickness_of_snow_amount_for_coupling long_name = total snow precipitation @@ -2480,7 +2504,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_stochastic_physics_perturbations .or. flag_for_chemistry_coupling .or. flag_for_global_cellular_automata .or. flag_for_land_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_stochastic_physics_perturbations .or. flag_for_chemistry_coupling .or. flag_for_global_cellular_automata .or. flag_for_land_coupling .or. do_fire_coupling) [dusfc_cpl] standard_name = cumulative_surface_x_momentum_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc x momentum flux multiplied by timestep @@ -2744,7 +2768,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling .or. do_fire_coupling) [q2mi_cpl] standard_name = specific_humidity_at_2m_for_coupling long_name = instantaneous Q2m @@ -2752,7 +2776,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling .or. do_fire_coupling) [u10mi_cpl] standard_name = x_wind_at_10m_for_coupling long_name = instantaneous U10m @@ -2784,7 +2808,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling .or. flag_for_land_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling .or. flag_for_land_coupling .or. do_fire_coupling) [ulwsfcin_cpl] standard_name = surface_upwelling_longwave_flux_from_coupled_process long_name = surface upwelling LW flux for coupling @@ -3634,6 +3658,12 @@ units = flag dimensions = () type = logical +[cpl_fire] + standard_name = do_fire_coupling + long_name = flag controlling fire_behavior collection (default off) + units = flag + dimensions = () + type = logical [cpl_imp_mrg] standard_name = flag_for_merging_imported_data long_name = flag controlling cpl_imp_mrg for imported data (default off) @@ -6549,6 +6579,12 @@ units = index dimensions = () type = integer +[ntfsmoke] + standard_name = index_for_fire_smoke_in_tracer_concentration_array + long_name = tracer index for fire smoke + units = index + dimensions = () + type = integer [ntdust] standard_name = index_for_dust_in_tracer_concentration_array long_name = tracer index for dust diff --git a/ccpp/driver/GFS_diagnostics.F90 b/ccpp/driver/GFS_diagnostics.F90 index 942db0175..4729819ea 100644 --- a/ccpp/driver/GFS_diagnostics.F90 +++ b/ccpp/driver/GFS_diagnostics.F90 @@ -4653,6 +4653,19 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop enddo end if thompson_extended_diagnostics + if (Model%cpl_fire .and. Model%ntfsmoke>0) then + idx = idx + 1 + ExtDiag(idx)%axes = 3 + ExtDiag(idx)%name = 'fsmoke' + ExtDiag(idx)%desc = 'smoke concentration' + ExtDiag(idx)%unit = 'kg kg-1' + ExtDiag(idx)%mod_name = 'gfs_phys' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var3 => Statein%qgrs(Model%chunk_begin(nb):Model%chunk_end(nb),:,Model%ntfsmoke) + enddo + endif + if (Model%rrfs_sd .and. Model%ntsmoke>0) then idx = idx + 1 diff --git a/ccpp/physics b/ccpp/physics index 44700d5e9..b6c433354 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 44700d5e92f00524ade276062e1f7c50e554c0fb +Subproject commit b6c433354394bd8ed5e46692a81149441ff4ae38 diff --git a/cpl/module_cplfields.F90 b/cpl/module_cplfields.F90 index 524db0208..5266807a5 100644 --- a/cpl/module_cplfields.F90 +++ b/cpl/module_cplfields.F90 @@ -26,7 +26,7 @@ module module_cplfields ! l : model levels (3D) ! s : surface (2D) ! t : tracers (4D) - integer, public, parameter :: NexportFields = 120 + integer, public, parameter :: NexportFields = 121 type(ESMF_Field), target, public :: exportFields(NexportFields) type(FieldInfo), dimension(NexportFields), public, parameter :: exportFieldsInfo = [ & @@ -64,6 +64,7 @@ module module_cplfields FieldInfo("mean_evap_rate ", "s"), & FieldInfo("mean_down_lw_flx ", "s"), & FieldInfo("mean_down_sw_flx ", "s"), & + FieldInfo("mean_prec_rate ", "s"), & FieldInfo("inst_prec_rate ", "s"), & FieldInfo("inst_zonal_moment_flx ", "s"), & FieldInfo("inst_merid_moment_flx ", "s"), & @@ -157,7 +158,7 @@ module module_cplfields FieldInfo("cpl_scalars ", "s")] ! Import Fields ---------------------------------------- - integer, public, parameter :: NimportFields = 64 + integer, public, parameter :: NimportFields = 67 logical, public :: importFieldsValid(NimportFields) type(ESMF_Field), target, public :: importFields(NimportFields) @@ -233,7 +234,12 @@ module module_cplfields FieldInfo("snwdph ", "s"), & FieldInfo("f10m ", "s"), & FieldInfo("zorl ", "s"), & - FieldInfo("t2m ", "s") ] + FieldInfo("t2m ", "s"), & + + ! For FIRE + FieldInfo("hflx_fire ", "s"), & + FieldInfo("evap_fire ", "s"), & + FieldInfo("smoke_fire ", "s") ] ! Fields exported exclusively for coupling with chemistry character(*), public, parameter :: chemistryFieldNames(*) = [ & From 1aba87cb308fb52912e7fe6dd6b53d0ce7077554 Mon Sep 17 00:00:00 2001 From: Dusan Jovic <48258889+DusanJovic-NOAA@users.noreply.github.com> Date: Tue, 1 Oct 2024 11:55:48 -0400 Subject: [PATCH 02/10] Support IntelLLVM compiler (#861) * Add support for IntelLLVM compiler: only sub modules (atmos_cubed_sphere, ccpp/physics and upp) are updated. * Update atmos_cubed_sphere, ccpp/physics and upp --- atmos_cubed_sphere | 2 +- ccpp/physics | 2 +- upp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index ac3055eff..24686a256 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit ac3055eff06099d61cd65e18bc4f0353ffd83f46 +Subproject commit 24686a2561f1414eb86c7b97c93960c36e4257b1 diff --git a/ccpp/physics b/ccpp/physics index b6c433354..5a363134a 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit b6c433354394bd8ed5e46692a81149441ff4ae38 +Subproject commit 5a363134a77535f35594e56b58ba1e6141a23d2b diff --git a/upp b/upp index 81b38a88d..6f5dd627d 160000 --- a/upp +++ b/upp @@ -1 +1 @@ -Subproject commit 81b38a88d860ce7e34e8507c2246151a54d96a39 +Subproject commit 6f5dd627d124ae94bb5ed7f5afd22f82c470b1b7 From 1e10d62a971e4114faea90ae2f134664f3a9ef02 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Fri, 18 Oct 2024 11:08:04 -0400 Subject: [PATCH 03/10] First reconciliation PR from production/RRFS.v1 (#872) * Identical to #785, but it is directed at moving the changes from production/RRFS.v1 to the develop branch --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 5a363134a..f3eeb3442 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 5a363134a77535f35594e56b58ba1e6141a23d2b +Subproject commit f3eeb3442775b7239d98e3d09acc6d4f1d42233e From 99091f9742670bdebd84bd13f17b9115457d64dd Mon Sep 17 00:00:00 2001 From: Dusan Jovic <48258889+DusanJovic-NOAA@users.noreply.github.com> Date: Wed, 23 Oct 2024 09:03:59 -0400 Subject: [PATCH 04/10] Update chunksizes for cubed sphere grid (#876) * Update chunksizes for cubed sphere grid * Update submodule pointer for ccpp-framework: bug fix for unit conversion error in ccpp_prebuild.py (PR-878) --------- Co-authored-by: Dom Heinzeller --- ccpp/framework | 2 +- io/module_write_netcdf.F90 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ccpp/framework b/ccpp/framework index 0f8232724..b7d55fd07 160000 --- a/ccpp/framework +++ b/ccpp/framework @@ -1 +1 @@ -Subproject commit 0f8232724975c13289cad390c9a71fa2c6a9bff4 +Subproject commit b7d55fd07fa35c5de9b2292596d30784a800b276 diff --git a/io/module_write_netcdf.F90 b/io/module_write_netcdf.F90 index b0164151e..03a9d57dc 100644 --- a/io/module_write_netcdf.F90 +++ b/io/module_write_netcdf.F90 @@ -398,14 +398,14 @@ end function nf_set_log_level par_access = NF90_COLLECTIVE if (rank == 2 .and. ichunk2d(grid_id) > 0 .and. jchunk2d(grid_id) > 0) then if (is_cubed_sphere) then - chunksizes = [im, jm, tileCount, 1] + chunksizes = [im, jm, 1, 1] else chunksizes = [ichunk2d(grid_id), jchunk2d(grid_id), 1] end if ncerr = nf90_def_var_chunking(ncid, varids(i), NF90_CHUNKED, chunksizes) ; NC_ERR_STOP(ncerr) else if (rank == 3 .and. ichunk3d(grid_id) > 0 .and. jchunk3d(grid_id) > 0 .and. kchunk3d(grid_id) > 0) then if (is_cubed_sphere) then - chunksizes = [im, jm, lm, tileCount, 1] + chunksizes = [im, jm, 1, 1, 1] else chunksizes = [ichunk3d(grid_id), jchunk3d(grid_id), min(kchunk3d(grid_id),fldlev(i)), 1] end if From bd785e50f90985fb1330e36852297af38293415b Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Mon, 4 Nov 2024 09:11:58 -0500 Subject: [PATCH 05/10] STY: Use capital W and lowercase m for watts per square meter (#859) * Cosmetic unit update: w/m2 to W/m2 --- atmos_cubed_sphere | 2 +- ccpp/driver/GFS_diagnostics.F90 | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index 24686a256..e36e8572e 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit 24686a2561f1414eb86c7b97c93960c36e4257b1 +Subproject commit e36e8572e7643d7e59a3979a61bdd83743ff7b00 diff --git a/ccpp/driver/GFS_diagnostics.F90 b/ccpp/driver/GFS_diagnostics.F90 index 4729819ea..019711825 100644 --- a/ccpp/driver/GFS_diagnostics.F90 +++ b/ccpp/driver/GFS_diagnostics.F90 @@ -998,7 +998,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%axes = 2 ExtDiag(idx)%name = 'sw_upfxc' ExtDiag(idx)%desc = 'total sky upward sw flux at toa - GFS radiation' - ExtDiag(idx)%unit = 'w/m**2' + ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) @@ -1010,7 +1010,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%axes = 2 ExtDiag(idx)%name = 'sw_dnfxc' ExtDiag(idx)%desc = 'total sky downward sw flux at toa - GFS radiation' - ExtDiag(idx)%unit = 'w/m**2' + ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) @@ -1022,7 +1022,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%axes = 2 ExtDiag(idx)%name = 'sw_upfx0' ExtDiag(idx)%desc = 'clear sky upward sw flux at toa - GFS radiation' - ExtDiag(idx)%unit = 'w/m**2' + ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) @@ -1034,7 +1034,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%axes = 2 ExtDiag(idx)%name = 'lw_upfxc' ExtDiag(idx)%desc = 'total sky upward lw flux at toa - GFS radiation' - ExtDiag(idx)%unit = 'w/m**2' + ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) @@ -1046,7 +1046,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%axes = 2 ExtDiag(idx)%name = 'lw_upfx0' ExtDiag(idx)%desc = 'clear sky upward lw flux at toa - GFS radiation' - ExtDiag(idx)%unit = 'w/m**2' + ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) @@ -1234,7 +1234,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%axes = 2 ExtDiag(idx)%name = 'shtfl_ave' ExtDiag(idx)%desc = 'surface sensible heat flux' - ExtDiag(idx)%unit = 'w/m**2' + ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_one ExtDiag(idx)%time_avg = .TRUE. @@ -1248,7 +1248,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%axes = 2 ExtDiag(idx)%name = 'lhtfl_ave' ExtDiag(idx)%desc = 'surface latent heat flux' - ExtDiag(idx)%unit = 'w/m**2' + ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_one ExtDiag(idx)%time_avg = .TRUE. @@ -1306,7 +1306,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%axes = 2 ExtDiag(idx)%name = 'dlwsfc' ExtDiag(idx)%desc = 'time accumulated downward lw flux at surface' - ExtDiag(idx)%unit = 'w/m**2' + ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) @@ -1318,7 +1318,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%axes = 2 ExtDiag(idx)%name = 'ulwsfc' ExtDiag(idx)%desc = 'time accumulated upward lw flux at surface' - ExtDiag(idx)%unit = 'w/m**2' + ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) @@ -1399,7 +1399,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%axes = 2 ExtDiag(idx)%name = 'pevpr_ave' ExtDiag(idx)%desc = 'averaged potential evaporation rate' - ExtDiag(idx)%unit = 'W/M**2' + ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. allocate (ExtDiag(idx)%data(nblks)) @@ -2073,7 +2073,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%axes = 2 ExtDiag(idx)%name = 'dlwsfci' ExtDiag(idx)%desc = 'instantaneous sfc downward lw flux' - ExtDiag(idx)%unit = 'w/m**2' + ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) @@ -2085,7 +2085,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%axes = 2 ExtDiag(idx)%name = 'ulwsfci' ExtDiag(idx)%desc = 'instantaneous sfc upward lw flux' - ExtDiag(idx)%unit = 'w/m**2' + ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) @@ -2097,7 +2097,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%axes = 2 ExtDiag(idx)%name = 'dswsfci' ExtDiag(idx)%desc = 'instantaneous sfc downward sw flux' - ExtDiag(idx)%unit = 'w/m**2' + ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) @@ -2109,7 +2109,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%axes = 2 ExtDiag(idx)%name = 'uswsfci' ExtDiag(idx)%desc = 'instantaneous sfc upward sw flux' - ExtDiag(idx)%unit = 'w/m**2' + ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) @@ -2213,7 +2213,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%axes = 2 ExtDiag(idx)%name = 'pevpr' ExtDiag(idx)%desc = 'instantaneous surface potential evaporation' - ExtDiag(idx)%unit = 'W/M**2' + ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -4543,7 +4543,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%axes = 2 ExtDiag(idx)%name = 'qrain' ExtDiag(idx)%desc = 'nsst sensible heat flux due to rainfall' - ExtDiag(idx)%unit = 'w/m2' + ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_sfc' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks From 49967251b83255bdac7ac2f9626d2714e8b83d07 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Fri, 8 Nov 2024 13:04:08 -0500 Subject: [PATCH 06/10] Second reconciliation PR from production/RRFSv1 (#881) * cleanup of GFS_ and CCPP_typedefs code and metadata * fix some optional arguments in ccpp-physics * remove variables from GFS_diagnostics that have been removed from GFS_typedefs.F90 * fix RUC LSM variable that is allocated twice --- ccpp/data/CCPP_typedefs.F90 | 47 --------- ccpp/data/CCPP_typedefs.meta | 29 ++---- ccpp/data/GFS_typedefs.F90 | 117 ++++++--------------- ccpp/data/GFS_typedefs.meta | 173 ++++++++++++++++---------------- ccpp/driver/GFS_diagnostics.F90 | 88 +--------------- ccpp/physics | 2 +- 6 files changed, 129 insertions(+), 327 deletions(-) diff --git a/ccpp/data/CCPP_typedefs.F90 b/ccpp/data/CCPP_typedefs.F90 index 32abd412a..2a0355264 100644 --- a/ccpp/data/CCPP_typedefs.F90 +++ b/ccpp/data/CCPP_typedefs.F90 @@ -208,8 +208,6 @@ module CCPP_typedefs integer :: nbdlw !< integer :: nbdsw !< real (kind=kind_phys), pointer :: ncgl(:,:) => null() !< - real (kind=kind_phys), pointer :: ncpi(:,:) => null() !< - real (kind=kind_phys), pointer :: ncpl(:,:) => null() !< real (kind=kind_phys), pointer :: ncpr(:,:) => null() !< real (kind=kind_phys), pointer :: ncps(:,:) => null() !< integer :: ncstrac !< @@ -367,15 +365,6 @@ module CCPP_typedefs real (kind=kind_phys), pointer :: tracer(:,:,:) => null() !< real (kind=kind_phys), pointer :: aerosolslw(:,:,:,:) => null() !< Aerosol radiative properties in each LW band. real (kind=kind_phys), pointer :: aerosolssw(:,:,:,:) => null() !< Aerosol radiative properties in each SW band. - real (kind=kind_phys), pointer :: cld_frac(:,:) => null() !< Total cloud fraction - real (kind=kind_phys), pointer :: cld_lwp(:,:) => null() !< Cloud liquid water path - real (kind=kind_phys), pointer :: cld_reliq(:,:) => null() !< Cloud liquid effective radius - real (kind=kind_phys), pointer :: cld_iwp(:,:) => null() !< Cloud ice water path - real (kind=kind_phys), pointer :: cld_reice(:,:) => null() !< Cloud ice effecive radius - real (kind=kind_phys), pointer :: cld_swp(:,:) => null() !< Cloud snow water path - real (kind=kind_phys), pointer :: cld_resnow(:,:) => null() !< Cloud snow effective radius - real (kind=kind_phys), pointer :: cld_rwp(:,:) => null() !< Cloud rain water path - real (kind=kind_phys), pointer :: cld_rerain(:,:) => null() !< Cloud rain effective radius real (kind=kind_phys), pointer :: precip_frac(:,:) => null() !< Precipitation fraction real (kind=kind_phys), pointer :: cld_cnv_frac(:,:) => null() !< SGS convective cloud fraction real (kind=kind_phys), pointer :: cld_cnv_lwp(:,:) => null() !< SGS convective cloud liquid water path @@ -766,15 +755,6 @@ subroutine gfs_interstitial_create (Interstitial, IM, Model) allocate (Interstitial%fluxswDOWN_clrsky (IM, Model%levs+1)) allocate (Interstitial%aerosolslw (IM, Model%levs, Model%rrtmgp_nBandsLW, NF_AELW)) allocate (Interstitial%aerosolssw (IM, Model%levs, Model%rrtmgp_nBandsSW, NF_AESW)) - allocate (Interstitial%cld_frac (IM, Model%levs)) - allocate (Interstitial%cld_lwp (IM, Model%levs)) - allocate (Interstitial%cld_reliq (IM, Model%levs)) - allocate (Interstitial%cld_iwp (IM, Model%levs)) - allocate (Interstitial%cld_reice (IM, Model%levs)) - allocate (Interstitial%cld_swp (IM, Model%levs)) - allocate (Interstitial%cld_resnow (IM, Model%levs)) - allocate (Interstitial%cld_rwp (IM, Model%levs)) - allocate (Interstitial%cld_rerain (IM, Model%levs)) allocate (Interstitial%precip_frac (IM, Model%levs)) allocate (Interstitial%cld_cnv_frac (IM, Model%levs)) allocate (Interstitial%cnv_cloud_overlap_param(IM, Model%levs)) @@ -862,15 +842,6 @@ subroutine gfs_interstitial_create (Interstitial, IM, Model) allocate (Interstitial%cnv_ndrop (IM,Model%levs)) allocate (Interstitial%cnv_nice (IM,Model%levs)) end if - if (Model%do_shoc) then - if (.not. associated(Interstitial%qrn)) allocate (Interstitial%qrn (IM,Model%levs)) - if (.not. associated(Interstitial%qsnw)) allocate (Interstitial%qsnw (IM,Model%levs)) - ! DH* updated version of shoc from May 22 2019 (not yet in CCPP) doesn't use qgl? remove? - if (.not. associated(Interstitial%qgl)) allocate (Interstitial%qgl (IM,Model%levs)) - ! *DH - allocate (Interstitial%ncpi (IM,Model%levs)) - allocate (Interstitial%ncpl (IM,Model%levs)) - end if if (Model%lsm == Model%lsm_noahmp) then allocate (Interstitial%t2mmp (IM)) allocate (Interstitial%q2mp (IM)) @@ -1176,15 +1147,6 @@ subroutine gfs_interstitial_rad_reset (Interstitial, Model) Interstitial%fluxswDOWN_clrsky = clear_val Interstitial%aerosolslw = clear_val Interstitial%aerosolssw = clear_val - Interstitial%cld_frac = clear_val - Interstitial%cld_lwp = clear_val - Interstitial%cld_reliq = clear_val - Interstitial%cld_iwp = clear_val - Interstitial%cld_reice = clear_val - Interstitial%cld_swp = clear_val - Interstitial%cld_resnow = clear_val - Interstitial%cld_rwp = clear_val - Interstitial%cld_rerain = clear_val Interstitial%precip_frac = clear_val Interstitial%cld_cnv_frac = clear_val Interstitial%cnv_cloud_overlap_param = clear_val @@ -1471,15 +1433,6 @@ subroutine gfs_interstitial_phys_reset (Interstitial, Model) Interstitial%cnv_ndrop = clear_val Interstitial%cnv_nice = clear_val end if - if (Model%do_shoc) then - Interstitial%qrn = clear_val - Interstitial%qsnw = clear_val - ! DH* updated version of shoc from May 22 2019 doesn't use qgl? remove? - Interstitial%qgl = clear_val - ! *DH - Interstitial%ncpi = clear_val - Interstitial%ncpl = clear_val - end if if (Model%lsm == Model%lsm_noahmp) then Interstitial%t2mmp = clear_val Interstitial%q2mp = clear_val diff --git a/ccpp/data/CCPP_typedefs.meta b/ccpp/data/CCPP_typedefs.meta index d1a06abf0..e8ec56b8d 100644 --- a/ccpp/data/CCPP_typedefs.meta +++ b/ccpp/data/CCPP_typedefs.meta @@ -104,6 +104,7 @@ dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys + active = (.not. flag_for_rrtmgp_radiation_scheme) [bexp1d] standard_name = perturbation_of_soil_type_b_parameter long_name = perturbation of soil type "b" parameter @@ -1390,22 +1391,6 @@ type = real kind = kind_phys active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) -[ncpi] - standard_name = local_ice_number_concentration - long_name = number concentration of ice local to physics - units = kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (flag_for_shoc) -[ncpl] - standard_name = local_condesed_water_number_concentration - long_name = number concentration of condensed water local to physics - units = kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (flag_for_shoc) [ncpr] standard_name = local_rain_number_concentration long_name = number concentration of rain local to physics @@ -1617,7 +1602,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme .or. flag_for_shoc) + active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) [qicn] standard_name = mass_fraction_of_convective_cloud_ice long_name = mass fraction of convective cloud ice water @@ -1648,7 +1633,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme .or. flag_for_shoc) + active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) [qsnw] standard_name = local_snow_water_mixing_ratio long_name = ratio of mass of snow water to mass of dry air plus vapor (without condensates) local to physics @@ -1656,7 +1641,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme .or. flag_for_shoc) + active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) [prcpmp] standard_name = lwe_thickness_of_explicit_precipitation_amount long_name = explicit precipitation (rain, ice, snow, graupel, ...) on physics timestep @@ -2596,6 +2581,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension, number_of_longwave_bands) type = real kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) [aerosolslw(:,:,:,2)] standard_name = RRTMGP_aerosol_single_scattering_albedo_for_longwave_bands_01_16 long_name = aerosol single scattering albedo for longwave bands 01-16 @@ -2603,6 +2589,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension, number_of_longwave_bands) type = real kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) [aerosolslw(:,:,:,3)] standard_name = RRTMGP_aerosol_asymmetry_parameter_for_longwave_bands_01_16 long_name = aerosol asymmetry parameter for longwave bands 01-16 @@ -2610,6 +2597,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension, number_of_longwave_bands) type = real kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) [aerosolssw] standard_name = RRTMGP_aerosol_optical_properties_for_shortwave_bands_01_16 long_name = aerosol optical properties for shortwave bands 01-16 @@ -2625,6 +2613,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension, number_of_shortwave_bands) type = real kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) [aerosolssw(:,:,:,2)] standard_name = RRTMGP_aerosol_single_scattering_albedo_for_shortwave_bands_01_16 long_name = aerosol single scattering albedo for shortwave bands 01-16 @@ -2632,6 +2621,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension, number_of_shortwave_bands) type = real kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) [aerosolssw(:,:,:,3)] standard_name = RRTMGP_aerosol_asymmetry_parameter_for_shortwave_bands_01_16 long_name = aerosol asymmetry parameter for shortwave bands 01-16 @@ -2639,6 +2629,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension, number_of_shortwave_bands) type = real kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) [precip_frac] standard_name = precipitation_fraction_by_layer long_name = precipitation fraction in each layer diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index 9e8bfc7d3..ef9411546 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -2089,14 +2089,6 @@ module GFS_typedefs real (kind=kind_phys), pointer :: dv3_ofdcol(:) => null() !< time-averaged sfc v-momentum flux from TOFD ! !---vay-2018 UGWP-diagnostics daily mean -! - real (kind=kind_phys), pointer :: dudt_tot (:,:) => null() !< daily aver GFS_phys tend for WE-U - real (kind=kind_phys), pointer :: dvdt_tot (:,:) => null() !< daily aver GFS_phys tend for SN-V - real (kind=kind_phys), pointer :: dtdt_tot (:,:) => null() !< daily aver GFS_phys tend for Temp-re -! - real (kind=kind_phys), pointer :: du3dt_pbl(:,:) => null() !< daily aver GFS_phys tend for WE-U pbl - real (kind=kind_phys), pointer :: dv3dt_pbl(:,:) => null() !< daily aver GFS_phys tend for SN-V pbl - real (kind=kind_phys), pointer :: dt3dt_pbl(:,:) => null() !< daily aver GFS_phys tend for Temp pbl ! real (kind=kind_phys), pointer :: du3dt_ogw(:,:) => null() !< daily aver GFS_phys tend for WE-U OGW ! @@ -2146,10 +2138,6 @@ module GFS_typedefs real (kind=kind_phys), pointer :: gwp_axf(:,:) => null() ! instant jet-UGWP tend m/s/s EW real (kind=kind_phys), pointer :: gwp_ayf(:,:) => null() ! instant jet-UGWP tend m/s/s NS - real (kind=kind_phys), pointer :: uav_ugwp(:,:) => null() ! aver wind UAV from physics - real (kind=kind_phys), pointer :: tav_ugwp(:,:) => null() ! aver temp UAV from physics - real (kind=kind_phys), pointer :: du3dt_dyn(:,:) => null() ! U Tend-dynamics "In"-"PhysOut" - !--- COODRE ORO diagnostics real (kind=kind_phys), pointer :: zmtb(:) => null() ! real (kind=kind_phys), pointer :: zogw(:) => null() ! @@ -2368,8 +2356,6 @@ subroutine sfcprop_create (Sfcprop, Model) allocate (Sfcprop%emis_lnd (IM)) allocate (Sfcprop%emis_ice (IM)) allocate (Sfcprop%emis_wat (IM)) - allocate (Sfcprop%acsnow_land (IM)) - allocate (Sfcprop%acsnow_ice (IM)) Sfcprop%slmsk = clear_val Sfcprop%oceanfrac = clear_val @@ -2427,9 +2413,6 @@ subroutine sfcprop_create (Sfcprop, Model) Sfcprop%emis_lnd = clear_val Sfcprop%emis_ice = clear_val Sfcprop%emis_wat = clear_val - Sfcprop%acsnow_land = clear_val - Sfcprop%acsnow_ice = clear_val - !--- In (radiation only) allocate (Sfcprop%snoalb (IM)) @@ -2589,13 +2572,17 @@ subroutine sfcprop_create (Sfcprop, Model) Sfcprop%dt_cool = zero Sfcprop%qrain = zero endif + if (Model%lsm == Model%lsm_noah .or. Model%lsm == Model%lsm_noahmp .or. Model%lsm == Model%lsm_ruc) then + allocate (Sfcprop%xlaixy (IM)) + Sfcprop%xlaixy = clear_val + else + allocate (Sfcprop%xlaixy (0)) + end if if (Model%lsm == Model%lsm_noah .or. Model%lsm == Model%lsm_noahmp) then allocate (Sfcprop%rca (IM)) Sfcprop%rca = clear_val - end if - if (Model%lsm == Model%lsm_noah) then - allocate (Sfcprop%xlaixy (IM)) - Sfcprop%xlaixy = clear_val + else + allocate (Sfcprop%rca (0)) end if if (Model%lsm == Model%lsm_ruc .or. Model%lsm == Model%lsm_noahmp .or. & (Model%lkm>0 .and. Model%iopt_lake==Model%iopt_lake_clm)) then @@ -2640,7 +2627,6 @@ subroutine sfcprop_create (Sfcprop, Model) allocate (Sfcprop%stblcpxy (IM)) allocate (Sfcprop%fastcpxy (IM)) allocate (Sfcprop%xsaixy (IM)) - allocate (Sfcprop%xlaixy (IM)) allocate (Sfcprop%taussxy (IM)) allocate (Sfcprop%smcwtdxy (IM)) allocate (Sfcprop%deeprechxy (IM)) @@ -2675,7 +2661,6 @@ subroutine sfcprop_create (Sfcprop, Model) Sfcprop%stblcpxy = clear_val Sfcprop%fastcpxy = clear_val Sfcprop%xsaixy = clear_val - Sfcprop%xlaixy = clear_val Sfcprop%taussxy = clear_val Sfcprop%smcwtdxy = clear_val Sfcprop%deeprechxy = clear_val @@ -2728,7 +2713,6 @@ subroutine sfcprop_create (Sfcprop, Model) allocate (Sfcprop%snowfallac_ice (IM)) allocate (Sfcprop%acsnow_land (IM)) allocate (Sfcprop%acsnow_ice (IM)) - allocate (Sfcprop%xlaixy (IM)) allocate (Sfcprop%fire_heat_flux (IM)) allocate (Sfcprop%frac_grid_burned(IM)) @@ -2750,7 +2734,6 @@ subroutine sfcprop_create (Sfcprop, Model) Sfcprop%snowfallac_ice = clear_val Sfcprop%acsnow_land = clear_val Sfcprop%acsnow_ice = clear_val - Sfcprop%xlaixy = clear_val Sfcprop%fire_heat_flux = clear_val Sfcprop%frac_grid_burned= clear_val ! @@ -2969,14 +2952,31 @@ subroutine coupling_create (Coupling, Model) ! Coupling%zorlwav_cpl = clear_val ! endif - if (Model%cplflx .or. Model%cpllnd .or. Model%cpl_fire) then + ! -- additional coupling options for air quality + if (Model%cplflx .or. Model%cpllnd .or. Model%cpl_fire .or. (Model%cplaqm .and. .not.Model%cplflx)) then + allocate (Coupling%psurfi_cpl (IM)) + allocate (Coupling%nswsfci_cpl (IM)) + Coupling%psurfi_cpl = clear_val + Coupling%nswsfci_cpl = clear_val + endif + + if (Model%cplflx .or. Model%cpl_fire .or. (Model%cplaqm .and. .not.Model%cplflx)) then + allocate (Coupling%dtsfci_cpl (IM)) + allocate (Coupling%dqsfci_cpl (IM)) + allocate (Coupling%t2mi_cpl (IM)) + allocate (Coupling%q2mi_cpl (IM)) + Coupling%dtsfci_cpl = clear_val + Coupling%dqsfci_cpl = clear_val + Coupling%t2mi_cpl = clear_val + Coupling%q2mi_cpl = clear_val + endif + + if (Model%cplflx .or. Model%cpllnd) then allocate (Coupling%dlwsfci_cpl (IM)) allocate (Coupling%dswsfci_cpl (IM)) allocate (Coupling%dlwsfc_cpl (IM)) allocate (Coupling%dswsfc_cpl (IM)) - allocate (Coupling%psurfi_cpl (IM)) allocate (Coupling%nswsfc_cpl (IM)) - allocate (Coupling%nswsfci_cpl (IM)) allocate (Coupling%nnirbmi_cpl (IM)) allocate (Coupling%nnirdfi_cpl (IM)) allocate (Coupling%nvisbmi_cpl (IM)) @@ -2990,9 +2990,7 @@ subroutine coupling_create (Coupling, Model) Coupling%dswsfci_cpl = clear_val Coupling%dlwsfc_cpl = clear_val Coupling%dswsfc_cpl = clear_val - Coupling%psurfi_cpl = clear_val Coupling%nswsfc_cpl = clear_val - Coupling%nswsfci_cpl = clear_val Coupling%nnirbmi_cpl = clear_val Coupling%nnirdfi_cpl = clear_val Coupling%nvisbmi_cpl = clear_val @@ -3076,29 +3074,21 @@ subroutine coupling_create (Coupling, Model) !--- instantaneous quantities allocate (Coupling%dusfci_cpl (IM)) allocate (Coupling%dvsfci_cpl (IM)) - allocate (Coupling%dtsfci_cpl (IM)) - allocate (Coupling%dqsfci_cpl (IM)) allocate (Coupling%dnirbmi_cpl (IM)) allocate (Coupling%dnirdfi_cpl (IM)) allocate (Coupling%dvisbmi_cpl (IM)) allocate (Coupling%dvisdfi_cpl (IM)) allocate (Coupling%nlwsfci_cpl (IM)) - allocate (Coupling%t2mi_cpl (IM)) - allocate (Coupling%q2mi_cpl (IM)) allocate (Coupling%oro_cpl (IM)) allocate (Coupling%slmsk_cpl (IM)) Coupling%dusfci_cpl = clear_val Coupling%dvsfci_cpl = clear_val - Coupling%dtsfci_cpl = clear_val - Coupling%dqsfci_cpl = clear_val Coupling%dnirbmi_cpl = clear_val Coupling%dnirdfi_cpl = clear_val Coupling%dvisbmi_cpl = clear_val Coupling%dvisdfi_cpl = clear_val Coupling%nlwsfci_cpl = clear_val - Coupling%t2mi_cpl = clear_val - Coupling%q2mi_cpl = clear_val Coupling%oro_cpl = clear_val !< pointer to sfcprop%oro Coupling%slmsk_cpl = clear_val !< pointer to sfcprop%slmsk endif @@ -3136,6 +3126,7 @@ subroutine coupling_create (Coupling, Model) !-- cellular automata allocate (Coupling%condition(IM)) + Coupling%condition = clear_val if (Model%do_ca) then allocate (Coupling%ca1 (IM)) allocate (Coupling%ca2 (IM)) @@ -3153,7 +3144,6 @@ subroutine coupling_create (Coupling, Model) Coupling%ca_shal = clear_val Coupling%ca_rad = clear_val Coupling%ca_micro = clear_val - Coupling%condition = clear_val endif ! -- Aerosols coupling options @@ -3174,23 +3164,6 @@ subroutine coupling_create (Coupling, Model) Coupling%rainc_cpl = clear_val end if - ! -- additional coupling options for air quality - if (Model%cplaqm .and. .not.Model%cplflx) then - !--- outgoing instantaneous quantities - allocate (Coupling%dtsfci_cpl (IM)) - allocate (Coupling%dqsfci_cpl (IM)) - allocate (Coupling%nswsfci_cpl (IM)) - allocate (Coupling%t2mi_cpl (IM)) - allocate (Coupling%q2mi_cpl (IM)) - allocate (Coupling%psurfi_cpl (IM)) - Coupling%dtsfci_cpl = clear_val - Coupling%dqsfci_cpl = clear_val - Coupling%nswsfci_cpl = clear_val - Coupling%t2mi_cpl = clear_val - Coupling%q2mi_cpl = clear_val - Coupling%psurfi_cpl = clear_val - endif - if(Model%progsigma)then allocate(Coupling%dqdt_qmicro (IM,Model%levs)) Coupling%dqdt_qmicro = clear_val @@ -5323,8 +5296,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & .and. Model%flag_for_dcnv_generic_tend ! Increment idtend and fill dtidx: - allocate(Model%dtend_var_labels(Model%ntracp100)) - allocate(Model%dtend_process_labels(Model%nprocess)) call allocate_dtend_labels_and_causes(Model) @@ -7279,7 +7250,6 @@ subroutine tbd_create (Tbd, Model) if (Model%imfdeepcnv == Model%imfdeepcnv_gf .or. Model%imfdeepcnv == Model%imfdeepcnv_ntiedtke .or. Model%imfdeepcnv == Model%imfdeepcnv_c3) then allocate(Tbd%forcet(IM, Model%levs)) allocate(Tbd%forceq(IM, Model%levs)) - allocate(Tbd%forcet(IM, Model%levs)) allocate(Tbd%prevst(IM, Model%levs)) Tbd%forcet = clear_val Tbd%forceq = clear_val @@ -7838,20 +7808,11 @@ subroutine diag_create (Diag, Model) allocate (Diag%kdis_gw (IM,Model%levs)) if (Model%ldiag_ugwp) then - allocate (Diag%du3dt_dyn (IM,Model%levs) ) - allocate (Diag%du3dt_pbl (IM,Model%levs) ) - allocate (Diag%dv3dt_pbl (IM,Model%levs) ) - allocate (Diag%dt3dt_pbl (IM,Model%levs) ) allocate (Diag%du3dt_ogw (IM,Model%levs) ) allocate (Diag%du3dt_mtb (IM,Model%levs) ) allocate (Diag%du3dt_tms (IM,Model%levs) ) allocate (Diag%du3dt_ngw (IM,Model%levs) ) allocate (Diag%dv3dt_ngw (IM,Model%levs) ) - allocate (Diag%dudt_tot (IM,Model%levs) ) - allocate (Diag%dvdt_tot (IM,Model%levs) ) - allocate (Diag%dtdt_tot (IM,Model%levs) ) - allocate (Diag%uav_ugwp (IM,Model%levs) ) - allocate (Diag%tav_ugwp (IM,Model%levs) ) allocate (Diag%dws3dt_ogw (IM,Model%levs) ) allocate (Diag%dws3dt_obl (IM,Model%levs) ) allocate (Diag%dws3dt_oss (IM,Model%levs) ) @@ -7864,9 +7825,9 @@ subroutine diag_create (Diag, Model) allocate (Diag%ldv3dt_ngw (IM,Model%levs) ) allocate (Diag%ldt3dt_ngw (IM,Model%levs) ) endif - + + allocate (Diag%dudt_ogw (IM,Model%levs)) if (Model%do_ugwp_v1 .or. Model%ldiag_ugwp) then - allocate (Diag%dudt_ogw (IM,Model%levs)) allocate (Diag%dvdt_ogw (IM,Model%levs)) allocate (Diag%dudt_obl (IM,Model%levs)) allocate (Diag%dvdt_obl (IM,Model%levs)) @@ -7890,8 +7851,6 @@ subroutine diag_create (Diag, Model) allocate (Diag%dv3_osscol (IM) ) allocate (Diag%du3_ofdcol (IM) ) allocate (Diag%dv3_ofdcol (IM) ) - else - allocate (Diag%dudt_ogw (IM,Model%levs)) endif !--- 3D diagnostics for Thompson MP / GFDL MP @@ -8186,8 +8145,8 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center) Diag%dtdt_gw = zero Diag%kdis_gw = zero + Diag%dudt_ogw = zero if (Model%do_ugwp_v1 .or. Model%ldiag_ugwp) then - Diag%dudt_ogw = zero Diag%dvdt_ogw = zero Diag%dudt_obl = zero Diag%dvdt_obl = zero @@ -8211,24 +8170,14 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center) Diag%dv3_osscol = zero Diag%du3_ofdcol = zero Diag%dv3_ofdcol = zero - else - Diag%dudt_ogw = zero end if if (Model%ldiag_ugwp) then - Diag%du3dt_pbl = zero - Diag%dv3dt_pbl = zero - Diag%dt3dt_pbl = zero Diag%du3dt_ogw = zero Diag%du3dt_mtb = zero Diag%du3dt_tms = zero Diag%du3dt_ngw = zero Diag%dv3dt_ngw = zero - Diag%dudt_tot = zero - Diag%dvdt_tot = zero - Diag%dtdt_tot = zero - Diag%uav_ugwp = zero - Diag%tav_ugwp = zero Diag%dws3dt_ogw = zero Diag%dws3dt_obl = zero Diag%dws3dt_oss = zero @@ -8240,8 +8189,6 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center) Diag%ldu3dt_ngw = zero Diag%ldv3dt_ngw = zero Diag%ldt3dt_ngw = zero -!COORDE - Diag%du3dt_dyn = zero endif ! diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index 2fee7ba12..57f8b986c 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -697,7 +697,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (control_for_lake_model_execution_method > 0 .and. control_for_lake_model_selection == 2) + active = (control_for_lake_model_execution_method > 0 .and. control_for_lake_model_selection == clm_lake_model_control_selection_value) [use_lake_model] standard_name = flag_for_using_lake_model long_name = flag indicating lake points using a lake model @@ -711,7 +711,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (control_for_lake_model_execution_method > 0 .and. control_for_lake_model_selection == 2) + active = (control_for_lake_model_execution_method > 0 .and. control_for_lake_model_selection == clm_lake_model_control_selection_value) [lake_q2m] standard_name = specific_humidity_at_2m_from_clm_lake long_name = specific humidity at 2m from clm lake @@ -719,7 +719,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (control_for_lake_model_execution_method > 0 .and. control_for_lake_model_selection == 2) + active = (control_for_lake_model_execution_method > 0 .and. control_for_lake_model_selection == clm_lake_model_control_selection_value) [h_ML] standard_name = mixed_layer_depth_of_lakes long_name = depth of lake mixing layer @@ -727,7 +727,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (control_for_lake_model_selection == 1 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == flake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [t_ML] standard_name = lake_mixed_layer_temperature long_name = temperature of lake mixing layer @@ -735,7 +735,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (control_for_lake_model_selection == 1 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == flake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [t_mnw] standard_name = mean_temperature_of_the_water_column long_name = thee mean temperature of the water column @@ -743,7 +743,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (control_for_lake_model_selection == 1 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == flake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [h_talb] standard_name = the_thermally_active_layer_depth_of_the_bottom_sediment long_name = the depth of the thermally active layer of the bottom sediment @@ -751,7 +751,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (control_for_lake_model_selection == 1 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == flake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [t_talb] standard_name = temperature_at_the_bottom_of_the_sediment_upper_layer long_name = the temperature at the bottom of the sediment upper layer @@ -759,7 +759,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (control_for_lake_model_selection == 1 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == flake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [t_bot1] standard_name = lake_bottom_temperature long_name = the temperature at the water-bottom sediment interface @@ -767,7 +767,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (control_for_lake_model_selection == 1 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == flake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [t_bot2] standard_name = temperature_for_bottom_layer_of_water long_name = the temperature at the lake bottom layer water @@ -775,7 +775,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (control_for_lake_model_selection == 1 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == flake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [c_t] standard_name = shape_factor_of_water_temperature_vertical_profile long_name = the shape factor of water temperature vertical profile @@ -783,7 +783,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (control_for_lake_model_selection == 1 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == flake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [T_snow] standard_name = temperature_of_snow_on_lake long_name = temperature of snow on a lake @@ -1897,6 +1897,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys + active = (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme) [snowfallac_ice] standard_name = surface_snow_amount_assuming_variable_snow_density_over_ice long_name = run-total snow accumulation on the ground with variable snow density over ice @@ -1912,6 +1913,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys + active = (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme) [ustm] standard_name = surface_friction_velocity_for_momentum long_name = friction velocity isolated for momentum only @@ -2009,7 +2011,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme .or. control_for_land_surface_scheme == identifier_for_noahmp_land_surface_scheme .or. ( control_for_lake_model_execution_method > 0 .and. control_for_lake_model_selection == 2) ) + active = (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme .or. control_for_land_surface_scheme == identifier_for_noahmp_land_surface_scheme .or. ( control_for_lake_model_execution_method > 0 .and. control_for_lake_model_selection == clm_lake_model_control_selection_value) ) [rainncprv] standard_name = lwe_thickness_of_explicit_precipitation_amount_on_previous_timestep long_name = explicit rainfall from previous timestep @@ -2017,7 +2019,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme .or. control_for_land_surface_scheme == identifier_for_noahmp_land_surface_scheme .or. ( control_for_lake_model_execution_method > 0 .and. control_for_lake_model_selection == 2) ) + active = (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme .or. control_for_land_surface_scheme == identifier_for_noahmp_land_surface_scheme .or. ( control_for_lake_model_execution_method > 0 .and. control_for_lake_model_selection == clm_lake_model_control_selection_value) ) [iceprv] standard_name = lwe_thickness_of_ice_precipitation_amount_on_previous_timestep long_name = ice amount from previous timestep @@ -2117,7 +2119,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == clm_lake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [input_lakedepth] standard_name = lake_depth_before_correction long_name = lake depth_before_correction @@ -2125,7 +2127,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == clm_lake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [lake_h2osno2d] standard_name = water_equivalent_accumulated_snow_depth_in_clm_lake_model long_name = water equiv of acc snow depth over lake in clm lake model @@ -2133,7 +2135,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == clm_lake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [lake_sndpth2d] standard_name = actual_snow_depth_in_clm_lake_model long_name = actual acc snow depth over lake in clm lake model @@ -2141,7 +2143,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == clm_lake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [lake_snl2d] standard_name = snow_layers_in_clm_lake_model long_name = snow layers in clm lake model (treated as integer) @@ -2149,7 +2151,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == clm_lake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [lake_snow_z3d] standard_name = snow_level_depth_in_clm_lake_model long_name = snow level depth in clm lake model @@ -2157,7 +2159,7 @@ dimensions = (horizontal_dimension,snow_plus_soil_minus_one_vertical_dimension_for_clm_lake_model) type = real kind = kind_phys - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == clm_lake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [lake_snow_dz3d] standard_name = snow_level_thickness_in_clm_lake_model long_name = snow level thickness in clm lake model @@ -2165,7 +2167,7 @@ dimensions = (horizontal_dimension,snow_plus_soil_minus_one_vertical_dimension_for_clm_lake_model) type = real kind = kind_phys - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == clm_lake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [lake_snow_zi3d] standard_name = snow_interface_depth_in_clm_lake_model long_name = snow interface_depth in clm lake model @@ -2173,7 +2175,7 @@ dimensions = (horizontal_dimension,snow_plus_soil_vertical_dimension_for_clm_lake_model) type = real kind = kind_phys - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == clm_lake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [lake_h2osoi_vol3d] standard_name = volumetric_soil_water_in_clm_lake_model long_name = volumetric soil water in clm lake model @@ -2181,7 +2183,7 @@ dimensions = (horizontal_dimension,snow_plus_soil_minus_one_vertical_dimension_for_clm_lake_model) type = real kind = kind_phys - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == clm_lake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [lake_h2osoi_liq3d] standard_name = soil_liquid_water_content_in_clm_lake_model long_name = soil liquid water content in clm lake model @@ -2189,7 +2191,7 @@ dimensions = (horizontal_dimension,snow_plus_soil_minus_one_vertical_dimension_for_clm_lake_model) type = real kind = kind_phys - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == clm_lake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [lake_h2osoi_ice3d] standard_name = soil_ice_water_content_in_clm_lake_model long_name = soil ice water content in clm lake model @@ -2197,7 +2199,7 @@ dimensions = (horizontal_dimension,snow_plus_soil_minus_one_vertical_dimension_for_clm_lake_model) type = real kind = kind_phys - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == clm_lake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [lake_tsfc] standard_name = skin_temperature_from_lake_model long_name = skin temperature from lake model @@ -2205,7 +2207,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == clm_lake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [lake_t_soisno3d] standard_name = soil_or_snow_layer_temperature_from_clm_lake_model long_name = soil or snow layer temperature from clm lake model @@ -2213,7 +2215,7 @@ dimensions = (horizontal_dimension,snow_plus_soil_minus_one_vertical_dimension_for_clm_lake_model) type = real kind = kind_phys - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == clm_lake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [lake_t_lake3d] standard_name = lake_layer_temperature_from_clm_lake_model long_name = lake layer temperature from clm lake model @@ -2221,7 +2223,7 @@ dimensions = (horizontal_dimension,lake_vertical_dimension_for_clm_lake_model) type = real kind = kind_phys - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == clm_lake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [lake_savedtke12d] standard_name = top_level_eddy_conductivity_from_previous_timestep_in_clm_lake_model long_name = top level eddy conductivity from previous timestep in clm lake model @@ -2229,7 +2231,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == clm_lake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [lake_icefrac3d] standard_name = lake_fractional_ice_cover_on_clm_lake_levels long_name = lake fractional ice cover on clm lake levels @@ -2237,7 +2239,7 @@ dimensions = (horizontal_dimension,lake_vertical_dimension_for_clm_lake_model) type = real kind = kind_phys - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == clm_lake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [lake_ht] standard_name = test_lake_ht long_name = test_lake_ht @@ -2245,7 +2247,7 @@ units = unitless type = real kind = kind_phys - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == clm_lake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [clm_lake_initialized] standard_name = flag_for_clm_lake_initialization long_name = set to true in clm_lake_run after likeini is called for that gridpoint @@ -2253,21 +2255,21 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == clm_lake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [lake_is_salty] standard_name = clm_lake_is_salty long_name = lake at this point is salty (1) or not (0) units = 1 dimensions = (horizontal_dimension) type = integer - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == clm_lake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [lake_cannot_freeze] standard_name = clm_lake_cannot_freeze long_name = lake at this point is so salty it cannot freeze units = 1 dimensions = (horizontal_dimension) type = integer - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) + active = (control_for_lake_model_selection == clm_lake_model_control_selection_value .and. control_for_lake_model_execution_method > 0) [emdust] standard_name = emission_of_dust_for_smoke long_name = emission of dust for smoke @@ -2488,7 +2490,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_stochastic_physics_perturbations .or. flag_for_chemistry_coupling .or. flag_for_global_cellular_automata .or. flag_for_land_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_stochastic_physics_perturbations .or. flag_for_chemistry_coupling .or. flag_for_global_cellular_automata .or. flag_for_land_coupling .or. do_fire_coupling) [rainc_cpl] standard_name = cumulative_lwe_thickness_of_convective_precipitation_amount_for_coupling long_name = total convective precipitation @@ -2512,7 +2514,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling) [dvsfc_cpl] standard_name = cumulative_surface_y_momentum_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc y momentum flux multiplied by timestep @@ -2520,7 +2522,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling) [dtsfc_cpl] standard_name = cumulative_surface_upward_sensible_heat_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc sensible heat flux multiplied by timestep @@ -2528,7 +2530,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling) [dqsfc_cpl] standard_name = cumulative_surface_upward_latent_heat_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc latent heat flux multiplied by timestep @@ -2536,7 +2538,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling) [dlwsfc_cpl] standard_name = cumulative_surface_downwelling_longwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc downward lw flux mulitplied by timestep @@ -2560,7 +2562,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling) [dnirdf_cpl] standard_name = cumulative_surface_downwelling_diffuse_nir_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc nir diff downward sw flux multiplied by timestep @@ -2568,7 +2570,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling) [dvisbm_cpl] standard_name = cumulative_surface_downwelling_direct_uv_and_vis_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc uv+vis beam dnwd sw flux multiplied by timestep @@ -2576,7 +2578,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling) [dvisdf_cpl] standard_name = cumulative_surface_downwelling_diffuse_uv_and_vis_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc uv+vis diff dnwd sw flux multiplied by timestep @@ -2584,7 +2586,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling) [nlwsfc_cpl] standard_name = cumulative_surface_net_downwelling_longwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative net downward lw flux multiplied by timestep @@ -2592,7 +2594,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling) [nswsfc_cpl] standard_name = cumulative_surface_net_downwelling_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative net downward sw flux multiplied by timestep @@ -2640,7 +2642,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling) [dvsfci_cpl] standard_name = surface_y_momentum_flux_for_coupling long_name = instantaneous sfc y momentum flux @@ -2648,7 +2650,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling) [dtsfci_cpl] standard_name = surface_upward_sensible_heat_flux_for_coupling long_name = instantaneous sfc sensible heat flux @@ -2656,7 +2658,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling .or. (flag_for_air_quality_coupling .and. .not. flag_for_surface_flux_coupling)) [dqsfci_cpl] standard_name = surface_upward_latent_heat_flux_for_coupling long_name = instantaneous sfc latent heat flux @@ -2664,7 +2666,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling .or. (flag_for_air_quality_coupling .and. .not. flag_for_surface_flux_coupling)) [dlwsfci_cpl] standard_name = surface_downwelling_longwave_flux_for_coupling long_name = instantaneous sfc downward lw flux @@ -2688,7 +2690,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling) [dnirdfi_cpl] standard_name = surface_downwelling_diffuse_nir_shortwave_flux_for_coupling long_name = instantaneous sfc nir diff downward sw flux @@ -2696,7 +2698,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling) [dvisbmi_cpl] standard_name = surface_downwelling_direct_uv_and_vis_shortwave_flux_for_coupling long_name = instantaneous sfc uv+vis beam downward sw flux @@ -2704,7 +2706,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling) [dvisdfi_cpl] standard_name = surface_downwelling_diffuse_uv_and_vis_shortwave_flux_for_coupling long_name = instantaneous sfc uv+vis diff downward sw flux @@ -2712,7 +2714,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling) [nlwsfci_cpl] standard_name = surface_net_downwelling_longwave_flux_for_coupling long_name = instantaneous net sfc downward lw flux @@ -2720,7 +2722,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling) [nswsfci_cpl] standard_name = surface_net_downwelling_shortwave_flux_for_coupling long_name = instantaneous net sfc downward sw flux @@ -2728,7 +2730,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling .or. flag_for_land_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_land_coupling .or. do_fire_coupling .or. (flag_for_air_quality_coupling .and. .not. flag_for_surface_flux_coupling)) [nnirbmi_cpl] standard_name = surface_net_downwelling_direct_nir_shortwave_flux_for_coupling long_name = instantaneous net nir beam sfc downward sw flux @@ -2768,7 +2770,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling .or. do_fire_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling .or. (flag_for_air_quality_coupling .and. .not. flag_for_surface_flux_coupling)) [q2mi_cpl] standard_name = specific_humidity_at_2m_for_coupling long_name = instantaneous Q2m @@ -2776,7 +2778,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling .or. do_fire_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling .or. (flag_for_air_quality_coupling .and. .not. flag_for_surface_flux_coupling)) [u10mi_cpl] standard_name = x_wind_at_10m_for_coupling long_name = instantaneous U10m @@ -2808,7 +2810,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling .or. flag_for_land_coupling .or. do_fire_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_land_coupling .or. do_fire_coupling .or. (flag_for_air_quality_coupling .and. .not. flag_for_surface_flux_coupling)) [ulwsfcin_cpl] standard_name = surface_upwelling_longwave_flux_from_coupled_process long_name = surface upwelling LW flux for coupling @@ -2816,7 +2818,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling) [dusfcin_cpl] standard_name = surface_x_momentum_flux_from_coupled_process long_name = sfc x momentum flux for coupling @@ -2824,7 +2826,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling) [dvsfcin_cpl] standard_name = surface_y_momentum_flux_from_coupled_process long_name = sfc y momentum flux for coupling @@ -2832,7 +2834,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling) [dtsfcin_cpl] standard_name = surface_upward_sensible_heat_flux_from_coupled_process long_name = sfc sensible heat flux input @@ -2840,7 +2842,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling) [dqsfcin_cpl] standard_name = surface_upward_latent_heat_flux_from_coupled_process long_name = sfc latent heat flux input for coupling @@ -2848,7 +2850,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling) [ulwsfcin_med] standard_name = surface_upwelling_longwave_flux_over_ocean_from_mediator long_name = surface upwelling LW flux over ocean for coupling @@ -2856,7 +2858,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .and. do_mediator_atmosphere_ocean_fluxes) + active = ((flag_for_surface_flux_coupling .or. do_fire_coupling) .and. do_mediator_atmosphere_ocean_fluxes) [dusfcin_med] standard_name = surface_x_momentum_flux_over_ocean_from_mediator long_name = sfc x momentum flux over ocean for coupling @@ -2872,7 +2874,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .and. do_mediator_atmosphere_ocean_fluxes) + active = ((flag_for_surface_flux_coupling .or. do_fire_coupling) .and. do_mediator_atmosphere_ocean_fluxes) [dtsfcin_med] standard_name = surface_upward_sensible_heat_flux_over_ocean_from_mediator long_name = sfc sensible heat flux input over ocean for coupling @@ -2880,7 +2882,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .and. do_mediator_atmosphere_ocean_fluxes) + active = ((flag_for_surface_flux_coupling .or. do_fire_coupling) .and. do_mediator_atmosphere_ocean_fluxes) [dqsfcin_med] standard_name = surface_upward_latent_heat_flux_over_ocean_from_mediator long_name = sfc latent heat flux input over ocean for coupling @@ -2888,7 +2890,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .and. do_mediator_atmosphere_ocean_fluxes) + active = ((flag_for_surface_flux_coupling .or. do_fire_coupling) .and. do_mediator_atmosphere_ocean_fluxes) [sncovr1_lnd] standard_name = surface_snow_area_fraction_over_land_from_land long_name = surface snow area fraction over land for coupling @@ -3000,6 +3002,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys + active = (flag_for_surface_flux_coupling .or. do_fire_coupling) [slimskin_cpl] standard_name = area_type_from_coupled_process long_name = sea/land/ice mask input (=0/1/2) @@ -3007,7 +3010,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. do_fire_coupling) [dqdt_qmicro] standard_name = instantaneous_tendency_of_specific_humidity_due_to_microphysics long_name = instantaneous_tendency_of_specific_humidity_due_to_microphysics @@ -3134,7 +3137,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_thompson_microphysics_scheme .and. flag_for_aerosol_physics) + active = (control_for_microphysics_scheme == identifier_for_thompson_microphysics_scheme .and. (flag_for_aerosol_physics .or. do_merra2_aerosol_awareness)) [nifa2d] standard_name = tendency_of_nonhygroscopic_ice_nucleating_aerosols_at_surface_adjacent_layer long_name = instantaneous ice-friendly sfc aerosol source @@ -3142,7 +3145,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_thompson_microphysics_scheme .and. flag_for_aerosol_physics) + active = (control_for_microphysics_scheme == identifier_for_thompson_microphysics_scheme .and. (flag_for_aerosol_physics .or. do_merra2_aerosol_awareness)) [ebu_smoke] standard_name = ebu_smoke long_name = buffer of vertical fire emission @@ -8182,7 +8185,7 @@ dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys - active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection .or. control_for_deep_convection_scheme == identifier_for_c3_deep_convection .or. control_for_deep_convection_scheme == identifier_for_new_tiedtke_deep_convection .or. control_for_deep_convection_scheme == identifer_for_scale_aware_mass_flux_deep_convection .or. control_for_shallow_convection_scheme == identifier_for_scale_aware_mass_flux_shallow_convection) + active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection .or. control_for_deep_convection_scheme == identifier_for_c3_deep_convection .or. control_for_deep_convection_scheme == identifier_for_new_tiedtke_deep_convection .or. control_for_deep_convection_scheme == identifer_for_scale_aware_mass_flux_deep_convection .or. control_for_shallow_convection_scheme == identifier_for_scale_aware_mass_flux_shallow_convection .or. control_for_shallow_convection_scheme == identifier_for_c3_shallow_convection) [cactiv] standard_name = counter_for_grell_freitas_convection long_name = convective activity memory @@ -9310,7 +9313,7 @@ dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys - active = (flag_for_tracer_diagnostics_3D) + active = (flag_for_diagnostics_3D .and. flag_for_tracer_diagnostics_3D) [dwn_mf] standard_name = cumulative_atmosphere_downdraft_convective_mass_flux long_name = cumulative downdraft mass flux @@ -9318,7 +9321,7 @@ dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys - active = (flag_for_tracer_diagnostics_3D) + active = (flag_for_diagnostics_3D .and. flag_for_tracer_diagnostics_3D) [det_mf] standard_name = cumulative_atmosphere_detrainment_convective_mass_flux long_name = cumulative detrainment mass flux @@ -9326,7 +9329,7 @@ dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys - active = (flag_for_tracer_diagnostics_3D) + active = (flag_for_diagnostics_3D .and. flag_for_tracer_diagnostics_3D) [do3_dt_prd] standard_name = ozone_tendency_due_to_production_and_loss_rate long_name = ozone tendency due to production and loss rate @@ -9334,7 +9337,7 @@ dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys - active = (flag_for_tracer_diagnostics_3D .and. flag_for_nrl_2015_ozone_scheme) + active = (flag_for_diagnostics_3D .and. flag_for_nrl_2015_ozone_scheme) [do3_dt_ozmx] standard_name = ozone_tendency_due_to_ozone_mixing_ratio long_name = ozone tendency due to ozone mixing ratio @@ -9342,7 +9345,7 @@ dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys - active = (flag_for_tracer_diagnostics_3D .and. flag_for_nrl_2015_ozone_scheme) + active = (flag_for_diagnostics_3D .and. flag_for_nrl_2015_ozone_scheme) [do3_dt_temp] standard_name = ozone_tendency_due_to_temperature long_name = ozone tendency due to temperature @@ -9350,7 +9353,7 @@ dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys - active = (flag_for_tracer_diagnostics_3D .and. flag_for_nrl_2015_ozone_scheme) + active = (flag_for_diagnostics_3D .and. flag_for_nrl_2015_ozone_scheme) [do3_dt_ohoz] standard_name = ozone_tendency_due_to_overhead_ozone_column long_name = ozone tendency due to overhead ozone column @@ -9358,7 +9361,7 @@ dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys - active = (flag_for_tracer_diagnostics_3D .and. flag_for_nrl_2015_ozone_scheme) + active = (flag_for_diagnostics_3D .and. flag_for_nrl_2015_ozone_scheme) [refl_10cm] standard_name = radar_reflectivity_10cm long_name = instantaneous refl_10cm @@ -9523,7 +9526,7 @@ dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys - active = (flag_for_mellor_yamada_nakanishi_niino_pbl_scheme .and. control_for_tke_budget_output == 1) + active = (flag_for_mellor_yamada_nakanishi_niino_pbl_scheme .and. control_for_tke_budget_output > 0) [qwt] standard_name = tke_tendency_due_to_vertical_transport long_name = tke tendency due to vertical transport and diffusion @@ -9531,7 +9534,7 @@ dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys - active = (flag_for_mellor_yamada_nakanishi_niino_pbl_scheme .and. control_for_tke_budget_output == 1) + active = (flag_for_mellor_yamada_nakanishi_niino_pbl_scheme .and. control_for_tke_budget_output > 0) [qshear] standard_name = tke_tendency_due_to_shear long_name = tke tendency due to shear @@ -9539,7 +9542,7 @@ dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys - active = (flag_for_mellor_yamada_nakanishi_niino_pbl_scheme .and. control_for_tke_budget_output == 1) + active = (flag_for_mellor_yamada_nakanishi_niino_pbl_scheme .and. control_for_tke_budget_output > 0) [qbuoy] standard_name = tke_tendency_due_to_buoyancy long_name = tke tendency due to buoyancy production or consumption @@ -9547,7 +9550,7 @@ dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys - active = (flag_for_mellor_yamada_nakanishi_niino_pbl_scheme .and. control_for_tke_budget_output == 1) + active = (flag_for_mellor_yamada_nakanishi_niino_pbl_scheme .and. control_for_tke_budget_output > 0) [qdiss] standard_name = tke_tendency_due_to_dissipation long_name = tke tendency due to the dissipation of tke @@ -9555,7 +9558,7 @@ dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys - active = (flag_for_mellor_yamada_nakanishi_niino_pbl_scheme .and. control_for_tke_budget_output == 1) + active = (flag_for_mellor_yamada_nakanishi_niino_pbl_scheme .and. control_for_tke_budget_output > 0) [maxwidth] standard_name = maximum_width_of_plumes long_name = maximum width of plumes per grid column @@ -9580,12 +9583,6 @@ type = real kind = kind_phys active = (flag_for_mellor_yamada_nakanishi_niino_pbl_scheme) -[ktop_shallow] - standard_name = k_level_of_highest_reaching_plume - long_name = k-level of highest reaching plume - units = count - dimensions = (horizontal_dimension) - type = integer [ktop_plume] standard_name = k_level_of_highest_plume long_name = k-level of highest plume @@ -9813,7 +9810,6 @@ dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys - active = (flag_for_ugwp_version_1 .or. flag_for_unified_gravity_wave_physics_diagnostics) [dvdt_ogw] standard_name = tendency_of_y_wind_due_to_mesoscale_orographic_gravity_wave_drag long_name = y wind tendency from meso scale ogw @@ -10037,6 +10033,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys + active = (flag_to_print_pgr_differences_every_timestep) [ltg1_max] standard_name = lightning_threat_index_1 long_name = lightning threat index 1 diff --git a/ccpp/driver/GFS_diagnostics.F90 b/ccpp/driver/GFS_diagnostics.F90 index 019711825..ea70c93de 100644 --- a/ccpp/driver/GFS_diagnostics.F90 +++ b/ccpp/driver/GFS_diagnostics.F90 @@ -2817,10 +2817,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop endif if (Model%ldiag_ugwp) THEN -! -! VAY-2018: Momentum and Temp-re tendencies -! du3dt_pbl dv3dt_pbl dT3dt_pbl -! + idx = idx + 1 ExtDiag(idx)%axes = 2 ExtDiag(idx)%name = 'zmtb' @@ -2898,67 +2895,6 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%data(nb)%var2 => IntDiag%tau_ngw(Model%chunk_begin(nb):Model%chunk_end(nb)) enddo - idx = idx + 1 - ExtDiag(idx)%axes = 3 - ExtDiag(idx)%name = 'du3dt_pbl_ugwp' - ExtDiag(idx)%desc = 'U-tendency due to PBL physics' - ExtDiag(idx)%unit = 'm/s/s' - ExtDiag(idx)%mod_name = 'gfs_phys' - allocate (ExtDiag(idx)%data(nblks)) - do nb = 1,nblks - ExtDiag(idx)%data(nb)%var3 => IntDiag%du3dt_pbl(Model%chunk_begin(nb):Model%chunk_end(nb),:) - enddo -! -! dv3dt_pbl - idx = idx + 1 - ExtDiag(idx)%axes = 3 - ExtDiag(idx)%name = 'dv3dt_pbl_ugwp' - ExtDiag(idx)%desc = 'V-tendency due to PBL physics' - ExtDiag(idx)%unit = 'm/s/s' - ExtDiag(idx)%mod_name = 'gfs_phys' - allocate (ExtDiag(idx)%data(nblks)) - do nb = 1,nblks - ExtDiag(idx)%data(nb)%var3 => IntDiag%dv3dt_pbl(Model%chunk_begin(nb):Model%chunk_end(nb),:) - enddo -! -! dt3dt_pbl - idx = idx + 1 - ExtDiag(idx)%axes = 3 - ExtDiag(idx)%name = 'dt3dt_pbl_ugwp' - ExtDiag(idx)%desc = 'T-tendency due to PBL physics' - ExtDiag(idx)%unit = 'K/s' - ExtDiag(idx)%mod_name = 'gfs_phys' - allocate (ExtDiag(idx)%data(nblks)) - do nb = 1,nblks - ExtDiag(idx)%data(nb)%var3 => IntDiag%dt3dt_pbl(Model%chunk_begin(nb):Model%chunk_end(nb),:) - enddo -! -! uav_ugwp -! - idx = idx + 1 - ExtDiag(idx)%axes = 3 - ExtDiag(idx)%name = 'uav_ugwp' - ExtDiag(idx)%desc = 'U-daily mean for UGWP' - ExtDiag(idx)%unit = 'm/s' - ExtDiag(idx)%mod_name = 'gfs_phys' - allocate (ExtDiag(idx)%data(nblks)) - do nb = 1,nblks - ExtDiag(idx)%data(nb)%var3 => IntDiag%uav_ugwp(Model%chunk_begin(nb):Model%chunk_end(nb),:) - enddo -! -! tav_ugwp -! - idx = idx + 1 - ExtDiag(idx)%axes = 3 - ExtDiag(idx)%name = 'tav_ugwp' - ExtDiag(idx)%desc = 'T-daily mean for UGWP' - ExtDiag(idx)%unit = 'K' - ExtDiag(idx)%mod_name = 'gfs_phys' - allocate (ExtDiag(idx)%data(nblks)) - do nb = 1,nblks - ExtDiag(idx)%data(nb)%var3 => IntDiag%tav_ugwp(Model%chunk_begin(nb):Model%chunk_end(nb),:) - enddo - idx = idx + 1 ExtDiag(idx)%axes = 3 ExtDiag(idx)%name = 'du3dt_ogw' @@ -3004,28 +2940,6 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%data(nb)%var3 => IntDiag%du3dt_tms(Model%chunk_begin(nb):Model%chunk_end(nb),:) enddo - idx = idx + 1 - ExtDiag(idx)%axes = 3 - ExtDiag(idx)%name = 'dudt_tot' - ExtDiag(idx)%desc = ' dudt_tot averaged E-W dycore-tendency' - ExtDiag(idx)%unit = 'm/s/s' - ExtDiag(idx)%mod_name = 'gfs_phys' - allocate (ExtDiag(idx)%data(nblks)) - do nb = 1,nblks - ExtDiag(idx)%data(nb)%var3 => IntDiag%dudt_tot(Model%chunk_begin(nb):Model%chunk_end(nb),:) - enddo - - idx = idx + 1 - ExtDiag(idx)%axes = 3 - ExtDiag(idx)%name = 'dtdt_tot' - ExtDiag(idx)%desc = ' dtdt_tot averaged Temp dycore-tendency' - ExtDiag(idx)%unit = 'Ks' - ExtDiag(idx)%mod_name = 'gfs_phys' - allocate (ExtDiag(idx)%data(nblks)) - do nb = 1,nblks - ExtDiag(idx)%data(nb)%var3 => IntDiag%dtdt_tot(Model%chunk_begin(nb):Model%chunk_end(nb),:) - enddo - idx = idx + 1 ExtDiag(idx)%axes = 3 ExtDiag(idx)%name = 'dudt_ogw' diff --git a/ccpp/physics b/ccpp/physics index f3eeb3442..002a886ee 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit f3eeb3442775b7239d98e3d09acc6d4f1d42233e +Subproject commit 002a886eeb14979a6811f89e885d2968cbfd9b70 From 8f7cab2f7c8dbc9929daf2a4a43f4b6ee718f6ed Mon Sep 17 00:00:00 2001 From: "Tseganeh Z. Gichamo" Date: Mon, 18 Nov 2024 15:15:50 -0500 Subject: [PATCH 07/10] Add soil temperature and moisture IAU (#866) * add lnd_iau_mod.F90 as dependency for the GFS_typedefs module * set land_iau_control from host * calculate snowsoil mask at runtime * combine DDTs holding increments; get rid of scheme level global array * move weight factors to _IAU_Data * update noahmpdrv meta * error handling for read_iau_forcing_fv3 * update for NoahMP component model --------- Co-authored-by: Grant Firl Co-authored-by: Tseganeh Gichamo <1621305073113305@mil> --- ccpp/config/ccpp_prebuild_config.py | 7 +++ ccpp/data/GFS_typedefs.F90 | 71 ++++++++++++++++++++++++++++- ccpp/data/GFS_typedefs.meta | 20 +++++++- ccpp/driver/CCPP_driver.F90 | 16 +++++++ ccpp/physics | 2 +- 5 files changed, 112 insertions(+), 4 deletions(-) diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index 7714774fb..5e91f3ef6 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -21,6 +21,7 @@ 'physics/physics/Radiation/RRTMG/radlw_param.f', 'physics/physics/photochem/module_ozphys.F90', 'physics/physics/photochem/module_h2ophys.F90', + 'physics/physics/SFC_Models/Land/Noahmp/lnd_iau_mod.F90', 'data/CCPP_typedefs.F90', 'data/GFS_typedefs.F90', 'data/CCPP_data.F90', @@ -49,6 +50,12 @@ 'module_h2ophys' : '', 'ty_h2ophys' : '', }, + 'land_iau_mod' : { + 'land_iau_mod' : '', + 'land_iau_external_data_type' : '', + 'land_iau_state_type' : '', + 'land_iau_control_type' : '', + }, 'CCPP_typedefs' : { 'GFS_interstitial_type' : 'GFS_Interstitial(cdata%thrd_no)', 'GFDL_interstitial_type' : 'GFDL_interstitial', diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index ef9411546..b5575b7ca 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -16,6 +16,8 @@ module GFS_typedefs use module_radlw_parameters, only: topflw_type, sfcflw_type use module_ozphys, only: ty_ozphys use module_h2ophys, only: ty_h2ophys + use land_iau_mod, only: land_iau_external_data_type, land_iau_control_type, & + land_iau_state_type, land_iau_mod_set_control implicit none @@ -480,7 +482,12 @@ module GFS_typedefs !--- For smoke and dust auxiliary inputs real (kind=kind_phys), pointer :: fire_in (:,:) => null() !< fire auxiliary inputs - + + !--- Land IAU DDTs + type(land_iau_external_data_type) :: land_iau_data + type(land_iau_control_type) :: land_iau_control + type(land_iau_state_type) :: land_iau_state + contains procedure :: create => sfcprop_create !< allocate array data end type GFS_sfcprop_type @@ -1644,6 +1651,19 @@ module GFS_typedefs type(ty_h2ophys) :: h2ophys !< DDT with data needed by h2o photchemistry physics. integer :: levh2o !< Number of vertical layers in stratospheric h2o data. integer :: h2o_coeff !< Number of coefficients in stratospheric h2o data. + +! !--- Land IAU +! !> land iau setting read from namelist +! logical :: do_land_iau +! real(kind=kind_phys) :: land_iau_delthrs +! character(len=240) :: land_iau_inc_files(7) +! real(kind=kind_phys) :: land_iau_fhrs(7) +! logical :: land_iau_filter_increments +! integer :: lsoil_incr +! logical :: land_iau_upd_stc +! logical :: land_iau_upd_slc +! logical :: land_iau_do_stcsmc_adjustment +! real(kind=kind_phys) :: land_iau_min_T_increment contains procedure :: init => control_initialize @@ -2296,6 +2316,9 @@ subroutine sfcprop_create (Sfcprop, Model) type(GFS_control_type), intent(in) :: Model integer :: IM + character(len=512) :: errmsg + integer :: errflg + IM = Model%ncols !--- physics and radiation @@ -2864,6 +2887,20 @@ subroutine sfcprop_create (Sfcprop, Model) Sfcprop%smoke_fire = zero endif + ! land iau control setting + call land_iau_mod_set_control(Sfcprop%land_iau_control, & + Model%fn_nml, Model%input_nml_file, Model%me, Model%master, & + Model%isc, Model%jsc, Model%nx, Model%ny, Model%tile_num, Model%nblks, Model%blksz, & + Model%lsoil, Model%lsnow_lsm, Model%dtp, Model%fhour, errmsg, errflg) + + if (errflg/=0) then + if (Model%me==Model%master) then + write(0,'(a)') "Error inside sfcprop_create" + write(0,'(a)') trim(errmsg) + stop + endif + endif + end subroutine sfcprop_create @@ -3987,6 +4024,18 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & real(kind=kind_phys) :: radar_tten_limits(2) = (/ limit_unspecified, limit_unspecified /) integer :: itime + ! !> land iau setting read from namelist + ! logical :: do_land_iau = .false. + ! real(kind=kind_phys) :: land_iau_delthrs = 0 + ! character(len=240) :: land_iau_inc_files(7) = '' + ! real(kind=kind_phys) :: land_iau_fhrs(7) = -1 + ! logical :: land_iau_filter_increments = .false. + ! integer :: lsoil_incr = 4 + ! logical :: land_iau_upd_stc = .false. + ! logical :: land_iau_upd_slc = .false. + ! logical :: land_iau_do_stcsmc_adjustment = .false. + ! real(kind=kind_phys) :: land_iau_min_T_increment = 0.0001 + !--- END NAMELIST VARIABLES NAMELIST /gfs_physics_nml/ & @@ -4143,7 +4192,13 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & ! and (maybe) convection suppression fh_dfi_radar, radar_tten_limits, do_cap_suppress, & !--- GSL lightning threat indices - lightning_threat + lightning_threat !, & + ! !--- land_iau_nml + ! do_land_iau, land_iau_delthrs, land_iau_inc_files, & + ! land_iau_fhrs, land_iau_filter_increments, lsoil_incr, & + ! land_iau_upd_stc, land_iau_upd_slc, & + ! land_iau_do_stcsmc_adjustment, land_iau_min_T_increment + !--- other parameters integer :: nctp = 0 !< number of cloud types in CS scheme @@ -6257,6 +6312,18 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & endif !--- END CODE FROM GLOOPB +! !---Land IAU Settings +! Model%do_land_iau = do_land_iau +! Model%iau_delthrs = land_iau_delthrs +! Model%iau_inc_files = land_iau_inc_files +! Model%iaufhrs = land_iau_fhrs +! Model%iau_filter_increments = land_iau_filter_increments +! Model%lsoil_incr = lsoil_incr +! Model%upd_stc = land_iau_upd_stc +! Model%upd_slc = land_iau_upd_slc +! Model%do_stcsmc_adjustment = land_iau_do_stcsmc_adjustment +! Model%min_T_increment = land_iau_min_T_increment + call Model%print () end subroutine control_initialize diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index 57f8b986c..ca845658c 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -2389,6 +2389,24 @@ type = real kind = kind_phys active = (do_fire_coupling) +[land_iau_data] + standard_name = land_data_assimilation_data + long_name = land data assimilation data + units = mixed + dimensions = () + type = land_iau_external_data_type +[land_iau_control] + standard_name = land_data_assimilation_control + long_name = land data assimilation control + units = mixed + dimensions = () + type = land_iau_control_type +[land_iau_state] + standard_name = land_data_assimilation_interpolated_data + long_name = land data assimilation space- and time-interpolated + units = mixed + dimensions = () + type = land_iau_state_type ######################################################################## [ccpp-table-properties] @@ -10070,7 +10088,7 @@ dependencies = hooks/machine.F,hooks/physcons.F90 dependencies = Radiation/RRTMG/radlw_param.f,Radiation/RRTMG/radsw_param.f dependencies = photochem/module_ozphys.F90,photochem/module_h2ophys.F90 - dependencies = MP/GFDL/GFDL_parse_tracers.F90 + dependencies = SFC_Models/Land/Noahmp/lnd_iau_mod.F90,MP/GFDL/GFDL_parse_tracers.F90 [ccpp-arg-table] name = GFS_typedefs diff --git a/ccpp/driver/CCPP_driver.F90 b/ccpp/driver/CCPP_driver.F90 index b931998f5..065e97ef9 100644 --- a/ccpp/driver/CCPP_driver.F90 +++ b/ccpp/driver/CCPP_driver.F90 @@ -132,6 +132,14 @@ subroutine CCPP_step (step, nblks, ierr) return end if + ! call timestep_init for "physics"---required for Land IAU + call ccpp_physics_timestep_init(cdata_domain, suite_name=trim(ccpp_suite),group_name="physics", ierr=ierr) + if (ierr/=0) then + write(0,'(a)') "An error occurred in ccpp_physics_timestep_init for group physics" + write(0,'(a)') trim(cdata_domain%errmsg) + return + end if + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! DH* 20210104 - this block of code will be removed once the CCPP framework ! ! fully supports handling diagnostics through its metadata, work in progress ! @@ -214,6 +222,14 @@ subroutine CCPP_step (step, nblks, ierr) return end if + ! call timestep_finalize for "physics"---required for Land IAU + call ccpp_physics_timestep_finalize(cdata_domain, suite_name=trim(ccpp_suite), group_name="physics", ierr=ierr) + if (ierr/=0) then + write(0,'(a)') "An error occurred in ccpp_physics_timestep_finalize for group physics" + write(0,'(a)') trim(cdata_domain%errmsg) + return + end if + ! Physics finalize else if (trim(step)=="physics_finalize") then diff --git a/ccpp/physics b/ccpp/physics index 002a886ee..cfa18610e 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 002a886eeb14979a6811f89e885d2968cbfd9b70 +Subproject commit cfa18610e546ddb633c117afd394bf4aaaeec4dc From 71a47292c920a41e2a8e6f71abff33059445d14f Mon Sep 17 00:00:00 2001 From: WenMeng-NOAA <48260754+WenMeng-NOAA@users.noreply.github.com> Date: Thu, 21 Nov 2024 12:32:42 -0500 Subject: [PATCH 08/10] Inline post Updates (#880) * 1)update upp hash; 2)update inline post interface. * update upp hash to ce258fca --- io/module_write_internal_state.F90 | 1 + io/post_fv3.F90 | 43 +++++++++++++++++++++++++++--- upp | 2 +- 3 files changed, 42 insertions(+), 4 deletions(-) diff --git a/io/module_write_internal_state.F90 b/io/module_write_internal_state.F90 index 0f81fc9c0..919a7bcb4 100644 --- a/io/module_write_internal_state.F90 +++ b/io/module_write_internal_state.F90 @@ -98,6 +98,7 @@ module write_internal_state integer :: ncld !< Number of hydrometeors. integer :: nsoil !< Number of soil layers. integer :: imp_physics !< Choice of microphysics scheme. + integer :: landsfcmdl !< Choice of land surface model. integer :: dtp !< Physics timestep. real,dimension(:),allocatable :: ak !< a parameter for sigma pressure level calculations. real,dimension(:),allocatable :: bk !< b parameter for sigma pressure level calculations. diff --git a/io/post_fv3.F90 b/io/post_fv3.F90 index 17b1572f1..a74e47670 100644 --- a/io/post_fv3.F90 +++ b/io/post_fv3.F90 @@ -430,7 +430,9 @@ subroutine post_getattr_fv3(wrt_int_state,grid_id) if (trim(attName) == 'ncnsto') wrt_int_state%ntrac=varival if (trim(attName) == 'ncld') wrt_int_state%ncld=varival if (trim(attName) == 'nsoil') wrt_int_state%nsoil=varival + if (trim(attName) == 'fhzero') wrt_int_state%fhzero=varival if (trim(attName) == 'imp_physics') wrt_int_state%imp_physics=varival + if (trim(attName) == 'landsfcmdl') wrt_int_state%landsfcmdl=varival endif else if (typekind==ESMF_TYPEKIND_R4) then if(n==1) then @@ -554,7 +556,7 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp) no3cb, nh4cb, dusmass, ducmass, dusmass25,ducmass25, & snownc, graupelnc, qrmax, hail_maxhailcast, & smoke_ave,dust_ave,coarsepm_ave,swddif,swddni, & - xlaixy + xlaixy,wspd10umax,wspd10vmax use soil, only: sldpth, sh2o, smc, stc, sllevel use masks, only: lmv, lmh, htm, vtm, gdlat, gdlon, dx, dy, hbm2, sm, sice use ctlblk_mod, only: im, jm, lm, lp1, jsta, jend, jsta_2l, jend_2u, jsta_m,jend_m, & @@ -628,7 +630,7 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp) ! imp_physics = wrt_int_state%imp_physics !set GFS mp physics to 99 for Zhao scheme dtp = wrt_int_state%dtp - iSF_SURFACE_PHYSICS = 2 + iSF_SURFACE_PHYSICS = wrt_int_state%landsfcmdl spval = 9.99e20 ! ! nems gfs has zhour defined @@ -1367,13 +1369,48 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp) enddo endif + ! max temporal 10m agl wind speed + if (modelname =='GFS')then + if(trim(fieldname)=='wind10m_max') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,wspd10max,arrayr42d,sm,fillValue) + do j=jsta,jend + do i=ista, iend + wspd10max(i,j) = arrayr42d(i,j) + if (abs(arrayr42d(i,j)-fillValue) < small) wspd10max(i,j) = spval + enddo + enddo + endif + else ! max hourly 10m agl wind speed if(trim(fieldname)=='spd10max') then !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,wspd10max,arrayr42d,sm,fillValue) - do j=jsta,jend + do j=jsta,jend do i=ista, iend wspd10max(i,j) = arrayr42d(i,j) if (abs(arrayr42d(i,j)-fillValue) < small) wspd10max(i,j) = spval + enddo + enddo + endif + endif !end modelname + + ! u comp of temporal max 10m agl wind speed + if(trim(fieldname)=='u10m_max') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,wspd10umax,arrayr42d,sm,fillValue) + do j=jsta,jend + do i=ista, iend + wspd10umax(i,j) = arrayr42d(i,j) + if (abs(arrayr42d(i,j)-fillValue) < small) wspd10umax(i,j) = spval + enddo + enddo + endif + + ! v comp of temporal max 10m agl wind speed + if(trim(fieldname)=='v10m_max') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,wspd10vmax,arrayr42d,sm,fillValue) + do j=jsta,jend + do i=ista, iend + wspd10vmax(i,j) = arrayr42d(i,j) + if (abs(arrayr42d(i,j)-fillValue) < small) wspd10vmax(i,j) = spval enddo enddo endif diff --git a/upp b/upp index 6f5dd627d..ce5f3b146 160000 --- a/upp +++ b/upp @@ -1 +1 @@ -Subproject commit 6f5dd627d124ae94bb5ed7f5afd22f82c470b1b7 +Subproject commit ce5f3b146861cf6c95e1c14c640ede1ed97e6eef From b769849792dbe799dc1a2e29942864f880ee8445 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 25 Nov 2024 10:19:15 -0500 Subject: [PATCH 09/10] Third reconciliation PR from production/RRFS.v1 (#882) * streamline Thompson-Eidhammer microphysics: add new physical constant metadata --- ccpp/data/GFS_typedefs.F90 | 3 ++- ccpp/data/GFS_typedefs.meta | 28 ++++++++++++++++++++++++++++ ccpp/physics | 2 +- 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index b5575b7ca..f904b2f24 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -10,7 +10,8 @@ module GFS_typedefs con_csol, con_epsqs, con_rocp, con_rog, & con_omega, con_rerth, con_psat, karman, rainmin,& con_c, con_plnk, con_boltz, con_solr_2008, & - con_solr_2002, con_thgni, con_1ovg + con_solr_2002, con_thgni, con_1ovg, con_rgas, & + con_avgd, con_amd, con_amw use module_radsw_parameters, only: topfsw_type, sfcfsw_type use module_radlw_parameters, only: topflw_type, sfcflw_type diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index ca845658c..567d0e37e 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -10439,3 +10439,31 @@ dimensions = () type = real kind = kind_phys +[con_rgas] + standard_name = molar_gas_constant + long_name = universal ideal molar gas constant + units = J K-1 mol-1 + dimensions = () + type = real + kind = kind_phys +[con_avgd] + standard_name = avogadro_consant + long_name = Avogadro constant + units = mol-1 + dimensions = () + type = real + kind = kind_phys +[con_amd] + standard_name = molecular_weight_of_dry_air + long_name = molecular weight of dry air + units = g mol-1 + dimensions = () + type = real + kind = kind_phys +[con_amw] + standard_name = molecular_weight_of_water_vapor + long_name = molecular weight of water vapor + units = g mol-1 + dimensions = () + type = real + kind = kind_phys diff --git a/ccpp/physics b/ccpp/physics index cfa18610e..6e0467ad0 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit cfa18610e546ddb633c117afd394bf4aaaeec4dc +Subproject commit 6e0467ad07a2231d298dc3be91a923c934354a7f From 1648e176fa869d0ca9ce9ea5822b3594afd8c353 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Fri, 6 Dec 2024 09:43:13 -0500 Subject: [PATCH 10/10] Fourth reconciliation PR from production/RRFS.v1 (#883) * Update the MYNN PBL, Smoke and subgrid cloud fraction for the RRFS.v1 code freeze. * New (not in RRFSv1): update ccpp-framework commit hash (only updates required cmake version) --------- Co-authored-by: Haiqin.Li --- atmos_cubed_sphere | 2 +- ccpp/data/CCPP_typedefs.F90 | 4 +- ccpp/data/GFS_typedefs.F90 | 176 ++++++++++++++++------------- ccpp/data/GFS_typedefs.meta | 35 +++++- ccpp/driver/GFS_diagnostics.F90 | 12 ++ ccpp/framework | 2 +- ccpp/physics | 2 +- ccpp/suites/suite_RRFSens_phy1.xml | 2 + ccpp/suites/suite_RRFSens_phy4.xml | 2 + io/fv3atm_rrfs_sd_io.F90 | 4 +- 10 files changed, 152 insertions(+), 89 deletions(-) diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index e36e8572e..9490871a6 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit e36e8572e7643d7e59a3979a61bdd83743ff7b00 +Subproject commit 9490871a616604efe9dd75608214081eef557ad6 diff --git a/ccpp/data/CCPP_typedefs.F90 b/ccpp/data/CCPP_typedefs.F90 index 2a0355264..1f5deaec2 100644 --- a/ccpp/data/CCPP_typedefs.F90 +++ b/ccpp/data/CCPP_typedefs.F90 @@ -1620,8 +1620,8 @@ subroutine gfdl_interstitial_create (Interstitial, is, ie, isd, ied, js, je, jsd else Interstitial%ngas = 0 end if - allocate(Interstitial%rilist(0:Interstitial%ngas)) - allocate(Interstitial%cpilist(0:Interstitial%ngas)) + allocate (Interstitial%rilist(0:Interstitial%ngas)) + allocate (Interstitial%cpilist(0:Interstitial%ngas)) if (present(rilist)) then Interstitial%rilist = rilist(0:Interstitial%ngas) Interstitial%cpilist = cpilist(0:Interstitial%ngas) diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index f904b2f24..dd38035f7 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -663,6 +663,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: max_fplume (:) => null() !< maximum plume rise level real (kind=kind_phys), pointer :: uspdavg (:) => null() !< BL average wind speed real (kind=kind_phys), pointer :: hpbl_thetav (:) => null() !< BL depth parcel method + real (kind=kind_phys), pointer :: rho_dry (:,:) => null() !< dry air density 3D array !--- hourly fire potential index real (kind=kind_phys), pointer :: rrfs_hwp (:) => null() !< hourly fire potential index real (kind=kind_phys), pointer :: rrfs_hwp_ave (:) => null() !< *Average* hourly fire potential index @@ -1221,6 +1222,9 @@ module GFS_typedefs integer :: ichoice = 0 !< flag for closure of C3/GF deep convection integer :: ichoicem = 13!< flag for closure of C3/GF mid convection integer :: ichoice_s = 3 !< flag for closure of C3/GF shallow convection + integer :: conv_cf_opt !< option for convection scheme cloud fraction computation + !< 0: Chaboureau-Bechtold + !< 1: Xu-Randall integer :: nmtvr !< number of topographic variables such as variance etc !< used in the GWD parameterization - 10 more added if @@ -1565,6 +1569,7 @@ module GFS_typedefs real(kind=kind_phys) :: dust_alpha !< alpha parameter for fengsha dust scheme real(kind=kind_phys) :: dust_gamma !< gamma parameter for fengsha dust scheme real(kind=kind_phys) :: wetdep_ls_alpha !< alpha parameter for wet deposition + real(kind=kind_phys) :: plume_alpha !< alpha parameter for plumerise scheme integer :: ebb_dcycle !< 1:retro; 2:forecast of fire emission integer :: seas_opt integer :: dust_opt @@ -1578,6 +1583,7 @@ module GFS_typedefs integer :: plumerisefire_frq integer :: n_dbg_lines integer :: smoke_forecast + logical :: add_fire_moist_flux ! Flag to add moisture fluxes based on PM2.5 emissions logical :: aero_ind_fdb ! WFA/IFA indirect logical :: aero_dir_fdb ! smoke/dust direct logical :: rrfs_smoke_debug @@ -2371,12 +2377,12 @@ subroutine sfcprop_create (Sfcprop, Model) allocate (Sfcprop%hprime (IM,Model%nmtvr)) allocate (Sfcprop%dust12m_in (IM,12,5)) allocate (Sfcprop%smoke_RRFS(IM,24,2)) - allocate (Sfcprop%smoke2d_RRFS(IM,4)) + allocate (Sfcprop%smoke2d_RRFS(IM,5)) allocate (Sfcprop%emi_in (IM,1)) - allocate(Sfcprop%albdirvis_lnd (IM)) - allocate(Sfcprop%albdirnir_lnd (IM)) - allocate(Sfcprop%albdifvis_lnd (IM)) - allocate(Sfcprop%albdifnir_lnd (IM)) + allocate (Sfcprop%albdirvis_lnd (IM)) + allocate (Sfcprop%albdirnir_lnd (IM)) + allocate (Sfcprop%albdifvis_lnd (IM)) + allocate (Sfcprop%albdifnir_lnd (IM)) allocate (Sfcprop%emis_lnd (IM)) allocate (Sfcprop%emis_ice (IM)) allocate (Sfcprop%emis_wat (IM)) @@ -2610,14 +2616,14 @@ subroutine sfcprop_create (Sfcprop, Model) end if if (Model%lsm == Model%lsm_ruc .or. Model%lsm == Model%lsm_noahmp .or. & (Model%lkm>0 .and. Model%iopt_lake==Model%iopt_lake_clm)) then - allocate(Sfcprop%raincprv (IM)) - allocate(Sfcprop%rainncprv (IM)) + allocate (Sfcprop%raincprv (IM)) + allocate (Sfcprop%rainncprv (IM)) Sfcprop%raincprv = clear_val Sfcprop%rainncprv = clear_val if (Model%lsm == Model%lsm_ruc .or. Model%lsm == Model%lsm_noahmp) then - allocate(Sfcprop%iceprv (IM)) - allocate(Sfcprop%snowprv (IM)) - allocate(Sfcprop%graupelprv(IM)) + allocate (Sfcprop%iceprv (IM)) + allocate (Sfcprop%snowprv (IM)) + allocate (Sfcprop%graupelprv(IM)) Sfcprop%iceprv = clear_val Sfcprop%snowprv = clear_val Sfcprop%graupelprv = clear_val @@ -2696,11 +2702,11 @@ subroutine sfcprop_create (Sfcprop, Model) Sfcprop%smoiseq = clear_val Sfcprop%zsnsoxy = clear_val - allocate(Sfcprop%draincprv (IM)) - allocate(Sfcprop%drainncprv (IM)) - allocate(Sfcprop%diceprv (IM)) - allocate(Sfcprop%dsnowprv (IM)) - allocate(Sfcprop%dgraupelprv(IM)) + allocate (Sfcprop%draincprv (IM)) + allocate (Sfcprop%drainncprv (IM)) + allocate (Sfcprop%diceprv (IM)) + allocate (Sfcprop%dsnowprv (IM)) + allocate (Sfcprop%dgraupelprv(IM)) Sfcprop%draincprv = clear_val Sfcprop%drainncprv = clear_val @@ -2711,11 +2717,11 @@ subroutine sfcprop_create (Sfcprop, Model) endif if (Model%do_myjsfc .or. Model%do_myjpbl) then - allocate(Sfcprop%z0base(IM)) + allocate (Sfcprop%z0base(IM)) Sfcprop%z0base = clear_val end if - allocate(Sfcprop%semisbase(IM)) + allocate (Sfcprop%semisbase(IM)) Sfcprop%semisbase = clear_val if (Model%lsm == Model%lsm_ruc) then @@ -2799,29 +2805,29 @@ subroutine sfcprop_create (Sfcprop, Model) ! CLM Lake Model variables if (Model%lkm/=0 .and. Model%iopt_lake==Model%iopt_lake_clm) then - allocate(Sfcprop%lake_t2m(IM)) - allocate(Sfcprop%lake_q2m(IM)) - allocate(Sfcprop%lake_albedo(IM)) - allocate(Sfcprop%input_lakedepth(IM)) - allocate(Sfcprop%lake_h2osno2d(IM)) - allocate(Sfcprop%lake_sndpth2d(IM)) - allocate(Sfcprop%lake_snl2d(IM)) - allocate(Sfcprop%lake_snow_z3d(IM,Model%nlevsnowsoil1_clm_lake)) - allocate(Sfcprop%lake_snow_dz3d(IM,Model%nlevsnowsoil1_clm_lake)) - allocate(Sfcprop%lake_snow_zi3d(IM,Model%nlevsnowsoil_clm_lake)) - allocate(Sfcprop%lake_h2osoi_vol3d(IM,Model%nlevsnowsoil1_clm_lake)) - allocate(Sfcprop%lake_h2osoi_liq3d(IM,Model%nlevsnowsoil1_clm_lake)) - allocate(Sfcprop%lake_h2osoi_ice3d(IM,Model%nlevsnowsoil1_clm_lake)) - allocate(Sfcprop%lake_tsfc(IM)) - allocate(Sfcprop%lake_t_soisno3d(IM,Model%nlevsnowsoil1_clm_lake)) - allocate(Sfcprop%lake_t_lake3d(IM,Model%nlevlake_clm_lake)) - allocate(Sfcprop%lake_savedtke12d(IM)) - allocate(Sfcprop%lake_icefrac3d(IM,Model%nlevlake_clm_lake)) - allocate(Sfcprop%lake_rho0(IM)) - allocate(Sfcprop%lake_ht(IM)) - allocate(Sfcprop%lake_is_salty(IM)) - allocate(Sfcprop%lake_cannot_freeze(IM)) - allocate(Sfcprop%clm_lake_initialized(IM)) + allocate (Sfcprop%lake_t2m(IM)) + allocate (Sfcprop%lake_q2m(IM)) + allocate (Sfcprop%lake_albedo(IM)) + allocate (Sfcprop%input_lakedepth(IM)) + allocate (Sfcprop%lake_h2osno2d(IM)) + allocate (Sfcprop%lake_sndpth2d(IM)) + allocate (Sfcprop%lake_snl2d(IM)) + allocate (Sfcprop%lake_snow_z3d(IM,Model%nlevsnowsoil1_clm_lake)) + allocate (Sfcprop%lake_snow_dz3d(IM,Model%nlevsnowsoil1_clm_lake)) + allocate (Sfcprop%lake_snow_zi3d(IM,Model%nlevsnowsoil_clm_lake)) + allocate (Sfcprop%lake_h2osoi_vol3d(IM,Model%nlevsnowsoil1_clm_lake)) + allocate (Sfcprop%lake_h2osoi_liq3d(IM,Model%nlevsnowsoil1_clm_lake)) + allocate (Sfcprop%lake_h2osoi_ice3d(IM,Model%nlevsnowsoil1_clm_lake)) + allocate (Sfcprop%lake_tsfc(IM)) + allocate (Sfcprop%lake_t_soisno3d(IM,Model%nlevsnowsoil1_clm_lake)) + allocate (Sfcprop%lake_t_lake3d(IM,Model%nlevlake_clm_lake)) + allocate (Sfcprop%lake_savedtke12d(IM)) + allocate (Sfcprop%lake_icefrac3d(IM,Model%nlevlake_clm_lake)) + allocate (Sfcprop%lake_rho0(IM)) + allocate (Sfcprop%lake_ht(IM)) + allocate (Sfcprop%lake_is_salty(IM)) + allocate (Sfcprop%lake_cannot_freeze(IM)) + allocate (Sfcprop%clm_lake_initialized(IM)) Sfcprop%lake_t2m = clear_val Sfcprop%lake_q2m = clear_val @@ -3203,7 +3209,7 @@ subroutine coupling_create (Coupling, Model) end if if(Model%progsigma)then - allocate(Coupling%dqdt_qmicro (IM,Model%levs)) + allocate (Coupling%dqdt_qmicro (IM,Model%levs)) Coupling%dqdt_qmicro = clear_val endif @@ -3269,6 +3275,7 @@ subroutine coupling_create (Coupling, Model) allocate (Coupling%min_fplume(IM)) allocate (Coupling%max_fplume(IM)) allocate (Coupling%uspdavg(IM)) + allocate (Coupling%rho_dry (IM,Model%levs)) allocate (Coupling%hpbl_thetav(IM)) allocate (Coupling%rrfs_hwp (IM)) allocate (Coupling%rrfs_hwp_ave (IM)) @@ -3281,6 +3288,7 @@ subroutine coupling_create (Coupling, Model) Coupling%min_fplume = clear_val Coupling%max_fplume = clear_val Coupling%uspdavg = clear_val + Coupling%rho_dry = clear_val Coupling%hpbl_thetav = clear_val Coupling%rrfs_hwp = clear_val Coupling%rrfs_hwp_ave = clear_val @@ -3747,6 +3755,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & logical :: hwrf_samfdeep = .false. !< flag for HWRF SAMF deepcnv scheme logical :: hwrf_samfshal = .false. !< flag for HWRF SAMF shalcnv scheme logical :: progsigma = .false. !< flag for prognostic updraft area fraction closure in saSAS or Unified conv. + integer :: conv_cf_opt = 0 !< option for convection scheme cloud fraction computation logical :: do_mynnedmf = .false. !< flag for MYNN-EDMF logical :: do_mynnsfclay = .false. !< flag for MYNN Surface Layer Scheme ! DH* TODO - move to MYNN namelist section @@ -3983,6 +3992,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & real(kind=kind_phys) :: dust_alpha = 0. real(kind=kind_phys) :: dust_gamma = 0. real(kind=kind_phys) :: wetdep_ls_alpha = 0.5 + real(kind=kind_phys) :: plume_alpha = 0.05 integer :: dust_moist_opt = 1 ! fecan :1 else shao integer :: ebb_dcycle = 1 ! 1:retro; 2:forecast integer :: seas_opt = 2 @@ -3993,10 +4003,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & logical :: extended_sd_diags = .false. integer :: wetdep_ls_opt = 1 logical :: do_plumerise = .false. + logical :: add_fire_moist_flux = .false. integer :: addsmoke_flag = 1 integer :: plumerisefire_frq = 60 integer :: n_dbg_lines = 3 - integer :: smoke_forecast = 0 ! RRFS-sd read in ebb_smoke + integer :: smoke_forecast = 2 ! RRFS-sd read in ebb_smoke logical :: aero_ind_fdb = .false. ! RRFS-sd wfa/ifa emission logical :: aero_dir_fdb = .false. ! RRFS-sd smoke/dust radiation feedback logical :: rrfs_smoke_debug = .false. ! RRFS-sd plumerise debug @@ -4127,7 +4138,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & betadcu,h2o_phys, pdfcld, shcnvcw, redrag, hybedmf, satmedmf,& shinhong, do_ysu, dspheat, lheatstrg, lseaspray, cnvcld, & xr_cnvcld, random_clds, shal_cnv, imfshalcnv, imfdeepcnv, & - isatmedmf, do_deep, jcap, & + isatmedmf, conv_cf_opt, do_deep, jcap, & cs_parm, flgmin, cgwf, ccwf, cdmbgwd, alpha_fd, & psl_gwd_dx_factor, & sup, ctei_rm, crtrh, & @@ -4187,6 +4198,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & rrfs_smoke_debug, do_plumerise, plumerisefire_frq, & addsmoke_flag, enh_mix, mix_chem, smoke_dir_fdb_coef, & do_smoke_transport,smoke_conv_wet_coef,n_dbg_lines, & + add_fire_moist_flux, plume_alpha, & !--- C3/GF closures ichoice,ichoicem,ichoice_s, & !--- (DFI) time ranges with radar-prescribed microphysics tendencies @@ -4229,7 +4241,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- read in the namelist #ifdef INTERNAL_FILE_NML ! allocate required to work around GNU compiler bug 100886 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100886 - allocate(Model%input_nml_file, mold=input_nml_file) + allocate (Model%input_nml_file, mold=input_nml_file) Model%input_nml_file => input_nml_file read(Model%input_nml_file, nml=gfs_physics_nml) ! Set length (number of lines) in namelist for internal reads @@ -4356,11 +4368,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%naux2d = naux2d Model%naux3d = naux3d if (Model%naux2d>0) then - allocate(Model%aux2d_time_avg(1:naux2d)) + allocate (Model%aux2d_time_avg(1:naux2d)) Model%aux2d_time_avg(1:naux2d) = aux2d_time_avg(1:naux2d) end if if (Model%naux3d>0) then - allocate(Model%aux3d_time_avg(1:naux3d)) + allocate (Model%aux3d_time_avg(1:naux3d)) Model%aux3d_time_avg(1:naux3d) = aux3d_time_avg(1:naux3d) end if ! @@ -4376,8 +4388,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%nx = nx Model%ny = ny Model%levs = levs - allocate(Model%ak(1:size(ak))) - allocate(Model%bk(1:size(bk))) + allocate (Model%ak(1:size(ak))) + allocate (Model%bk(1:size(bk))) Model%ak = ak Model%bk = bk Model%levsp1 = Model%levs + 1 @@ -4387,13 +4399,13 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%lonr = gnx ! number longitudinal points Model%latr = gny ! number of latitudinal points from pole to pole Model%nblks = size(blksz) - allocate(Model%blksz(1:Model%nblks)) + allocate (Model%blksz(1:Model%nblks)) Model%blksz = blksz Model%ncols = sum(Model%blksz) ! DH* Model%nchunks = size(blksz) - allocate(Model%chunk_begin(Model%nchunks)) - allocate(Model%chunk_end(Model%nchunks)) + allocate (Model%chunk_begin(Model%nchunks)) + allocate (Model%chunk_end(Model%nchunks)) Model%chunk_begin(1) = 1 Model%chunk_end(1) = Model%chunk_begin(1) + blksz(1) - 1 do i=2,Model%nchunks @@ -4433,6 +4445,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%dust_alpha = dust_alpha Model%dust_gamma = dust_gamma Model%wetdep_ls_alpha = wetdep_ls_alpha + Model%plume_alpha = plume_alpha Model%ebb_dcycle = ebb_dcycle Model%seas_opt = seas_opt Model%dust_opt = dust_opt @@ -4445,6 +4458,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%n_dbg_lines = n_dbg_lines Model%plumerisefire_frq = plumerisefire_frq Model%addsmoke_flag = addsmoke_flag + Model%add_fire_moist_flux = add_fire_moist_flux Model%smoke_forecast = smoke_forecast Model%aero_ind_fdb = aero_ind_fdb Model%aero_dir_fdb = aero_dir_fdb @@ -4977,6 +4991,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%imfdeepcnv = imfdeepcnv Model%isatmedmf = isatmedmf Model%do_deep = do_deep + Model%conv_cf_opt = conv_cf_opt Model%nmtvr = nmtvr Model%jcap = jcap Model%flgmin = flgmin @@ -5140,16 +5155,16 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%n_var_spp = n_var_spp if (Model%lndp_type/=0) then - allocate(Model%lndp_var_list(Model%n_var_lndp)) - allocate(Model%lndp_prt_list(Model%n_var_lndp)) + allocate (Model%lndp_var_list(Model%n_var_lndp)) + allocate (Model%lndp_prt_list(Model%n_var_lndp)) Model%lndp_var_list(:) = '' Model%lndp_prt_list(:) = clear_val end if if (Model%do_spp) then - allocate(Model%spp_var_list(Model%n_var_spp)) - allocate(Model%spp_prt_list(Model%n_var_spp)) - allocate(Model%spp_stddev_cutoff(Model%n_var_spp)) + allocate (Model%spp_var_list(Model%n_var_spp)) + allocate (Model%spp_prt_list(Model%n_var_spp)) + allocate (Model%spp_stddev_cutoff(Model%n_var_spp)) Model%spp_var_list(:) = '' Model%spp_prt_list(:) = clear_val Model%spp_stddev_cutoff(:) = clear_val @@ -5157,7 +5172,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- cellular automata options ! force namelist constsitency - allocate(Model%vfact_ca(levs)) + allocate (Model%vfact_ca(levs)) if ( .not. ca_global ) nca_g=0 if ( .not. ca_sgs ) nca=0 @@ -5285,7 +5300,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%nprocess = Model%index_of_process_photochem ! List which processes should be summed as photochemical: - allocate(Model%is_photochem(Model%nprocess)) + allocate (Model%is_photochem(Model%nprocess)) Model%is_photochem = .false. Model%is_photochem(Model%index_of_process_prod_loss) = .true. Model%is_photochem(Model%index_of_process_ozmix) = .true. @@ -5299,7 +5314,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & ! Last index of outermost dimension of dtend Model%ndtend = 0 - allocate(Model%dtidx(Model%ntracp100,Model%nprocess)) + allocate (Model%dtidx(Model%ntracp100,Model%nprocess)) Model%dtidx = -99 if(Model%ntchm>0) then @@ -5721,7 +5736,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & endif Model%jdat(1:8) = jdat(1:8) - allocate(Model%si(Model%levs+1)) + allocate (Model%si(Model%levs+1)) !--- Define sigma level for radiation initialization !--- The formula converting hybrid sigma pressure coefficients to sigma coefficients follows Eckermann (2009, MWR) !--- ps is replaced with p0. The value of p0 uses that in http://www.emc.ncep.noaa.gov/officenotes/newernotes/on461.pdf @@ -6462,7 +6477,7 @@ subroutine control_scavenging_initialize(Model, fscav) real(kind=kind_phys) :: tem !--- begin - allocate(Model%fscav(Model%ntchm)) + allocate (Model%fscav(Model%ntchm)) if (Model%ntchm > 0) then !--- set default as no scavenging @@ -6581,6 +6596,7 @@ subroutine control_print(Model) print *, 'dust_alpha : ',Model%dust_alpha print *, 'dust_gamma : ',Model%dust_gamma print *, 'wetdep_ls_alpha : ',Model%wetdep_ls_alpha + print *, 'plume_alpha : ',Model%plume_alpha print *, 'ebb_dcycle : ',Model%ebb_dcycle print *, 'seas_opt : ',Model%seas_opt print *, 'dust_opt : ',Model%dust_opt @@ -6591,6 +6607,7 @@ subroutine control_print(Model) print *, 'wetdep_ls_opt : ',Model%wetdep_ls_opt print *, 'do_plumerise : ',Model%do_plumerise print *, 'plumerisefire_frq: ',Model%plumerisefire_frq + print *, 'add_fire_moist_flux: ',Model%add_fire_moist_flux print *, 'addsmoke_flag : ',Model%addsmoke_flag print *, 'smoke_forecast : ',Model%smoke_forecast print *, 'aero_ind_fdb : ',Model%aero_ind_fdb @@ -6868,6 +6885,7 @@ subroutine control_print(Model) print *, ' imfshalcnv : ', Model%imfshalcnv print *, ' imfdeepcnv : ', Model%imfdeepcnv print *, ' do_deep : ', Model%do_deep + print *, ' conv_cf_opt : ', Model%conv_cf_opt print *, ' nmtvr : ', Model%nmtvr print *, ' jcap : ', Model%jcap print *, ' cs_parm : ', Model%cs_parm @@ -7226,11 +7244,11 @@ subroutine tbd_create (Tbd, Model) nullify(Tbd%dfi_radar_tten) nullify(Tbd%cap_suppress) if(Model%num_dfi_radar>0) then - allocate(Tbd%dfi_radar_tten(IM,Model%levs,Model%num_dfi_radar)) + allocate (Tbd%dfi_radar_tten(IM,Model%levs,Model%num_dfi_radar)) Tbd%dfi_radar_tten = -20.0 Tbd%dfi_radar_tten(:,1,:) = zero if(Model%do_cap_suppress) then - allocate(Tbd%cap_suppress(IM,Model%num_dfi_radar)) + allocate (Tbd%cap_suppress(IM,Model%num_dfi_radar)) Tbd%cap_suppress(:,:) = zero endif endif @@ -7306,28 +7324,28 @@ subroutine tbd_create (Tbd, Model) Tbd%hpbl = clear_val if (Model%imfdeepcnv == Model%imfdeepcnv_gf .or. Model%imfdeepcnv == Model%imfdeepcnv_ntiedtke .or. Model%imfdeepcnv == Model%imfdeepcnv_samf .or. Model%imfshalcnv == Model%imfshalcnv_samf .or. Model%imfdeepcnv == Model%imfdeepcnv_c3 .or. Model%imfshalcnv == Model%imfshalcnv_c3) then - allocate(Tbd%prevsq(IM, Model%levs)) + allocate (Tbd%prevsq(IM, Model%levs)) Tbd%prevsq = clear_val endif if (Model%imfdeepcnv .ge. 0 .or. Model%imfshalcnv .ge. 0) then - allocate(Tbd%ud_mf(IM, Model%levs)) + allocate (Tbd%ud_mf(IM, Model%levs)) Tbd%ud_mf = zero endif if (Model%imfdeepcnv == Model%imfdeepcnv_gf .or. Model%imfdeepcnv == Model%imfdeepcnv_ntiedtke .or. Model%imfdeepcnv == Model%imfdeepcnv_c3) then - allocate(Tbd%forcet(IM, Model%levs)) - allocate(Tbd%forceq(IM, Model%levs)) - allocate(Tbd%prevst(IM, Model%levs)) + allocate (Tbd%forcet(IM, Model%levs)) + allocate (Tbd%forceq(IM, Model%levs)) + allocate (Tbd%prevst(IM, Model%levs)) Tbd%forcet = clear_val Tbd%forceq = clear_val Tbd%prevst = clear_val end if if (Model%imfdeepcnv == Model%imfdeepcnv_gf .or. Model%imfdeepcnv == Model%imfdeepcnv_c3) then - allocate(Tbd%cactiv(IM)) - allocate(Tbd%cactiv_m(IM)) - allocate(Tbd%aod_gf(IM)) + allocate (Tbd%cactiv(IM)) + allocate (Tbd%cactiv_m(IM)) + allocate (Tbd%aod_gf(IM)) Tbd%cactiv = zero Tbd%cactiv_m = zero Tbd%aod_gf = zero @@ -7637,8 +7655,8 @@ subroutine allocate_dtend_labels_and_causes(Model) type(GFS_control_type), intent(inout) :: Model integer :: i - allocate(Model%dtend_var_labels(Model%ntracp100)) - allocate(Model%dtend_process_labels(Model%nprocess)) + allocate (Model%dtend_var_labels(Model%ntracp100)) + allocate (Model%dtend_process_labels(Model%nprocess)) Model%dtend_var_labels(1)%name = 'unallocated' Model%dtend_var_labels(1)%desc = 'unallocated tracer' @@ -7710,7 +7728,7 @@ subroutine diag_create (Diag, Model) IM = Model%ncols if(Model%print_diff_pgr) then - allocate(Diag%old_pgr(IM)) + allocate (Diag%old_pgr(IM)) Diag%old_pgr = clear_val endif @@ -7847,7 +7865,7 @@ subroutine diag_create (Diag, Model) !--- 3D diagnostics if (Model%ldiag3d) then - allocate(Diag%dtend(IM,Model%levs,Model%ndtend)) + allocate (Diag%dtend(IM,Model%levs,Model%ndtend)) Diag%dtend = clear_val if (Model%qdiag3d) then allocate (Diag%upd_mf (IM,Model%levs)) @@ -7855,10 +7873,10 @@ subroutine diag_create (Diag, Model) allocate (Diag%det_mf (IM,Model%levs)) endif if (Model%oz_phys_2015) then - allocate(Diag%do3_dt_prd( IM, Model%levs)) - allocate(Diag%do3_dt_ozmx(IM, Model%levs)) - allocate(Diag%do3_dt_temp(IM, Model%levs)) - allocate(Diag%do3_dt_ohoz(IM, Model%levs)) + allocate (Diag%do3_dt_prd( IM, Model%levs)) + allocate (Diag%do3_dt_ozmx(IM, Model%levs)) + allocate (Diag%do3_dt_temp(IM, Model%levs)) + allocate (Diag%do3_dt_ohoz(IM, Model%levs)) endif endif diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index 567d0e37e..719cae26c 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -960,7 +960,7 @@ standard_name = emission_smoke_prvd_RRFS long_name = emission fire RRFS daily units = various - dimensions = (horizontal_dimension,4) + dimensions = (horizontal_dimension,5) type = real kind = kind_phys active = (do_smoke_coupling) @@ -2369,7 +2369,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_of_fire long_name = kinematic surface upward sensible heat flux of fire units = K m s-1 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys active = (do_fire_coupling) @@ -2377,7 +2377,7 @@ standard_name = surface_upward_specific_humidity_flux_of_fire long_name = kinematic surface upward latent heat flux of fire units = kg kg-1 m s-1 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys active = (do_fire_coupling) @@ -2385,7 +2385,7 @@ standard_name = smoke_emission_of_fire long_name = smoke emission of fire units = kg m-2 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys active = (do_fire_coupling) @@ -3244,6 +3244,14 @@ type = real kind = kind_phys active = (do_smoke_coupling) +[rho_dry] + standard_name = dry_air_density + long_name = dry air density + units = kg m-3 + dimensions = (horizontal_dimension,vertical_layer_dimension) + type = real + kind = kind_phys + active = (do_smoke_coupling) [uspdavg] standard_name = mean_wind_speed_in_boundary_layer long_name = average wind speed within the boundary layer @@ -4957,6 +4965,12 @@ units = flag dimensions = () type = logical +[add_fire_moist_flux] + standard_name = flag_for_fire_moisture_flux + long_name = flag to add fire moisture flux + units = flag + dimensions = () + type = logical [isncond_opt] standard_name = control_for_soil_thermal_conductivity_option_in_ruc_lsm long_name = control for soil thermal conductivity option in RUC land surface model @@ -5659,6 +5673,12 @@ units = none dimensions = () type = integer +[conv_cf_opt] + standard_name = option_for_convection_scheme_cloud_fraction_computation + long_name = option for convection scheme cloud fraction computation + units = flag + dimensions = () + type = integer [nmtvr] standard_name = number_of_statistical_measures_of_subgrid_orography long_name = number of topographic variables in GWD @@ -6884,6 +6904,13 @@ dimensions = () type = real kind = kind_phys +[plume_alpha] + standard_name = alpha_for_plumerise_scheme + long_name = alpha paramter for plumerise scheme + units = none + dimensions = () + type = real + kind = kind_phys [ebb_dcycle] standard_name = control_for_diurnal_cycle_of_biomass_burning_emissions long_name = rrfs smoke diurnal cycle option diff --git a/ccpp/driver/GFS_diagnostics.F90 b/ccpp/driver/GFS_diagnostics.F90 index ea70c93de..346662e3c 100644 --- a/ccpp/driver/GFS_diagnostics.F90 +++ b/ccpp/driver/GFS_diagnostics.F90 @@ -545,6 +545,18 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%data(nb)%var2 => IntDiag%fluxr(Model%chunk_begin(nb):Model%chunk_end(nb),32) enddo + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'csdsf' + ExtDiag(idx)%desc = 'Clear Sky Instantateous Downward Short Wave Flux' + ExtDiag(idx)%unit = 'W/m**2' + ExtDiag(idx)%mod_name = 'gfs_phys' + ExtDiag(idx)%intpl_method = 'bilinear' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => IntDiag%fluxr(Model%chunk_begin(nb):Model%chunk_end(nb),32) + enddo + idx = idx + 1 ExtDiag(idx)%axes = 2 ExtDiag(idx)%name = 'csulf_ave' diff --git a/ccpp/framework b/ccpp/framework index b7d55fd07..9e1c3abe1 160000 --- a/ccpp/framework +++ b/ccpp/framework @@ -1 +1 @@ -Subproject commit b7d55fd07fa35c5de9b2292596d30784a800b276 +Subproject commit 9e1c3abe1048c0f18c53fdbb7113bc56a129bdf5 diff --git a/ccpp/physics b/ccpp/physics index 6e0467ad0..dab57fcce 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 6e0467ad07a2231d298dc3be91a923c934354a7f +Subproject commit dab57fcce3f1abf16eb01f22469ea84279f67b19 diff --git a/ccpp/suites/suite_RRFSens_phy1.xml b/ccpp/suites/suite_RRFSens_phy1.xml index b7d007843..e5c6f7a91 100644 --- a/ccpp/suites/suite_RRFSens_phy1.xml +++ b/ccpp/suites/suite_RRFSens_phy1.xml @@ -13,12 +13,14 @@ GFS_suite_interstitial_rad_reset + sgscloud_radpre GFS_rrtmg_pre GFS_radiation_surface rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw + sgscloud_radpost rrtmg_lw_post GFS_rrtmg_post diff --git a/ccpp/suites/suite_RRFSens_phy4.xml b/ccpp/suites/suite_RRFSens_phy4.xml index 5b07083b9..5813576c8 100644 --- a/ccpp/suites/suite_RRFSens_phy4.xml +++ b/ccpp/suites/suite_RRFSens_phy4.xml @@ -13,12 +13,14 @@ GFS_suite_interstitial_rad_reset + sgscloud_radpre GFS_rrtmg_pre GFS_radiation_surface rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw + sgscloud_radpost rrtmg_lw_post GFS_rrtmg_post diff --git a/io/fv3atm_rrfs_sd_io.F90 b/io/fv3atm_rrfs_sd_io.F90 index 927607af9..0e515e4fc 100644 --- a/io/fv3atm_rrfs_sd_io.F90 +++ b/io/fv3atm_rrfs_sd_io.F90 @@ -63,7 +63,7 @@ module fv3atm_rrfs_sd_io integer, private :: nvar_dust12m = 5 integer, private :: nvar_emi = 1 integer, private :: nvar_fire = 2 - integer, private :: nvar_fire2d = 4 + integer, private :: nvar_fire2d = 5 character(len=32), pointer, dimension(:), private :: dust12m_name => null() character(len=32), pointer, dimension(:), private :: emi_name => null() @@ -578,6 +578,7 @@ subroutine rrfs_sd_emissions_register_fire(data, Model, restart, Atm_block) data%fire_name2d(2) = 'frp_davg' data%fire_name2d(3) = 'fire_end_hr' data%fire_name2d(4) = 'hwp_davg' + data%fire_name2d(5) = 'totprcp_24hrs' !--- register axis call register_axis(restart, 'lon', 'X') @@ -637,6 +638,7 @@ subroutine rrfs_sd_emissions_copy_fire(data, Model, Sfcprop, Atm_block) Sfcprop%smoke2d_RRFS(im,2) = data%fire_var2d(i,j,2) Sfcprop%smoke2d_RRFS(im,3) = data%fire_var2d(i,j,3) Sfcprop%smoke2d_RRFS(im,4) = data%fire_var2d(i,j,4) + Sfcprop%smoke2d_RRFS(im,5) = data%fire_var2d(i,j,5) else ! -- user define their own fire emission endif