diff --git a/mediator/esmFlds.F90 b/mediator/esmFlds.F90 index 185d5209..777b0562 100644 --- a/mediator/esmFlds.F90 +++ b/mediator/esmFlds.F90 @@ -57,25 +57,27 @@ module esmflds integer , public, parameter :: map_glc2ocn_ice = 14 ! custom smoothing map to map ice from glc->ocn (cesm only) integer , public, parameter :: mapfillv_bilnr = 15 ! fill value followed by bilinear integer , public, parameter :: mapbilnr_nstod = 16 ! bilinear with nstod extrapolation - integer , public, parameter :: nmappers = 16 + integer , public, parameter :: mapconsf_aofrac = 17 ! conservative with aofrac normalization (ufs only) + integer , public, parameter :: nmappers = 17 character(len=*) , public, parameter :: mapnames(nmappers) = & - (/'bilnr ',& - 'consf ',& - 'consd ',& - 'patch ',& - 'fcopy ',& - 'nstod ',& - 'nstod_consd',& - 'nstod_consf',& - 'patch_uv3d ',& - 'bilnr_uv3d ',& - 'rof2ocn_ice',& - 'rof2ocn_liq',& - 'glc2ocn_ice',& - 'glc2ocn_liq',& - 'fillv_bilnr',& - 'bilnr_nstod'/) + (/'bilnr ',& + 'consf ',& + 'consd ',& + 'patch ',& + 'fcopy ',& + 'nstod ',& + 'nstod_consd ',& + 'nstod_consf ',& + 'patch_uv3d ',& + 'bilnr_uv3d ',& + 'rof2ocn_ice ',& + 'rof2ocn_liq ',& + 'glc2ocn_ice ',& + 'glc2ocn_liq ',& + 'fillv_bilnr ',& + 'bilnr_nstod ',& + 'consf_aofrac'/) !----------------------------------------------- ! Set coupling mode diff --git a/mediator/esmFldsExchange_nems_mod.F90 b/mediator/esmFldsExchange_nems_mod.F90 index 8f96c241..c4663581 100644 --- a/mediator/esmFldsExchange_nems_mod.F90 +++ b/mediator/esmFldsExchange_nems_mod.F90 @@ -31,6 +31,7 @@ subroutine esmFldsExchange_nems(gcomp, phase, rc) use esmflds , only : compmed, compatm, compocn, compice, comprof, ncomps use esmflds , only : mapbilnr, mapconsf, mapconsd, mappatch use esmflds , only : mapfcopy, mapnstod, mapnstod_consd, mapnstod_consf + use esmflds , only : mapconsf_aofrac use esmflds , only : coupling_mode, mapnames use esmflds , only : fldListTo, fldListFr, fldListMed_aoflux, fldListMed_ocnalb use med_internalstate_mod , only : mastertask, logunit @@ -119,6 +120,8 @@ subroutine esmFldsExchange_nems(gcomp, phase, rc) ! to atm: fractions (computed in med_phases_prep_atm) call addfld(fldListFr(compice)%flds, 'Si_ifrac') call addfld(fldListTo(compatm)%flds, 'Si_ifrac') + ! ofrac used by atm + call addfld(fldListFr(compatm)%flds, 'Sa_ofrac') ! to atm: unmerged from ice ! - zonal surface stress, meridional surface stress @@ -208,7 +211,7 @@ subroutine esmFldsExchange_nems(gcomp, phase, rc) call addfld(fldListTo(compocn)%flds, 'Foxx_'//trim(flds(n))) call addfld(fldListFr(compice)%flds, 'Fioi_'//trim(flds(n))) call addfld(fldListFr(compatm)%flds, 'Faxa_'//trim(flds(n))) - call addmap(fldListFr(compatm)%flds, 'Faxa_'//trim(flds(n)), compocn, maptype, 'one', 'unset') + call addmap(fldListFr(compatm)%flds, 'Faxa_'//trim(flds(n)), compocn, mapconsf_aofrac, 'aofrac', 'unset') call addmap(fldListFr(compice)%flds, 'Fioi_'//trim(flds(n)), compocn, mapfcopy, 'unset', 'unset') end do deallocate(flds) @@ -216,19 +219,19 @@ subroutine esmFldsExchange_nems(gcomp, phase, rc) ! to ocn: net long wave via auto merge call addfld(fldListTo(compocn)%flds, 'Faxa_lwnet') call addfld(fldListFr(compatm)%flds, 'Faxa_lwnet') - call addmap(fldListFr(compatm)%flds, 'Faxa_lwnet', compocn, maptype, 'one', 'unset') + call addmap(fldListFr(compatm)%flds, 'Faxa_lwnet', compocn, mapconsf_aofrac, 'aofrac', 'unset') call addmrg(fldListTo(compocn)%flds, 'Faxa_lwnet', & mrg_from=compatm, mrg_fld='Faxa_lwnet', mrg_type='copy_with_weights', mrg_fracname='ofrac') ! to ocn: merged sensible heat flux (custom merge in med_phases_prep_ocn) call addfld(fldListTo(compocn)%flds, 'Faxa_sen') call addfld(fldListFr(compatm)%flds, 'Faxa_sen') - call addmap(fldListFr(compatm)%flds, 'Faxa_sen', compocn, maptype, 'one', 'unset') + call addmap(fldListFr(compatm)%flds, 'Faxa_sen', compocn, mapconsf_aofrac, 'aofrac', 'unset') ! to ocn: evaporation water flux (custom merge in med_phases_prep_ocn) call addfld(fldListTo(compocn)%flds, 'Faxa_evap') call addfld(fldListFr(compatm)%flds, 'Faxa_lat') - call addmap(fldListFr(compatm)%flds, 'Faxa_lat', compocn, maptype, 'one', 'unset') + call addmap(fldListFr(compatm)%flds, 'Faxa_lat', compocn, mapconsf_aofrac, 'aofrac', 'unset') else ! nems_orig_data ! to ocn: surface stress from mediator and ice stress via auto merge diff --git a/mediator/fd_nems.yaml b/mediator/fd_nems.yaml deleted file mode 100644 index 314a3ab0..00000000 --- a/mediator/fd_nems.yaml +++ /dev/null @@ -1,813 +0,0 @@ - field_dictionary: - version_number: 0.0.0 - institution: National ESPC, CSC & MCL Working Groups - source: automatically generated by the NUOPC Layer - description: Community-based dictionary for shared coupling fields - entries: - # - #----------------------------------- - # section: mediator calculation for atm/ocn flux calculation - #----------------------------------- - # - - standard_name: Faox_lat - alias: mean_laten_heat_flx_atm_into_ocn - canonical_units: W m-2 - description: mediator calculation - atm/ocn surface latent heat flux - # - - standard_name: Faox_lwup - alias: mean_up_lw_flx_ocn - canonical_units: W m-2 - description: mediator calculation - long wave radiation flux over the ocean - # - - standard_name: Faox_taux - alias: stress_on_air_ocn_zonal - canonical_units: N m-2 - description: mediator calculation - # - - standard_name: Faox_tauy - alias: stress_on_air_ocn_merid - canonical_units: N m-2 - description: mediator calculation - # - #----------------------------------- - # section: atmosphere export - #----------------------------------- - # - - standard_name: Faxa_bcph - canonical_units: kg m-2 s-1 - description: atmosphere export - # - - standard_name: Faxa_dstdry - canonical_units: kg m-2 s-1 - description: atmosphere export - # - - standard_name: Faxa_dstwet - canonical_units: kg m-2 s-1 - description: atmosphere export - # - #----------------------------------- - # section: atmosphere export - #----------------------------------- - # - - standard_name: Faxa_swdn - alias: mean_down_sw_flx - canonical_units: W m-2 - description: atmosphere export - mean downward SW heat flux - # - - standard_name: Faxa_lwdn - alias: mean_down_lw_flx - canonical_units: W m-2 - description: atmosphere export - mean downward LW heat flux - # - - standard_name: Faxa_rain - alias: mean_prec_rate - canonical_units: kg m-2 s-1 - description: atmosphere export - # - - standard_name: Faxa_rainc - canonical_units: kg m-2 s-1 - description: atmosphere export - # - - standard_name: Faxa_rainl - canonical_units: kg m-2 s-1 - description: atmosphere export - # - - standard_name: Faxa_snow - alias: mean_fprec_rate - canonical_units: kg m-2 s-1 - description: atmosphere export - # - - standard_name: Faxa_snowc - canonical_units: kg m-2 s-1 - description: atmosphere export - # - - standard_name: Faxa_snowl - canonical_units: kg m-2 s-1 - description: atmosphere export - # - - standard_name: Faxa_swnet - canonical_units: W m-2 - description: atmosphere export - # - - standard_name: Faxa_swndf - alias: mean_down_sw_ir_dif_flx - canonical_units: W m-2 - description: atmosphere export - mean surface downward nir diffuse flux - # - - standard_name: Faxa_swndr - alias: mean_down_sw_ir_dir_flx - canonical_units: W m-2 - description: atmosphere export - mean surface downward nir direct flux - # - - standard_name: Faxa_swvdf - alias: mean_down_sw_vis_dif_flx - canonical_units: W m-2 - description: atmosphere export - mean surface downward uv+vis diffuse flux - # - - standard_name: Faxa_swvdr - alias: mean_down_sw_vis_dir_flx - canonical_units: W m-2 - description: atmosphere export - mean surface downward uv+visvdirect flux - # - - standard_name: Sa_dens - alias: air_density_height_lowest - canonical_units: kg m-3 - description: atmosphere export- density at the lowest model layer - # - - standard_name: Sa_pbot - alias: inst_pres_height_lowest - canonical_units: Pa - description: atmosphere export - pressure at lowest model layer - # - - standard_name: Sa_pslv - alias: inst_pres_height_surface - canonical_units: Pa - description: atmosphere export - instantaneous pressure land and sea surface - # - - standard_name: Sa_ptem - canonical_units: K - description: atmosphere export - bottom layer potential temperature - # - - standard_name: Sa_shum - alias: inst_spec_humid_height_lowest - canonical_units: kg kg-1 - description: atmosphere export - bottom layer specific humidity - # - - standard_name: Sa_tbot - alias: inst_temp_height_lowest - canonical_units: K - description: atmosphere export - bottom layer temperature - # - - standard_name: Sa_tskn - alias: inst_temp_skin_temperature - canonical_units: K - description: atmosphere export - sea surface skin temperature - # - - standard_name: Sa_u - alias: inst_zonal_wind_height_lowest - canonical_units: m s-1 - description: atmosphere export - bottom layer zonal wind - # - - standard_name: Sa_v - alias: inst_merid_wind_height_lowest - canonical_units: m s-1 - description: atmosphere export - bottom layer meridional wind - # - - standard_name: Sa_wspd - alias: inst_wind_speed_height_lowest - canonical_units: m s-1 - description: atmosphere export - bottom layer wind speed - # - - standard_name: Sa_z - alias: inst_height_lowest - canonical_units: m - description: atmosphere export - bottom layer height - # - - standard_name: Sa_topo - alias: inst_surface_height - canonical_units: m - description: atmosphere export - topographic height - # - - standard_name: Faxa_taux - alias: mean_zonal_moment_flx_atm - canonical_units: N m-2 - description: atmosphere export- zonal component of momentum flux - # - - standard_name: Faxa_tauy - alias: mean_merid_moment_flx_atm - canonical_units: N m-2 - description: atmosphere export - meridional component of momentum flux - # - - standard_name: Faxa_lat - alias: mean_laten_heat_flx - canonical_units: W m-2 - description: atmosphere export - latent heat flux - # - - standard_name: Faxx_lwup - alias: mean_up_lw_flx - canonical_units: W m-2 - description: atmosphere import - merged ocn/ice flux - # - - standard_name: Sa_ofrac - alias: openwater_frac_in_atm - canonical_units: 1 - description: atm export to mediator - open water ocean fraction (varies with time) - # - - standard_name: Sa_u10m - alias: inst_zonal_wind_height10m - canonical_units: m s-1 - description: atmosphere export - zonal wind height 10m - # - - standard_name: Sa_v10m - alias: inst_merid_wind_height10m - canonical_units: m s-1 - description: atmosphere export - meridional wind height 10m - # - - standard_name: Sa_t2m - alias: inst_temp_height2m - canonical_units: K - description: atmosphere export - temperature height 2m - # - - standard_name: Sa_q2m - alias: inst_spec_humid_height2m - canonical_units: kg kg -1 - description: atmosphere export - specifc humidity height 2m - # - #----------------------------------- - # section: sea-ice export - #----------------------------------- - # - - standard_name: Faii_evap - alias: mean_evap_rate_atm_into_ice - canonical_units: kg m-2 s-1 - description: sea-ice export - # - - standard_name: Faii_lat - alias: mean_laten_heat_flx_atm_into_ice - canonical_units: W m-2 - description: sea-ice export to atm - atm/ice latent heat flux - # - - standard_name: Faii_sen - alias: mean_sensi_heat_flx_atm_into_ice - canonical_units: W m-2 - description: sea-ice export to atm - atm/ice sensible heat flux - # - - standard_name: Faii_lwup - alias: mean_up_lw_flx_ice - canonical_units: W m-2 - description: sea-ice export - outgoing logwave radiation - # - - standard_name: Faii_swnet - canonical_units: W m-2 - description: sea-ice export to atm - # - - standard_name: Faii_taux - alias: stress_on_air_ice_zonal - canonical_units: N m-2 - description: sea-ice export to atm - air ice zonal stress - # - - standard_name: Faii_tauy - alias: stress_on_air_ice_merid - canonical_units: N m-2 - description: sea-ice export - air ice meridional stress - # - - standard_name: Fioi_bcphi - canonical_units: kg m-2 s-1 - description: sea-ice export to ocean - hydrophilic black carbon flux to ocean - # - - standard_name: Fioi_bcpho - canonical_units: kg m-2 s-1 - description: sea-ice export to ocean - hydrophobic black carbon flux to ocean - # - - standard_name: Fioi_flxdst - canonical_units: kg m-2 s-1 - description: sea-ice export to ocean - dust aerosol flux to ocean - # - - standard_name: Fioi_melth - alias: net_heat_flx_to_ocn - canonical_units: W m-2 - description: sea-ice export to ocean - net heat flux to ocean - # - - standard_name: Fioi_meltw - alias: mean_fresh_water_to_ocean_rate - canonical_units: kg m-2 s-1 - description: sea-ice export to ocean - fresh water to ocean (h2o flux from melting) - # - - standard_name: Fioi_meltw_wiso - alias: mean_fresh_water_to_ocean_rate_wiso - canonical_units: kg m-2 s-1 - description: sea-ice export to ocean - fresh water to ocean (h2o flux from melting) for 16O, 18O, HDO - # - - standard_name: Fioi_salt - alias: mean_salt_rate - canonical_units: kg m-2 s-1 - description: sea-ice export to ocean - salt to ocean (salt flux from melting) - # - - standard_name: Fioi_swpen - alias: mean_sw_pen_to_ocn - canonical_units: W m-2 - description: sea-ice export to ocean - flux of shortwave through ice to ocean - # - - standard_name: Fioi_swpen_vdr - alias: mean_sw_pen_to_ocn_vis_dir_flx - canonical_units: W m-2 - description: sea-ice export to ocean - flux of vis dir shortwave through ice to ocean - # - - standard_name: Fioi_swpen_vdf - alias: mean_sw_pen_to_ocn_vis_dif_flx - canonical_units: W m-2 - description: sea-ice export to ocean - flux of vif dir shortwave through ice to ocean - # - - standard_name: Fioi_swpen_idr - alias: mean_sw_pen_to_ocn_ir_dir_flx - canonical_units: W m-2 - description: sea-ice export to ocean - flux of ir dir shortwave through ice to ocean - # - - standard_name: Fioi_swpen_idf - alias: mean_sw_pen_to_ocn_ir_dif_flx - canonical_units: W m-2 - description: sea-ice export to ocean - flux of ir dif shortwave through ice to ocean - # - - standard_name: Fioi_taux - alias: stress_on_ocn_ice_zonal - canonical_units: N m-2 - description: sea-ice export to ocean - ice ocean zonal stress - # - - standard_name: Fioi_tauy - alias: stress_on_ocn_ice_merid - canonical_units: N m-2 - description: sea-ice export to ocean - ice ocean meridional stress - # - - standard_name: Si_anidf - alias: inst_ice_ir_dif_albedo - canonical_units: 1 - description: sea-ice export to atm - # - - standard_name: Si_anidr - alias: inst_ice_ir_dir_albedo - canonical_units: 1 - description: sea-ice export to atm - # - - standard_name: Si_avsdf - alias: inst_ice_vis_dif_albedo - canonical_units: 1 - description: sea-ice export to atm - # - - standard_name: Si_avsdr - alias: inst_ice_vis_dir_albedo - canonical_units: 1 - description: sea-ice export to atm - # - - standard_name: Si_ifrac - alias: ice_fraction - canonical_units: 1 - description: sea-ice export to atm - ice fraction (varies with time) - # - - standard_name: Si_imask - alias: ice_mask - canonical_units: 1 - description: sea-ice export - ice mask - # - - standard_name: Si_qref - canonical_units: kg kg-1 - description: sea-ice export to atm - # - - standard_name: Si_t - alias: sea_ice_surface_temperature - canonical_units: K - description: sea-ice export - # - - standard_name: Si_tref - canonical_units: K - description: sea-ice export - # - - standard_name: Si_u10 - canonical_units: m/s - description: sea-ice export - # - - standard_name: Si_vice - alias: mean_ice_volume - canonical_units: m - description: sea-ice export - volume of ice per unit area - # - - standard_name: Si_snowh - canonical_units: m - description: sea-ice export - surface_snow_water_equivalent - # - - standard_name: Si_vsno - alias: mean_snow_volume - canonical_units: m - description: sea-ice export - volume of snow per unit area - # - #----------------------------------- - # section: ocean export to mediator - #----------------------------------- - # - - standard_name: Fioo_q - alias: freezing_melting_potential - canonical_units: W m-2 - description: ocean export - # - - standard_name: So_bldepth - alias: mixed_layer_depth - canonical_units: m - description: ocean export - # - - standard_name: So_dhdx - alias: sea_surface_slope_zonal - canonical_units: m m-1 - description: ocean export - # - - standard_name: So_dhdy - alias: sea_surface_slope_merid - canonical_units: m m-1 - description: ocean export - # - - standard_name: So_duu10n - canonical_units: m2 s-2 - description: ocean export - # - - standard_name: So_fswpen - canonical_units: 1 - description: ocean export - # - - standard_name: So_ofrac - canonical_units: 1 - description: ocean export - # - - standard_name: So_omask - alias: ocean_mask - canonical_units: 1 - description: ocean export - # - - standard_name: So_qref - canonical_units: kg kg-1 - description: ocean export - # - - standard_name: So_re - canonical_units: 1 - description: ocean export - # - - standard_name: So_s - alias: s_surf - canonical_units: g kg-1 - description: ocean export - # - - standard_name: So_ssq - canonical_units: kg kg-1 - description: ocean export - # - - standard_name: So_t - alias: sea_surface_temperature - canonical_units: K - description: ocean export - # - - standard_name: So_tref - canonical_units: K - description: ocean export - # - - standard_name: So_u - alias: ocn_current_zonal - canonical_units: m s-1 - description: ocean export - # - - standard_name: So_u10 - canonical_units: m - description: ocean export - # - - standard_name: So_ustar - canonical_units: m s-1 - description: ocean export - # - - standard_name: So_v - alias: ocn_current_merid - canonical_units: m s-1 - description: ocean export - # - #----------------------------------- - # section: ocean import - #----------------------------------- - # - - standard_name: mean_runoff_rate - canonical_units: kg m-2 s-1 - description: ocean import - total runoff to ocean - # - - standard_name: mean_runoff_heat_flux - canonical_units: kg m-2 s-1 - description: ocean import - heat content of runoff - # - - standard_name: mean_calving_rate - canonical_units: kg m-2 s-1 - description: ocean import - total calving to ocean - # - - standard_name: mean_calving_heat_flux - canonical_units: kg m-2 s-1 - description: ocean import - heat content of calving - # - - standard_name: Foxx_rofi - canonical_units: kg m-2 s-1 - description: ocean import - water flux due to runoff (frozen) - # - - standard_name: Foxx_rofl - alias: mean_runoff_rate - canonical_units: kg m-2 s-1 - description: ocean import - water flux due to runoff (liquid) - # - - standard_name: Foxx_swnet - alias: mean_net_sw_flx - canonical_units: W m-2 - description: ocean import - net shortwave radiation to ocean - # - - standard_name: Foxx_swnet_vdr - alias: mean_net_sw_vis_dir_flx - canonical_units: W m-2 - description: ocean import - net shortwave visible direct radiation to ocean - # - - standard_name: Foxx_swnet_vdf - alias: mean_net_sw_vis_dif_flx - canonical_units: W m-2 - description: ocean import - net shortwave visible diffuse radiation to ocean - # - - standard_name: Foxx_swnet_idr - alias: mean_net_sw_ir_dir_flx - canonical_units: W m-2 - description: ocean import - net shortwave ir direct radiation to ocean - # - - standard_name: Foxx_swnet_idf - alias: mean_net_sw_ir_dif_flx - canonical_units: W m-2 - description: ocean import - net shortwave ir diffuse radiation to ocean - # - - standard_name: Foxx_sen - alias: mean_sensi_heat_flx - canonical_units: W m-2 - description: ocean import - sensible heat flux into ocean - # - - standard_name: Foxx_lat - canonical_units: W m-2 - description: ocean import - latent heat flux into ocean - # - - standard_name: Foxx_taux - alias: mean_zonal_moment_flx - canonical_units: N m-2 - description: ocean import - zonal surface stress to ocean - # - - standard_name: Foxx_tauy - alias: mean_merid_moment_flx - canonical_units: N m-2 - description: ocean import - meridional surface stress to ocean - # - #----------------------------------- - # mediator fields - #----------------------------------- - # - - standard_name: cpl_scalars - canonical_units: unitless - # - - standard_name: frac - canonical_units: 1 - # - - standard_name: mask - canonical_units: 1 - # - #----------------------------------- - # aliased fields for active and datm - #----------------------------------- - # - - standard_name: mean_net_lw_flx - canonical_units: W m-2 - - alias: Faxa_lwnet - standard_name : mean_net_lw_flx - description: atmosphere export - mean net longwave flux from atm - - alias: Foxx_lwnet - standard_name : mean_net_lw_flx - description: mediator calculation - atm/ocn net longwave flux - # - - standard_name: mean_sensi_heat_flx - canonical_units: W m-2 - - alias: Faxa_sen - standard_name : mean_sensi_heat_flx - description: atmosphere export - sensible heat flux - - alias: Faox_sen - standard_name : mean_sensi_heat_flx - description: mediator calculation - atm/ocn surface sensible heat flux - # - - standard_name: mean_evap_rate - canonical_units: kg m-2 s-1 - - alias: Faxa_evap - standard_name : mean_evap_rate - description: atmosphere export - latent heat flux conversion - - alias: Faox_evap - standard_name : mean_evap_rate - description: mediator calculation - atm/ocn specific humidity flux - # - #----------------------------------- - # section: atmosphere fields that need to be defined but are not used - #----------------------------------- - # - - standard_name: inst_down_lw_flx - canonical_units: W m-2 - - standard_name: inst_net_lw_flx - canonical_units: W m-2 - - standard_name: inst_down_sw_flx - canonical_units: W m-2 - - standard_name: inst_net_sw_flx - canonical_units: W m-2 - - standard_name: inst_net_sw_ir_dir_flx - canonical_units: W m-2 - - standard_name: inst_net_sw_ir_dif_flx - canonical_units: W m-2 - - standard_name: inst_net_sw_vis_dir_flx - canonical_units: W m-2 - - standard_name: inst_net_sw_vis_dif_flx - canonical_units: W m-2 - - standard_name: inst_down_sw_ir_dif_flx - canonical_units: W m-2 - - standard_name: inst_down_sw_ir_dir_flx - canonical_units: W m-2 - - standard_name: inst_down_sw_vis_dif_flx - canonical_units: W m-2 - - standard_name: inst_down_sw_vis_dir_flx - canonical_units: W m-2 - - standard_name: inst_surface_height - canonical_units: m - - standard_name: inst_zonal_moment_flx - canonical_units: N m-2 - - standard_name: inst_merid_moment_flx - canonical_units: N m-2 - - standard_name: inst_sensi_heat_flx - canonical_units: N m-2 - - standard_name: inst_laten_heat_flx - canonical_units: N m-2 - - standard_name: inst_tracer_mass_frac - canonical_units: 1 - - standard_name: inst_tracer_up_surface_flx - canonical_units: kg m-2 s-1 - - standard_name: inst_tracer_down_surface_flx - canonical_units: kg m-2 s-1 - - standard_name: inst_tracer_clmn_mass_dens - canonical_units: g m-2 - - standard_name: inst_tracer_anth_biom_flx - canonical_units: ug m-2 s-1 - description: atmosphere export - - standard_name: inst_pres_interface - canonical_units: Pa - - standard_name: inst_pres_levels - canonical_units: Pa - - standard_name: inst_geop_interface - canonical_units: tbd - - standard_name: inst_geop_levels - canonical_units: tbd - - standard_name: inst_temp_interface - canonical_units: K - - standard_name: inst_temp_levels - canonical_units: K - - standard_name: inst_zonal_wind_levels - canonical_units: m s-1 - - standard_name: inst_merid_wind_levels - canonical_units: m s-1 - - standard_name: inst_omega_levels - canonical_units: tbd - - standard_name: inst_tracer_mass_frac - canonical_units: 1 - - standard_name: inst_soil_moisture_content - canonical_units: tbd - - standard_name: soil_type - canonical_units: tbd - - standard_name: inst_pbl_height - canonical_units: tbd - - standard_name: surface_cell_area - canonical_units: tbd - - standard_name: inst_convective_rainfall_amount - canonical_units: tbd - - standard_name: inst_spec_humid_conv_tendency_levels - canonical_units: tbd - - standard_name: inst_exchange_coefficient_heat_levels - canonical_units: tbd - - standard_name: inst_friction_velocity - canonical_units: tbd - - standard_name: inst_rainfall_amount - canonical_units: tbd - - standard_name: inst_land_sea_mask - canonical_units: tbd - - standard_name: inst_temp_height_surface - canonical_units: tbd - - standard_name: inst_up_sensi_heat_flx - canonical_units: tbd - - standard_name: inst_lwe_snow_thickness - canonical_units: tbd - - standard_name: vegetation_type - canonical_units: tbd - - standard_name: inst_vegetation_area_frac - canonical_units: tbd - - standard_name: inst_surface_roughness - canonical_units: tbd - - standard_name: inst_zonal_moment_flx - canonical_units: N m-2 - - standard_name: inst_merid_moment_flx - canonical_units: N m-2 - - standard_name: inst_laten_heat_flx - canonical_units: W m-2 - - standard_name: inst_sensi_heat_flx - canonical_units: W m-2 - - standard_name: land_mask - canonical_units: 1 - # - #----------------------------------- - # WW3 import - #----------------------------------- - # - - standard_name: sea_surface_height_above_sea_level - canonical_units: m - description: ww3 import - # - - standard_name: sea_surface_salinity - alias: s_surf - canonical_units: g kg-1 - description: ww3 import - # - - standard_name: surface_eastward_sea_water_velocity - alias: ocn_current_zonal - canonical_units: m s-1 - description: ww3 import - # - - standard_name: surface_northward_sea_water_velocity - alias: ocn_current_merid - canonical_units: m s-1 - description: ww3 import - # - - standard_name: eastward_wind_at_10m_height - alias: inst_zonal_wind_height10m - canonical_units: m s-1 - description: ww3 import - # - - standard_name: northward_wind_at_10m_height - alias: inst_merid_wind_height10m - canonical_units: m s-1 - description: ww3 import - # - - standard_name: sea_ice_concentration - alias: ice_fraction - canonical_units: 1 - description: ww3 import - # - # - # WW3 export - # - - standard_name: wave_induced_charnock_parameter - canonical_units: 1 - description: ww3 export - # - - standard_name: wave_z0_roughness_length - canonical_units: 1 - description: ww3 export - # - - standard_name: northward_stokes_drift_current - canonical_units: m s-1 - description: ww3 export - # - - standard_name: eastward_stokes_drift_current - canonical_units: m s-1 - description: ww3 export - # - - standard_name: eastward_partitioned_stokes_drift_1 - canonical_units: m s-1 - description: ww3 export - # - - standard_name: eastward_partitioned_stokes_drift_2 - canonical_units: m s-1 - description: ww3 export - # - - standard_name: eastward_partitioned_stokes_drift_3 - canonical_units: m s-1 - description: ww3 export - # - - standard_name: northward_partitioned_stokes_drift_1 - canonical_units: m s-1 - description: ww3 export - # - - standard_name: northward_partitioned_stokes_drift_2 - canonical_units: m s-1 - description: ww3 export - # - - standard_name: northward_partitioned_stokes_drift_3 - canonical_units: m s-1 - description: ww3 export - # - - standard_name: eastward_wave_bottom_current - canonical_units: m s-1 - description: ww3 export - # - - standard_name: northward_wave_bottom_current - canonical_units: m s-1 - description: ww3 export - # - - standard_name: wave_bottom_current_radian_frequency - canonical_units: rad s-1 - description: ww3 export - # - - standard_name: eastward_wave_radiation_stress_gradient - canonical_units: Pa - description: ww3 export - # - - standard_name: northward_wave_radiation_stress_gradient - canonical_units: Pa - description: ww3 export - # - - standard_name: eastward_wave_radiation_stress - canonical_units: N m-1 - description: ww3 export - # - - standard_name: eastward_northward_wave_radiation_stress - canonical_units: N m-1 - description: ww3 export - # - - standard_name: wave_bottom_current_period - canonical_units: s - description: ww3 export - # - - standard_name: northward_wave_radiation_stress - canonical_units: Pa - description: ww3 export - # diff --git a/mediator/med_fraction_mod.F90 b/mediator/med_fraction_mod.F90 index 018b4339..b3d8d48d 100644 --- a/mediator/med_fraction_mod.F90 +++ b/mediator/med_fraction_mod.F90 @@ -17,7 +17,7 @@ module med_fraction_mod ! ! the fractions fields are defined for each grid in the fraction bundles as ! needed as follows. - ! character(*),parameter :: fraclist_a = 'ifrac:ofrac:lfrac + ! character(*),parameter :: fraclist_a = 'ifrac:ofrac:lfrac:aofrac ! character(*),parameter :: fraclist_o = 'ifrac:ofrac:ifrad:ofrad' ! character(*),parameter :: fraclist_i = 'ifrac:ofrac' ! character(*),parameter :: fraclist_l = 'lfrac' @@ -119,14 +119,14 @@ module med_fraction_mod public med_fraction_set integer, parameter :: nfracs = 5 - character(len=5) :: fraclist(nfracs,ncomps) - character(len=5),parameter,dimension(3) :: fraclist_a = (/'ifrac','ofrac','lfrac'/) - character(len=5),parameter,dimension(4) :: fraclist_o = (/'ifrac','ofrac','ifrad','ofrad'/) - character(len=5),parameter,dimension(2) :: fraclist_i = (/'ifrac','ofrac'/) - character(len=5),parameter,dimension(1) :: fraclist_l = (/'lfrac'/) - character(len=5),parameter,dimension(2) :: fraclist_g = (/'gfrac','lfrac'/) - character(len=5),parameter,dimension(2) :: fraclist_r = (/'rfrac','lfrac'/) - character(len=5),parameter,dimension(1) :: fraclist_w = (/'wfrac'/) + character(len=6) :: fraclist(nfracs,ncomps) + character(len=6),parameter,dimension(4) :: fraclist_a = (/'ifrac ','ofrac ','lfrac ','aofrac'/) + character(len=6),parameter,dimension(4) :: fraclist_o = (/'ifrac ','ofrac ','ifrad ','ofrad '/) + character(len=6),parameter,dimension(2) :: fraclist_i = (/'ifrac ','ofrac '/) + character(len=6),parameter,dimension(1) :: fraclist_l = (/'lfrac '/) + character(len=6),parameter,dimension(2) :: fraclist_g = (/'gfrac ','lfrac '/) + character(len=6),parameter,dimension(2) :: fraclist_r = (/'rfrac ','lfrac '/) + character(len=6),parameter,dimension(1) :: fraclist_w = (/'wfrac '/) !--- standard --- real(R8) , parameter :: eps_fraclim = 1.0e-03 ! truncation limit in fractions_a(lfrac) @@ -167,6 +167,7 @@ subroutine med_fraction_init(gcomp, rc) type(ESMF_Field) :: lfield real(R8), pointer :: frac(:) => null() real(R8), pointer :: ofrac(:) => null() + real(R8), pointer :: aofrac(:) => null() real(R8), pointer :: lfrac(:) => null() real(R8), pointer :: ifrac(:) => null() real(R8), pointer :: gfrac(:) => null() @@ -175,6 +176,7 @@ subroutine med_fraction_init(gcomp, rc) real(R8), pointer :: Sl_lfrin(:) => null() real(R8), pointer :: Si_imask(:) => null() real(R8), pointer :: So_omask(:) => null() + real(R8), pointer :: Sa_ofrac(:) => null() integer :: i,j,n,n1,ns integer :: maptype logical, save :: first_call = .true. @@ -344,6 +346,17 @@ subroutine med_fraction_init(gcomp, rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return call med_map_field(field_src, field_dst, is_local%wrap%RH(compocn,compatm,:), maptype, rc=rc) if (chkerr(rc,__LINE__,u_FILE_u)) return + + ! Set 'aofrac' in FBfrac(compatm) + if (trim(coupling_mode) == 'nems_orig' .or. trim(coupling_mode) == 'nems_frac') then + call fldbun_getdata1d(is_local%wrap%FBImp(compatm,compatm), 'Sa_ofrac', Sa_ofrac, rc) + if (ChkErr(rc,__LINE__,u_FILE_u)) return + call fldbun_getdata1d(is_local%wrap%FBFrac(compatm), 'aofrac', aofrac, rc) + if (ChkErr(rc,__LINE__,u_FILE_u)) return + if (associated(ofrac)) then + aofrac(:) = Sa_ofrac(:) + end if + end if end if !--------------------------------------- @@ -630,8 +643,10 @@ subroutine med_fraction_set(gcomp, rc) real(r8), pointer :: lfrac(:) => null() real(r8), pointer :: ifrac(:) => null() real(r8), pointer :: ofrac(:) => null() + real(r8), pointer :: aofrac(:) => null() real(r8), pointer :: Si_ifrac(:) => null() real(r8), pointer :: Si_imask(:) => null() + real(r8), pointer :: Sa_ofrac(:) => null() type(ESMF_Field) :: lfield type(ESMF_Field) :: field_src type(ESMF_Field) :: field_dst @@ -754,6 +769,14 @@ subroutine med_fraction_set(gcomp, rc) call med_map_field(field_src, field_dst, is_local%wrap%RH(compice,compatm,:), maptype, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return end if + ! Set 'aofrac' from FBImp(compatm) to FBfrac(compatm) + if (trim(coupling_mode) == 'nems_orig' .or. trim(coupling_mode) == 'nems_frac') then + call fldbun_getdata1d(is_local%wrap%FBImp(compatm,compatm), 'Sa_ofrac', Sa_ofrac, rc) + if (ChkErr(rc,__LINE__,u_FILE_u)) return + call fldbun_getdata1d(is_local%wrap%FBFrac(compatm), 'aofrac', aofrac, rc) + if (ChkErr(rc,__LINE__,u_FILE_u)) return + aofrac(:) = Sa_ofrac(:) + end if end if ! end of if present compatm call t_stopf('MED:'//trim(subname)//' fbfrac(compatm)') diff --git a/mediator/med_map_mod.F90 b/mediator/med_map_mod.F90 index 25497f2b..ee937155 100644 --- a/mediator/med_map_mod.F90 +++ b/mediator/med_map_mod.F90 @@ -208,7 +208,7 @@ subroutine med_map_routehandles_initfrom_field(n1, n2, fldsrc, flddst, mapindex, use ESMF , only : ESMF_RouteHandle, ESMF_RouteHandlePrint, ESMF_Field, ESMF_MAXSTR use ESMF , only : ESMF_PoleMethod_Flag, ESMF_POLEMETHOD_ALLAVG use ESMF , only : ESMF_FieldSMMStore, ESMF_FieldRedistStore, ESMF_FieldRegridStore - use ESMF , only : ESMF_RouteHandleIsCreated + use ESMF , only : ESMF_RouteHandleIsCreated, ESMF_RouteHandleCreate use ESMF , only : ESMF_REGRIDMETHOD_BILINEAR, ESMF_REGRIDMETHOD_PATCH use ESMF , only : ESMF_REGRIDMETHOD_CONSERVE, ESMF_NORMTYPE_DSTAREA, ESMF_NORMTYPE_FRACAREA use ESMF , only : ESMF_UNMAPPEDACTION_IGNORE, ESMF_REGRIDMETHOD_NEAREST_STOD @@ -219,7 +219,7 @@ subroutine med_map_routehandles_initfrom_field(n1, n2, fldsrc, flddst, mapindex, use esmFlds , only : mapbilnr, mapconsf, mapconsd, mappatch, mappatch_uv3d, mapbilnr_uv3d, mapfcopy use esmFlds , only : mapunset, mapnames, nmappers use esmFlds , only : mapnstod, mapnstod_consd, mapnstod_consf, mapnstod_consd - use esmFlds , only : mapfillv_bilnr, mapbilnr_nstod + use esmFlds , only : mapfillv_bilnr, mapbilnr_nstod, mapconsf_aofrac use esmFlds , only : ncomps, compatm, compice, compocn, compname use esmFlds , only : coupling_mode, dststatus_print use esmFlds , only : atm_name @@ -385,6 +385,30 @@ subroutine med_map_routehandles_initfrom_field(n1, n2, fldsrc, flddst, mapindex, unmappedaction=ESMF_UNMAPPEDACTION_IGNORE, & rc=rc) if (chkerr(rc,__LINE__,u_FILE_u)) return + else if (mapindex == mapconsf_aofrac) then + if (.not. ESMF_RouteHandleIsCreated(routehandles(mapconsf))) then + if (mastertask) then + write(logunit,'(A)') trim(subname)//' creating RH '//trim(mapname)//' for '//trim(string) + end if + call ESMF_FieldRegridStore(fldsrc, flddst, routehandle=routehandles(mapconsf_aofrac), & + srcMaskValues=(/srcMaskValue/), & + dstMaskValues=(/dstMaskValue/), & + regridmethod=ESMF_REGRIDMETHOD_CONSERVE, & + normType=ESMF_NORMTYPE_FRACAREA, & + srcTermProcessing=srcTermProcessing_Value, & + ignoreDegenerate=.true., & + dstStatusField=dststatusfield, & + unmappedaction=ESMF_UNMAPPEDACTION_IGNORE, & + rc=rc) + if (chkerr(rc,__LINE__,u_FILE_u)) return + else + ! Copy existing consf RH + if (mastertask) then + write(logunit,'(A)') trim(subname)//' copying RH(mapconsf) to '//trim(mapname)//' for '//trim(string) + end if + routehandles(mapconsf_aofrac) = ESMF_RouteHandleCreate(routehandles(mapconsf), rc=rc) + if (chkerr(rc,__LINE__,u_FILE_u)) return + end if else if (mapindex == mapconsd .or. mapindex == mapnstod_consd) then if (mastertask) then write(logunit,'(A)') trim(subname)//' creating RH '//trim(mapname)//' for '//trim(string) @@ -663,7 +687,7 @@ subroutine med_map_mapnorm_init(gcomp, rc) if (chkerr(rc,__LINE__,u_FILE_u)) return if (mastertask) then write(logunit,'(a)') trim(subname)//' created field_NormOne for '& - //compname(n1)//'->'//compname(n2)//' with mapping '//mapnames(m) + //compname(n1)//'->'//compname(n2)//' with mapping '//trim(mapnames(m)) endif end if end do ! end of loop over m mappers