Changeset 9935 for NEMO/trunk/src/OCE/SBC
- Timestamp:
- 2018-07-12T16:12:48+02:00 (6 years ago)
- Location:
- NEMO/trunk/src/OCE/SBC
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/src/OCE/SBC/sbcblk.F90
r9929 r9935 526 526 ! 527 527 qns(:,:) = zqlw(:,:) - zqsb(:,:) - zqla(:,:) & ! Downward Non Solar 528 & - sf(jp_snow)%fnow(:,:,1) * rn_pfac * lfus& ! remove latent melting heat for solid precip528 & - sf(jp_snow)%fnow(:,:,1) * rn_pfac * rLfus & ! remove latent melting heat for solid precip 529 529 & - zevap(:,:) * pst(:,:) * rcp & ! remove evap heat content at SST 530 530 & + ( sf(jp_prec)%fnow(:,:,1) - sf(jp_snow)%fnow(:,:,1) ) * rn_pfac & ! add liquid precip heat content at Tair 531 531 & * ( sf(jp_tair)%fnow(:,:,1) - rt0 ) * rcp & 532 532 & + sf(jp_snow)%fnow(:,:,1) * rn_pfac & ! add solid precip heat content at min(Tair,Tsnow) 533 & * ( MIN( sf(jp_tair)%fnow(:,:,1), rt0 ) - rt0 ) * cpic533 & * ( MIN( sf(jp_tair)%fnow(:,:,1), rt0 ) - rt0 ) * rcpi 534 534 qns(:,:) = qns(:,:) * tmask(:,:,1) 535 535 ! … … 659 659 zrv = pqa(ji,jj) / (1. - pqa(ji,jj)) 660 660 ziRT = 1. / (R_dry*ptak(ji,jj)) ! 1/RT 661 gamma_moist(ji,jj) = grav * ( 1. + cevap*zrv*ziRT ) / ( Cp_dry + cevap*cevap*zrv*reps0*ziRT/ptak(ji,jj) )661 gamma_moist(ji,jj) = grav * ( 1. + rLevap*zrv*ziRT ) / ( Cp_dry + rLevap*rLevap*zrv*reps0*ziRT/ptak(ji,jj) ) 662 662 END DO 663 663 END DO … … 792 792 REAL(wp) :: zst3 ! local variable 793 793 REAL(wp) :: zcoef_dqlw, zcoef_dqla ! - - 794 REAL(wp) :: zztmp, z1_ lsub ! - -794 REAL(wp) :: zztmp, z1_rLsub ! - - 795 795 REAL(wp) :: zfr1, zfr2 ! local variables 796 796 REAL(wp), DIMENSION(jpi,jpj,jpl) :: z1_st ! inverse of surface temperature … … 868 868 869 869 ! --- evaporation --- ! 870 z1_ lsub = 1._wp /Lsub871 evap_ice (:,:,:) = rn_efac * qla_ice (:,:,:) * z1_ lsub ! sublimation872 devap_ice(:,:,:) = rn_efac * dqla_ice(:,:,:) * z1_ lsub ! d(sublimation)/dT873 zevap (:,:) = rn_efac * ( emp(:,:) + tprecip(:,:) ) ! evaporation over ocean870 z1_rLsub = 1._wp / rLsub 871 evap_ice (:,:,:) = rn_efac * qla_ice (:,:,:) * z1_rLsub ! sublimation 872 devap_ice(:,:,:) = rn_efac * dqla_ice(:,:,:) * z1_rLsub ! d(sublimation)/dT 873 zevap (:,:) = rn_efac * ( emp(:,:) + tprecip(:,:) ) ! evaporation over ocean 874 874 875 875 ! --- evaporation minus precipitation --- ! … … 884 884 & + ( tprecip(:,:) - sprecip(:,:) ) * ( sf(jp_tair)%fnow(:,:,1) - rt0 ) * rcp & ! liquid precip at Tair 885 885 & + sprecip(:,:) * ( 1._wp - zsnw ) * & ! solid precip at min(Tair,Tsnow) 886 & ( ( MIN( sf(jp_tair)%fnow(:,:,1), rt0 ) - rt0 ) * cpic * tmask(:,:,1) - lfus )886 & ( ( MIN( sf(jp_tair)%fnow(:,:,1), rt0 ) - rt0 ) * rcpi * tmask(:,:,1) - rLfus ) 887 887 qemp_ice(:,:) = sprecip(:,:) * zsnw * & ! solid precip (only) 888 & ( ( MIN( sf(jp_tair)%fnow(:,:,1), rt0 ) - rt0 ) * cpic * tmask(:,:,1) - lfus )888 & ( ( MIN( sf(jp_tair)%fnow(:,:,1), rt0 ) - rt0 ) * rcpi * tmask(:,:,1) - rLfus ) 889 889 890 890 ! --- total solar and non solar fluxes --- ! … … 894 894 895 895 ! --- heat content of precip over ice in J/m3 (to be used in 1D-thermo) --- ! 896 qprec_ice(:,:) = rhos n * ( ( MIN( sf(jp_tair)%fnow(:,:,1), rt0 ) - rt0 ) * cpic * tmask(:,:,1) - lfus )896 qprec_ice(:,:) = rhos * ( ( MIN( sf(jp_tair)%fnow(:,:,1), rt0 ) - rt0 ) * rcpi * tmask(:,:,1) - rLfus ) 897 897 898 898 ! --- heat content of evap over ice in W/m2 (to be used in 1D-thermo) --- 899 899 DO jl = 1, jpl 900 qevap_ice(:,:,jl) = 0._wp ! should be -evap_ice(:,:,jl)*( ( Tice - rt0 ) * cpic* tmask(:,:,1) )900 qevap_ice(:,:,jl) = 0._wp ! should be -evap_ice(:,:,jl)*( ( Tice - rt0 ) * rcpi * tmask(:,:,1) ) 901 901 ! ! But we do not have Tice => consider it at 0degC => evap=0 902 902 END DO … … 971 971 CASE ( 1 , 2 ) 972 972 ! 973 zfac = 1._wp / ( rn_cnd_s + rc dic)973 zfac = 1._wp / ( rn_cnd_s + rcnd_i ) 974 974 zfac2 = EXP(1._wp) * 0.5_wp * zepsilon 975 975 zfac3 = 2._wp / zepsilon … … 978 978 DO jj = 1 , jpj 979 979 DO ji = 1, jpi 980 zhe = ( rn_cnd_s * phi(ji,jj,jl) + rc dic * phs(ji,jj,jl) ) * zfac! Effective thickness980 zhe = ( rn_cnd_s * phi(ji,jj,jl) + rcnd_i * phs(ji,jj,jl) ) * zfac ! Effective thickness 981 981 IF( zhe >= zfac2 ) zgfac(ji,jj,jl) = MIN( 2._wp, 0.5_wp * ( 1._wp + LOG( zhe * zfac3 ) ) ) ! Enhanced conduction factor 982 982 END DO … … 990 990 ! -------------------------------------------------------------! 991 991 ! 992 zfac = rc dic* rn_cnd_s992 zfac = rcnd_i * rn_cnd_s 993 993 ! 994 994 DO jl = 1, jpl … … 997 997 ! 998 998 zkeff_h = zfac * zgfac(ji,jj,jl) / & ! Effective conductivity of the snow-ice system divided by thickness 999 & ( rc dic* phs(ji,jj,jl) + rn_cnd_s * MAX( 0.01, phi(ji,jj,jl) ) )999 & ( rcnd_i * phs(ji,jj,jl) + rn_cnd_s * MAX( 0.01, phi(ji,jj,jl) ) ) 1000 1000 ztsu = ptsu(ji,jj,jl) ! Store current iteration temperature 1001 1001 ztsu0 = ptsu(ji,jj,jl) ! Store initial surface temperature -
NEMO/trunk/src/OCE/SBC/sbccpl.F90
r9921 r9935 1418 1418 zqns(:,:) = zqns(:,:) - zemp(:,:) * sst_m(:,:) * rcp ! remove heat content due to mass flux (assumed to be at SST) 1419 1419 IF( srcv(jpr_snow )%laction ) THEN 1420 zqns(:,:) = zqns(:,:) - frcv(jpr_snow)%z3(:,:,1) * lfus! energy for melting solid precipitation over the free ocean1420 zqns(:,:) = zqns(:,:) - frcv(jpr_snow)%z3(:,:,1) * rLfus ! energy for melting solid precipitation over the free ocean 1421 1421 ENDIF 1422 1422 ENDIF 1423 1423 ! 1424 IF( srcv(jpr_icb)%laction ) zqns(:,:) = zqns(:,:) - frcv(jpr_icb)%z3(:,:,1) * lfus ! remove heat content associated to iceberg melting1424 IF( srcv(jpr_icb)%laction ) zqns(:,:) = zqns(:,:) - frcv(jpr_icb)%z3(:,:,1) * rLfus ! remove heat content associated to iceberg melting 1425 1425 ! 1426 1426 IF( ln_mixcpl ) THEN ; qns(:,:) = qns(:,:) * xcplmask(:,:,0) + zqns(:,:) * zmsk(:,:) … … 1811 1811 ! 1812 1812 ! --- calving (removed from qns_tot) --- ! 1813 IF( srcv(jpr_cal)%laction ) zqns_tot(:,:) = zqns_tot(:,:) - frcv(jpr_cal)%z3(:,:,1) * lfus ! remove latent heat of calving1814 ! we suppose it melts at 0deg, though it should be temp. of surrounding ocean1813 IF( srcv(jpr_cal)%laction ) zqns_tot(:,:) = zqns_tot(:,:) - frcv(jpr_cal)%z3(:,:,1) * rLfus ! remove latent heat of calving 1814 ! we suppose it melts at 0deg, though it should be temp. of surrounding ocean 1815 1815 ! --- iceberg (removed from qns_tot) --- ! 1816 IF( srcv(jpr_icb)%laction ) zqns_tot(:,:) = zqns_tot(:,:) - frcv(jpr_icb)%z3(:,:,1) * lfus ! remove latent heat of iceberg melting1816 IF( srcv(jpr_icb)%laction ) zqns_tot(:,:) = zqns_tot(:,:) - frcv(jpr_icb)%z3(:,:,1) * rLfus ! remove latent heat of iceberg melting 1817 1817 1818 1818 #if defined key_si3 … … 1823 1823 1824 1824 ! Heat content per unit mass of snow (J/kg) 1825 WHERE( SUM( a_i, dim=3 ) > 1.e-10 ) ; zcptsnw(:,:) = cpic* SUM( (tn_ice - rt0) * a_i, dim=3 ) / SUM( a_i, dim=3 )1825 WHERE( SUM( a_i, dim=3 ) > 1.e-10 ) ; zcptsnw(:,:) = rcpi * SUM( (tn_ice - rt0) * a_i, dim=3 ) / SUM( a_i, dim=3 ) 1826 1826 ELSEWHERE ; zcptsnw(:,:) = zcptn(:,:) 1827 1827 ENDWHERE … … 1830 1830 1831 1831 ! --- enthalpy of snow precip over ice in J/m3 (to be used in 1D-thermo) --- ! 1832 zqprec_ice(:,:) = rhos n * ( zcptsnw(:,:) - lfus )1832 zqprec_ice(:,:) = rhos * ( zcptsnw(:,:) - rLfus ) 1833 1833 1834 1834 ! --- heat content of evap over ice in W/m2 (to be used in 1D-thermo) --- ! 1835 1835 DO jl = 1, jpl 1836 zqevap_ice(:,:,jl) = 0._wp ! should be -evap * ( ( Tice - rt0 ) * cpic) but atm. does not take it into account1836 zqevap_ice(:,:,jl) = 0._wp ! should be -evap * ( ( Tice - rt0 ) * rcpi ) but atm. does not take it into account 1837 1837 END DO 1838 1838 … … 1840 1840 zqemp_oce(:,:) = - zevap_oce(:,:) * zcptn (:,:) & ! evap 1841 1841 & + ( ztprecip(:,:) - zsprecip(:,:) ) * zcptrain(:,:) & ! liquid precip 1842 & + zsprecip(:,:) * ( 1._wp - zsnw ) * ( zcptsnw (:,:) - lfus )! solid precip over ocean + snow melting1843 zqemp_ice(:,:) = zsprecip(:,:) * zsnw * ( zcptsnw (:,:) - lfus )! solid precip over ice (qevap_ice=0 since atm. does not take it into account)1842 & + zsprecip(:,:) * ( 1._wp - zsnw ) * ( zcptsnw (:,:) - rLfus ) ! solid precip over ocean + snow melting 1843 zqemp_ice(:,:) = zsprecip(:,:) * zsnw * ( zcptsnw (:,:) - rLfus ) ! solid precip over ice (qevap_ice=0 since atm. does not take it into account) 1844 1844 !! zqemp_ice(:,:) = - frcv(jpr_ievp)%z3(:,:,1) * picefr(:,:) * zcptsnw (:,:) & ! ice evap 1845 !! & + zsprecip(:,:) * zsnw * zqprec_ice(:,:) * r1_rhos n! solid precip over ice1845 !! & + zsprecip(:,:) * zsnw * zqprec_ice(:,:) * r1_rhos ! solid precip over ice 1846 1846 1847 1847 ! --- total non solar flux (including evap/precip) --- ! … … 1874 1874 1875 1875 ! clem: this formulation is certainly wrong... but better than it was... 1876 zqns_tot(:,:) = zqns_tot(:,:) & ! zqns_tot update over free ocean with:1877 & - ( ziceld(:,:) * zsprecip(:,:) * lfus ) & ! remove the latent heat flux of solid precip. melting1878 & - ( zemp_tot(:,:) & ! remove the heat content of mass flux (assumed to be at SST)1876 zqns_tot(:,:) = zqns_tot(:,:) & ! zqns_tot update over free ocean with: 1877 & - ( ziceld(:,:) * zsprecip(:,:) * rLfus ) & ! remove the latent heat flux of solid precip. melting 1878 & - ( zemp_tot(:,:) & ! remove the heat content of mass flux (assumed to be at SST) 1879 1879 & - zemp_ice(:,:) ) * zcptn(:,:) 1880 1880 … … 1892 1892 #endif 1893 1893 ! outputs 1894 IF ( srcv(jpr_cal)%laction ) CALL iom_put('hflx_cal_cea' , - frcv(jpr_cal)%z3(:,:,1) * lfus )! latent heat from calving1895 IF ( srcv(jpr_icb)%laction ) CALL iom_put('hflx_icb_cea' , - frcv(jpr_icb)%z3(:,:,1) * lfus )! latent heat from icebergs melting1894 IF ( srcv(jpr_cal)%laction ) CALL iom_put('hflx_cal_cea' , - frcv(jpr_cal)%z3(:,:,1) * rLfus ) ! latent heat from calving 1895 IF ( srcv(jpr_icb)%laction ) CALL iom_put('hflx_icb_cea' , - frcv(jpr_icb)%z3(:,:,1) * rLfus ) ! latent heat from icebergs melting 1896 1896 IF ( iom_use('hflx_rain_cea') ) CALL iom_put('hflx_rain_cea' , ( tprecip(:,:) - sprecip(:,:) ) * zcptrain(:,:) ) ! heat flux from rain (cell average) 1897 1897 IF ( iom_use('hflx_evap_cea') ) CALL iom_put('hflx_evap_cea' , ( frcv(jpr_tevp)%z3(:,:,1) - frcv(jpr_ievp)%z3(:,:,1) & 1898 1898 & * picefr(:,:) ) * zcptn(:,:) * tmask(:,:,1) ) ! heat flux from evap (cell average) 1899 IF ( iom_use('hflx_snow_cea') ) CALL iom_put('hflx_snow_cea' , sprecip(:,:) * ( zcptsnw(:,:) - Lfus )) ! heat flux from snow (cell average)1900 IF ( iom_use('hflx_snow_ao_cea') ) CALL iom_put('hflx_snow_ao_cea', sprecip(:,:) * ( zcptsnw(:,:) - Lfus ) &1899 IF ( iom_use('hflx_snow_cea') ) CALL iom_put('hflx_snow_cea' , sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) ) ! heat flux from snow (cell average) 1900 IF ( iom_use('hflx_snow_ao_cea') ) CALL iom_put('hflx_snow_ao_cea', sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) & 1901 1901 & * ( 1._wp - zsnw(:,:) ) ) ! heat flux from snow (over ocean) 1902 IF ( iom_use('hflx_snow_ai_cea') ) CALL iom_put('hflx_snow_ai_cea', sprecip(:,:) * ( zcptsnw(:,:) - Lfus ) &1902 IF ( iom_use('hflx_snow_ai_cea') ) CALL iom_put('hflx_snow_ai_cea', sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) & 1903 1903 & * zsnw(:,:) ) ! heat flux from snow (over ice) 1904 1904 ! note: hflx for runoff and iceshelf are done in sbcrnf and sbcisf resp. -
NEMO/trunk/src/OCE/SBC/sbcice_cice.F90
r9927 r9935 13 13 USE dom_oce ! ocean space and time domain 14 14 USE domvvl 15 USE phycst, only : rcp, rau0, r1_rau0, rhos n, rhoic15 USE phycst, only : rcp, rau0, r1_rau0, rhos, rhoi 16 16 USE in_out_manager ! I/O manager 17 17 USE iom, ONLY : iom_put,iom_use ! I/O manager library !!Joakim edit … … 222 222 CALL cice2nemo(vsno(:,:,:),ztmp1,'T', 1. ) 223 223 CALL cice2nemo(vice(:,:,:),ztmp2,'T', 1. ) 224 snwice_mass (:,:) = ( rhos n * ztmp1(:,:) + rhoic* ztmp2(:,:) )224 snwice_mass (:,:) = ( rhos * ztmp1(:,:) + rhoi * ztmp2(:,:) ) 225 225 snwice_mass_b(:,:) = snwice_mass(:,:) 226 226 … … 328 328 ELSE 329 329 ! emp_ice is set in sbc_cpl_ice_flx as sublimation-snow 330 qla_ice(:,:,1)= - ( emp_ice(:,:)+sprecip(:,:) ) * Lsub330 qla_ice(:,:,1)= - ( emp_ice(:,:)+sprecip(:,:) ) * rLsub 331 331 ! End of temporary code 332 332 DO jj=1,jpj … … 644 644 CALL cice2nemo(vsno(:,:,:),ztmp1,'T', 1. ) 645 645 CALL cice2nemo(vice(:,:,:),ztmp2,'T', 1. ) 646 snwice_mass (:,:) = ( rhos n * ztmp1(:,:) + rhoic* ztmp2(:,:) )646 snwice_mass (:,:) = ( rhos * ztmp1(:,:) + rhoi * ztmp2(:,:) ) 647 647 snwice_mass_b(:,:) = snwice_mass(:,:) 648 648 snwice_fmass (:,:) = ( snwice_mass(:,:) - snwice_mass_b(:,:) ) / dt … … 801 801 tprecip(:,:) = sf(jp_snow)%fnow(:,:,1)+sf(jp_rain)%fnow(:,:,1) 802 802 ! May be better to do this conversion somewhere else 803 qla_ice(:,:,1) = - Lsub*sf(jp_sblm)%fnow(:,:,1)803 qla_ice(:,:,1) = -rLsub*sf(jp_sblm)%fnow(:,:,1) 804 804 topmelt(:,:,1) = sf(jp_top1)%fnow(:,:,1) 805 805 topmelt(:,:,2) = sf(jp_top2)%fnow(:,:,1) -
NEMO/trunk/src/OCE/SBC/sbcisf.F90
r9865 r9935 52 52 LOGICAL, PUBLIC :: l_isfcpl = .false. !: isf recieved from oasis 53 53 54 REAL(wp), PUBLIC, SAVE :: rcpi 54 REAL(wp), PUBLIC, SAVE :: rcpisf = 2000.0_wp !: specific heat of ice shelf [J/kg/K] 55 55 REAL(wp), PUBLIC, SAVE :: rkappa = 1.54e-6_wp !: heat diffusivity through the ice-shelf [m2/s] 56 56 REAL(wp), PUBLIC, SAVE :: rhoisf = 920.0_wp !: volumic mass of ice shelf [kg/m3] 57 57 REAL(wp), PUBLIC, SAVE :: tsurf = -20.0_wp !: air temperature on top of ice shelf [C] 58 REAL(wp), PUBLIC, SAVE :: r lfusisf = 0.334e6_wp !: latent heat of fusion of ice shelf [J/kg]58 REAL(wp), PUBLIC, SAVE :: rLfusisf = 0.334e6_wp !: latent heat of fusion of ice shelf [J/kg] 59 59 60 60 !: Variable used in fldread to read the forcing file (nn_isf == 4 .OR. nn_isf == 3) … … 114 114 ! compute fwf and heat flux 115 115 IF( .NOT.l_isfcpl ) THEN ; CALL sbc_isf_cav (kt) 116 ELSE ; qisf(:,:) = fwfisf(:,:) * r lfusisf ! heat flux116 ELSE ; qisf(:,:) = fwfisf(:,:) * rLfusisf ! heat flux 117 117 ENDIF 118 118 ! … … 127 127 fwfisf(:,:) = - sf_rnfisf(1)%fnow(:,:,1) ! fresh water flux from the isf (fwfisf <0 mean melting) 128 128 ENDIF 129 qisf(:,:) = fwfisf(:,:) * r lfusisf ! heat flux129 qisf(:,:) = fwfisf(:,:) * rLfusisf ! heat flux 130 130 stbl(:,:) = soce 131 131 ! … … 137 137 fwfisf(:,:) = -sf_fwfisf(1)%fnow(:,:,1) ! fwf 138 138 ENDIF 139 qisf(:,:) = fwfisf(:,:) * r lfusisf ! heat flux139 qisf(:,:) = fwfisf(:,:) * rLfusisf ! heat flux 140 140 stbl(:,:) = soce 141 141 ! … … 454 454 & * r1_e1e2t(ji,jj) * tmask(ji,jj,jk) 455 455 456 fwfisf(ji,jj) = qisf(ji,jj) / r lfusisf !fresh water flux kg/(m2s)456 fwfisf(ji,jj) = qisf(ji,jj) / rLfusisf !fresh water flux kg/(m2s) 457 457 fwfisf(ji,jj) = fwfisf(ji,jj) * ( soce / stbl(ji,jj) ) 458 458 !add to salinity trend … … 526 526 DO ji = 1, jpi 527 527 zhtflx(ji,jj) = zgammat(ji,jj)*rcp*rau0*(ttbl(ji,jj)-zfrz(ji,jj)) 528 zfwflx(ji,jj) = - zhtflx(ji,jj)/r lfusisf528 zfwflx(ji,jj) = - zhtflx(ji,jj)/rLfusisf 529 529 END DO 530 530 END DO … … 544 544 ! compute coeficient to solve the 2nd order equation 545 545 zeps1 = rcp*rau0*zgammat(ji,jj) 546 zeps2 = r lfusisf*rau0*zgammas(ji,jj)547 zeps3 = rhoisf*rcpi *rkappa/MAX(risfdep(ji,jj),zeps)546 zeps2 = rLfusisf*rau0*zgammas(ji,jj) 547 zeps3 = rhoisf*rcpisf*rkappa/MAX(risfdep(ji,jj),zeps) 548 548 zeps4 = zlamb2+zlamb3*risfdep(ji,jj) 549 549 zeps6 = zeps4-ttbl(ji,jj) -
NEMO/trunk/src/OCE/SBC/sbcrnf.F90
r9727 r9935 128 128 END WHERE 129 129 WHERE( sf_t_rnf(1)%fnow(:,:,1) == -222._wp ) ! where fwf comes from melting of ice shelves or iceberg 130 rnf_tsc(:,:,jp_tem) = ztfrz(:,:) * rnf(:,:) * r1_rau0 - rnf(:,:) * r lfusisf * r1_rau0_rcp130 rnf_tsc(:,:,jp_tem) = ztfrz(:,:) * rnf(:,:) * r1_rau0 - rnf(:,:) * rLfusisf * r1_rau0_rcp 131 131 END WHERE 132 132 ELSE ! use SST as runoffs temperature
Note: See TracChangeset
for help on using the changeset viewer.