Changeset 5099 for LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d
- Timestamp:
- Jul 22, 2024, 9:29:09 PM (11 months ago)
- Location:
- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1DUTILS.h
r5088 r5099 1 1 #include "conf_gcm.F90" 2 2 3 !4 3 ! $Id$ 5 ! 6 ! 7 ! 4 5 6 8 7 SUBROUTINE conf_unicol 9 ! 8 10 9 #ifdef CPP_IOIPSL 11 10 use IOIPSL … … 18 17 !----------------------------------------------------------------------- 19 18 ! Auteurs : A. Lahellec . 20 ! 19 21 20 ! Declarations : 22 21 ! -------------- … … 27 26 #include "fcg_gcssold.h" 28 27 #include "fcg_racmo.h" 29 ! 30 ! 28 29 31 30 ! local: 32 31 ! ------ 33 32 34 33 ! CHARACTER ch1*72,ch2*72,ch3*72,ch4*12 35 36 ! 34 37 35 ! ------------------------------------------------------------------- 38 ! 36 39 37 ! ......... Initilisation parametres du lmdz1D .......... 40 ! 38 41 39 !--------------------------------------------------------------------- 42 40 ! initialisations: … … 120 118 ! > 100 ==> forcing_case = .true. or forcing_case2 = .true. 121 119 ! initial profiles from case.nc file 122 ! 120 123 121 forcing_type = 0 124 122 CALL getin('forcing_type',forcing_type) … … 652 650 write(lunout,*)' +++++++++++++++++++++++++++++++++++++++' 653 651 write(lunout,*) 654 ! 652 655 653 RETURN 656 654 END 657 ! 655 658 656 ! $Id: dyn1deta0.F 1279 2010/07/30 A Lahellec$ 659 ! 660 ! 657 658 661 659 SUBROUTINE dyn1deta0(fichnom,plev,play,phi,phis,presnivs, & 662 660 & ucov,vcov,temp,q,omega2) … … 719 717 print*,'after open startphy ',fichnom,nmq 720 718 721 !722 719 ! Lecture des parametres de controle: 723 ! 720 724 721 CALL get_var("controle",tab_cntrl) 725 722 … … 744 741 ! pa = tab_cntrl(18) 745 742 ! preff = tab_cntrl(19) 746 ! 743 747 744 ! clon = tab_cntrl(20) 748 745 ! clat = tab_cntrl(21) 749 746 ! grossismx = tab_cntrl(22) 750 747 ! grossismy = tab_cntrl(23) 751 ! 748 752 749 IF ( tab_cntrl(24).EQ.1. ) THEN 753 750 fxyhypb =.true. … … 765 762 itau_dyn = tab_cntrl(31) 766 763 ! ................................................................. 767 ! 768 ! 764 765 769 766 ! PRINT*,'rad,omeg,g,cpp,kappa',rad,omeg,g,cpp,kappa 770 767 !Al1 … … 773 770 774 771 ! Lecture des champs 775 ! 772 776 773 CALL get_field("play",play,found) 777 774 IF (.NOT. found) PRINT*, modname//'Le champ <Play> est absent' … … 801 798 CALL close_startphy 802 799 print*,' close startphy',fichnom,play(1,1),play(1,klev),temp(1,klev) 803 ! 800 804 801 RETURN 805 802 END 806 ! 803 807 804 ! $Id: dyn1dredem.F 1279 2010/07/29 A Lahellec$ 808 ! 809 ! 805 806 810 807 SUBROUTINE dyn1dredem(fichnom,plev,play,phi,phis,presnivs, & 811 808 & ucov,vcov,temp,q,omega2) … … 854 851 character*20 modname 855 852 character*80 abort_message 856 ! 853 857 854 INTEGER pass 858 855 … … 896 893 ! tab_cntrl(18) = pa 897 894 ! tab_cntrl(19) = preff 898 ! 895 899 896 ! ..... parametres pour le zoom ...... 900 897 … … 903 900 ! tab_cntrl(22) = grossismx 904 901 ! tab_cntrl(23) = grossismy 905 ! 902 906 903 IF ( fxyhypb ) THEN 907 904 tab_cntrl(24) = 1. … … 923 920 tab_cntrl(30) = FLOAT(day_end) 924 921 tab_cntrl(31) = FLOAT(itau_dyn + itaufin) 925 ! 922 926 923 DO pass=1,2 927 924 CALL put_var(pass,"controle","Param. de controle Dyn1D",tab_cntrl) 928 !929 925 930 926 ! Ecriture/extension de la coordonnee temps … … 932 928 933 929 ! Ecriture des champs 934 ! 930 935 931 CALL put_field(pass,"plev","p interfaces sauf la nulle",plev) 936 932 CALL put_field(pass,"play","",play) … … 953 949 ENDDO 954 950 955 !956 951 RETURN 957 952 END … … 999 994 1000 995 USE IOIPSL 1001 ! 996 1002 997 ! Stops the simulation cleanly, closing files and printing various 1003 998 ! comments 1004 ! 999 1005 1000 ! Input: modname = name of calling program 1006 1001 ! message = stuff to print … … 1021 1016 write(*,*) 'Reason = ',message 1022 1017 call getin_dump 1023 ! 1018 1024 1019 if (ierr .eq. 0) then 1025 1020 write(*,*) 'Everything is cool' … … 1030 1025 END 1031 1026 REAL FUNCTION fq_sat(kelvin, millibar) 1032 ! 1027 1033 1028 IMPLICIT none 1034 1029 !====================================================================== … … 1039 1034 ! kelvin---input-R: temperature en Kelvin 1040 1035 ! millibar--input-R: pression en mb 1041 ! 1036 1042 1037 ! fq_sat----output-R: vapeur d'eau saturante en kg/kg 1043 1038 !====================================================================== 1044 ! 1039 1045 1040 REAL kelvin, millibar 1046 ! 1041 1047 1042 REAL r2es 1048 1043 PARAMETER (r2es=611.14 *18.0153/28.9644) 1049 ! 1044 1050 1045 REAL r3les, r3ies, r3es 1051 1046 PARAMETER (R3LES=17.269) 1052 1047 PARAMETER (R3IES=21.875) 1053 ! 1048 1054 1049 REAL r4les, r4ies, r4es 1055 1050 PARAMETER (R4LES=35.86) 1056 1051 PARAMETER (R4IES=7.66) 1057 ! 1052 1058 1053 REAL rtt 1059 1054 PARAMETER (rtt=273.16) 1060 ! 1055 1061 1056 REAL retv 1062 1057 PARAMETER (retv=28.9644/18.0153 - 1.0) 1063 ! 1058 1064 1059 REAL zqsat 1065 1060 REAL temp, pres 1066 1061 ! ------------------------------------------------------------------ 1067 ! 1068 ! 1062 1063 1069 1064 temp = kelvin 1070 1065 pres = millibar * 100.0 1071 1066 ! write(*,*)'kelvin,millibar=',kelvin,millibar 1072 1067 ! write(*,*)'temp,pres=',temp,pres 1073 ! 1068 1074 1069 IF (temp .LE. rtt) THEN 1075 1070 r3es = r3ies … … 1079 1074 r4es = r4les 1080 1075 ENDIF 1081 ! 1076 1082 1077 zqsat=r2es/pres * EXP ( r3es*(temp-rtt) / (temp-r4es) ) 1083 1078 zqsat=MIN(0.5,ZQSAT) 1084 1079 zqsat=zqsat/(1.-retv *zqsat) 1085 ! 1080 1086 1081 fq_sat = zqsat 1087 ! 1082 1088 1083 RETURN 1089 1084 END … … 1131 1126 ! le disvert de dyn3d (qui permet d'utiliser grille avec ab,bp imposes) 1132 1127 ! (MPL 18092012) 1133 ! 1128 1134 1129 ! Auteur : P. Le Van . 1135 ! 1130 1136 1131 IMPLICIT NONE 1137 1132 1138 1133 include "dimensions.h" 1139 1134 include "paramet.h" 1140 ! 1135 1141 1136 !======================================================================= 1142 ! 1143 ! 1137 1138 1144 1139 ! s = sigma ** kappa : coordonnee verticale 1145 1140 ! dsig(l) : epaisseur de la couche l ds la coord. s 1146 1141 ! sig(l) : sigma a l'interface des couches l et l-1 1147 1142 ! ds(l) : distance entre les couches l et l-1 en coord.s 1148 ! 1143 1149 1144 !======================================================================= 1150 ! 1145 1151 1146 REAL pa,preff 1152 1147 REAL ap(llmp1),bp(llmp1),dpres(llm),nivsigs(llm),nivsig(llmp1) 1153 1148 REAL presnivs(llm) 1154 ! 1149 1155 1150 ! declarations: 1156 1151 ! ------------- 1157 ! 1152 1158 1153 REAL sig(llm+1),dsig(llm) 1159 ! 1154 1160 1155 INTEGER l 1161 1156 REAL snorm … … 1165 1160 1166 1161 !----------------------------------------------------------------------- 1167 ! 1162 1168 1163 pi=2.*ASIN(1.) 1169 1164 … … 1186 1181 CLOSE(99) 1187 1182 alpha=deltaz/(llm*h) 1188 ! 1189 1183 1190 1184 DO 1 l = 1, llm 1191 1185 dsig(l) = (alpha+(1.-alpha)*exp(-beta*(llm-l)))* & … … 1203 1197 dsig(l) = sig(l)-sig(l+1) 1204 1198 2 CONTINUE 1205 ! 1206 1199 1207 1200 ELSE 1208 1201 !----------------------------------------------------------------------- … … 1238 1231 nivsig(l)= FLOAT(l) 1239 1232 ENDDO 1240 1241 ! 1233 1242 1234 ! .... Calculs de ap(l) et de bp(l) .... 1243 1235 ! ......................................... 1244 ! 1245 ! 1236 1246 1237 ! ..... pa et preff sont lus sur les fichiers start par lectba ..... 1247 ! 1248 1238 1249 1239 bp(llmp1) = 0. 1250 1240 … … 1256 1246 bp(l) = EXP( 1. -1./( sig(l)*sig(l)) ) 1257 1247 ap(l) = pa * ( sig(l) - bp(l) ) 1258 ! 1248 1259 1249 ENDDO 1260 1250 ap(llmp1) = pa * ( sig(llmp1) - bp(llmp1) ) … … 1278 1268 !!====================================================================== 1279 1269 ! SUBROUTINE read_tsurf1d(knon,sst_out) 1280 ! 1270 1281 1271 !! This subroutine specifies the surface temperature to be used in 1D simulations 1282 ! 1272 1283 1273 ! USE dimphy, ONLY : klon 1284 ! 1274 1285 1275 ! INTEGER, INTENT(IN) :: knon ! nomber of points on compressed grid 1286 1276 ! REAL, DIMENSION(klon), INTENT(OUT) :: sst_out ! tsurf used to force the single-column model 1287 ! 1277 1288 1278 ! INTEGER :: i 1289 1279 !! COMMON defined in lmdz1d.F: … … 1294 1284 ! sst_out(i) = ts_cur 1295 1285 ! ENDDO 1296 ! 1286 1297 1287 ! END SUBROUTINE read_tsurf1d 1298 ! 1288 1299 1289 !=============================================================== 1300 1290 subroutine advect_vert(llm,w,dt,q,plev) … … 1513 1503 REAL paprs(klon,klevp1) 1514 1504 REAL pplay(klon,klev) 1515 ! 1505 1516 1506 ! Variables d'etat 1517 1507 REAL t(klon,klev) 1518 1508 REAL q(klon,klev) 1519 ! 1509 1520 1510 ! Profiles cible 1521 1511 REAL t_targ(klon,klev) 1522 1512 REAL rh_targ(klon,klev) 1523 ! 1513 1524 1514 INTEGER k,i 1525 1515 REAL zx_qs 1526 1516 1527 1517 ! Declaration des constantes et des fonctions thermodynamiques 1528 ! 1518 1529 1519 include "YOMCST.h" 1530 1520 include "YOETHF.h" 1531 ! 1521 1532 1522 ! ---------------------------------------- 1533 1523 ! Statement functions 1534 1524 include "FCTTRE.h" 1535 1525 ! ---------------------------------------- 1536 ! 1526 1537 1527 DO k = 1,klev 1538 1528 DO i = 1,klon … … 1548 1538 print *, 't_targ',t_targ 1549 1539 print *, 'rh_targ',rh_targ 1550 ! 1551 ! 1540 1541 1552 1542 RETURN 1553 1543 END … … 1562 1552 REAL paprs(klon,klevp1) 1563 1553 REAL pplay(klon,klev) 1564 ! 1554 1565 1555 ! Variables d'etat 1566 1556 REAL u(klon,klev) 1567 1557 REAL v(klon,klev) 1568 ! 1558 1569 1559 ! Profiles cible 1570 1560 REAL u_targ(klon,klev) 1571 1561 REAL v_targ(klon,klev) 1572 ! 1562 1573 1563 INTEGER k,i 1574 ! 1564 1575 1565 DO k = 1,klev 1576 1566 DO i = 1,klon … … 1581 1571 print *, 'u_targ',u_targ 1582 1572 print *, 'v_targ',v_targ 1583 ! 1584 ! 1573 1574 1585 1575 RETURN 1586 1576 END … … 1597 1587 REAL paprs(klon,klevp1) 1598 1588 REAL pplay(klon,klev) 1599 ! 1589 1600 1590 ! Variables d'etat 1601 1591 REAL t(klon,klev) 1602 1592 REAL q(klon,klev) 1603 ! 1593 1604 1594 ! Tendances 1605 1595 REAL d_t(klon,klev) 1606 1596 REAL d_q(klon,klev) 1607 ! 1597 1608 1598 ! Profiles cible 1609 1599 REAL t_targ(klon,klev) 1610 1600 REAL rh_targ(klon,klev) 1611 ! 1601 1612 1602 ! Temps de relaxation 1613 1603 REAL tau … … 1615 1605 !! DATA tau /5400./ 1616 1606 DATA tau /1800./ 1617 ! 1607 1618 1608 INTEGER k,i 1619 1609 REAL zx_qs, rh, tnew, d_rh, rhnew 1620 1610 1621 1611 ! Declaration des constantes et des fonctions thermodynamiques 1622 ! 1612 1623 1613 include "YOMCST.h" 1624 1614 include "YOETHF.h" 1625 ! 1615 1626 1616 ! ---------------------------------------- 1627 1617 ! Statement functions 1628 1618 include "FCTTRE.h" 1629 1619 ! ---------------------------------------- 1630 ! 1620 1631 1621 print *,'dtime, tau ',dtime,tau 1632 1622 print *, 't_targ',t_targ … … 1634 1624 print *,'temp ',t 1635 1625 print *,'hum ',q 1636 ! 1626 1637 1627 DO k = 1,klev 1638 1628 DO i = 1,klon … … 1644 1634 ENDIF 1645 1635 rh = q(i,k)/zx_qs 1646 ! 1636 1647 1637 d_t(i,k) = d_t(i,k) + 1./tau*(t_targ(i,k)-t(i,k)) 1648 1638 d_rh = 1./tau*(rh_targ(i,k)-rh) 1649 ! 1639 1650 1640 tnew = t(i,k)+d_t(i,k)*dtime 1651 1641 !jyg< 1652 1642 ! Formule pour q : 1653 1643 ! d_q = (1/tau) [rh_targ*qsat(T_new) - q] 1654 ! 1644 1655 1645 ! Cette formule remplace d_q = (1/tau) [rh_targ - rh] qsat(T_new) 1656 1646 ! qui n'etait pas correcte. 1657 ! 1647 1658 1648 IF (tnew.LT.RTT) THEN 1659 1649 zx_qs = qsats(tnew)/(pplay(i,k)) … … 1664 1654 d_q(i,k) = d_q(i,k) + (1./tau)*(rh_targ(i,k)*zx_qs - q(i,k)) 1665 1655 rhnew = (q(i,k)+d_q(i,k)*dtime)/zx_qs 1666 ! 1656 1667 1657 print *,' k,d_t,rh,d_rh,rhnew,d_q ', & 1668 1658 k,d_t(i,k),rh,d_rh,rhnew,d_q(i,k) 1669 1659 ENDIF 1670 ! 1660 1671 1661 ENDDO 1672 1662 ENDDO 1673 ! 1663 1674 1664 RETURN 1675 1665 END … … 1686 1676 REAL paprs(klon,klevp1) 1687 1677 REAL pplay(klon,klev) 1688 ! 1678 1689 1679 ! Variables d'etat 1690 1680 REAL u(klon,klev) 1691 1681 REAL v(klon,klev) 1692 ! 1682 1693 1683 ! Tendances 1694 1684 REAL d_u(klon,klev) 1695 1685 REAL d_v(klon,klev) 1696 ! 1686 1697 1687 ! Profiles cible 1698 1688 REAL u_targ(klon,klev) 1699 1689 REAL v_targ(klon,klev) 1700 ! 1690 1701 1691 ! Temps de relaxation 1702 1692 REAL tau … … 1704 1694 ! DATA tau /5400./ 1705 1695 DATA tau /43200./ 1706 ! 1696 1707 1697 INTEGER k,i 1708 1698 1709 !1710 1699 !print *,'dtime, tau ',dtime,tau 1711 1700 !print *, 'u_targ',u_targ … … 1717 1706 !CR: nudging everywhere 1718 1707 ! IF (paprs(i,1)-pplay(i,k) .GT. 10000.) THEN 1719 ! 1708 1720 1709 d_u(i,k) = d_u(i,k) + 1./tau*(u_targ(i,k)-u(i,k)) 1721 1710 d_v(i,k) = d_v(i,k) + 1./tau*(v_targ(i,k)-v(i,k)) 1722 ! 1711 1723 1712 ! print *,' k,u,d_u,v,d_v ', & 1724 1713 ! k,u(i,k),d_u(i,k),v(i,k),d_v(i,k) 1725 1714 ! ENDIF 1726 ! 1715 1727 1716 ENDDO 1728 1717 ENDDO 1729 ! 1718 1730 1719 RETURN 1731 1720 END … … 1739 1728 & ,dt_prof_cas,ht_prof_cas,vt_prof_cas,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas & 1740 1729 & ,dth_prof_cas,hth_prof_cas,vth_prof_cas & 1741 ! 1730 1742 1731 & ,t_mod_cas,theta_mod_cas,thv_mod_cas,thl_mod_cas & 1743 1732 & ,qv_mod_cas,ql_mod_cas,qi_mod_cas,u_mod_cas,v_mod_cas & -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1D_decl_cases.h
r5075 r5099 109 109 ! real dt_gabls4 110 110 ! parameter (dt_gabls4=3600.) ! 1 forcage ttes les heures 111 ! 111 112 112 !profils initiaux: 113 113 ! real plev_gabls4(nlev_gabls4) … … 119 119 ! real u_gabi(nlev_gabls4), v_gabi(nlev_gabls4),ug_gabi(nlev_gabls4), vg_gabi(nlev_gabls4) 120 120 ! real ht_gabi(nlev_gabls4),hq_gabi(nlev_gabls4),poub(nlev_gabls4) 121 ! 121 122 122 !forcings 123 123 ! Lignes a detruire ... … … 128 128 ! real ug_profg(nlev_gabls4),vg_profg(nlev_gabls4) 129 129 ! real tg_profg 130 ! 130 131 131 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 132 132 -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1D_interp_cases.h
r4297 r5099 18 18 & ,dq_cas,hq_cas,vq_cas,dth_cas,hth_cas,vth_cas,lat_cas,sens_cas,ustar_cas & 19 19 & ,uw_cas,vw_cas,q1_cas,q2_cas,tkes_cas & 20 ! 20 21 21 & ,ts_prof_cas,tskin_prof_cas,ps_prof_cas,plev_prof_cas,t_prof_cas,theta_prof_cas,thv_prof_cas & 22 22 & ,thl_prof_cas,qv_prof_cas,ql_prof_cas,qi_prof_cas & … … 51 51 & ,dt_prof_cas,ht_prof_cas,vt_prof_cas,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas & 52 52 & ,dth_prof_cas,hth_prof_cas,vth_prof_cas & 53 ! 53 54 54 & ,t_mod_cas,theta_mod_cas,thv_mod_cas,thl_mod_cas,qv_mod_cas,ql_mod_cas,qi_mod_cas & 55 55 & ,u_mod_cas,v_mod_cas,ug_mod_cas,vg_mod_cas & … … 183 183 print *,'1D_interp: sens,flat',fsens,flat 184 184 ENDIF 185 ! 185 186 186 IF (ok_prescr_ust) THEN 187 187 ust=ustar_prof_cas -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1D_nudge_sandu_astex.h
r4142 r5099 1 1 do l = 1, llm 2 ! 2 3 3 ! au dessus de 700hPa, on relaxe vers profil init 4 4 ! on fait l'hypothese que dans ce cas, il n'y a plus d'eau liq. au dessus 700hpa … … 10 10 relax_thl(l)=0. 11 11 ! print *,'nudge: l tau_sandu u u_mod',l,tau_sandu,u(l),u_mod(l) 12 ! 12 13 13 if (l.ge.llm700) then 14 14 relax_q(l,1)=(q(l,1)-q_mod(l))/tau_sandu -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1D_read_forc_cases.h
r4650 r5099 1 ! 1 2 2 ! $Id$ 3 ! 3 4 4 !---------------------------------------------------------------------- 5 5 ! forcing_les = .T. : Impose a constant cooling … … 32 32 & ,dq_cas,hq_cas,vq_cas,dth_cas,hth_cas,vth_cas,lat_cas,sens_cas,ustar_cas & 33 33 & ,uw_cas,vw_cas,q1_cas,q2_cas,tkes_cas & 34 ! 34 35 35 & ,ts_prof_cas,tskin_prof_cas,ps_prof_cas,plev_prof_cas,t_prof_cas,theta_prof_cas,thv_prof_cas & 36 36 & ,thl_prof_cas,qv_prof_cas,ql_prof_cas,qi_prof_cas & … … 61 61 & ,dt_prof_cas,ht_prof_cas,vt_prof_cas,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas & 62 62 & ,dth_prof_cas,hth_prof_cas,vth_prof_cas & 63 ! 63 64 64 & ,t_mod_cas,theta_mod_cas,thv_mod_cas,thl_mod_cas,qv_mod_cas,ql_mod_cas,qi_mod_cas & 65 65 & ,u_mod_cas,v_mod_cas,ug_mod_cas,vg_mod_cas & … … 129 129 flat=-1.*lat_prof_cas 130 130 ENDIF 131 ! 131 132 132 IF (ok_prescr_ust) THEN 133 133 ust=ustar_prof_cas -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1Dconv.h
r4593 r5099 1 ! 1 2 2 ! $Id$ 3 ! 3 4 4 subroutine get_uvd(itap,dtime,file_forctl,file_fordat, & 5 5 & ht,hq,hw,hu,hv,hthturb,hqturb, & 6 6 & Ts,imp_fcg,ts_fcg,Tp_fcg,Turb_fcg) 7 ! 7 8 8 implicit none 9 9 … … 109 109 real Tsbef 110 110 save htbef,hqbef,hwbef,hubef,hvbef,hthturbbef,hqturbbef 111 ! 111 112 112 real timeaft,timebef 113 113 save timeaft,timebef … … 131 131 real hqturb_mes(100) !tendance horizontale d humidite, due aux 132 132 !flux turbulents 133 ! 133 134 134 !--------------------------------------------------------------------- 135 135 ! variable argument de la subroutine copie … … 149 149 !*** on determine le pas du meso_NH correspondant au nouvel itap *** 150 150 !*** pour aller chercher les champs dans rdgrads *** 151 ! 151 152 152 time=time0+itap*dtime 153 153 !c temps=int(time/dt+1) … … 156 156 pas=min(temps,pasmax-1) 157 157 print*,'le pas Meso est:',pas 158 ! 159 ! 158 159 160 160 !=================================================================== 161 ! 161 162 162 !*** on remplit les champs before avec les champs after du pas *** 163 163 !*** precedent en format gcm *** … … 190 190 & ,hu_mes,hv_mes,hthturb_mes,hqturb_mes & 191 191 & ,ts_fcg,ts_subr,imp_fcg,Turb_fcg) 192 !193 192 194 193 if(Tp_fcg) then … … 203 202 enddo 204 203 endif ! Turb_fcg 205 ! 204 206 205 print*,'ht_mes ',(ht_mes(i),i=1,nblvlm) 207 206 print*,'hq_mes ',(hq_mes(i),i=1,nblvlm) … … 286 285 ts_subr = ((timeaft-time)*tsbef + (time-timebef)*tsaft)/dt 287 286 endif ! temps.ge.pasmax 288 ! 287 289 288 print *,' time,timebef,timeaft',time,timebef,timeaft 290 289 print *,' ht,htbef,htaft,hthturb,hthturbbef,hthturbaft' … … 298 297 & hqturb(j),hqturbbef(j),hqturbaft(j) 299 298 enddo 300 ! 299 301 300 !------------------------------------------------------------------- 302 ! 301 303 302 IF (Ts_fcg) Ts = Ts_subr 304 303 return 305 ! 304 306 305 !----------------------------------------------------------------------- 307 306 ! on sort les champs de "convergence" pour l instant initial 'in' … … 312 311 & imp_fcg,ts_fcg,Tp_fcg,Turb_fcg) 313 312 print*,'le pas itap est:',itap 314 ! 313 315 314 !=================================================================== 316 ! 315 317 316 write(*,'(a)') 'OPEN '//file_forctl 318 317 open(97,FILE=file_forctl,FORM='FORMATTED') 319 ! 318 320 319 !------------------ 321 320 do i=1,1000 … … 355 354 pasprev=in-1 356 355 time0=dt*pasprev 357 ! 356 358 357 close(98) 359 ! 358 360 359 write(*,'(a)') 'OPEN '//file_fordat 361 360 open(99,FILE=file_fordat,FORM='UNFORMATTED', & … … 371 370 print *, 'get_uvd : rdgrads ->' 372 371 print *, tp_fcg 373 ! 372 374 373 ! following commented out because we have temperature already in ARM case 375 374 ! (otherwise this is the potential temperature ) … … 445 444 close(99) 446 445 close(98) 447 ! 446 448 447 !------------------------------------------------------------------- 449 ! 450 ! 448 449 451 450 100 IF (Ts_fcg) Ts = Ts_subr 452 451 return 453 ! 452 454 453 999 continue 455 454 stop 'erreur lecture, file forcing.ctl' … … 565 564 SUBROUTINE mesolupbis(file_forctl) 566 565 implicit none 567 ! 566 568 567 !ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 569 ! 568 570 569 ! Lecture descripteur des donnees MESO-NH (forcing.ctl): 571 570 ! ------------------------------------------------------- 572 ! 571 573 572 ! Cette subroutine lit dans le fichier de controle "essai.ctl" 574 573 ! et affiche le nombre de niveaux du Meso-NH ainsi que les valeurs 575 574 ! des pressions en milieu de couche du Meso-NH (en Pa puis en hPa). 576 575 !ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 577 ! 576 578 577 INTEGER nblvlm !nombre de niveau de pression du mesoNH 579 578 REAL playm(100) !pression en Pa milieu de chaque couche Meso-NH … … 591 590 lu=9 592 591 open(lu,file=file_forctl,form='formatted') 593 ! 592 594 593 do i=1,1000 595 594 read(lu,1000,end=999) a 596 595 if (a .eq. 'ZDEF') go to 100 597 596 enddo 598 ! 597 599 598 100 backspace(lu) 600 599 print*,' DESCRIPTION DES 2 MODELES : ' 601 600 print*,' ' 602 ! 601 603 602 read(lu,2000) aaa 604 603 2000 format (a80) … … 607 606 read(anblvl,*) nblvlm 608 607 609 !610 608 print*,'nbre de niveaux de pression Meso-NH :',nblvlm 611 609 print*,' ' 612 610 print*,'pression en Pa de chaque couche du meso-NH :' 613 ! 611 614 612 read(lu,*) (playm(mlz),mlz=1,nblvlm) 615 613 ! Si la pression est en HPa, la multiplier par 100 … … 620 618 endif 621 619 print*,(playm(mlz),mlz=1,nblvlm) 622 ! 620 623 621 1000 format (a4) 624 622 1001 format(5x,i2) 625 ! 623 626 624 print*,' ' 627 625 do mlzh=1,nblvlm 628 626 hplaym(mlzh)=playm(mlzh)/100. 629 627 enddo 630 ! 628 631 629 print*,'pression en hPa de chaque couche du meso-NH: ' 632 630 print*,(hplaym(mlzh),mlzh=1,nblvlm) 633 ! 631 634 632 close (lu) 635 633 return 636 ! 634 637 635 999 stop 'erreur lecture des niveaux pression des donnees' 638 636 end … … 645 643 real hthtur(nl),hqtur(nl) 646 644 real ts 647 ! 645 648 646 INTEGER k 649 ! 647 650 648 LOGICAL imp_fcg,ts_fcg,Turb_fcg 651 ! 649 652 650 icomp = icount 653 ! 654 ! 651 652 655 653 do k=1,nl 656 654 icomp=icomp+1 … … 667 665 read(itape,rec=icomp)hQ(k) 668 666 enddo 669 ! 667 670 668 if(turb_fcg) then 671 669 do k=1,nl … … 679 677 endif 680 678 print *,' apres lecture hthtur, hqtur' 681 ! 679 682 680 if(imp_fcg) then 683 681 … … 692 690 693 691 endif 694 ! 692 695 693 do k=1,nl 696 694 icomp=icomp+1 697 695 read(itape,rec=icomp)hw(k) 698 696 enddo 699 ! 697 700 698 if(ts_fcg) then 701 699 icomp=icomp+1 702 700 read(itape,rec=icomp)ts 703 701 endif 704 ! 702 705 703 print *,' rdgrads ->' 706 704 … … 756 754 endif 757 755 enddo 758 ! 756 759 757 !c if (play(klev) .le. playm(nblvlm)) then 760 758 !c mlz=nblvlm-1 … … 765 763 !c * /(playm(mlz+1)-playm(mlz)) 766 764 !c endif 767 ! 765 768 766 print*,' ' 769 767 print*,' INTERPOLATION : ' … … 779 777 print*,'valeurs du deuxieme coef d"interpolation pour les 9 niveaux:' 780 778 print*,(coef2(k),k=1,klev) 781 ! 779 782 780 return 783 781 end … … 821 819 END 822 820 CHARACTER*(*) FUNCTION SPACES(STR,NSPACE) 823 ! 821 824 822 ! CERN PROGLIB# M433 SPACES .VERSION KERNFOR 4.14 860211 825 823 ! ORIG. 6/05/86 M.GOOSSENS/DD 826 ! 824 827 825 !- The function value SPACES returns the character string STR with 828 826 !- leading blanks removed and each occurence of one or more blanks 829 827 !- replaced by NSPACE blanks inside the string STR 830 ! 828 831 829 CHARACTER*(*) STR 832 ! 830 833 831 LENSPA = LEN(SPACES) 834 832 SPACES = ' ' … … 853 851 999 END 854 852 FUNCTION INDEXC(STR,SSTR) 855 ! 853 856 854 ! CERN PROGLIB# M433 INDEXC .VERSION KERNFOR 4.14 860211 857 855 ! ORIG. 26/03/86 M.GOOSSENS/DD 858 ! 856 859 857 !- Find the leftmost position where substring SSTR does not match 860 858 !- string STR scanning forward 861 ! 859 862 860 CHARACTER*(*) STR,SSTR 863 ! 861 864 862 LENS = LEN(STR) 865 863 LENSS = LEN(SSTR) 866 ! 864 867 865 DO 10 I=1,LENS-LENSS+1 868 866 IF (STR(I:I+LENSS-1).NE.SSTR) THEN … … 872 870 10 CONTINUE 873 871 INDEXC = 0 874 ! 872 875 873 999 END -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/compar1d.h
r3888 r5099 1 ! 1 2 2 ! $Id: compar1d.h 2010-08-04 17:02:56Z lahellec $ 3 ! 3 4 4 integer :: forcing_type 5 5 integer :: tend_u,tend_v,tend_w,tend_t,tend_q,tend_rayo -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/lmdz1d.F90
r4603 r5099 1 ! 1 2 2 ! $Id$ 3 ! 3 4 4 !#ifdef CPP_1D 5 5 !#include "../dyn3d/mod_const_mpi.F90" -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_amma_read.F90
r5093 r5099 352 352 !--------------------------------------------------------------------------------------- 353 353 ! Time interpolation of a 2D field to the timestep corresponding to day 354 ! 354 355 355 ! day: current julian day (e.g. 717538.2) 356 356 ! day1: first day of the simulation -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_cases_read.F90
r5088 r5099 823 823 !--------------------------------------------------------------------------------------- 824 824 ! Time interpolation of a 2D field to the timestep corresponding to day 825 ! 825 826 826 ! day: current julian day (e.g. 717538.2) 827 827 ! day1: first day of the simulation -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_cases_read2.F90
r5088 r5099 1 ! 1 2 2 ! $Id: mod_1D_cases_read.F90 2373 2015-10-13 17:28:01Z jyg $ 3 ! 3 4 4 MODULE mod_1D_cases_read2 5 5 USE netcdf, ONLY: nf90_get_var,nf90_noerr,nf90_inq_varid,nf90_inquire_dimension,nf90_strerror,nf90_open,& … … 372 372 else 373 373 allocate(time_val(nt_cas)) 374 ierr = NF90_GET_VAR(nid,timeid,time_val)374 ierr = nf90_get_var(nid,timeid,time_val) 375 375 if(ierr/=nf90_noerr) then 376 376 print *,'Pb a la lecture de time cas.nc: ' … … 582 582 print *,'Dans read_cas2, on va lire ',var3didin(i),name_var(i) 583 583 if(i<=35) then 584 ierr = NF90_GET_VAR(nid,var3didin(i),resul, count = [1, 1, nlevel, ntime])584 ierr = nf90_get_var(nid,var3didin(i),resul, count = [1, 1, nlevel, ntime]) 585 585 print *,'Dans read_cas2, on a lu ',ierr,var3didin(i),name_var(i) 586 586 if(ierr/=nf90_noerr) then … … 590 590 else 591 591 print *,'Dans read_cas2, on a lu ',ierr,var3didin(i),name_var(i) 592 ierr = NF90_GET_VAR(nid,var3didin(i),resul1, count = [1, 1, ntime])592 ierr = nf90_get_var(nid,var3didin(i),resul1, count = [1, 1, ntime]) 593 593 if(ierr/=nf90_noerr) then 594 594 print *,'Pb a la lecture de cas.nc: ',name_var(i) … … 702 702 !----------------------------------------------------------------------- 703 703 if(i<=4) then ! Lecture des coord pression en (nlevelp1,lat,lon) 704 ierr = NF90_GET_VAR(nid,var3didin(i),apbp, count = [1, 1, nlevel + 1])704 ierr = nf90_get_var(nid,var3didin(i),apbp, count = [1, 1, nlevel + 1]) 705 705 print *,'read2_cas(apbp), on a lu ',i,name_var(i) 706 706 if(ierr/=nf90_noerr) then … … 710 710 !----------------------------------------------------------------------- 711 711 else if(i>4.and.i<=45) then ! Lecture des variables en (time,nlevel,lat,lon) 712 ierr = NF90_GET_VAR(nid,var3didin(i),resul, count = [1, 1, nlevel, ntime])712 ierr = nf90_get_var(nid,var3didin(i),resul, count = [1, 1, nlevel, ntime]) 713 713 print *,'read2_cas(resul), on a lu ',i,name_var(i) 714 714 if(ierr/=nf90_noerr) then … … 718 718 !----------------------------------------------------------------------- 719 719 else if (i>45.and.i<=51) then ! Lecture des variables en (time,lat,lon) 720 ierr = NF90_GET_VAR(nid,var3didin(i),resul2, count = [1, 1, ntime])720 ierr = nf90_get_var(nid,var3didin(i),resul2, count = [1, 1, ntime]) 721 721 print *,'read2_cas(resul2), on a lu ',i,name_var(i) 722 722 if(ierr/=nf90_noerr) then … … 726 726 !----------------------------------------------------------------------- 727 727 else ! Lecture des constantes (lat,lon) 728 ierr = NF90_GET_VAR(nid,var3didin(i),resul3)728 ierr = nf90_get_var(nid,var3didin(i),resul3) 729 729 print *,'read2_cas(resul3), on a lu ',i,name_var(i) 730 730 if(ierr/=nf90_noerr) then … … 877 877 !----------------------------------------------------------------------- 878 878 if(i<=4) then ! Lecture des coord pression en (nlevelp1,lat,lon) 879 ierr = NF90_GET_VAR(nid,var3didin(i),apbp)879 ierr = nf90_get_var(nid,var3didin(i),apbp) 880 880 print *,'read2_cas(apbp), on a lu ',i,name_var(i) 881 881 if(ierr/=nf90_noerr) then … … 885 885 !----------------------------------------------------------------------- 886 886 else if(i>4.and.i<=12) then ! Lecture des variables en (time,nlevel,lat,lon) 887 ierr = NF90_GET_VAR(nid,var3didin(i),resul1)887 ierr = nf90_get_var(nid,var3didin(i),resul1) 888 888 print *,'read2_cas(resul1), on a lu ',i,name_var(i) 889 889 if(ierr/=nf90_noerr) then … … 894 894 !----------------------------------------------------------------------- 895 895 else if(i>12.and.i<=54) then ! Lecture des variables en (time,nlevel,lat,lon) 896 ierr = NF90_GET_VAR(nid,var3didin(i),resul)896 ierr = nf90_get_var(nid,var3didin(i),resul) 897 897 print *,'read2_cas(resul), on a lu ',i,name_var(i) 898 898 if(ierr/=nf90_noerr) then … … 903 903 !----------------------------------------------------------------------- 904 904 else if (i>54.and.i<=65) then ! Lecture des variables en (time,lat,lon) 905 ierr = NF90_GET_VAR(nid,var3didin(i),resul2)905 ierr = nf90_get_var(nid,var3didin(i),resul2) 906 906 print *,'read2_cas(resul2), on a lu ',i,name_var(i) 907 907 if(ierr/=nf90_noerr) then … … 912 912 !----------------------------------------------------------------------- 913 913 else ! Lecture des constantes (lat,lon) 914 ierr = NF90_GET_VAR(nid,var3didin(i),resul3)914 ierr = nf90_get_var(nid,var3didin(i),resul3) 915 915 print *,'read2_cas(resul3), on a lu ',i,name_var(i) 916 916 if(ierr/=nf90_noerr) then … … 1042 1042 !--------------------------------------------------------------------------------------- 1043 1043 ! Time interpolation of a 2D field to the timestep corresponding to day 1044 ! 1044 1045 1045 ! day: current julian day (e.g. 717538.2) 1046 1046 ! day1: first day of the simulation … … 1235 1235 ,lat_cas,sens_cas,ustar_cas & 1236 1236 ,uw_cas,vw_cas,q1_cas,q2_cas,tke_cas & 1237 ! 1237 1238 1238 ,ts_prof_cas,plev_prof_cas,t_prof_cas,theta_prof_cas & 1239 1239 ,thv_prof_cas,thl_prof_cas,qv_prof_cas,ql_prof_cas,qi_prof_cas & … … 1251 1251 !--------------------------------------------------------------------------------------- 1252 1252 ! Time interpolation of a 2D field to the timestep corresponding to day 1253 ! 1253 1254 1254 ! day: current julian day (e.g. 717538.2) 1255 1255 ! day1: first day of the simulation -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_cases_read_std.F90
r5088 r5099 1 ! 1 2 2 ! $Id: mod_1D_cases_read.F90 2373 2015-10-13 17:28:01Z jyg $ 3 ! 3 4 4 MODULE mod_1D_cases_read_std 5 5 USE netcdf, ONLY:nf90_noerr,nf90_inq_varid,nf90_inq_dimid,nf90_inquire_dimension,nf90_open,nf90_nowrite,& … … 147 147 else 148 148 allocate(time_val(nt_cas)) 149 ierr = NF90_GET_VAR(nid,timeid,time_val)149 ierr = nf90_get_var(nid,timeid,time_val) 150 150 if(ierr/=nf90_noerr) then 151 151 print *,'A Pb a la lecture de time cas.nc: ' … … 454 454 !----------------------------------------------------------------------- 455 455 if(i<=4) then 456 ierr = NF90_GET_VAR(nid,var3didin(i),apbp)456 ierr = nf90_get_var(nid,var3didin(i),apbp) 457 457 print *,'read_SCM(apbp), on a lu ',i,name_var(i) 458 458 if(ierr/=nf90_noerr) then … … 465 465 !----------------------------------------------------------------------- 466 466 else if(i>4.and.i<=12) then 467 ierr = NF90_GET_VAR(nid,var3didin(i),resul1)467 ierr = nf90_get_var(nid,var3didin(i),resul1) 468 468 print *,'read_SCM(resul1), on a lu ',i,name_var(i) 469 469 if(ierr/=nf90_noerr) then … … 478 478 !----------------------------------------------------------------------- 479 479 else if(i>12.and.i<=61) then 480 ierr = NF90_GET_VAR(nid,var3didin(i),resul)480 ierr = nf90_get_var(nid,var3didin(i),resul) 481 481 print *,'read_SCM(resul), on a lu ',i,name_var(i) 482 482 if(ierr/=nf90_noerr) then … … 490 490 !----------------------------------------------------------------------- 491 491 else if (i>62.and.i<=75) then 492 ierr = NF90_GET_VAR(nid,var3didin(i),resul2)492 ierr = nf90_get_var(nid,var3didin(i),resul2) 493 493 print *,'read_SCM(resul2), on a lu ',i,name_var(i) 494 494 if(ierr/=nf90_noerr) then … … 502 502 !----------------------------------------------------------------------- 503 503 else 504 ierr = NF90_GET_VAR(nid,var3didin(i),resul3)504 ierr = nf90_get_var(nid,var3didin(i),resul3) 505 505 print *,'read_SCM(resul3), on a lu ',i,name_var(i) 506 506 if(ierr/=nf90_noerr) then … … 640 640 ,lat_cas,sens_cas,ustar_cas & 641 641 ,uw_cas,vw_cas,q1_cas,q2_cas,tkes_cas & 642 ! 642 643 643 ,ts_prof_cas,tskin_prof_cas,ps_prof_cas,plev_prof_cas,t_prof_cas,theta_prof_cas & 644 644 ,thv_prof_cas,thl_prof_cas,qv_prof_cas,ql_prof_cas,qi_prof_cas & … … 662 662 !--------------------------------------------------------------------------------------- 663 663 ! Time interpolation of a 2D field to the timestep corresponding to day 664 ! 664 665 665 ! day: current julian day (e.g. 717538.2) 666 666 ! day1: first day of the simulation … … 919 919 ,dt_prof_cas,ht_prof_cas,vt_prof_cas,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas & 920 920 ,dth_prof_cas,hth_prof_cas,vth_prof_cas & 921 ! 921 922 922 ,t_mod_cas,theta_mod_cas,thv_mod_cas,thl_mod_cas & 923 923 ,qv_mod_cas,ql_mod_cas,qi_mod_cas,u_mod_cas,v_mod_cas & -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_1DUTILS_read_interp.h
r5088 r5099 314 314 enddo 315 315 316 ierr = NF90_GET_VAR(nid,var3didin(1),lat)316 ierr = nf90_get_var(nid,var3didin(1),lat) 317 317 if(ierr/=nf90_noerr) then 318 318 write(*,*) nf90_strerror(ierr) … … 321 321 ! write(*,*)'lecture lat ok',lat 322 322 323 ierr = NF90_GET_VAR(nid,var3didin(2),lon)323 ierr = nf90_get_var(nid,var3didin(2),lon) 324 324 if(ierr/=nf90_noerr) then 325 325 write(*,*) nf90_strerror(ierr) … … 328 328 ! write(*,*)'lecture lon ok',lon 329 329 330 ierr = NF90_GET_VAR(nid,var3didin(3),alt)330 ierr = nf90_get_var(nid,var3didin(3),alt) 331 331 if(ierr/=nf90_noerr) then 332 332 write(*,*) nf90_strerror(ierr) … … 335 335 ! write(*,*)'lecture alt ok',alt 336 336 337 ierr = NF90_GET_VAR(nid,var3didin(4),phis)337 ierr = nf90_get_var(nid,var3didin(4),phis) 338 338 if(ierr/=nf90_noerr) then 339 339 write(*,*) nf90_strerror(ierr) … … 342 342 ! write(*,*)'lecture phis ok',phis 343 343 344 ierr = NF90_GET_VAR(nid,var3didin(5),T)344 ierr = nf90_get_var(nid,var3didin(5),T) 345 345 if(ierr/=nf90_noerr) then 346 346 write(*,*) nf90_strerror(ierr) … … 349 349 ! write(*,*)'lecture T ok' 350 350 351 ierr = NF90_GET_VAR(nid,var3didin(6),q)351 ierr = nf90_get_var(nid,var3didin(6),q) 352 352 if(ierr/=nf90_noerr) then 353 353 write(*,*) nf90_strerror(ierr) … … 361 361 enddo 362 362 enddo 363 ierr = NF90_GET_VAR(nid,var3didin(7),u)363 ierr = nf90_get_var(nid,var3didin(7),u) 364 364 if(ierr/=nf90_noerr) then 365 365 write(*,*) nf90_strerror(ierr) … … 368 368 ! write(*,*)'lecture u ok' 369 369 370 ierr = NF90_GET_VAR(nid,var3didin(8),v)370 ierr = nf90_get_var(nid,var3didin(8),v) 371 371 if(ierr/=nf90_noerr) then 372 372 write(*,*) nf90_strerror(ierr) … … 375 375 ! write(*,*)'lecture v ok' 376 376 377 ierr = NF90_GET_VAR(nid,var3didin(9),omega)377 ierr = nf90_get_var(nid,var3didin(9),omega) 378 378 if(ierr/=nf90_noerr) then 379 379 write(*,*) nf90_strerror(ierr) … … 388 388 enddo 389 389 390 ierr = NF90_GET_VAR(nid,var3didin(10),div)390 ierr = nf90_get_var(nid,var3didin(10),div) 391 391 if(ierr/=nf90_noerr) then 392 392 write(*,*) nf90_strerror(ierr) … … 395 395 ! write(*,*)'lecture div ok' 396 396 397 ierr = NF90_GET_VAR(nid,var3didin(11),T_adv_h)397 ierr = nf90_get_var(nid,var3didin(11),T_adv_h) 398 398 if(ierr/=nf90_noerr) then 399 399 write(*,*) nf90_strerror(ierr) … … 409 409 410 410 411 ierr = NF90_GET_VAR(nid,var3didin(12),T_adv_v)411 ierr = nf90_get_var(nid,var3didin(12),T_adv_v) 412 412 if(ierr/=nf90_noerr) then 413 413 write(*,*) nf90_strerror(ierr) … … 422 422 enddo 423 423 424 ierr = NF90_GET_VAR(nid,var3didin(13),q_adv_h)424 ierr = nf90_get_var(nid,var3didin(13),q_adv_h) 425 425 if(ierr/=nf90_noerr) then 426 426 write(*,*) nf90_strerror(ierr) … … 436 436 437 437 438 ierr = NF90_GET_VAR(nid,var3didin(14),q_adv_v)438 ierr = nf90_get_var(nid,var3didin(14),q_adv_v) 439 439 if(ierr/=nf90_noerr) then 440 440 write(*,*) nf90_strerror(ierr) … … 450 450 451 451 452 ierr = NF90_GET_VAR(nid,var3didin(15),s)453 if(ierr/=nf90_noerr) then 454 write(*,*) nf90_strerror(ierr) 455 stop "getvarup" 456 endif 457 458 ierr = NF90_GET_VAR(nid,var3didin(16),s_adv_h)459 if(ierr/=nf90_noerr) then 460 write(*,*) nf90_strerror(ierr) 461 stop "getvarup" 462 endif 463 464 ierr = NF90_GET_VAR(nid,var3didin(17),s_adv_v)465 if(ierr/=nf90_noerr) then 466 write(*,*) nf90_strerror(ierr) 467 stop "getvarup" 468 endif 469 470 ierr = NF90_GET_VAR(nid,var3didin(18),p_srf_aver)471 if(ierr/=nf90_noerr) then 472 write(*,*) nf90_strerror(ierr) 473 stop "getvarup" 474 endif 475 476 ierr = NF90_GET_VAR(nid,var3didin(19),p_srf_center)477 if(ierr/=nf90_noerr) then 478 write(*,*) nf90_strerror(ierr) 479 stop "getvarup" 480 endif 481 482 ierr = NF90_GET_VAR(nid,var3didin(20),T_srf)452 ierr = nf90_get_var(nid,var3didin(15),s) 453 if(ierr/=nf90_noerr) then 454 write(*,*) nf90_strerror(ierr) 455 stop "getvarup" 456 endif 457 458 ierr = nf90_get_var(nid,var3didin(16),s_adv_h) 459 if(ierr/=nf90_noerr) then 460 write(*,*) nf90_strerror(ierr) 461 stop "getvarup" 462 endif 463 464 ierr = nf90_get_var(nid,var3didin(17),s_adv_v) 465 if(ierr/=nf90_noerr) then 466 write(*,*) nf90_strerror(ierr) 467 stop "getvarup" 468 endif 469 470 ierr = nf90_get_var(nid,var3didin(18),p_srf_aver) 471 if(ierr/=nf90_noerr) then 472 write(*,*) nf90_strerror(ierr) 473 stop "getvarup" 474 endif 475 476 ierr = nf90_get_var(nid,var3didin(19),p_srf_center) 477 if(ierr/=nf90_noerr) then 478 write(*,*) nf90_strerror(ierr) 479 stop "getvarup" 480 endif 481 482 ierr = nf90_get_var(nid,var3didin(20),T_srf) 483 483 if(ierr/=nf90_noerr) then 484 484 write(*,*) nf90_strerror(ierr) … … 530 530 endif 531 531 532 ierr = NF90_GET_VAR(nid,timevar,time)533 ierr = NF90_GET_VAR(nid,levvar,lev)532 ierr = nf90_get_var(nid,timevar,time) 533 ierr = nf90_get_var(nid,levvar,lev) 534 534 535 535 return … … 943 943 !--------------------------------------------------------------------------------------- 944 944 ! Time interpolation of a 2D field to the timestep corresponding to day 945 ! 945 946 946 ! day: current julian day (e.g. 717538.2) 947 947 ! day1: first day of the simulation … … 1462 1462 !--------------------------------------------------------------------------------------- 1463 1463 ! Time interpolation of a 2D field to the timestep corresponding to day 1464 ! 1464 1465 1465 ! day: current julian day (e.g. 717538.2) 1466 1466 ! day1: first day of the simulation … … 1554 1554 !--------------------------------------------------------------------------------------- 1555 1555 ! Time interpolation of a 2D field to the timestep corresponding to day 1556 ! 1556 1557 1557 ! day: current julian day (e.g. 717538.2) 1558 1558 ! day1: first day of the simulation … … 1696 1696 !--------------------------------------------------------------------------------------- 1697 1697 ! Time interpolation of a 2D field to the timestep corresponding to day 1698 ! 1698 1699 1699 ! day: current julian day (e.g. 717538.2) 1700 1700 ! day1: first day of the simulation … … 1809 1809 !--------------------------------------------------------------------------------------- 1810 1810 ! Time interpolation of a 2D field to the timestep corresponding to day 1811 ! 1811 1812 1812 ! day: current julian day 1813 1813 ! day1: first day of the simulation … … 1896 1896 !--------------------------------------------------------------------------------------- 1897 1897 ! Time interpolation of a 2D field to the timestep corresponding to day 1898 ! 1898 1899 1899 ! day: current julian day (e.g. 717538.2) 1900 1900 ! day1: first day of the simulation … … 2279 2279 ! call catchaxis(nid,ntime,nlevel,time,z,ierr) 2280 2280 2281 ierr = NF90_GET_VAR(nid,var3didin(1),zz)2281 ierr = nf90_get_var(nid,var3didin(1),zz) 2282 2282 if(ierr/=nf90_noerr) then 2283 2283 write(*,*) nf90_strerror(ierr) … … 2286 2286 ! write(*,*)'lecture z ok',zz 2287 2287 2288 ierr = NF90_GET_VAR(nid,var3didin(2),thl)2288 ierr = nf90_get_var(nid,var3didin(2),thl) 2289 2289 if(ierr/=nf90_noerr) then 2290 2290 write(*,*) nf90_strerror(ierr) … … 2293 2293 ! write(*,*)'lecture thl ok',thl 2294 2294 2295 ierr = NF90_GET_VAR(nid,var3didin(3),qt)2295 ierr = nf90_get_var(nid,var3didin(3),qt) 2296 2296 if(ierr/=nf90_noerr) then 2297 2297 write(*,*) nf90_strerror(ierr) … … 2300 2300 ! write(*,*)'lecture qt ok',qt 2301 2301 2302 ierr = NF90_GET_VAR(nid,var3didin(4),u)2302 ierr = nf90_get_var(nid,var3didin(4),u) 2303 2303 if(ierr/=nf90_noerr) then 2304 2304 write(*,*) nf90_strerror(ierr) … … 2307 2307 ! write(*,*)'lecture u ok',u 2308 2308 2309 ierr = NF90_GET_VAR(nid,var3didin(5),v)2309 ierr = nf90_get_var(nid,var3didin(5),v) 2310 2310 if(ierr/=nf90_noerr) then 2311 2311 write(*,*) nf90_strerror(ierr) … … 2314 2314 ! write(*,*)'lecture v ok',v 2315 2315 2316 ierr = NF90_GET_VAR(nid,var3didin(6),tke)2316 ierr = nf90_get_var(nid,var3didin(6),tke) 2317 2317 if(ierr/=nf90_noerr) then 2318 2318 write(*,*) nf90_strerror(ierr) … … 2321 2321 ! write(*,*)'lecture tke ok',tke 2322 2322 2323 ierr = NF90_GET_VAR(nid,var3didin(7),ug)2323 ierr = nf90_get_var(nid,var3didin(7),ug) 2324 2324 if(ierr/=nf90_noerr) then 2325 2325 write(*,*) nf90_strerror(ierr) … … 2328 2328 ! write(*,*)'lecture ug ok',ug 2329 2329 2330 ierr = NF90_GET_VAR(nid,var3didin(8),vg)2330 ierr = nf90_get_var(nid,var3didin(8),vg) 2331 2331 if(ierr/=nf90_noerr) then 2332 2332 write(*,*) nf90_strerror(ierr) … … 2335 2335 ! write(*,*)'lecture vg ok',vg 2336 2336 2337 ierr = NF90_GET_VAR(nid,var3didin(9),wls)2337 ierr = nf90_get_var(nid,var3didin(9),wls) 2338 2338 if(ierr/=nf90_noerr) then 2339 2339 write(*,*) nf90_strerror(ierr) … … 2342 2342 ! write(*,*)'lecture wls ok',wls 2343 2343 2344 ierr = NF90_GET_VAR(nid,var3didin(10),dqtdx)2344 ierr = nf90_get_var(nid,var3didin(10),dqtdx) 2345 2345 if(ierr/=nf90_noerr) then 2346 2346 write(*,*) nf90_strerror(ierr) … … 2349 2349 ! write(*,*)'lecture dqtdx ok',dqtdx 2350 2350 2351 ierr = NF90_GET_VAR(nid,var3didin(11),dqtdy)2351 ierr = nf90_get_var(nid,var3didin(11),dqtdy) 2352 2352 if(ierr/=nf90_noerr) then 2353 2353 write(*,*) nf90_strerror(ierr) … … 2356 2356 ! write(*,*)'lecture dqtdy ok',dqtdy 2357 2357 2358 ierr = NF90_GET_VAR(nid,var3didin(12),dqtdt)2358 ierr = nf90_get_var(nid,var3didin(12),dqtdt) 2359 2359 if(ierr/=nf90_noerr) then 2360 2360 write(*,*) nf90_strerror(ierr) … … 2363 2363 ! write(*,*)'lecture dqtdt ok',dqtdt 2364 2364 2365 ierr = NF90_GET_VAR(nid,var3didin(13),thl_rad)2365 ierr = nf90_get_var(nid,var3didin(13),thl_rad) 2366 2366 if(ierr/=nf90_noerr) then 2367 2367 write(*,*) nf90_strerror(ierr) … … 2549 2549 ! call catchaxis(nid,ntime,nlevel,time,z,ierr) 2550 2550 2551 ierr = NF90_GET_VAR(nid,var3didin(1),zz)2551 ierr = nf90_get_var(nid,var3didin(1),zz) 2552 2552 if(ierr/=nf90_noerr) then 2553 2553 write(*,*) nf90_strerror(ierr) … … 2556 2556 ! write(*,*)'lecture zz ok',zz 2557 2557 2558 ierr = NF90_GET_VAR(nid,var3didin(11),pres)2558 ierr = nf90_get_var(nid,var3didin(11),pres) 2559 2559 if(ierr/=nf90_noerr) then 2560 2560 write(*,*) nf90_strerror(ierr) … … 2563 2563 ! write(*,*)'lecture pres ok',pres 2564 2564 2565 ierr = NF90_GET_VAR(nid,var3didin(12),th)2565 ierr = nf90_get_var(nid,var3didin(12),th) 2566 2566 if(ierr/=nf90_noerr) then 2567 2567 write(*,*) nf90_strerror(ierr) … … 2573 2573 enddo 2574 2574 2575 ierr = NF90_GET_VAR(nid,var3didin(13),qv)2575 ierr = nf90_get_var(nid,var3didin(13),qv) 2576 2576 if(ierr/=nf90_noerr) then 2577 2577 write(*,*) nf90_strerror(ierr) … … 2580 2580 ! write(*,*)'lecture qv ok',qv 2581 2581 2582 ierr = NF90_GET_VAR(nid,var3didin(14),u)2582 ierr = nf90_get_var(nid,var3didin(14),u) 2583 2583 if(ierr/=nf90_noerr) then 2584 2584 write(*,*) nf90_strerror(ierr) … … 2587 2587 ! write(*,*)'lecture u ok',u 2588 2588 2589 ierr = NF90_GET_VAR(nid,var3didin(15),v)2589 ierr = nf90_get_var(nid,var3didin(15),v) 2590 2590 if(ierr/=nf90_noerr) then 2591 2591 write(*,*) nf90_strerror(ierr) … … 2594 2594 ! write(*,*)'lecture v ok',v 2595 2595 2596 ierr = NF90_GET_VAR(nid,var3didin(16),o3)2596 ierr = nf90_get_var(nid,var3didin(16),o3) 2597 2597 if(ierr/=nf90_noerr) then 2598 2598 write(*,*) nf90_strerror(ierr) … … 2601 2601 ! write(*,*)'lecture o3 ok',o3 2602 2602 2603 ierr = NF90_GET_VAR(nid,var3didin(2),shf)2603 ierr = nf90_get_var(nid,var3didin(2),shf) 2604 2604 if(ierr/=nf90_noerr) then 2605 2605 write(*,*) nf90_strerror(ierr) … … 2608 2608 ! write(*,*)'lecture shf ok',shf 2609 2609 2610 ierr = NF90_GET_VAR(nid,var3didin(3),lhf)2610 ierr = nf90_get_var(nid,var3didin(3),lhf) 2611 2611 if(ierr/=nf90_noerr) then 2612 2612 write(*,*) nf90_strerror(ierr) … … 2615 2615 ! write(*,*)'lecture lhf ok',lhf 2616 2616 2617 ierr = NF90_GET_VAR(nid,var3didin(4),lwup)2617 ierr = nf90_get_var(nid,var3didin(4),lwup) 2618 2618 if(ierr/=nf90_noerr) then 2619 2619 write(*,*) nf90_strerror(ierr) … … 2622 2622 ! write(*,*)'lecture lwup ok',lwup 2623 2623 2624 ierr = NF90_GET_VAR(nid,var3didin(5),swup)2624 ierr = nf90_get_var(nid,var3didin(5),swup) 2625 2625 if(ierr/=nf90_noerr) then 2626 2626 write(*,*) nf90_strerror(ierr) … … 2629 2629 ! write(*,*)'lecture swup ok',swup 2630 2630 2631 ierr = NF90_GET_VAR(nid,var3didin(6),tg)2631 ierr = nf90_get_var(nid,var3didin(6),tg) 2632 2632 if(ierr/=nf90_noerr) then 2633 2633 write(*,*) nf90_strerror(ierr) … … 2636 2636 ! write(*,*)'lecture tg ok',tg 2637 2637 2638 ierr = NF90_GET_VAR(nid,var3didin(7),ustar)2638 ierr = nf90_get_var(nid,var3didin(7),ustar) 2639 2639 if(ierr/=nf90_noerr) then 2640 2640 write(*,*) nf90_strerror(ierr) … … 2643 2643 ! write(*,*)'lecture ustar ok',ustar 2644 2644 2645 ierr = NF90_GET_VAR(nid,var3didin(8),psurf)2645 ierr = nf90_get_var(nid,var3didin(8),psurf) 2646 2646 if(ierr/=nf90_noerr) then 2647 2647 write(*,*) nf90_strerror(ierr) … … 2650 2650 ! write(*,*)'lecture psurf ok',psurf 2651 2651 2652 ierr = NF90_GET_VAR(nid,var3didin(9),ug)2652 ierr = nf90_get_var(nid,var3didin(9),ug) 2653 2653 if(ierr/=nf90_noerr) then 2654 2654 write(*,*) nf90_strerror(ierr) … … 2657 2657 ! write(*,*)'lecture ug ok',ug 2658 2658 2659 ierr = NF90_GET_VAR(nid,var3didin(10),vg)2659 ierr = nf90_get_var(nid,var3didin(10),vg) 2660 2660 if(ierr/=nf90_noerr) then 2661 2661 write(*,*) nf90_strerror(ierr) … … 2664 2664 ! write(*,*)'lecture vg ok',vg 2665 2665 2666 ierr = NF90_GET_VAR(nid,var3didin(17),hadvt)2666 ierr = nf90_get_var(nid,var3didin(17),hadvt) 2667 2667 if(ierr/=nf90_noerr) then 2668 2668 write(*,*) nf90_strerror(ierr) … … 2671 2671 ! write(*,*)'lecture hadvt ok',hadvt 2672 2672 2673 ierr = NF90_GET_VAR(nid,var3didin(18),hadvq)2673 ierr = nf90_get_var(nid,var3didin(18),hadvq) 2674 2674 if(ierr/=nf90_noerr) then 2675 2675 write(*,*) nf90_strerror(ierr) … … 2678 2678 ! write(*,*)'lecture hadvq ok',hadvq 2679 2679 2680 ierr = NF90_GET_VAR(nid,var3didin(19),hadvu)2680 ierr = nf90_get_var(nid,var3didin(19),hadvu) 2681 2681 if(ierr/=nf90_noerr) then 2682 2682 write(*,*) nf90_strerror(ierr) … … 2685 2685 ! write(*,*)'lecture hadvu ok',hadvu 2686 2686 2687 ierr = NF90_GET_VAR(nid,var3didin(20),hadvv)2687 ierr = nf90_get_var(nid,var3didin(20),hadvv) 2688 2688 if(ierr/=nf90_noerr) then 2689 2689 write(*,*) nf90_strerror(ierr) … … 2692 2692 ! write(*,*)'lecture hadvv ok',hadvv 2693 2693 2694 ierr = NF90_GET_VAR(nid,var3didin(21),w)2694 ierr = nf90_get_var(nid,var3didin(21),w) 2695 2695 if(ierr/=nf90_noerr) then 2696 2696 write(*,*) nf90_strerror(ierr) … … 2699 2699 ! write(*,*)'lecture w ok',w 2700 2700 2701 ierr = NF90_GET_VAR(nid,var3didin(22),omega)2701 ierr = nf90_get_var(nid,var3didin(22),omega) 2702 2702 if(ierr/=nf90_noerr) then 2703 2703 write(*,*) nf90_strerror(ierr) … … 2844 2844 ! call catchaxis(nid,ntime,nlevel,time,z,ierr) 2845 2845 2846 ierr = NF90_GET_VAR(nid,var3didin(1),zz_i)2847 if(ierr/=nf90_noerr) then 2848 write(*,*) nf90_strerror(ierr) 2849 stop "getvarup" 2850 endif 2851 2852 ierr = NF90_GET_VAR(nid,var3didin(2),depth_sn)2853 if(ierr/=nf90_noerr) then 2854 write(*,*) nf90_strerror(ierr) 2855 stop "getvarup" 2856 endif 2857 2858 ierr = NF90_GET_VAR(nid,var3didin(3),ug_i)2859 if(ierr/=nf90_noerr) then 2860 write(*,*) nf90_strerror(ierr) 2861 stop "getvarup" 2862 endif 2863 2864 ierr = NF90_GET_VAR(nid,var3didin(4),vg_i)2865 if(ierr/=nf90_noerr) then 2866 write(*,*) nf90_strerror(ierr) 2867 stop "getvarup" 2868 endif 2869 2870 ierr = NF90_GET_VAR(nid,var3didin(5),pf_i)2871 if(ierr/=nf90_noerr) then 2872 write(*,*) nf90_strerror(ierr) 2873 stop "getvarup" 2874 endif 2875 2876 ierr = NF90_GET_VAR(nid,var3didin(6),th_i)2877 if(ierr/=nf90_noerr) then 2878 write(*,*) nf90_strerror(ierr) 2879 stop "getvarup" 2880 endif 2881 2882 ierr = NF90_GET_VAR(nid,var3didin(7),t_i)2883 if(ierr/=nf90_noerr) then 2884 write(*,*) nf90_strerror(ierr) 2885 stop "getvarup" 2886 endif 2887 2888 ierr = NF90_GET_VAR(nid,var3didin(8),qv_i)2889 if(ierr/=nf90_noerr) then 2890 write(*,*) nf90_strerror(ierr) 2891 stop "getvarup" 2892 endif 2893 2894 ierr = NF90_GET_VAR(nid,var3didin(9),u_i)2895 if(ierr/=nf90_noerr) then 2896 write(*,*) nf90_strerror(ierr) 2897 stop "getvarup" 2898 endif 2899 2900 ierr = NF90_GET_VAR(nid,var3didin(10),v_i)2901 if(ierr/=nf90_noerr) then 2902 write(*,*) nf90_strerror(ierr) 2903 stop "getvarup" 2904 endif 2905 2906 ierr = NF90_GET_VAR(nid,var3didin(11),hadvt_i)2907 if(ierr/=nf90_noerr) then 2908 write(*,*) nf90_strerror(ierr) 2909 stop "getvarup" 2910 endif 2911 2912 ierr = NF90_GET_VAR(nid,var3didin(12),hadvq_i)2913 if(ierr/=nf90_noerr) then 2914 write(*,*) nf90_strerror(ierr) 2915 stop "getvarup" 2916 endif 2917 2918 ierr = NF90_GET_VAR(nid,var3didin(14),tsnow)2919 if(ierr/=nf90_noerr) then 2920 write(*,*) nf90_strerror(ierr) 2921 stop "getvarup" 2922 endif 2923 2924 ierr = NF90_GET_VAR(nid,var3didin(15),snow_dens)2925 if(ierr/=nf90_noerr) then 2926 write(*,*) nf90_strerror(ierr) 2927 stop "getvarup" 2928 endif 2929 2930 ierr = NF90_GET_VAR(nid,var3didin(16),tg)2846 ierr = nf90_get_var(nid,var3didin(1),zz_i) 2847 if(ierr/=nf90_noerr) then 2848 write(*,*) nf90_strerror(ierr) 2849 stop "getvarup" 2850 endif 2851 2852 ierr = nf90_get_var(nid,var3didin(2),depth_sn) 2853 if(ierr/=nf90_noerr) then 2854 write(*,*) nf90_strerror(ierr) 2855 stop "getvarup" 2856 endif 2857 2858 ierr = nf90_get_var(nid,var3didin(3),ug_i) 2859 if(ierr/=nf90_noerr) then 2860 write(*,*) nf90_strerror(ierr) 2861 stop "getvarup" 2862 endif 2863 2864 ierr = nf90_get_var(nid,var3didin(4),vg_i) 2865 if(ierr/=nf90_noerr) then 2866 write(*,*) nf90_strerror(ierr) 2867 stop "getvarup" 2868 endif 2869 2870 ierr = nf90_get_var(nid,var3didin(5),pf_i) 2871 if(ierr/=nf90_noerr) then 2872 write(*,*) nf90_strerror(ierr) 2873 stop "getvarup" 2874 endif 2875 2876 ierr = nf90_get_var(nid,var3didin(6),th_i) 2877 if(ierr/=nf90_noerr) then 2878 write(*,*) nf90_strerror(ierr) 2879 stop "getvarup" 2880 endif 2881 2882 ierr = nf90_get_var(nid,var3didin(7),t_i) 2883 if(ierr/=nf90_noerr) then 2884 write(*,*) nf90_strerror(ierr) 2885 stop "getvarup" 2886 endif 2887 2888 ierr = nf90_get_var(nid,var3didin(8),qv_i) 2889 if(ierr/=nf90_noerr) then 2890 write(*,*) nf90_strerror(ierr) 2891 stop "getvarup" 2892 endif 2893 2894 ierr = nf90_get_var(nid,var3didin(9),u_i) 2895 if(ierr/=nf90_noerr) then 2896 write(*,*) nf90_strerror(ierr) 2897 stop "getvarup" 2898 endif 2899 2900 ierr = nf90_get_var(nid,var3didin(10),v_i) 2901 if(ierr/=nf90_noerr) then 2902 write(*,*) nf90_strerror(ierr) 2903 stop "getvarup" 2904 endif 2905 2906 ierr = nf90_get_var(nid,var3didin(11),hadvt_i) 2907 if(ierr/=nf90_noerr) then 2908 write(*,*) nf90_strerror(ierr) 2909 stop "getvarup" 2910 endif 2911 2912 ierr = nf90_get_var(nid,var3didin(12),hadvq_i) 2913 if(ierr/=nf90_noerr) then 2914 write(*,*) nf90_strerror(ierr) 2915 stop "getvarup" 2916 endif 2917 2918 ierr = nf90_get_var(nid,var3didin(14),tsnow) 2919 if(ierr/=nf90_noerr) then 2920 write(*,*) nf90_strerror(ierr) 2921 stop "getvarup" 2922 endif 2923 2924 ierr = nf90_get_var(nid,var3didin(15),snow_dens) 2925 if(ierr/=nf90_noerr) then 2926 write(*,*) nf90_strerror(ierr) 2927 stop "getvarup" 2928 endif 2929 2930 ierr = nf90_get_var(nid,var3didin(16),tg) 2931 2931 if(ierr/=nf90_noerr) then 2932 2932 write(*,*) nf90_strerror(ierr) -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_1D_interp_cases.h
r3780 r5099 1 ! 1 2 2 ! $Id: 1D_interp_cases.h 3537 2019-06-19 08:29:16Z fhourdin $ 3 ! 3 4 4 !--------------------------------------------------------------------- 5 5 ! Forcing_LES case: constant dq_dyn … … 552 552 553 553 alpha = rd*temp(l)*(1.+(rv/rd-1.)*q(l,1))/play(l) 554 ! 554 555 555 ! d_t_adv(l) = 0.0 556 556 ! d_q_adv(l,1) = 0.0 … … 634 634 635 635 alpha = rd*temp(l)*(1.+(rv/rd-1.)*q(l,1))/play(l) 636 ! 636 637 637 ! d_t_adv(l) = 0.0 638 638 ! d_q_adv(l,1) = 0.0 … … 813 813 flat=lat_prof_cas 814 814 ENDIF 815 ! 815 816 816 IF (ok_prescr_ust) THEN 817 817 ust=ustar_prof_cas … … 841 841 & ,dq_cas,hq_cas,vq_cas,dth_cas,hth_cas,vth_cas,lat_cas,sens_cas,ustar_cas & 842 842 & ,uw_cas,vw_cas,q1_cas,q2_cas,tke_cas & 843 ! 843 844 844 & ,ts_prof_cas,plev_prof_cas,t_prof_cas,theta_prof_cas,thv_prof_cas & 845 845 & ,thl_prof_cas,qv_prof_cas,ql_prof_cas,qi_prof_cas & … … 864 864 & ,dt_prof_cas,ht_prof_cas,vt_prof_cas,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas & 865 865 & ,dth_prof_cas,hth_prof_cas,vth_prof_cas & 866 ! 866 867 867 & ,t_mod_cas,theta_mod_cas,thv_mod_cas,thl_mod_cas,qv_mod_cas,ql_mod_cas,qi_mod_cas & 868 868 & ,u_mod_cas,v_mod_cas,ug_mod_cas,vg_mod_cas,w_mod_cas,omega_mod_cas & … … 1024 1024 print *,'1D_interp: sens,flat',fsens,flat 1025 1025 ENDIF 1026 ! 1026 1027 1027 IF (ok_prescr_ust) THEN 1028 1028 ust=ustar_prof_cas -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_1D_read_forc_cases.h
r4275 r5099 1 ! 1 2 2 ! $Id: 1D_read_forc_cases.h 3537 2019-06-19 08:29:16Z fhourdin $ 3 ! 3 4 4 !---------------------------------------------------------------------- 5 5 ! forcing_les = .T. : Impose a constant cooling … … 394 394 ! vertical interpolation using TOGA interpolation routine: 395 395 ! write(*,*)'avant interp vert', t_proftwp 396 ! 396 397 397 ! CALL interp_dice_time(daytime,day1,annee_ref 398 398 ! i ,year_ini_dice,day_ju_ini_dice,nt_dice,dt_dice … … 508 508 ! vertical interpolation using TOGA interpolation routine: 509 509 ! write(*,*)'avant interp vert', t_proftwp 510 ! 510 511 511 ! CALL interp_dice_time(daytime,day1,annee_ref 512 512 ! i ,year_ini_dice,day_ju_ini_dice,nt_dice,dt_dice … … 542 542 ug(l)=ug_mod(l) 543 543 vg(l)=vg_mod(l) 544 545 ! 544 546 545 ! tg=tsurf 547 !548 546 549 547 print *,'***** tsurf=',tsurf … … 605 603 ! For this case, profiles are given for two vertical resolution 606 604 ! 19 or 40 levels 607 ! 605 608 606 ! Comment from: http://www.knmi.nl/samenw/eurocs/ARM/profiles.html 609 607 ! Note that the initial profiles contain no liquid water! … … 932 930 & ,dq_cas,hq_cas,vq_cas,dth_cas,hth_cas,vth_cas,lat_cas,sens_cas,ustar_cas & 933 931 & ,uw_cas,vw_cas,q1_cas,q2_cas,tke_cas & 934 ! 932 935 933 & ,ts_prof_cas,plev_prof_cas,t_prof_cas,theta_prof_cas,thv_prof_cas & 936 934 & ,thl_prof_cas,qv_prof_cas,ql_prof_cas,qi_prof_cas & … … 955 953 & ,dt_prof_cas,ht_prof_cas,vt_prof_cas,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas & 956 954 & ,dth_prof_cas,hth_prof_cas,vth_prof_cas & 957 ! 955 958 956 & ,t_mod_cas,theta_mod_cas,thv_mod_cas,thl_mod_cas,qv_mod_cas,ql_mod_cas,qi_mod_cas & 959 957 & ,u_mod_cas,v_mod_cas,ug_mod_cas,vg_mod_cas,w_mod_cas,omega_mod_cas & … … 1002 1000 flat=-1.*lat_prof_cas 1003 1001 ENDIF 1004 ! 1002 1005 1003 IF (ok_prescr_ust) THEN 1006 1004 ust=ustar_prof_cas … … 1031 1029 & ,dq_cas,hq_cas,vq_cas,dth_cas,hth_cas,vth_cas,lat_cas,sens_cas,ustar_cas & 1032 1030 & ,uw_cas,vw_cas,q1_cas,q2_cas,tke_cas & 1033 ! 1031 1034 1032 & ,ts_prof_cas,plev_prof_cas,t_prof_cas,theta_prof_cas,thv_prof_cas & 1035 1033 & ,thl_prof_cas,qv_prof_cas,ql_prof_cas,qi_prof_cas & … … 1054 1052 & ,dt_prof_cas,ht_prof_cas,vt_prof_cas,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas & 1055 1053 & ,dth_prof_cas,hth_prof_cas,vth_prof_cas & 1056 ! 1054 1057 1055 & ,t_mod_cas,theta_mod_cas,thv_mod_cas,thl_mod_cas,qv_mod_cas,ql_mod_cas,qi_mod_cas & 1058 1056 & ,u_mod_cas,v_mod_cas,ug_mod_cas,vg_mod_cas,w_mod_cas,omega_mod_cas & … … 1102 1100 flat=-1.*lat_prof_cas 1103 1101 ENDIF 1104 ! 1102 1105 1103 IF (ok_prescr_ust) THEN 1106 1104 ust=ustar_prof_cas -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_lmdz1d.F90
r5087 r5099 1 ! 1 2 2 ! $Id: lmdz1d.F90 3540 2019-06-25 14:50:13Z fairhead $ 3 !4 3 5 4 SUBROUTINE old_lmdz1d … … 164 163 ! DECLARATIONS FOR EACH CASE 165 164 !===================================================================== 166 ! 165 167 166 INCLUDE "old_1D_decl_cases.h" 168 ! 167 169 168 !--------------------------------------------------------------------- 170 169 ! Declarations related to nudging … … 179 178 real :: u_targ(llm) 180 179 real :: v_targ(llm) 181 ! 180 182 181 !--------------------------------------------------------------------- 183 182 ! Declarations related to vertical discretization: … … 258 257 integer jcode 259 258 INTEGER read_climoz 260 ! 259 261 260 integer :: it_end ! iteration number of the last call 262 261 !Al1 263 262 integer ecrit_slab_oc !1=ecrit,-1=lit,0=no file 264 263 data ecrit_slab_oc/-1/ 265 ! 264 266 265 ! if flag_inhib_forcing = 0, tendencies of forcing are added 267 266 ! <> 0, tendencies of forcing are not added … … 365 364 ! use geostrophic wind ug=10m/s vg=0m/s. Duration of the case 53100s 366 365 ! Radiation to be switched off 367 ! 366 368 367 if (forcing_type <=0) THEN 369 368 forcing_les = .true. … … 459 458 if (forcing_toga.or.forcing_sandu.or.forcing_astex .or. forcing_dice) & 460 459 type_ts_forcing = 1 461 ! 460 462 461 ! Initialization of the logical switch for nudging 463 462 jcode = iflag_nudge … … 513 512 endif 514 513 !----------------------------------------------------------------------- 515 ! 514 516 515 !c Date : 517 516 ! La date est supposee donnee sous la forme [annee, numero du jour dans … … 631 630 d_q_nudge(:,:) = 0. 632 631 633 !634 632 ! No ozone climatology need be read in this pre-initialization 635 633 ! (phys_state_var_init is called again in physiq) … … 666 664 rho(1)=psurf/(rd*tsurf*(1.+(rv/rd-1.)*qsurf)) 667 665 668 !669 666 !! mpl et jyg le 22/08/2012 : 670 667 !! pour que les cas a flux de surface imposes marchent … … 718 715 ENDIF 719 716 720 !721 717 !===================================================================== 722 718 ! EVENTUALLY, READ FORCING DATA : … … 743 739 744 740 ! Rq: conf_phys.F90 lit tous les flags de physiq.def; conf_phys appele depuis physiq.F 745 ! 741 746 742 ! day_step, iphysiq lus dans gcm.def ci-dessus 747 743 ! timestep: calcule ci-dessous from rday et day_step … … 757 753 timestep =rday/day_step 758 754 dtime_frcg = timestep 759 ! 755 760 756 zcufi=airefi 761 757 zcvfi=airefi 762 ! 758 763 759 rlat_rad(1)=xlat*rpi/180. 764 760 rlon_rad(1)=xlon*rpi/180. … … 899 895 sig1=0. 900 896 w01=0. 901 ! 897 902 898 wake_deltaq = 0. 903 899 wake_deltat = 0. … … 932 928 !------------------------------------------------------------------------ 933 929 ! Make file containing restart for the physics (startphy.nc) 934 ! 930 935 931 ! NB: List of the variables to be written by phyredem (via put_field): 936 932 ! rlon,rlat,zmasq,pctsrf(:,is_ter),pctsrf(:,is_lic),pctsrf(:,is_oce) … … 943 939 ! wake_deltat,wake_deltaq,wake_s,awake_s,wake_dens,awake_dens,cv_gen,wake_cstar, 944 940 ! wake_fip,wake_delta_pbl_tke(:,1:klev,nsrf) 945 ! 941 946 942 ! NB2: The content of the startphy.nc file depends on some flags defined in 947 943 ! the ".def" files. However, since conf_phys is not called in lmdz1d.F90, these flags have … … 1028 1024 open(97,file='div_slab.dat',STATUS='OLD') 1029 1025 endif 1030 ! 1026 1031 1027 !--------------------------------------------------------------------- 1032 1028 ! Initialize target profile for RHT nudging if needed … … 1038 1034 call nudge_UV_init(plev,play,u,v,u_targ,v_targ) 1039 1035 endif 1040 ! 1036 1041 1037 !===================================================================== 1042 1038 #ifdef OUTPUT_PHYS_SCM … … 1196 1192 cfdt = cos(0.5*fcoriolis*timestep) 1197 1193 ! print *,'fcoriolis,sfdt,cfdt,timestep',fcoriolis,sfdt,cfdt,timestep 1198 ! 1194 1199 1195 du_age(1:mxcalc)= -2.*sfdt/timestep* & 1200 1196 (sfdt*(u(1:mxcalc)-ug(1:mxcalc)) - & 1201 1197 cfdt*(v(1:mxcalc)-vg(1:mxcalc)) ) 1202 1198 !! : fcoriolis*(v(1:mxcalc)-vg(1:mxcalc)) 1203 ! 1199 1204 1200 dv_age(1:mxcalc)= -2.*sfdt/timestep* & 1205 1201 (cfdt*(u(1:mxcalc)-ug(1:mxcalc)) + & 1206 1202 sfdt*(v(1:mxcalc)-vg(1:mxcalc)) ) 1207 1203 !! : -fcoriolis*(u(1:mxcalc)-ug(1:mxcalc)) 1208 ! 1204 1209 1205 !!!!!!!!!!!!!!!!!!!!!!!! 1210 1206 ! Nudging … … 1222 1218 d_u_nudge,d_v_nudge) 1223 1219 endif 1224 ! 1220 1225 1221 if (forcing_fire) THEN 1226 1222 … … 1251 1247 ! call writefield_phy('u_tend' ,u,llm) 1252 1248 ! call writefield_phy('u_g' ,ug,llm) 1253 ! 1249 1254 1250 !!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1255 1251 !! Increment state variables … … 1301 1297 1302 1298 teta=temp*(pzero/play)**rkappa 1303 ! 1299 1304 1300 !--------------------------------------------------------------------- 1305 1301 ! Nudge soil temperature if requested -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/replay1d.F90
r5087 r5099 98 98 ! comments 99 99 !======================================================================= 100 ! 100 101 101 ! Input: modname = name of calling program 102 102 ! message = stuff to print … … 113 113 write(*,*) 'Reason = ',message 114 114 call getin_dump 115 ! 115 116 116 if (ierr == 0) then 117 117 write(*,*) 'Everything is cool' -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/scm.F90
r5087 r5099 128 128 ! DECLARATIONS FOR EACH CASE 129 129 !===================================================================== 130 ! 130 131 131 INCLUDE "1D_decl_cases.h" 132 ! 132 133 133 !--------------------------------------------------------------------- 134 134 ! Declarations related to nudging … … 143 143 real :: u_targ(llm) 144 144 real :: v_targ(llm) 145 ! 145 146 146 !--------------------------------------------------------------------- 147 147 ! Declarations related to vertical discretization: … … 223 223 integer jcode 224 224 INTEGER read_climoz 225 ! 225 226 226 integer :: it_end ! iteration number of the last call 227 227 !Al1,plev,play,phi,phis,presnivs, 228 228 integer ecrit_slab_oc !1=ecrit,-1=lit,0=no file 229 229 data ecrit_slab_oc/-1/ 230 ! 230 231 231 ! if flag_inhib_forcing = 0, tendencies of forcing are added 232 232 ! <> 0, tendencies of forcing are not added … … 287 287 288 288 print*,'NATURE DE LA SURFACE ',nat_surf 289 ! 289 290 290 ! Initialization of the logical switch for nudging 291 291 … … 344 344 endif 345 345 !----------------------------------------------------------------------- 346 ! 346 347 347 !c Date : 348 348 ! La date est supposee donnee sous la forme [annee, numero du jour dans … … 409 409 d_q_nudge(:,:) = 0. 410 410 411 !412 411 ! No ozone climatology need be read in this pre-initialization 413 412 ! (phys_state_var_init is called again in physiq) … … 436 435 rho(1)=psurf/(rd*tsurf*(1.+(rv/rd-1.)*qsurf)) 437 436 438 !439 437 !! mpl et jyg le 22/08/2012 : 440 438 !! pour que les cas a flux de surface imposes marchent … … 484 482 ENDIF 485 483 486 !487 484 !===================================================================== 488 485 ! EVENTUALLY, READ FORCING DATA : … … 503 500 504 501 ! Rq: conf_phys.F90 lit tous les flags de physiq.def; conf_phys appele depuis physiq.F 505 ! 502 506 503 ! day_step, iphysiq lus dans gcm.def ci-dessus 507 504 ! timestep: calcule ci-dessous from rday et day_step … … 519 516 timestep =rday/day_step 520 517 dtime_frcg = timestep 521 ! 518 522 519 zcufi=airefi 523 520 zcvfi=airefi 524 ! 521 525 522 rlat_rad(1)=xlat*rpi/180. 526 523 rlon_rad(1)=xlon*rpi/180. … … 655 652 sig1=0. 656 653 w01=0. 657 ! 654 658 655 wake_deltaq = 0. 659 656 wake_deltat = 0. … … 689 686 !------------------------------------------------------------------------ 690 687 ! Make file containing restart for the physics (startphy.nc) 691 ! 688 692 689 ! NB: List of the variables to be written by phyredem (via put_field): 693 690 ! rlon,rlat,zmasq,pctsrf(:,is_ter),pctsrf(:,is_lic),pctsrf(:,is_oce) … … 700 697 ! wake_deltat,wake_deltaq,wake_s,awake_s,wake_dens,awake_dens,cv_gen,wake_cstar, 701 698 ! wake_fip,wake_delta_pbl_tke(:,1:klev,nsrf) 702 ! 699 703 700 ! NB2: The content of the startphy.nc file depends on some flags defined in 704 701 ! the ".def" files. However, since conf_phys is not called in lmdz1d.F90, these flags have … … 785 782 open(97,file='div_slab.dat',STATUS='OLD') 786 783 endif 787 ! 784 788 785 !===================================================================== 789 786 #ifdef OUTPUT_PHYS_SCM … … 927 924 cfdt*(v(1:mxcalc)-vg(1:mxcalc)) ) 928 925 !! : fcoriolis*(v(1:mxcalc)-vg(1:mxcalc)) 929 ! 926 930 927 d_v_age(1:mxcalc)= -2.*sfdt/timestep* & 931 928 (cfdt*(u(1:mxcalc)-ug(1:mxcalc)) + & … … 933 930 !! : -fcoriolis*(u(1:mxcalc)-ug(1:mxcalc)) 934 931 ENDIF 935 ! 932 936 933 !--------------------------------------------------------------------- 937 934 ! Nudging
Note: See TracChangeset
for help on using the changeset viewer.