diff --git a/components/mpas-ocean/driver/ocn_comp_mct.F b/components/mpas-ocean/driver/ocn_comp_mct.F index 67f465b9332b..86ea9290c01c 100644 --- a/components/mpas-ocean/driver/ocn_comp_mct.F +++ b/components/mpas-ocean/driver/ocn_comp_mct.F @@ -689,7 +689,6 @@ end subroutine xml_stream_get_attributes if ( ierr /= 0 ) then write(ocnLogUnit,*) 'Fail to set define dom fields ' endif - ent_type = 1 ! cells diff --git a/driver-mct/cime_config/buildnml b/driver-mct/cime_config/buildnml index 426995b8ffb6..4938e9da0b18 100755 --- a/driver-mct/cime_config/buildnml +++ b/driver-mct/cime_config/buildnml @@ -40,6 +40,7 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files): config['CPL_ALBAV'] = case.get_value('CPL_ALBAV') config['CPL_EPBAL'] = case.get_value('CPL_EPBAL') config['FLDS_WISO'] = case.get_value('FLDS_WISO') + config['FLDS_POLAR'] = case.get_value('FLDS_POLAR') config['BUDGETS'] = case.get_value('BUDGETS') config['MACH'] = case.get_value('MACH') config['MPILIB'] = case.get_value('MPILIB') diff --git a/driver-mct/cime_config/config_component_e3sm.xml b/driver-mct/cime_config/config_component_e3sm.xml index 5d582b41b438..a6f756b24b2e 100755 --- a/driver-mct/cime_config/config_component_e3sm.xml +++ b/driver-mct/cime_config/config_component_e3sm.xml @@ -172,6 +172,18 @@ Turn on the passing of water isotope fields through the coupler + + logical + TRUE,FALSE + FALSE + + TRUE + + run_flags + env_run.xml + Turn on the passing of polar fields through the coupler + + char minus1p8,linear_salt,mushy diff --git a/driver-mct/cime_config/namelist_definition_drv.xml b/driver-mct/cime_config/namelist_definition_drv.xml index 6f0bdbcd9794..8feae705dd67 100644 --- a/driver-mct/cime_config/namelist_definition_drv.xml +++ b/driver-mct/cime_config/namelist_definition_drv.xml @@ -137,6 +137,18 @@ + + logical + seq_flds + seq_cplflds_inparm + + If set to .true. Polar fields will be passed from the ocean to the coupler. + + + $FLDS_POLAR + + + logical seq_flds diff --git a/driver-mct/main/seq_diag_mct.F90 b/driver-mct/main/seq_diag_mct.F90 index 9d9df6fd3ab4..627cbcc001e6 100644 --- a/driver-mct/main/seq_diag_mct.F90 +++ b/driver-mct/main/seq_diag_mct.F90 @@ -317,8 +317,6 @@ module seq_diag_mct integer :: index_i2x_Fioi_melth integer :: index_i2x_Fioi_meltw - integer :: index_i2x_Fioi_bergh - integer :: index_i2x_Fioi_bergw integer :: index_i2x_Fioi_salt integer :: index_i2x_Faii_swnet integer :: index_i2x_Fioi_swpen @@ -1346,6 +1344,7 @@ subroutine seq_diag_ocn_mct( ocn, xao_o, frac_o, infodata, do_o2x, do_x2o, do_xa real(r8) :: ca_i,ca_o,ca_c ! area of a grid cell logical,save :: first_time = .true. logical,save :: flds_wiso_ocn = .false. + logical,save :: flds_polar = .false. !----- formats ----- character(*),parameter :: subName = '(seq_diag_ocn_mct) ' @@ -1379,11 +1378,14 @@ subroutine seq_diag_ocn_mct( ocn, xao_o, frac_o, infodata, do_o2x, do_x2o, do_xa index_o2x_Fioo_frazil = mct_aVect_indexRA(o2x_o,'Fioo_frazil') index_o2x_Fioo_q = mct_aVect_indexRA(o2x_o,'Fioo_q') index_o2x_Faoo_h2otemp = mct_aVect_indexRA(o2x_o,'Faoo_h2otemp') - index_o2x_Foxo_ismw = mct_aVect_indexRA(o2x_o,'Foxo_ismw',perrWith='quiet') - index_o2x_Foxo_rrofl = mct_aVect_indexRA(o2x_o,'Foxo_rrofl',perrWith='quiet') - index_o2x_Foxo_rrofi = mct_aVect_indexRA(o2x_o,'Foxo_rrofi',perrWith='quiet') - index_o2x_Foxo_ismh = mct_aVect_indexRA(o2x_o,'Foxo_ismh',perrWith='quiet') - index_o2x_Foxo_rrofih = mct_aVect_indexRA(o2x_o,'Foxo_rrofih',perrWith='quiet') + index_o2x_Foxo_ismw = mct_aVect_indexRA(o2x_o,'Foxo_ismw',perrWith='quiet') + if ( index_o2x_Foxo_ismw /= 0 ) flds_polar = .true. + if ( flds_polar ) then + index_o2x_Foxo_rrofl = mct_aVect_indexRA(o2x_o,'Foxo_rrofl',perrWith='quiet') + index_o2x_Foxo_rrofi = mct_aVect_indexRA(o2x_o,'Foxo_rrofi',perrWith='quiet') + index_o2x_Foxo_ismh = mct_aVect_indexRA(o2x_o,'Foxo_ismh',perrWith='quiet') + index_o2x_Foxo_rrofih = mct_aVect_indexRA(o2x_o,'Foxo_rrofih',perrWith='quiet') + end if end if lSize = mct_avect_lSize(o2x_o) @@ -1396,16 +1398,13 @@ subroutine seq_diag_ocn_mct( ocn, xao_o, frac_o, infodata, do_o2x, do_x2o, do_xa nf = f_wfrz; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - (ca_o+ca_i)*max(0.0_r8,o2x_o%rAttr(index_o2x_Fioo_frazil,n)) nf = f_hfrz; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*max(0.0_r8,o2x_o%rAttr(index_o2x_Fioo_q,n)) nf = f_hh2ot; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*o2x_o%rAttr(index_o2x_Faoo_h2otemp,n) - nf = f_wpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_c*o2x_o%rAttr(index_o2x_Foxo_ismw,n) - nf = f_wpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - (ca_o+ca_i)*o2x_o%rAttr(index_o2x_Foxo_rrofl,n) - nf = f_wpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - (ca_o+ca_i)*o2x_o%rAttr(index_o2x_Foxo_rrofi,n) -! nf = f_wism; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_c*o2x_o%rAttr(index_o2x_Foxo_ismw,n) -! nf = f_wrrof; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - (ca_o+ca_i)*o2x_o%rAttr(index_o2x_Foxo_rrofl,n) -! nf = f_wriof; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - (ca_o+ca_i)*o2x_o%rAttr(index_o2x_Foxo_rrofi,n) - nf = f_hpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_c*o2x_o%rAttr(index_o2x_Foxo_ismh,n) - nf = f_hpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_c*o2x_o%rAttr(index_o2x_Foxo_rrofih,n) -! nf = f_hism; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_c*o2x_o%rAttr(index_o2x_Foxo_ismh,n) -! nf = f_hriof; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_c*o2x_o%rAttr(index_o2x_Foxo_rrofih,n) + if (flds_polar) then + nf = f_wpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_c*o2x_o%rAttr(index_o2x_Foxo_ismw,n) + nf = f_wpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - (ca_o+ca_i)*o2x_o%rAttr(index_o2x_Foxo_rrofl,n) + nf = f_wpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - (ca_o+ca_i)*o2x_o%rAttr(index_o2x_Foxo_rrofi,n) + nf = f_hpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - ca_c*o2x_o%rAttr(index_o2x_Foxo_ismh,n) + nf = f_hpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_c*o2x_o%rAttr(index_o2x_Foxo_rrofih,n) + end if end do end if @@ -1635,8 +1634,6 @@ subroutine seq_diag_ice_mct( ice, frac_i, infodata, do_i2x, do_x2i) if (present(do_i2x)) then index_i2x_Fioi_melth = mct_aVect_indexRA(i2x_i,'Fioi_melth') index_i2x_Fioi_meltw = mct_aVect_indexRA(i2x_i,'Fioi_meltw') -! index_i2x_Fioi_bergh = mct_aVect_indexRA(i2x_i,'PFioi_bergh') -! index_i2x_Fioi_bergw = mct_aVect_indexRA(i2x_i,'PFioi_bergw') index_i2x_Fioi_swpen = mct_aVect_indexRA(i2x_i,'Fioi_swpen') index_i2x_Faii_swnet = mct_aVect_indexRA(i2x_i,'Faii_swnet') index_i2x_Faii_lwup = mct_aVect_indexRA(i2x_i,'Faii_lwup') @@ -1672,9 +1669,7 @@ subroutine seq_diag_ice_mct( ice, frac_i, infodata, do_i2x, do_x2i) nf = f_hlwup ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_i*i2x_i%rAttr(index_i2x_Faii_lwup,n) nf = f_hlatv ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_i*i2x_i%rAttr(index_i2x_Faii_lat,n) nf = f_hsen ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_i*i2x_i%rAttr(index_i2x_Faii_sen,n) -! nf = f_hberg ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - (ca_o+ca_i)*i2x_i%rAttr(index_i2x_Fioi_bergh,n) nf = f_wmelt ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - ca_i*i2x_i%rAttr(index_i2x_Fioi_meltw,n) -! nf = f_wberg ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - (ca_o+ca_i)*i2x_i%rAttr(index_i2x_Fioi_bergw,n) nf = f_wevap ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_i*i2x_i%rAttr(index_i2x_Faii_evap,n) if ( flds_wiso_ice )then diff --git a/driver-mct/shr/seq_flds_mod.F90 b/driver-mct/shr/seq_flds_mod.F90 index cb41fa6439f2..bbc7795442d0 100644 --- a/driver-mct/shr/seq_flds_mod.F90 +++ b/driver-mct/shr/seq_flds_mod.F90 @@ -379,10 +379,11 @@ subroutine seq_flds_set(nmlfile, ID, infodata) logical :: flds_co2_dmsa logical :: flds_bgc_oi logical :: flds_wiso + logical :: flds_polar integer :: glc_nec namelist /seq_cplflds_inparm/ & - flds_co2a, flds_co2b, flds_co2c, flds_co2_dmsa, flds_wiso, glc_nec, & + flds_co2a, flds_co2b, flds_co2c, flds_co2_dmsa, flds_wiso, flds_polar, glc_nec, & ice_ncat, seq_flds_i2o_per_cat, flds_bgc_oi, & nan_check_component_fields, rof_heat, atm_flux_method, atm_gustiness, & rof2ocn_nutrients, lnd_rof_two_way, ocn_rof_two_way, rof_sed @@ -416,6 +417,7 @@ subroutine seq_flds_set(nmlfile, ID, infodata) flds_co2_dmsa = .false. flds_bgc_oi = .false. flds_wiso = .false. + flds_polar = .false. glc_nec = 0 ice_ncat = 1 seq_flds_i2o_per_cat = .false. @@ -449,6 +451,7 @@ subroutine seq_flds_set(nmlfile, ID, infodata) call shr_mpi_bcast(flds_co2_dmsa, mpicom) call shr_mpi_bcast(flds_bgc_oi , mpicom) call shr_mpi_bcast(flds_wiso , mpicom) + call shr_mpi_bcast(flds_polar , mpicom) call shr_mpi_bcast(glc_nec , mpicom) call shr_mpi_bcast(ice_ncat , mpicom) call shr_mpi_bcast(seq_flds_i2o_per_cat, mpicom) @@ -1583,45 +1586,53 @@ subroutine seq_flds_set(nmlfile, ID, infodata) attname = 'PFioi_bergw' call metadata_set(attname, longname, stdname, units) - ! Water flux from ice shelf melt - call seq_flds_add(o2x_fluxes,"Foxo_ismw") - longname = 'Water flux due to basal melting of ice shelves' - stdname = 'basal_iceshelf_melt_flux' - units = 'kg m-2 s-1' - attname = 'Foxo_ismw' - call metadata_set(attname, longname, stdname, units) + !-------------------------------- + ! ocn<->cpl only exchange - Polar + !-------------------------------- - ! Heat flux from ice shelf melt - call seq_flds_add(o2x_fluxes,"Foxo_ismh") - longname = 'Heat flux due to basal melting of ice shelves' - stdname = 'basal_iceshelf_heat_flux' - units = 'W m-2' - attname = 'Foxo_ismh' - call metadata_set(attname, longname, stdname, units) + if (flds_polar) then - ! Water flux from removed liquid runoff - call seq_flds_add(o2x_fluxes,"Foxo_rrofl") - longname = 'Water flux due to removed liqiud runoff' - stdname = 'removed_liquid_runoff_flux' - units = 'kg m-2 s-1' - attname = 'Foxo_rrofl' - call metadata_set(attname, longname, stdname, units) + ! Water flux from ice shelf melt + call seq_flds_add(o2x_fluxes,"Foxo_ismw") + longname = 'Water flux due to basal melting of ice shelves' + stdname = 'basal_iceshelf_melt_flux' + units = 'kg m-2 s-1' + attname = 'Foxo_ismw' + call metadata_set(attname, longname, stdname, units) - ! Water flux from removed solid runoff - call seq_flds_add(o2x_fluxes,"Foxo_rrofi") - longname = 'Water flux due to removed solid runoff' - stdname = 'removed_solid_runoff_flux' - units = 'kg m-2 s-1' - attname = 'Foxo_rrofi' - call metadata_set(attname, longname, stdname, units) + ! Heat flux from ice shelf melt + call seq_flds_add(o2x_fluxes,"Foxo_ismh") + longname = 'Heat flux due to basal melting of ice shelves' + stdname = 'basal_iceshelf_heat_flux' + units = 'W m-2' + attname = 'Foxo_ismh' + call metadata_set(attname, longname, stdname, units) - ! Heat flux from removed solid runoff - call seq_flds_add(o2x_fluxes,"Foxo_rrofih") - longname = 'Heat flux due to removed solid runoff' - stdname = 'removed_solid_runoff_heat_flux' - units = 'W m-2' - attname = 'Foxo_rrofih' - call metadata_set(attname, longname, stdname, units) + ! Water flux from removed liquid runoff + call seq_flds_add(o2x_fluxes,"Foxo_rrofl") + longname = 'Water flux due to removed liqiud runoff' + stdname = 'removed_liquid_runoff_flux' + units = 'kg m-2 s-1' + attname = 'Foxo_rrofl' + call metadata_set(attname, longname, stdname, units) + + ! Water flux from removed solid runoff + call seq_flds_add(o2x_fluxes,"Foxo_rrofi") + longname = 'Water flux due to removed solid runoff' + stdname = 'removed_solid_runoff_flux' + units = 'kg m-2 s-1' + attname = 'Foxo_rrofi' + call metadata_set(attname, longname, stdname, units) + + ! Heat flux from removed solid runoff + call seq_flds_add(o2x_fluxes,"Foxo_rrofih") + longname = 'Heat flux due to removed solid runoff' + stdname = 'removed_solid_runoff_heat_flux' + units = 'W m-2' + attname = 'Foxo_rrofih' + call metadata_set(attname, longname, stdname, units) + + end if ! Salt flux call seq_flds_add(i2x_fluxes,"Fioi_salt")