Changeset 4064
- Timestamp:
- Jan 25, 2022, 7:14:39 PM (3 years ago)
- Location:
- LMDZ6/trunk/libf
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/dyn3d/advtrac.F90
r4056 r4064 43 43 ! Variables locales 44 44 !--------------------------------------------------------------------------- 45 INTEGER :: ij, l, iq, i iq, iadv46 REAL(KIND=KIND(1.d0)) :: t_initial, t_final, tps_cpu45 INTEGER :: ij, l, iq, iadv 46 ! REAL(KIND=KIND(1.d0)) :: t_initial, t_final, tps_cpu 47 47 REAL :: zdp(ip1jmp1), zdpmin, zdpmax 48 48 INTEGER, SAVE :: iadvtr=0 -
LMDZ6/trunk/libf/dyn3d/dynetat0.f90
r4063 r4064 162 162 s1='value of '//TRIM(str1)//' =' 163 163 s2=' read in starting file differs from parametrized '//TRIM(str2)//' =' 164 WRITE(msg,'(10x,a,i4,2x,a,i4)') ,TRIM(ADJUSTL(s1)),n1,TRIM(ADJUSTL(s2)),n2164 WRITE(msg,'(10x,a,i4,2x,a,i4)')TRIM(ADJUSTL(s1)),n1,TRIM(ADJUSTL(s2)),n2 165 165 CALL ABORT_gcm(TRIM(modname),TRIM(msg),1) 166 166 END IF … … 203 203 CASE('close'); msg="File closing failed for <"//TRIM(nam)//">" 204 204 END SELECT 205 CALL ABORT_gcm(TRIM(modname),TRIM(msg), ierr)205 CALL ABORT_gcm(TRIM(modname),TRIM(msg),1) 206 206 END SUBROUTINE err 207 207 -
LMDZ6/trunk/libf/dyn3d/dynredem.F90
r4063 r4064 13 13 NF90_64BIT_OFFSET 14 14 USE dynredem_mod, ONLY: cre_var, put_var1, put_var2, err, modname, fil 15 USE comvert_mod, ONLY: ap,bp,aps,bps,presnivs,pseudoalt,pa,preff, & 16 nivsig,nivsigs 15 USE comvert_mod, ONLY: ap, bp, presnivs, pa, preff, nivsig, nivsigs 17 16 USE comconst_mod, ONLY: cpp, daysec, dtvr, g, kappa, omeg, rad 18 17 USE logic_mod, ONLY: fxyhypb, ysinus … … 35 34 !=============================================================================== 36 35 ! Local variables: 37 INTEGER :: iq , l36 INTEGER :: iq 38 37 INTEGER, PARAMETER :: length=100 39 38 REAL :: tab_cntrl(length) !--- RUN PARAMETERS TABLE … … 42 41 INTEGER :: indexID 43 42 INTEGER :: rlonuID, rlonvID, rlatuID, rlatvID 44 INTEGER :: sID, sigID, nID, vID,timID43 INTEGER :: sID, sigID, nID, timID 45 44 INTEGER :: yyears0, jjour0, mmois0 46 REAL :: z an0, zjulian, hours45 REAL :: zjulian, hours 47 46 !=============================================================================== 48 47 modname='dynredem0'; fil=fichnom … … 139 138 140 139 !--- Define fields saved later 141 WRITE(unites,"('days since ',i4,'-',i2.2,'-',i2.2,' 00:00:00')") ,&140 WRITE(unites,"('days since ',i4,'-',i2.2,'-',i2.2,' 00:00:00')") & 142 141 yyears0,mmois0,jjour0 143 142 CALL cre_var(nid,"temps","Temps de simulation",[timID],unites) … … 194 193 !=============================================================================== 195 194 ! Local variables: 196 INTEGER :: l,iq, nid, vID, ierr, nid_trac, vID_trac195 INTEGER :: iq, nid, vID, ierr, nid_trac, vID_trac 197 196 INTEGER, SAVE :: nb=0 198 197 INTEGER, PARAMETER :: length=100 -
LMDZ6/trunk/libf/dyn3d/vlsplt.F
r4052 r4064 38 38 c --------- 39 39 c 40 INTEGER i,ij,l,j,ii 41 INTEGER ijlqmin,iqmin,jqmin,lqmin 42 c 43 REAL zm(ip1jmp1,llm,nqtot),newmasse 40 INTEGER ij,l 41 c 42 REAL zm(ip1jmp1,llm,nqtot) 44 43 REAL mu(ip1jmp1,llm) 45 44 REAL mv(ip1jm,llm) 46 45 REAL mw(ip1jmp1,llm+1) 47 REAL zq(ip1jmp1,llm,nqtot),zz 48 REAL dqx(ip1jmp1,llm),dqy(ip1jmp1,llm),dqz(ip1jmp1,llm) 49 REAL second,temps0,temps1,temps2,temps3 50 REAL ztemps1,ztemps2,ztemps3 46 REAL zq(ip1jmp1,llm,nqtot) 51 47 REAL zzpbar, zzw 52 LOGICAL testcpu53 SAVE testcpu54 SAVE temps1,temps2,temps355 INTEGER iminn,imaxx56 48 INTEGER ifils,iq2 ! CRisi 57 49 58 50 REAL qmin,qmax 59 51 DATA qmin,qmax/0.,1.e33/ 60 DATA testcpu/.false./61 DATA temps1,temps2,temps3/0.,0.,0./62 63 52 64 53 zzpbar = 0.5 * pdt … … 157 146 c ---------- 158 147 REAL masse(ip1jmp1,llm,nqtot),pente_max 159 REAL u_m( ip1jmp1,llm ) ,pbarv( iip1,jjm,llm)148 REAL u_m( ip1jmp1,llm ) 160 149 REAL q(ip1jmp1,llm,nqtot) 161 REAL w(ip1jmp1,llm)162 150 INTEGER iq ! CRisi 163 151 c … … 169 157 c 170 158 REAL new_m,zu_m,zdum(ip1jmp1,llm) 171 REAL sigu(ip1jmp1),dxq(ip1jmp1,llm),dxqu(ip1jmp1) 159 c REAL sigu(ip1jmp1) 160 REAL dxq(ip1jmp1,llm),dxqu(ip1jmp1) 172 161 REAL zz(ip1jmp1) 173 162 REAL adxqu(ip1jmp1),dxqmax(ip1jmp1,llm) … … 178 167 INTEGER ifils,iq2 ! CRisi 179 168 180 Logical extremum,first,testcpu 181 SAVE first,testcpu 182 183 REAL SSUM 184 REAL temps0,temps1,temps2,temps3,temps4,temps5,second 185 SAVE temps0,temps1,temps2,temps3,temps4,temps5 186 187 REAL z1,z2,z3 188 189 DATA first,testcpu/.true.,.false./ 190 191 IF(first) THEN 192 temps1=0. 193 temps2=0. 194 temps3=0. 195 temps4=0. 196 temps5=0. 197 first=.false. 198 ENDIF 169 Logical first 170 SAVE first 171 DATA first/.true./ 199 172 200 173 c calcul de la pente a droite et a gauche de la maille … … 432 405 ENDDO 433 406 ENDIF ! n0.gt.0 434 9999 continue407 c9999 continue 435 408 436 409 … … 536 509 REAL masse(ip1jmp1,llm,nqtot),pente_max 537 510 REAL masse_adv_v( ip1jm,llm) 538 REAL q(ip1jmp1,llm,nqtot) , dq( ip1jmp1,llm)511 REAL q(ip1jmp1,llm,nqtot) 539 512 INTEGER iq ! CRisi 540 513 c … … 545 518 c 546 519 REAL airej2,airejjm,airescb(iim),airesch(iim) 547 REAL dyq(ip1jmp1,llm),dyqv(ip1jm) ,zdvm(ip1jmp1,llm)520 REAL dyq(ip1jmp1,llm),dyqv(ip1jm) 548 521 REAL adyqv(ip1jm),dyqmax(ip1jmp1) 549 522 REAL qbyv(ip1jm,llm) 550 523 551 REAL qpns,qpsn,appn,apps,dyn1,dys1,dyn2,dys2,newmasse,fn,fs 524 REAL qpns,qpsn,dyn1,dys1,dyn2,dys2,newmasse,fn,fs 525 c REAL appn apps 552 526 c REAL newq,oldmasse 553 Logical extremum,first,testcpu 554 REAL temps0,temps1,temps2,temps3,temps4,temps5,second 555 SAVE temps0,temps1,temps2,temps3,temps4,temps5 556 SAVE first,testcpu 527 LOGICAL first 528 SAVE first 557 529 558 530 REAL convpn,convps,convmpn,convmps … … 570 542 REAL SSUM 571 543 572 DATA first,testcpu/.true.,.false./ 573 DATA temps0,temps1,temps2,temps3,temps4,temps5/0.,0.,0.,0.,0.,0./ 544 DATA first/.true./ 574 545 575 546 !write(*,*) 'vly 578: entree, iq=',iq … … 905 876 c --------- 906 877 c 907 INTEGER i ,ij,l,j,ii878 INTEGER ij,l 908 879 c 909 880 REAL wq(ip1jmp1,llm+1),newmasse … … 918 889 SAVE testcpu 919 890 920 REAL temps0,temps1,temps2,temps3,temps4,temps5,second 921 SAVE temps0,temps1,temps2,temps3,temps4,temps5922 REAL SSUM891 #ifdef BIDON 892 REAL temps0,temps1,second 893 SAVE temps0,temps1 923 894 924 895 DATA testcpu/.false./ 925 DATA temps0,temps1,temps2,temps3,temps4,temps5/0.,0.,0.,0.,0.,0./ 896 DATA temps0,temps1/0.,0./ 897 #endif 926 898 927 899 c On oriente tout dans le sens de la pression c'est a dire dans le … … 1083 1055 real zzq(iip1,jjp1,llm) 1084 1056 1057 #ifdef isminmax 1085 1058 integer imin,jmin,lmin,ijlmin 1086 1059 integer imax,jmax,lmax,ijlmax … … 1088 1061 integer ismin,ismax 1089 1062 1090 #ifdef isminismax1091 1063 call scopy (ip1jmp1*llm,zq,1,zzq,1) 1092 1064 … … 1116 1088 #endif 1117 1089 return 1118 9999 format(a20,' q(',i3,',',i2,',',i2,')=',e12.5,e12.5)1090 c9999 format(a20,' q(',i3,',',i2,',',i2,')=',e12.5,e12.5) 1119 1091 end 1120 1092 -
LMDZ6/trunk/libf/dyn3d_common/infotrac.F90
r4063 r4064 1 ! 1 !$Id$ 2 2 ! 3 3 MODULE infotrac 4 4 5 USE strings_mod, ONLY: msg, find, strIdx, strFind, strParse, dispTable, int2str, reduceExpr,&6 fmsg, test, strTail, strHead, strStack, strReduce, maxlen, testFile, cat5 USE strings_mod, ONLY: msg, find, strIdx, strFind, strParse, dispTable, int2str, reduceExpr, & 6 cat, fmsg, test, strTail, strHead, strStack, strReduce, bool2str, maxlen, testFile 7 7 USE readTracFiles_mod, ONLY: trac_type, readTracersFiles, addPhase, phases_sep, nphases, ancestor, & 8 8 isot_type, readIsotopesFile, delPhase, old_phases, getKey_init, tran0, & … … 140 140 !--- Aliases for older names 141 141 INTEGER, POINTER, SAVE :: ntraciso, ntraceurs_zone 142 REAL, POINTER,SAVE :: qperemin, masseqmin, ratiomin142 REAL, SAVE :: qperemin, masseqmin, ratiomin 143 143 144 144 ! CRisi: cas particulier des isotopes … … 189 189 !------------------------------------------------------------------------------------------------------------------------------ 190 190 ! Local variables 191 INTEGER, ALLOCATABLE :: & 192 hadv(:), had(:), hadv_inca(:), conv_flg_inca(:), & !--- Horizontal/vertical transport scheme number 193 vadv(:), vad(:), vadv_inca(:), pbl_flg_inca(:) !--- + specific variables for INCA 191 INTEGER, ALLOCATABLE :: hadv(:), vadv(:) !--- Horizontal/vertical transport scheme number 192 #ifdef INCA 193 INTEGER, ALLOCATABLE :: had (:), hadv_inca(:), conv_flg_inca(:), &!--- Variables specific to INCA 194 vad (:), vadv_inca(:), pbl_flg_inca(:) 194 195 CHARACTER(LEN=8), ALLOCATABLE :: solsym_inca(:) !--- Tracers names for INCA 196 INTEGER :: nqINCA 197 #endif 195 198 CHARACTER(LEN=2) :: suff(9) !--- Suffixes for schemes of order 3 or 4 (Prather) 196 199 CHARACTER(LEN=3) :: descrq(30) !--- Advection scheme description tags 197 CHARACTER(LEN=maxlen) :: oldH2O, newH2O !--- Old and new water names 198 CHARACTER(LEN=maxlen) :: msg1, msg2 !--- Strings for messages 200 CHARACTER(LEN=maxlen) :: msg1 !--- String for messages 199 201 CHARACTER(LEN=maxlen), ALLOCATABLE :: str(:) !--- Temporary storage 200 202 INTEGER :: fType !--- Tracers description file type ; 0: none … … 206 208 CHARACTER(LEN=1) :: p 207 209 TYPE(trac_type), ALLOCATABLE, TARGET :: ttr(:) 208 TYPE(trac_type), POINTER :: t1, t p, t(:)210 TYPE(trac_type), POINTER :: t1, t(:) 209 211 TYPE(isot_type), POINTER :: iso 210 212 211 213 CHARACTER(LEN=maxlen), ALLOCATABLE :: tnom_0(:), tnom_transp(:) !--- Tracer short name + transporting fluid name 212 214 CHARACTER(LEN=maxlen) :: tchaine 213 INTEGER :: ierr , nqINCA215 INTEGER :: ierr 214 216 LOGICAL :: lINCA 215 217 … … 523 525 IF(iad == 20) nm = 3 !--- 2nd order scheme 524 526 IF(iad == 30) nm = 9 !--- 3rd order scheme 527 IF(nm == 0) CYCLE !--- No higher moments 525 528 ttr(jq+1:jq+nm) = t1 526 529 ttr(jq+1:jq+nm)%name = [(TRIM(t1%name) //'-'//TRIM(suff(im)), im=1, nm) ] … … 564 567 565 568 CALL infotrac_setHeredity !--- SET FIELDS %iqParent, %nqChilds, %iGeneration, %gen0Name, %iqDescen, %nqDescen 566 CALL infotrac_isoinit (tnom_0, nqtrue)!--- SET FIELDS %type, %iso_iName, %iso_iZone, %iso_iPhase569 CALL infotrac_isoinit !--- SET FIELDS %type, %iso_iName, %iso_iZone, %iso_iPhase 567 570 CALL getKey_init(tracers, isotopes) 568 571 IF(isoSelect('H2O')) RETURN !--- Select water isotopes ; finished if no water isotopes … … 579 582 580 583 !--- Finalize : 581 DEALLOCATE(tnom_0, hadv, vadv,tnom_transp)584 DEALLOCATE(tnom_0, tnom_transp) 582 585 583 586 ELSE … … 618 621 t => tracers 619 622 CALL msg('Information stored in infotrac :') 620 IF(dispTable('issssiii', ['iq ', 'name ', 'longName', 'gen0Name', 'parent ', 'iadv ', 'iqParent', 'iGenerat'], & 621 cat(t%name, t%longName, t%gen0Name, t%parent), cat([(iq, iq=1, nqtot)], t%iadv, t%iqParent, t%iGeneration))) & 623 IF(dispTable('isssssssssiiiiiiiii', & 624 ['iq ', 'name ', 'longN. ', 'gen0N. ', 'parent ', 'type ', 'phase ', 'compon. ', 'isAdv. ', 'isH2O. '& 625 ,'iadv ', 'iGen. ', 'iqPar. ', 'nqDes. ', 'nqChil. ', 'iso_iG. ', 'iso_iN. ', 'iso_iZ. ', 'iso_iP. '], & 626 cat(t%name, t%longName, t%gen0Name, t%parent, t%type, t%phase, & 627 t%component, bool2str(t%isAdvected), bool2str(t%isH2Ofamily)), & 628 cat([(iq, iq=1, nqtot)], t%iadv, t%iGeneration, t%iqParent, t%nqDescen, & 629 t%nqChilds, t%iso_iGroup, t%iso_iName, t%iso_iZone, t%iso_iPhase))) & 622 630 CALL abort_gcm(modname, "problem with the tracers table content", 1) 623 631 624 632 !--- Some aliases to be removed later 625 ntraciso => iso %ntiso626 ntraceurs_zone => iso %nzone633 ntraciso => isotope%ntiso 634 ntraceurs_zone => isotope%nzone 627 635 qperemin = min_qParent 628 636 masseqmin = min_qMass … … 664 672 CALL msg('nqChilds = '//strStack(int2str(tracers(:)%nqChilds)), modname) 665 673 CALL msg('iqParent = '//strStack(int2str(tracers(:)%iqParent)), modname) 666 WRITE(lunout,*)TRIM(modname)//': iqfils = ',iqfils674 CALL msg('iqChilds = '//strStack(int2str(PACK(iqfils,MASK=.TRUE.))),modname) 667 675 668 676 !=== SET FIELDS %iGeneration, %iqDescen, %nqDescen … … 686 694 CALL msg('nqDescen = '//TRIM(strStack(int2str(tracers(:)%nqDescen))), modname) 687 695 CALL msg('nqDescen_tot = ' //TRIM(int2str(SUM(tracers(:)%nqDescen))), modname) 688 WRITE(lunout,*)TRIM(modname)//': iqfils = ',iqfils696 CALL msg('iqChilds = '//strStack(int2str(PACK(iqfils, MASK=.TRUE.))), modname) 689 697 690 698 END SUBROUTINE infotrac_setHeredity … … 692 700 693 701 694 SUBROUTINE infotrac_isoinit (tnom_0, nqtrue)702 SUBROUTINE infotrac_isoinit 695 703 696 704 #ifdef CPP_IOIPSL … … 700 708 #endif 701 709 IMPLICIT NONE 702 INTEGER, INTENT(IN) :: nqtrue703 CHARACTER(LEN=*), INTENT(IN) :: tnom_0(nqtrue)704 710 CHARACTER(LEN=3) :: tnom_iso(niso_possibles) 705 711 INTEGER, ALLOCATABLE :: nb_iso(:,:), nb_traciso(:,:) 706 INTEGER :: ii, ip, iq, it, iz, ixt, n , nb_isoind, nzone_prec712 INTEGER :: ii, ip, iq, it, iz, ixt, nb_isoind, nzone_prec 707 713 TYPE(isot_type), POINTER :: i 708 714 TYPE(trac_type), POINTER :: t(:) 709 CHARACTER(LEN=1) :: p710 715 CHARACTER(LEN=maxlen) :: tnom_trac 711 716 CHARACTER(LEN=maxlen), ALLOCATABLE :: str(:) … … 718 723 ALLOCATE(indnum_fn_num(niso_possibles)) 719 724 ALLOCATE(iso_indnum(nqtot)) 720 725 721 726 iso_indnum (:) = 0 722 727 use_iso (:) = .FALSE. -
LMDZ6/trunk/libf/dyn3dmem/advtrac_loc.F90
r4058 r4064 49 49 ! Variables locales 50 50 !--------------------------------------------------------------------------- 51 INTEGER :: ij, l, iq, i iq, iadv51 INTEGER :: ij, l, iq, iadv 52 52 REAL(KIND=KIND(1.d0)) :: t_initial, t_final, tps_cpu 53 53 REAL :: zdp(ijb_u:ije_u), zdpmin, zdpmax
Note: See TracChangeset
for help on using the changeset viewer.