icefrac_lsc_mod.f90 Source File


This file depends on

sourcefile~~icefrac_lsc_mod.f90~~EfferentGraph sourcefile~icefrac_lsc_mod.f90 icefrac_lsc_mod.f90 sourcefile~print_control_mod.f90 print_control_mod.f90 sourcefile~icefrac_lsc_mod.f90->sourcefile~print_control_mod.f90 sourcefile~lmdz_lscp_ini.f90 lmdz_lscp_ini.f90 sourcefile~icefrac_lsc_mod.f90->sourcefile~lmdz_lscp_ini.f90 sourcefile~ioipsl_getin_p_mod.f90 ioipsl_getin_p_mod.f90 sourcefile~lmdz_lscp_ini.f90->sourcefile~ioipsl_getin_p_mod.f90 sourcefile~strings_mod.f90 strings_mod.f90 sourcefile~ioipsl_getin_p_mod.f90->sourcefile~strings_mod.f90 sourcefile~mod_phys_lmdz_para.f90 mod_phys_lmdz_para.f90 sourcefile~ioipsl_getin_p_mod.f90->sourcefile~mod_phys_lmdz_para.f90 sourcefile~mod_phys_lmdz_transfert_para.f90 mod_phys_lmdz_transfert_para.f90 sourcefile~ioipsl_getin_p_mod.f90->sourcefile~mod_phys_lmdz_transfert_para.f90 sourcefile~mod_phys_lmdz_para.f90->sourcefile~print_control_mod.f90 sourcefile~mod_phys_lmdz_para.f90->sourcefile~mod_phys_lmdz_transfert_para.f90 sourcefile~mod_phys_lmdz_mpi_data.f90 mod_phys_lmdz_mpi_data.f90 sourcefile~mod_phys_lmdz_para.f90->sourcefile~mod_phys_lmdz_mpi_data.f90 sourcefile~mod_grid_phy_lmdz.f90 mod_grid_phy_lmdz.f90 sourcefile~mod_phys_lmdz_para.f90->sourcefile~mod_grid_phy_lmdz.f90 sourcefile~mod_phys_lmdz_omp_data.f90 mod_phys_lmdz_omp_data.F90 sourcefile~mod_phys_lmdz_para.f90->sourcefile~mod_phys_lmdz_omp_data.f90 sourcefile~mod_phys_lmdz_omp_transfert.f90 mod_phys_lmdz_omp_transfert.f90 sourcefile~mod_phys_lmdz_transfert_para.f90->sourcefile~mod_phys_lmdz_omp_transfert.f90 sourcefile~mod_phys_lmdz_transfert_para.f90->sourcefile~mod_phys_lmdz_mpi_data.f90 sourcefile~mod_phys_lmdz_mpi_transfert.f90 mod_phys_lmdz_mpi_transfert.f90 sourcefile~mod_phys_lmdz_transfert_para.f90->sourcefile~mod_phys_lmdz_mpi_transfert.f90 sourcefile~mod_phys_lmdz_omp_transfert.f90->sourcefile~mod_phys_lmdz_mpi_data.f90 sourcefile~mod_phys_lmdz_omp_transfert.f90->sourcefile~mod_phys_lmdz_omp_data.f90 sourcefile~mod_phys_lmdz_mpi_data.f90->sourcefile~print_control_mod.f90 sourcefile~lmdz_mpi.f90 lmdz_mpi.F90 sourcefile~mod_phys_lmdz_mpi_data.f90->sourcefile~lmdz_mpi.f90 sourcefile~lmdz_cppkeys_wrapper.f90 lmdz_cppkeys_wrapper.F90 sourcefile~mod_phys_lmdz_mpi_data.f90->sourcefile~lmdz_cppkeys_wrapper.f90 sourcefile~mod_phys_lmdz_mpi_transfert.f90->sourcefile~mod_phys_lmdz_mpi_data.f90 sourcefile~mod_phys_lmdz_mpi_transfert.f90->sourcefile~mod_grid_phy_lmdz.f90 sourcefile~mod_phys_lmdz_mpi_transfert.f90->sourcefile~lmdz_mpi.f90 sourcefile~mod_phys_lmdz_omp_data.f90->sourcefile~print_control_mod.f90 sourcefile~mod_phys_lmdz_omp_data.f90->sourcefile~mod_phys_lmdz_mpi_data.f90 sourcefile~dimphy.f90 dimphy.f90 sourcefile~mod_phys_lmdz_omp_data.f90->sourcefile~dimphy.f90

Files dependent on this one

sourcefile~~icefrac_lsc_mod.f90~~AfferentGraph sourcefile~icefrac_lsc_mod.f90 icefrac_lsc_mod.f90 sourcefile~lmdz_call_cloud_optics_prop.f90 lmdz_call_cloud_optics_prop.f90 sourcefile~lmdz_call_cloud_optics_prop.f90->sourcefile~icefrac_lsc_mod.f90 sourcefile~nuage.f90 nuage.f90 sourcefile~lmdz_call_cloud_optics_prop.f90->sourcefile~nuage.f90 sourcefile~lmdz_lscp_old.f90 lmdz_lscp_old.F90 sourcefile~lmdz_lscp_old.f90->sourcefile~icefrac_lsc_mod.f90 sourcefile~nuage.f90->sourcefile~icefrac_lsc_mod.f90 sourcefile~nuage.f90~2 nuage.f90 sourcefile~nuage.f90~2->sourcefile~icefrac_lsc_mod.f90 sourcefile~lmdz_call_cloud_optics_prop.f90~2 lmdz_call_cloud_optics_prop.f90 sourcefile~lmdz_call_cloud_optics_prop.f90~2->sourcefile~icefrac_lsc_mod.f90 sourcefile~lmdz_call_cloud_optics_prop.f90~2->sourcefile~nuage.f90 sourcefile~physiq_mod.f90 physiq_mod.F90 sourcefile~physiq_mod.f90->sourcefile~lmdz_call_cloud_optics_prop.f90 sourcefile~physiq_mod.f90->sourcefile~lmdz_lscp_old.f90 sourcefile~physiq_mod.f90->sourcefile~nuage.f90 sourcefile~physiq_mod.f90~2 physiq_mod.F90 sourcefile~physiq_mod.f90~2->sourcefile~lmdz_call_cloud_optics_prop.f90 sourcefile~physiq_mod.f90~2->sourcefile~lmdz_lscp_old.f90 sourcefile~physiq_mod.f90~2->sourcefile~nuage.f90 sourcefile~old_lmdz1d.f90 old_lmdz1d.f90 sourcefile~old_lmdz1d.f90->sourcefile~physiq_mod.f90 sourcefile~scm.f90 scm.f90 sourcefile~scm.f90->sourcefile~physiq_mod.f90 sourcefile~callphysiq_mod.f90 callphysiq_mod.f90 sourcefile~callphysiq_mod.f90->sourcefile~physiq_mod.f90 sourcefile~callphysiq_mod.f90~2 callphysiq_mod.f90 sourcefile~callphysiq_mod.f90~2->sourcefile~physiq_mod.f90 sourcefile~calfis.f90 calfis.f90 sourcefile~calfis.f90->sourcefile~callphysiq_mod.f90

Contents

Source Code


Source Code

!
! $Header$
!
MODULE icefrac_lsc_mod

IMPLICIT NONE

CONTAINS
!*******************************************************************

SUBROUTINE icefrac_lsc(np,temp, sig, icefrac)
  !
  ! Compute the ice fraction 1-xliq (see e.g.
  ! Doutriaux-Boucher & Quaas 2004, section 2.2.)
  !
  ! (JBM 3/14 8/14 5/16)
  
  USE print_control_mod, ONLY: lunout, prt_level
  USE lmdz_lscp_ini, ONLY: t_glace_min, t_glace_max, exposant_glace, iflag_t_glace
  ! lscp_ini contains:
  ! t_glace_min: if T < Tmin, the cloud is only made of water ice
  ! t_glace_max: if T > Tmax, the cloud is only made of liquid water
  ! exposant_glace: controls the sharpness of the transition
  INTEGER, INTENT(IN) :: np
  REAL, DIMENSION(np), INTENT(IN) :: temp ! temperature
  REAL, DIMENSION(np), INTENT(IN) :: sig
  REAL, DIMENSION(np), INTENT(OUT) :: icefrac

  REAL :: sig0,www,tmin_tmp,liqfrac_tmp
  INTEGER :: ip

  sig0=0.8

  DO ip=1,np
     IF (iflag_t_glace.EQ.1) THEN
       ! Transition to ice close to surface for T<Tmax
       ! w=1 at the surface and 0 for sig < sig0
       www=(max(sig(ip)-sig0,0.))/(1.-sig0) 
     ELSEIF (iflag_t_glace.GE.2) THEN
       ! No convertion to ice close to surface
       www = 0.
     ENDIF
     tmin_tmp=www*t_glace_max+(1.-www)*t_glace_min
     liqfrac_tmp=  (temp(ip)-tmin_tmp) / (t_glace_max-tmin_tmp)
     liqfrac_tmp = MIN(MAX(liqfrac_tmp,0.0),1.0)
     IF (iflag_t_glace.GE.3) THEN
       icefrac(ip) = 1.0-liqfrac_tmp**exposant_glace
     ELSE
       icefrac(ip) = (1.0-liqfrac_tmp)**exposant_glace
     ENDIF
  ENDDO

  RETURN
END SUBROUTINE icefrac_lsc

!*******************************************************************
!
END MODULE icefrac_lsc_mod