[4911] | 1 | SUBROUTINE CALCUL_CLOUD_OVERLAP_DECORR_LEN & |
---|
| 2 | & (KIDIA, KFDIA, KLON, KLEV, & |
---|
| 3 | & driver_config, & |
---|
| 4 | & pressure_hl, & |
---|
| 5 | & PDECORR_LEN_EDGES_M, PDECORR_LEN_WATER_M, PDECORR_LEN_RATIO) |
---|
| 6 | |
---|
| 7 | ! A Idelkadi ! ------------- |
---|
| 8 | ! 04 2024 |
---|
| 9 | ! Depart de la routine de l' IFS |
---|
| 10 | ! But : calcul de la Ld (longueur de decorrelation) |
---|
| 11 | ! Dans le cas overlap_scheme_name=="Exp-Ran" |
---|
| 12 | ! 3 cas en fonction de kdecolat (namelist_ecrad) : |
---|
| 13 | ! 0 => Ld=overlap_decorr_length (namelist_ecrad) |
---|
| 14 | ! 1 => Ld=f(latitude) Shonk et al. (2010) Eq. 13 formula |
---|
| 15 | ! 2 => Ld=f(latitude) Shonk et al. (2010) lissee a l equateur |
---|
| 16 | ! 3 => Ld=f(pres) : |
---|
| 17 | ! Ld=low_decorrelation_length si pres >= 680hPa |
---|
| 18 | ! Ld=mid_decorrelation_length si pres entre [440,680] |
---|
| 19 | ! Ld=high_decorrelation_length si pres < 440hPa |
---|
| 20 | ! |
---|
| 21 | ! TO DO |
---|
| 22 | ! Que faire de PDECORR_LEN_WATER_M ? |
---|
| 23 | ! ------------------------------------------------------------------- |
---|
| 24 | |
---|
| 25 | USE PARKIND1 , ONLY : JPIM, JPRB |
---|
| 26 | USE YOMHOOK , ONLY : LHOOK, DR_HOOK, JPHOOK |
---|
| 27 | USE YOMCST , ONLY : RPI |
---|
| 28 | USE geometry_mod, ONLY: latitude_deg |
---|
| 29 | USE lmdz_cloud_optics_prop_ini , ONLY : prmhc, prlmc |
---|
| 30 | USE setup_config_from_lmdz, ONLY : driver_config_type |
---|
| 31 | USE write_field_phy |
---|
| 32 | ! ------------------------------------------------------------------- |
---|
| 33 | |
---|
| 34 | IMPLICIT NONE |
---|
| 35 | |
---|
| 36 | ! INPUT ARGUMENTS |
---|
| 37 | |
---|
| 38 | ! *** Array dimensions and ranges |
---|
| 39 | INTEGER(KIND=JPIM),INTENT(IN) :: KIDIA ! Start column to process |
---|
| 40 | INTEGER(KIND=JPIM),INTENT(IN) :: KFDIA ! End column to process |
---|
| 41 | INTEGER(KIND=JPIM),INTENT(IN) :: KLON ! Number of columns |
---|
| 42 | ! AI 04 2024 |
---|
| 43 | INTEGER(KIND=JPIM),INTENT(IN) :: KLEV |
---|
| 44 | |
---|
| 45 | ! *** Single-level variables |
---|
| 46 | !AI 04 2024 |
---|
| 47 | REAL(KIND=JPRB), intent(in) :: pressure_hl(KLON,KLEV+1) |
---|
| 48 | type(driver_config_type),intent(in) :: driver_config |
---|
| 49 | |
---|
| 50 | ! OUTPUT ARGUMENTS |
---|
| 51 | |
---|
| 52 | ! *** Decorrelation lengths for cloud edges and cloud water content, in m |
---|
| 53 | ! A.I 04 2024 |
---|
| 54 | REAL(KIND=JPRB), INTENT(OUT) :: PDECORR_LEN_EDGES_M(KLON,KLEV) |
---|
| 55 | REAL(KIND=JPRB), INTENT(OUT), OPTIONAL :: PDECORR_LEN_WATER_M(KLON,KLEV) |
---|
| 56 | |
---|
| 57 | ! Ratio of water-content to cloud-edge decorrelation lengths |
---|
| 58 | REAL(KIND=JPRB), INTENT(OUT), OPTIONAL :: PDECORR_LEN_RATIO |
---|
| 59 | |
---|
| 60 | ! LOCAL VARIABLES |
---|
| 61 | |
---|
| 62 | REAL(KIND=JPRB) :: ZRADIANS_TO_DEGREES, ZABS_LAT_DEG, ZCOS_LAT |
---|
| 63 | |
---|
| 64 | ! AI 04 2024 |
---|
| 65 | REAL(KIND=JPRB) :: PGEMU(KLON) ! Sine of latitude |
---|
| 66 | REAL(KIND=JPRB) :: RDECORR_CF |
---|
| 67 | REAL(KIND=JPRB) :: RDECORR_CW = 1.0_JPRB |
---|
| 68 | |
---|
| 69 | INTEGER(KIND=JPIM) :: JL, JK |
---|
| 70 | |
---|
| 71 | REAL(KIND=JPHOOK) :: ZHOOK_HANDLE |
---|
| 72 | |
---|
| 73 | ! ------------------------------------------------------------------- |
---|
| 74 | |
---|
| 75 | IF (LHOOK) CALL DR_HOOK('CLOUD_OVERLAP_DECORR_LEN',0,ZHOOK_HANDLE) |
---|
| 76 | |
---|
| 77 | ! ------------------------------------------------------------------- |
---|
| 78 | print*,'driver_config%kdecolat = ', driver_config%kdecolat |
---|
| 79 | |
---|
| 80 | IF (driver_config%kdecolat == 0) THEN |
---|
| 81 | |
---|
| 82 | ! Decorrelation lengths are constant values |
---|
| 83 | ! overlap_decorr_length lu dans namelist en m |
---|
| 84 | RDECORR_CF = driver_config%overlap_decorr_length / 1000.0_JPRB |
---|
| 85 | PDECORR_LEN_EDGES_M(KIDIA:KFDIA,:) = driver_config%overlap_decorr_length |
---|
| 86 | ! IF (PRESENT(PDECORR_LEN_WATER_M)) THEN |
---|
| 87 | ! PDECORR_LEN_WATER_M = RDECORR_CW * 1000.0_JPRB |
---|
| 88 | ! ENDIF |
---|
| 89 | ! IF (PRESENT(PDECORR_LEN_RATIO)) THEN |
---|
| 90 | ! PDECORR_LEN_RATIO = RDECORR_CW / RDECORR_CF |
---|
| 91 | ! ENDIF |
---|
| 92 | |
---|
| 93 | ELSE |
---|
| 94 | |
---|
| 95 | ZRADIANS_TO_DEGREES = 180.0_JPRB / RPI |
---|
| 96 | PGEMU = SIN(latitude_deg) |
---|
| 97 | |
---|
| 98 | IF (driver_config%kdecolat == 1) THEN |
---|
| 99 | ! Shonk et al. (2010) Eq. 13 formula |
---|
| 100 | DO JL = KIDIA,KFDIA |
---|
| 101 | ZABS_LAT_DEG = ABS(ASIN(PGEMU(JL)) * ZRADIANS_TO_DEGREES) |
---|
| 102 | PDECORR_LEN_EDGES_M(JL,:) = (2.899_JPRB - 0.02759_JPRB * ZABS_LAT_DEG) * 1000.0_JPRB |
---|
| 103 | ENDDO |
---|
| 104 | ELSE ! KDECOLAT == 2 |
---|
| 105 | DO JL = KIDIA,KFDIA |
---|
| 106 | ! Shonk et al. (2010) but smoothed over the equator |
---|
| 107 | ZCOS_LAT = COS(ASIN(PGEMU(JL))) |
---|
| 108 | PDECORR_LEN_EDGES_M(JL,:) = (0.75_JPRB + 2.149_JPRB * ZCOS_LAT*ZCOS_LAT) * 1000.0_JPRB |
---|
| 109 | ENDDO |
---|
| 110 | ENDIF |
---|
| 111 | |
---|
| 112 | |
---|
| 113 | ! Both KDECOLAT = 1 and 2 assume that the decorrelation length for |
---|
| 114 | ! cloud water content is half that for cloud edges |
---|
| 115 | ! IF (PRESENT(PDECORR_LEN_WATER_M)) THEN |
---|
| 116 | ! PDECORR_LEN_WATER_M(KIDIA:KFDIA,:) = PDECORR_LEN_EDGES_M(KIDIA:KFDIA,:) * 0.5_JPRB |
---|
| 117 | ! ENDIF |
---|
| 118 | |
---|
| 119 | ! IF (PRESENT(PDECORR_LEN_RATIO)) THEN |
---|
| 120 | ! PDECORR_LEN_RATIO = 0.5_JPRB |
---|
| 121 | ! ENDIF |
---|
| 122 | |
---|
| 123 | ENDIF |
---|
| 124 | |
---|
| 125 | !AI 04 2024 |
---|
| 126 | IF (driver_config%kdecolat == 3) THEN |
---|
| 127 | DO jk = 1, klev |
---|
| 128 | DO JL = 1, klon |
---|
| 129 | IF (pressure_hl(JL,jk)<prmhc) THEN |
---|
| 130 | PDECORR_LEN_EDGES_M(JL,jk) = driver_config%high_decorrelation_length |
---|
| 131 | ELSE IF (pressure_hl(JL,jk)>=prmhc .AND. pressure_hl(JL,jk)<prlmc) THEN |
---|
| 132 | PDECORR_LEN_EDGES_M(JL,jk) = driver_config%mid_decorrelation_length |
---|
| 133 | ELSE IF (pressure_hl(JL,jk)>=prlmc) THEN |
---|
| 134 | PDECORR_LEN_EDGES_M(JL,jk) = driver_config%low_decorrelation_length |
---|
| 135 | ENDIF |
---|
| 136 | ENDDO |
---|
| 137 | ENDDO |
---|
| 138 | |
---|
| 139 | ! Both KDECOLAT = 1 and 2 assume that the decorrelation length for |
---|
| 140 | ! cloud water content is half that for cloud edges |
---|
| 141 | ! IF (PRESENT(PDECORR_LEN_WATER_M)) THEN |
---|
| 142 | ! PDECORR_LEN_WATER_M(KIDIA:KFDIA,:) = PDECORR_LEN_EDGES_M(KIDIA:KFDIA,:) * 0.5_JPRB |
---|
| 143 | ! ENDIF |
---|
| 144 | ! IF (PRESENT(PDECORR_LEN_RATIO)) THEN |
---|
| 145 | ! PDECORR_LEN_RATIO = 0.5_JPRB |
---|
| 146 | ! ENDIF |
---|
| 147 | ENDIF |
---|
| 148 | CALL writefield_phy('latitude',latitude_deg,1) |
---|
| 149 | CALL writefield_phy('pressure_hl',pressure_hl,klev+1) |
---|
| 150 | CALL writefield_phy('Ldecorel',PDECORR_LEN_EDGES_M,klev) |
---|
| 151 | ! ------------------------------------------------------------------- |
---|
| 152 | |
---|
| 153 | IF (LHOOK) CALL DR_HOOK('CLOUD_OVERLAP_DECORR_LEN',1,ZHOOK_HANDLE) |
---|
| 154 | |
---|
| 155 | END SUBROUTINE CALCUL_CLOUD_OVERLAP_DECORR_LEN |
---|