Changeset 25 for codes/icosagcm/trunk/src/etat0_ncar.f90
- Timestamp:
- 07/26/12 04:05:44 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/trunk/src/etat0_ncar.f90
r19 r25 19 19 REAL(rstd), PARAMETER :: rt=radius*0.5 20 20 REAL(rstd), PARAMETER :: zc=5000.0 21 REAL(rstd), PARAMETER :: ps0=100000.022 REAL(rstd), PARAMETER :: T0=30023 REAL(rstd), PARAMETER :: R_d=287.024 21 25 22 PUBLIC etat0 … … 78 75 REAL(rstd) :: X2(3),X1(3) 79 76 INTEGER :: i,j,n,l 80 INTEGER :: testcase 81 82 u = 0.0 ; phis = 0 ; theta_rhodz = 0 ; ps = ps0 83 84 DO l=1, llm+1 85 pr = ap(l) + bp(l)*ps0 86 zr(l) = -R_d*T0/g*log(pr/ps0) 87 ENDDO 88 89 DO l=1, llm 90 zrl(l) = 0.5*(zr(l) + zr(l+1)) 91 END DO 92 93 testcase=5 94 CALL getin('ncar_test_case',testcase) 95 96 SELECT CASE(testcase) 97 !--------------------------------------------- SINGLE COSINE BELL 98 CASE(0) 99 CALL cosine_bell_1(q) 100 101 CASE(1) 102 CALL cosine_bell_2(q) 103 104 CASE(2) 105 CALL cosine_bell_2(q) 106 DO l=1,llm 107 q(:,l)= 0.9 - 0.8*q(:,l)*q(:,l) 108 END DO 109 110 CASE(3) 111 CALL slotted_cylinders(q) 112 113 CASE(4) 114 CALL cosine_bell_2(qxt1) 115 DO l = 1,llm 116 q(:,l) = 0.9 - 0.8*qxt1(:,l)*qxt1(:,l) 117 END DO 118 q = q + qxt1 119 CALL slotted_cylinders(qxt1) 120 q = q + qxt1 121 q = 1. - q*0.3 122 123 CASE(5) ! hadley like meridional circulation 124 CALL hadleyq(q) 125 126 CASE DEFAULT 127 PRINT*,"no such initial profile" 128 STOP 129 130 END SELECT 131 132 CONTAINS 77 CHARACTER(len=255) :: ncar_adv_shape 78 79 u = 0.0 ; phis = 0 ; theta_rhodz = 0 ; ps = ncar_p0 80 81 DO l=1, llm+1 82 pr = ap(l) + bp(l)*ncar_p0 83 zr(l) = -kappa*cpp*ncar_T0/g*log(pr/ncar_p0) 84 ENDDO 85 86 DO l=1, llm 87 zrl(l) = 0.5*(zr(l) + zr(l+1)) 88 END DO 89 90 ncar_adv_shape='cos_bell' 91 CALL getin('ncar_adv_shape',ncar_adv_shape) 92 93 SELECT CASE(TRIM(ncar_adv_shape)) 94 !--------------------------------------------- SINGLE COSINE BELL 95 CASE('const') 96 q=1 97 CASE('cos_bell') 98 CALL cosine_bell_1(q) 99 100 CASE('slotted_cyl') 101 CALL slotted_cylinders(q) 102 103 CASE('dbl_cos_bell_q1') 104 CALL cosine_bell_2(q) 105 106 CASE('dbl_cos_bell_q2') 107 CALL cosine_bell_2(q) 108 DO l=1,llm 109 q(:,l)= 0.9 - 0.8*q(:,l)*q(:,l) 110 END DO 111 112 CASE('complement') 113 ! tracer such that, in combination with the other tracer fields 114 ! with weight (3/10), the sum is equal to one 115 CALL cosine_bell_2(qxt1) 116 DO l = 1,llm 117 q(:,l) = 0.9 - 0.8*qxt1(:,l)*qxt1(:,l) 118 END DO 119 q = q + qxt1 120 CALL slotted_cylinders(qxt1) 121 q = q + qxt1 122 q = 1. - q*0.3 123 124 CASE('hadley') ! hadley like meridional circulation 125 CALL hadleyq(q) 126 127 CASE DEFAULT 128 PRINT *, 'Bad selector for variable ncar_adv_shape : <', TRIM(ncar_adv_shape), & 129 '> options are <const>, <slotted_cyl>, <cos_bell>, <dbl_cos_bell_q1>', & 130 '<dbl_cos_bell_q2>, <complement>, <hadley>' 131 STOP 132 133 END SELECT 134 135 CONTAINS 133 136 134 137 !======================================================================
Note: See TracChangeset
for help on using the changeset viewer.