Changeset 995


Ignore:
Timestamp:
12/30/19 12:37:59 (4 years ago)
Author:
jisesh
Message:

devel: Added Teq and h0 as arguments

Location:
codes/icosagcm/devel/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/devel/src/dcmip/dcmip_initial_conditions_test_1_2_3_v5.f90

    r976 r995  
    874874! Test 2-0:  Steady-State Atmosphere at Rest in the Presence of Orography 
    875875!========================================================================= 
    876 SUBROUTINE test2_steady_state_mountain (lon,lat,p,z,zcoords,hybrid_eta,hyam,hybm,u,v,w,t,phis,ps,rho,q) 
     876SUBROUTINE test2_steady_state_mountain (lon,lat,p,z,zcoords,hybrid_eta,hyam,hybm,u,v,w,t,phis,ps,rho,q,h0_test2) 
    877877 
    878878IMPLICIT NONE 
     
    922922                                lambdam = 3.d0*pi/2.d0,         &       ! mountain longitude center point (radians)    
    923923                                phim    = 0.d0,                 &       ! mountain latitude center point (radians)     
    924                                 h0      = 2000.d0,              &       ! peak height of the mountain range (m) 
    925924                                Rm      = 3.d0*pi/4.d0,         &       ! mountain radius (radians) 
    926925                                zetam   = pi/16.d0,             &       ! mountain oscillation half-width (radians)  
     
    930929      real(rstd) :: r                                                   ! Great circle distance (radians) 
    931930      real(rstd) :: zs                                                  ! Surface elevation (m) 
    932       real(rstd) :: exponent                                               ! exponent: g/(Rd * gamma) 
    933       real(rstd) :: exponent_rev                                           ! reversed exponent 
    934  
     931      real(rstd) :: exponent                                            ! exponent: g/(Rd * gamma) 
     932      real(rstd) :: exponent_rev                                        ! reversed exponent 
     933      real(rstd) :: h0                                                  ! peak height of the mountain range (m) 
     934      real(rstd), optional :: h0_test2 
     935 
     936      if (present(h0_test2)) then  
     937         h0 = h0_test2       ! peak height of the mountain range (m), can be modified in run.def  
     938      else 
     939         h0 = 250.d0         ! Default value for call without optional variable h0_test2 
     940      endif 
    935941 
    936942!----------------------------------------------------------------------- 
     
    10251031!===================================================================================== 
    10261032 
    1027 SUBROUTINE test2_schaer_mountain (lon,lat,p,z,zcoords,hybrid_eta,hyam,hybm,shear,u,v,w,t,phis,ps,rho,q) 
    1028 USE getin_mod, ONLY : getin 
     1033SUBROUTINE test2_schaer_mountain (lon,lat,p,z,zcoords,hybrid_eta,hyam,hybm,shear,u,v,w,t,phis,ps,rho,q,h0_test2,Teq_test2) 
     1034 
    10291035IMPLICIT NONE 
    10301036!----------------------------------------------------------------------- 
     
    10781084                                lambdac = pi/4.d0,              &       ! Lon of Schar Mountain Center 
    10791085                                phic    = 0.d0,                 &       ! Lat of Schar Mountain Center 
    1080                                 h0      = 250.d0,               &       ! Height of Mountain 
    10811086                                d       = 5000.d0,              &       ! Mountain Half-Width 
    10821087                                xi      = 4000.d0,              &       ! Mountain Wavelength 
     
    10881093      real(rstd) :: zs                                                  ! Surface height 
    10891094      real(rstd) :: c                                                   ! Shear 
    1090  
    1091       REAL(rstd) :: Teq                 = 300.d0   ! default Temperature at Equator, can be modified in run.def 
    1092  
    1093       CALL getin("dcmip2_Teq",Teq) 
     1095      real(rstd) :: h0                                                  ! peak height of the mountain range (m) 
     1096      real(rstd) :: Teq                                                 ! Temperature at Equator     
     1097      real(rstd), optional :: h0_test2,Teq_test2 ! FIX default value in MODULE etat0_dcmip2_mod 
     1098 
     1099      if (present(h0_test2)) then 
     1100         h0 = h0_test2           ! peak height of the mountain range (m), can be modified in run.def 
     1101      else 
     1102         h0 = 250.d0             ! Default value for call without optional variable h0_test2 
     1103      endif 
     1104      if (present(Teq_test2)) then 
     1105         Teq = Teq_test2         ! Temperature at Equator, can be modified in run.def 
     1106      else 
     1107         Teq = 300.d0            ! Default value for call without optional variable Teq_test2 
     1108      endif 
    10941109!----------------------------------------------------------------------- 
    10951110!    PHIS (surface geopotential) 
     
    11991214!========== 
    12001215SUBROUTINE test3_gravity_wave (X,lon,lat,p,z,zcoords,u,v,w,t,phis,ps,rho,q) 
    1201 USE getin_mod, ONLY : getin 
     1216 
    12021217IMPLICIT NONE 
    12031218!----------------------------------------------------------------------- 
     
    12341249                                u0      = 20.d0,                &       ! Reference Velocity  
    12351250!                               u0      = 0.d0,                 &       ! FIXME : no zonal wind for NH tests 
     1251                                Teq     = 300.d0,               &       ! Temperature at Equator     
    12361252                                Peq     = 100000.d0,            &       ! Reference PS at Equator 
    12371253                                ztop    = 10000.d0,             &       ! Model Top        
     
    12541270      real(rstd) :: theta_pert                                          ! Pot-temp perturbation 
    12551271 
    1256       REAL(rstd) :: Teq                 = 300.d0   ! default Temperature at Equator, can be modified in run.def 
    1257  
    1258       CALL getin("dcmip2_Teq",Teq) 
    1259  
    12601272      as = a/X 
    12611273 
  • codes/icosagcm/devel/src/initial/etat0_dcmip2.f90

    r531 r995  
    77  INTEGER, SAVE :: testcase 
    88  INTEGER, PARAMETER :: mountain=0, schaer_noshear=1, schaer_shear=2 
     9  REAL(rstd):: Teq_test2= 300.d0,h0_test2 = 250.d0 
    910 
    10   PUBLIC getin_etat0, compute_etat0 
     11  PUBLIC getin_etat0, compute_etat0,Teq_test2,h0_test2 
    1112 
    1213CONTAINS 
     
    1617    etat0_type='jablonowsky06' 
    1718    CALL getin("etat0",etat0_type) 
     19    CALL getin("dcmip2_Teq",Teq_test2) 
     20    CALL getin("dcmip2_h0",h0_test2) 
    1821    SELECT CASE (TRIM(etat0_type)) 
    1922    CASE('dcmip2_mountain') 
     
    6568    CASE(mountain) 
    6669       CALL test2_steady_state_mountain(lon,lat,dummy,dummy,0,.TRUE.,hyam,hybm, & 
    67             ulonj,ulatj,dummy,tempj,phisj,psj,dummy,dummy) 
     70            ulonj,ulatj,dummy,tempj,phisj,psj,dummy,dummy,h0_test2) 
    6871    CASE(schaer_noshear) 
    6972       CALL test2_schaer_mountain(lon,lat,dummy,dummy,0,.TRUE.,hyam,hybm,0,& 
    70             ulonj,ulatj,dummy,tempj,phisj,psj,dummy,dummy) 
     73            ulonj,ulatj,dummy,tempj,phisj,psj,dummy,dummy,h0_test2,Teq_test2) 
    7174    CASE(schaer_shear) 
    7275       CALL test2_schaer_mountain(lon,lat,dummy,dummy,0,.TRUE.,hyam,hybm,1, & 
    73             ulonj,ulatj,dummy,tempj,phisj,psj,dummy,dummy) 
     76            ulonj,ulatj,dummy,tempj,phisj,psj,dummy,dummy,h0_test2,Teq_test2) 
    7477    END SELECT 
    7578  END SUBROUTINE comp_all 
Note: See TracChangeset for help on using the changeset viewer.