Ignore:
Timestamp:
Jul 24, 2024, 2:54:37 PM (2 months ago)
Author:
abarral
Message:

rename modules properly lmdz_*
move ismin, ismax, minmax into new lmdz_libmath.f90
(lint) uppercase fortran keywords

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_gsn.f90

    r5105 r5116  
    184184  ! +  ------
    185185
    186   integer :: dt__SV2
     186  INTEGER :: dt__SV2
    187187
    188188
     
    191191
    192192  logical :: vector                        !
    193   integer :: ikl                           !
    194   integer :: isn   ,isnp                   !
    195   integer :: istoOK                        !
    196   real :: G1_bak,G2_bak                 ! Old Values of G1, G2
    197   real :: ro_dry(knonv,      nsno)      ! Dry Density            [g/cm3]
    198   real :: etaSno(knonv,      nsno)      ! Liquid Water Content   [g/cm2]
    199   real :: SnMass(knonv)                 ! Snow   Mass            [kg/m2]
    200   real :: dTsndz                        ! Temperature Gradient
    201   real :: sWater                        !        Water Content       [%]
    202   real :: exp1Wa                        !
    203   real :: dDENDR                        ! Dendricity Increment
    204   real :: DENDRn                        ! Normalized Dendricity
    205   real :: SPHERn                        ! Normalized Sphericity
    206   real :: Wet_OK                        ! Wet Metamorphism Switch
    207   real :: OK__DE                        !
    208   real :: OK__wd                        ! New G*, from wet Dendritic
    209   real :: G1__wd                        ! New G1, from wet Dendritic
    210   real :: G2__wd                        ! New G2, from wet Dendritic
    211   real :: OKlowT                        !
    212   real :: facVap                        !
    213   real :: OK_ldd                        !
    214   real :: G1_ldd                        !
    215   real :: G2_ldd                        !
    216   real :: DiamGx                        !
    217   real :: DiamOK                        !
    218   real :: No_Big                        !
    219   real :: dSPHER                        !
    220   real :: SPHER0                        !
    221   real :: SPHbig                        !
    222   real :: G1_lds                        !
    223   real :: OK_mdT                        !
    224   real :: OKmidT                        !
    225   real :: OKhigT                        !
    226   real :: OK_mdd                        !
    227   real :: G1_mdd                        !
    228   real :: G2_mdd                        !
    229   real :: G1_mds                        !
    230   real :: OK_hdd                        !
    231   real :: G1_hdd                        !
    232   real :: G2_hdd                        !
    233   real :: OK_hds                        !
    234   real :: G1_hds                        !
    235   real :: T1__OK,T2__OK                 !
    236   real :: T3_xOK,T3__OK,T3_nOK          !
    237   real :: ro1_OK,ro2_OK                 !
    238   real :: dT1_OK,dT2_OK,dT3xOK,dT3_OK   !
    239   real :: dT4xOK,dT4_OK,dT4nOK,AngSno   !
    240   real :: G2_hds,SphrOK,HISupd          !
    241   real :: H1a_OK,H1b_OK,H1__OK          !
    242   real :: H23aOK,H23bOK,H23_OK          !
    243   real :: H2__OK,H3__OK                 !
    244   real :: H45_OK,H4__OK,H5__OK          !
    245   real :: ViscSn,OK_Liq,OK_Ang,OKxLiq   !
    246   real :: dSnMas,dzsnew,rosnew,rosmax,smb_old,smb_new
    247   real :: zn_old,zn_new
    248 
    249   real :: epsi5                         ! Alpha ev67 single precision   
    250   real :: vdiam1                        ! Small Grains Min.Diam.[.0001m]
    251   real :: vdiam2                        ! Spher.Variat.Max Diam.    [mm]
    252   real :: vdiam3                        ! Min.Diam.|Limit Spher.    [mm]
    253   real :: vdiam4                        ! Min.Diam.|Viscosity Change
    254   real :: vsphe1                        ! Max Sphericity
    255   real :: vsphe2                        ! Low T Metamorphism  Coeff.
    256   real :: vsphe3                        ! Max.Sphericity (history=1)
    257   real :: vsphe4                        ! Min.Sphericity=>history=1
    258   real :: vtang1,vtang2,vtang3,vtang4   ! Temperature Contribution
    259   real :: vtang5,vtang6,vtang7,vtang8   !
    260   real :: vtang9,vtanga,vtangb,vtangc   !
    261   real :: vrang1,vrang2                 ! Density     Contribution
    262   real :: vgang1,vgang2,vgang3,vgang4   ! Grad(T)     Contribution
    263   real :: vgang5,vgang6,vgang7,vgang8   !
    264   real :: vgang9,vganga,vgangb,vgangc   !
    265   real :: vgran6                        ! Max.Sphericity for Settling
    266   real :: vtelv1                        ! Threshold | history = 2, 3
    267   real :: vvap1                        ! Vapor Pressure Coefficient
    268   real :: vvap2                        ! Vapor Pressure Exponent
    269   real :: vgrat1                        ! Boundary weak/mid   grad(T)
    270   real :: vgrat2                        ! Boundary mid/strong grad(T)
    271   real :: vfi                        ! PHI,         strong grad(T)
    272   real :: vvisc1,vvisc2,vvisc3,vvisc4   ! Viscosity Coefficients
    273   real :: vvisc5,vvisc6,vvisc7          ! id., wet Snow
    274   real :: rovisc                        ! Wet Snow Density  Influence
    275   real :: vdz3                        ! Maximum Layer Densification
    276   real :: OK__ws                        ! New G2
    277   real :: G1__ws                        ! New G1, from wet Spheric
    278   real :: G2__ws                        ! New G2, from wet Spheric
    279   real :: husi_0,husi_1,husi_2,husi_3   ! Constants for New G2
    280   real :: vtail1,vtail2                 ! Constants for New G2
    281   real :: frac_j                        ! Time Step            [Day]
    282 
    283   real :: vdent1                       ! Wet Snow Metamorphism
    284   integer :: nvdent1                       ! (Coefficients for
    285   integer :: nvdent2                       !           Dendricity)
     193  INTEGER :: ikl                           !
     194  INTEGER :: isn   ,isnp                   !
     195  INTEGER :: istoOK                        !
     196  REAL :: G1_bak,G2_bak                 ! Old Values of G1, G2
     197  REAL :: ro_dry(knonv,      nsno)      ! Dry Density            [g/cm3]
     198  REAL :: etaSno(knonv,      nsno)      ! Liquid Water Content   [g/cm2]
     199  REAL :: SnMass(knonv)                 ! Snow   Mass            [kg/m2]
     200  REAL :: dTsndz                        ! Temperature Gradient
     201  REAL :: sWater                        !        Water Content       [%]
     202  REAL :: exp1Wa                        !
     203  REAL :: dDENDR                        ! Dendricity Increment
     204  REAL :: DENDRn                        ! Normalized Dendricity
     205  REAL :: SPHERn                        ! Normalized Sphericity
     206  REAL :: Wet_OK                        ! Wet Metamorphism Switch
     207  REAL :: OK__DE                        !
     208  REAL :: OK__wd                        ! New G*, from wet Dendritic
     209  REAL :: G1__wd                        ! New G1, from wet Dendritic
     210  REAL :: G2__wd                        ! New G2, from wet Dendritic
     211  REAL :: OKlowT                        !
     212  REAL :: facVap                        !
     213  REAL :: OK_ldd                        !
     214  REAL :: G1_ldd                        !
     215  REAL :: G2_ldd                        !
     216  REAL :: DiamGx                        !
     217  REAL :: DiamOK                        !
     218  REAL :: No_Big                        !
     219  REAL :: dSPHER                        !
     220  REAL :: SPHER0                        !
     221  REAL :: SPHbig                        !
     222  REAL :: G1_lds                        !
     223  REAL :: OK_mdT                        !
     224  REAL :: OKmidT                        !
     225  REAL :: OKhigT                        !
     226  REAL :: OK_mdd                        !
     227  REAL :: G1_mdd                        !
     228  REAL :: G2_mdd                        !
     229  REAL :: G1_mds                        !
     230  REAL :: OK_hdd                        !
     231  REAL :: G1_hdd                        !
     232  REAL :: G2_hdd                        !
     233  REAL :: OK_hds                        !
     234  REAL :: G1_hds                        !
     235  REAL :: T1__OK,T2__OK                 !
     236  REAL :: T3_xOK,T3__OK,T3_nOK          !
     237  REAL :: ro1_OK,ro2_OK                 !
     238  REAL :: dT1_OK,dT2_OK,dT3xOK,dT3_OK   !
     239  REAL :: dT4xOK,dT4_OK,dT4nOK,AngSno   !
     240  REAL :: G2_hds,SphrOK,HISupd          !
     241  REAL :: H1a_OK,H1b_OK,H1__OK          !
     242  REAL :: H23aOK,H23bOK,H23_OK          !
     243  REAL :: H2__OK,H3__OK                 !
     244  REAL :: H45_OK,H4__OK,H5__OK          !
     245  REAL :: ViscSn,OK_Liq,OK_Ang,OKxLiq   !
     246  REAL :: dSnMas,dzsnew,rosnew,rosmax,smb_old,smb_new
     247  REAL :: zn_old,zn_new
     248
     249  REAL :: epsi5                         ! Alpha ev67 single precision
     250  REAL :: vdiam1                        ! Small Grains Min.Diam.[.0001m]
     251  REAL :: vdiam2                        ! Spher.Variat.Max Diam.    [mm]
     252  REAL :: vdiam3                        ! Min.Diam.|Limit Spher.    [mm]
     253  REAL :: vdiam4                        ! Min.Diam.|Viscosity Change
     254  REAL :: vsphe1                        ! Max Sphericity
     255  REAL :: vsphe2                        ! Low T Metamorphism  Coeff.
     256  REAL :: vsphe3                        ! Max.Sphericity (history=1)
     257  REAL :: vsphe4                        ! Min.Sphericity=>history=1
     258  REAL :: vtang1,vtang2,vtang3,vtang4   ! Temperature Contribution
     259  REAL :: vtang5,vtang6,vtang7,vtang8   !
     260  REAL :: vtang9,vtanga,vtangb,vtangc   !
     261  REAL :: vrang1,vrang2                 ! Density     Contribution
     262  REAL :: vgang1,vgang2,vgang3,vgang4   ! Grad(T)     Contribution
     263  REAL :: vgang5,vgang6,vgang7,vgang8   !
     264  REAL :: vgang9,vganga,vgangb,vgangc   !
     265  REAL :: vgran6                        ! Max.Sphericity for Settling
     266  REAL :: vtelv1                        ! Threshold | history = 2, 3
     267  REAL :: vvap1                        ! Vapor Pressure Coefficient
     268  REAL :: vvap2                        ! Vapor Pressure Exponent
     269  REAL :: vgrat1                        ! Boundary weak/mid   grad(T)
     270  REAL :: vgrat2                        ! Boundary mid/strong grad(T)
     271  REAL :: vfi                        ! PHI,         strong grad(T)
     272  REAL :: vvisc1,vvisc2,vvisc3,vvisc4   ! Viscosity Coefficients
     273  REAL :: vvisc5,vvisc6,vvisc7          ! id., wet Snow
     274  REAL :: rovisc                        ! Wet Snow Density  Influence
     275  REAL :: vdz3                        ! Maximum Layer Densification
     276  REAL :: OK__ws                        ! New G2
     277  REAL :: G1__ws                        ! New G1, from wet Spheric
     278  REAL :: G2__ws                        ! New G2, from wet Spheric
     279  REAL :: husi_0,husi_1,husi_2,husi_3   ! Constants for New G2
     280  REAL :: vtail1,vtail2                 ! Constants for New G2
     281  REAL :: frac_j                        ! Time Step            [Day]
     282
     283  REAL :: vdent1                       ! Wet Snow Metamorphism
     284  INTEGER :: nvdent1                       ! (Coefficients for
     285  INTEGER :: nvdent2                       !           Dendricity)
    286286
    287287  ! +--Snow Properties: IO
     
    679679
    680680  !XF
    681   if(G1snSV(ikl,isn)<0.1) &
     681  IF(G1snSV(ikl,isn)<0.1) &
    682682        G2_hds = G2snSV(ikl,isn) + 1.d1 *AngSno*vfi     *frac_j
    683683  !XF
     
    739739  ! +  ~~~~~~~~~~~~~~~~~~~
    740740  ! #vp     IF          (isn    .le.     isnoSV(ikl))
    741   ! #vp.    write(47,471)isn            ,isnoSV(ikl)                    ,
     741  ! #vp.    WRITE(47,471)isn            ,isnoSV(ikl)                    ,
    742742  ! #vp.                 TsisSV(ikl,isn),ro__SV(ikl,isn),eta_SV(ikl,isn),
    743743  ! #vp.                 G1_bak         ,G2_bak         ,istoSV(ikl,isn),
     
    860860  ! #wp.                             .AND.istoSV(ikl,isn).eq.     0)
    861861  ! #wp.    THEN
    862   ! #wp       write(6,*) ikl,isn,' G1,G2,hist,OK_Ang  ',
     862  ! #wp       WRITE(6,*) ikl,isn,' G1,G2,hist,OK_Ang  ',
    863863  ! #wp.          G1snSV(ikl,isn), G2snSV(ikl,isn),istoSV(ikl,isn),OK_Ang
    864864  ! #wp       stop "Grains anguleux mal d?finis"
     
    907907
    908908    isn=1
    909     if (dzsnSV(ikl,isn)>0.and.ro__SV(ikl,isn)>0) then
     909    if (dzsnSV(ikl,isn)>0.and.ro__SV(ikl,isn)>0) THEN
    910910    dzsnSV(ikl,isn) = dzsnSV(ikl,isn) +0.9999*(smb_old-smb_new) &
    911911          / ro__SV(ikl,isn)
     
    923923
    924924
    925 end subroutine sisvat_gsn
     925END SUBROUTINE sisvat_gsn
Note: See TracChangeset for help on using the changeset viewer.