Changeset 2181 for LMDZ5/trunk/libf/phylmd/lmdz1d.F90
- Timestamp:
- Jan 17, 2015, 2:00:00 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/lmdz1d.F90
r2126 r2181 138 138 ! 139 139 !--------------------------------------------------------------------- 140 ! Declarations related to nudging 141 !--------------------------------------------------------------------- 142 integer :: nudge_max 143 parameter (nudge_max=9) 144 integer :: inudge_RHT=1 145 integer :: inudge_UV=2 146 logical :: nudge(nudge_max) 147 real :: t_targ(llm) 148 real :: rh_targ(llm) 149 real :: u_targ(llm) 150 real :: v_targ(llm) 151 ! 152 !--------------------------------------------------------------------- 140 153 ! Declarations related to vertical discretization: 141 154 !--------------------------------------------------------------------- … … 156 169 real :: du_phys(llm),dv_phys(llm),dt_phys(llm) 157 170 real :: dt_dyn(llm) 158 real :: dt_cooling(llm),d_th_adv(llm) 171 real :: dt_cooling(llm),d_th_adv(llm),d_t_nudge(llm) 172 real :: d_u_nudge(llm),d_v_nudge(llm) 159 173 real :: alpha 160 174 real :: ttt … … 164 178 REAL, ALLOCATABLE, DIMENSION(:,:):: dq_dyn 165 179 REAL, ALLOCATABLE, DIMENSION(:,:):: d_q_adv 166 ! REAL, ALLOCATABLE, DIMENSION(:):: d_th_adv 180 REAL, ALLOCATABLE, DIMENSION(:,:):: d_q_nudge 181 ! REAL, ALLOCATABLE, DIMENSION(:):: d_th_adv 167 182 168 183 !--------------------------------------------------------------------- … … 211 226 !--------------------------------------------------------------------- 212 227 integer :: k,l,i,it=1,mxcalc 228 integer jcode 213 229 integer jjmp1 214 230 parameter (jjmp1=jjm+1-1/jjm) … … 330 346 if (forcing_toga.or.forcing_sandu.or.forcing_astex .or. forcing_dice) & 331 347 & type_ts_forcing = 1 332 348 ! 349 ! Initialization of the logical switch for nudging 350 jcode = iflag_nudge 351 do i = 1,nudge_max 352 nudge(i) = mod(jcode,10) .ge. 1 353 jcode = jcode/10 354 enddo 333 355 !--------------------------------------------------------------------- 334 356 ! Definition of the run … … 444 466 allocate(dq_dyn(llm,nqtot)) 445 467 allocate(d_q_adv(llm,nqtot)) 446 ! allocate(d_th_adv(llm)) 468 allocate(d_q_nudge(llm,nqtot)) 469 ! allocate(d_th_adv(llm)) 447 470 448 471 ! … … 751 774 open(97,file='div_slab.dat',STATUS='OLD') 752 775 endif 776 ! 777 !--------------------------------------------------------------------- 778 ! Initialize target profile for RHT nudging if needed 779 !--------------------------------------------------------------------- 780 if (nudge(inudge_RHT)) then 781 call nudge_RHT_init(plev,play,temp,q(:,1),t_targ,rh_targ) 782 endif 783 if (nudge(inudge_UV)) then 784 call nudge_UV_init(plev,play,u,v,u_targ,v_targ) 785 endif 786 ! 753 787 !===================================================================== 754 788 ! START OF THE TEMPORAL LOOP : … … 876 910 !! : -fcoriolis*(u(1:mxcalc)-ug(1:mxcalc)) 877 911 ! 912 !!!!!!!!!!!!!!!!!!!!!!!! 913 ! Nudging 914 !!!!!!!!!!!!!!!!!!!!!!!! 915 d_t_nudge(:) = 0. 916 d_q_nudge(:,:) = 0. 917 d_u_nudge(:) = 0. 918 d_v_nudge(:) = 0. 919 if (nudge(inudge_RHT)) then 920 call nudge_RHT(timestep,plev,play,t_targ,rh_targ,temp,q(:,1), & 921 & d_t_nudge,d_q_nudge(:,1)) 922 endif 923 if (nudge(inudge_UV)) then 924 call nudge_UV(timestep,plev,play,u_targ,v_targ,u,v, & 925 & d_u_nudge,d_v_nudge) 926 endif 927 ! 878 928 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 879 929 ! call writefield_phy('dv_age' ,dv_age,llm) … … 893 943 u(1:mxcalc)=u(1:mxcalc) + timestep*( & 894 944 & du_phys(1:mxcalc) & 895 & +du_age(1:mxcalc) ) 945 & +du_age(1:mxcalc) & 946 & +d_u_nudge(1:mxcalc) ) 896 947 v(1:mxcalc)=v(1:mxcalc) + timestep*( & 897 948 & dv_phys(1:mxcalc) & 898 & +dv_age(1:mxcalc) ) 949 & +dv_age(1:mxcalc) & 950 & +d_v_nudge(1:mxcalc) ) 899 951 q(1:mxcalc,:)=q(1:mxcalc,:)+timestep*( & 900 952 & dq(1:mxcalc,:) & 901 & +d_q_adv(1:mxcalc,:) ) 953 & +d_q_adv(1:mxcalc,:) & 954 & +d_q_nudge(1:mxcalc,:) ) 902 955 903 956 if (prt_level.ge.1) then … … 913 966 & dt_phys(1:mxcalc) & 914 967 & +d_th_adv(1:mxcalc) & 968 & +d_t_nudge(1:mxcalc) & 915 969 & +dt_cooling(1:mxcalc)) ! Taux de chauffage ou refroid. 916 970
Note: See TracChangeset
for help on using the changeset viewer.