From 64a06fa0773d0c37e325bc8eb9298292e6570551 Mon Sep 17 00:00:00 2001 From: "Grant.Firl" Date: Mon, 29 Apr 2019 13:07:44 -0600 Subject: [PATCH] updates to several CCPP-compliant schemes to be in sync with commit 65d88b51 from the NEMSfv3gfs_GSD_fractional_landmask branch of VLab EMC FV3 --- physics/GFS_PBL_generic.F90 | 80 +++++++++++++++------------------ physics/GFS_surface_generic.F90 | 33 +++++--------- physics/sfc_sice.f | 79 ++++++++++---------------------- 3 files changed, 72 insertions(+), 120 deletions(-) diff --git a/physics/GFS_PBL_generic.F90 b/physics/GFS_PBL_generic.F90 index 21bedbf2d..9731a6309 100644 --- a/physics/GFS_PBL_generic.F90 +++ b/physics/GFS_PBL_generic.F90 @@ -372,49 +372,43 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, ! --- ... coupling insertion - if (cplflx) then - do i=1,im - !GF from fractional landmask commit; not needed yet due to cplflx = F - ! if (Model%cplflx) then - ! do i=1,im - ! if (ocean(i)) then ! Ocean only, NO LAKES - ! if (dry(i) .or. icy(i)) then ! use stress_ocean from sfc_diff for opw component at mixed point - ! tem1 = max(Diag%q1(i), 1.e-8) - ! rho = Statein%prsl(i,1) / (con_rd*Diag%t1(i)*(1.0+con_fvirt*tem1)) - ! if (wind(i) > 0.) then - ! Coupling%dusfci_cpl(i) = -rho * stress_ocean(i) * Statein%ugrs(i,1) / wind(i) ! U-momentum flux - ! Coupling%dvsfci_cpl(i) = -rho * stress_ocean(i) * Statein%vgrs(i,1) / wind(i) ! V-momentum flux - ! else - ! Coupling%dusfci_cpl(i) = 0. - ! Coupling%dvsfci_cpl(i) = 0. - ! end if - ! Coupling%dtsfci_cpl(i) = con_cp * rho * hflx_ocean(i) !sensible heat flux over open ocean - ! Coupling%dqsfci_cpl(i) = con_hvap * rho * evap_ocean(i) ! latent heat flux over open ocean - ! else ! use results from PBL scheme for 100% open ocean - ! Coupling%dusfci_cpl(i) = dusfc1(i) - ! Coupling%dvsfci_cpl(i) = dvsfc1(i) - ! Coupling%dtsfci_cpl(i) = dtsfc1(i) - ! Coupling%dqsfci_cpl(i) = dqsfc1(i) - ! endif - ! - ! Coupling%dusfc_cpl (i) = Coupling%dusfc_cpl(i) + Coupling%dusfci_cpl(i) * dtf - ! Coupling%dvsfc_cpl (i) = Coupling%dvsfc_cpl(i) + Coupling%dvsfci_cpl(i) * dtf - ! Coupling%dtsfc_cpl (i) = Coupling%dtsfc_cpl(i) + Coupling%dtsfci_cpl(i) * dtf - ! Coupling%dqsfc_cpl (i) = Coupling%dqsfc_cpl(i) + Coupling%dqsfci_cpl(i) * dtf - ! ! - ! endif ! Ocean only, NO LAKES - ! enddo - ! endif - dusfc_cpl (i) = dusfc_cpl(i) + dusfc1(i)*dtf - dvsfc_cpl (i) = dvsfc_cpl(i) + dvsfc1(i)*dtf - dtsfc_cpl (i) = dtsfc_cpl(i) + dtsfc1(i)*dtf - dqsfc_cpl (i) = dqsfc_cpl(i) + dqsfc1(i)*dtf - dusfci_cpl(i) = dusfc1(i) - dvsfci_cpl(i) = dvsfc1(i) - dtsfci_cpl(i) = dtsfc1(i) - dqsfci_cpl(i) = dqsfc1(i) - enddo - endif +! ### GJF ### the following section needs to be made CCPP-compliant when cplflx = T +! if (cplflx) then +! do i=1,im +! if (ocean(i)) then ! Ocean only, NO LAKES +! if (flag_cice(i)) cice(i) = fice_cice(i) +! if (cice(i) == 1.) then ! use results from CICE +! Coupling%dusfci_cpl(i) = dusfc_cice(i) +! Coupling%dvsfci_cpl(i) = dvsfc_cice(i) +! Coupling%dtsfci_cpl(i) = dtsfc_cice(i) +! Coupling%dqsfci_cpl(i) = dqsfc_cice(i) +! elseif (dry(i) .or. icy(i)) then ! use stress_ocean from sfc_diff for opw component at mixed point +! tem1 = max(Diag%q1(i), 1.e-8) +! rho = Statein%prsl(i,1) / (con_rd*Diag%t1(i)*(1.0+con_fvirt*tem1)) +! if (wind(i) > 0.) then +! Coupling%dusfci_cpl(i) = -rho * stress_ocean(i) * Statein%ugrs(i,1) / wind(i) ! U-momentum flux +! Coupling%dvsfci_cpl(i) = -rho * stress_ocean(i) * Statein%vgrs(i,1) / wind(i) ! V-momentum flux +! else +! Coupling%dusfci_cpl(i) = 0. +! Coupling%dvsfci_cpl(i) = 0. +! end if +! Coupling%dtsfci_cpl(i) = con_cp * rho * hflx_ocean(i) !sensible heat flux over open ocean +! Coupling%dqsfci_cpl(i) = con_hvap * rho * evap_ocean(i) ! latent heat flux over open ocean +! else ! use results from PBL scheme for 100% open ocean +! Coupling%dusfci_cpl(i) = dusfc1(i) +! Coupling%dvsfci_cpl(i) = dvsfc1(i) +! Coupling%dtsfci_cpl(i) = dtsfc1(i) +! Coupling%dqsfci_cpl(i) = dqsfc1(i) +! endif +! +! Coupling%dusfc_cpl (i) = Coupling%dusfc_cpl(i) + Coupling%dusfci_cpl(i) * dtf +! Coupling%dvsfc_cpl (i) = Coupling%dvsfc_cpl(i) + Coupling%dvsfci_cpl(i) * dtf +! Coupling%dtsfc_cpl (i) = Coupling%dtsfc_cpl(i) + Coupling%dtsfci_cpl(i) * dtf +! Coupling%dqsfc_cpl (i) = Coupling%dqsfc_cpl(i) + Coupling%dqsfci_cpl(i) * dtf +! ! +! endif ! Ocean only, NO LAKES +! enddo +! endif !-------------------------------------------------------lssav if loop ---------- if (lssav) then do i=1,im diff --git a/physics/GFS_surface_generic.F90 b/physics/GFS_surface_generic.F90 index 8ac6a5d92..dced17a41 100644 --- a/physics/GFS_surface_generic.F90 +++ b/physics/GFS_surface_generic.F90 @@ -50,9 +50,6 @@ end subroutine GFS_surface_generic_pre_finalize !! | weasd | water_equivalent_accumulated_snow_depth | water equiv of acc snow depth over land and sea ice | mm | 1 | real | kind_phys | in | F | !! | weasd_lnd | water_equivalent_accumulated_snow_depth_over_land | water equiv of acc snow depth over land | mm | 1 | real | kind_phys | inout | F | !! | weasd_ice | water_equivalent_accumulated_snow_depth_over_ice | water equiv of acc snow depth over ice | mm | 1 | real | kind_phys | inout | F | -!! | evap_ocn | kinematic_surface_upward_latent_heat_flux_over_ocean | kinematic surface upward latent heat flux over ocean | kg kg-1 m s-1 | 1 | real | kind_phys | inout | F | -!! | hflx_ocn | kinematic_surface_upward_sensible_heat_flux_over_ocean | kinematic surface upward sensible heat flux over ocean | K m s-1 | 1 | real | kind_phys | inout | F | -!! | stress_ocn | surface_wind_stress_over_ocean | surface wind stress over ocean | m2 s-2 | 1 | real | kind_phys | inout | F | !! | ep1d_ice | surface_upward_potential_latent_heat_flux_over_ice | surface upward potential latent heat flux over ice | W m-2 | 1 | real | kind_phys | inout | F | !! | isot | soil_type_dataset_choice | soil type dataset choice | index | 0 | integer | | in | F | !! | ivegsrc | vegetation_type_dataset_choice | land use dataset choice | index | 0 | integer | | in | F | @@ -110,7 +107,7 @@ subroutine GFS_surface_generic_pre_run (im, levs, cplflx, vfrac, islmsk, landfra oceanfrac, dry, icy, lake, ocean, wet, fice, cimin, zorl, zorlo, zorll, zorl_ocn,& zorl_lnd, zorl_ice, snowd, snowd_ocn, snowd_lnd, snowd_ice, tprcp, tprcp_ocn, & tprcp_lnd, tprcp_ice, uustar, uustar_lnd, uustar_ice, weasd, weasd_lnd, & - weasd_ice, evap_ocn, hflx_ocn, stress_ocn, ep1d_ice, isot, ivegsrc, stype, vtype,& + weasd_ice, ep1d_ice, isot, ivegsrc, stype, vtype, & slope, prsik_1, prslk_1, semis, adjsfcdlw, tsfc, tsfco, tsfcl, tsfc_ocn, & tsfc_lnd, tsfc_ice, tisfc, phil, con_g, sigmaf, soiltyp, vegtype, slopetyp, & work3, gabsbdlw, tsurf, tsurf_ocn, tsurf_lnd, tsurf_ice, zlvl, do_sppt, dtdtr, & @@ -142,8 +139,7 @@ subroutine GFS_surface_generic_pre_run (im, levs, cplflx, vfrac, islmsk, landfra real(kind=kind_phys), dimension(im), intent(inout) :: zorlo, zorll, tsfco, tsfcl, tisfc real(kind=kind_phys), dimension(im), intent(inout) :: snowd_ocn, snowd_lnd, snowd_ice, tprcp_ocn, & tprcp_lnd, tprcp_ice, zorl_ocn, zorl_lnd, zorl_ice, tsfc_ocn, tsfc_lnd, tsfc_ice, tsurf_ocn, & - tsurf_lnd, tsurf_ice, uustar_lnd, uustar_ice, weasd_lnd, weasd_ice, evap_ocn, hflx_ocn, & - stress_ocn, ep1d_ice + tsurf_lnd, tsurf_ice, uustar_lnd, uustar_ice, weasd_lnd, weasd_ice, ep1d_ice ! Stochastic physics / surface perturbations logical, intent(in) :: do_sppt @@ -294,9 +290,6 @@ subroutine GFS_surface_generic_pre_run (im, levs, cplflx, vfrac, islmsk, landfra zorl_ocn(i) = zorlo(i) tsfc_ocn(i) = tsfco(i) tsurf_ocn(i)= tsfco(i) - evap_ocn(i) = 0. - hflx_ocn(i) = 0. - stress_ocn(i) = 0. endif ! if (dry(i)) then @@ -350,10 +343,10 @@ end subroutine GFS_surface_generic_post_finalize !! | cplflx | flag_for_flux_coupling | flag controlling cplflx collection (default off) | flag | 0 | logical | | in | F | !! | cplwav | flag_for_wave_coupling | flag controlling cplwav collection (default off) | flag | 0 | logical | | in | F | !! | lssav | flag_diagnostics | logical flag for storing diagnostics | flag | 0 | logical | | in | F | +!! | flag_cice | flag_for_cice | flag for cice | flag | 1 | logical | | in | F | !! | dry | flag_nonzero_land_surface_fraction | flag indicating presence of some land surface area fraction | flag | 1 | logical | | in | F | !! | wet | flag_nonzero_wet_surface_fraction | flag indicating presence of some ocean or lake surface area fraction | flag | 1 | logical | | in | F | !! | icy | flag_nonzero_sea_ice_surface_fraction | flag indicating presence of some sea ice surface area fraction | flag | 1 | logical | | in | F | -!! | lake | flag_nonzero_lake_surface_fraction | flag indicating presence of some lake surface area fraction | flag | 1 | logical | | in | F | !! | dtf | time_step_for_dynamics | dynamics timestep | s | 0 | real | kind_phys | in | F | !! | tgrs_1 | air_temperature_at_lowest_model_layer | mean temperature at lowest model layer | K | 1 | real | kind_phys | in | F | !! | qgrs_1 | water_vapor_specific_humidity_at_lowest_model_layer | specific humidity at lowest model layer | kg kg-1 | 1 | real | kind_phys | in | F | @@ -530,9 +523,9 @@ end subroutine GFS_surface_generic_post_finalize !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! #endif - subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, dry, wet, icy, lake, dtf, tgrs_1, qgrs_1, ugrs_1, vgrs_1, & - adjsfcdlw, adjsfcdsw, adjnirbmd, adjnirdfd, adjvisbmd, adjvisdfd, adjsfculw, adjnirbmu, adjnirdfu, adjvisbmu, adjvisdfu, & - t2m, q2m, u10m, v10m, pgr, xcosz, evbs, evcw, trans, sbsno, snowc, snohf, & + subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, flag_cice, dry, wet, icy, dtf, tgrs_1, qgrs_1, ugrs_1, & + vgrs_1, adjsfcdlw, adjsfcdsw, adjnirbmd, adjnirdfd, adjvisbmd, adjvisdfd, adjsfculw, adjnirbmu, adjnirdfu, adjvisbmu, & + adjvisdfu, t2m, q2m, u10m, v10m, pgr, xcosz, evbs, evcw, trans, sbsno, snowc, snohf, & epi, gfluxi, t1, q1, u1, v1, dlwsfci_cpl, dswsfci_cpl, dlwsfc_cpl, dswsfc_cpl, dnirbmi_cpl, dnirdfi_cpl, dvisbmi_cpl, & dvisdfi_cpl, dnirbm_cpl, dnirdf_cpl, dvisbm_cpl, dvisdf_cpl, nlwsfci_cpl, nlwsfc_cpl, t2mi_cpl, q2mi_cpl, u10mi_cpl, & v10mi_cpl, tsfci_cpl, psurfi_cpl, nnirbmi_cpl, nnirdfi_cpl, nvisbmi_cpl, nvisdfi_cpl, nswsfci_cpl, nswsfc_cpl, nnirbm_cpl, & @@ -552,7 +545,7 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, dry, wet, ic integer, intent(in) :: im logical, intent(in) :: cplflx, cplwav, lssav - logical, dimension(im), intent(in) :: dry, wet, icy, lake + logical, dimension(im), intent(in) :: dry, wet, icy, flag_cice real(kind=kind_phys), intent(in) :: dtf @@ -593,7 +586,7 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, dry, wet, ic do i=1, im ! - ! Three-way composites (fields from sfc_diff_ocean, sfc_diff_land, sfc_diff_ice) + ! Three-way composites (fields from sfc_diff) zorl(i) = cmposit3(ocnfrac(i), lndfrac(i), & lakfrac(i),cice(i), & zorl_ocn(i), zorl_lnd(i), zorl_ice(i)) @@ -649,9 +642,7 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, dry, wet, ic lakfrac(i),cice(i), & tprcp_ocn(i), tprcp_lnd(i), tprcp_ice(i)) - ! Two-way composites (fields already composited in sfc_sice) - ! Three-way composites when coupled - if(cplflx .and. .not. lake(i)) then ! Lakes in coupled mode use sice? + if(cplflx .and. flag_cice(i)) then ! 3-way when sfc_cice is used evap(i) = cmposit3(ocnfrac(i),lndfrac(i), & lakfrac(i),cice(i), & evap_ocn(i), evap_lnd(i), evap_ice(i)) @@ -664,7 +655,7 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, dry, wet, ic tsfc(i) = cmposit3(ocnfrac(i),lndfrac(i), & lakfrac(i),cice(i), & tsfc_ocn(i), tsfc_lnd(i), tsfc_ice(i)) - else + else ! 2-way when sfc_sice used (fields already composited in sfc_sice) evap(i) = cmposit2(ocnfrac(i),lndfrac(i), & lakfrac(i),cice(i), & evap_ocn(i), evap_lnd(i), evap_ice(i)) @@ -677,7 +668,7 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, dry, wet, ic tsfc(i) = cmposit2(ocnfrac(i),lndfrac(i), & lakfrac(i),cice(i), & tsfc_ocn(i), tsfc_lnd(i), tsfc_ice(i)) - if(icy(i) .and. .not. cplflx) then + if(icy(i)) then cmm(i) = cmm_ice(i) chh(i) = chh_ice(i) gflx(i) = gflx_ice(i) @@ -685,7 +676,7 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, dry, wet, ic weasd(i) = weasd_ice(i) snowd(i) = snowd_ice(i) end if - endif + endif ! cplflx .and. flag_cice zorll(i) = zorl_lnd(i) zorlo(i) = zorl_ocn(i) diff --git a/physics/sfc_sice.f b/physics/sfc_sice.f index e69c64565..bd691bb26 100644 --- a/physics/sfc_sice.f +++ b/physics/sfc_sice.f @@ -120,15 +120,13 @@ end subroutine sfc_sice_finalize !! | ch | surface_drag_coefficient_for_heat_and_moisture_in_air_over_ice | surface exchange coeff heat & moisture over ice | none | 1 | real | kind_phys | in | F | !! | prsl1 | air_pressure_at_lowest_model_layer | surface layer mean pressure | Pa | 1 | real | kind_phys | in | F | !! | prslki | ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer | Exner function ratio bt midlayer and interface at 1st layer | ratio | 1 | real | kind_phys | in | F | +!! | islimsk | sea_land_ice_mask | sea/land/ice mask (=0/1/2) | flag | 1 | integer | | in | F | !! | ddvel | surface_wind_enhancement_due_to_convection | wind enhancement due to convection | m s-1 | 1 | real | kind_phys | in | F | !! | flag_iter | flag_for_iteration | flag for iteration | flag | 1 | logical | | in | F | !! | mom4ice | flag_for_mom4_coupling | flag for Mom4 coupling | flag | 0 | logical | | in | F | !! | lsm | flag_for_land_surface_scheme | flag for land sfc scheme =0: osu; =1: noah | flag | 0 | integer | | in | F | !! | lprnt | flag_print | switch for printing sample column to stdout | flag | 0 | logical | | in | F | !! | ipr | horizontal_index_of_printed_column | horizontal index of printed column | index | 0 | integer | | in | F | -!! | cplflx | flag_for_flux_coupling | flag controlling cplflx collection (default off) | flag | 0 | logical | | in | F | -!! | ocn | flag_nonzero_ocean_surface_fraction | flag indicating presence of some ocean surface area fraction | flag | 1 | logical | | in | F | -!! | lake | flag_nonzero_lake_surface_fraction | flag indicating presence of some lake surface area fraction | flag | 1 | logical | | in | F | !! | hice | sea_ice_thickness | sea-ice thickness | m | 1 | real | kind_phys | inout | F | !! | fice | sea_ice_concentration | sea-ice concentration [0,1] | frac | 1 | real | kind_phys | inout | F | !! | tice | sea_ice_temperature | sea-ice surface temperature | K | 1 | real | kind_phys | inout | F | @@ -137,7 +135,6 @@ end subroutine sfc_sice_finalize !! | tprcp | nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ice | total precipitation amount in each time step over ice | m | 1 | real | kind_phys | inout | F | !! | stc | soil_temperature | soil temp | K | 2 | real | kind_phys | inout | F | !! | ep | surface_upward_potential_latent_heat_flux_over_ice | surface upward potential latent heat flux over ice | W m-2 | 1 | real | kind_phys | inout | F | -!! | icy | flag_nonzero_sea_ice_surface_fraction | flag indicating presence of some sea ice surface area fraction | flag | 1 | logical | | inout | F | !! | snwdph | surface_snow_thickness_water_equivalent_over_ice | water equivalent snow depth over ice | mm | 1 | real | kind_phys | inout | F | !! | qsurf | surface_specific_humidity_over_ice | surface air saturation specific humidity over ice | kg kg-1 | 1 | real | kind_phys | inout | F | !! | snowmt | surface_snow_melt | snow melt during timestep | m | 1 | real | kind_phys | inout | F | @@ -177,10 +174,10 @@ subroutine sfc_sice_run & & ( im, km, sbc, hvap, tgice, cp, eps, epsm1, rvrdm1, grav, & & t0c, rd, cimin, ps, u1, v1, t1, q1, delt, & & sfcemis, dlwflx, sfcnsw, sfcdsw, srflag, & - & cm, ch, prsl1, prslki, ddvel, & - & flag_iter, mom4ice, lsm, lprnt, ipr, cplflx, ocn, lake, & + & cm, ch, prsl1, prslki, islimsk, ddvel, & + & flag_iter, mom4ice, lsm, lprnt, ipr, & ! --- input/outputs: - & hice, fice, tice, weasd, tskin, tprcp, stc, ep, icy, & + & hice, fice, tice, weasd, tskin, tprcp, stc, ep, & ! --- outputs: & snwdph, qsurf, snowmt, gflux, cmm, chh, evap, hflx, & & errmsg, errflg @@ -195,7 +192,7 @@ subroutine sfc_sice_run & ! inputs: ! ! ( im, km, ps, u1, v1, t1, q1, delt, ! ! sfcemis, dlwflx, sfcnsw, sfcdsw, srflag, ! -! cm, ch, prsl1, prslki, ddvel, ! +! cm, ch, prsl1, prslki, islimsk, ddvel, ! ! flag_iter, mom4ice, lsm, ! ! input/outputs: ! ! hice, fice, tice, weasd, tskin, tprcp, stc, ep, ! @@ -239,12 +236,10 @@ subroutine sfc_sice_run & ! ch - real, surface exchange coeff heat & moisture(m/s) im ! ! prsl1 - real, surface layer mean pressure im ! ! prslki - real, im ! +! islimsk - integer, sea/land/ice mask (=0/1/2) im ! ! ddvel - real, im ! ! flag_iter- logical, im ! ! mom4ice - logical, im ! -! cplflx - logical, coupled flux ! -! ocn - logical, ocean point flag im ! -! lake - logical, lake point flag im ! ! lsm - integer, flag for land surface model scheme 1 ! ! =0: use osu scheme; =1: use noah scheme ! ! ! @@ -257,7 +252,6 @@ subroutine sfc_sice_run & ! tprcp - real, total precipitation im ! ! stc - real, soil temp (k) im,km ! ! ep - real, potential evaporation im ! -! icy - logical, ice flag im ! ! ! ! outputs: ! ! snwdph - real, water equivalent snow depth (mm) im ! @@ -287,7 +281,7 @@ subroutine sfc_sice_run & ! --- inputs: integer, intent(in) :: im, km, lsm, ipr - logical, intent(in) :: lprnt, cplflx + logical, intent(in) :: lprnt real (kind=kind_phys), intent(in) :: sbc, hvap, tgice, cp, eps, & & epsm1, grav, rvrdm1, t0c, rd, cimin @@ -295,10 +289,11 @@ subroutine sfc_sice_run & real (kind=kind_phys), dimension(im), intent(in) :: ps, u1, v1, & & t1, q1, sfcemis, dlwflx, sfcnsw, sfcdsw, srflag, cm, ch, & & prsl1, prslki, ddvel - + + integer, dimension(im), intent(in) :: islimsk real (kind=kind_phys), intent(in) :: delt - logical, dimension(im), intent(in) :: flag_iter, ocn, lake + logical, dimension(im), intent(in) :: flag_iter logical, intent(in) :: mom4ice ! --- input/outputs: @@ -342,39 +337,17 @@ subroutine sfc_sice_run & ! !> - Set flag for sea-ice. - if (cplflx) then ! Coupled: only compute over lake points - do i = 1, im - flag(i) = .false. - if (lake(i)) then ! This block covers lakes - if (flag_iter(i)) then - if (fice(i) < cimin) then - hice(i) = 0.0 - fice(i) = 0.0 - icy(i) = .false. - else - flag(i) = .true. - end if - end if ! flag_iter(i) - elseif (.not.ocn(i)) then ! 100% land point + do i = 1, im + flag(i) = .false. + if (flag_iter(i)) then + if (islimsk(i) == 2) then + flag(i) = .true. + else hice(i) = 0.0 fice(i) = 0.0 - icy(i) = .false. - endif - enddo - else ! Uncoupled - do i = 1, im - flag(i) = .false. - if (flag_iter(i)) then - if (fice(i) < cimin) then - hice(i) = 0.0 - fice(i) = 0.0 - icy(i) = .false. - else - flag(i) = .true. - end if ! flag_iter(i) end if - enddo - endif + end if ! flag_iter(i) + enddo !> - Update/read sea ice temperature from soil temperature and initialize variables. @@ -386,17 +359,11 @@ subroutine sfc_sice_run & enddo enddo ! - if (mom4ice .or. cplflx) then + if (mom4ice) then do i = 1, im - if (flag(i) .and. .not. lake(i)) then ! sea ice + if (flag(i)) then ! sea ice hi_save(i) = hice(i) hs_save(i) = weasd(i) * 0.001 - elseif(flag(i) .and. lake(i)) then ! lake ice - if (srflag(i) == 1.0) then - ep(i) = 0.0 - weasd(i) = weasd(i) + 1.e3*tprcp(i) - tprcp(i) = 0.0 - endif endif enddo elseif (lsm > 0) then ! --- ... snow-rain detection @@ -453,7 +420,7 @@ subroutine sfc_sice_run & !> - Convert snow depth in water equivalent from mm to m unit. - if (mom4ice .or. (cplflx .and. .not.lake(i))) then + if (mom4ice) then snowd(i) = weasd(i) * 0.001 / fice(i) else snowd(i) = weasd(i) * 0.001 @@ -529,9 +496,9 @@ subroutine sfc_sice_run & & snowd, hice, stsice, tice, snof, snowmt, gflux ) ! ! if (lprnt) write(0,*)' tice3=',tice(ipr) - if (mom4ice .or. cplflx) then + if (mom4ice) then do i = 1, im - if (flag(i) .and. .not.lake(i)) then + if (flag(i)) then hice(i) = hi_save(i) snowd(i) = hs_save(i) endif