- Timestamp:
- Jul 24, 2024, 2:54:37 PM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/lmdz_1dutils.f90
r5113 r5116 42 42 temp = kelvin 43 43 pres = millibar * 100.0 44 ! write(*,*)'kelvin,millibar=',kelvin,millibar45 ! write(*,*)'temp,pres=',temp,pres44 ! WRITE(*,*)'kelvin,millibar=',kelvin,millibar 45 ! WRITE(*,*)'temp,pres=',temp,pres 46 46 47 47 IF (temp <= rtt) THEN … … 642 642 CALL getin('nudging_t', nudging_t) 643 643 644 write(lunout, *)' +++++++++++++++++++++++++++++++++++++++'645 write(lunout, *)' Configuration des parametres du gcm1D: '646 write(lunout, *)' +++++++++++++++++++++++++++++++++++++++'647 write(lunout, *)' restart = ', restart648 write(lunout, *)' forcing_type = ', forcing_type649 write(lunout, *)' time_ini = ', time_ini650 write(lunout, *)' rlat = ', xlat651 write(lunout, *)' rlon = ', xlon652 write(lunout, *)' airephy = ', airefi653 write(lunout, *)' nat_surf = ', nat_surf654 write(lunout, *)' tsurf = ', tsurf655 write(lunout, *)' psurf = ', psurf656 write(lunout, *)' zsurf = ', zsurf657 write(lunout, *)' rugos = ', rugos658 write(lunout, *)' snowmass=', snowmass659 write(lunout, *)' wtsurf = ', wtsurf660 write(lunout, *)' wqsurf = ', wqsurf661 write(lunout, *)' albedo = ', albedo662 write(lunout, *)' xagesno = ', xagesno663 write(lunout, *)' restart_runoff = ', restart_runoff664 write(lunout, *)' qsolinp = ', qsolinp665 write(lunout, *)' zpicinp = ', zpicinp666 write(lunout, *)' nudge_tsoil = ', nudge_tsoil667 write(lunout, *)' isoil_nudge = ', isoil_nudge668 write(lunout, *)' Tsoil_nudge = ', Tsoil_nudge669 write(lunout, *)' tau_soil_nudge = ', tau_soil_nudge670 write(lunout, *)' tadv = ', tadv671 write(lunout, *)' tadvv = ', tadvv672 write(lunout, *)' tadvh = ', tadvh673 write(lunout, *)' thadv = ', thadv674 write(lunout, *)' thadvv = ', thadvv675 write(lunout, *)' thadvh = ', thadvh676 write(lunout, *)' qadv = ', qadv677 write(lunout, *)' qadvv = ', qadvv678 write(lunout, *)' qadvh = ', qadvh679 write(lunout, *)' trad = ', trad680 write(lunout, *)' forc_omega = ', forc_omega681 write(lunout, *)' forc_w = ', forc_w682 write(lunout, *)' forc_geo = ', forc_geo683 write(lunout, *)' forc_ustar = ', forc_ustar684 write(lunout, *)' nudging_u = ', nudging_u685 write(lunout, *)' nudging_v = ', nudging_v686 write(lunout, *)' nudging_t = ', nudging_t687 write(lunout, *)' nudging_qv = ', nudging_qv644 WRITE(lunout, *)' +++++++++++++++++++++++++++++++++++++++' 645 WRITE(lunout, *)' Configuration des parametres du gcm1D: ' 646 WRITE(lunout, *)' +++++++++++++++++++++++++++++++++++++++' 647 WRITE(lunout, *)' restart = ', restart 648 WRITE(lunout, *)' forcing_type = ', forcing_type 649 WRITE(lunout, *)' time_ini = ', time_ini 650 WRITE(lunout, *)' rlat = ', xlat 651 WRITE(lunout, *)' rlon = ', xlon 652 WRITE(lunout, *)' airephy = ', airefi 653 WRITE(lunout, *)' nat_surf = ', nat_surf 654 WRITE(lunout, *)' tsurf = ', tsurf 655 WRITE(lunout, *)' psurf = ', psurf 656 WRITE(lunout, *)' zsurf = ', zsurf 657 WRITE(lunout, *)' rugos = ', rugos 658 WRITE(lunout, *)' snowmass=', snowmass 659 WRITE(lunout, *)' wtsurf = ', wtsurf 660 WRITE(lunout, *)' wqsurf = ', wqsurf 661 WRITE(lunout, *)' albedo = ', albedo 662 WRITE(lunout, *)' xagesno = ', xagesno 663 WRITE(lunout, *)' restart_runoff = ', restart_runoff 664 WRITE(lunout, *)' qsolinp = ', qsolinp 665 WRITE(lunout, *)' zpicinp = ', zpicinp 666 WRITE(lunout, *)' nudge_tsoil = ', nudge_tsoil 667 WRITE(lunout, *)' isoil_nudge = ', isoil_nudge 668 WRITE(lunout, *)' Tsoil_nudge = ', Tsoil_nudge 669 WRITE(lunout, *)' tau_soil_nudge = ', tau_soil_nudge 670 WRITE(lunout, *)' tadv = ', tadv 671 WRITE(lunout, *)' tadvv = ', tadvv 672 WRITE(lunout, *)' tadvh = ', tadvh 673 WRITE(lunout, *)' thadv = ', thadv 674 WRITE(lunout, *)' thadvv = ', thadvv 675 WRITE(lunout, *)' thadvh = ', thadvh 676 WRITE(lunout, *)' qadv = ', qadv 677 WRITE(lunout, *)' qadvv = ', qadvv 678 WRITE(lunout, *)' qadvh = ', qadvh 679 WRITE(lunout, *)' trad = ', trad 680 WRITE(lunout, *)' forc_omega = ', forc_omega 681 WRITE(lunout, *)' forc_w = ', forc_w 682 WRITE(lunout, *)' forc_geo = ', forc_geo 683 WRITE(lunout, *)' forc_ustar = ', forc_ustar 684 WRITE(lunout, *)' nudging_u = ', nudging_u 685 WRITE(lunout, *)' nudging_v = ', nudging_v 686 WRITE(lunout, *)' nudging_t = ', nudging_t 687 WRITE(lunout, *)' nudging_qv = ', nudging_qv 688 688 IF (forcing_type ==40) THEN 689 write(lunout, *) '--- Forcing type GCSS Old --- with:'690 write(lunout, *)'imp_fcg', imp_fcg_gcssold691 write(lunout, *)'ts_fcg', ts_fcg_gcssold692 write(lunout, *)'tp_fcg', Tp_fcg_gcssold693 write(lunout, *)'tp_ini', Tp_ini_gcssold694 write(lunout, *)'xturb_fcg', xTurb_fcg_gcssold689 WRITE(lunout, *) '--- Forcing type GCSS Old --- with:' 690 WRITE(lunout, *)'imp_fcg', imp_fcg_gcssold 691 WRITE(lunout, *)'ts_fcg', ts_fcg_gcssold 692 WRITE(lunout, *)'tp_fcg', Tp_fcg_gcssold 693 WRITE(lunout, *)'tp_ini', Tp_ini_gcssold 694 WRITE(lunout, *)'xturb_fcg', xTurb_fcg_gcssold 695 695 ENDIF 696 696 697 write(lunout, *)' +++++++++++++++++++++++++++++++++++++++'698 write(lunout, *)697 WRITE(lunout, *)' +++++++++++++++++++++++++++++++++++++++' 698 WRITE(lunout, *) 699 699 700 700 END SUBROUTINE conf_unicol … … 729 729 CHARACTER*(*) fichnom 730 730 !Al1 plev tronque pour .nc mais plev(klev+1):=0 731 real:: plev(klon, klev + 1), play (klon, klev), phi(klon, klev)732 real:: presnivs(klon, klev)733 real:: ucov(klon, klev), vcov(klon, klev), temp(klon, klev)734 real:: q(klon, klev, nqtot), omega2(klon, klev)735 ! real:: ug(klev),vg(klev),fcoriolis736 real:: phis(klon)731 REAL :: plev(klon, klev + 1), play (klon, klev), phi(klon, klev) 732 REAL :: presnivs(klon, klev) 733 REAL :: ucov(klon, klev), vcov(klon, klev), temp(klon, klev) 734 REAL :: q(klon, klev, nqtot), omega2(klon, klev) 735 ! REAL :: ug(klev),vg(klev),fcoriolis 736 REAL :: phis(klon) 737 737 738 738 ! Variables locales pour NetCDF: … … 751 751 !! nmq(2)="cond" 752 752 !! do iq=3,nqtot 753 !! write(nmq(iq),'("tra",i1)') iq-2753 !! WRITE(nmq(iq),'("tra",i1)') iq-2 754 754 !! enddo 755 755 DO iq = 1, nqtot … … 862 862 CHARACTER*(*) fichnom 863 863 !Al1 plev tronque pour .nc mais plev(klev+1):=0 864 real:: plev(klon, klev), play (klon, klev), phi(klon, klev)865 real:: presnivs(klon, klev)866 real:: ucov(klon, klev), vcov(klon, klev), temp(klon, klev)867 real:: q(klon, klev, nqtot)868 real:: omega2(klon, klev), rho(klon, klev + 1)869 ! real:: ug(klev),vg(klev),fcoriolis870 real:: phis(klon)864 REAL :: plev(klon, klev), play (klon, klev), phi(klon, klev) 865 REAL :: presnivs(klon, klev) 866 REAL :: ucov(klon, klev), vcov(klon, klev), temp(klon, klev) 867 REAL :: q(klon, klev, nqtot) 868 REAL :: omega2(klon, klev), rho(klon, klev + 1) 869 ! REAL :: ug(klev),vg(klev),fcoriolis 870 REAL :: phis(klon) 871 871 872 872 ! Variables locales pour NetCDF: … … 1031 1031 ! ierr = severity of situation ( = 0 normal ) 1032 1032 1033 character(len= *) modname1033 CHARACTER(LEN = *) modname 1034 1034 integer ierr 1035 character(len= *) message1036 1037 write(*, *) 'in abort_gcm'1035 CHARACTER(LEN = *) message 1036 1037 WRITE(*, *) 'in abort_gcm' 1038 1038 CALL histclo 1039 1039 ! CALL histclo(2) … … 1041 1041 ! CALL histclo(4) 1042 1042 ! CALL histclo(5) 1043 write(*, *) 'out of histclo'1044 write(*, *) 'Stopping in ', modname1045 write(*, *) 'Reason = ', message1043 WRITE(*, *) 'out of histclo' 1044 WRITE(*, *) 'Stopping in ', modname 1045 WRITE(*, *) 'Reason = ', message 1046 1046 CALL getin_dump 1047 1047 1048 if (ierr == 0) then1049 write(*, *) 'Everything is cool'1048 if (ierr == 0) THEN 1049 WRITE(*, *) 'Everything is cool' 1050 1050 else 1051 write(*, *) 'Houston, we have a problem ', ierr1051 WRITE(*, *) 'Houston, we have a problem ', ierr 1052 1052 endif 1053 1053 STOP … … 1296 1296 1297 1297 do l = 1, llm 1298 if(l==1) then1298 IF(l==1) THEN 1299 1299 !si omgup pour la couche 1, alors tendance nulle 1300 1300 omgdown = max(omega(2), 0.0) … … 1308 1308 d_v_va(l) = -omgdown * (v(l) - v(l + 1)) / (play(l) - play(l + 1)) 1309 1309 1310 elseif(l==llm) then1310 elseif(l==llm) THEN 1311 1311 omgup = min(omega(l), 0.0) 1312 1312 alpha = rkappa * temp(l) * (1. + q(l, 1) * rv / rd) / (play(l) * (1. + q(l, 1))) … … 1415 1415 d_t_va(llm) = -omup * dtdp(llm)!+omup*cor(llm) 1416 1416 1417 ! if(abs(rlat(1))>10.) then1417 ! IF(abs(rlat(1))>10.) THEN 1418 1418 ! Calculate the tendency due agestrophic motions 1419 1419 ! du_age = fcoriolis*(v-vg) … … 1715 1715 do l = 1, llm 1716 1716 1717 if (play(l)>=plev_prof_cas(nlev_cas)) then 1718 1717 if (play(l)>=plev_prof_cas(nlev_cas)) THEN 1719 1718 mxcalc = l 1720 1719 ! print *,'debut interp2, mxcalc=',mxcalc … … 1722 1721 k2 = 0 1723 1722 1724 if (play(l)<=plev_prof_cas(1)) then 1725 1723 if (play(l)<=plev_prof_cas(1)) THEN 1726 1724 do k = 1, nlev_cas - 1 1727 if (play(l)<=plev_prof_cas(k).and. play(l)>plev_prof_cas(k + 1)) then1725 if (play(l)<=plev_prof_cas(k).and. play(l)>plev_prof_cas(k + 1)) THEN 1728 1726 k1 = k 1729 1727 k2 = k + 1 … … 1731 1729 enddo 1732 1730 1733 if (k1==0 .or. k2==0) then1734 write(*, *) 'PB! k1, k2 = ', k1, k21735 write(*, *) 'l,play(l) = ', l, play(l) / 1001731 if (k1==0 .or. k2==0) THEN 1732 WRITE(*, *) 'PB! k1, k2 = ', k1, k2 1733 WRITE(*, *) 'l,play(l) = ', l, play(l) / 100 1736 1734 do k = 1, nlev_cas - 1 1737 write(*, *) 'k,plev_prof_cas(k) = ', k, plev_prof_cas(k) / 1001735 WRITE(*, *) 'k,plev_prof_cas(k) = ', k, plev_prof_cas(k) / 100 1738 1736 enddo 1739 1737 endif … … 1742 1740 t_mod_cas(l) = t_prof_cas(k2) - frac * (t_prof_cas(k2) - t_prof_cas(k1)) 1743 1741 theta_mod_cas(l) = th_prof_cas(k2) - frac * (th_prof_cas(k2) - th_prof_cas(k1)) 1744 if(theta_mod_cas(l)/=0) t_mod_cas(l) = theta_mod_cas(l) * (play(l) / 100000.)**(RD / RCPD)1742 IF(theta_mod_cas(l)/=0) t_mod_cas(l) = theta_mod_cas(l) * (play(l) / 100000.)**(RD / RCPD) 1745 1743 thv_mod_cas(l) = thv_prof_cas(k2) - frac * (thv_prof_cas(k2) - thv_prof_cas(k1)) 1746 1744 thl_mod_cas(l) = thl_prof_cas(k2) - frac * (thl_prof_cas(k2) - thl_prof_cas(k1)) … … 1780 1778 t_mod_cas(l) = frac1 * t_prof_cas(k1) - frac2 * t_prof_cas(k2) 1781 1779 theta_mod_cas(l) = frac1 * th_prof_cas(k1) - frac2 * th_prof_cas(k2) 1782 if(theta_mod_cas(l)/=0) t_mod_cas(l) = theta_mod_cas(l) * (play(l) / 100000.)**(RD / RCPD)1780 IF(theta_mod_cas(l)/=0) t_mod_cas(l) = theta_mod_cas(l) * (play(l) / 100000.)**(RD / RCPD) 1783 1781 thv_mod_cas(l) = frac1 * thv_prof_cas(k1) - frac2 * thv_prof_cas(k2) 1784 1782 thl_mod_cas(l) = frac1 * thl_prof_cas(k1) - frac2 * thl_prof_cas(k2) … … 1851 1849 enddo ! l 1852 1850 1853 return1851 RETURN 1854 1852 end 1855 1853
Note: See TracChangeset
for help on using the changeset viewer.