Changeset 3851 for LMDZ6/branches/LMDZ-tracers/libf/phylmd/dyn1d/scm.F90
- Timestamp:
- Feb 22, 2021, 12:44:07 PM (4 years ago)
- Location:
- LMDZ6/branches/LMDZ-tracers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/LMDZ-tracers
- Property svn:mergeinfo changed
-
LMDZ6/branches/LMDZ-tracers/libf/phylmd/dyn1d/scm.F90
r3693 r3851 75 75 real :: zcufi = 1. 76 76 real :: zcvfi = 1. 77 78 !- real :: nat_surf79 !- logical :: ok_flux_surf80 !- real :: fsens81 !- real :: flat82 !- real :: tsurf83 !- real :: rugos84 !- real :: qsol(1:2)85 !- real :: qsurf86 !- real :: psurf87 !- real :: zsurf88 !- real :: albedo89 !-90 !- real :: time = 0.91 !- real :: time_ini92 !- real :: xlat93 !- real :: xlon94 !- real :: wtsurf95 !- real :: wqsurf96 !- real :: restart_runoff97 !- real :: xagesno98 !- real :: qsolinp99 !- real :: zpicinp100 !-101 77 real :: fnday 102 78 real :: day, daytime … … 141 117 logical :: forcing_case2 = .false. 142 118 logical :: forcing_SCM = .false. 143 integer :: type_ts_forcing ! 0 = SST constant; 1 = SST read from a file144 ! (cf read_tsurf1d.F)145 119 146 120 !flag forcings … … 148 122 logical :: nudge_thermo=.false. 149 123 logical :: cptadvw=.true. 124 125 150 126 !===================================================================== 151 127 ! DECLARATIONS FOR EACH CASE … … 248 224 ! 249 225 integer :: it_end ! iteration number of the last call 250 !Al1 226 !Al1,plev,play,phi,phis,presnivs, 251 227 integer ecrit_slab_oc !1=ecrit,-1=lit,0=no file 252 228 data ecrit_slab_oc/-1/ … … 278 254 d_v_age(:)=0. 279 255 256 280 257 ! Initialization of Common turb_forcing 281 258 dtime_frcg = 0. … … 290 267 ! OPTIONS OF THE 1D SIMULATION (lmdz1d.def => unicol.def) 291 268 !--------------------------------------------------------------------- 292 !Al1293 269 call conf_unicol 294 270 !Al1 moves this gcssold var from common fcg_gcssold to … … 296 272 ! -------------------------------------------------------------------- 297 273 close(1) 298 !Al1299 274 write(*,*) 'lmdz1d.def lu => unicol.def' 300 275 … … 302 277 year_ini_cas=1997 303 278 ! It is possible that those parameters are run twice. 304 305 279 ! A REVOIR : LIRE PEUT ETRE AN MOIS JOUR DIRECETEMENT 280 281 306 282 call getin('anneeref',year_ini_cas) 307 283 call getin('dayref',day_deb) … … 309 285 call getin('time_ini',heure_ini_cas) 310 286 311 type_ts_forcing = 0 312 IF (nat_surf==0) type_ts_forcing=1 ! SST forcee sur OCEAN 313 print*,'NATURE DE LA SURFACE ',nat_surf 287 print*,'NATURE DE LA SURFACE ',nat_surf 314 288 ! 315 289 ! Initialization of the logical switch for nudging 290 316 291 jcode = iflag_nudge 317 292 do i = 1,nudge_max … … 319 294 jcode = jcode/10 320 295 enddo 321 !--------------------------------------------------------------------- 296 !----------------------------------------------------------------------- 322 297 ! Definition of the run 323 !--------------------------------------------------------------------- 298 !----------------------------------------------------------------------- 324 299 325 300 call conf_gcm( 99, .TRUE. ) … … 343 318 allocate( phy_flic(year_len)) ! Fraction de glace 344 319 phy_flic(:)=0.0 320 321 345 322 !----------------------------------------------------------------------- 346 323 ! Choix du calendrier … … 373 350 ! Le numero du jour est dans "day". L heure est traitee separement. 374 351 ! La date complete est dans "daytime" (l'unite est le jour). 352 353 375 354 if (nday>0) then 376 355 fnday=nday … … 409 388 ! Initialization of dimensions, geometry and initial state 410 389 !--------------------------------------------------------------------- 411 ! 390 ! call init_phys_lmdz(1,1,llm,1,(/1/)) ! job now done via iniphysiq 412 391 ! but we still need to initialize dimphy module (klon,klev,etc.) here. 413 392 call init_dimphy1D(1,llm) … … 433 412 ! (phys_state_var_init is called again in physiq) 434 413 read_climoz = 0 435 ! 414 nsw=6 415 436 416 call phys_state_var_init(read_climoz) 437 417 … … 446 426 !!! Feedback forcing values for Gateaux differentiation (al1) 447 427 !!!===================================================================== 448 !!! Surface Planck forcing bracketing call radiation449 !! surf_Planck = 0.450 !! surf_Conv = 0.451 !! write(*,*) 'Gateaux-dif Planck,Conv:',surf_Planck,surf_Conv452 !!! a mettre dans le lmdz1d.def ou autre453 !!454 428 !! 455 429 qsol = qsolinp … … 469 443 ENDIF 470 444 print*,'Flux sol ',fsens,flat 471 !! ok_flux_surf=.false.472 !! fsens=-wtsurf*rcpd*rho(1)473 !! flat=-wqsurf*rlvtt*rho(1)474 !!!!475 445 476 446 ! Vertical discretization and pressure levels at half and mid levels: … … 496 466 plev =ap+bp*psurf 497 467 play = 0.5*(plev(1:llm)+plev(2:llm+1)) 498 zlay=-rd*300.*log(play/psurf)/rg ! moved after reading profiles 468 zlay=-rd*300.*log(play/psurf)/rg ! moved after reading profiles. 499 469 500 470 IF (forcing_type .eq. 59) THEN … … 527 497 print*,'mxcalc=',mxcalc 528 498 ! print*,'zlay=',zlay(mxcalc) 529 print*,'play=',play(mxcalc) 530 531 !Al1 pour SST forced, appell?? depuis ocean_forced_noice 532 ts_cur = tsurf ! SST used in read_tsurf1d 499 ! print*,'play=',play(mxcalc) 500 501 !! When surface temperature is forced 502 tg= tsurf ! surface T used in read_tsurf1d 503 504 533 505 !===================================================================== 534 506 ! Initialisation de la physique : … … 546 518 ! airefi,zcufi,zcvfi initialises au debut de ce programme 547 519 ! rday,ra,rg,rd,rcpd declares dans YOMCST.h et calcules dans suphel.F 520 521 548 522 day_step = float(nsplit_phys)*day_step/float(iphysiq) 549 523 write (*,*) 'Time step divided by nsplit_phys (=',nsplit_phys,')' … … 563 537 ! e.g. for cell boundaries, which are meaningless in 1D; so pad these 564 538 ! with '0.' when necessary 539 565 540 call iniphysiq(iim,jjm,llm, & 566 541 1,comm_lmdz, & … … 650 625 zpic = zpicinp 651 626 ftsol=tsurf 652 nsw=6 ! on met le nb de bandes SW=6, pour initialiser653 ! 6 albedo, mais on peut quand meme tourner avec654 ! moins. Seules les 2 ou 4 premiers seront lus655 627 falb_dir=albedo 656 628 falb_dif=albedo … … 664 636 prw_ancien = 0. 665 637 !jyg< 666 !! pbl_tke(:,:,:)=1.e-8 667 pbl_tke(:,:,:)=0. 668 pbl_tke(:,2,:)=1.e-2 669 PRINT *, ' pbl_tke dans lmdz1d ' 670 if (prt_level .ge. 5) then 671 DO nsrf = 1,4 672 PRINT *,'pbl_tke(1,:,',nsrf,') ',pbl_tke(1,:,nsrf) 673 ENDDO 674 end if 675 638 ! Etienne: comment those lines since now the TKE is inialized in 1D_read_forc_cases 639 !! pbl_tke(:,:,:)=1.e-8 640 ! pbl_tke(:,:,:)=0. 641 ! pbl_tke(:,2,:)=1.e-2 676 642 !>jyg 677 678 643 rain_fall=0. 679 644 snow_fall=0. … … 715 680 v_ancien(1,:)=v(:) 716 681 717 u10m=0.718 v10m=0.719 ale_wake=0.720 ale_bl_stat=0.682 u10m=0. 683 v10m=0. 684 ale_wake=0. 685 ale_bl_stat=0. 721 686 722 687 !------------------------------------------------------------------------ … … 738 703 ! to be set at some arbitratry convenient values. 739 704 !------------------------------------------------------------------------ 740 !Al1 =============== restart option ========================== 705 !Al1 =============== restart option ====================================== 741 706 if (.not.restart) then 742 707 iflag_pbl = 5 … … 803 768 print*,'plev,play,phi,phis,presnivs,u,v,temp,q,omega2' 804 769 print*,'temp(1),q(1,1),u(1),v(1),plev(1),phis :' 805 print*,temp(1),q(1,1),u(1),v(1),plev(1),phis 770 print*,temp(1),q(1,1),u(1),v(1),plev(1),phis(1) 806 771 ! raz for safety 807 772 do l=1,llm … … 809 774 enddo 810 775 endif 811 ! Al1================ end restart =================================776 !====================== end restart ================================= 812 777 IF (ecrit_slab_oc.eq.1) then 813 778 open(97,file='div_slab.dat',STATUS='UNKNOWN') … … 820 785 CALL iophys_ini 821 786 #endif 787 788 !===================================================================== 822 789 ! START OF THE TEMPORAL LOOP : 823 790 !===================================================================== 824 791 825 792 it_end = nint(fnday*day_step) 826 !test JLD it_end = 10827 793 do while(it.le.it_end) 828 794 … … 832 798 print*,'PAS DE TEMPS ',timestep 833 799 endif 834 !Al1 demande de restartphy.nc835 800 if (it.eq.it_end) lastcall=.True. 836 801 … … 844 809 ! Geopotential : 845 810 !--------------------------------------------------------------------- 846 811 ! phis(1)=zsurf*RG 812 ! phi(1)=phis(1)+RD*temp(1)*(plev(1)-play(1))/(.5*(plev(1)+play(1))) 847 813 phi(1)=RD*temp(1)*(plev(1)-play(1))/(.5*(plev(1)+play(1))) 814 848 815 do l = 1, llm-1 849 816 phi(l+1)=phi(l)+RD*(temp(l)+temp(l+1))* & 850 817 & (play(l)-play(l+1))/(play(l)+play(l+1)) 851 818 enddo 819 852 820 853 821 !--------------------------------------------------------------------- … … 950 918 sfdt = sin(0.5*fcoriolis*timestep) 951 919 cfdt = cos(0.5*fcoriolis*timestep) 952 ! print *,'fcoriolis,sfdt,cfdt,timestep',fcoriolis,sfdt,cfdt,timestep 953 ! 920 954 921 d_u_age(1:mxcalc)= -2.*sfdt/timestep* & 955 922 & (sfdt*(u(1:mxcalc)-ug(1:mxcalc)) - & … … 1030 997 temp(1:mxcalc)=temp(1:mxcalc)+timestep*( & 1031 998 & dt_phys(1:mxcalc) & 1032 & +d_t_adv(1:mxcalc) &1033 & +d_t_nudge(1:mxcalc) 999 & +d_t_adv(1:mxcalc) & 1000 & +d_t_nudge(1:mxcalc) & 1034 1001 & +dt_cooling(1:mxcalc)) ! Taux de chauffage ou refroid. 1035 1002 1036 1003 1037 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1004 !======================================================================= 1038 1005 !! CONSERVE EN ATTENDANT QUE LE CAS EN QUESTION FONCTIONNE EN STD !! 1039 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1040 ! endif ! forcing_sandu or forcing_astex 1041 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1006 !======================================================================= 1042 1007 1043 1008 teta=temp*(pzero/play)**rkappa 1044 ! 1009 1045 1010 !--------------------------------------------------------------------- 1046 1011 ! Nudge soil temperature if requested … … 1080 1045 1081 1046 ! incremente day time 1082 ! print*,'daytime bef',daytime,1./day_step1083 1047 daytime = daytime+1./day_step 1084 !Al1dbg1085 1048 day = int(daytime+0.1/day_step) 1086 1049 ! time = max(daytime-day,0.0) … … 1088 1051 !cc time = real(mod(it,day_step))/day_step 1089 1052 time = time_ini/24.+real(mod(it,day_step))/day_step 1090 ! print*,'daytime nxt time',daytime,time1091 1053 it=it+1 1092 1054 1093 1055 enddo 1094 1056 1095 !Al11096 1057 if (ecrit_slab_oc.ne.-1) close(97) 1097 1058 1098 1059 !Al1 Call to 1D equivalent of dynredem (an,mois,jour,heure ?) 1099 ! ------------------------------------- 1060 ! --------------------------------------------------------------------------- 1100 1061 call dyn1dredem("restart1dyn.nc", & 1101 1062 & plev,play,phi,phis,presnivs, &
Note: See TracChangeset
for help on using the changeset viewer.