Changeset 2307 for LMDZ5/trunk/libf/phylmd/mod_1D_cases_read.F90
- Timestamp:
- Jun 23, 2015, 1:09:31 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/mod_1D_cases_read.F90
r2191 r2307 1 ! 2 ! $Id$ 3 ! 1 4 MODULE mod_1D_cases_read 2 5 … … 11 14 real heure_ini_cas 12 15 real day_ju_ini_cas ! Julian day of case first day 13 parameter (year_ini_cas=2011) 14 parameter (mth_ini_cas=10) 15 parameter (day_ini_cas=1) ! 10 = 10Juil2006 16 ! parameter (year_ini_cas=2011) 17 parameter (year_ini_cas=1969) 18 ! parameter (mth_ini_cas=10) 19 parameter (mth_ini_cas=6) 20 ! parameter (day_ini_cas=1) ! 10 = 10Juil2006 21 parameter (day_ini_cas=24) ! 24 = 24 juin 1969 16 22 parameter (heure_ini_cas=0.) !0h en secondes 17 23 real pdt_cas … … 43 49 real, allocatable:: vitw_cas(:,:) 44 50 real, allocatable:: ug_cas(:,:),vg_cas(:,:) 45 real, allocatable:: lat_cas(:),sens_cas(:),ts_cas(:) 51 real, allocatable:: lat_cas(:),sens_cas(:),ts_cas(:),ustar_cas(:) 46 52 47 53 !champs interpoles … … 70 76 71 77 72 real lat_prof_cas,sens_prof_cas,ts_prof_cas 78 real lat_prof_cas,sens_prof_cas,ts_prof_cas,ustar_prof_cas 73 79 74 80 … … 143 149 allocate(ug_cas(nlev_cas,nt_cas)) 144 150 allocate(vg_cas(nlev_cas,nt_cas)) 145 allocate(lat_cas(nt_cas),sens_cas(nt_cas),ts_cas(nt_cas) )151 allocate(lat_cas(nt_cas),sens_cas(nt_cas),ts_cas(nt_cas),ustar_cas(nt_cas)) 146 152 147 153 … … 175 181 & ,ug_cas,vg_cas,vitw_cas,du_cas,hu_cas,vu_cas,dv_cas,hv_cas,vv_cas & 176 182 & ,dt_cas,dtrad_cas,ht_cas,vt_cas,dq_cas,hq_cas,vq_cas & 177 & ,dth_cas,hth_cas,vth_cas,dr_cas,hr_cas,vr_cas,sens_cas,lat_cas,ts_cas )183 & ,dth_cas,hth_cas,vth_cas,dr_cas,hr_cas,vr_cas,sens_cas,lat_cas,ts_cas,ustar_cas) 178 184 179 185 … … 203 209 deallocate(ug_cas) 204 210 deallocate(vg_cas) 205 deallocate(lat_cas,sens_cas,ts_cas )211 deallocate(lat_cas,sens_cas,ts_cas,ustar_cas) 206 212 207 213 !champs interpoles … … 241 247 & ,zz,pp,temp,qv,rh,theta,rv,u,v,ug,vg,w, & 242 248 & du,hu,vu,dv,hv,vv,dt,dtrad,ht,vt,dq,hq,vq, & 243 & dth,hth,vth,dr,hr,vr,sens,flat,ts )249 & dth,hth,vth,dr,hr,vr,sens,flat,ts,ustar) 244 250 245 251 !program reading forcing of the case study … … 265 271 real dth(nlevel,ntime),hth(nlevel,ntime),vth(nlevel,ntime) 266 272 real dr(nlevel,ntime),hr(nlevel,ntime),vr(nlevel,ntime) 267 real flat(ntime),sens(ntime),ts(ntime) 273 real flat(ntime),sens(ntime),ts(ntime),ustar(ntime) 268 274 269 275 270 276 integer nid, ierr,rid 271 277 integer nbvar3d 272 parameter(nbvar3d=3 4)278 parameter(nbvar3d=39) 273 279 integer var3didin(nbvar3d) 274 280 … … 478 484 stop 'ts' 479 485 endif 486 487 ierr=NF_INQ_VARID(nid,"ustar",var3didin(35)) 488 if(ierr/=NF_NOERR) then 489 write(*,*) NF_STRERROR(ierr) 490 stop 'ustar' 491 endif 480 492 481 493 #ifdef NC_DOUBLE … … 853 865 endif 854 866 ! write(*,*)'lecture ts ok',ts 867 868 #ifdef NC_DOUBLE 869 ierr = NF_GET_VAR_DOUBLE(nid,var3didin(35),ustar) 870 #else 871 ierr = NF_GET_VAR_REAL(nid,var3didin(35),ustar) 872 #endif 873 if(ierr/=NF_NOERR) then 874 write(*,*) NF_STRERROR(ierr) 875 stop "getvarup" 876 endif 877 ! write(*,*)'lecture ustar ok',ustar 878 855 879 856 880 return … … 862 886 & ,ug_cas,vg_cas,vitw_cas,du_cas,hu_cas,vu_cas & 863 887 & ,dv_cas,hv_cas,vv_cas,dt_cas,ht_cas,vt_cas,dtrad_cas & 864 & ,dq_cas,hq_cas,vq_cas,lat_cas,sens_cas 888 & ,dq_cas,hq_cas,vq_cas,lat_cas,sens_cas,ustar_cas & 865 889 & ,ts_prof_cas,plev_prof_cas,t_prof_cas,q_prof_cas & 866 890 & ,u_prof_cas,v_prof_cas,ug_prof_cas,vg_prof_cas & … … 868 892 & ,dv_prof_cas,hv_prof_cas,vv_prof_cas,dt_prof_cas & 869 893 & ,ht_prof_cas,vt_prof_cas,dtrad_prof_cas,dq_prof_cas & 870 & ,hq_prof_cas,vq_prof_cas,lat_prof_cas,sens_prof_cas )894 & ,hq_prof_cas,vq_prof_cas,lat_prof_cas,sens_prof_cas,ustar_prof_cas) 871 895 872 896 … … 903 927 real lat_cas(nt_cas) 904 928 real sens_cas(nt_cas) 929 real ustar_cas(nt_cas) 905 930 906 931 ! outputs: … … 915 940 real dtrad_prof_cas(nlev_cas) 916 941 real dq_prof_cas(nlev_cas),hq_prof_cas(nlev_cas),vq_prof_cas(nlev_cas) 917 real lat_prof_cas,sens_prof_cas,ts_prof_cas 942 real lat_prof_cas,sens_prof_cas,ts_prof_cas,ustar_prof_cas 918 943 ! local: 919 944 integer it_cas1, it_cas2,k … … 921 946 922 947 923 print*,'Check time',day1,day_ini_cas,day_ini_cas+ 90948 print*,'Check time',day1,day_ini_cas,day_ini_cas+1 924 949 925 950 if ((forcing_type.eq.10).and.(1.eq.1)) then 926 951 ! Check that initial day of the simulation consistent with the case: 927 if (annee_ref.ne.2011) then 928 print*,'Pour CINDY, annee_ref doit etre 2011' 952 if (annee_ref.ne.1969) then 953 ! print*,'Pour CINDY, annee_ref doit etre 2011' 954 print*,'Pour BOMEX, annee_ref doit etre 1969' 929 955 print*,'Changer annee_ref dans run.def' 930 956 stop 931 957 endif 932 if (annee_ref.eq.2011 .and. day1.lt.day_ini_cas) then 933 print*,'CINDY a débuté le 1 octobre 2011',day1,day_ini_cas 958 if (annee_ref.eq.1969 .and. day1.lt.day_ini_cas) then 959 ! print*,'CINDY a debute le 1 octobre 2011',day1,day_ini_cas 960 print*,'BOMEX a debute le 24 juin 1969',day1,day_ini_cas 934 961 print*,'Changer dayref dans run.def' 935 962 stop 936 963 endif 937 if (annee_ref.eq.2011 .and. day1.gt.day_ini_cas+90) then 938 print*,'CINDY a fini le 31 decembre' 964 if (annee_ref.eq.1969 .and. day1.gt.day_ini_cas+1) then 965 ! print*,'CINDY a fini le 31 decembre' 966 print*,'BOMEX a fini le 24 juin' 939 967 print*,'Changer dayref ou nday dans run.def',day1,day_ini_cas+90 940 968 stop … … 950 978 endif 951 979 if (annee_ref.eq.2006 .and. day1.lt.day_ini_cas) then 952 print*,'AMMA a d ébutéle 10 juillet 2006',day1,day_ini_cas980 print*,'AMMA a debute le 10 juillet 2006',day1,day_ini_cas 953 981 print*,'Changer dayref dans run.def' 954 982 stop … … 999 1027 sens_prof_cas = sens_cas(it_cas2) & 1000 1028 & -frac*(sens_cas(it_cas2)-sens_cas(it_cas1)) 1001 ts_prof_cas = ts_cas(it_cas2) &1029 ts_prof_cas = ts_cas(it_cas2) & 1002 1030 & -frac*(ts_cas(it_cas2)-ts_cas(it_cas1)) 1031 ustar_prof_cas = ustar_cas(it_cas2) & 1032 & -frac*(ustar_cas(it_cas2)-ustar_cas(it_cas1)) 1003 1033 1004 1034 do k=1,nlev_cas
Note: See TracChangeset
for help on using the changeset viewer.