Changeset 4446 for LMDZ6/branches/Portage_acc/libf/phylmdiso
- Timestamp:
- Mar 1, 2023, 6:22:39 PM (16 months ago)
- Location:
- LMDZ6/branches/Portage_acc/libf/phylmdiso
- Files:
-
- 1 added
- 1 deleted
- 38 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Portage_acc/libf/phylmdiso/add_phys_tend_mod.F90
r4004 r4446 39 39 USE mod_grid_phy_lmdz, ONLY: nbp_lev 40 40 #ifdef ISO 41 USE infotrac_phy, ONLY: ntraciso 41 USE infotrac_phy, ONLY: ntraciso=>ntiso 42 42 USE isotopes_mod, ONLY: iso_eau 43 43 #endif … … 154 154 155 155 #ifdef ISO 156 USE infotrac_phy, ONLY: ntraciso 156 USE infotrac_phy, ONLY: ntraciso=>ntiso 157 157 #ifdef ISOVERIF 158 158 USE isotopes_mod, ONLY: iso_eau -
LMDZ6/branches/Portage_acc/libf/phylmdiso/add_wake_tend.F90
r4004 r4446 18 18 USE print_control_mod, ONLY: prt_level 19 19 #ifdef ISO 20 USE infotrac_phy, ONLY: nt raciso20 USE infotrac_phy, ONLY: ntiso 21 21 USE phys_state_var_mod, ONLY: wake_deltaxt 22 22 #endif … … 31 31 INTEGER, INTENT (IN) :: abortphy 32 32 #ifdef ISO 33 REAL, DIMENSION(nt raciso,klon, klev), INTENT (IN):: zddeltaxt33 REAL, DIMENSION(ntiso, klon, klev), INTENT (IN) :: zddeltaxt 34 34 #endif 35 35 … … 61 61 wake_deltaq(i, l) = wake_deltaq(i, l) + zddeltaq(i,l) 62 62 #ifdef ISO 63 do ixt=1,nt raciso63 do ixt=1,ntiso 64 64 wake_deltaxt(ixt,i, l) = wake_deltaxt(ixt,i, l) + zddeltaxt(ixt,i,l) 65 65 enddo … … 69 69 wake_deltaq(i, l) = 0. 70 70 #ifdef ISO 71 do ixt=1,nt raciso71 do ixt=1,ntiso 72 72 wake_deltaxt(ixt,i, l) = 0.0 73 73 enddo -
LMDZ6/branches/Portage_acc/libf/phylmdiso/ajsec.F90
r4004 r4446 9 9 USE dimphy 10 10 #ifdef ISO 11 USE infotrac_phy, ONLY: ntraciso 11 USE infotrac_phy, ONLY: ntraciso =>ntiso 12 12 #ifdef ISOVERIF 13 13 USE isotopes_mod, ONLY : iso_eau,iso_HDO … … 303 303 USE dimphy 304 304 #ifdef ISO 305 USE infotrac_phy, ONLY: ntraciso 305 USE infotrac_phy, ONLY: ntraciso=>ntiso 306 306 #ifdef ISOVERIF 307 307 USE isotopes_mod, ONLY : iso_eau,iso_HDO -
LMDZ6/branches/Portage_acc/libf/phylmdiso/calwake.F90
r4033 r4446 35 35 USE print_control_mod, ONLY: mydebug=>debug , lunout, prt_level 36 36 #ifdef ISO 37 USE infotrac_phy, ONLY : ntraciso 37 USE infotrac_phy, ONLY : ntraciso=>ntiso 38 38 #ifdef ISOVERIF 39 39 USE isotopes_mod, ONLY: iso_eau -
LMDZ6/branches/Portage_acc/libf/phylmdiso/change_srf_frac_mod.F90
r4004 r4446 39 39 USE print_control_mod, ONLY: lunout 40 40 #ifdef ISO 41 USE infotrac_phy, ONLY: nt raciso41 USE infotrac_phy, ONLY: ntiso 42 42 #endif 43 43 … … 66 66 !albedo SB <<< 67 67 #ifdef ISO 68 REAL, DIMENSION(nt raciso,klon,nbsrf), INTENT(INOUT) :: xtevap68 REAL, DIMENSION(ntiso,klon,nbsrf), INTENT(INOUT) :: xtevap 69 69 #endif 70 70 -
LMDZ6/branches/Portage_acc/libf/phylmdiso/climb_hq_mod.F90
r4124 r4446 6 6 USE dimphy 7 7 #ifdef ISO 8 USE infotrac_phy, ONLY: ntraciso ! ajout C Risi pour isos8 USE infotrac_phy, ONLY: ntraciso=>ntiso ! ajout C Risi pour isos 9 9 #endif 10 10 … … 59 59 ) 60 60 #ifdef ISOVERIF 61 !USE infotrac_phy, ONLY: use_iso62 61 USE isotopes_mod, ONLY: iso_eau,iso_HDO 63 62 !USE isotopes_verif_mod, ONLY: errmax, errmaxrel -
LMDZ6/branches/Portage_acc/libf/phylmdiso/concvl.F90
r4004 r4446 44 44 USE infotrac_phy, ONLY: nbtr 45 45 #ifdef ISO 46 USE infotrac_phy, ONLY: ntraciso 46 USE infotrac_phy, ONLY: ntraciso=>ntiso 47 47 USE isotopes_mod, ONLY: iso_eau, bidouille_anti_divergence, ridicule, & 48 48 iso_eau,iso_HDO -
LMDZ6/branches/Portage_acc/libf/phylmdiso/cv30_routines.F90
r4050 r4446 165 165 ) 166 166 #ifdef ISO 167 USE infotrac_phy, ONLY: ntraciso 167 USE infotrac_phy, ONLY: ntraciso=>ntiso 168 168 #endif 169 169 IMPLICIT NONE … … 370 370 371 371 #ifdef ISO 372 USE infotrac_phy, ONLY: ntraciso 372 USE infotrac_phy, ONLY: ntraciso=>ntiso 373 373 USE isotopes_mod, ONLY: pxtmelt,pxtice,pxtmin,pxtmax,cond_temp_env, & 374 374 iso_eau,iso_HDO, ridicule … … 947 947 USE print_control_mod, ONLY: lunout 948 948 #ifdef ISO 949 use infotrac_phy, ONLY: ntraciso 949 use infotrac_phy, ONLY: ntraciso=>ntiso 950 950 use isotopes_mod, ONLY: essai_convergence, iso_eau,iso_HDO 951 951 #ifdef ISOVERIF … … 1133 1133 ! epmax_cape: ajout arguments 1134 1134 #ifdef ISO 1135 use infotrac_phy, ONLY: ntraciso 1135 use infotrac_phy, ONLY: ntraciso=>ntiso 1136 1136 USE isotopes_mod, ONLY: pxtmelt,pxtice,pxtmin,pxtmax,cond_temp_env, iso_eau,iso_HDO 1137 1137 USE isotopes_routines_mod, ONLY: condiso_liq_ice_vectall … … 1828 1828 1829 1829 #ifdef ISO 1830 use infotrac_phy, ONLY: ntraciso ,niso,index_trac1830 use infotrac_phy, ONLY: ntraciso=>ntiso,niso,itZonIso 1831 1831 USE isotopes_mod, ONLY: pxtmelt,pxtice,pxtmin,pxtmax, iso_eau,iso_HDO, & 1832 1832 ridicule … … 2616 2616 call iso_verif_traceur(xtclw(1,il,im), & 2617 2617 & 'condiso_liq_ice_vectiso_trac 358') 2618 if (iso_verif_positif_nostop(xtclw(i ndex_trac( &2618 if (iso_verif_positif_nostop(xtclw(itZonIso( & 2619 2619 & izone_cond,iso_eau),i,k)-xtclw(iso_eau,i,k) & 2620 2620 & ,'cv30_routines 909').eq.1) then … … 2624 2624 & niso,ntraciso,index_zone,izone_cond 2625 2625 stop 2626 endif !if (iso_verif_positif_nostop(xtclw(i ndex_trac(2626 endif !if (iso_verif_positif_nostop(xtclw(itZonIso( 2627 2627 #endif 2628 2628 enddo !do il = 1, ncum … … 2647 2647 & ) 2648 2648 #ifdef ISO 2649 use infotrac_phy, ONLY: ntraciso 2649 use infotrac_phy, ONLY: ntraciso=>ntiso 2650 2650 use isotopes_mod, ONLY: essai_convergence, iso_eau,iso_HDO,ridicule 2651 2651 use isotopes_routines_mod, ONLY: appel_stewart_vectall … … 2659 2659 #ifdef ISOTRAC 2660 2660 use isotrac_mod, only: option_cond,izone_cond 2661 use infotrac_phy, ONLY: i ndex_trac2661 use infotrac_phy, ONLY: itZonIso 2662 2662 #ifdef ISOVERIF 2663 2663 use isotopes_verif_mod, ONLY: iso_verif_traceur_justmass, & … … 2938 2938 ! on verifie que tout le detrainement est tagge condensat 2939 2939 if (iso_verif_positif_nostop( & 2940 & xtwdtrain(i ndex_trac(izone_cond,iso_eau),il) &2940 & xtwdtrain(itZonIso(izone_cond,iso_eau),il) & 2941 2941 & -xtwdtrain(iso_eau,il), & 2942 2942 & 'cv30_routines 2795').eq.1) then … … 3200 3200 ! if (option_tmin.ge.1) then 3201 3201 ! call iso_verif_positif(xtwater( 3202 ! : i ndex_trac(izone_cond,iso_eau),il,i+1)3202 ! : itZonIso(izone_cond,iso_eau),il,i+1) 3203 3203 ! : -xtwater(iso_eau,il,i+1), 3204 3204 ! : 'cv30_routines 3083') … … 3259 3259 ! if (option_tmin.ge.1) then 3260 3260 ! call iso_verif_positif(xtwater( 3261 ! : i ndex_trac(izone_cond,iso_eau),il,i)3261 ! : itZonIso(izone_cond,iso_eau),il,i) 3262 3262 ! : -xtwater(iso_eau,il,i), 3263 3263 ! : 'cv30_routines 3143') … … 3369 3369 & ) 3370 3370 #ifdef ISO 3371 use infotrac_phy, ONLY: ntraciso,niso, & 3372 & ntraceurs_zone,index_trac 3371 use infotrac_phy, ONLY: ntraciso=>ntiso, niso, nzone, itZonIso 3373 3372 use isotopes_mod, ONLY: essai_convergence,ridicule,iso_eau,iso_HDO,iso_O18 3374 3373 #ifdef ISOVERIF … … 5003 5002 do iiso = 1, niso 5004 5003 5005 ixt_ddft=i ndex_trac(izone_ddft,iiso)5004 ixt_ddft=itZonIso(izone_ddft,iiso) 5006 5005 if (mp(il,i).gt.mp(il,i+1)) then 5007 5006 fxtYe(iiso)=0.01*grav*dpinv*mp(il,i) & … … 5016 5015 & -mp(il,i)*(xtp(iiso,il,i)-xt(iiso,il,i-1))) 5017 5016 5018 ixt_poubelle=i ndex_trac(izone_poubelle,iiso)5017 ixt_poubelle=itZonIso(izone_poubelle,iiso) 5019 5018 fxt(ixt_ddft,il,i)=fxt(ixt_ddft,il,i)+fxtYe(iiso) 5020 5019 fxt(ixt_poubelle,il,i)=fxt(ixt_poubelle,il,i) & … … 5033 5032 & -mp(il,i)*(xtp(iiso,il,i)-xt(iiso,il,i-1))) 5034 5033 5035 ixt_ddft=i ndex_trac(izone_ddft,iiso)5034 ixt_ddft=itZonIso(izone_ddft,iiso) 5036 5035 fxtYe(iiso)=0.01*grav*dpinv*mp(il,i) & 5037 5036 & *(xt(ixt_ddft,il,i-1)-xt(ixt_ddft,il,i)) 5038 5037 fxt(ixt_ddft,il,i)=fxt(ixt_ddft,il,i)+fxtYe(iiso) 5039 5038 5040 ixt_revap=i ndex_trac(izone_revap,iiso)5039 ixt_revap=itZonIso(izone_revap,iiso) 5041 5040 fxt_revap(iiso)=0.01*grav*dpinv*(mp(il,i+1)* & 5042 5041 & (xtp(ixt_revap,il,i+1)-xt(ixt_revap,il,i)) & … … 5049 5048 & -xt(ixt_ddft,il,i)-xt(ixt_revap,il,i) 5050 5049 if (Xe(iiso).gt.ridicule) then 5051 do izone=1,n traceurs_zone5050 do izone=1,nzone 5052 5051 if ((izone.ne.izone_revap).and. & 5053 5052 & (izone.ne.izone_ddft)) then 5054 ixt=i ndex_trac(izone,iiso)5053 ixt=itZonIso(izone,iiso) 5055 5054 fxt(ixt,il,i)=fxt(ixt,il,i) & 5056 5055 & +xt(ixt,il,i)/Xe(iiso)*fxtXe(iiso) 5057 5056 endif !if ((izone.ne.izone_revap).and. 5058 enddo !do izone=1,n traceurs_zone5057 enddo !do izone=1,nzone 5059 5058 #ifdef ISOVERIF 5060 5059 ! write(*,*) 'iiso=',iiso … … 5078 5077 endif 5079 5078 #endif 5080 do izone=1,n traceurs_zone5079 do izone=1,nzone 5081 5080 if ((izone.ne.izone_revap).and. & 5082 5081 & (izone.ne.izone_ddft)) then 5083 ixt=i ndex_trac(izone,iiso)5082 ixt=itZonIso(izone,iiso) 5084 5083 if (izone.eq.izone_poubelle) then 5085 5084 fxt(ixt,il,i)=fxt(ixt,il,i)+fxtXe(iiso) … … 5088 5087 endif !if (izone.eq.izone_poubelle) then 5089 5088 endif !if ((izone.ne.izone_revap).and. 5090 enddo !do izone=1,n traceurs_zone5089 enddo !do izone=1,nzone 5091 5090 #ifdef ISOVERIF 5092 5091 call iso_verif_traceur_justmass(fxt(1,il,i), & … … 5237 5236 enddo !do ixt = 1+niso,ntraciso 5238 5237 ! write(*,*) 'tmp cv3_yield 4165: i,il=',i,il 5239 ! ixt_poubelle=i ndex_trac(izone_poubelle,iso_eau)5240 ! ixt_ddft=i ndex_trac(izone_ddft,iso_eau)5238 ! ixt_poubelle=itZonIso(izone_poubelle,iso_eau) 5239 ! ixt_ddft=itZonIso(izone_ddft,iso_eau) 5241 5240 ! write(*,*) 'delt*fxt(ixt_poubelle,il,i)=', 5242 5241 ! : delt*fxt(ixt_poubelle,il,i) … … 5244 5243 ! write(*,*) 'xt(iso_eau,il,i)=',xt(iso_eau,il,i) 5245 5244 do iiso = 1, niso 5246 ixt_poubelle=i ndex_trac(izone_poubelle,iiso)5247 ixt_ddft=i ndex_trac(izone_ddft,iiso)5245 ixt_poubelle=itZonIso(izone_poubelle,iiso) 5246 ixt_ddft=itZonIso(izone_ddft,iiso) 5248 5247 if (mp(il,i).gt.mp(il,i+1)) then 5249 5248 fxtYe(iiso)=0.01*grav*dpinv*mp(il,i) & … … 6111 6110 6112 6111 #ifdef ISO 6113 use infotrac_phy, ONLY: ntraciso 6112 use infotrac_phy, ONLY: ntraciso=>ntiso 6114 6113 #ifdef ISOVERIF 6115 6114 use isotopes_verif_mod, ONLY: Tmin_verif,iso_verif_aberrant, & -
LMDZ6/branches/Portage_acc/libf/phylmdiso/cv3_enthalpmix.F90
r4004 r4446 7 7 ) 8 8 #ifdef ISO 9 use infotrac_phy, ONLY: nt raciso9 use infotrac_phy, ONLY: ntiso 10 10 #endif 11 11 ! ************************************************************** … … 43 43 REAL, DIMENSION (len,nd+1), INTENT (IN) :: ph 44 44 #ifdef ISO 45 REAL, DIMENSION (nt raciso,len,nd), INTENT (IN) :: xt45 REAL, DIMENSION (ntiso,len,nd), INTENT (IN) :: xt 46 46 #endif 47 47 !input/output: … … 54 54 REAL, DIMENSION (len,nd), INTENT (OUT) :: wi 55 55 #ifdef ISO 56 REAL, DIMENSION (nt raciso,len), INTENT (OUT) :: xtmix56 REAL, DIMENSION (ntiso,len), INTENT (OUT) :: xtmix 57 57 #endif 58 58 !internal variables : … … 153 153 vmix(i) = vmix(i) + v(i, j)*wi(i, j) 154 154 #ifdef ISO 155 do ixt=1,nt raciso155 do ixt=1,ntiso 156 156 xtmix(ixt,i) = xtmix(ixt,i) + xt(ixt,i, j)*wi(i, j) 157 157 enddo -
LMDZ6/branches/Portage_acc/libf/phylmdiso/cv3_estatmix.F90
r4004 r4446 7 7 ) 8 8 #ifdef ISO 9 use infotrac_phy, ONLY: nt raciso9 use infotrac_phy, ONLY: ntiso 10 10 #endif 11 11 ! ************************************************************** … … 46 46 REAL, DIMENSION (len,nd+1), INTENT (IN) :: ph 47 47 #ifdef ISO 48 REAL, DIMENSION (nt raciso,len,nd), INTENT (IN) :: xt48 REAL, DIMENSION (ntiso,len,nd), INTENT (IN) :: xt 49 49 #endif 50 50 !input/output: … … 57 57 REAL, DIMENSION (len,nd), INTENT (OUT) :: wi 58 58 #ifdef ISO 59 REAL, DIMENSION (nt raciso,len), INTENT (OUT) :: xtmix59 REAL, DIMENSION (ntiso,len), INTENT (OUT) :: xtmix 60 60 #endif 61 61 !internal variables : … … 153 153 vmix(i) = vmix(i) + v(i, j)*wi(i, j) 154 154 #ifdef ISO 155 do ixt=1,nt raciso155 do ixt=1,ntiso 156 156 xtmix(ixt,i) = xtmix(ixt,i) + xt(ixt,i, j)*wi(i, j) 157 157 enddo -
LMDZ6/branches/Portage_acc/libf/phylmdiso/cv3_routines.F90
r4123 r4446 314 314 & ) 315 315 #ifdef ISO 316 use infotrac_phy, ONLY: ntraciso 316 use infotrac_phy, ONLY: ntraciso=>ntiso 317 317 #ifdef ISOVERIF 318 318 use isotopes_verif_mod, ONLY: iso_verif_positif,iso_verif_noNaN,iso_verif_egalite … … 685 685 & ) 686 686 #ifdef ISO 687 USE infotrac_phy, ONLY: ntraciso 687 USE infotrac_phy, ONLY: ntraciso=>ntiso 688 688 USE isotopes_mod, ONLY: pxtmelt,pxtice,pxtmin,pxtmax,cond_temp_env, & 689 689 iso_eau,iso_HDO,ridicule … … 1274 1274 USE print_control_mod, ONLY: lunout 1275 1275 #ifdef ISO 1276 use infotrac_phy, ONLY: ntraciso 1276 use infotrac_phy, ONLY: ntraciso=>ntiso 1277 1277 use isotopes_mod, ONLY: essai_convergence, iso_eau,iso_HDO 1278 1278 #ifdef ISOVERIF … … 1474 1474 USE print_control_mod, ONLY: prt_level 1475 1475 #ifdef ISO 1476 use infotrac_phy, ONLY: ntraciso 1476 use infotrac_phy, ONLY: ntraciso=>ntiso 1477 1477 USE isotopes_mod, ONLY: pxtmelt,pxtice,pxtmin,pxtmax,cond_temp_env, & 1478 1478 iso_eau,iso_HDO … … 2777 2777 2778 2778 #ifdef ISO 2779 use infotrac_phy, ONLY: ntraciso ,niso,index_trac2779 use infotrac_phy, ONLY: ntraciso=>ntiso,niso,itZonIso 2780 2780 USE isotopes_mod, ONLY: pxtmelt,pxtice,pxtmin,pxtmax, iso_eau,iso_HDO, & 2781 2781 ridicule … … 3580 3580 call iso_verif_traceur(xtclw(1,il,im), & 3581 3581 & 'condiso_liq_ice_vectiso_trac 358') 3582 if (iso_verif_positif_nostop(xtclw(i ndex_trac( &3582 if (iso_verif_positif_nostop(xtclw(itZonIso( & 3583 3583 & izone_cond,iso_eau),i,k)-xtclw(iso_eau,i,k) & 3584 3584 & ,'cv3_routines 909').eq.1) then … … 3588 3588 & niso,ntraciso,index_zone,izone_cond 3589 3589 stop 3590 endif !if (iso_verif_positif_nostop(xtclw(i ndex_trac(3590 endif !if (iso_verif_positif_nostop(xtclw(itZonIso( 3591 3591 #endif 3592 3592 enddo !do il = 1, ncum … … 3615 3615 USE print_control_mod, ONLY: prt_level, lunout 3616 3616 #ifdef ISO 3617 use infotrac_phy, ONLY: ntraciso 3617 use infotrac_phy, ONLY: ntraciso=>ntiso 3618 3618 use isotopes_mod, ONLY: essai_convergence, iso_eau,iso_HDO, & 3619 3619 ridicule … … 3628 3628 #ifdef ISOTRAC 3629 3629 use isotrac_mod, only: option_cond,izone_cond 3630 use infotrac_phy, ONLY: i ndex_trac3630 use infotrac_phy, ONLY: itZonIso 3631 3631 #ifdef ISOVERIF 3632 3632 use isotopes_verif_mod, ONLY: iso_verif_traceur_justmass, & … … 3993 3993 ! on verifie que tout le detrainement est tagge condensat 3994 3994 if (iso_verif_positif_nostop( & 3995 & xtwdtrain(i ndex_trac(izone_cond,iso_eau),il) &3995 & xtwdtrain(itZonIso(izone_cond,iso_eau),il) & 3996 3996 & -xtwdtrain(iso_eau,il), & 3997 3997 & 'cv3_routines 2795').eq.1) then … … 4535 4535 ! if (option_tmin.ge.1) then 4536 4536 ! call iso_verif_positif(xtwater( 4537 ! : i ndex_trac(izone_cond,iso_eau),il,i+1)4537 ! : itZonIso(izone_cond,iso_eau),il,i+1) 4538 4538 ! : -xtwater(iso_eau,il,i+1), 4539 4539 ! : 'cv3_routines 3083') … … 4602 4602 ! if (option_tmin.ge.1) then 4603 4603 ! call iso_verif_positif(xtwater( 4604 ! : i ndex_trac(izone_cond,iso_eau),il,i)4604 ! : itZonIso(izone_cond,iso_eau),il,i) 4605 4605 ! : -xtwater(iso_eau,il,i), 4606 4606 ! : 'cv3_routines 3143') … … 4741 4741 4742 4742 #ifdef ISO 4743 use infotrac_phy, ONLY: ntraciso,niso, & 4744 & ntraceurs_zone,index_trac 4743 use infotrac_phy, ONLY: ntraciso=>ntiso, niso, nzone, itZonIso 4745 4744 use isotopes_mod, ONLY: essai_convergence,ridicule,iso_eau,iso_HDO,iso_O18 4746 4745 #ifdef ISOVERIF … … 5889 5888 do iiso = 1, niso 5890 5889 5891 ixt_ddft=i ndex_trac(izone_ddft,iiso)5890 ixt_ddft=itZonIso(izone_ddft,iiso) 5892 5891 if (mp(il,i).gt.mp(il,i+1)) then 5893 5892 fxtYe(iiso)=0.01*grav*dpinv*mp(il,i) & … … 5902 5901 & -mp(il,i)*(xtp(iiso,il,i)-xt(iiso,il,i-1))) 5903 5902 5904 ixt_poubelle=i ndex_trac(izone_poubelle,iiso)5903 ixt_poubelle=itZonIso(izone_poubelle,iiso) 5905 5904 fxt(ixt_ddft,il,i)=fxt(ixt_ddft,il,i)+fxtYe(iiso) 5906 5905 fxt(ixt_poubelle,il,i)=fxt(ixt_poubelle,il,i) & … … 5919 5918 & -mp(il,i)*(xtp(iiso,il,i)-xt(iiso,il,i-1))) 5920 5919 5921 ixt_ddft=i ndex_trac(izone_ddft,iiso)5920 ixt_ddft=itZonIso(izone_ddft,iiso) 5922 5921 fxtYe(iiso)=0.01*grav*dpinv*mp(il,i) & 5923 5922 & *(xt(ixt_ddft,il,i-1)-xt(ixt_ddft,il,i)) 5924 5923 fxt(ixt_ddft,il,i)=fxt(ixt_ddft,il,i)+fxtYe(iiso) 5925 5924 5926 ixt_revap=i ndex_trac(izone_revap,iiso)5925 ixt_revap=itZonIso(izone_revap,iiso) 5927 5926 fxt_revap(iiso)=0.01*grav*dpinv*(mp(il,i+1)* & 5928 5927 & (xtp(ixt_revap,il,i+1)-xt(ixt_revap,il,i)) & … … 5935 5934 & -xt(ixt_ddft,il,i)-xt(ixt_revap,il,i) 5936 5935 if (Xe(iiso).gt.ridicule) then 5937 do izone=1,n traceurs_zone5936 do izone=1,nzone 5938 5937 if ((izone.ne.izone_revap).and. & 5939 5938 & (izone.ne.izone_ddft)) then 5940 ixt=i ndex_trac(izone,iiso)5939 ixt=itZonIso(izone,iiso) 5941 5940 fxt(ixt,il,i)=fxt(ixt,il,i) & 5942 5941 & +xt(ixt,il,i)/Xe(iiso)*fxtXe(iiso) 5943 5942 endif !if ((izone.ne.izone_revap).and. 5944 enddo !do izone=1,n traceurs_zone5943 enddo !do izone=1,nzone 5945 5944 #ifdef ISOVERIF 5946 5945 ! write(*,*) 'iiso=',iiso … … 5964 5963 endif 5965 5964 #endif 5966 do izone=1,n traceurs_zone5965 do izone=1,nzone 5967 5966 if ((izone.ne.izone_revap).and. & 5968 5967 & (izone.ne.izone_ddft)) then 5969 ixt=i ndex_trac(izone,iiso)5968 ixt=itZonIso(izone,iiso) 5970 5969 if (izone.eq.izone_poubelle) then 5971 5970 fxt(ixt,il,i)=fxt(ixt,il,i)+fxtXe(iiso) … … 5974 5973 endif !if (izone.eq.izone_poubelle) then 5975 5974 endif !if ((izone.ne.izone_revap).and. 5976 enddo !do izone=1,n traceurs_zone5975 enddo !do izone=1,nzone 5977 5976 #ifdef ISOVERIF 5978 5977 call iso_verif_traceur_justmass(fxt(1,il,i), & … … 7459 7458 & ) 7460 7459 #ifdef ISO 7461 use infotrac_phy, ONLY: ntraciso 7460 use infotrac_phy, ONLY: ntraciso=>ntiso 7462 7461 #ifdef ISOVERIF 7463 7462 use isotopes_verif_mod, ONLY: Tmin_verif,iso_verif_aberrant, & -
LMDZ6/branches/Portage_acc/libf/phylmdiso/cv3a_compress.F90
r4004 r4446 34 34 ! ************************************************************** 35 35 #ifdef ISO 36 use infotrac_phy, ONLY: ntraciso 36 use infotrac_phy, ONLY: ntraciso=>ntiso 37 37 use isotopes_mod, ONLY: essai_convergence, iso_eau,iso_HDO 38 38 #ifdef ISOVERIF -
LMDZ6/branches/Portage_acc/libf/phylmdiso/cv3a_uncompress.F90
r4004 r4446 54 54 55 55 #ifdef ISO 56 USE infotrac_phy, ONLY : ntraciso 56 USE infotrac_phy, ONLY : ntraciso=>ntiso 57 57 #endif 58 58 IMPLICIT NONE -
LMDZ6/branches/Portage_acc/libf/phylmdiso/cv3p_mixing.F90
r4033 r4446 21 21 USE add_phys_tend_mod, ONLY: fl_cor_ebil 22 22 #ifdef ISO 23 USE infotrac_phy, ONLY: ntraciso 23 USE infotrac_phy, ONLY: ntraciso=>ntiso 24 24 USE isotopes_mod, ONLY: pxtmelt,pxtice 25 25 USE isotopes_routines_mod, ONLY: condiso_liq_ice_vectall … … 1301 1301 call iso_verif_egalite_choix(xtent(iso_eau,il,im,jm), & 1302 1302 qent(il,im,jm),'cv3p_mixing 2112',errmax,errmaxrel) 1303 endif !if ( use_iso_eau) then1303 endif !if (iso_eau>0) then 1304 1304 #ifdef ISOTRAC 1305 1305 call iso_verif_traceur_justmass(xtelij(1,il,im,jm), & … … 1353 1353 ! call iso_verif_traceur(xtclw(1,il,im), & 1354 1354 ! 'cv3p_mixing 358') 1355 ! if (iso_verif_positif_nostop(xtclw(i ndex_trac( &1355 ! if (iso_verif_positif_nostop(xtclw(itZonIso( & 1356 1356 ! izone_cond,iso_eau),i,k)-xtclw(iso_eau,i,k) & 1357 1357 ! ,'cv3p_mixing 909').eq.1) then … … 1361 1361 ! niso,ntraciso,index_zone,izone_cond 1362 1362 ! stop 1363 ! endif !if (iso_verif_positif_nostop(xtclw(i ndex_trac(1363 ! endif !if (iso_verif_positif_nostop(xtclw(itZonIso( 1364 1364 !#endif 1365 1365 ! enddo !do il = 1, ncum -
LMDZ6/branches/Portage_acc/libf/phylmdiso/cv_driver.F90
r4004 r4446 25 25 USE dimphy 26 26 #ifdef ISO 27 USE infotrac_phy, ONLY: ntraciso ,niso,index_trac,ntraceurs_zone27 USE infotrac_phy, ONLY: ntraciso=>ntiso,niso,itZonIso,nzone 28 28 USE isotopes_mod, ONLY: iso_eau,iso_HDO,ridicule,bidouille_anti_divergence 29 29 #ifdef ISOVERIF … … 511 511 CALL cv_param(nd) 512 512 #ifdef ISO 513 write(*,*) 'cv_driver 454: isos pas pr évus ici'513 write(*,*) 'cv_driver 454: isos pas prevus ici' 514 514 stop 515 515 #endif … … 687 687 !c--debug 688 688 #ifdef ISOVERIF 689 write(*,*) 'cv_driver 621: apr ès cv3_undilute1'689 write(*,*) 'cv_driver 621: apres cv3_undilute1' 690 690 do k = 1, klev 691 691 do i = 1, klon … … 752 752 !write(*,*) 'xt1(iso_eau,1,1),q1(1,1)=',xt1(iso_eau,1,1),q1(1,1) 753 753 !write(*,*) 'xt1(iso_eau,14,1),q1(14,1)=',xt1(iso_eau,14,1),q1(14,1) 754 !write(*,*) 'iso_eau,use_iso=',iso_eau,use_iso755 754 do k = 1, klev 756 755 do i = 1, nloc … … 783 782 #ifdef ISO 784 783 #ifdef ISOVERIF 785 write(*,*) 'cv_driver 720: apr ès cv3_compress'784 write(*,*) 'cv_driver 720: apres cv3_compress' 786 785 do k = 1, klev 787 786 do i = 1, ncum … … 883 882 ,cape,ep,hp,icb,inb,clw,nk,t,h,lv & 884 883 ,epmax_diag) 885 ! on écrase ep et recalcule hp884 ! on écrase ep et recalcule hp 886 885 END IF 887 886 … … 910 909 #ifdef ISO 911 910 #ifdef ISOVERIF 912 write(*,*) 'cv_driver 837: apr ès cv3_mixing'911 write(*,*) 'cv_driver 837: apres cv3_mixing' 913 912 do k = 1, klev 914 913 do j = 1, klev … … 925 924 call iso_verif_traceur_justmass(xtelij(1,i,j,k), & 926 925 & 'cv_driver 847') 927 ! on ne v érfier pas le deltaD ici car peut dépasser le seuil928 ! raisonable pour temp ératures très froides.926 ! on ne verifie pas le deltaD ici car peut depasser le seuil 927 ! raisonable pour temperatures tres froides. 929 928 #endif 930 929 enddo … … 940 939 call iso_verif_traceur(xt(1,i,k),'cv_driver 856') 941 940 if (option_tmin.eq.1) then 942 if (iso_verif_positif_nostop(xtclw(i ndex_trac( &941 if (iso_verif_positif_nostop(xtclw(itZonIso( & 943 942 & izone_cond,iso_eau),i,k)-xtclw(iso_eau,i,k) & 944 943 & ,'cv_driver 909').eq.1) then … … 946 945 write(*,*) 'xtclw=',xtclw(:,i,k) 947 946 stop 948 endif !if (iso_verif_positif_nostop(xtclw(i ndex_trac(947 endif !if (iso_verif_positif_nostop(xtclw(itZonIso( 949 948 endif !if ((option_traceurs.eq.17).or. 950 949 #endif … … 1000 999 write(*,*) 'klev=',klev 1001 1000 #ifdef ISOVERIF 1002 write(*,*) 'cv_driver 930: apr ès cv3_unsat'1001 write(*,*) 'cv_driver 930: apres cv3_unsat' 1003 1002 do k = 1, klev 1004 1003 do i = 1, ncum … … 1048 1047 do i = 1, ncum 1049 1048 do iiso=1,niso 1050 ixt_ddft=i ndex_trac(izone_ddft,iiso)1051 ixt_poubelle=i ndex_trac(izone_poubelle,iiso)1049 ixt_ddft=itZonIso(izone_ddft,iiso) 1050 ixt_poubelle=itZonIso(izone_poubelle,iiso) 1052 1051 xtp(ixt_ddft,i,k)=xtp(ixt_ddft,i,k) & 1053 1052 & +xtp(ixt_poubelle,i,k) … … 1063 1062 do k = 1, klev 1064 1063 do i = 1, ncum 1065 do izone=1,n traceurs_zone1064 do izone=1,nzone 1066 1065 if (izone.eq.izone_ddft) then 1067 1066 do iiso=1,niso 1068 ixt_ddft=i ndex_trac(izone,iiso)1069 ixt_revap=i ndex_trac(izone_revap,iiso)1067 ixt_ddft=itZonIso(izone,iiso) 1068 ixt_revap=itZonIso(izone_revap,iiso) 1070 1069 xtp(ixt_ddft,i,k)=xtp(iiso,i,k)-xtp(ixt_revap,i,k) 1071 1070 enddo !do iiso=1,niso 1072 1071 elseif (izone.eq.izone_ddft) then 1073 ! rien àfaire1072 ! rien a faire 1074 1073 else !if (izone.eq.izone_ddft) then 1075 1074 do iiso=1,niso 1076 ixt=i ndex_trac(izone,iiso)1075 ixt=itZonIso(izone,iiso) 1077 1076 xtp(ixt,i,k)=0.0 1078 1077 enddo !do iiso=1,niso 1079 1078 endif !if (izone.eq.izone_ddft) then 1080 enddo !do izone=1,n traceurs_zone1079 enddo !do izone=1,nzone 1081 1080 #ifdef ISOVERIF 1082 1081 call iso_verif_traceur(xtp(1,i,k),'cv_driver 1059') … … 1247 1246 ! si icvflag_Tpa=0, alors la fraction de glace dans l'ascendance adiabatique est 1248 1247 ! fonction de la temperature de l'environnement et la temperature de l'ascendance est 1249 ! calculee en deux it érations, une en supposant qu'il n'y a pas de glace et l'autre1250 ! en ajoutant la glace (ancien sch éma d'Arnaud Jam).1248 ! calculee en deux iterations, une en supposant qu'il n'y a pas de glace et l'autre 1249 ! en ajoutant la glace (ancien schema d'Arnaud Jam). 1251 1250 ! si icvflag_Tpa=1, alors la fraction de glace dans l'ascendance adiabatique est 1252 1251 ! fonction de la temperature de l'environnement et la temperature de l'ascendance est -
LMDZ6/branches/Portage_acc/libf/phylmdiso/cva_driver.F90
r4033 r4446 54 54 USE add_phys_tend_mod, ONLY: fl_cor_ebil 55 55 #ifdef ISO 56 USE infotrac_phy, ONLY: ntraciso ,niso,niso,index_trac,ntraceurs_zone56 USE infotrac_phy, ONLY: ntraciso=>ntiso,niso,niso,itZonIso,nzone 57 57 USE isotopes_mod, ONLY: iso_eau,iso_HDO,iso_O18,ridicule,bidouille_anti_divergence 58 58 #ifdef ISOVERIF … … 1388 1388 call iso_verif_traceur(xt(1,i,k),'cva_driver 856') 1389 1389 if (option_tmin.eq.1) then 1390 if (iso_verif_positif_nostop(xtclw(i ndex_trac( &1390 if (iso_verif_positif_nostop(xtclw(itZonIso( & 1391 1391 & izone_cond,iso_eau),i,k)-xtclw(iso_eau,i,k) & 1392 1392 & ,'cva_driver 909').eq.1) then … … 1394 1394 write(*,*) 'xtclw=',xtclw(:,i,k) 1395 1395 stop 1396 endif !if (iso_verif_positif_nostop(xtclw(i ndex_trac(1396 endif !if (iso_verif_positif_nostop(xtclw(itZonIso( 1397 1397 endif !if ((option_traceurs.eq.17).or. 1398 1398 #endif … … 1509 1509 do i = 1, ncum 1510 1510 do iiso=1,niso 1511 ixt_ddft=i ndex_trac(izone_ddft,iiso)1512 ixt_poubelle=i ndex_trac(izone_poubelle,iiso)1511 ixt_ddft=itZonIso(izone_ddft,iiso) 1512 ixt_poubelle=itZonIso(izone_poubelle,iiso) 1513 1513 xtp(ixt_ddft,i,k)=xtp(ixt_ddft,i,k) & 1514 1514 & +xtp(ixt_poubelle,i,k) … … 1524 1524 do k=1,nd 1525 1525 do i = 1, ncum 1526 do izone=1,n traceurs_zone1526 do izone=1,nzone 1527 1527 if (izone.eq.izone_ddft) then 1528 1528 do iiso=1,niso 1529 ixt_ddft=i ndex_trac(izone,iiso)1530 ixt_revap=i ndex_trac(izone_revap,iiso)1529 ixt_ddft=itZonIso(izone,iiso) 1530 ixt_revap=itZonIso(izone_revap,iiso) 1531 1531 xtp(ixt_ddft,i,k)=xtp(iiso,i,k)-xtp(ixt_revap,i,k) 1532 1532 enddo !do iiso=1,niso … … 1535 1535 else !if (izone.eq.izone_ddft) then 1536 1536 do iiso=1,niso 1537 ixt=i ndex_trac(izone,iiso)1537 ixt=itZonIso(izone,iiso) 1538 1538 xtp(ixt,i,k)=0.0 1539 1539 enddo !do iiso=1,niso 1540 1540 endif !if (izone.eq.izone_ddft) then 1541 enddo !do izone=1,n traceurs_zone1541 enddo !do izone=1,nzone 1542 1542 #ifdef ISOVERIF 1543 1543 call iso_verif_traceur(xtp(1,i,k),'cva_driver 1059') -
LMDZ6/branches/Portage_acc/libf/phylmdiso/fisrtilp.F90
r3927 r4446 27 27 USE add_phys_tend_mod, only : fl_cor_ebil 28 28 #ifdef ISO 29 USE infotrac_phy, ONLY: ntraciso ,niso,index_trac,ntraceurs_zone29 USE infotrac_phy, ONLY: ntraciso=>ntiso,niso,itZonIso 30 30 USE isotopes_mod 31 31 !, ONLY: essai_convergence,bidouille_anti_divergence, & … … 143 143 ! Coeffients de fraction lessivee : pour OFF-LINE 144 144 ! 145 REAL, DIMENSION(klon,klev), INTENT( OUT) :: pfrac_nucl146 REAL, DIMENSION(klon,klev), INTENT( OUT) :: pfrac_1nucl147 REAL, DIMENSION(klon,klev), INTENT( OUT) :: pfrac_impa145 REAL, DIMENSION(klon,klev), INTENT(INOUT) :: pfrac_nucl 146 REAL, DIMENSION(klon,klev), INTENT(INOUT) :: pfrac_1nucl 147 REAL, DIMENSION(klon,klev), INTENT(INOUT) :: pfrac_impa 148 148 ! 149 149 ! Fraction d'aerosols lessivee par impaction et par nucleation … … 1510 1510 zxtn(iso_eau,i)=zqn(i) 1511 1511 #ifdef ISOTRAC 1512 zxtn(i ndex_trac(izone_poubelle,iso_eau),i)=zqn(i)1512 zxtn(itZonIso(izone_poubelle,iso_eau),i)=zqn(i) 1513 1513 if (option_tmin.eq.1) then 1514 1514 zxtcs(iso_eau,i)=zqcs(i) … … 1848 1848 ! part le tag résuel et le condensat 1849 1849 if (iso_verif_positif_choix_nostop( & 1850 & zxt_ancien(i ndex_trac(izone,iso_eau),i) &1851 & -zxt(i ndex_trac(izone,iso_eau),i),1e-8,'ilp 1270') &1850 & zxt_ancien(itZonIso(izone,iso_eau),i) & 1851 & -zxt(itZonIso(izone,iso_eau),i),1e-8,'ilp 1270') & 1852 1852 & .eq.1) then 1853 1853 write(*,*) 'i,izone,rneb=',i,izone,rneb(i,k) -
LMDZ6/branches/Portage_acc/libf/phylmdiso/fonte_neige_mod.F90
r4033 r4446 629 629 ! de dépendance circulaire. 630 630 631 USE infotrac_phy, ONLY: nt raciso,niso631 USE infotrac_phy, ONLY: ntiso,niso 632 632 USE isotopes_mod, ONLY: iso_eau 633 633 USE indice_sol_mod … … 639 639 ! inputs 640 640 integer klon,knon 641 real xtprecip_snow(nt raciso,klon),xtprecip_rain(ntraciso,klon)641 real xtprecip_snow(ntiso,klon),xtprecip_rain(ntiso,klon) 642 642 INTEGER, INTENT(IN) :: nisurf 643 643 INTEGER, DIMENSION(klon), INTENT(IN) :: knindex -
LMDZ6/branches/Portage_acc/libf/phylmdiso/isotopes_mod.F90
r4124 r4446 3 3 4 4 MODULE isotopes_mod 5 USE infotrac_phy, ONLY: ntraciso,niso,indnum_fn_num,use_iso, & 6 & niso_possibles 7 IMPLICIT NONE 8 SAVE 9 10 ! contient toutes les variables isotopiques et leur initialisation 11 ! les routines specifiquement isotopiques sont dans 12 ! isotopes_routines_mod pour éviter dépendance circulaire avec 13 ! isotopes_verif_mod. 14 15 16 ! indices des isotopes 17 integer, save :: iso_eau,iso_HDO,iso_O18,iso_O17,iso_HTO ! indices de 1 à niso: les isos n'existant pas sont mis à 0 18 !$OMP THREADPRIVATE(iso_eau,iso_HDO,iso_O18,iso_O17,iso_HTO) 19 20 integer :: iso_eau_possible,iso_HDO_possible,iso_O18_possible,iso_O17_possible,iso_HTO_possible ! indices de 1 à niso_possibles: ils correspondent aux tableaux définis dans infotrac: 21 ! tnom_iso=(/'eau','HDO','O18','O17','HTO'/) 22 ! ce sont ces indices qui doivent être utilisés avec use_iso, puisque use_iso est défini comme DIMENSION(niso_possibles) 23 parameter (iso_eau_possible=1) 24 parameter (iso_HDO_possible=2) 25 parameter (iso_O18_possible=3) 26 parameter (iso_O17_possible=4) 27 parameter (iso_HTO_possible=5) 28 29 integer, save :: ntracisoOR 5 USE strings_mod, ONLY: msg, real2str, int2str, bool2str, maxlen, strIdx, strStack 6 USE infotrac_phy, ONLY: isoName 7 IMPLICIT NONE 8 INTERFACE get_in; MODULE PROCEDURE getinp_s, getinp_i, getinp_r, getinp_l; END INTERFACE get_in 9 SAVE 10 11 !--- Contains all isotopic variables + their initialization 12 !--- Isotopes-specific routines are in isotopes_routines_mod to avoid circular dependencies with isotopes_verif_mod. 13 14 !--- Isotopes indices (in [1,niso] ; non-existing => 0 index) 15 INTEGER, SAVE :: iso_eau, iso_HDO, iso_O18, iso_O17, iso_HTO 16 !$OMP THREADPRIVATE(iso_eau, iso_HDO, iso_O18, iso_O17, iso_HTO) 17 18 INTEGER, SAVE :: ntracisoOR 30 19 !$OMP THREADPRIVATE(ntracisoOR) 31 20 32 ! variables indépendantes des isotopes 33 34 real, save :: pxtmelt,pxtice,pxtmin,pxtmax 35 !$OMP THREADPRIVATE(pxtmelt,pxtice,pxtmin,pxtmax) 36 real, save :: tdifexp, tv0cin, thumxt1 21 !--- Variables not depending on isotopes 22 REAL, SAVE :: pxtmelt, pxtice, pxtmin, pxtmax 23 !$OMP THREADPRIVATE(pxtmelt, pxtice, pxtmin, pxtmax) 24 REAL, SAVE :: tdifexp, tv0cin, thumxt1 37 25 !$OMP THREADPRIVATE(tdifexp, tv0cin, thumxt1) 38 integer, save ::ntot26 INTEGER, SAVE :: ntot 39 27 !$OMP THREADPRIVATE(ntot) 40 real, save ::h_land_ice28 REAL, SAVE :: h_land_ice 41 29 !$OMP THREADPRIVATE(h_land_ice) 42 real, save ::P_veg30 REAL, SAVE :: P_veg 43 31 !$OMP THREADPRIVATE(P_veg) 44 real, save :: musi,lambda_sursat45 !$OMP THREADPRIVATE( lambda_sursat)46 real, save ::Kd32 REAL, SAVE :: musi, lambda_sursat 33 !$OMP THREADPRIVATE(musi, lambda_sursat) 34 REAL, SAVE :: Kd 47 35 !$OMP THREADPRIVATE(Kd) 48 real, save :: rh_cste_surf_cond,T_cste_surf_cond 49 !$OMP THREADPRIVATE(rh_cste_surf_cond,T_cste_surf_cond) 50 51 logical, save :: bidouille_anti_divergence 52 ! si true, rappel régulier de xteau vers q, pour éviter dérives lentes 36 REAL, SAVE :: rh_cste_surf_cond, T_cste_surf_cond 37 !$OMP THREADPRIVATE(rh_cste_surf_cond, T_cste_surf_cond) 38 LOGICAL, SAVE :: bidouille_anti_divergence ! T: regularly, xteau <- q to avoid slow drifts 53 39 !$OMP THREADPRIVATE(bidouille_anti_divergence) 54 logical, save :: essai_convergence 55 ! si false, on fait rigoureusement comme dans LMDZ sans isotopes, 56 ! meme si c'est génant pour les isotopes 40 LOGICAL, SAVE :: essai_convergence ! F: as in LMDZ without isotopes (bad for isotopes) 57 41 !$OMP THREADPRIVATE(essai_convergence) 58 integer, save :: initialisation_iso 59 ! 0: dans fichier 60 ! 1: R=0 61 ! 2: R selon distill rayleigh 62 ! 3: R=Rsmow 42 INTEGER, SAVE :: initialisation_iso ! 0: file ; 1: R=0 ; 2: R=distill. Rayleigh ; 3: R=Rsmow 63 43 !$OMP THREADPRIVATE(initialisation_iso) 64 integer, save :: modif_SST ! 0 par defaut, 1 si on veut modifier la sst 65 ! 2 et 3: profils de SST 44 INTEGER, SAVE :: modif_SST ! 0: default ; 1: modified SST ; 2, 3: SST profiles 66 45 !$OMP THREADPRIVATE(modif_SST) 67 real, save :: deltaTtest ! modif de la SST, uniforme. 46 REAL, SAVE :: deltaTtest ! Uniform modification of the SST 68 47 !$OMP THREADPRIVATE(deltaTtest) 69 integer, save :: modif_sic ! on met des trous dans glace de mer 48 INTEGER, SAVE :: modif_sic ! Holes in the Sea Ice 70 49 !$OMP THREADPRIVATE(modif_sic) 71 real, save :: deltasic ! fraction de trous minimale 50 REAL, SAVE :: deltasic ! Minimal holes fraction 72 51 !$OMP THREADPRIVATE(deltasic) 73 real, save ::deltaTtestpoles52 REAL, SAVE :: deltaTtestpoles 74 53 !$OMP THREADPRIVATE(deltaTtestpoles) 75 real, save :: sstlatcrit 76 !$OMP THREADPRIVATE(sstlatcrit) 77 real, save :: dsstlatcrit 78 !$OMP THREADPRIVATE(dsstlatcrit) 79 real, save :: deltaO18_oce 54 REAL, SAVE :: sstlatcrit, dsstlatcrit 55 !$OMP THREADPRIVATE(sstlatcrit, dsstlatcrit) 56 REAL, SAVE :: deltaO18_oce 80 57 !$OMP THREADPRIVATE(deltaO18_oce) 81 integer, save :: albedo_prescrit ! 0 par defaut 82 ! 1 si on veut garder albedo constant 58 INTEGER, SAVE :: albedo_prescrit ! 0: default ; 1: constant albedo 83 59 !$OMP THREADPRIVATE(albedo_prescrit) 84 real, save :: lon_min_albedo,lon_max_albedo 85 !$OMP THREADPRIVATE(lon_min_albedo,lon_max_albedo) 86 real, save :: lat_min_albedo,lat_max_albedo 87 !$OMP THREADPRIVATE(lat_min_albedo,lat_max_albedo) 88 real, save :: deltaP_BL,tdifexp_sol 60 REAL, SAVE :: lon_min_albedo, lon_max_albedo, lat_min_albedo, lat_max_albedo 61 !$OMP THREADPRIVATE(lon_min_albedo, lon_max_albedo, lat_min_albedo, lat_max_albedo) 62 REAL, SAVE :: deltaP_BL,tdifexp_sol 89 63 !$OMP THREADPRIVATE(deltaP_BL,tdifexp_sol) 90 integer, save :: ruissellement_pluie,alphak_stewart91 !$OMP THREADPRIVATE(ruissellement_pluie, alphak_stewart)92 integer, save ::calendrier_guide64 INTEGER, SAVE :: ruissellement_pluie, alphak_stewart 65 !$OMP THREADPRIVATE(ruissellement_pluie, alphak_stewart) 66 INTEGER, SAVE :: calendrier_guide 93 67 !$OMP THREADPRIVATE(calendrier_guide) 94 integer, save ::cste_surf_cond68 INTEGER, SAVE :: cste_surf_cond 95 69 !$OMP THREADPRIVATE(cste_surf_cond) 96 real, save ::mixlen70 REAL, SAVE :: mixlen 97 71 !$OMP THREADPRIVATE(mixlen) 98 integer, save ::evap_cont_cste72 INTEGER, SAVE :: evap_cont_cste 99 73 !$OMP THREADPRIVATE(evap_cont_cste) 100 real, save :: deltaO18_evap_cont,d_evap_cont101 !$OMP THREADPRIVATE(deltaO18_evap_cont, d_evap_cont)102 integer, save :: nudge_qsol,region_nudge_qsol103 !$OMP THREADPRIVATE(nudge_qsol, region_nudge_qsol)104 integer, save:: nlevmaxO1774 REAL, SAVE :: deltaO18_evap_cont, d_evap_cont 75 !$OMP THREADPRIVATE(deltaO18_evap_cont, d_evap_cont) 76 INTEGER, SAVE :: nudge_qsol, region_nudge_qsol 77 !$OMP THREADPRIVATE(nudge_qsol, region_nudge_qsol) 78 INTEGER, SAVE :: nlevmaxO17 105 79 !$OMP THREADPRIVATE(nlevmaxO17) 106 integer, save :: no_pce 107 ! real, save :: slope_limiterxy,slope_limiterz 80 INTEGER, SAVE :: no_pce 108 81 !$OMP THREADPRIVATE(no_pce) 109 real, save ::A_satlim82 REAL, SAVE :: A_satlim 110 83 !$OMP THREADPRIVATE(A_satlim) 111 integer, save :: ok_restrict_A_satlim,modif_ratqs112 !$OMP THREADPRIVATE(ok_restrict_A_satlim, modif_ratqs)113 real, save :: Pcrit_ratqs,ratqsbasnew114 !$OMP THREADPRIVATE(Pcrit_ratqs, ratqsbasnew)115 real, save ::fac_modif_evaoce84 INTEGER, SAVE :: ok_restrict_A_satlim, modif_ratqs 85 !$OMP THREADPRIVATE(ok_restrict_A_satlim, modif_ratqs) 86 REAL, SAVE :: Pcrit_ratqs, ratqsbasnew 87 !$OMP THREADPRIVATE(Pcrit_ratqs, ratqsbasnew) 88 REAL, SAVE :: fac_modif_evaoce 116 89 !$OMP THREADPRIVATE(fac_modif_evaoce) 117 integer, save ::ok_bidouille_wake90 INTEGER, SAVE :: ok_bidouille_wake 118 91 !$OMP THREADPRIVATE(ok_bidouille_wake) 119 logical ::cond_temp_env92 LOGICAL, SAVE :: cond_temp_env 120 93 !$OMP THREADPRIVATE(cond_temp_env) 121 94 122 123 ! variables tableaux fn de niso 124 real, ALLOCATABLE, DIMENSION(:), save :: tnat, toce, tcorr 125 !$OMP THREADPRIVATE(tnat, toce, tcorr) 126 real, ALLOCATABLE, DIMENSION(:), save :: tdifrel 127 !$OMP THREADPRIVATE(tdifrel) 128 real, ALLOCATABLE, DIMENSION(:), save :: talph1, talph2, talph3 129 !$OMP THREADPRIVATE(talph1, talph2, talph3) 130 real, ALLOCATABLE, DIMENSION(:), save :: talps1, talps2 131 !$OMP THREADPRIVATE(talps1, talps2) 132 real, ALLOCATABLE, DIMENSION(:), save :: tkcin0, tkcin1, tkcin2 95 !--- Vectors of length "niso" 96 REAL, ALLOCATABLE, DIMENSION(:), SAVE :: & 97 tnat, toce, tcorr, tdifrel 98 !$OMP THREADPRIVATE(tnat, toce, tcorr, tdifrel) 99 REAL, ALLOCATABLE, DIMENSION(:), SAVE :: & 100 talph1, talph2, talph3, talps1, talps2 101 !$OMP THREADPRIVATE(talph1, talph2, talph3, talps1, talps2) 102 REAL, ALLOCATABLE, DIMENSION(:), SAVE :: & 103 tkcin0, tkcin1, tkcin2 133 104 !$OMP THREADPRIVATE(tkcin0, tkcin1, tkcin2) 134 real, ALLOCATABLE, DIMENSION(:), save :: alpha_liq_sol 135 !$OMP THREADPRIVATE(alpha_liq_sol) 136 real, ALLOCATABLE, DIMENSION(:), save :: Rdefault, Rmethox 137 !$OMP THREADPRIVATE(Rdefault, Rmethox) 138 character*3, ALLOCATABLE, DIMENSION(:), save :: striso 139 !$OMP THREADPRIVATE(striso) 140 real, save :: fac_coeff_eq17_liq, fac_coeff_eq17_ice 105 REAL, ALLOCATABLE, DIMENSION(:), SAVE :: & 106 alpha_liq_sol, Rdefault, Rmethox 107 !$OMP THREADPRIVATE(alpha_liq_sol, Rdefault, Rmethox) 108 REAL, SAVE :: fac_coeff_eq17_liq, fac_coeff_eq17_ice 141 109 !$OMP THREADPRIVATE(fac_coeff_eq17_liq, fac_coeff_eq17_ice) 142 110 143 real ridicule ! valeur maximale pour qu'une variable de type 144 ! rapoport de mélange puisse être considérée comme négligeable. Si 145 ! négligeable, alors on ne verifie pas si sa compo iso esta bérrante. 146 parameter (ridicule=1e-12) 147 ! parameter (ridicule=1) 148 ! 149 real ridicule_rain ! valeur limite de ridicule pour les flux de pluies (rain, zrfl...) 150 parameter (ridicule_rain=1e-8) ! en kg/s <-> 1e-3mm/day 151 152 real ridicule_evap ! valeur limite de ridicule pour les evap 153 parameter (ridicule_evap=ridicule_rain*1e-2) ! en kg/s <-> 1e-3mm/day 154 155 real ridicule_qsol ! valeur limite de ridicule pour les qsol 156 parameter (ridicule_qsol=ridicule_rain) ! en kg <-> 1e-8kg 157 158 real ridicule_snow ! valeur limite de ridicule pour les snow 159 parameter (ridicule_snow=ridicule_qsol) ! en kg/s <-> 1e-8kg 160 161 real expb_max 162 parameter (expb_max=30.0) 163 164 ! spécifique au tritium: 165 166 167 logical, save :: ok_prod_nucl_tritium ! si oui, production de tritium par essais nucleaires 111 !--- Negligible lower thresholds: no need to check for absurd values under these lower limits 112 REAL, PARAMETER :: & 113 ridicule = 1e-12, & ! For mixing ratios 114 ridicule_rain = 1e-8, & ! For rain fluxes (rain, zrfl...) in kg/s <-> 1e-3 mm/day 115 ridicule_evap = ridicule_rain*1e-2, & ! For evaporations in kg/s <-> 1e-3 mm/day 116 ridicule_qsol = ridicule_rain, & ! For qsol in kg <-> 1e-8 kg 117 ridicule_snow = ridicule_qsol ! For snow in kg <-> 1e-8 kg 118 REAL, PARAMETER :: expb_max = 30.0 119 120 !--- Specific to HTO: 121 LOGICAL, SAVE :: ok_prod_nucl_tritium !--- TRUE => HTO production by nuclear tests 168 122 !$OMP THREADPRIVATE(ok_prod_nucl_tritium) 169 integer nessai 170 parameter (nessai=486) 171 integer, save :: day_nucl(nessai) 172 !$OMP THREADPRIVATE(day_nucl) 173 integer, save :: month_nucl(nessai) 174 !$OMP THREADPRIVATE(month_nucl) 175 integer, save :: year_nucl(nessai) 176 !$OMP THREADPRIVATE(year_nucl) 177 real, save :: lat_nucl(nessai) 178 !$OMP THREADPRIVATE(lat_nucl) 179 real, save :: lon_nucl(nessai) 180 !$OMP THREADPRIVATE(lon_nucl) 181 real, save :: zmin_nucl(nessai) 182 !$OMP THREADPRIVATE(zmin_nucl) 183 real, save :: zmax_nucl(nessai) 184 !$OMP THREADPRIVATE(zmax_nucl) 185 real, save :: HTO_nucl(nessai) 186 !$OMP THREADPRIVATE(HTO_nucl) 187 123 INTEGER, PARAMETER :: nessai = 486 124 INTEGER, DIMENSION(nessai), SAVE :: & 125 day_nucl, month_nucl, year_nucl 126 !$OMP THREADPRIVATE(day_nucl, month_nucl, year_nucl) 127 REAL, DIMENSION(nessai), SAVE :: & 128 lat_nucl, lon_nucl, zmin_nucl, zmax_nucl, HTO_nucl 129 !$OMP THREADPRIVATE(lat_nucl, lon_nucl, zmin_nucl, zmax_nucl, HTO_nucl) 130 188 131 189 132 CONTAINS 190 133 191 SUBROUTINE iso_init() 192 use ioipsl_getin_p_mod, ONLY : getin_p 193 implicit none 194 195 ! -- local variables: 196 197 integer ixt 198 ! référence O18 199 real fac_enrichoce18 200 real alpha_liq_sol_O18, & 201 & talph1_O18,talph2_O18,talph3_O18, & 202 & talps1_O18,talps2_O18, & 203 & tkcin0_O18,tkcin1_O18,tkcin2_O18, & 204 & tdifrel_O18 134 SUBROUTINE iso_init() 135 USE infotrac_phy, ONLY: ntiso, niso, getKey 136 USE strings_mod, ONLY: maxlen 137 IMPLICIT NONE 138 139 !=== Local variables: 140 INTEGER :: ixt 141 142 !--- H2[18]O reference 143 REAL :: fac_enrichoce18, alpha_liq_sol_O18, & 144 talph1_O18, talph2_O18, talph3_O18, talps1_O18, talps2_O18, & 145 tkcin0_O18, tkcin1_O18, tkcin2_O18, tdifrel_O18 146 147 !--- For H2[17]O 148 REAL :: fac_kcin, pente_MWL 205 149 206 ! cas de l'O17 207 real fac_kcin 208 real pente_MWL 209 integer ierr 210 211 logical ok_nocinsat, ok_nocinsfc !sensi test 212 parameter (ok_nocinsfc=.FALSE.) ! if T: no kinetic effect in sfc evap 213 parameter (ok_nocinsat=.FALSE.) ! if T: no sursaturation effect for ice 214 logical Rdefault_smow 215 parameter (Rdefault_smow=.FALSE.) ! si T: Rdefault=smow; si F: nul 216 ! pour le tritium 217 integer iessai 218 219 write(*,*) 'iso_init 219: entree' 220 221 ! allocations mémoire 222 allocate (tnat(niso)) 223 allocate (toce(niso)) 224 allocate (tcorr(niso)) 225 allocate (tdifrel(niso)) 226 allocate (talph1(niso)) 227 allocate (talph2(niso)) 228 allocate (talph3(niso)) 229 allocate (talps1(niso)) 230 allocate (talps2(niso)) 231 allocate (tkcin0(niso)) 232 allocate (tkcin1(niso)) 233 allocate (tkcin2(niso)) 234 allocate (alpha_liq_sol(niso)) 235 allocate (Rdefault(niso)) 236 allocate (Rmethox(niso)) 237 allocate (striso(niso)) 238 239 240 !-------------------------------------------------------------- 241 ! General: 242 !-------------------------------------------------------------- 243 244 ! -- verif du nombre d'isotopes: 245 write(*,*) 'iso_init 64: niso=',niso 246 247 ! init de ntracisoOR: on écrasera en cas de nzone>0 si complications avec 248 ! ORCHIDEE 249 ntracisoOR=ntraciso 250 251 ! -- Type of water isotopes: 252 253 iso_eau=indnum_fn_num(1) 254 iso_HDO=indnum_fn_num(2) 255 iso_O18=indnum_fn_num(3) 256 iso_O17=indnum_fn_num(4) 257 iso_HTO=indnum_fn_num(5) 258 write(*,*) 'iso_init 59: iso_eau=',iso_eau 259 write(*,*) 'iso_HDO=',iso_HDO 260 write(*,*) 'iso_O18=',iso_O18 261 write(*,*) 'iso_O17=',iso_O17 262 write(*,*) 'iso_HTO=',iso_HTO 263 write(*,*) 'iso_init 251: use_iso=',use_iso 264 265 ! initialisation 266 lambda_sursat=0.004 267 thumxt1=0.75*1.2 268 ntot=20 269 h_land_ice=20. ! à comparer aux 3000mm de snow_max 270 P_veg=1.0 271 bidouille_anti_divergence=.false. 272 essai_convergence=.false. 273 initialisation_iso=0 274 modif_sst=0 275 modif_sic=0 276 deltaTtest=0.0 277 deltasic=0.1 278 deltaTtestpoles=0.0 279 sstlatcrit=30.0 280 deltaO18_oce=0.0 281 albedo_prescrit=0 282 lon_min_albedo=-200 283 lon_max_albedo=200 284 lat_min_albedo=-100 285 lat_max_albedo=100 286 deltaP_BL=10.0 287 ruissellement_pluie=0 288 alphak_stewart=1 289 tdifexp_sol=0.67 290 calendrier_guide=0 291 cste_surf_cond=0 292 mixlen=35.0 293 evap_cont_cste=0.0 294 deltaO18_evap_cont=0.0 295 d_evap_cont=0.0 296 nudge_qsol=0 297 region_nudge_qsol=1 298 nlevmaxO17=50 299 no_pce=0 300 A_satlim=1.0 301 ok_restrict_A_satlim=0 302 ! slope_limiterxy=2.0 303 ! slope_limiterz=2.0 304 modif_ratqs=0 305 Pcrit_ratqs=500.0 306 ratqsbasnew=0.05 307 308 fac_modif_evaoce=1.0 309 ok_bidouille_wake=0 310 cond_temp_env=.false. 311 ! si oui, la temperature de cond est celle de l'environnement, 312 ! pour eviter bugs quand temperature dans ascendances convs est 313 ! mal calculee 314 ok_prod_nucl_tritium=.false. 315 316 ! lecture des paramètres isotopiques: 317 ! pour que ça marche en openMP, il faut utiliser getin_p. Car le getin ne peut 318 ! être appelé que par un thread à la fois, et ça pose tout un tas de problème, 319 ! d'où tout un tas de magouilles comme dans conf_phys_m. A terme, tout le monde 320 ! lira par getin_p. 321 call getin_p('lambda',lambda_sursat) 322 call getin_p('thumxt1',thumxt1) 323 call getin_p('ntot',ntot) 324 call getin_p('h_land_ice',h_land_ice) 325 call getin_p('P_veg',P_veg) 326 call getin_p('bidouille_anti_divergence',bidouille_anti_divergence) 327 call getin_p('essai_convergence',essai_convergence) 328 call getin_p('initialisation_iso',initialisation_iso) 329 !if (nzone>0) then 330 !if (initialisation_iso.eq.0) then 331 ! call getin_p('initialisation_isotrac',initialisation_isotrac) 332 !endif !if (initialisation_iso.eq.0) then 333 !endif !if (nzone>0) 334 call getin_p('modif_sst',modif_sst) 335 if (modif_sst.ge.1) then 336 call getin_p('deltaTtest',deltaTtest) 337 if (modif_sst.ge.2) then 338 call getin_p('deltaTtestpoles',deltaTtestpoles) 339 call getin_p('sstlatcrit',sstlatcrit) 150 !--- Sensitivity tests 151 LOGICAL, PARAMETER :: ok_nocinsfc = .FALSE. ! if T: no kinetic effect in sfc evap 152 LOGICAL, PARAMETER :: ok_nocinsat = .FALSE. ! if T: no sursaturation effect for ice 153 LOGICAL, PARAMETER :: Rdefault_smow = .FALSE. ! if T: Rdefault=smow; if F: nul 154 155 !--- For [3]H 156 INTEGER :: iessai 157 158 CHARACTER(LEN=maxlen) :: modname, sxt 159 REAL, ALLOCATABLE :: tmp(:) 160 161 modname = 'iso_init' 162 CALL msg('219: entree', modname) 163 164 !-------------------------------------------------------------- 165 ! General: 166 !-------------------------------------------------------------- 167 168 !--- Check number of isotopes 169 CALL msg('64: niso = '//TRIM(int2str(niso)), modname) 170 171 !--- Init de ntracisoOR: on ecrasera en cas de traceurs de tagging isotopiques 172 ! (nzone>0) si complications avec ORCHIDEE 173 ntracisoOR = ntiso 174 175 !--- Type of water isotopes: 176 iso_eau = strIdx(isoName, 'H216O'); CALL msg('iso_eau='//int2str(iso_eau), modname) 177 iso_HDO = strIdx(isoName, 'HDO'); CALL msg('iso_HDO='//int2str(iso_HDO), modname) 178 iso_O18 = strIdx(isoName, 'H218O'); CALL msg('iso_O18='//int2str(iso_O18), modname) 179 iso_O17 = strIdx(isoName, 'H217O'); CALL msg('iso_O17='//int2str(iso_O17), modname) 180 iso_HTO = strIdx(isoName, 'HTO'); CALL msg('iso_HTO='//int2str(iso_HTO), modname) 181 182 !--- Initialiaation: reading the isotopic parameters. 183 CALL get_in('lambda', lambda_sursat, 0.004) 184 CALL get_in('thumxt1', thumxt1, 0.75*1.2) 185 CALL get_in('ntot', ntot, 20, .FALSE.) 186 CALL get_in('h_land_ice', h_land_ice, 20., .FALSE.) 187 CALL get_in('P_veg', P_veg, 1.0, .FALSE.) 188 CALL get_in('bidouille_anti_divergence', bidouille_anti_divergence, .FALSE.) 189 CALL get_in('essai_convergence', essai_convergence, .FALSE.) 190 CALL get_in('initialisation_iso', initialisation_iso, 0) 191 192 ! IF(nzone>0 .AND. initialisation_iso==0) & 193 ! CALL get_in('initialisation_isotrac',initialisation_isotrac) 194 CALL get_in('modif_sst', modif_sst, 0) 195 CALL get_in('deltaTtest', deltaTtest, 0.0) !--- For modif_sst>=1 196 CALL get_in('deltaTtestpoles',deltaTtestpoles, 0.0) !--- For modif_sst>=2 197 CALL get_in( 'sstlatcrit', sstlatcrit, 30.0) !--- For modif_sst>=3 198 CALL get_in('dsstlatcrit', dsstlatcrit, 0.0) !--- For modif_sst>=3 340 199 #ifdef ISOVERIF 341 !call iso_verif_positif(sstlatcrit,'iso_init 107') 342 if (sstlatcrit.lt.0.0) then 343 write(*,*) 'iso_init 270: sstlatcrit=',sstlatcrit 344 stop 345 endif 200 CALL msg('iso_init 270: sstlatcrit='//real2str( sstlatcrit), modname, sstlatcrit < 0.0) !--- For modif_sst>=2 201 CALL msg('iso_init 279: dsstlatcrit='//real2str(dsstlatcrit), modname, sstlatcrit < 0.0) !--- For modif_sst>=3 202 IF(modif_sst >= 2 .AND. sstlatcrit < 0.0) STOP 346 203 #endif 347 if (modif_sst.ge.3) then 348 call getin_p('dsstlatcrit',dsstlatcrit) 204 205 CALL get_in('modif_sic', modif_sic, 0) 206 IF(modif_sic >= 1) & 207 CALL get_in('deltasic', deltasic, 0.1) 208 209 CALL get_in('albedo_prescrit', albedo_prescrit, 0) 210 IF(albedo_prescrit == 1) THEN 211 CALL get_in('lon_min_albedo', lon_min_albedo, -200.) 212 CALL get_in('lon_max_albedo', lon_max_albedo, 200.) 213 CALL get_in('lat_min_albedo', lat_min_albedo, -100.) 214 CALL get_in('lat_max_albedo', lat_max_albedo, 100.) 215 END IF 216 deltaO18_oce=0.0 217 CALL get_in('deltaP_BL', deltaP_BL, 10.0) 218 CALL get_in('ruissellement_pluie', ruissellement_pluie, 0) 219 CALL get_in('alphak_stewart', alphak_stewart, 1) 220 CALL get_in('tdifexp_sol', tdifexp_sol, 0.67) 221 CALL get_in('calendrier_guide', calendrier_guide, 0) 222 CALL get_in('cste_surf_cond', cste_surf_cond, 0) 223 CALL get_in('mixlen', mixlen, 35.0) 224 CALL get_in('evap_cont_cste', evap_cont_cste, 0) 225 CALL get_in('deltaO18_evap_cont', deltaO18_evap_cont,0.0) 226 CALL get_in('d_evap_cont', d_evap_cont, 0.0) 227 CALL get_in('nudge_qsol', nudge_qsol, 0) 228 CALL get_in('region_nudge_qsol', region_nudge_qsol, 1) 229 nlevmaxO17 = 50 230 CALL msg('nlevmaxO17='//TRIM(int2str(nlevmaxO17))) 231 CALL get_in('no_pce', no_pce, 0) 232 CALL get_in('A_satlim', A_satlim, 1.0) 233 CALL get_in('ok_restrict_A_satlim', ok_restrict_A_satlim, 0) 349 234 #ifdef ISOVERIF 350 !call iso_verif_positif(dsstlatcrit,'iso_init 110') 351 if (sstlatcrit.lt.0.0) then 352 write(*,*) 'iso_init 279: dsstlatcrit=',dsstlatcrit 353 stop 354 endif 355 #endif 356 endif !if (modif_sst.ge.3) then 357 endif !if (modif_sst.ge.2) then 358 endif ! if (modif_sst.ge.1) then 359 call getin_p('modif_sic',modif_sic) 360 if (modif_sic.ge.1) then 361 call getin_p('deltasic',deltasic) 362 endif !if (modif_sic.ge.1) then 363 364 call getin_p('albedo_prescrit',albedo_prescrit) 365 call getin_p('lon_min_albedo',lon_min_albedo) 366 call getin_p('lon_max_albedo',lon_max_albedo) 367 call getin_p('lat_min_albedo',lat_min_albedo) 368 call getin_p('lat_max_albedo',lat_max_albedo) 369 call getin_p('deltaO18_oce',deltaO18_oce) 370 call getin_p('deltaP_BL',deltaP_BL) 371 call getin_p('ruissellement_pluie',ruissellement_pluie) 372 call getin_p('alphak_stewart',alphak_stewart) 373 call getin_p('tdifexp_sol',tdifexp_sol) 374 call getin_p('calendrier_guide',calendrier_guide) 375 call getin_p('cste_surf_cond',cste_surf_cond) 376 call getin_p('mixlen',mixlen) 377 call getin_p('evap_cont_cste',evap_cont_cste) 378 call getin_p('deltaO18_evap_cont',deltaO18_evap_cont) 379 call getin_p('d_evap_cont',d_evap_cont) 380 call getin_p('nudge_qsol',nudge_qsol) 381 call getin_p('region_nudge_qsol',region_nudge_qsol) 382 call getin_p('no_pce',no_pce) 383 call getin_p('A_satlim',A_satlim) 384 call getin_p('ok_restrict_A_satlim',ok_restrict_A_satlim) 385 #ifdef ISOVERIF 386 !call iso_verif_positif(1.0-A_satlim,'iso_init 158') 387 if (A_satlim.gt.1.0) then 388 write(*,*) 'iso_init 315: A_satlim=',A_satlim 389 stop 390 endif 391 #endif 392 ! call getin_p('slope_limiterxy',slope_limiterxy) 393 ! call getin_p('slope_limiterz',slope_limiterz) 394 call getin_p('modif_ratqs',modif_ratqs) 395 call getin_p('Pcrit_ratqs',Pcrit_ratqs) 396 call getin_p('ratqsbasnew',ratqsbasnew) 397 call getin_p('fac_modif_evaoce',fac_modif_evaoce) 398 call getin_p('ok_bidouille_wake',ok_bidouille_wake) 399 call getin_p('cond_temp_env',cond_temp_env) 400 if (use_iso(iso_HTO_possible)) then 401 ok_prod_nucl_tritium=.true. 402 call getin_p('ok_prod_nucl_tritium',ok_prod_nucl_tritium) 403 endif 404 405 write(*,*) 'lambda,thumxt1=',lambda_sursat,thumxt1 406 write(*,*) 'bidouille_anti_divergence=',bidouille_anti_divergence 407 write(*,*) 'essai_convergence=',essai_convergence 408 write(*,*) 'initialisation_iso=',initialisation_iso 409 write(*,*) 'modif_sst=',modif_sst 410 if (modif_sst.ge.1) then 411 write(*,*) 'deltaTtest=',deltaTtest 412 if (modif_sst.ge.2) then 413 write(*,*) 'deltaTtestpoles,sstlatcrit=', & 414 & deltaTtestpoles,sstlatcrit 415 if (modif_sst.ge.3) then 416 write(*,*) 'dsstlatcrit=',dsstlatcrit 417 endif !if (modif_sst.ge.3) then 418 endif !if (modif_sst.ge.2) then 419 endif !if (modif_sst.ge.1) then 420 write(*,*) 'modif_sic=',modif_sic 421 if (modif_sic.ge.1) then 422 write(*,*) 'deltasic=',deltasic 423 endif !if (modif_sic.ge.1) then 424 write(*,*) 'deltaO18_oce=',deltaO18_oce 425 write(*,*) 'albedo_prescrit=',albedo_prescrit 426 if (albedo_prescrit.eq.1) then 427 write(*,*) 'lon_min_albedo,lon_max_albedo=', & 428 & lon_min_albedo,lon_max_albedo 429 write(*,*) 'lat_min_albedo,lat_max_albedo=', & 430 & lat_min_albedo,lat_max_albedo 431 endif !if (albedo_prescrit.eq.1) then 432 write(*,*) 'deltaP_BL,ruissellement_pluie,alphak_stewart=', & 433 & deltaP_BL,ruissellement_pluie,alphak_stewart 434 write(*,*) 'cste_surf_cond=',cste_surf_cond 435 write(*,*) 'mixlen=',mixlen 436 write(*,*) 'tdifexp_sol=',tdifexp_sol 437 write(*,*) 'calendrier_guide=',calendrier_guide 438 write(*,*) 'evap_cont_cste=',evap_cont_cste 439 write(*,*) 'deltaO18_evap_cont,d_evap_cont=', & 440 & deltaO18_evap_cont,d_evap_cont 441 write(*,*) 'nudge_qsol,region_nudge_qsol=', & 442 & nudge_qsol,region_nudge_qsol 443 write(*,*) 'nlevmaxO17=',nlevmaxO17 444 write(*,*) 'no_pce=',no_pce 445 write(*,*) 'A_satlim=',A_satlim 446 write(*,*) 'ok_restrict_A_satlim=',ok_restrict_A_satlim 447 ! write(*,*) 'slope_limiterxy=',slope_limiterxy 448 ! write(*,*) 'slope_limiterz=',slope_limiterz 449 write(*,*) 'modif_ratqs=',modif_ratqs 450 write(*,*) 'Pcrit_ratqs=',Pcrit_ratqs 451 write(*,*) 'ratqsbasnew=',ratqsbasnew 452 write(*,*) 'fac_modif_evaoce=',fac_modif_evaoce 453 write(*,*) 'ok_bidouille_wake=',ok_bidouille_wake 454 write(*,*) 'cond_temp_env=',cond_temp_env 455 write(*,*) 'ok_prod_nucl_tritium=',ok_prod_nucl_tritium 456 457 458 !-------------------------------------------------------------- 459 ! Parameters that do not depend on the nature of water isotopes: 460 !-------------------------------------------------------------- 461 462 ! -- temperature at which ice condensate starts to form (valeur ECHAM?): 463 pxtmelt=273.15 464 ! pxtmelt=273.15-10.0 ! test PHASE 465 466 ! -- temperature at which all condensate is ice: 467 pxtice=273.15-10.0 468 ! pxtice=273.15-30.0 ! test PHASE 469 470 ! -- minimum temperature to calculate fractionation coeff 471 pxtmin=273.15-120.0 ! On ne calcule qu'au dessus de -120°C 472 pxtmax=273.15+60.0 ! On ne calcule qu'au dessus de +60°C 473 ! remarque: les coeffs ont été mesurés seulement jusq'à -40! 474 475 ! -- a constant for alpha_eff for equilibrium below cloud base: 476 tdifexp=0.58 477 tv0cin=7.0 478 479 ! facteurs lambda et mu dans Si=musi-lambda*T 480 musi=1.0 481 if (ok_nocinsat) then 482 lambda_sursat = 0.0 ! no sursaturation effect 483 endif 484 485 486 ! diffusion dans le sol 487 Kd=2.5e-9 ! m2/s 488 489 ! cas où cste_surf_cond: on met rhs ou/et Ts cste pour voir 490 rh_cste_surf_cond=0.6 491 T_cste_surf_cond=288.0 492 493 !-------------------------------------------------------------- 494 ! Parameters that depend on the nature of water isotopes: 495 !-------------------------------------------------------------- 496 ! ** constantes locales 497 fac_enrichoce18=0.0005 498 ! on a alors tcor018=1+fac_enrichoce18 499 ! tcorD=1+fac_enrichoce18*8 500 ! tcorO17=1+fac_enrichoce18*0.528 501 alpha_liq_sol_O18=1.00291 ! valeur de Lehmann & Siegenthaler, 1991, 502 ! Journal of Glaciology, vol 37, p 23 503 talph1_O18=1137. 504 talph2_O18=-0.4156 505 talph3_O18=-2.0667E-3 506 talps1_O18=11.839 507 talps2_O18=-0.028244 508 tkcin0_O18 = 0.006 509 tkcin1_O18 = 0.000285 510 tkcin2_O18 = 0.00082 511 tdifrel_O18= 1./0.9723 512 513 ! rapport des ln(alphaeq) entre O18 et O17 514 fac_coeff_eq17_liq=0.529 ! donné par Amaelle 515 ! fac_coeff_eq17_ice=0.528 ! slope MWL 516 fac_coeff_eq17_ice=0.529 517 518 519 write(*,*) 'iso_O18,iso_HDO,iso_eau=',iso_O18,iso_HDO,iso_eau 520 do 999 ixt = 1, niso 521 write(*,*) 'iso_init 80: ixt=',ixt 522 523 524 ! -- kinetic factor for surface evaporation: 525 ! (cf: kcin = tkcin0 if |V|<tv0cin 526 ! kcin = tkcin1*|Vsurf| + tkcin2 if |V|>tv0cin ) 527 ! (Rq: formula discontinuous for |V|=tv0cin... ) 528 529 ! -- main: 530 if (ixt.eq.iso_HTO) then ! Tritium 531 tkcin0(ixt) = 0.01056 532 tkcin1(ixt) = 0.0005016 533 tkcin2(ixt) = 0.0014432 534 tnat(ixt)=0. 535 !toce(ixt)=2.2222E-8 ! corrigé par Alex Cauquoin 536 !toce(ixt)=1.0E-18 ! rapport 3H/1H ocean 537 toce(ixt)=4.0E-19 ! rapport T/H = 0.2 TU Dreisigacker and Roether 1978 538 tcorr(ixt)=1. 539 tdifrel(ixt)=1./0.968 540 talph1(ixt)=46480. 541 talph2(ixt)=-103.87 542 talph3(ixt)=0. 543 talps1(ixt)=46480. 544 talps2(ixt)=-103.87 545 alpha_liq_sol(ixt)=1. 546 Rdefault(ixt)=0.0 547 Rmethox(ixt)=0.0 548 striso(ixt)='HTO' 549 endif 550 if (ixt.eq.iso_O17) then ! Deuterium 551 pente_MWL=0.528 552 ! tdifrel(ixt)=1./0.985452 ! donné par Amaelle 553 tdifrel(ixt)=1./0.98555 ! valeur utilisée en 1D et dans modèle de LdG 554 ! fac_kcin=0.5145 ! donné par Amaelle 555 fac_kcin= (tdifrel(ixt)-1.0)/(tdifrel_O18-1.0) 556 tkcin0(ixt) = tkcin0_O18*fac_kcin 557 tkcin1(ixt) = tkcin1_O18*fac_kcin 558 tkcin2(ixt) = tkcin2_O18*fac_kcin 559 tnat(ixt)=0.004/100. ! O17 représente 0.004% de l'oxygène 560 toce(ixt)=tnat(ixt)*(1.0+deltaO18_oce/1000.0)**pente_MWL 561 tcorr(ixt)=1.0+fac_enrichoce18*pente_MWL ! donné par Amaelle 562 talph1(ixt)=talph1_O18 563 talph2(ixt)=talph2_O18 564 talph3(ixt)=talph3_O18 565 talps1(ixt)=talps1_O18 566 talps2(ixt)=talps2_O18 567 alpha_liq_sol(ixt)=(alpha_liq_sol_O18)**fac_coeff_eq17_liq 568 if (Rdefault_smow) then 569 Rdefault(ixt)=tnat(ixt)*(-3.15/1000.0+1.0) 570 else 571 Rdefault(ixt)=0.0 572 endif 573 Rmethox(ixt)=(230./1000.+1.)*tnat(ixt) !Zahn et al 2006 574 striso(ixt)='O17' 575 endif 576 577 if (ixt.eq.iso_O18) then ! Oxygene18 578 tkcin0(ixt) = tkcin0_O18 579 tkcin1(ixt) = tkcin1_O18 580 tkcin2(ixt) = tkcin2_O18 581 tnat(ixt)=2005.2E-6 582 toce(ixt)=tnat(ixt)*(1.0+deltaO18_oce/1000.0) 583 tcorr(ixt)=1.0+fac_enrichoce18 584 tdifrel(ixt)=tdifrel_O18 585 talph1(ixt)=talph1_O18 586 talph2(ixt)=talph2_O18 587 talph3(ixt)=talph3_O18 588 talps1(ixt)=talps1_O18 589 talps2(ixt)=talps2_O18 590 alpha_liq_sol(ixt)=alpha_liq_sol_O18 591 if (Rdefault_smow) then 592 Rdefault(ixt)=tnat(ixt)*(-6.0/1000.0+1.0) 593 else 594 Rdefault(ixt)=0.0 595 endif 596 Rmethox(ixt)=(130./1000.+1.)*tnat(ixt) !Zahn et al 2006 597 ! write(*,*) 'iso_init 163: ZXalpha_liq_sol=',ZXalpha_liq_sol 598 striso(ixt)='O18' 599 write(*,*) 'isotopes_mod 519: ixt,striso(ixt)=',ixt,striso(ixt) 600 endif 601 602 if (ixt.eq.iso_HDO) then ! Deuterium 603 pente_MWL=8.0 604 ! fac_kcin=0.88 605 tdifrel(ixt)=1./0.9755 606 fac_kcin= (tdifrel(ixt)-1)/(tdifrel_O18-1) 607 tkcin0(ixt) = tkcin0_O18*fac_kcin 608 tkcin1(ixt) = tkcin1_O18*fac_kcin 609 tkcin2(ixt) = tkcin2_O18*fac_kcin 610 tnat(ixt)=155.76E-6 611 toce(ixt)=tnat(ixt)*(1.0+pente_MWL*deltaO18_oce/1000.0) 612 tcorr(ixt)=1.0+fac_enrichoce18*pente_MWL 613 talph1(ixt)=24844. 614 talph2(ixt)=-76.248 615 talph3(ixt)=52.612E-3 616 talps1(ixt)=16288. 617 talps2(ixt)=-0.0934 618 !ZXalpha_liq_sol=1.0192 ! Weston, Ralph, 1955 619 alpha_liq_sol(ixt)=1.0212 620 ! valeur de Lehmann & Siegenthaler, 1991, Journal of 621 ! Glaciology, vol 37, p 23 622 if (Rdefault_smow) then 623 Rdefault(ixt)=tnat(ixt)*((-6.0*pente_MWL+10.0)/1000.0+1.0) 624 else 625 Rdefault(ixt)=0.0 626 endif 627 Rmethox(ixt)=tnat(ixt)*(-25.0/1000.+1.) ! Zahn et al 2006 628 striso(ixt)='HDO' 629 write(*,*) 'isotopes_mod 548: ixt,striso(ixt)=',ixt,striso(ixt) 630 endif 631 632 ! write(*,*) 'iso_init 163: ZXalpha_liq_sol=',ZXalpha_liq_sol 633 if (ixt.eq.iso_eau) then ! Oxygene16 634 tkcin0(ixt) = 0.0 635 tkcin1(ixt) = 0.0 636 tkcin2(ixt) = 0.0 637 tnat(ixt)=1. 638 toce(ixt)=tnat(ixt) 639 tcorr(ixt)=1.0 640 tdifrel(ixt)=1. 641 talph1(ixt)=0. 642 talph2(ixt)=0. 643 talph3(ixt)=0. 644 talps1(ixt)=0. 645 talph3(ixt)=0. 646 alpha_liq_sol(ixt)=1. 647 if (Rdefault_smow) then 648 Rdefault(ixt)=tnat(ixt)*1.0 649 else 650 Rdefault(ixt)=1.0 651 endif 652 Rmethox(ixt)=1.0 653 striso(ixt)='eau' 654 endif 655 656 999 continue 657 658 ! test de sensibilité: 659 if (ok_nocinsfc) then ! no kinetic effect in sfc evaporation 660 do ixt=1,niso 661 tkcin0(ixt) = 0.0 662 tkcin1(ixt) = 0.0 663 tkcin2(ixt) = 0.0 664 enddo 665 endif 666 667 ! nom des isotopes 668 669 ! verif 670 write(*,*) 'iso_init 285: verif initialisation:' 671 672 do ixt=1,niso 673 write(*,*) '* striso(',ixt,')=<'//striso(ixt)//'>' 674 write(*,*) 'tnat(',ixt,')=',tnat(ixt) 675 ! write(*,*) 'alpha_liq_sol(',ixt,')=',alpha_liq_sol(ixt) 676 ! write(*,*) 'tkcin0(',ixt,')=',tkcin0(ixt) 677 ! write(*,*) 'tdifrel(',ixt,')=',tdifrel(ixt) 678 enddo 679 write(*,*) 'iso_init 69: lambda=',lambda_sursat 680 write(*,*) 'iso_init 69: thumxt1=',thumxt1 681 write(*,*) 'iso_init 69: h_land_ice=',h_land_ice 682 write(*,*) 'iso_init 69: P_veg=',P_veg 683 684 return 235 CALL msg(' 315: A_satlim='//real2str(A_satlim), modname, A_satlim > 1.0) 236 IF(A_satlim > 1.0) STOP 237 #endif 238 ! CALL get_in('slope_limiterxy', slope_limiterxy, 2.0) 239 ! CALL get_in('slope_limiterz', slope_limiterz, 2.0) 240 CALL get_in('modif_ratqs', modif_ratqs, 0) 241 CALL get_in('Pcrit_ratqs', Pcrit_ratqs, 500.0) 242 CALL get_in('ratqsbasnew', ratqsbasnew, 0.05) 243 CALL get_in('fac_modif_evaoce', fac_modif_evaoce, 1.0) 244 CALL get_in('ok_bidouille_wake', ok_bidouille_wake, 0) 245 ! si oui, la temperature de cond est celle de l'environnement, pour eviter 246 ! bugs quand temperature dans ascendances convs est mal calculee 247 CALL get_in('cond_temp_env', cond_temp_env, .FALSE.) 248 IF(ANY(isoName == 'HTO')) & 249 CALL get_in('ok_prod_nucl_tritium', ok_prod_nucl_tritium, .FALSE., .FALSE.) 250 251 !-------------------------------------------------------------- 252 ! Parameters that do not depend on the nature of water isotopes: 253 !-------------------------------------------------------------- 254 ! -- temperature at which ice condensate starts to form (valeur ECHAM?): 255 pxtmelt = 273.15 256 257 ! -- temperature at which all condensate is ice: 258 pxtice = 273.15-10.0 259 260 !- -- test PHASE 261 ! pxtmelt = 273.15 - 10.0 262 ! pxtice = 273.15 - 30.0 263 264 ! -- minimum temperature to calculate fractionation coeff 265 pxtmin = 273.15 - 120.0 ! On ne calcule qu'au dessus de -120°C 266 pxtmax = 273.15 + 60.0 ! On ne calcule qu'au dessus de +60°C 267 ! Remarque: les coeffs ont ete mesures seulement jusq'à -40! 268 269 ! -- a constant for alpha_eff for equilibrium below cloud base: 270 tdifexp = 0.58 271 tv0cin = 7.0 272 273 ! facteurs lambda et mu dans Si=musi-lambda*T 274 musi=1.0 275 if (ok_nocinsat) lambda_sursat = 0.0 ! no sursaturation effect 276 277 ! diffusion dans le sol 278 Kd=2.5e-9 ! m2/s 279 280 ! cas où cste_surf_cond: on met rhs ou/et Ts cste pour voir 281 rh_cste_surf_cond = 0.6 282 T_cste_surf_cond = 288.0 283 284 CALL msg('iso_O18, iso_HDO, iso_eau = '//TRIM(strStack(int2str([iso_O18, iso_HDO, iso_eau]))), modname) 285 286 !-------------------------------------------------------------- 287 ! Parameters that depend on the nature of water isotopes: 288 !-------------------------------------------------------------- 289 IF(getKey('tnat', tnat, isoName)) CALL abort_physic(modname, 'can''t get tnat', 1) 290 IF(getKey('toce', toce, isoName)) CALL abort_physic(modname, 'can''t get toce', 1) 291 IF(getKey('tcorr', tcorr, isoName)) CALL abort_physic(modname, 'can''t get tcorr', 1) 292 IF(getKey('talph1', talph1, isoName)) CALL abort_physic(modname, 'can''t get talph1', 1) 293 IF(getKey('talph2', talph2, isoName)) CALL abort_physic(modname, 'can''t get talph2', 1) 294 IF(getKey('talph3', talph3, isoName)) CALL abort_physic(modname, 'can''t get talph3', 1) 295 IF(getKey('talps1', talps1, isoName)) CALL abort_physic(modname, 'can''t get talps1', 1) 296 IF(getKey('talps2', talps2, isoName)) CALL abort_physic(modname, 'can''t get talps2', 1) 297 IF(getKey('tkcin0', tkcin0, isoName)) CALL abort_physic(modname, 'can''t get tkcin0', 1) 298 IF(getKey('tkcin1', tkcin1, isoName)) CALL abort_physic(modname, 'can''t get tkcin1', 1) 299 IF(getKey('tkcin2', tkcin2, isoName)) CALL abort_physic(modname, 'can''t get tkcin2', 1) 300 IF(getKey('tdifrel', tdifrel, isoName)) CALL abort_physic(modname, 'can''t get tdifrel', 1) 301 IF(getKey('alpha_liq_sol', alpha_liq_sol, isoName)) CALL abort_physic(modname, 'can''t get alpha_liq_sol', 1) 302 IF(getKey('Rdefault',Rdefault,isoName)) CALL abort_physic(modname, 'can''t get Rdefault',1) 303 IF(getKey('Rmethox', Rmethox, isoName)) CALL abort_physic(modname, 'can''t get Rmethox', 1) 304 IF(.NOT.Rdefault_smow) Rdefault(:) = 0.0 305 306 !--- Sensitivity test: no kinetic effect in sfc evaporation 307 IF(ok_nocinsfc) THEN 308 tkcin0(1:niso) = 0.0 309 tkcin1(1:niso) = 0.0 310 tkcin2(1:niso) = 0.0 311 END IF 312 313 CALL msg('285: verif initialisation:', modname) 314 DO ixt=1,niso 315 sxt=int2str(ixt) 316 CALL msg(' * isoName('//TRIM(sxt)//') = <'//TRIM(isoName(ixt))//'>', modname) 317 CALL msg( ' tnat('//TRIM(sxt)//') = '//TRIM(real2str(tnat(ixt))), modname) 318 ! CALL msg(' alpha_liq_sol('//TRIM(sxt)//') = '//TRIM(real2str(alpha_liq_sol(ixt))), modname) 319 ! CALL msg( ' tkcin0('//TRIM(sxt)//') = '//TRIM(real2str(tkcin0(ixt))), modname) 320 ! CALL msg( ' tdifrel('//TRIM(sxt)//') = '//TRIM(real2str(tdifrel(ixt))), modname) 321 END DO 322 CALL msg('69: lambda = '//TRIM(real2str(lambda_sursat)), modname) 323 CALL msg('69: thumxt1 = '//TRIM(real2str(thumxt1)), modname) 324 CALL msg('69: h_land_ice = '//TRIM(real2str(h_land_ice)), modname) 325 CALL msg('69: P_veg = '//TRIM(real2str(P_veg)), modname) 326 685 327 END SUBROUTINE iso_init 686 328 329 330 SUBROUTINE getinp_s(nam, val, def, lDisp) 331 USE ioipsl_getincom, ONLY: getin 332 USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root 333 USE mod_phys_lmdz_omp_data, ONLY : is_omp_root 334 USE mod_phys_lmdz_transfert_para, ONLY : bcast 335 CHARACTER(LEN=*), INTENT(IN) :: nam 336 CHARACTER(LEN=*), INTENT(INOUT) :: val 337 CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: def 338 LOGICAL, OPTIONAL, INTENT(IN) :: lDisp 339 LOGICAL :: lD 340 !$OMP BARRIER 341 IF(is_mpi_root.AND.is_omp_root) THEN 342 IF(PRESENT(def)) val=def; CALL getin(nam,val) 343 lD=.TRUE.; IF(PRESENT(lDisp)) lD=lDisp 344 IF(lD) CALL msg(TRIM(nam)//' = '//TRIM(val)) 345 END IF 346 CALL bcast(val) 347 END SUBROUTINE getinp_s 348 349 SUBROUTINE getinp_i(nam, val, def, lDisp) 350 USE ioipsl_getincom, ONLY: getin 351 USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root 352 USE mod_phys_lmdz_omp_data, ONLY : is_omp_root 353 USE mod_phys_lmdz_transfert_para, ONLY : bcast 354 CHARACTER(LEN=*), INTENT(IN) :: nam 355 INTEGER, INTENT(INOUT) :: val 356 INTEGER, OPTIONAL, INTENT(IN) :: def 357 LOGICAL, OPTIONAL, INTENT(IN) :: lDisp 358 LOGICAL :: lD 359 !$OMP BARRIER 360 IF(is_mpi_root.AND.is_omp_root) THEN 361 IF(PRESENT(def)) val=def; CALL getin(nam,val) 362 lD=.TRUE.; IF(PRESENT(lDisp)) lD=lDisp 363 IF(lD) CALL msg(TRIM(nam)//' = '//TRIM(int2str(val))) 364 END IF 365 CALL bcast(val) 366 END SUBROUTINE getinp_i 367 368 SUBROUTINE getinp_r(nam, val, def, lDisp) 369 USE ioipsl_getincom, ONLY: getin 370 USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root 371 USE mod_phys_lmdz_omp_data, ONLY : is_omp_root 372 USE mod_phys_lmdz_transfert_para, ONLY : bcast 373 CHARACTER(LEN=*), INTENT(IN) :: nam 374 REAL, INTENT(INOUT) :: val 375 REAL, OPTIONAL, INTENT(IN) :: def 376 LOGICAL, OPTIONAL, INTENT(IN) :: lDisp 377 LOGICAL :: lD 378 !$OMP BARRIER 379 IF(is_mpi_root.AND.is_omp_root) THEN 380 IF(PRESENT(def)) val=def; CALL getin(nam,val) 381 lD=.TRUE.; IF(PRESENT(lDisp)) lD=lDisp 382 IF(lD) CALL msg(TRIM(nam)//' = '//TRIM(real2str(val))) 383 END IF 384 CALL bcast(val) 385 END SUBROUTINE getinp_r 386 387 SUBROUTINE getinp_l(nam, val, def, lDisp) 388 USE ioipsl_getincom, ONLY: getin 389 USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root 390 USE mod_phys_lmdz_omp_data, ONLY : is_omp_root 391 USE mod_phys_lmdz_transfert_para, ONLY : bcast 392 CHARACTER(LEN=*), INTENT(IN) :: nam 393 LOGICAL, INTENT(INOUT) :: val 394 LOGICAL, OPTIONAL, INTENT(IN) :: def 395 LOGICAL, OPTIONAL, INTENT(IN) :: lDisp 396 LOGICAL :: lD 397 !$OMP BARRIER 398 IF(is_mpi_root.AND.is_omp_root) THEN 399 IF(PRESENT(def)) val=def; CALL getin(nam,val) 400 lD=.TRUE.; IF(PRESENT(lDisp)) lD=lDisp 401 IF(lD) CALL msg(TRIM(nam)//' = '//TRIM(bool2str(val))) 402 END IF 403 CALL bcast(val) 404 END SUBROUTINE getinp_l 687 405 688 406 END MODULE isotopes_mod -
LMDZ6/branches/Portage_acc/libf/phylmdiso/isotopes_routines_mod.F90
r4089 r4446 3 3 4 4 MODULE isotopes_routines_mod 5 USE infotrac_phy, ONLY: niso, ntraciso=>ntiso, index_trac=>itZonIso, ntraceurs_zone=>nzone 5 6 IMPLICIT NONE 6 7 … … 13 14 & zqs,zq_ancien,zqev_diag,zq) 14 15 15 USE infotrac_phy, ONLY: ntraciso,niso, &16 ntraceurs_zone,index_trac17 16 USE isotopes_mod, ONLY: ridicule, ridicule_rain, thumxt1, no_pce, & 18 17 & bidouille_anti_divergence, & … … 846 845 & L, xtnu,Pveg) 847 846 848 USE infotrac_phy, ONLY: niso849 847 USE isotopes_mod, ONLY: ridicule_qsol, ridicule, & 850 848 & ridicule_evap,P_veg,iso_HDO,iso_eau,iso_O17,iso_O18 … … 1301 1299 1302 1300 subroutine calcul_kcin(Vsurf,KCIN) 1303 USE infotrac_phy, ONLY: niso1304 1301 USE isotopes_mod, ONLY: tv0cin,tkcin0,tkcin1,tkcin2 1305 1302 implicit none … … 1328 1325 1329 1326 subroutine fractcalk(kt, ptin, pxtfra, pfraice) 1330 !USE infotrac_phy, ONLY: use_iso1331 1327 USE isotopes_mod, ONLY: talph1,talph2,talph3,pxtmin,iso_O17, & 1332 1328 & fac_coeff_eq17_liq, pxtmelt, & … … 1457 1453 subroutine fractcalk_liq(kt, ptin, pxtfra) 1458 1454 1459 ! USE infotrac_phy, ONLY: use_iso1460 1455 USE isotopes_mod, ONLY: pxtmin,talph1,talph2,talph3, & 1461 1456 & fac_coeff_eq17_liq, pxtice, & … … 1522 1517 subroutine fractcalk_glace(kt, ptin, pfraice) 1523 1518 1524 ! use infotrac_phy, ONLY: use_iso1525 1519 use isotopes_mod, ONLY: talps1,talps2, iso_O17,fac_coeff_eq17_ice, & 1526 1520 & pxtmelt,musi, lambda_sursat, tdifrel, & … … 1631 1625 subroutine fractcalk_vectall(ptin, pxtfra, pfraice,n) 1632 1626 1633 USE infotrac_phy, ONLY: niso1634 1627 USE isotopes_mod, ONLY: talph1,talph2,talph3,tdifrel,pxtmin, & 1635 1628 & iso_O17, iso_HTO, iso_eau, iso_O18, iso_HDO, musi, lambda_sursat, & … … 1803 1796 subroutine fractcalk_vectall_liq(ptin, pxtfra, n) 1804 1797 1805 USE infotrac_phy, ONLY: niso1806 1798 USE isotopes_mod, ONLY: pxtmin,talph1,talph2,talph3, & 1807 1799 & iso_eau,iso_HDO, iso_O18, iso_O17,iso_HTO,fac_coeff_eq17_liq, & … … 1882 1874 subroutine fractcalk_vectall_ice(ptin, pfraice,n) 1883 1875 1884 use infotrac_phy, ONLY: niso1885 1876 use isotopes_mod, ONLY: talps1,talps2, fac_coeff_eq17_ice, & 1886 1877 & pxtmelt,musi, lambda_sursat, tdifrel, & … … 2023 2014 & i,Rsol,klon) 2024 2015 2025 USE infotrac_phy, ONLY: niso,ntraciso2026 2016 USE isotopes_mod, ONLY: iso_eau, iso_HDO,ridicule, & 2027 2017 & ridicule_qsol,iso_O17,iso_O18 … … 2233 2223 & i,xtevap,klon) 2234 2224 2235 USE infotrac_phy, ONLY: ntraciso,niso2236 2225 USE isotopes_mod, ONLY: iso_eau, iso_HDO,ridicule,ridicule_rain, & 2237 2226 iso_O18,iso_O17 … … 2444 2433 & ) 2445 2434 2446 USE infotrac_phy, ONLY: ntraciso,niso2447 2435 USE isotopes_mod, ONLY: iso_eau, iso_HDO,expb_max,tdifrel,tdifexp, & 2448 2436 & ridicule,thumxt1,ridicule_rain,bidouille_anti_divergence, & … … 4500 4488 & Tevap) 4501 4489 4502 USE infotrac_phy, ONLY: niso,ntraciso4503 4490 USE isotopes_mod, ONLY: iso_eau, iso_HDO,bidouille_anti_divergence, & 4504 4491 & ridicule,ridicule_rain … … 4658 4645 & ,fac_ftmr) 4659 4646 4660 USE infotrac_phy, ONLY: niso,ntraciso4661 4647 USE isotopes_mod, ONLY: iso_eau, iso_HDO,bidouille_anti_divergence, & 4662 4648 & Rdefault,ridicule,ridicule_rain … … 4904 4890 & Pqiinf_cas,Pqiinf) 4905 4891 4906 USE infotrac_phy, ONLY: niso,ntraciso4907 4892 USE isotopes_mod, ONLY: iso_eau, iso_HDO 4908 4893 … … 5066 5051 & xtnew_cas,xtnew,Pxtiinf_cas,Pxtiinf) 5067 5052 5068 USE infotrac_phy, ONLY: niso5069 5053 USE isotopes_mod, ONLY: iso_eau, iso_HDO 5070 5054 #ifdef ISOVERIF … … 5111 5095 & ncum) 5112 5096 5113 USE infotrac_phy, ONLY: niso,ntraciso5114 5097 USE isotopes_mod, ONLY: iso_eau, iso_HDO 5115 5098 … … 5176 5159 & nloc,ncum,nd,i) 5177 5160 5178 USE infotrac_phy, ONLY: niso, ntraciso5179 5161 USE isotopes_mod, ONLY: iso_eau, iso_HDO 5180 5162 … … 5252 5234 & nloc,ncum,nd,i) 5253 5235 5254 USE infotrac_phy, ONLY: niso,ntraciso5255 5236 USE isotopes_mod, ONLY: iso_eau, iso_HDO 5256 5237 … … 5326 5307 & nloc,ncum,nd,i) 5327 5308 5328 USE infotrac_phy, ONLY: niso,ntraciso5329 5309 USE isotopes_mod, ONLY: iso_eau, iso_HDO 5330 5310 … … 5396 5376 & nloc,ncum,nd,i) 5397 5377 5398 USE infotrac_phy, ONLY: niso,ntraciso5399 5378 USE isotopes_mod, ONLY: iso_eau, iso_HDO,ridicule 5400 5379 … … 5566 5545 & nloc,ncum,nd,i,frac_sublim) 5567 5546 5568 USE infotrac_phy, ONLY: niso,ntraciso5569 5547 USE isotopes_mod, ONLY: iso_eau, iso_HDO,ridicule 5570 5548 … … 5703 5681 & zxtrfln_cas,zxt_cas,zxtrfl,zxtrfln,zxt,klon) 5704 5682 5705 USE infotrac_phy, ONLY: niso,ntraciso5706 5683 USE isotopes_mod, ONLY: iso_eau, iso_HDO 5707 5684 … … 5739 5716 & delP,paprs,k,klon,klev) 5740 5717 5741 USE infotrac_phy, ONLY: niso5742 5718 USE isotopes_mod, ONLY: iso_eau, iso_HDO 5743 5719 implicit none … … 5777 5753 & delP,paprs,k,klon,klev) 5778 5754 5779 USE infotrac_phy, ONLY: niso,ntraciso5780 5755 USE isotopes_mod, ONLY: iso_eau, iso_HDO 5781 5756 implicit none … … 5828 5803 & delP,paprs,k,klon,klev,frac_sublim) 5829 5804 5830 USE infotrac_phy, ONLY: niso,ntraciso5831 5805 USE isotopes_mod, ONLY: iso_eau, iso_HDO 5832 5806 #ifdef ISOVERIF … … 5905 5879 & qp0,A,m0,beta,gama,g0) 5906 5880 5907 USE infotrac_phy, ONLY: niso5908 5881 USE isotopes_mod, ONLY: iso_eau, iso_HDO,ntot 5909 5882 #ifdef ISOVERIF … … 6100 6073 6101 6074 6102 USE infotrac_phy, ONLY: ntraciso,niso,ntraceurs_zone, &6103 & index_trac6104 6075 USE isotopes_mod, ONLY: iso_eau, iso_HDO,thumxt1, & 6105 6076 & bidouille_anti_divergence,ridicule … … 7680 7651 & ) 7681 7652 7682 USE infotrac_phy, ONLY: niso,ntraciso7683 7653 USE isotopes_mod, ONLY: iso_eau, iso_HDO, Rdefault, ridicule 7684 7654 #ifdef ISOVERIF … … 8048 8018 & ) 8049 8019 8050 USE infotrac_phy, ONLY: niso,ntraciso8051 8020 USE isotopes_mod, ONLY: iso_eau, iso_HDO, Rdefault,ridicule 8052 8021 #ifdef ISOVERIF … … 8253 8222 & ) 8254 8223 8255 USE infotrac_phy, ONLY: niso,ntraciso8256 8224 USE isotopes_mod, ONLY: iso_eau, iso_HDO, Rdefault,ridicule 8257 8225 #ifdef ISOVERIF … … 8390 8358 & ,xtp_cas,xtwater_cas,xtevap_cas) 8391 8359 8392 USE infotrac_phy, ONLY: niso,ntraciso8393 8360 USE isotopes_mod, ONLY: iso_eau, iso_HDO,no_pce, Rdefault,ridicule 8394 8361 #ifdef ISOVERIF … … 8927 8894 & ,xtp_cas,xtwater_cas,xtevap_cas) 8928 8895 8929 USE infotrac_phy, ONLY: niso,ntraciso8930 8896 USE isotopes_mod, ONLY: iso_eau, iso_HDO, Rdefault, ridicule 8931 8897 #ifdef ISOVERIF … … 9317 9283 9318 9284 9319 USE infotrac_phy, ONLY: niso,ntraciso, &9320 & ntraceurs_zone,index_trac9321 9285 USE isotopes_mod, ONLY: iso_eau, iso_HDO,bidouille_anti_divergence, & 9322 9286 & thumxt1, ridicule … … 11022 10986 & ) 11023 10987 11024 USE infotrac_phy, ONLY: niso,ntraciso11025 10988 USE isotopes_mod, ONLY: iso_eau, iso_HDO,Rdefault,ridicule 11026 10989 #ifdef ISOVERIF … … 11172 11135 & ,xtp_cas,xtwater_cas,xtevap_cas) 11173 11136 11174 USE infotrac_phy, ONLY: niso,ntraciso11175 11137 USE isotopes_mod, ONLY: iso_eau, iso_HDO,Rdefault,no_pce,ridicule 11176 11138 #ifdef ISOVERIF … … 11770 11732 & ,xtp_cas,xtwater_cas,xtevap_cas) 11771 11733 11772 USE infotrac_phy, ONLY: niso,ntraciso11773 11734 USE isotopes_mod, ONLY: iso_eau, iso_HDO, Rdefault, ridicule 11774 11735 #ifdef ISOVERIF … … 12198 12159 & tcond,zfice,zxtice,zxtliq) 12199 12160 12200 USE infotrac_phy, ONLY: ntraciso,niso12201 12161 USE isotopes_mod, ONLY: iso_eau,iso_HDO,essai_convergence, & 12202 12162 & bidouille_anti_divergence,ridicule … … 12432 12392 & tcond,zfice,zxtice,zxtliq,n) 12433 12393 12434 USE infotrac_phy, ONLY: ntraciso,niso12435 12394 USE isotopes_mod, ONLY: iso_eau,iso_HDO,iso_O18,bidouille_anti_divergence, & 12436 12395 & ridicule … … 12890 12849 & tcond,zfice,zxtice,zxtliq) 12891 12850 12892 USE infotrac_phy, ONLY: ntraciso12893 12851 USE isotopes_mod, ONLY: iso_eau,iso_HDO,bidouille_anti_divergence, & 12894 12852 & ridicule,iso_O18 … … 13088 13046 & xt1lay,q1lay,tsurf,t_coup,nisurf,Rland_ice) 13089 13047 13090 USE infotrac_phy, ONLY: ntraciso,niso13091 13048 USE isotopes_mod, ONLY: Rdefault,iso_eau,iso_HDO, & 13092 13049 & bidouille_anti_divergence, ridicule,ridicule_snow, & … … 13658 13615 & ) 13659 13616 13660 USE infotrac_phy, ONLY: ntraciso,niso13661 13617 USE isotopes_mod, ONLY: iso_eau,iso_HDO,cste_surf_cond, & 13662 13618 & rh_cste_surf_cond,Rdefault,T_cste_surf_cond,iso_O17,iso_O18, & … … 13982 13938 & ) 13983 13939 13984 USE infotrac_phy, ONLY: ntraciso,niso13985 13940 USE isotopes_mod, ONLY: tcorr, toce, alpha_liq_sol,ridicule_evap, & 13986 13941 iso_eau,iso_HDO … … 14238 14193 & ) 14239 14194 14240 USE infotrac_phy, ONLY: ntraciso,niso14241 14195 USE isotopes_mod, ONLY: h_land_ice, ridicule,ridicule_snow,ridicule_evap, & 14242 14196 iso_eau,iso_HDO,iso_O18 … … 14573 14527 & ) 14574 14528 14575 USE infotrac_phy, ONLY: niso,ntraciso14576 14529 USE isotopes_mod, ONLY: tdifrel,tdifexp_sol, iso_eau, iso_HDO, & 14577 14530 & bidouille_anti_divergence,ruissellement_pluie, Rdefault,Kd, & … … 16001 15954 !USE write_field_phy 16002 15955 USE indice_sol_mod, only: nbsrf 16003 USE infotrac_phy, ONLY: ntraciso,niso16004 15956 USE isotopes_mod, ONLY: initialisation_iso, iso_eau,iso_HDO, & 16005 15957 ridicule_qsol,tnat, P_veg,iso_O18,ridicule, ridicule_snow,iso_O17, & … … 16187 16139 !USE write_field_phy 16188 16140 USE indice_sol_mod, only: nbsrf 16189 USE infotrac_phy, ONLY: ntraciso,niso16190 16141 USE isotopes_mod, ONLY: tnat,iso_HDO,iso_O18,iso_HTO, iso_eau,toce, & 16191 16142 & Rdefault,iso_O17,ridicule,ridicule_qsol … … 16557 16508 end subroutine phyiso_etat0_dur 16558 16509 16559 subroutine phyiso_etat0_fichier( & 16560 & snow,run_off_lic_0, & 16561 & xtsnow,xtrun_off_lic_0, & 16562 & Rland_ice) 16563 USE dimphy, only: klon,klev 16564 !USE mod_grid_phy_lmdz 16565 !USE mod_phys_lmdz_para 16566 USE iophy 16567 USE phys_state_var_mod, ONLY: q_ancien,xt_ancien,wake_deltaq,wake_deltaxt, & 16568 #ifdef ISOVERIF 16569 rain_fall,snow_fall,fevap,qsol, & 16570 #endif 16571 xtrain_fall,xtsnow_fall,ql_ancien,xtl_ancien,qs_ancien,xts_ancien, & 16572 fxtevap,xtsol 16573 !USE iostart 16574 !USE write_field_phy 16575 USE indice_sol_mod, only: nbsrf 16576 USE infotrac_phy, ONLY: ntraciso,niso 16577 USE isotopes_mod, ONLY: striso,iso_HDO,iso_eau 16578 #ifdef ISOVERIF 16579 USE isotopes_verif_mod 16510 SUBROUTINE phyiso_etat0_fichier(snow, run_off_lic_0, xtsnow, xtrun_off_lic_0, Rland_ice) 16511 USE dimphy, ONLY: klon,klev 16512 USE iophy 16513 USE phys_state_var_mod, ONLY: q_ancien, xt_ancien, wake_deltaq, wake_deltaxt, & 16514 #ifdef ISOVERIF 16515 rain_fall, snow_fall, fevap,qsol, & 16516 #endif 16517 xtrain_fall, xtsnow_fall, ql_ancien, xtl_ancien, qs_ancien, xts_ancien, fxtevap, xtsol 16518 USE indice_sol_mod, ONLY: nbsrf 16519 USE isotopes_mod, ONLY: isoName,iso_HDO,iso_eau 16520 USE phyetat0_get_mod, ONLY: phyetat0_get, phyetat0_srf 16521 USE readTracFiles_mod, ONLY: new2oldH2O 16522 USE strings_mod, ONLY: strIdx, strTail, maxlen, msg, int2str 16523 #ifdef ISOVERIF 16524 USE isotopes_verif_mod 16580 16525 #endif 16581 16526 #ifdef ISOTRAC 16582 USE isotrac_mod, ONLY: strtrac,initialisation_isotrac,index_iso, & 16583 & index_zone,izone_init 16584 #endif 16585 implicit none 16527 USE isotrac_mod, ONLY: strtrac, initialisation_isotrac, index_iso, index_zone, izone_init 16528 #endif 16529 IMPLICIT NONE 16586 16530 16587 16531 #include "netcdf.inc" 16588 16532 #include "dimsoil.h" 16589 16533 #include "clesphys.h" 16590 ! #include "thermcell.h"16591 16534 #include "compbl.h" 16592 16535 16593 ! inputs 16594 !REAL qsol(klon) 16595 REAL snow(klon,nbsrf) 16596 !REAL evap(klon,nbsrf) 16597 REAL run_off_lic_0(klon) 16598 ! outputs 16599 !REAL xtsol(niso,klon) 16600 REAL xtsnow(niso,klon,nbsrf) 16601 !REAL xtevap(ntraciso,klon,nbsrf) 16602 REAL xtrun_off_lic_0(niso,klon) 16603 REAL Rland_ice(niso,klon) 16604 16605 ! locals 16606 real iso_tmp(klon) 16607 real iso_tmp_lonlev(klon,klev) 16608 real iso_tmp_lonsrf(klon,nbsrf) 16609 INTEGER ierr 16610 integer i,ixt,k,nsrf 16611 INTEGER nid, nvarid 16612 CHARACTER*2 str2 16613 CHARACTER*5 str5 16614 real xmin,xmax 16615 CHARACTER*50 striso_sortie 16616 integer lnblnk 16617 LOGICAL :: found,phyetat0_get,phyetat0_srf 16618 16619 !#ifdef ISOVERIF 16620 ! integer iso_verif_egalite_nostop 16621 !#endif 16622 !#ifdef ISOVERIF 16623 ! real deltaD 16624 ! integer iso_verif_noNaN_nostop 16625 !#endif 16536 REAL, INTENT(IN) :: snow (klon,nbsrf) 16537 REAL, INTENT(IN) :: run_off_lic_0 (klon) 16538 REAL, INTENT(OUT) :: xtsnow(niso,klon,nbsrf) 16539 REAL, INTENT(OUT) :: xtrun_off_lic_0(niso,klon) 16540 REAL, INTENT(OUT) :: Rland_ice(niso,klon) 16541 16542 INTEGER :: ierr, i, ixt, k, nsrf, nid, nvarid, lnblnk 16543 CHARACTER(LEN=2) :: str2 16544 CHARACTER(LEN=5) :: str5 16545 CHARACTER(LEN=maxlen) :: outiso, oldIso, modname, nam(2) 16546 REAL :: xmin, xmax 16547 LOGICAL :: found 16626 16548 #ifdef ISOTRAC 16627 integer iiso,izone16628 #endif 16629 16630 16631 write(*,*) 'phyiso_etat0_fichier 3'16632 write(*,*) 'niso=',niso16633 write(*,*) 'striso(1)=',striso(1)16634 16635 do ixt=1,ntraciso16636 16637 if (ixt.le.niso) then16638 striso_sortie=striso(ixt)16639 else16549 INTEGER :: iiso, izone 16550 #endif 16551 16552 modname = 'phyiso_etat0_fichier' 16553 CALL msg('3', modname) 16554 CALL msg('niso = '//TRIM(int2str(niso)), modname) 16555 CALL msg('isoName(1) = '//TRIM(isoName(1)), modname) 16556 16557 DO ixt = 1, ntraciso 16558 16559 outiso = isoName(ixt) 16560 oldIso = strTail(new2oldH2O(outiso), '_') !--- Remove "H2O_" from "H2O_<iso>[_<tag>]" 16561 ! on lit seulement si ixt<=niso ou si on initialise les traceurs d'après fichier: 16640 16562 #ifdef ISOTRAC 16641 iiso=index_iso(ixt) 16642 izone=index_zone(ixt) 16643 striso_sortie=striso(iiso)//strtrac(izone) 16644 #else 16645 write(*,*) 'phyredem 546: ixt,ntraciso=', ixt,ntraciso 16646 stop 16647 #endif 16648 endif !if (ixt.le.niso) then 16649 write(*,*) 'phyiso_etat0_fichier 16621: ixt,striso_sortie=',ixt,striso_sortie(1:lnblnk(striso_sortie)) 16650 16651 16652 ! on lit seulement si ixt<=niso ou si on initialise les traceurs d'après 16653 ! fichier: 16563 IF(ixt <= niso .OR. initialisation_isotrac == 0) THEN 16564 #endif 16565 found = phyetat0iso_srf3(xtsnow, "XTSNOW", "Surface snow", 0.) 16566 if (.NOT.found) CALL abort_physic('isotopes_routines_mod', 'phyiso_etat0_fichier 16581: unfound isotopic variable',1) 16567 found = phyetat0iso_srf3(fxtevap, "XTEVAP", "evaporation", 0.) 16568 found = phyetat0iso_get2(xtrain_fall, "xtrain_f", "xrain fall", 0.) 16569 found = phyetat0iso_get2(xtsnow_fall, "xtsnow_f", "xsnow fall", 0.) 16570 found = phyetat0iso_get3(xt_ancien, "XTANCIEN", "QANCIEN", 0.) 16571 found = phyetat0iso_get3(xtl_ancien, "XTLANCIEN", "QLANCIEN", 0.) 16572 found = phyetat0iso_get3(xts_ancien, "XTSANCIEN", "QSANCIEN", 0.) 16573 found = phyetat0iso_get2(xtrun_off_lic_0, "XTRUNOFFLIC0", "RUNOFFLIC0", 0.) 16574 found = phyetat0iso_get3(wake_deltaxt, "WAKE_DELTAXT", "Delta hum. wake/env", 0.) 16575 #ifdef ISOVERIF 16576 IF(ixt == iso_eau .AND. iso_eau > 0) THEN 16577 DO i=1,klon 16578 CALL iso_verif_egalite(xtrain_fall(iso_eau,i),rain_fall(i),TRIM(modname)//' 231a') 16579 CALL iso_verif_egalite(xtsnow_fall(iso_eau,i),snow_fall(i),TRIM(modname)//' 231b') 16580 DO nsrf = 1, nbsrf 16581 CALL iso_verif_egalite(fxtevap(iso_eau,i,nsrf),fevap(i,nsrf),TRIM(modname)//' 231c') 16582 CALL iso_verif_egalite( xtsnow(iso_eau,i,nsrf), snow(i,nsrf),TRIM(modname)//' 231d') 16583 END DO 16584 END DO 16585 END IF 16586 IF(ixt == iso_HDO .AND. iso_HDO > 0) THEN 16587 DO k=1,klev 16588 DO i=1,klon 16589 IF(q_ancien(i,k) > 2e-3) & 16590 CALL iso_verif_aberrant(xt_ancien(iso_hdo,i,k)/q_ancien(i,k),TRIM(modname)//' 312') 16591 END DO 16592 END DO 16593 END IF 16594 IF(iso_eau > 0 .AND. ixt == iso_eau) THEN 16595 DO i=1,klon 16596 IF(iso_verif_egalite_nostop(run_off_lic_0(i),xtrun_off_lic_0(iso_eau,i),TRIM(modname)//' 326') == 1) THEN 16597 WRITE(*,*) 'i=',i 16598 STOP 16599 END IF 16600 END DO 16601 END IF 16602 #endif 16603 ! ces variables n'ont pas de traceurs: 16604 IF(ixt <= niso) THEN 16605 found = phyetat0iso_get2(xtsol, "XTSOL", "Surface humidity / bucket", 0.) 16606 found = phyetat0iso_get2(Rland_ice, "Rland_ice", "SR land ice", 0.) 16607 #ifdef ISOVERIF 16608 16609 DO i=1,klon 16610 IF(iso_verif_noNaN_nostop(xtsol(ixt,i),TRIM(modname)//' 95') == 1) THEN 16611 WRITE(*,*) 'ixt,i=',ixt,i 16612 STOP 16613 END IF 16614 END DO 16615 #endif 16616 END IF 16654 16617 #ifdef ISOTRAC 16655 if ((ixt.le.niso).or.(initialisation_isotrac.eq.0)) then 16656 #endif 16657 16658 found=phyetat0_srf(1,iso_tmp_lonsrf,"XTSNOW"//striso_sortie(1:lnblnk(striso_sortie)), & 16659 & "Surface snow",0.) 16660 if (.NOT.found) then 16661 CALL abort_physic('isotopes_routines_mod', & 16662 'phyiso_etat0_fichier 16581: variable isotopique not found',1) 16663 endif 16664 xtsnow(ixt,:,:)=iso_tmp_lonsrf(:,:) 16665 16666 found=phyetat0_srf(1,iso_tmp_lonsrf,"XTEVAP"//striso_sortie & 16667 & (1:lnblnk(striso_sortie)),"evaporation",0.) 16668 fxtevap(ixt,:,:)=iso_tmp_lonsrf(:,:) 16669 16670 found=phyetat0_get(1,iso_tmp,"xtrain_f"//striso_sortie & 16671 & (1:lnblnk(striso_sortie)),"xrain fall",0.) 16672 xtrain_fall(ixt,:)=iso_tmp(:) 16673 16674 found=phyetat0_get(1,iso_tmp,"xtsnow_f"//striso_sortie & 16675 & (1:lnblnk(striso_sortie)),"snow fall",0.) 16676 xtsnow_fall(ixt,:)=iso_tmp(:) 16677 16678 found=phyetat0_get(klev,iso_tmp_lonlev,"XTANCIEN"//striso_sortie & 16679 & (1:lnblnk(striso_sortie)),"QANCIEN",0.) 16680 xt_ancien(ixt,:,:)=iso_tmp_lonlev(:,:) 16681 16682 found=phyetat0_get(klev,iso_tmp_lonlev,"XTLANCIEN"//striso_sortie & 16683 & (1:lnblnk(striso_sortie)),"QLANCIEN",0.) 16684 xtl_ancien(ixt,:,:)=iso_tmp_lonlev(:,:) 16685 16686 found=phyetat0_get(klev,iso_tmp_lonlev,"XTSANCIEN"//striso_sortie & 16687 & (1:lnblnk(striso_sortie)),"QSANCIEN",0.) 16688 xts_ancien(ixt,:,:)=iso_tmp_lonlev(:,:) 16689 16690 16691 found=phyetat0_get(1,iso_tmp,"XTRUNOFFLIC0"//striso_sortie(1:lnblnk(striso_sortie)), & 16692 & "RUNOFFLIC0",0.) 16693 xtrun_off_lic_0(ixt,:)=iso_tmp(:) 16694 16695 16696 found=phyetat0_get(klev,iso_tmp_lonlev,"WAKE_DELTAXT"//striso_sortie & 16697 & (1:lnblnk(striso_sortie)),"Delta hum. wake/env",0.) 16698 wake_deltaxt(ixt,:,:)=iso_tmp_lonlev(:,:) 16699 16700 #ifdef ISOVERIF 16701 if ((ixt.eq.iso_eau).and.(iso_eau.gt.0)) then 16702 do i=1,klon 16703 call iso_verif_egalite(xtrain_fall(iso_eau,i),rain_fall(i), & 16704 & 'phyisoetat0_fichier 231a') 16705 call iso_verif_egalite(xtsnow_fall(iso_eau,i),snow_fall(i), & 16706 & 'phyisoetat0_fichier 231b') 16707 DO nsrf = 1, nbsrf 16708 call iso_verif_egalite(fxtevap(iso_eau,i,nsrf),fevap(i,nsrf), & 16709 & 'phyisoetat0_fichier 231c') 16710 call iso_verif_egalite(xtsnow(iso_eau,i,nsrf),snow(i,nsrf), & 16711 & 'phyisoetat0_fichier 231d') 16712 enddo !DO nsrf = 1, nbsrf 16713 enddo !do i=1,klon 16714 endif !if (iso_eau.gt.0) then 16715 if ((iso_HDO.gt.0).and.(ixt.eq.iso_HDO)) then 16716 do k=1,klev 16717 do i=1,klon 16718 if (q_ancien(i,k).gt.2e-3) then 16719 call iso_verif_aberrant(xt_ancien(iso_hdo,i,k) & 16720 & /q_ancien(i,k),'phyisoetat0_fichier 312') 16721 endif !if (q_ancien(i,k).gt.2e-3) then 16722 enddo !do i=1,klon 16723 enddo !do k=1,klev 16724 endif !if ((iso_HDO.gt.0).and.(ixt.eq.iso_HDO)) then 16725 if (iso_eau.gt.0) then 16726 do i=1,klon 16727 if (iso_verif_egalite_nostop(run_off_lic_0(i), & 16728 & xtrun_off_lic_0(iso_eau,i), & 16729 & 'phyiso_etat0_fichier 326').eq.1) then 16730 write(*,*) 'i=',i 16731 stop 16732 endif !if (iso_verif_egalite_nostop(run_off_lic_0(i), 16733 enddo !do i=1,klon 16734 endif !if (iso_eau.gt.0) then 16735 #endif 16736 16737 ! ces variables n'ont pas de traceurs: 16738 if (ixt.le.niso) then 16739 found=phyetat0_get(1,iso_tmp,"XTSOL"//striso_sortie(1:lnblnk(striso_sortie)), & 16740 & "Surface hmidity / bucket",0.) 16741 xtsol(ixt,:)=iso_tmp(:) 16742 16743 found=phyetat0_get(1,iso_tmp,"Rland_ice"//striso_sortie & 16744 & (1:lnblnk(striso_sortie)),"R land ice",0.) 16745 Rland_ice(ixt,:)=iso_tmp(:) 16746 16747 #ifdef ISOVERIF 16748 do i=1,klon 16749 if (iso_verif_noNaN_nostop(xtsol(ixt,i), & 16750 & 'phyiso_etat0_fichier 95').eq.1) then 16751 write(*,*) 'ixt,i=',ixt,i 16752 stop 16753 endif 16754 enddo !do i=1,klon 16755 #endif 16756 16757 endif 16618 END IF ! IF(ixt > niso .OR. initialisation_isotrac == 0)) 16619 #endif 16620 16621 END DO 16758 16622 16759 16623 #ifdef ISOTRAC 16760 endif !if ((ixt.le.niso).or.(initialisation_isotrac.eq.0)) then 16761 #endif 16762 16763 enddo !do ixt=1,ntraciso 16764 16765 #ifdef ISOTRAC 16766 if (initialisation_isotrac.ne.0) then 16767 ! on n'initialise pas d'après le fichier 16768 ! l'eau normale est mise dans la zone izone_init 16769 16770 do ixt=niso+1,ntraciso 16771 16772 iiso=index_iso(ixt) 16773 16774 if (index_zone(ixt).eq.izone_init) then 16775 do i=1,klon 16776 do nsrf = 1, nbsrf 16777 fxtevap(ixt,i,nsrf)=fxtevap(iiso,i,nsrf) 16778 enddo !do nsrf = 1, nbsrf 16779 xtsnow_fall(ixt,i)=xtsnow_fall(iiso,i) 16780 xtrain_fall(ixt,i)=xtrain_fall(iiso,i) 16781 do k=1,klev 16782 xt_ancien(ixt,i,k)=xt_ancien(iiso,i,k) 16783 xtl_ancien(ixt,i,k)=xtl_ancien(iiso,i,k) 16784 xts_ancien(ixt,i,k)=xts_ancien(iiso,i,k) 16785 wake_deltaxt(ixt,i,k)= wake_deltaxt(iiso,i,k) 16786 enddo 16787 enddo !do i=1,klon 16788 else !if (index_zone(ixt).eq.izone_init) then 16789 do i=1,klon 16790 do nsrf = 1, nbsrf 16791 fxtevap(ixt,i,nsrf)=0.0 16792 enddo !do nsrf = 1, nbsrf 16793 xtsnow_fall(ixt,i)=0.0 16794 xtrain_fall(ixt,i)=0.0 16795 do k=1,klev 16796 xt_ancien(ixt,i,k)=0.0 16797 xtl_ancien(ixt,i,k)=0.0 16798 xts_ancien(ixt,i,k)=0.0 16799 enddo 16800 enddo !do i=1,klon 16801 endif !if (index_zone(ixt).eq.izone_init) then 16802 16803 enddo !do ixt=1,niso 16804 endif !if (initialisation_isotrac.eq.0) then 16805 16806 16807 #ifdef ISOVERIF 16808 DO nsrf = 1, nbsrf 16809 do i=1,klon 16810 call iso_verif_traceur(fxtevap(1,i,nsrf), & 16811 & 'phyiso_etat0_fichier 426') 16812 enddo !do i=1,klon 16813 enddo !DO nsrf = 1, nbsrf 16814 do i=1,klon 16815 call iso_verif_traceur(xtrain_fall(1,i), & 16816 & 'phyiso_etat0_fichier 466') 16817 call iso_verif_traceur(xtsnow_fall(1,i), & 16818 & 'phyiso_etat0_fichier 468') 16819 enddo !do i=1,klon 16820 do k=1,klev 16821 do i=1,klon 16822 call iso_verif_traceur(xt_ancien(1,i,k), & 16823 & 'phyiso_etat0_fichier 591') 16824 enddo !do i=1,klon 16825 enddo !do k=1,klev 16624 IF(initialisation_isotrac /= 0) THEN 16625 ! On n'initialise pas d'apres le fichier. L'eau normale est mise dans la zone izone_init 16626 DO ixt=niso+1,ntraciso 16627 iiso=index_iso(ixt) 16628 IF(index_zone(ixt) == izone_init) THEN 16629 DO i = 1, klon 16630 fxtevap(ixt,i,1:nbsrf) = fxtevap(iiso,i,1:nbsrf) 16631 xtsnow_fall(ixt,i) = xtsnow_fall(iiso,i) 16632 xtrain_fall(ixt,i) = xtrain_fall(iiso,i) 16633 DO k = 1, klev 16634 xt_ancien (ixt,i,k) = xt_ancien (iiso,i,k) 16635 xtl_ancien (ixt,i,k) = xtl_ancien (iiso,i,k) 16636 xts_ancien (ixt,i,k) = xts_ancien (iiso,i,k) 16637 wake_deltaxt(ixt,i,k) = wake_deltaxt(iiso,i,k) 16638 END DO 16639 END DO 16640 ELSE 16641 DO i = 1, klon 16642 fxtevap(ixt,i,1:nbsrf)=0.0 16643 xtsnow_fall(ixt,i)=0.0 16644 xtrain_fall(ixt,i)=0.0 16645 xt_ancien (ixt,i,1:klev) = 0.0 16646 xtl_ancien(ixt,i,1:klev) = 0.0 16647 xts_ancien(ixt,i,1:klev) = 0.0 16648 END DO 16649 END IF 16650 END DO 16651 END IF 16652 16653 #ifdef ISOVERIF 16654 DO nsrf = 1, nbsrf 16655 DO i = 1, klon 16656 CALL iso_verif_traceur(fxtevap(1,i,nsrf), 'phyiso_etat0_fichier 426') 16657 END DO 16658 END DO 16659 DO i=1,klon 16660 CALL iso_verif_traceur(xtrain_fall(1,i), 'phyiso_etat0_fichier 466') 16661 CALL iso_verif_traceur(xtsnow_fall(1,i), 'phyiso_etat0_fichier 468') 16662 END DO 16663 DO k = 1, klev 16664 DO i = 1, klon 16665 CALL iso_verif_traceur(xt_ancien(1,i,k), 'phyiso_etat0_fichier 591') 16666 END DO 16667 END DO 16826 16668 #endif 16827 16669 ! endif ISOVERIF … … 16829 16671 ! endif ISOTRAC 16830 16672 16831 ! on ferme le fichier 16832 ! CALL close_startphy 16833 ! déjà fermé dans phyetat0 16673 CONTAINS 16674 16675 LOGICAL FUNCTION phyetat0iso_get2(field, pref, descr, default) RESULT(lFound) 16676 REAL, INTENT(INOUT) :: field(:,:) 16677 CHARACTER(LEN=*), INTENT(IN) :: pref, descr 16678 REAL, INTENT(IN) :: default 16679 REAL :: iso_tmp(klon) 16680 nam(1) = TRIM(pref)//TRIM(outiso) 16681 nam(2) = TRIM(pref)//TRIM(oldIso) 16682 lFound = phyetat0_get(iso_tmp, nam, descr, default) 16683 field(ixt,:) = iso_tmp 16684 END FUNCTION phyetat0iso_get2 16685 16686 16687 LOGICAL FUNCTION phyetat0iso_get3(field, pref, descr, default) RESULT(lFound) 16688 REAL, INTENT(INOUT) :: field(:,:,:) 16689 CHARACTER(LEN=*), INTENT(IN) :: pref, descr 16690 REAL, INTENT(IN) :: default 16691 REAL :: iso_tmp_lonlev(klon,klev) 16692 nam(1) = TRIM(pref)//TRIM(outiso) 16693 nam(2) = TRIM(pref)//TRIM(oldIso) 16694 lFound = phyetat0_get(iso_tmp_lonlev, nam, descr, default) 16695 field(ixt,:,:) = iso_tmp_lonlev(:,:) 16696 END FUNCTION phyetat0iso_get3 16697 16698 LOGICAL FUNCTION phyetat0iso_srf3(field, pref, descr, default) RESULT(lFound) 16699 REAL, INTENT(INOUT) :: field(:,:,:) 16700 CHARACTER(LEN=*), INTENT(IN) :: pref, descr 16701 REAL, INTENT(IN) :: default 16702 REAL :: iso_tmp_lonsrf(klon,nbsrf) 16703 nam(1) = TRIM(pref)//TRIM(outiso) 16704 nam(2) = TRIM(pref)//TRIM(oldIso) 16705 lFound = phyetat0_srf(iso_tmp_lonsrf, nam, descr, default) 16706 field(ixt,:,:) = iso_tmp_lonsrf 16707 END FUNCTION phyetat0iso_srf3 16834 16708 16835 16709 end subroutine phyiso_etat0_fichier 16710 16711 16836 16712 16837 16713 … … 16849 16725 & d_xt_decroiss, & 16850 16726 & xt_seri) 16851 USE infotrac_phy, only: ntraciso16852 16727 USE isotopes_mod, only: iso_HTO,ok_prod_nucl_tritium 16853 16728 USE dimphy, only: klon,klev … … 18371 18246 ! & prod_nucl_HTO) 18372 18247 18373 USE infotrac_phy, only: ntraciso18374 18248 use isotopes_mod, only: nessai, lat_nucl, lon_nucl, & 18375 18249 & zmin_nucl, zmax_nucl, HTO_nucl … … 18593 18467 & paprs, & 18594 18468 & prod_nucl) 18595 USE infotrac_phy, only: ntraciso18596 18469 USE isotopes_mod, ONLY: iso_HTO 18597 18470 use geometry_mod, only: cell_area … … 18739 18612 & tcond,zfice,zxtice,zxtliq) 18740 18613 18741 USE infotrac_phy, ONLY: ntraciso,niso,index_trac,ntraceurs_zone18742 18614 USE isotopes_mod, ONLY: iso_eau,iso_HDO,essai_convergence, & 18743 18615 & bidouille_anti_divergence,ridicule … … 18869 18741 & tcond,zfice,zxtice,zxtliq,n) 18870 18742 18871 USE infotrac_phy, ONLY: ntraciso,niso,index_trac,ntraceurs_zone18872 18743 USE isotopes_mod, ONLY: iso_eau,iso_HDO,iso_O18,bidouille_anti_divergence, & 18873 18744 & ridicule -
LMDZ6/branches/Portage_acc/libf/phylmdiso/isotopes_verif_mod.F90
r4050 r4446 6 6 !use isotopes_mod, ONLY: 7 7 !#ifdef ISOTRAC 8 ! use isotrac_mod, ONLY:8 ! USE isotrac_mod, ONLY: nzone 9 9 !#endif 10 USE infotrac_phy, ONLY: ntraciso=>ntiso, niso, itZonIso, nzone 10 11 implicit none 11 12 save … … 93 94 SUBROUTINE iso_verif_init() 94 95 use ioipsl_getin_p_mod, ONLY : getin_p 95 !USE infotrac_phy, ONLY: use_iso96 96 use isotopes_mod, ONLY: iso_O17, iso_O18, iso_HDO 97 97 implicit none … … 196 196 197 197 subroutine iso_verif_aberrant(R,err_msg) 198 !USE infotrac_phy, ONLY: use_iso199 198 use isotopes_mod, ONLY: ridicule, iso_HDO 200 199 implicit none … … 227 226 228 227 subroutine iso_verif_aberrant_encadre(R,err_msg) 229 !use infotrac_phy, ONLY: use_iso230 228 use isotopes_mod, ONLY: ridicule, iso_HDO 231 229 implicit none … … 263 261 264 262 subroutine iso_verif_aberrant_choix(xt,q,qmin,deltaDmax,err_msg) 265 !use infotrac_phy, ONLY: use_iso266 263 use isotopes_mod, ONLY: iso_HDO 267 264 implicit none … … 298 295 299 296 function iso_verif_aberrant_nostop(R,err_msg) 300 !use infotrac_phy, ONLY: use_iso301 297 use isotopes_mod, ONLY: ridicule,iso_HDO 302 298 implicit none … … 330 326 331 327 function iso_verif_aberrant_enc_nostop(R,err_msg) 332 !use infotrac_phy, ONLY: use_iso333 328 use isotopes_mod, ONLY: ridicule,iso_HDO 334 329 implicit none … … 366 361 & qmin,deltaDmax,err_msg) 367 362 368 !use infotrac_phy, ONLY: use_iso369 363 use isotopes_mod, ONLY: iso_HDO 370 364 implicit none … … 428 422 function iso_verif_aberrant_enc_choix_nostop(xt,q, & 429 423 & qmin,deltaDmax,err_msg) 430 !use infotrac_phy, ONLY: use_iso431 424 use isotopes_mod, ONLY: iso_HDO 432 425 implicit none … … 1065 1058 ! ********** 1066 1059 function deltaD(R) 1067 !use infotrac_phy, ONLY: use_iso1068 1060 USE isotopes_mod, ONLY: tnat,iso_HDO 1069 1061 implicit none … … 1082 1074 ! ********** 1083 1075 function deltaO(R) 1084 !use infotrac_phy, ONLY: use_iso1085 1076 USE isotopes_mod, ONLY: tnat,iso_O18 1086 1077 implicit none … … 1098 1089 ! ********** 1099 1090 function dexcess(RD,RO) 1100 !use infotrac_phy, ONLY: use_iso1101 1091 USE isotopes_mod, ONLY: tnat,iso_O18,iso_HDO 1102 1092 implicit none … … 1138 1128 ! ********** 1139 1129 function o17excess(R17,R18) 1140 !use infotrac_phy, ONLY: use_iso1141 1130 USE isotopes_mod, ONLY: tnat,iso_O18,iso_O17 1142 1131 implicit none … … 1160 1149 & xt,q,err_msg,ni,n,m) 1161 1150 1162 !use infotrac_phy, ONLY: use_iso1163 1151 USE isotopes_mod, ONLY: iso_eau 1164 1152 implicit none … … 1212 1200 & xt,q,err_msg,ni,n) 1213 1201 1214 !use infotrac_phy, ONLY: use_iso1215 1202 USE isotopes_mod, ONLY: iso_eau 1216 1203 implicit none … … 1296 1283 subroutine iso_verif_aberrant_vect2D( & 1297 1284 & xt,q,err_msg,ni,n,m) 1298 !use infotrac_phy, ONLY: use_iso1299 1285 use isotopes_mod, ONLY: ridicule,tnat,iso_HDO 1300 1286 implicit none … … 1345 1331 & xt,q,err_msg,ni,n,m) 1346 1332 1347 !use infotrac_phy, ONLY: use_iso1348 1333 use isotopes_mod, ONLY: ridicule,tnat,iso_HDO 1349 1334 implicit none … … 1399 1384 & xt,q,err_msg,ni,n,m) 1400 1385 1401 !use infotrac_phy, ONLY: use_iso1402 1386 use isotopes_mod, ONLY: ridicule,tnat,iso_HDO 1403 1387 implicit none … … 1450 1434 & xt,q,err_msg,ni,n,m,deltaDmax) 1451 1435 1452 !use infotrac_phy, ONLY: use_iso1453 1436 use isotopes_mod, ONLY: ridicule,tnat,iso_HDO 1454 1437 implicit none … … 1501 1484 & xt,q,err_msg,ni,n,m) 1502 1485 1503 !use infotrac_phy, ONLY: use_iso1504 1486 use isotopes_mod, ONLY: ridicule,tnat,iso_HDO,iso_O18 1505 1487 implicit none … … 1766 1748 & xt,q,err_msg,ni,n,m,ib,ie) 1767 1749 1768 !use infotrac_phy, ONLY: use_iso1769 1750 use isotopes_mod, ONLY: ridicule,tnat,iso_HDO 1770 1751 implicit none … … 1817 1798 & xt,q,err_msg,ni,n,m,ib,ie) 1818 1799 1819 !use infotrac_phy, ONLY: use_iso1820 1800 USE isotopes_mod, ONLY: iso_eau 1821 1801 implicit none … … 1863 1843 function iso_verif_traceur_choix_nostop(x,err_msg, & 1864 1844 & errmax,errmaxrel,ridicule_trac,deltalimtrac) 1865 USE infotrac_phy, ONLY: ntraciso1866 1845 use isotopes_mod, ONLY: iso_HDO 1867 1846 implicit none … … 1915 1894 function iso_verif_tracnps_choix_nostop(x,err_msg, & 1916 1895 & errmax,errmaxrel,ridicule_trac,deltalimtrac) 1917 USE infotrac_phy, ONLY: ntraciso1918 1896 USE isotopes_mod, ONLY: iso_HDO 1919 1897 implicit none … … 1961 1939 1962 1940 function iso_verif_tracpos_choix_nostop(x,err_msg,seuil) 1963 use infotrac_phy, ONLY: ntraciso,niso 1964 use isotrac_mod, only: index_iso,strtrac,index_zone 1965 use isotopes_mod, only: striso 1941 use isotopes_mod, only: isoName 1966 1942 implicit none 1967 1943 … … 1982 1958 1983 1959 do ixt=niso+1,ntraciso 1984 iiso=index_iso(ixt)1985 1960 if (iso_verif_positif_choix_nostop(x(ixt),seuil,err_msg// & 1986 & ', verif positif, iso'//striso(iiso) & 1987 & //strtrac(index_zone(ixt))).eq.1) then 1961 & ', verif positif, iso'//TRIM(isoName(ixt))).eq.1) then 1988 1962 iso_verif_tracpos_choix_nostop=1 1989 1963 endif … … 1994 1968 1995 1969 function iso_verif_traceur_noNaN_nostop(x,err_msg) 1996 use infotrac_phy, ONLY: ntraciso,niso 1997 use isotrac_mod, only: index_iso 1998 use isotopes_mod, only: striso 1970 use isotopes_mod, only: isoName 1999 1971 implicit none 2000 1972 … … 2015 1987 2016 1988 do ixt=niso+1,ntraciso 2017 iiso=index_iso(ixt)2018 1989 ! write(*,*) 'iso_verif_traceurs 154: iiso,ixt=',iiso,ixt 2019 1990 if (iso_verif_noNaN_nostop(x(ixt),err_msg// & 2020 & ', verif trac no NaN, iso'// striso(iiso)) &1991 & ', verif trac no NaN, iso'//TRIM(isoName(ixt))) & 2021 1992 & .eq.1) then 2022 1993 iso_verif_traceur_noNaN_nostop=1 … … 2029 2000 & errmaxin,errmaxrelin) 2030 2001 2031 use infotrac_phy, ONLY: index_trac,ntraciso,niso 2032 use isotopes_mod, ONLY: ridicule,striso 2033 use isotrac_mod, only: ntraceurs_zone 2002 use isotopes_mod, ONLY: ridicule,isoName 2034 2003 ! on vérifie juste bilan de masse 2035 2004 implicit none … … 2053 2022 2054 2023 xtractot=0.0 2055 do izone=1,n traceurs_zone2056 ixt=i ndex_trac(izone,iiso)2024 do izone=1,nzone 2025 ixt=itZonIso(izone,iiso) 2057 2026 xtractot=xtractot+x(ixt) 2058 enddo !do izone=1,ntraceurs_zone2027 enddo 2059 2028 2060 2029 if (iso_verif_egalite_choix_nostop(xtractot,x(iiso), & 2061 & err_msg//', verif trac egalite, iso '//striso(iiso), & 2030 & err_msg//', verif trac egalite, iso '// & 2031 & TRIM(isoName(iiso)), & 2062 2032 & errmaxin,errmaxrelin).eq.1) then 2063 2033 write(*,*) 'iso_verif_traceur 202: x=',x … … 2070 2040 & (abs(x(iiso)).gt.ridicule)) then 2071 2041 write(*,*) err_msg,', verif masse traceurs, iso ', & 2072 & striso(iiso)2042 & TRIM(isoName(iiso)) 2073 2043 write(*,*) 'iso_verif_traceur 209: x=',x 2074 2044 ! iso_verif_tracm_choix_nostop=1 … … 2082 2052 & ridicule_trac,deltalimtrac) 2083 2053 2084 use infotrac_phy, ONLY: index_trac,ntraciso2085 2054 USE isotopes_mod, ONLY: iso_eau, iso_HDO 2086 use isotrac_mod, only: strtrac ,ntraceurs_zone2055 use isotrac_mod, only: strtrac 2087 2056 ! on vérifie juste deltaD 2088 2057 implicit none … … 2103 2072 2104 2073 if ((iso_eau.gt.0).and.(iso_HDO.gt.0)) then 2105 do izone=1,n traceurs_zone2106 ieau=i ndex_trac(izone,iso_eau)2107 ixt=i ndex_trac(izone,iso_HDO)2074 do izone=1,nzone 2075 ieau=itZonIso(izone,iso_eau) 2076 ixt=itZonIso(izone,iso_HDO) 2108 2077 2109 2078 if (iso_verif_aberrant_choix_nostop(x(ixt),x(ieau), & … … 2118 2087 ! : //strtrac(izone)) 2119 2088 ! endif 2120 enddo !do izone=1,n traceurs_zone2089 enddo !do izone=1,nzone 2121 2090 endif ! if ((iso_eau.gt.0).and.(iso_HDO.gt.0)) then 2122 2091 … … 2124 2093 2125 2094 INTEGER FUNCTION iso_verif_tag17_q_deltaD_chns(x,err_msg) RESULT(res) 2126 USE infotrac_phy, ONLY: index_trac, ntraciso2127 2095 USE isotopes_mod, ONLY: iso_HDO, iso_eau, ridicule 2128 2096 USE isotrac_mod, ONLY: nzone_temp, option_traceurs … … 2135 2103 !--- Check whether * deltaD(highest tagging layer) < 200 permil 2136 2104 ! * q < 2137 ieau=i ndex_trac(nzone_temp,iso_eau)2138 ixt=i ndex_trac(nzone_temp,iso_HDO)2105 ieau=itZonIso(nzone_temp,iso_eau) 2106 ixt=itZonIso(nzone_temp,iso_HDO) 2139 2107 IF(x(ieau)>ridicule) THEN 2140 2108 IF(iso_verif_positif_nostop(-200.0-deltaD(x(ixt)/x(ieau)), err_msg//': deltaDt05 trop fort')==1) THEN … … 2147 2115 !--- Check whether q is small ; then, qt01 < 10% 2148 2116 IF(x(iso_eau)<2.0e-3) THEN 2149 ieau1= i ndex_trac(1,iso_eau)2117 ieau1= itZonIso(1,iso_eau) 2150 2118 IF(iso_verif_positif_nostop(0.1-(x(ieau1)/x(iso_eau)),err_msg//': qt01 trop abondant')==1) THEN 2151 2119 res=1; write(*,*) 'x=',x … … 2156 2124 SUBROUTINE iso_verif_trac17_q_deltaD(x,err_msg) 2157 2125 USE isotrac_mod, ONLY: nzone_temp, option_traceurs 2158 USE infotrac_phy, ONLY: ntraciso2159 2126 IMPLICIT NONE 2160 2127 REAL, INTENT(IN) :: x(ntraciso) … … 2167 2134 2168 2135 subroutine iso_verif_traceur(x,err_msg) 2169 USE infotrac_phy, ONLY: ntraciso2170 2136 use isotrac_mod, only: ridicule_trac 2171 2137 implicit none … … 2195 2161 subroutine iso_verif_traceur_retourne3D(x,n1,n2,n3, & 2196 2162 & i1,i2,i3,err_msg) 2197 USE infotrac_phy, ONLY: ntraciso2198 2163 use isotrac_mod, only: ridicule_trac 2199 2164 … … 2228 2193 subroutine iso_verif_traceur_retourne4D(x,n1,n2,n3,n4, & 2229 2194 & i1,i2,i3,i4,err_msg) 2230 USE infotrac_phy, ONLY: ntraciso2231 2195 use isotrac_mod, only: ridicule_trac 2232 2196 … … 2262 2226 subroutine iso_verif_traceur_retourne2D(x,n1,n2, & 2263 2227 & i1,i2,err_msg) 2264 USE infotrac_phy, ONLY: ntraciso2265 2228 use isotrac_mod, only: ridicule_trac 2266 2229 implicit none … … 2293 2256 2294 2257 subroutine iso_verif_traceur_vect(x,n,m,err_msg) 2295 USE infotrac_phy, ONLY: ntraciso2296 2258 USE isotopes_mod, ONLY: iso_HDO 2297 2259 implicit none … … 2329 2291 2330 2292 subroutine iso_verif_tracnps_vect(x,n,m,err_msg) 2331 USE infotrac_phy, ONLY: ntraciso2332 2293 USE isotopes_mod, ONLY: iso_HDO 2333 2294 implicit none … … 2363 2324 2364 2325 subroutine iso_verif_traceur_noNaN_vect(x,n,m,err_msg) 2365 USE infotrac_phy, ONLY: ntraciso,niso2366 2326 implicit none 2367 2327 … … 2407 2367 subroutine iso_verif_trac_masse_vect(x,n,m,err_msg, & 2408 2368 & errmax,errmaxrel) 2409 USE infotrac_phy, ONLY: index_trac,ntraciso,niso 2410 use isotopes_mod, only: striso 2411 use isotrac_mod, only: ntraceurs_zone 2369 use isotopes_mod, only: isoName 2412 2370 implicit none 2413 2371 … … 2430 2388 xtractot(i,j)=0.0 2431 2389 xiiso(i,j)=x(iiso,i,j) 2432 do izone=1,n traceurs_zone2433 ixt=i ndex_trac(izone,iiso)2390 do izone=1,nzone 2391 ixt=itZonIso(izone,iiso) 2434 2392 xtractot(i,j)=xtractot(i,j)+x(ixt,i,j) 2435 enddo !do izone=1,n traceurs_zone2393 enddo !do izone=1,nzone 2436 2394 enddo !do i=1,n 2437 2395 enddo !do j=1,m … … 2440 2398 call iso_verif_egalite_std_vect( & 2441 2399 & xtractot,xiiso, & 2442 & err_msg//', verif trac egalite, iso '//striso(iiso), & 2400 & err_msg//', verif trac egalite, iso ' & 2401 & //TRIM(isoName(iiso)), & 2443 2402 & n,m,errmax,errmaxrel) 2444 2403 enddo !do iiso=1,niso … … 2447 2406 2448 2407 subroutine iso_verif_tracdd_vect(x,n,m,err_msg) 2449 use infotrac_phy, only: index_trac,ntraciso,niso2450 2408 use isotopes_mod, only: iso_HDO,iso_eau 2451 use isotrac_mod, only: strtrac ,ntraceurs_zone2409 use isotrac_mod, only: strtrac 2452 2410 implicit none 2453 2411 … … 2464 2422 2465 2423 if (iso_HDO.gt.0) then 2466 do izone=1,n traceurs_zone2467 ieau=i ndex_trac(izone,iso_eau)2424 do izone=1,nzone 2425 ieau=itZonIso(izone,iso_eau) 2468 2426 do iiso=1,niso 2469 ixt=i ndex_trac(izone,iiso)2427 ixt=itZonIso(izone,iiso) 2470 2428 do j=1,m 2471 2429 do i=1,n … … 2484 2442 & xiiso,xeau,err_msg//strtrac(izone),niso,n,m, & 2485 2443 & deltalimtrac) 2486 enddo !do izone=1,n traceurs_zone2444 enddo !do izone=1,nzone 2487 2445 endif !if (iso_HDO.gt.0) then 2488 2446 … … 2490 2448 2491 2449 subroutine iso_verif_tracpos_vect(x,n,m,err_msg,seuil) 2492 USE infotrac_phy, ONLY: ntraciso,niso2493 2450 implicit none 2494 2451 … … 2532 2489 2533 2490 subroutine iso_verif_tracnps(x,err_msg) 2534 USE infotrac_phy, ONLY: ntraciso2535 2491 use isotrac_mod, only: ridicule_trac 2536 2492 … … 2559 2515 2560 2516 subroutine iso_verif_tracpos_choix(x,err_msg,seuil) 2561 USE infotrac_phy, ONLY: ntraciso2562 2517 implicit none 2563 2518 ! vérifier des choses sur les traceurs … … 2585 2540 subroutine iso_verif_traceur_choix(x,err_msg, & 2586 2541 & errmax,errmaxrel,ridicule_trac_loc,deltalimtrac) 2587 USE infotrac_phy, ONLY: ntraciso2588 2542 implicit none 2589 2543 ! vérifier des choses sur les traceurs … … 2608 2562 2609 2563 function iso_verif_traceur_nostop(x,err_msg) 2610 USE infotrac_phy, ONLY: ntraciso2611 2564 use isotrac_mod, only: ridicule_trac 2612 2565 !use isotopes_verif, only: errmax,errmaxrel,deltalimtrac … … 2637 2590 2638 2591 subroutine iso_verif_traceur_justmass(x,err_msg) 2639 USE infotrac_phy, ONLY: ntraciso2640 2592 implicit none 2641 2593 ! on vérifie que noNaN et masse … … 2666 2618 2667 2619 function iso_verif_traceur_jm_nostop(x,err_msg) 2668 USE infotrac_phy, ONLY: ntraciso2669 2620 implicit none 2670 2621 ! on vérifie que noNaN et masse … … 2699 2650 2700 2651 subroutine iso_verif_tag17_q_deltaD_vect(x,n,m,err_msg) 2701 USE infotrac_phy, ONLY: index_trac,ntraciso2702 2652 USE isotopes_mod, ONLY: tnat,iso_eau, ridicule,iso_HDO 2703 2653 use isotrac_mod, only: option_traceurs,nzone_temp … … 2719 2669 ! verifier que deltaD du tag de la couche la plus haute < 2720 2670 ! 200 permil, et vérifier que son q est inférieur à 2721 ieau=i ndex_trac(nzone_temp,iso_eau)2722 ixt=i ndex_trac(nzone_temp,iso_HDO)2723 ieau1=i ndex_trac(1,iso_eau)2671 ieau=itZonIso(nzone_temp,iso_eau) 2672 ixt=itZonIso(nzone_temp,iso_HDO) 2673 ieau1=itZonIso(1,iso_eau) 2724 2674 do i=1,n 2725 2675 do k=1,m … … 2759 2709 2760 2710 subroutine iso_verif_tag17_q_deltaD_vect_ret3D(x,n,m,nq,err_msg) 2761 USE infotrac_phy, ONLY: index_trac,ntraciso2762 2711 USE isotopes_mod, ONLY: tnat,iso_eau,iso_HDO,ridicule 2763 2712 use isotrac_mod, only: option_traceurs,nzone_temp … … 2779 2728 ! verifier que deltaD du tag de la couche la plus haute < 2780 2729 ! 200 permil, et vérifier que son q est inférieur à 2781 ieau=i ndex_trac(nzone_temp,iso_eau)2782 ixt=i ndex_trac(nzone_temp,iso_HDO)2783 ieau1=i ndex_trac(1,iso_eau)2730 ieau=itZonIso(nzone_temp,iso_eau) 2731 ixt=itZonIso(nzone_temp,iso_HDO) 2732 ieau1=itZonIso(1,iso_eau) 2784 2733 do iq=1,nq 2785 2734 do i=1,n -
LMDZ6/branches/Portage_acc/libf/phylmdiso/isotrac_mod.F90
r3927 r4446 1 1 #ifdef ISO 2 2 #ifdef ISOTRAC 3 ! $Id: $4 3 5 4 MODULE isotrac_mod 6 use infotrac_phy, ONLY: niso,ntraciso,ntraceurs_zone 7 use isotopes_mod, only: ridicule 8 9 IMPLICIT NONE 10 SAVE 11 12 ! contient toutes les variables traceurs isotopiques + les routines specifiquement 13 ! traceurs isotopiques 14 15 real ridicule_trac 16 parameter (ridicule_trac=ridicule*1e4) 17 18 integer, save :: option_traceurs 19 integer, save :: ntraceurs_zone_opt ! ntraceurs_zone propre à l'option 20 ! on vérifie que ça correspond bien à ntraceurs_zone d'infotrac 21 integer, save :: ntraceurs_zoneOR 22 !$OMP THREADPRIVATE(option_traceurs,ntraceurs_zone_opt,ntraceurs_zoneOR) 23 integer, save :: initialisation_isotrac 24 ! 1 pour idéalisé 25 ! 0 pour lecture dans fichier 26 !$OMP THREADPRIVATE(initialisation_isotrac) 27 28 ! variables spécifiques aux différentes options, mais necessaires au 29 ! calcul du nombre de zones de traceurs 30 ! si option=3 31 integer, save :: use_bassin_atlantic 32 !$OMP THREADPRIVATE(use_bassin_atlantic) 33 integer, save :: use_bassin_medit 34 !$OMP THREADPRIVATE(use_bassin_medit) 35 integer, save :: use_bassin_indian 36 !$OMP THREADPRIVATE(use_bassin_indian) 37 integer, save :: use_bassin_austral 38 !$OMP THREADPRIVATE(use_bassin_austral) 39 integer, save :: use_bassin_pacific 40 !$OMP THREADPRIVATE(use_bassin_pacific) 41 integer, save :: use_bassin_merarabie 42 !$OMP THREADPRIVATE(use_bassin_merarabie) 43 integer, save :: use_bassin_golfebengale 44 !$OMP THREADPRIVATE(use_bassin_golfebengale) 45 integer, save :: use_bassin_indiansud 46 !$OMP THREADPRIVATE(use_bassin_indiansud) 47 integer, save :: use_bassin_tropics 48 !$OMP THREADPRIVATE(use_bassin_tropics) 49 integer, save :: use_bassin_midlats 50 !$OMP THREADPRIVATE(use_bassin_midlats) 51 integer, save :: use_bassin_hauteslats 52 !$OMP THREADPRIVATE(use_bassin_hauteslats) 53 integer, save :: bassin_atlantic 54 !$OMP THREADPRIVATE(bassin_atlantic) 55 integer, save :: bassin_medit 56 !$OMP THREADPRIVATE(bassin_medit) 57 integer, save :: bassin_indian 58 !$OMP THREADPRIVATE(bassin_indian) 59 integer, save :: bassin_austral 60 !$OMP THREADPRIVATE(bassin_austral) 61 integer, save :: bassin_pacific 62 !$OMP THREADPRIVATE(bassin_pacific) 63 integer, save :: bassin_merarabie 64 !$OMP THREADPRIVATE(bassin_merarabie) 65 integer, save :: bassin_golfebengale 66 !$OMP THREADPRIVATE(bassin_golfebengale) 67 integer, save :: bassin_indiansud 68 !$OMP THREADPRIVATE(bassin_indiansud) 69 integer, save :: bassin_tropics 70 !$OMP THREADPRIVATE(bassin_tropics) 71 integer, save :: bassin_midlats 72 !$OMP THREADPRIVATE(bassin_midlats) 73 integer, save :: bassin_hauteslats 74 !$OMP THREADPRIVATE(bassin_hauteslats) 75 ! si option=4 76 integer nzone_temp 77 parameter (nzone_temp=1) 78 real, save :: zone_temp1,zone_tempf,zone_tempa 79 !$OMP THREADPRIVATE(zone_temp1,zone_tempf,zone_tempa) 80 ! si option 14 81 integer nzone_lat 82 parameter (nzone_lat=4) 83 integer nzone_pres 84 parameter (nzone_pres=3) 85 real, save :: zone_pres1,zone_presf,zone_presa 86 !$OMP THREADPRIVATE(zone_pres1,zone_presf,zone_presa) 87 real, save :: dlattag,lattag_min 88 !$OMP THREADPRIVATE(dlattag,lattag_min) 89 90 91 ! option 1: on trace evap ocean et continent séparement 5 USE infotrac_phy, ONLY: niso, ntiso, nzone 6 USE readTracFiles_mod, ONLY: delPhase 7 USE isotopes_mod, ONLY: ridicule, get_in 8 9 IMPLICIT NONE 10 SAVE 11 12 !=== CONTENT: ALL THE ISOTOPIC TRACERS RELATED VARIABLES === 13 ! 14 ! option 1: on trace evap ocean et continent separement 92 15 ! option 2: on trace evap ocean, continent et evap precip 93 ! option 3: on trace evap diff érents bassins océaniques94 ! + continents + r ésidu95 ! attention, choisir dans ce cas les bassins oc éaniques16 ! option 3: on trace evap differents bassins oceaniques 17 ! + continents + residu 18 ! attention, choisir dans ce cas les bassins oceaniques 96 19 ! dans iso_traceurs_opt3F90.h 97 ! option 4: tracage par temp érature minimale98 ! dans ce cas, on d éfinit des bins dans iso_traceurs_opt4.h99 ! option 5: pour AMMA: on taggue r ésidu/AEJ/flux mousson/Harmattan20 ! option 4: tracage par temperature minimale 21 ! dans ce cas, on definit des bins dans iso_traceurs_opt4.h 22 ! option 5: pour AMMA: on taggue residu/AEJ/flux mousson/Harmattan 100 23 ! option 6: taggage des ddfts 101 ! option 7: pour Sandrine: taggage de la vapeur à700hPa pour omega500<-20 TODO102 ! option 8: pour Sandrine: taggage de la vapeur entre 950 et 800hPa, omega de 0 à 25 hPa et de l'évaoration en omega<-20. TODO24 ! option 7: pour Sandrine: taggage de la vapeur a 700hPa pour omega500<-20 TODO 25 ! option 8: pour Sandrine: taggage de la vapeur entre 950 et 800hPa, omega de 0 a 25 hPa et de l'evaoration en omega<-20. TODO 103 26 ! option 9: taggage du condensat et de la revap precip 104 27 ! option 10: taggage evap oce, transpiration et evaporation … … 107 30 ! option 12: taggage evap oce, sol nu, canop et reste evap cont. 108 31 ! A utiliser quand on couple avec ORCHIDEE 109 ! option 13: taggage temp érature minimale + revap precip110 ! option 14: taggage lat et altitude de derni ère saturation (niveaux de pression) + evap surf32 ! option 13: taggage temperature minimale + revap precip 33 ! option 14: taggage lat et altitude de derniere saturation (niveaux de pression) + evap surf 111 34 ! otion 15: taggage irrigation 112 35 ! option 16: taggage precip selon saisons et fonte neige: seulement pour ORCHIDEE 113 ! option 17: taggage temp érature minimum de condensation directement dans la convection et la cond LS, + evap sfc, condensat et precipitation36 ! option 17: taggage temperature minimum de condensation directement dans la convection et la cond LS, + evap sfc, condensat et precipitation 114 37 ! option 18: idem 17 mais on tague qsmin au lieu de Tmin 115 38 ! option 19: on tag vap residuelle, vap residuelle dans ddfts, sfc, cond, rev 116 39 ! option 20: on taggue vapeur tropicale vs vapeur extratropicale 117 40 ! option 21: taggage de 2 boites 3D: extratropiques (>35°) et UT tropicale (15-15°, > 500hPa) 118 ! option 22: tagage de la vapeur proccess ée dans les zones très convectives41 ! option 22: tagage de la vapeur proccessee dans les zones tres convectives 119 42 120 ! ces variables sont initialisées dans traceurs_init 43 !--- nzone_opt (value of nzone for the selected option) must be equal to nzone as defined in onfotrac 44 REAL, PARAMETER :: ridicule_trac = ridicule * 1e4 45 INTEGER, SAVE :: option_traceurs, nzone_opt, nzoneOR 46 !$OMP THREADPRIVATE(option_traceurs,nzone_opt,nzoneOR) 47 INTEGER, SAVE :: initialisation_isotrac 48 !$OMP THREADPRIVATE(initialisation_isotrac) 49 ! 1 pour idealise 50 ! 0 pour lecture dans fichier 51 52 !=== VARIABLES SPECIFIC TO THE SELECTED OPTION, BUT NEEDED FOR THE COMPUTATION OF THE NUMBER OF ZONES ; TO BE INITIALIZED IN traceurs_init 53 54 !--- option 3 55 LOGICAL, SAVE :: use_bassin_Austral, use_bassin_Atlantic, use_bassin_MidLats, use_bassin_SouthIndian, use_bassin_MerArabie 56 !$OMP THREADPRIVATE(use_bassin_Austral, use_bassin_Atlantic, use_bassin_MidLats, use_bassin_SouthIndian, use_bassin_MerArabie) 57 INTEGER, SAVE :: bassin_Austral, bassin_Atlantic, bassin_MidLats, bassin_SouthIndian, bassin_MerArabie 58 !$OMP THREADPRIVATE( bassin_Austral, bassin_Atlantic, bassin_MidLats, bassin_SouthIndian, bassin_MerArabie) 59 LOGICAL, SAVE :: use_bassin_Pacific, use_bassin_Indian, use_bassin_Tropics, use_bassin_BengalGolf, use_bassin_HighLats, use_bassin_Medit 60 !$OMP THREADPRIVATE(use_bassin_Pacific, use_bassin_Indian, use_bassin_Tropics, use_bassin_BengalGolf, use_bassin_HighLats, use_bassin_Medit) 61 INTEGER, SAVE :: bassin_Pacific, bassin_Indian, bassin_Tropics, bassin_BengalGolf, bassin_HighLats, bassin_Medit 62 !$OMP THREADPRIVATE( bassin_Pacific, bassin_Indian, bassin_Tropics, bassin_BengalGolf, bassin_HighLats, bassin_Medit) 63 64 !--- option 4 65 INTEGER, PARAMETER :: nzone_temp = 1 66 REAL, SAVE :: zone_temp1, zone_tempf, zone_tempa 67 !$OMP THREADPRIVATE(zone_temp1, zone_tempf, zone_tempa) 68 REAL, SAVE :: zone_temp(nzone_temp-1) 69 !$OMP THREADPRIVATE(zone_temp) 70 71 !--- option 5 72 INTEGER, SAVE :: izone_aej, izone_harmattan, izone_mousson 73 !$OMP THREADPRIVATE(izone_aej, izone_harmattan, izone_mousson) 74 75 !--- option 6 76 INTEGER, SAVE :: izone_ddft 77 !$OMP THREADPRIVATE(izone_ddft) 78 79 !--- option 10 80 INTEGER, SAVE :: izone_contfrac 81 !$OMP THREADPRIVATE(izone_contfrac) 82 83 !--- option 12 84 INTEGER, SAVE :: izone_contcanop 85 !$OMP THREADPRIVATE(izone_contcanop) 86 87 !--- option 13 88 INTEGER, PARAMETER :: nzone_pres = 3 89 REAL, SAVE :: zone_pres(nzone_pres-1) 90 !$OMP THREADPRIVATE(zone_pres) 91 92 !--- option 14 93 INTEGER, PARAMETER :: nzone_lat = 4 94 REAL, SAVE :: zone_pres1, zone_presf, zone_presa 95 !$OMP THREADPRIVATE(zone_pres1, zone_presf, zone_presa) 96 REAL, SAVE :: dlattag, lattag_min, zone_lat(nzone_lat-1) 97 !$OMP THREADPRIVATE(dlattag, lattag_min, zone_lat) 98 99 !--- option 15 100 INTEGER, SAVE :: izone_irrig 101 !$OMP THREADPRIVATE(izone_irrig) 102 103 !--- option 17 104 REAL, SAVE :: seuil_tag_tmin, seuil_tag_tmin_ls 105 !$OMP THREADPRIVATE(seuil_tag_tmin, seuil_tag_tmin_ls) 106 INTEGER, SAVE :: option_seuil_tag_tmin 107 !$OMP THREADPRIVATE(option_seuil_tag_tmin) 108 109 !--- option 20 110 INTEGER, SAVE :: izone_trop, izone_extra 111 !$OMP THREADPRIVATE(izone_trop, izone_extra) 112 REAL, SAVE :: lim_tag20 113 !$OMP THREADPRIVATE(lim_tag20) 114 115 !--- option 21: on garde izone_trop, izone_extra 116 117 !--- option 22 118 INTEGER, SAVE :: izone_conv_BT, izone_conv_UT 119 !$OMP THREADPRIVATE(izone_conv_BT, izone_conv_UT) 120 REAL, SAVE :: lim_precip_tag22 121 !$OMP THREADPRIVATE(lim_precip_tag22) 122 121 123 122 !integer ntraciso 123 !parameter (ntraciso=(ntraceurs_zone+1)*niso) 124 !integer ntracisoOR ! défini dans traceurs_init 125 integer, ALLOCATABLE, DIMENSION(:), save :: index_iso 126 !$OMP THREADPRIVATE(index_iso) 127 integer, ALLOCATABLE, DIMENSION(:), save :: index_zone 128 !$OMP THREADPRIVATE(index_zone) 129 integer, ALLOCATABLE, DIMENSION(:,:), save :: index_trac_loc ! il y a déjà un index_trac dans infotrac: vérifier que c'est le même 130 !$OMP THREADPRIVATE(index_trac_loc) 131 character*3, ALLOCATABLE, DIMENSION(:), save :: strtrac 132 !$OMP THREADPRIVATE(strtrac) 133 ! -> tout ça passe maintenant par infotrac 134 135 integer, ALLOCATABLE, DIMENSION(:), save :: bassin_map 136 integer, ALLOCATABLE, DIMENSION(:,:), save :: boite_map 137 !$OMP THREADPRIVATE(bassin_map,boite_map) 138 139 140 ! traitement recyclage et evap 141 integer, save :: izone_cont ! pour le recyclage continental 142 !$OMP THREADPRIVATE(izone_cont) 143 integer, save :: izone_oce ! pour l'océan 144 !$OMP THREADPRIVATE(izone_oce) 145 integer, save :: izone_poubelle ! pour les petits résidus numériques 124 INTEGER, ALLOCATABLE, SAVE :: index_iso(:), index_zone(:), itZonIso_loc(:,:) 125 !$OMP THREADPRIVATE( index_iso, index_zone, itZonIso_loc) 126 CHARACTER(LEN=3), ALLOCATABLE :: strtrac(:) 127 !$OMP THREADPRIVATE( strtrac) 128 INTEGER, ALLOCATABLE, SAVE :: bassin_map(:), boite_map(:,:) 129 !$OMP THREADPRIVATE( bassin_map, boite_map) 130 131 !=== RECYCLING AND EVAPORATION TREATMENT 132 INTEGER, SAVE :: izone_cont, izone_oce !--- For land and ocean recycling 133 !$OMP THREADPRIVATE(izone_cont, izone_oce) 134 INTEGER, SAVE :: izone_poubelle !--- For small numerical residues 146 135 !$OMP THREADPRIVATE(izone_poubelle) 147 integer, save :: izone_init ! pour l'initialisation par défaut 136 INTEGER, SAVE :: izone_init !--- For default initialization 148 137 !$OMP THREADPRIVATE(izone_init) 149 integer, save :: izone_revap ! pour l'évap des gouttes 138 INTEGER, SAVE :: izone_revap !--- For droplets evaporation 150 139 !$OMP THREADPRIVATE(izone_revap) 151 integer, save :: option_revap 152 !$OMP THREADPRIVATE(option_revap) 153 integer, save :: option_tmin 154 !$OMP THREADPRIVATE(option_tmin) 155 integer, save :: option_cond 156 !$OMP THREADPRIVATE(option_cond) 157 integer, save :: izone_cond 158 !$OMP THREADPRIVATE(izone_cond) 159 real evap_franche 160 parameter (evap_franche=1e-6) ! en kg/m2/s 161 162 ! specifique à option 4: 163 real, save :: zone_temp(nzone_temp-1) 164 !$OMP THREADPRIVATE(zone_temp) 165 ! si option 5 166 integer, save :: izone_aej 167 !$OMP THREADPRIVATE(izone_aej) 168 integer, save :: izone_harmattan 169 !$OMP THREADPRIVATE(izone_harmattan) 170 integer, save :: izone_mousson 171 !$OMP THREADPRIVATE(izone_mousson) 172 ! si option 6 173 integer, save :: izone_ddft 174 !$OMP THREADPRIVATE(izone_ddft) 175 ! si option 10 176 integer, save :: izone_contfrac 177 !$OMP THREADPRIVATE(izone_contfrac) 178 ! si option 12 179 integer, save :: izone_contcanop 180 !$OMP THREADPRIVATE(izone_contcanop) 181 ! specifique à option 13: 182 real, save :: zone_pres(nzone_pres-1) 183 !$OMP THREADPRIVATE(zone_pres) 184 ! si option 14 185 real, save :: zone_lat(nzone_lat-1) 186 !$OMP THREADPRIVATE(zone_lat) 187 ! si option 15 188 integer, save :: izone_irrig 189 !$OMP THREADPRIVATE(izone_irrig) 190 ! si option 17 191 real, save :: seuil_tag_tmin 192 !$OMP THREADPRIVATE(seuil_tag_tmin) 193 real, save :: seuil_tag_tmin_ls 194 !$OMP THREADPRIVATE(seuil_tag_tmin_ls) 195 integer, save :: option_seuil_tag_tmin 196 !$OMP THREADPRIVATE(option_seuil_tag_tmin) 197 ! si option 20 198 integer, save :: izone_trop,izone_extra 199 real, save :: lim_tag20 200 !$OMP THREADPRIVATE(izone_trop,izone_extra,lim_tag20) 201 ! si option 21: on garde izone_trop,izone_extra 202 ! si opt 22 203 integer, save :: izone_conv_BT,izone_conv_UT 204 real, save :: lim_precip_tag22 205 !$OMP THREADPRIVATE(izone_conv_BT,izone_conv_UT,lim_precip_tag22) 206 140 INTEGER, SAVE :: option_revap, option_tmin, option_cond, izone_cond 141 !$OMP THREADPRIVATE(option_revap, option_tmin, option_cond, izone_cond) 142 REAL, PARAMETER :: evap_franche = 1e-6 !--- In kg/m2/s 207 143 208 144 CONTAINS 209 145 210 subroutine iso_traceurs_init() 211 212 use IOIPSL ! getin 213 USE infotrac_phy, ONLY: ntraciso,niso,ntraceurs_zone,index_trac 214 USE isotopes_mod, ONLY: iso_eau,ntracisoOR,initialisation_iso, & 215 & iso_eau_possible 216 USE dimphy, only: klon,klev 217 218 implicit none 219 220 221 ! définition de quelles zones et quelles isotopes représentent 222 ! les traceurs 223 224 ! inputs, outputs 225 ! ! c'est les variables dans traceurs.h qui sont modifiées 226 227 ! locals 228 integer itrac,izone,ixt,k 229 integer izone_pres,izone_lat 230 character*2 strz,strz_preslat 231 character*1 strz_pres,strz_lat 232 integer ntraceurs_zone_opt 233 234 ! vérifier que on a bien l'eau comme traceurs 235 if (iso_eau.eq.0) then 236 write(*,*) 'traceurs_init 18: isotrac ne marche que si ', & 237 & 'on met l''eau comme isotope' 238 stop 239 endif 240 241 ! initialiser 242 option_traceurs=0 243 initialisation_isotrac=0 244 245 ! allouer 246 allocate (index_iso(ntraciso)) 247 allocate (index_zone(ntraciso)) 248 allocate (index_trac_loc(ntraceurs_zone,niso)) 249 allocate (strtrac(ntraceurs_zone)) 250 allocate (bassin_map(klon)) 251 allocate (boite_map(klon,klev)) 252 253 if (initialisation_iso.eq.0) then 254 call getin('initialisation_isotrac',initialisation_isotrac) 255 write(*,*) 'initialisation_isotrac=',initialisation_isotrac 256 endif !if (initialisation_iso.eq.0) then 257 258 ! lire l'option de traçage 259 call getin('option_traceurs',option_traceurs) 260 write(*,*) 'option_traceurs=',option_traceurs 261 262 ! cas général: pas de traceurs dans ORCHIDEE 263 ntracisoOR=niso 264 265 ! partie à éditer ! pour définir les différentes zones 266 if (option_traceurs.eq.1) then 267 ! on trace continents/ocean 268 269 ntraceurs_zone_opt=2 270 izone_cont=1 271 izone_oce=2 272 izone_poubelle=2 ! zone où on met les flux non physiques, de 273 ! réajustement 274 izone_init=2 ! zone d'initialisation par défaut 275 option_revap=0 276 option_tmin=0 277 izone_revap=0 278 option_cond=0 279 280 strtrac(izone_cont)='con' 281 strtrac(izone_oce)='oce' 282 283 elseif (option_traceurs.eq.2) then 284 ! on trace continent/ ocean/reevap des gouttes 285 286 ntraceurs_zone_opt=3 287 izone_cont=1 288 izone_oce=2 289 izone_poubelle=2 ! zone où on met les flux non physiques, de 290 ! réajustement 291 izone_init=2 ! zone d'initialisation par défaut 292 option_revap=1 293 option_tmin=0 294 izone_revap=3 295 option_cond=0 296 297 strtrac(izone_cont)='con' 298 strtrac(izone_oce)='oce' 299 strtrac(izone_revap)='rev' 300 301 302 else if (option_traceurs.eq.3) then 303 ! on trace des bassins océaniques + un résidu. On ne trace 304 ! pas l'évap des gouttes à part 305 ! le résidu est la dernère dimension 306 307 ! lire les use_bassin 308 call getin('use_bassin_atlantic',use_bassin_atlantic) 309 call getin('use_bassin_medit',use_bassin_medit) 310 call getin('use_bassin_indian',use_bassin_indian) 311 call getin('use_bassin_austral',use_bassin_austral) 312 call getin('use_bassin_pacific',use_bassin_pacific) 313 call getin('use_bassin_merarabie',use_bassin_merarabie) 314 call getin('use_bassin_golfebengale',use_bassin_golfebengale) 315 call getin('use_bassin_indiansud',use_bassin_indiansud) 316 call getin('use_bassin_tropics',use_bassin_tropics) 317 call getin('use_bassin_midlats',use_bassin_midlats) 318 call getin('use_bassin_hauteslats',use_bassin_hauteslats) 319 320 write(*,*) 'use_bassin_atlantic=' ,use_bassin_atlantic 321 write(*,*) 'use_bassin_medit=' ,use_bassin_medit 322 write(*,*) 'use_bassin_indian=' ,use_bassin_indian 323 write(*,*) 'use_bassin_austral=' ,use_bassin_austral 324 write(*,*) 'use_bassin_merarabie=' ,use_bassin_merarabie 325 write(*,*) 'use_bassin_golfebengale=' ,use_bassin_golfebengale 326 write(*,*) 'use_bassin_indiansud=' ,use_bassin_indiansud 327 write(*,*) 'use_bassin_tropics=' ,use_bassin_tropics 328 write(*,*) 'use_bassin_midlats=' ,use_bassin_midlats 329 write(*,*) 'use_bassin_hauteslats=' ,use_bassin_hauteslats 330 331 332 ntraceurs_zone_opt=2 & 333 & +use_bassin_atlantic & 334 & +use_bassin_medit & 335 & +use_bassin_indian & 336 & +use_bassin_austral & 337 & +use_bassin_pacific & 338 & +use_bassin_merarabie & 339 & +use_bassin_golfebengale & 340 & +use_bassin_indiansud & 341 & +use_bassin_tropics & 342 & +use_bassin_midlats & 343 & +use_bassin_hauteslats 344 345 izone_cont=ntraceurs_zone 346 izone_oce=0 ! pas de sens car séparée en bassins 347 izone_poubelle=ntraceurs_zone-1 ! zone où on met les flux non physiques, de 348 ! réajustement 349 izone_init=ntraceurs_zone-1 ! zone d'initialisation par défaut 350 option_revap=0 ! on ne trace pas les gouttes 351 option_tmin=0 352 izone_revap=0 ! pas de sens car on taggue pas les gouttes séparemment 353 option_cond=0 354 355 ! si on a use_bassin_indian, on n'a pas le découpage détaillé 356 ! de l'indian: 146 SUBROUTINE iso_traceurs_init() 147 148 USE infotrac_phy, ONLY: itZonIso, isoName, isoZone 149 USE isotopes_mod, ONLY: iso_eau, ntracisoOR, initialisation_iso 150 USE dimphy, ONLY: klon, klev 151 USE strings_mod, ONLY: int2str, strStack, strTail, strHead, strIdx, fmsg 152 153 IMPLICIT NONE 154 ! Define which zones and isotopes correspond to isotopic tagging tracers 155 ! Modify traceurs.h variables 156 INTEGER :: izone, ixt, k 157 INTEGER :: izone_pres, izone_lat 158 INTEGER :: nzone_opt 159 160 IF(fmsg("traceurs_init 18: isotrac ne marche que si on met l'eau comme isotope", 'iso_traceurs_init', iso_eau==0)) STOP 161 162 !--- Initialize 163 option_traceurs = 0 164 initialisation_isotrac = 0 165 166 !--- Allocate 167 ALLOCATE(index_iso (ntiso)) 168 ALLOCATE(index_zone(ntiso)) 169 ALLOCATE(itZonIso_loc(nzone,niso)) 170 ALLOCATE(strtrac(nzone)) 171 ALLOCATE(bassin_map(klon)) 172 ALLOCATE( boite_map(klon,klev)) 173 174 IF(initialisation_iso == 0) CALL get_in('initialisation_isotrac', initialisation_isotrac) 175 176 !--- Read tracing option 177 CALL get_in('option_traceurs', option_traceurs) 178 179 !--- Genral case: no traceurs in ORCHIDEE 180 ntracisoOR=niso 181 182 ! partie a editer ! pour definir les differentes zones 183 SELECT CASE(option_traceurs) 184 !======================================================================================================================== 185 CASE(1) !=== TRACING LAND/OCEAN 186 !======================================================================================================================== 187 nzone_opt=2 188 izone_cont=1 189 izone_oce=2 190 izone_poubelle=2 ! zone ou on met les flux non physiques, de reajustement 191 izone_init=2 ! zone d'initialisation par defaut 192 option_revap=0 193 option_tmin=0 194 izone_revap=0 195 option_cond=0 196 strtrac(izone_cont) = 'con' 197 strtrac(izone_oce) = 'oce' 198 !======================================================================================================================== 199 CASE(2) !=== TRACING LAND/OCEAN/DROPLETS REEVAPORATION 200 !======================================================================================================================== 201 nzone_opt=3 202 izone_cont=1 203 izone_oce=2 204 izone_poubelle=2 ! zone ou on met les flux non physiques, de reajustement 205 izone_init=2 ! zone d'initialisation par defaut 206 option_revap=1 207 option_tmin=0 208 izone_revap=3 209 option_cond=0 210 strtrac(izone_cont) = 'con' 211 strtrac(izone_oce) = 'oce' 212 strtrac(izone_revap)= 'rev' 213 !======================================================================================================================== 214 CASE(3) !=== TRACING OCEANS BASINS + RESIDUE (LAST DIMENSION). NO DROPLETS EVAPORATION TRACING. 215 !======================================================================================================================== 216 ! lire les use_bassin 217 CALL get_in('use_bassin_Atlantic', use_bassin_Atlantic) 218 CALL get_in('use_bassin_Medit', use_bassin_Medit) 219 CALL get_in('use_bassin_Indian', use_bassin_Indian) 220 CALL get_in('use_bassin_Austral', use_bassin_Austral) 221 CALL get_in('use_bassin_Pacific', use_bassin_Pacific) 222 CALL get_in('use_bassin_MerArabie', use_bassin_MerArabie) 223 CALL get_in('use_bassin_BengalGolf', use_bassin_BengalGolf) 224 CALL get_in('use_bassin_SouthIndian',use_bassin_SouthIndian) 225 CALL get_in('use_bassin_Tropics', use_bassin_Tropics) 226 CALL get_in('use_bassin_Midlats', use_bassin_Midlats) 227 CALL get_in('use_bassin_HighLats', use_bassin_HighLats) 228 nzone_opt = 2 + COUNT([use_bassin_Atlantic, use_bassin_Medit, use_bassin_Indian, & 229 use_bassin_Austral, use_bassin_Pacific, use_bassin_MerArabie, use_bassin_BengalGolf, & 230 use_bassin_SouthIndian, use_bassin_Tropics, use_bassin_Midlats, use_bassin_HighLats]) 231 izone_cont=nzone 232 izone_oce=0 ! pas de sens car separee en bassins 233 izone_poubelle=nzone-1 ! zone ou on met les flux non physiques, de reajustement 234 izone_init=nzone-1 ! zone d'initialisation par defaut 235 option_revap=0 ! on ne trace pas les gouttes 236 option_tmin=0 237 izone_revap=0 ! pas de sens car on taggue pas les gouttes separemment 238 option_cond=0 357 239 #ifdef ISOVERIF 358 if (use_bassin_indian.eq.1) then 359 ! call iso_verif_egalite(float(use_bassin_merarabie), & 360 ! & 0.0,'iso_traceurs_init 73: revoir def des bassins') 361 if ((use_bassin_merarabie.ne.0).or. & 362 & (use_bassin_indiansud.ne.0).or. & 363 & (use_bassin_golfebengale.ne.0)) then 364 write(*,*) 'traceurs_init 73' 365 stop 366 endif 367 ! call iso_verif_egalite(float(use_bassin_golfebengale), & 368 ! & 0.0,'iso_traceurs_init 73: revoir def des bassins') 369 ! call iso_verif_egalite(float(use_bassin_indiansud), & 370 ! & 0.0,'iso_traceurs_init 73: revoir def des bassins') 371 endif 240 IF(use_bassin_Indian) THEN !=== NON COMPATIBLE WITH A DETAILED INDIAN CUTTING 241 IF(use_bassin_MerArabie .OR. use_bassin_SouthIndian .OR. use_bassin_BengalGolf) THEN 242 WRITE(*,*) 'traceurs_init 73'; STOP 243 END IF 244 ! CALL iso_verif_egalite(float(use_bassin_MerArabie), 0.0, 'iso_traceurs_init 73: revoir def des bassins') 245 ! CALL iso_verif_egalite(float(use_bassin_BengalGolf), 0.0, 'iso_traceurs_init 73: revoir def des bassins') 246 ! CALL iso_verif_egalite(float(use_bassin_SouthIndian), 0.0, 'iso_traceurs_init 73: revoir def des bassins') 247 END IF 372 248 #endif 373 374 bassin_atlantic= max(use_bassin_atlantic,1) 375 bassin_medit=max(use_bassin_atlantic & 376 & +use_bassin_medit,1) 377 bassin_indian=max(use_bassin_atlantic & 378 & +use_bassin_medit & 379 & +use_bassin_indian,1) 380 bassin_austral=max(use_bassin_atlantic & 381 & +use_bassin_medit & 382 & +use_bassin_indian & 383 & +use_bassin_austral,1) 384 bassin_pacific=max(use_bassin_atlantic & 385 & +use_bassin_medit & 386 & +use_bassin_indian & 387 & +use_bassin_austral & 388 & +use_bassin_pacific,1) 389 bassin_merarabie=max(use_bassin_atlantic & 390 & +use_bassin_medit & 391 & +use_bassin_indian & 392 & +use_bassin_austral & 393 & +use_bassin_pacific & 394 & +use_bassin_merarabie,1) 395 bassin_golfebengale=max(use_bassin_atlantic& 396 & +use_bassin_medit & 397 & +use_bassin_indian & 398 & +use_bassin_austral & 399 & +use_bassin_pacific & 400 & +use_bassin_merarabie & 401 & +use_bassin_golfebengale,1) 402 bassin_indiansud=max(use_bassin_atlantic & 403 & +use_bassin_medit & 404 & +use_bassin_indian & 405 & +use_bassin_austral & 406 & +use_bassin_pacific & 407 & +use_bassin_merarabie & 408 & +use_bassin_golfebengale & 409 & +use_bassin_indiansud,1) 410 bassin_tropics=max(use_bassin_atlantic & 411 & +use_bassin_medit & 412 & +use_bassin_indian & 413 & +use_bassin_austral & 414 & +use_bassin_pacific & 415 & +use_bassin_merarabie & 416 & +use_bassin_golfebengale & 417 & +use_bassin_indiansud, & 418 & +use_bassin_tropics,1) 419 bassin_midlats=max(use_bassin_atlantic & 420 & +use_bassin_medit & 421 & +use_bassin_indian & 422 & +use_bassin_austral & 423 & +use_bassin_pacific & 424 & +use_bassin_merarabie & 425 & +use_bassin_golfebengale & 426 & +use_bassin_indiansud & 427 & +use_bassin_tropics & 428 & +use_bassin_midlats,1) 429 bassin_hauteslats=max(use_bassin_atlantic & 430 & +use_bassin_medit & 431 & +use_bassin_indian & 432 & +use_bassin_austral & 433 & +use_bassin_pacific & 434 & +use_bassin_merarabie & 435 & +use_bassin_golfebengale & 436 & +use_bassin_indiansud & 437 & +use_bassin_tropics & 438 & +use_bassin_midlats & 439 & +use_bassin_hauteslats,1) 440 441 write(*,*) 'bassin_atlantic=' ,bassin_atlantic 442 write(*,*) 'bassin_medit=' ,bassin_medit 443 write(*,*) 'bassin_indian=' ,bassin_indian 444 write(*,*) 'bassin_austral=' ,bassin_austral 445 write(*,*) 'bassin_merarabie=' ,bassin_merarabie 446 write(*,*) 'bassin_golfebengale=' ,bassin_golfebengale 447 write(*,*) 'bassin_indiansud=' ,bassin_indiansud 448 write(*,*) 'bassin_tropics=' ,bassin_tropics 449 write(*,*) 'bassin_midlats=' ,bassin_midlats 450 write(*,*) 'bassin_hauteslats=' ,bassin_hauteslats 451 452 if (use_bassin_atlantic.eq.1) then 453 strtrac(bassin_atlantic)='atl' 454 endif 455 if (use_bassin_medit.eq.1) then 456 strtrac(bassin_medit)='med' 457 endif 458 if (use_bassin_indian.eq.1) then 459 strtrac(bassin_indian)='ind' 460 endif 461 if (use_bassin_austral.eq.1) then 462 strtrac(bassin_austral)='aus' 463 endif 464 if (use_bassin_pacific.eq.1) then 465 strtrac(bassin_pacific)='pac' 466 endif 467 if (use_bassin_merarabie.eq.1) then 468 strtrac(bassin_merarabie)='ara' 469 endif 470 if (use_bassin_golfebengale.eq.1) then 471 strtrac(bassin_golfebengale)='ben' 472 endif 473 if (use_bassin_indiansud.eq.1) then 474 strtrac(bassin_indiansud)='ins' 475 endif 476 if (use_bassin_tropics.eq.1) then 477 strtrac(bassin_tropics)='tro' 478 endif 479 if (use_bassin_midlats.eq.1) then 480 strtrac(bassin_midlats)='mid' 481 endif 482 if (use_bassin_hauteslats.eq.1) then 483 strtrac(bassin_hauteslats)='hau' 484 endif 485 strtrac(ntraceurs_zone-1)='res' 486 strtrac(ntraceurs_zone)='con' 487 488 else if (option_traceurs.eq.4) then 489 ! on trace les température minimales vécues 490 ! comme dans article sur LdG sauf pas de revap 491 492 zone_temp1=293.0 ! en K 493 ! zone_tempf=223.0 ! en K 494 zone_tempf=243.0 ! en K 495 ! courbure de la relation entre l'indice et la température: 0 pour linéaire, <0 pour plus de détal en bas 496 249 bassin_Atlantic = 1 250 bassin_Medit = bassin_Atlantic + COUNT([use_bassin_Medit]); WRITE(*,*) 'bassin_Atlantic =' ,bassin_Atlantic 251 bassin_Indian = bassin_Medit + COUNT([use_bassin_Indian]); WRITE(*,*) 'bassin_Medit =' ,bassin_Medit 252 bassin_Austral = bassin_Indian + COUNT([use_bassin_Austral]); WRITE(*,*) 'bassin_Indian =' ,bassin_Indian 253 bassin_Pacific = bassin_Austral + COUNT([use_bassin_Pacific]); WRITE(*,*) 'bassin_Austral =' ,bassin_Austral 254 bassin_MerArabie = bassin_Pacific + COUNT([use_bassin_MerArabie]); WRITE(*,*) 'bassin_MerArabie =' ,bassin_MerArabie 255 bassin_BengalGolf = bassin_MerArabie + COUNT([use_bassin_BengalGolf]); WRITE(*,*) 'bassin_BengalGolf =' ,bassin_BengalGolf 256 bassin_SouthIndian= bassin_BengalGolf + COUNT([use_bassin_SouthIndian]); WRITE(*,*) 'bassin_SouthIndian =' ,bassin_SouthIndian 257 bassin_Tropics = bassin_SouthIndian + COUNT([use_bassin_Tropics]); WRITE(*,*) 'bassin_Tropics =' ,bassin_Tropics 258 bassin_MidLats = bassin_Tropics + COUNT([use_bassin_MidLats]); WRITE(*,*) 'bassin_MidLats =' ,bassin_MidLats 259 bassin_HighLats = bassin_MidLats + COUNT([use_bassin_HighLats]); WRITE(*,*) 'bassin_HighLats =' ,bassin_HighLats 260 IF(use_bassin_atlantic ) strtrac(bassin_atlantic) = 'atl' 261 IF(use_bassin_medit ) strtrac(bassin_medit) = 'med' 262 IF(use_bassin_indian ) strtrac(bassin_indian) = 'ind' 263 IF(use_bassin_austral ) strtrac(bassin_austral) = 'aus' 264 IF(use_bassin_pacific ) strtrac(bassin_pacific) = 'pac' 265 IF(use_bassin_merarabie ) strtrac(bassin_merarabie) = 'ara' 266 IF(use_bassin_BengalGolf ) strtrac(bassin_BengalGolf) = 'ben' 267 IF(use_bassin_SouthIndian) strtrac(bassin_SouthIndian)= 'ins' 268 IF(use_bassin_tropics ) strtrac(bassin_tropics) = 'tro' 269 IF(use_bassin_midlats ) strtrac(bassin_midlats) = 'mid' 270 IF(use_bassin_HighLats ) strtrac(bassin_HighLats) = 'hau' 271 strtrac(nzone-1)='res' 272 strtrac(nzone)='con' 273 !======================================================================================================================== 274 CASE(4) !=== TRACING MINIMAL EXPERIENCED TEMPERATURE AS IN THE ARTICLE ON LfG, EXCEPT NO REVAPORATION 275 !======================================================================================================================== 276 zone_temp1 = 293.0 ! en K 277 ! zone_tempf = 223.0 ! en K 278 zone_tempf = 243.0 ! en K 279 ! courbure de la relation entre l'indice et la temperature: 0 pour lineaire, <0 pour plus de detal en bas 497 280 ! zone 1: >= zone_temp1 498 ! zone 2 à 4: intermédiaire,281 ! zone 2 a 4: intermediaire, 499 282 ! zone 5: <zone_tempf 500 501 ntraceurs_zone_opt=nzone_temp+1 502 503 zone_tempa=-4.0 ! en K 504 izone_cont=ntraceurs_zone 505 izone_oce=ntraceurs_zone 506 izone_poubelle=ntraceurs_zone 507 izone_init=ntraceurs_zone ! zone d'initialisation par défaut 508 option_revap=0 509 option_tmin=0 510 izone_revap=0 511 option_cond=0 512 do izone=1,nzone_temp 513 write(strz,'(i2.2)') izone 514 strtrac(izone)='t'//strz 515 write(*,*) 'izone,strz,strtrac=',izone,strz,strtrac(izone) 516 enddo 517 strtrac(izone_poubelle)='pou' 518 519 ! initialisation des zones de tempéarture 520 do izone=1,nzone_temp-1 521 zone_temp(izone)=zone_temp1+float(izone-1) & 522 & *(zone_tempa*float(izone-nzone_temp+1) & 523 & +(zone_tempf-zone_temp1)/float(nzone_temp-2)) 524 enddo 525 write(*,*) 'iso_trac_init 183: zone_temp=',zone_temp 526 527 elseif (option_traceurs.eq.5) then 528 ! on trace AEJ/flux de mousson/Harmattan 529 ! write(*,*) 'iso_traceurs_init 129' 530 531 ntraceurs_zone_opt=4 532 izone_cont=1 533 izone_oce=1 534 izone_poubelle=1 ! zone où on met les flux non physiques, de 535 ! réajustement 536 izone_init=1 ! zone d'initialisation par défaut 537 option_revap=0 538 option_tmin=0 539 izone_revap=0 540 izone_aej=2 541 izone_mousson=3 542 izone_harmattan=4 543 option_cond=0 544 545 strtrac(izone_poubelle)='res' 546 strtrac(izone_aej)='aej' 547 strtrac(izone_mousson)='mou' 548 strtrac(izone_harmattan)='sah' 549 550 elseif (option_traceurs.eq.6) then 551 ! on trace les ddfts 552 553 ntraceurs_zone_opt=2 554 izone_cont=1 555 izone_oce=1 556 izone_poubelle=1 ! zone où on met les flux non physiques, de 557 ! réajustement 558 izone_init=1 ! zone d'initialisation par défaut 559 option_revap=0 560 option_tmin=0 561 izone_revap=0 562 izone_ddft=2 563 option_cond=0 564 565 strtrac(izone_poubelle)='res' 566 strtrac(izone_ddft)='dft' 567 568 elseif (option_traceurs.eq.9) then 569 ! on trace le condensat 570 571 ntraceurs_zone_opt=3 572 izone_cont=1 573 izone_oce=1 574 izone_poubelle=1 ! zone où on met les flux non physiques, de 575 ! réajustement 576 izone_init=1 ! zone d'initialisation par défaut 577 option_revap=1 578 option_tmin=0 579 izone_revap=2 580 izone_cond=3 581 option_cond=1 582 583 ! 1 par défaut pour colorier à la fois condensat LS et 584 ! condensat convectif. Mais on peut mettre 2 si on ne veut que 585 ! collorier que le condensat convectif. 586 call getin('option_cond',option_cond) 587 write(*,*) 'option_cond=',option_cond 588 589 strtrac(izone_poubelle)='res' 590 strtrac(izone_cond)='con' 591 strtrac(izone_revap)='rev' 592 593 elseif (option_traceurs.eq.10) then 594 ! on trace l'évap venant de ocean/continent no frac/continent frac 595 ! utilse seulement si couplé avec ORCHIDEE 596 #ifdef CPP_VEGET 597 #else 598 write(*,*) 'iso_traceurs_init 219: option_traceurs=10 ', & 599 & 'inutile si on ne couple pas avec ORCHIDEE' 600 stop 283 nzone_opt=nzone_temp+1 284 zone_tempa=-4.0 ! en K 285 izone_cont=nzone 286 izone_oce=nzone 287 izone_poubelle=nzone 288 izone_init=nzone ! zone d'initialisation par defaut 289 option_revap=0 290 option_tmin=0 291 izone_revap=0 292 option_cond=0 293 DO izone=1,nzone_temp 294 strtrac(izone) = 't'//TRIM(int2str(izone)) 295 WRITE(*,*) 'izone, strtrac=', izone, strtrac(izone) 296 END DO 297 strtrac(izone_poubelle)='pou' 298 ! Initialization of temperatures zones 299 DO izone=1,nzone_temp-1 300 zone_temp(izone) = zone_temp1+float(izone-1) & 301 * (zone_tempa*float(izone-nzone_temp+1) & 302 + (zone_tempf-zone_temp1)/float(nzone_temp-2)) 303 END DO 304 WRITE(*,*) 'iso_trac_init 183: zone_temp=', zone_temp 305 !======================================================================================================================== 306 CASE(5) !=== TRACING AEJ/MOONSOON FLUX/Harmattan 307 !======================================================================================================================== 308 ! WRITE*,*) 'iso_traceurs_init 129' 309 nzone_opt=4 310 izone_cont=1 311 izone_oce=1 312 izone_poubelle=1 ! zone ou on met les flux non physiques, de reajustement 313 izone_init=1 ! zone d'initialisation par defaut 314 option_revap=0 315 option_tmin=0 316 izone_revap=0 317 izone_aej=2 318 izone_mousson=3 319 izone_harmattan=4 320 option_cond=0 321 strtrac(izone_poubelle) = 'res' 322 strtrac(izone_aej) = 'aej' 323 strtrac(izone_mousson) = 'mou' 324 strtrac(izone_harmattan)= 'sah' 325 !======================================================================================================================== 326 CASE(6) !=== TRACING DDFTS 327 !======================================================================================================================== 328 nzone_opt=2 329 izone_cont=1 330 izone_oce=1 331 izone_poubelle=1 ! zone ou on met les flux non physiques, de reajustement 332 izone_init=1 ! zone d'initialisation par defaut 333 option_revap=0 334 option_tmin=0 335 izone_revap=0 336 izone_ddft=2 337 option_cond=0 338 strtrac(izone_poubelle)='res' 339 strtrac(izone_ddft)='dft' 340 !======================================================================================================================== 341 CASE(9) !=== TRACING CONDENSATION 342 !======================================================================================================================== 343 nzone_opt=3 344 izone_cont=1 345 izone_oce=1 346 izone_poubelle=1 ! zone ou on met les flux non physiques, de reajustement 347 izone_init=1 ! zone d'initialisation par defaut 348 option_revap=1 349 option_tmin=0 350 izone_revap=2 351 izone_cond=3 352 option_cond=1 353 ! 1 par defaut pour colorier a la fois condensat LS et condensat convectif. 354 ! Mais on peut mettre 2 si on ne veut que colorier que le condensat convectif. 355 CALL get_in('option_cond',option_cond) 356 strtrac(izone_poubelle)='res' 357 strtrac(izone_cond)='con' 358 strtrac(izone_revap)='rev' 359 !======================================================================================================================== 360 CASE(10) !=== TRACING EVAPORATION FROM OCEAN/LAND, NON FRAC/LAND FRAC ; ONLY WHEN COUPLED WITH ORCHIDEE 361 !======================================================================================================================== 362 #ifndef CPP_VEGET 363 WRITE(*,*) 'iso_traceurs_init 219: option_traceurs=10 inutile si on ne couple pas avec ORCHIDEE'; STOP 601 364 #endif 602 603 ntraceurs_zone_opt=3 604 izone_cont=1 ! sous-entendu non fractionnant 605 izone_oce=2 606 izone_poubelle=2 ! zone où on met les flux non physiques, de 607 ! réajustement 608 izone_init=2 ! zone d'initialisation par défaut 609 option_revap=0 610 option_tmin=0 611 izone_revap=0 612 izone_contfrac=3 613 izone_contcanop=3 614 izone_irrig=0 615 option_cond=0 616 617 strtrac(izone_oce)='oce' 618 strtrac(izone_cont)='con' 619 strtrac(izone_contfrac)='enu' ! evap sol nu 620 621 elseif (option_traceurs.eq.11) then 622 ! on trace reevap des gouttes et le reste 623 624 ntraceurs_zone_opt=2 625 izone_cont=1 626 izone_oce=1 627 izone_poubelle=1 ! zone où on met les flux non physiques, de 628 ! réajustement 629 izone_init=1 ! zone d'initialisation par défaut 630 option_revap=1 631 option_tmin=0 632 izone_revap=2 633 izone_irrig=0 634 option_cond=0 635 636 strtrac(izone_poubelle)='res' 637 strtrac(izone_revap)='rev' 638 639 elseif (option_traceurs.eq.12) then 640 ! on trace evap du sol nu, evap de la canopée, reste de l'evap cont et 641 ! evap oce 642 #ifdef CPP_VEGET 643 #else 644 write(*,*) 'iso_traceurs_init 257: option_traceurs=10 ', & 645 & 'inutile si on ne couple pas avec ORCHIDEE' 646 stop 365 nzone_opt=3 366 izone_cont=1 ! sous-entendu non fractionnant 367 izone_oce=2 368 izone_poubelle=2 ! zone ou on met les flux non physiques, de reajustement 369 izone_init=2 ! zone d'initialisation par defaut 370 option_revap=0 371 option_tmin=0 372 izone_revap=0 373 izone_contfrac=3 374 izone_contcanop=3 375 izone_irrig=0 376 option_cond=0 377 strtrac(izone_oce)='oce' 378 strtrac(izone_cont)='con' 379 strtrac(izone_contfrac)='enu' ! evap sol nu 380 !======================================================================================================================== 381 CASE(11) !=== TRACING DROPLETS REEVAPORATION + REST 382 !======================================================================================================================== 383 nzone_opt=2 384 izone_cont=1 385 izone_oce=1 386 izone_poubelle=1 ! zone ou on met les flux non physiques, de reajustement 387 izone_init=1 ! zone d'initialisation par defaut 388 option_revap=1 389 option_tmin=0 390 izone_revap=2 391 izone_irrig=0 392 option_cond=0 393 strtrac(izone_poubelle)='res' 394 strtrac(izone_revap)='rev' 395 !======================================================================================================================== 396 CASE(12) !=== TRACING NAKED GROUND EVAPORATION, CANOPY EVAPORATION, REST OF LAND EVAPORATION AND OCEAN EVAPORATION 397 !======================================================================================================================== 398 #ifndef CPP_VEGET 399 WRITE(*,*) 'iso_traceurs_init 257: option_traceurs=10 inutile si on ne couple pas avec ORCHIDEE'; STOP 647 400 #endif 648 649 ntraceurs_zone_opt=2 650 izone_cont=1 651 izone_oce=2 652 izone_poubelle=2 ! zone où on met les flux non physiques, de 653 ! réajustement 654 izone_init=2 ! zone d'initialisation par défaut 655 option_revap=0 656 option_tmin=0 657 izone_revap=0 658 izone_contfrac=3 659 izone_contcanop=4 660 izone_irrig=0 661 option_cond=0 662 663 strtrac(izone_oce)='oce' 664 strtrac(izone_cont)='con' 665 strtrac(izone_contfrac)='enu' ! evap sol nu 666 strtrac(izone_contcanop)='eca' ! evap canop 667 668 else if (option_traceurs.eq.13) then 669 ! on trace les température minimales vécues + la revap 670 ! comme dans article sur LdG 671 672 zone_temp1=293.0 ! en K 673 ! parameter (zone_tempf=223.0) ! en K 674 zone_tempf=243.0 ! en K 675 zone_tempa=-4.0 ! courbure de la relation entre l'indice et la température: 0 pour linéaire, <0 pour plus de détal en bas 676 677 ! zone 1: >= zone_temp1 678 ! zone 2 à 4: intermédiaire, 679 ! zone 5: <zone_tempf 680 681 ntraceurs_zone_opt=nzone_temp+1 682 683 izone_cont=1 684 izone_oce=1 685 izone_poubelle=1 686 izone_init=1 ! zone d'initialisation par défaut 687 option_revap=1 688 option_tmin=0 689 izone_revap=ntraceurs_zone 690 izone_irrig=0 691 option_cond=0 692 do izone=1,nzone_temp 693 write(strz,'(i2.2)') izone 694 strtrac(izone)='t'//strz 695 write(*,*) 'izone,strz,strtrac=',izone,strz,strtrac(izone) 696 enddo 697 strtrac(izone_revap)='rev' 698 699 ! initialisation des zones de tempéarture 700 do izone=1,nzone_temp-1 701 zone_temp(izone)=zone_temp1+float(izone-1) & 702 & *(zone_tempa*float(izone-nzone_temp+1) & 703 & +(zone_tempf-zone_temp1)/float(nzone_temp-2)) 704 enddo 705 write(*,*) 'zone_temp=',zone_temp 706 707 else if (option_traceurs.eq.14) then 708 ! on trace les pres et lat de dernière saturation définies 709 ! comme rh>90% 710 711 zone_pres1=600.0*100.0 ! en Pa 712 zone_presf=300.0*100.0 ! en Pa 713 zone_presa=0.0 ! courbure de la relation entre l'indice et la température: 0 pour linéaire, <0 pour plus de détal en bas 714 715 lattag_min=10.0 ! en degrès 716 dlattag=15.0 717 718 ! zone 1: >= zone_pres1 719 ! zone 2 à 4: intermédiaire, 720 ! zone 5: <zone_presf 721 722 ntraceurs_zone_opt=nzone_pres*nzone_lat+1 723 izone_cont=ntraceurs_zone 724 izone_oce=ntraceurs_zone 725 izone_poubelle=ntraceurs_zone 726 izone_init=ntraceurs_zone ! zone d'initialisation par défaut 727 option_revap=0 728 option_tmin=0 729 izone_revap=0 730 izone_irrig=0 731 option_cond=0 732 do izone_pres=1,nzone_pres 733 do izone_lat=1,nzone_lat 734 write(strz_pres,'(i1.1)') izone_pres 735 write(strz_lat,'(i1.1)') izone_lat 736 strz_preslat=strz_pres//strz_lat 737 izone=izone_lat+(izone_pres-1)*nzone_lat 738 strtrac(izone)='t'//strz_preslat 739 write(*,*) 'izone_pres,izone_lat,strtrac=', & 740 & izone_pres,izone_lat,izone,strtrac(izone) 741 enddo !do izone_lat=1,nzone_lat 742 enddo !do izone_pres=1,nzone_pres 743 strtrac(ntraceurs_zone)='sfc' 744 745 ! initialisation des zones de tempéarture 746 do izone=1,nzone_pres-1 747 zone_pres(izone)=zone_pres1+float(izone-1) & 748 & *(zone_presa*float(izone-nzone_pres+1) & 749 & +(zone_presf-zone_pres1)/float(nzone_pres-2)) 750 enddo !do izone=1,nzone_pres-1 751 write(*,*) 'traceurs_init 332: zone_pres=',zone_pres 752 ! stop 753 ! 754 elseif (option_traceurs.eq.15) then 755 ! on trace l'irrigation dans ORCHIDEE 756 #ifdef CPP_VEGET 757 #else 758 write(*,*) 'iso_traceurs_init 257: option_traceurs=15 ', & 759 & 'inutile si on ne couple pas avec ORCHIDEE' 760 stop 401 nzone_opt=2 402 izone_cont=1 403 izone_oce=2 404 izone_poubelle=2 ! zone ou on met les flux non physiques, de reajustement 405 izone_init=2 ! zone d'initialisation par defaut 406 option_revap=0 407 option_tmin=0 408 izone_revap=0 409 izone_contfrac=3 410 izone_contcanop=4 411 izone_irrig=0 412 option_cond=0 413 strtrac(izone_oce)='oce' 414 strtrac(izone_cont)='con' 415 strtrac(izone_contfrac)='enu' ! evap sol nu 416 strtrac(izone_contcanop)='eca'! evap canop 417 !======================================================================================================================== 418 CASE(13) !=== TRACING MINIMUM EXPERIENCED TEMPERATIRES + REEVAPORATION AS IN THE ARTICLE ON LdG 419 !======================================================================================================================== 420 zone_temp1=293.0 ! en K 421 ! zone_tempf=223.0 ! en K 422 zone_tempf=243.0 ! en K 423 zone_tempa=-4.0 ! courbure de la relation entre l'indice et la temperature: 0 pour lineaire, <0 pour plus de detal en bas 424 ! zone 1: >= zone_temp1 425 ! zone 2 a 4: intermediaire, 426 ! zone 5: <zone_tempf 427 nzone_opt=nzone_temp+1 428 izone_cont=1 429 izone_oce=1 430 izone_poubelle=1 431 izone_init=1 ! zone d'initialisation par defaut 432 option_revap=1 433 option_tmin=0 434 izone_revap=nzone 435 izone_irrig=0 436 option_cond=0 437 DO izone=1,nzone_temp 438 strtrac(izone) = 't'//TRIM(int2str(izone)) 439 WRITE(*,*) 'izone, strtrac = ', izone, strtrac(izone) 440 END DO 441 strtrac(izone_revap)='rev' 442 ! initialisation des zones de tempearture 443 DO izone=1,nzone_temp-1 444 zone_temp(izone) = zone_temp1+float(izone-1) & 445 *(zone_tempa*float(izone-nzone_temp+1) & 446 +(zone_tempf-zone_temp1)/float(nzone_temp-2)) 447 END DO 448 WRITE(*,*) 'zone_temp=',zone_temp 449 !======================================================================================================================== 450 CASE(14) !=== TRACING PRES AND LAT OF LAST SATURATION DEFINED AS rh>90% 451 !======================================================================================================================== 452 zone_pres1=600.0*100.0 ! en Pa 453 zone_presf=300.0*100.0 ! en Pa 454 zone_presa=0.0 ! courbure de la relation entre l'indice et la temperature: 0 pour lineaire 455 lattag_min=10.0 ! en degres 456 dlattag=15.0 457 ! zone 1: >= zone_pres1 458 ! zone 2 a 4: intermediaire, 459 ! zone 5: <zone_presf 460 nzone_opt=nzone_pres*nzone_lat+1 461 izone_cont=nzone 462 izone_oce=nzone 463 izone_poubelle=nzone 464 izone_init=nzone ! zone d'initialisation par defaut 465 option_revap=0 466 option_tmin=0 467 izone_revap=0 468 izone_irrig=0 469 option_cond=0 470 DO izone_pres=1,nzone_pres 471 DO izone_lat=1,nzone_lat 472 izone=izone_lat+(izone_pres-1)*nzone_lat 473 strtrac(izone) = 't'//TRIM(int2str(izone_pres))//TRIM(int2str(izone_lat)) 474 write(*,*) 'izone_pres, izone_lat, izone, strtrac = ',izone_pres, izone_lat, izone, strtrac(izone) 475 END DO 476 END DO 477 strtrac(nzone)='sfc' 478 ! initialisation des zones de temperature 479 DO izone=1,nzone_pres-1 480 zone_pres(izone) = zone_pres1+float(izone-1) & 481 *(zone_presa*float(izone-nzone_pres+1) & 482 +(zone_presf-zone_pres1)/float(nzone_pres-2)) 483 END DO 484 WRITE(*,*) 'traceurs_init 332: zone_pres=',zone_pres 485 !======================================================================================================================== 486 CASE(15) !=== TRACING IRRIGATION IN ORCHIDEE 487 !======================================================================================================================== 488 #ifndef CPP_VEGET 489 WRITE(*,*) 'iso_traceurs_init 257: option_traceurs=15 inutile si on ne couple pas avec ORCHIDEE'; STOP 761 490 #endif 762 763 ntraceurs_zone_opt=1 764 izone_cont=1 765 izone_oce=1 766 izone_poubelle=1 ! zone où on met les flux non physiques, de 767 ! réajustement 768 izone_init=1 ! zone d'initialisation par défaut 769 option_revap=0 770 option_tmin=0 771 izone_revap=0 772 izone_contfrac=0 773 izone_contcanop=0 774 izone_irrig=2 775 option_cond=0 776 777 strtrac(izone_poubelle)='res' 778 strtrac(izone_irrig)='irrig' 779 780 ! dans ce cas particulier, il y a des traceurs dans ORCHIDEE 781 ntracisoOR=ntraciso 782 783 else if ((option_traceurs.eq.17).or. & 784 & (option_traceurs.eq.18)) then 785 ! on trace les température minimales vécues 786 ! comme dans article sur LdG sauf pas de revap 787 788 zone_temp1=12.0e-3 ! en kg/kg 789 zone_tempf=0.2e-3 ! en kg/kg 790 zone_tempa=1.2e-3 ! courbure de la relation entre l'indice et la température: 0 pour linéaire, <0 pour plus de détail en bas 791 792 ! parameter (zone_temp1=14.0e-3) ! en kg/kg 793 ! parameter (zone_tempf=0.2e-3) ! en kg/kg 794 ! parameter (zone_tempa=0.5e-3) 795 796 ! parameter (zone_temp1=10.0e-3) ! en kg/kg 797 ! parameter (zone_tempf=0.5e-3) ! en kg/kg 798 ! parameter (zone_tempa=0.5e-3) 799 800 ! zone 1: >= zone_temp1 801 ! zone 2 à 4: intermédiaire, 802 ! zone 5: <zone_tempf 803 804 ntraceurs_zone_opt=nzone_temp+3 805 806 izone_cont=nzone_temp+1 807 izone_oce=nzone_temp+1 808 izone_poubelle=nzone_temp+1 809 izone_init=nzone_temp+1 ! zone d'initialisation par défaut 810 option_revap=1 811 option_tmin=1 812 option_cond=1 813 814 izone_revap=nzone_temp+3 815 izone_cond=nzone_temp+2 816 do izone=1,nzone_temp 817 write(strz,'(i2.2)') izone 818 strtrac(izone)='t'//strz 819 write(*,*) 'izone,strz,strtrac=',izone,strz,strtrac(izone) 820 enddo !do izone=1,nzone_temp 821 strtrac(izone_poubelle)='sfc' 822 strtrac(izone_cond)='con' 823 strtrac(izone_revap)='rev' 824 825 ! initialisation des zones de tempéarture 826 do izone=1,nzone_temp-1 827 zone_temp(izone)=zone_temp1+float(izone-1) & 828 & *(zone_tempa*float(izone-nzone_temp+1) & 829 & +(zone_tempf-zone_temp1)/float(nzone_temp-2)) 830 enddo 831 write(*,*) 'zone_temp1,zone_tempf,zone_tempa=', & 832 & zone_temp1,zone_tempf,zone_tempa 833 write(*,*) 'zone_temp=',zone_temp 834 ! stop 835 836 else if (option_traceurs.eq.19) then 837 838 zone_temp1=12.0e-3 ! en kg/kg 839 zone_tempf=0.2e-3 ! en kg/kg 840 zone_tempa=1.2e-3 ! courbure de la relation entre l'indice et la température: 0 pour linéaire, <0 pour plus de détail en bas 841 842 ! parameter (zone_temp1=14.0e-3) ! en kg/kg 843 ! parameter (zone_tempf=0.2e-3) ! en kg/kg 844 ! parameter (zone_tempa=0.5e-3) 845 846 ! parameter (zone_temp1=10.0e-3) ! en kg/kg 847 ! parameter (zone_tempf=0.5e-3) ! en kg/kg 848 ! parameter (zone_tempa=0.5e-3) 849 850 ! zone 1: >= zone_temp1 851 ! zone 2 à 4: intermédiaire, 852 ! zone 5: <zone_tempf 853 854 ntraceurs_zone_opt=nzone_temp+4 855 856 izone_cont=nzone_temp+1 857 izone_oce=nzone_temp+1 858 izone_poubelle=nzone_temp+1 859 if (option_seuil_tag_tmin.eq.1) then 860 izone_init=nzone_temp+1 ! zone d'initialisation par défaut 861 else 491 nzone_opt=1 492 izone_cont=1 493 izone_oce=1 494 izone_poubelle=1 ! zone ou on met les flux non physiques, de reajustement 495 izone_init=1 ! zone d'initialisation par defaut 496 option_revap=0 497 option_tmin=0 498 izone_revap=0 499 izone_contfrac=0 500 izone_contcanop=0 501 izone_irrig=2 502 option_cond=0 503 strtrac(izone_poubelle)='res' 504 strtrac(izone_irrig)='irrig' 505 ! dans ce cas particulier, il y a des traceurs dans ORCHIDEE 506 ntracisoOR=ntiso 507 !======================================================================================================================== 508 CASE(17,18) !=== TRACING MINIMAL EXPERIENCES TEMPERATURES AS IN THE ARTICLE ABOUT LdG, BUT NO EVAPORATION 509 !======================================================================================================================== 510 zone_temp1=12.0e-3 ! en kg/kg 511 zone_tempf=0.2e-3 ! en kg/kg 512 zone_tempa=1.2e-3 ! courbure de la relation entre l'indice et la temperature: 0 pour lineaire 513 ! zone_temp1=14.0e-3 ! en kg/kg 514 ! zone_tempf=0.2e-3 ! en kg/kg 515 ! zone_tempa=0.5e-3 516 ! zone_temp1=10.0e-3 ! en kg/kg 517 ! zone_tempf=0.5e-3 ! en kg/kg 518 ! zone_tempa=0.5e-3 519 ! zone 1: >= zone_temp1 520 ! zone 2 a 4: intermediaire, 521 ! zone 5: <zone_tempf 522 nzone_opt=nzone_temp+3 523 izone_cont=nzone_temp+1 524 izone_oce=nzone_temp+1 525 izone_poubelle=nzone_temp+1 526 izone_init=nzone_temp+1 ! zone d'initialisation par defaut 527 option_revap=1 528 option_tmin=1 529 option_cond=1 530 izone_revap=nzone_temp+3 531 izone_cond=nzone_temp+2 532 DO izone=1,nzone_temp 533 strtrac(izone) = 't'//TRIM(int2str(izone)) 534 WRITE(*,*) 'izone, strtrac = ', izone, strtrac(izone) 535 END DO !do izone=1,nzone_temp 536 strtrac(izone_poubelle)='sfc' 537 strtrac(izone_cond)='con' 538 strtrac(izone_revap)='rev' 539 ! initialisation des zones de tempearture 540 DO izone=1,nzone_temp-1 541 zone_temp(izone) = zone_temp1+float(izone-1) & 542 *(zone_tempa*float(izone-nzone_temp+1) & 543 +(zone_tempf-zone_temp1)/float(nzone_temp-2)) 544 END DO 545 WRITE(*,*) 'zone_temp1,zone_tempf,zone_tempa=',zone_temp1,zone_tempf,zone_tempa 546 WRITE(*,*) 'zone_temp=',zone_temp 547 ! STOP 548 !======================================================================================================================== 549 CASE(19) !=== TRACING TROPICAL AND EXTRATROPICAL VAPOUR 550 !======================================================================================================================== 551 zone_temp1=12.0e-3 ! en kg/kg 552 zone_tempf=0.2e-3 ! en kg/kg 553 zone_tempa=1.2e-3 ! courbure de la relation entre l'indice et la temperature: 0 pour lineaire, <0 pour plus de detail en bas 554 ! zone_temp1=14.0e-3 ! en kg/kg 555 ! zone_tempf=0.2e-3 ! en kg/kg 556 ! zone_tempa=0.5e-3 557 ! zone_temp1=10.0e-3 ! en kg/kg 558 ! zone_tempf=0.5e-3 ! en kg/kg 559 ! zone_tempa=0.5e-3 560 ! zone 1: >= zone_temp1 561 ! zone 2 a 4: intermediaire, 562 ! zone 5: <zone_tempf 563 nzone_opt=nzone_temp+4 564 izone_cont=nzone_temp+1 565 izone_oce=nzone_temp+1 566 izone_poubelle=nzone_temp+1 567 IF(option_seuil_tag_tmin == 1) THEN 568 izone_init=nzone_temp+1 ! zone d'initialisation par defaut 569 ELSE 862 570 izone_init=nzone_temp 863 endif 864 option_revap=1 865 izone_revap=nzone_temp+3 866 izone_cond=nzone_temp+2 867 izone_ddft=nzone_temp+4 868 option_tmin=1 869 option_cond=1 870 do izone=1,nzone_temp 871 write(strz,'(i2.2)') izone 872 strtrac(izone)='t'//strz 873 write(*,*) 'izone,strz,strtrac=',izone,strz,strtrac(izone) 874 enddo !do izone=1,nzone_temp 875 strtrac(izone_poubelle)='sfc' 876 strtrac(izone_cond)='con' 877 strtrac(izone_revap)='rev' 878 strtrac(izone_ddft)='dft' 879 880 elseif (option_traceurs.eq.20) then 881 ! on vapeur tropical/extractropicale/recyclage extractropical 882 ! pour comprendre controles humidité et isotopes subtropicaux. 883 884 lim_tag20=35.0 885 call getin('lim_tag20',lim_tag20) 886 write(*,*) 'lim_tag20=',lim_tag20 887 888 ntraceurs_zone_opt=3 889 izone_cont=1 890 izone_oce=1 891 izone_poubelle=2 ! zone où on met les flux non physiques, de 892 ! réajustement 893 izone_init=2 ! zone d'initialisation par défaut 894 option_revap=0 895 option_tmin=0 896 izone_revap=0 897 izone_trop=2 898 izone_extra=3 899 900 strtrac(izone_trop)='tro' ! vapeur tropicale 901 strtrac(izone_extra)='ext' ! vapeur extractropicale evaporée 902 ! dans les tropiques 903 strtrac(izone_cont)='rec' ! recyclage 904 905 elseif (option_traceurs.eq.21) then 906 ! on trace 2 boites 3D: UT tropicale et extratropiques 907 ! fonctionnement similaire à option 5 pour taggage des zones 908 ! AMMA 909 ! write(*,*) 'iso_traceurs_init 129' 910 911 ntraceurs_zone_opt=3 912 izone_cont=1 913 izone_oce=1 914 izone_poubelle=1 ! zone où on met les flux non physiques, de 915 ! réajustement 916 izone_init=1 ! zone d'initialisation par défaut 917 option_revap=0 918 option_tmin=0 919 izone_revap=0 920 izone_trop=2 921 izone_extra=3 922 option_cond=0 923 924 strtrac(izone_poubelle)='res' 925 strtrac(izone_trop)='tro' 926 strtrac(izone_extra)='ext' 927 928 elseif (option_traceurs.eq.22) then 929 ! on trace la vapeur qui a été processée dans zones de 930 ! convections à 3 niveaux: BT, MT et UT 931 932 lim_precip_tag22=20.0 933 call getin('lim_precip_tag22',lim_precip_tag22) 934 write(*,*) 'lim_precip_tag22=',lim_precip_tag22 935 936 ntraceurs_zone_opt=3 937 izone_cont=1 938 izone_oce=1 939 izone_poubelle=1 ! zone où on met les flux non physiques, de 940 ! réajustement 941 izone_init=1 ! zone d'initialisation par défaut 942 option_revap=0 943 option_tmin=0 944 izone_revap=0 945 izone_conv_BT=2 946 izone_conv_UT=3 947 option_cond=0 948 949 strtrac(izone_poubelle)='res' 950 strtrac(izone_conv_BT)='cbt' 951 strtrac(izone_conv_UT)='cut' 952 953 else 954 write(*,*) 'traceurs_init 36: option pas encore prévue' 955 stop 956 endif 957 958 959 if (ntraceurs_zone_opt.ne.ntraceurs_zone) then 960 write(*,*) 'ntraceurs_zone_opt,ntraceurs_zone=', & 961 & ntraceurs_zone_opt,ntraceurs_zone 962 call abort_physic ('isotrac_mod','ntraceurs_zone incoherent',1) 963 endif 964 965 966 ! seuil sur le taux de condensation 967 if (option_tmin.eq.1) then 968 seuil_tag_tmin=0.01 969 call getin('seuil_tag_tmin',seuil_tag_tmin) 970 write(*,*) 'seuil_tag_tmin=',seuil_tag_tmin 971 972 seuil_tag_tmin_ls=seuil_tag_tmin 973 call getin('seuil_tag_tmin_ls',seuil_tag_tmin_ls) 974 write(*,*) 'seuil_tag_tmin_ls=',seuil_tag_tmin_ls 975 976 option_seuil_tag_tmin=1 977 call getin('option_seuil_tag_tmin',option_seuil_tag_tmin) 978 write(*,*) 'option_seuil_tag_tmin=',option_seuil_tag_tmin 979 endif 980 981 982 do ixt=1,niso 983 index_zone(ixt)=0 984 index_iso(ixt)=ixt 985 enddo 986 itrac=niso 987 do izone=1,ntraceurs_zone 988 do ixt=1,niso 989 itrac=itrac+1 990 index_zone(itrac)=izone 991 index_iso(itrac)=ixt 992 index_trac_loc(izone,ixt)=itrac 993 if (index_trac(izone,ixt).ne.index_trac_loc(izone,ixt)) then 994 write(*,*) 'isotrac 989: izone,ixt,itrac=',izone,ixt,itrac 995 CALL abort_physic ('isotrac','isotrac 989',1) 996 endif 997 enddo 998 enddo 571 END IF 572 option_revap=1 573 izone_revap=nzone_temp+3 574 izone_cond=nzone_temp+2 575 izone_ddft=nzone_temp+4 576 option_tmin=1 577 option_cond=1 578 DO izone=1,nzone_temp 579 strtrac(izone) = 't'//TRIM(int2str(izone)) 580 WRITE(*,*) 'izone, strtrac = ', izone, strtrac(izone) 581 END DO 582 strtrac(izone_poubelle)='sfc' 583 strtrac(izone_cond)='con' 584 strtrac(izone_revap)='rev' 585 strtrac(izone_ddft)='dft' 586 !======================================================================================================================== 587 CASE(20) !=== TRACING TROPICAL/EXTRATROPICAL/EXTRATROPICAL RECYCLING TO STUDY HUMIDITY AND SUBTROPICAL ISOTOPES CONTROL 588 !======================================================================================================================== 589 CALL get_in('lim_tag20', lim_tag20, 35.0) 590 nzone_opt=3 591 izone_cont=1 592 izone_oce=1 593 izone_poubelle=2 ! zone ou on met les flux non physiques, de reajustement 594 izone_init=2 ! zone d'initialisation par defaut 595 option_revap=0 596 option_tmin=0 597 izone_revap=0 598 izone_trop=2 599 izone_extra=3 600 strtrac(izone_trop)='tro' ! tropical vapour 601 strtrac(izone_extra)='ext' ! extratropical vapour evaporated in the tropics 602 strtrac(izone_cont)='rec' ! recycling 603 !======================================================================================================================== 604 CASE(21) !=== TRACING TWO 3D BOXES: TROPICAL UT AND EXTRATROPICS ; SIMILAR TO 5 FOR AMMA ZONES TAGGING 605 !======================================================================================================================== 606 ! WRITE(*,*) 'iso_traceurs_init 129' 607 nzone_opt=3 608 izone_cont=1 609 izone_oce=1 610 izone_poubelle=1 ! zone ou on met les flux non physiques, de reajustement 611 izone_init=1 ! zone d'initialisation par defaut 612 option_revap=0 613 option_tmin=0 614 izone_revap=0 615 izone_trop=2 616 izone_extra=3 617 option_cond=0 618 strtrac(izone_poubelle)='res' 619 strtrac(izone_trop)='tro' 620 strtrac(izone_extra)='ext' 621 !======================================================================================================================== 622 CASE(22) !=== TRACING WATER VAPOUR PROCESSED IN THE 3-LEVELS SCONVECTION ZONES BT, MT AND UT 623 !======================================================================================================================== 624 CALL get_in('lim_precip_tag22', lim_precip_tag22, 20.0) 625 nzone_opt=3 626 izone_cont=1 627 izone_oce=1 628 izone_poubelle=1 ! zone ou on met les flux non physiques, de reajustement 629 izone_init=1 ! zone d'initialisation par defaut 630 option_revap=0 631 option_tmin=0 632 izone_revap=0 633 izone_conv_BT=2 634 izone_conv_UT=3 635 option_cond=0 636 strtrac(izone_poubelle)='res' 637 strtrac(izone_conv_BT)='cbt' 638 strtrac(izone_conv_UT)='cut' 639 CASE DEFAULT 640 WRITE(*,*) 'traceurs_init 36: option pas encore prevue' ; STOP 641 END SELECT 642 643 IF(nzone_opt /= nzone) THEN 644 WRITE(*,*) 'nzone_opt, nzone=', nzone_opt, nzone 645 CALL abort_physic ('isotrac_mod','nzone incoherent',1) 646 END IF 647 648 !--- Condensation rate threshold 649 IF(option_tmin == 1) THEN 650 seuil_tag_tmin = 0.01 651 CALL get_in('seuil_tag_tmin', seuil_tag_tmin, 0.01) 652 CALL get_in('seuil_tag_tmin_ls', seuil_tag_tmin_ls, seuil_tag_tmin) 653 CALL get_in('option_seuil_tag_tmin', option_seuil_tag_tmin, 1) 654 END IF 655 656 index_zone = [(strIdx(isoZone, strTail(isoName(ixt) ,'_',.TRUE.)), ixt=1, ntiso)] 657 index_iso = [(strIdx(isoName, strHead(isoName(ixt) ,'_',.TRUE.)), ixt=1, ntiso)] 658 itZonIso_loc = itZonIso(:,:) 999 659 #ifdef ISOVERIF 1000 ! call iso_verif_egalite(float(itrac),float(ntraciso), & 1001 ! & 'traceurs_init 50') 1002 if (itrac.ne.ntraciso) then 1003 write(*,*) 'traceurs_init 50' 1004 stop 1005 endif 1006 1007 write(*,*) 'traceurs_init 65: bilan de l''init:' 1008 write(*,*) 'index_zone=',index_zone(1:ntraciso) 1009 write(*,*) 'index_iso=',index_iso(1:ntraciso) 1010 write(*,*) 'index_trac=',index_trac(1:ntraceurs_zone,1:niso) 1011 do izone=1,ntraceurs_zone 1012 write(*,*) 'strtrac(',izone,')=',strtrac(izone) 1013 enddo !do izone=1,ntraceurs_zone 1014 write(*,*) 'ntracisoOR=',ntracisoOR 660 WRITE(*,*) 'traceurs_init 65: bilan de l''init:' 661 WRITE(*,*) 'index_zone = '//TRIM(strStack(int2str(index_zone(1:ntiso)))) 662 WRITE(*,*) 'index_iso = '//TRIM(strStack(int2str(index_iso (1:ntiso)))) 663 DO izone=1,nzone 664 WRITE(*,*)'itZonIso('//TRIM(int2str(izone))//',:) = '//strStack(int2str(itZonIso(izone,:))) 665 END DO 666 DO izone=1,nzone 667 WRITE(*,*)'strtrac('//TRIM(int2str(izone))//',:) = '//TRIM(strtrac(izone)) 668 END DO 669 WRITE(*,*) 'ntracisoOR=',ntracisoOR 1015 670 #endif 1016 671 1017 end subroutine iso_traceurs_init 1018 672 END SUBROUTINE iso_traceurs_init 1019 673 1020 674 END MODULE isotrac_mod -
LMDZ6/branches/Portage_acc/libf/phylmdiso/isotrac_routines_mod.F90
r3927 r4446 8 8 ! isotopes_verif a besoin de isotopes et isotrac 9 9 ! isotrac n'a besoin que de isotopes 10 USE infotrac_phy, ONLY: ntraciso=>ntiso, niso, index_trac=>itZonIso, ntraceurs_zone=>nzone 10 11 IMPLICIT NONE 11 12 … … 17 18 & ncum,izone) 18 19 19 USE infotrac_phy, ONLY: ntraciso,niso,index_trac20 20 USE isotopes_mod, ONLY: ridicule,iso_eau 21 21 … … 63 63 & xtp_avantevap_cas,liq,hdiag) 64 64 65 USE infotrac_phy, ONLY: ntraciso,niso,index_trac66 65 USE isotopes_mod, ONLY: ridicule,iso_eau,iso_HDO,ridicule_evap 67 66 USE isotrac_mod, only: option_revap,evap_franche,izone_revap, & … … 231 230 & nloc,ncum,nd,i,izone) 232 231 233 USE infotrac_phy, ONLY: ntraciso,niso,index_trac234 232 USE isotopes_mod, ONLY: iso_eau 235 233 #ifdef ISOVERIF … … 320 318 & nloc,ncum,nd,i,izone) 321 319 322 USE infotrac_phy, ONLY: ntraciso,niso,index_trac323 320 USE isotopes_mod, ONLY: iso_eau 324 321 #ifdef ISOVERIF … … 408 405 & nloc,ncum,nd,i,izone) 409 406 410 USE infotrac_phy, ONLY: ntraciso,niso,index_trac411 407 USE isotopes_mod, ONLY: ridicule,iso_eau 412 408 #ifdef ISOVERIF … … 476 472 & nloc,ncum,nd,izone) 477 473 478 USE infotrac_phy, ONLY: ntraciso,niso,index_trac479 474 USE isotopes_mod, ONLY: ridicule,iso_eau 480 475 #ifdef ISOVERIF … … 643 638 & nloc,ncum,nd,i,frac_sublim,izone) 644 639 645 USE infotrac_phy, ONLY: ntraciso,niso,index_trac646 640 USE isotopes_mod, ONLY: ridicule,iso_eau 647 641 #ifdef ISOVERIF … … 802 796 & xtrevap_tag,liq,hdiag) 803 797 804 USE infotrac_phy, ONLY: ntraciso,niso,index_trac805 798 USE isotopes_mod, ONLY: ridicule,iso_eau 806 799 USE isotrac_mod, only: option_revap,evap_franche … … 899 892 & klon,izone,ptrac) 900 893 901 USE infotrac_phy, ONLY: ntraciso,niso,index_trac902 894 USE isotopes_mod, ONLY: ridicule,iso_eau 903 895 #ifdef ISOVERIF … … 986 978 & klon,izone) 987 979 988 USE infotrac_phy, ONLY: ntraciso,niso,index_trac989 980 USE isotopes_mod, ONLY: ridicule,iso_eau 990 981 #ifdef ISOVERIF … … 1052 1043 & klon,izone,zxt,xtrevap_tag) 1053 1044 1054 USE infotrac_phy, ONLY: ntraciso,niso, &1055 ntraceurs_zone,index_trac1056 1045 #ifdef ISOVERIF 1057 1046 USE isotopes_verif_mod … … 1124 1113 USE isotrac_mod, only: use_bassin_atlantic,use_bassin_medit, & 1125 1114 & use_bassin_indian,use_bassin_austral,use_bassin_pacific, & 1126 & use_bassin_ merarabie,use_bassin_golfebengale,use_bassin_indiansud, &1127 & use_bassin_tropics,use_bassin_midlats,use_bassin_ hauteslats, &1115 & use_bassin_MerArabie,use_bassin_BengalGolf,use_bassin_SouthIndian, & 1116 & use_bassin_tropics,use_bassin_midlats,use_bassin_HighLats, & 1128 1117 & bassin_atlantic,bassin_medit, & 1129 1118 & bassin_indian,bassin_austral,bassin_pacific, & 1130 & bassin_ merarabie,bassin_golfebengale,bassin_indiansud, &1131 & bassin_tropics,bassin_midlats,bassin_ hauteslats1119 & bassin_MerArabie,bassin_BengalGolf,bassin_SouthIndian, & 1120 & bassin_tropics,bassin_midlats,bassin_HighLats 1132 1121 implicit none 1133 1122 ! répond true si lat,lon se trouve dans le bassin numéroté bassin … … 1148 1137 write(*,*) 'is_in_basin 84: entree,bassin=',bassin 1149 1138 #endif 1150 if ((use_bassin_atlantic.eq.1).and. & 1151 & (bassin.eq.bassin_atlantic)) then 1139 if (use_bassin_atlantic .and. bassin==bassin_atlantic) then 1152 1140 #ifdef ISOVERIF 1153 1141 write(*,*) 'bassin Atlantique?' … … 1180 1168 endif 1181 1169 1182 else if ((use_bassin_medit.eq.1).and. & 1183 & (bassin.eq.bassin_medit)) then 1170 else if (use_bassin_medit .and. bassin==bassin_medit) then 1184 1171 #ifdef ISOVERIF 1185 1172 write(*,*) 'bassin Medit?' … … 1194 1181 endif 1195 1182 1196 else if ((use_bassin_indian.eq.1).and. & 1197 & (bassin.eq.bassin_indian)) then 1183 else if (use_bassin_indian .and. bassin==bassin_indian) then 1198 1184 #ifdef ISOVERIF 1199 1185 write(*,*) 'bassin indian?' … … 1210 1196 endif 1211 1197 1212 else if ((use_bassin_indiansud.eq.1).and. & 1213 & (bassin.eq.bassin_indiansud)) then 1198 else if (use_bassin_SouthIndian .and. bassin==bassin_SouthIndian) then 1214 1199 #ifdef ISOVERIF 1215 1200 write(*,*) 'bassin indian hemisphere Sud?' … … 1220 1205 endif 1221 1206 1222 else if ((use_bassin_merarabie.eq.1).and. & 1223 & (bassin.eq.bassin_merarabie)) then 1207 else if (use_bassin_MerArabie .and. bassin==bassin_MerArabie) then 1224 1208 #ifdef ISOVERIF 1225 1209 write(*,*) 'bassin Mer d''Arabie?' … … 1230 1214 endif 1231 1215 1232 else if ((use_bassin_golfebengale.eq.1).and. & 1233 & (bassin.eq.bassin_golfebengale)) then 1216 else if (use_bassin_BengalGolf .and. bassin==bassin_BengalGolf) then 1234 1217 #ifdef ISOVERIF 1235 1218 write(*,*) 'bassin Golfe du Bengale?' … … 1240 1223 endif 1241 1224 1242 else if ((use_bassin_pacific.eq.1).and. & 1243 & (bassin.eq.bassin_pacific)) then 1225 else if (use_bassin_pacific .and. bassin==bassin_pacific) then 1244 1226 #ifdef ISOVERIF 1245 1227 write(*,*) 'bassin Pacific?' … … 1278 1260 endif 1279 1261 1280 else if ((use_bassin_austral.eq.1).and. & 1281 & (bassin.eq.bassin_austral)) then 1262 else if (use_bassin_austral .and. bassin==bassin_austral) then 1282 1263 #ifdef ISOVERIF 1283 1264 write(*,*) 'bassin austral?' … … 1288 1269 endif 1289 1270 1290 else if ((use_bassin_hauteslats.eq.1).and. & 1291 & (bassin.eq.bassin_hauteslats)) then 1271 else if (use_bassin_HighLats .and. bassin==bassin_HighLats) then 1292 1272 #ifdef ISOVERIF 1293 1273 write(*,*) 'bassin hautes lats?' … … 1298 1278 endif 1299 1279 1300 else if ((use_bassin_tropics.eq.1).and. & 1301 & (bassin.eq.bassin_tropics)) then 1280 else if (use_bassin_tropics .and. bassin==bassin_tropics) then 1302 1281 #ifdef ISOVERIF 1303 1282 write(*,*) 'bassin tropics?' … … 1308 1287 endif 1309 1288 1310 else if ((use_bassin_midlats.eq.1).and. & 1311 & (bassin.eq.bassin_midlats)) then 1289 else if (use_bassin_midlats .and. bassin==bassin_midlats) then 1312 1290 #ifdef ISOVERIF 1313 1291 write(*,*) 'bassin mid lats?' … … 1325 1303 write(*,*) 'bassin_indian=' ,bassin_indian 1326 1304 write(*,*) 'bassin_austral=' ,bassin_austral 1327 write(*,*) 'bassin_ merarabie=' ,bassin_merarabie1328 write(*,*) 'bassin_ golfebengale=' ,bassin_golfebengale1329 write(*,*) 'bassin_ indiansud=' ,bassin_indiansud1305 write(*,*) 'bassin_MerArabie=' ,bassin_MerArabie 1306 write(*,*) 'bassin_BengalGolf=' ,bassin_BengalGolf 1307 write(*,*) 'bassin_SouthIndian=' ,bassin_SouthIndian 1330 1308 write(*,*) 'use_bassin_atlantic=' ,use_bassin_atlantic 1331 1309 write(*,*) 'use_bassin_medit=' ,use_bassin_medit 1332 1310 write(*,*) 'use_bassin_indian=' ,use_bassin_indian 1333 1311 write(*,*) 'use_bassin_austral=' ,use_bassin_austral 1334 write(*,*) 'use_bassin_ merarabie=' ,use_bassin_merarabie1335 write(*,*) 'use_bassin_ golfebengale=' ,use_bassin_golfebengale1336 write(*,*) 'use_bassin_ indiansud=' ,use_bassin_indiansud1312 write(*,*) 'use_bassin_MerArabie=' ,use_bassin_MerArabie 1313 write(*,*) 'use_bassin_BengalGolf=' ,use_bassin_BengalGolf 1314 write(*,*) 'use_bassin_SouthIndian=' ,use_bassin_SouthIndian 1337 1315 stop 1338 1316 endif … … 1342 1320 1343 1321 subroutine find_bassin(lat,lon,bassin) 1344 use isotrac_mod, only: izone_poubelle,ntraceurs_zone ,option_traceurs, &1322 use isotrac_mod, only: izone_poubelle,ntraceurs_zone=>ntiso,option_traceurs, & 1345 1323 & bassin_map 1346 1324 #ifdef ISOVERIF … … 1517 1495 subroutine isotrac_recolorise_tmin(xt,t) 1518 1496 USE dimphy, only: klon, klev 1519 USE infotrac_phy, ONLY: ntraciso,niso, &1520 ntraceurs_zone,index_trac1521 1497 USE isotrac_mod, only: zone_temp,nzone_temp 1522 1498 #ifdef ISOVERIF … … 1603 1579 subroutine isotrac_recolorise_tmin_sfrev(xt,t) 1604 1580 USE dimphy, only: klon,klev 1605 USE infotrac_phy, ONLY: ntraciso,niso, &1606 ntraceurs_zone,index_trac1607 1581 USE isotrac_mod, only: nzone_temp,zone_temp 1608 1582 #ifdef ISOVERIF … … 1661 1635 subroutine isotrac_recolorise_saturation(xt,rh,lat,pres) 1662 1636 USE dimphy, only: klon,klev 1663 USE infotrac_phy, ONLY: ntraciso,niso, &1664 ntraceurs_zone,index_trac1665 1637 #ifdef ISOVERIF 1666 1638 USE isotopes_verif_mod … … 1727 1699 subroutine isotrac_recolorise_boite(xt,boite_map) 1728 1700 USE dimphy, only: klon,klev 1729 USE infotrac_phy, ONLY: ntraciso,niso, &1730 ntraceurs_zone,index_trac1731 1701 #ifdef ISOVERIF 1732 1702 USE isotopes_verif_mod … … 1781 1751 subroutine isotrac_recolorise_extra(xt,rlat) 1782 1752 USE dimphy, only: klon,klev 1783 USE infotrac_phy, ONLY: ntraciso,niso, &1784 ntraceurs_zone,index_trac1785 1753 usE isotrac_mod, only: lim_tag20,izone_trop,izone_extra 1786 1754 #ifdef ISOVERIF … … 1830 1798 subroutine isotrac_recolorise_conv(xt,rlat,presnivs,rain_con) 1831 1799 USE dimphy, only: klon,klev 1832 USE infotrac_phy, ONLY: ntraciso,niso, &1833 ntraceurs_zone,index_trac1834 1800 use isotrac_mod, only: lim_precip_tag22, & 1835 1801 & izone_conv_BT,izone_conv_UT … … 1902 1868 subroutine boite_AMMA_init(lat,lon,presnivs,boite_map) 1903 1869 USE dimphy, only: klon,klev 1904 USE infotrac_phy, ONLY: ntraciso,niso, &1905 ntraceurs_zone,index_trac1906 1870 #ifdef ISOVERIF 1907 1871 USE isotopes_verif_mod … … 1957 1921 subroutine boite_UT_extra_init(lat,lon,presnivs,boite_map) 1958 1922 USE dimphy, only: klon,klev 1959 USE infotrac_phy, ONLY: ntraciso,niso, &1960 ntraceurs_zone,index_trac1961 1923 use isotrac_mod, only: izone_extra,izone_trop 1962 1924 #ifdef ISOVERIF … … 2095 2057 & seuil_in) 2096 2058 USE dimphy, only: klon,klev 2097 USE infotrac_phy, ONLY: ntraciso,niso, &2098 ntraceurs_zone,index_trac2099 2059 USE isotopes_mod, only: bidouille_anti_divergence,iso_eau 2100 2060 use isotrac_mod, only: option_seuil_tag_tmin,izone_cond, & … … 2304 2264 subroutine bassin_map_init_opt20(lat,bassin_map) 2305 2265 USE dimphy, only: klon 2306 USE infotrac_phy, ONLY: ntraciso,niso, &2307 ntraceurs_zone,index_trac2308 2266 use isotrac_mod, only: izone_cont,izone_trop,lim_tag20 2309 2267 #ifdef ISOVERIF … … 2334 2292 USE geometry_mod, ONLY : latitude_deg 2335 2293 USE dimphy, only: klon,klev 2336 use infotrac_phy, only: ntraciso2337 2294 use isotrac_mod, only: option_traceurs,boite_map 2338 2295 implicit none … … 2365 2322 subroutine iso_verif_traceur_jbid_vect(x,n,m) 2366 2323 USE isotopes_mod, ONLY: bidouille_anti_divergence,iso_eau,ridicule 2367 USE infotrac_phy, ONLY: index_trac,niso,ntraciso2368 use isotrac_mod, only: ntraceurs_zone2324 !use isotrac_mod, only: ntraceurs_zone=>nzone 2325 USE infotrac_phy, ONLY: ntraceurs_zone=>nzone 2369 2326 implicit none 2370 2327 … … 2430 2387 subroutine iso_verif_traceur_jbidouille(x) 2431 2388 USE isotopes_mod, ONLY: bidouille_anti_divergence,iso_eau,ridicule 2432 USE infotrac_phy, ONLY: index_trac,niso,ntraciso,ntraceurs_zone2433 2389 implicit none 2434 2390 … … 2470 2426 subroutine iso_verif_traceur_jbid_pos(x) 2471 2427 USE isotopes_mod, ONLY: bidouille_anti_divergence,iso_eau,ridicule 2472 USE infotrac_phy, ONLY: index_trac,niso,ntraciso,ntraceurs_zone2473 2428 !#ifdef ISOVERIF 2474 2429 ! use isotopes_verif_mod, only: iso_verif_traceur_pbidouille … … 2544 2499 subroutine iso_verif_traceur_jbid_pos_vect(n,m,x) 2545 2500 USE isotopes_mod, ONLY: bidouille_anti_divergence,iso_eau,ridicule 2546 USE infotrac_phy, ONLY: index_trac,niso,ntraciso,ntraceurs_zone2547 2501 #ifdef ISOVERIF 2548 2502 USE isotopes_verif_mod … … 2625 2579 subroutine iso_verif_traceur_jbid_pos2(x,q) 2626 2580 USE isotopes_mod, ONLY: bidouille_anti_divergence,iso_eau,ridicule 2627 USE infotrac_phy, ONLY: index_trac,niso,ntraciso,ntraceurs_zone2628 2581 #ifdef ISOVERIF 2629 2582 use isotopes_verif_mod … … 2696 2649 subroutine iso_verif_traceur_jbid_vect1D(x,n) 2697 2650 USE isotopes_mod, ONLY: bidouille_anti_divergence,iso_eau,ridicule 2698 USE infotrac_phy, ONLY: index_trac,niso,ntraciso,ntraceurs_zone2699 2651 implicit none 2700 2652 … … 2739 2691 2740 2692 subroutine iso_verif_traceur_pbidouille(x,err_msg) 2741 USE infotrac_phy, ONLY: ntraciso2742 2693 use isotopes_verif_mod 2743 2694 implicit none … … 2765 2716 2766 2717 function iso_verif_traceur_pbid_ns(x,err_msg) 2767 USE infotrac_phy, ONLY: ntraciso2768 2718 use isotopes_mod, ONLY: iso_HDO,bidouille_anti_divergence 2769 2719 use isotrac_mod, only: ridicule_trac … … 2828 2778 2829 2779 subroutine iso_verif_traceur_pbid_vect(x,n,m,err_msg) 2830 USE infotrac_phy, ONLY: ntraciso2831 2780 use isotopes_mod, ONLY: iso_HDO,bidouille_anti_divergence 2832 2781 use isotopes_verif_mod -
LMDZ6/branches/Portage_acc/libf/phylmdiso/limit_read_mod.F90
r3927 r4446 281 281 USE indice_sol_mod 282 282 #ifdef ISO 283 !USE infotrac_phy, ONLY: use_iso284 283 USE isotopes_mod, ONLY : iso_HTO,ok_prod_nucl_tritium 285 284 #ifdef ISOVERIF -
LMDZ6/branches/Portage_acc/libf/phylmdiso/ocean_forced_mod.F90
r4033 r4446 42 42 use config_ocean_skin_m, only: activate_ocean_skin 43 43 #ifdef ISO 44 USE infotrac_phy, ONLY: nt raciso,niso44 USE infotrac_phy, ONLY: ntiso,niso 45 45 USE isotopes_routines_mod, ONLY: calcul_iso_surf_oce_vectall, & 46 46 & calcul_iso_surf_sic_vectall … … 73 73 74 74 #ifdef ISO 75 REAL, DIMENSION(nt raciso,klon), INTENT(IN):: xtprecip_rain, xtprecip_snow76 REAL, DIMENSION(nt raciso,klon), INTENT(IN):: xtspechum75 REAL, DIMENSION(ntiso,klon), INTENT(IN) :: xtprecip_rain, xtprecip_snow 76 REAL, DIMENSION(ntiso,klon), INTENT(IN) :: xtspechum 77 77 real, dimension(klon), intent(IN) :: rlat 78 78 #endif … … 98 98 99 99 #ifdef ISO 100 REAL, DIMENSION(nt raciso,klon), INTENT(OUT):: xtevap ! isotopes in evaporation flux100 REAL, DIMENSION(ntiso,klon), INTENT(OUT) :: xtevap ! isotopes in evaporation flux 101 101 REAL, DIMENSION(klon), INTENT(out) :: h1 ! just a diagnostic, not useful for the simulation 102 102 #endif … … 271 271 USE phys_output_var_mod, ONLY : sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o 272 272 #ifdef ISO 273 USE infotrac_phy, ONLY: niso, ntraciso273 USE infotrac_phy, ONLY: niso, ntiso 274 274 USE isotopes_routines_mod, ONLY: calcul_iso_surf_oce_vectall, & 275 275 & calcul_iso_surf_sic_vectall … … 303 303 real, intent(in):: rhoa(:) ! (knon) density of moist air (kg / m3) 304 304 #ifdef ISO 305 REAL, DIMENSION(nt raciso,klon), INTENT(IN) :: xtprecip_rain, xtprecip_snow306 REAL, DIMENSION(nt raciso,klon), INTENT(IN) :: xtspechum307 REAL, DIMENSION(niso,klon), INTENT(IN) :: Roce308 REAL, DIMENSION(niso,klon), INTENT(IN):: Rland_ice305 REAL, DIMENSION(ntiso,klon), INTENT(IN) :: xtprecip_rain, xtprecip_snow 306 REAL, DIMENSION(ntiso,klon), INTENT(IN) :: xtspechum 307 REAL, DIMENSION(niso,klon), INTENT(IN) :: Roce 308 REAL, DIMENSION(niso,klon), INTENT(IN) :: Rland_ice 309 309 #endif 310 310 … … 330 330 REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l 331 331 #ifdef ISO 332 REAL, DIMENSION(nt raciso,klon), INTENT(OUT) :: xtevap332 REAL, DIMENSION(ntiso,klon), INTENT(OUT) :: xtevap 333 333 #endif 334 334 -
LMDZ6/branches/Portage_acc/libf/phylmdiso/pbl_surface_mod.F90
r4036 r4446 14 14 USE mod_grid_phy_lmdz, ONLY : klon_glo 15 15 USE ioipsl 16 USE surface_data, ONLY : type_ocean, ok_veget 16 USE surface_data, ONLY : type_ocean, ok_veget, landice_opt 17 17 USE surf_land_mod, ONLY : surf_land 18 18 USE surf_landice_mod, ONLY : surf_landice … … 31 31 wx_pbl_check, wx_pbl_dts_check, wx_evappot 32 32 use config_ocean_skin_m, only: activate_ocean_skin 33 #ifdef ISO 34 USE infotrac_phy, ONLY: niso,ntraciso=>ntiso 35 #endif 33 36 34 37 IMPLICIT NONE … … 193 196 USE indice_sol_mod 194 197 USE print_control_mod, ONLY: lunout 195 USE infotrac_phy, ONLY: niso,ntraciso ! ajout C Risi pour isos196 198 #ifdef ISOVERIF 197 199 USE isotopes_mod, ONLY: iso_eau,ridicule … … 395 397 USE print_control_mod, ONLY : prt_level,lunout 396 398 #ifdef ISO 397 USE infotrac_phy, ONLY: ntraciso,niso ! ajout C Risi pour isos398 399 USE isotopes_mod, ONLY: Rdefault,iso_eau 399 400 #ifdef ISOVERIF … … 405 406 #endif 406 407 USE ioipsl_getin_p_mod, ONLY : getin_p 407 use phys_state_var_mod, only: ds_ns, dt_ns, delta_sst, delta_sal, zsig, zmea 408 use phys_output_var_mod, only: dter, dser, tkt, tks, taur, sss 408 use phys_state_var_mod, only: ds_ns, dt_ns, delta_sst, delta_sal, dter, & 409 dser, dt_ds, zsig, zmea 410 use phys_output_var_mod, only: tkt, tks, taur, sss 409 411 #ifdef CPP_XIOS 410 412 USE wxios, ONLY: missing_val … … 1028 1030 ! Martin 1029 1031 1030 REAL, DIMENSION(klon):: ydelta_sst, ydelta_sal, yds_ns, ydt_ns, ydter, ydser,&1031 y tkt, ytks, ytaur, ysss1032 ! compression of delta_sst, delta_sal, ds_ns, dt_ns, dter, dser, tkt, tks,1033 ! taur, sss on ocean points1032 REAL, DIMENSION(klon):: ydelta_sst, ydelta_sal, yds_ns, ydt_ns, ydter, & 1033 ydser, ydt_ds, ytkt, ytks, ytaur, ysss 1034 ! compression of delta_sst, delta_sal, ds_ns, dt_ns, dter, dser, 1035 ! dt_ds, tkt, tks, taur, sss on ocean points 1034 1036 1035 1037 #ifdef ISO … … 1812 1814 ydelta_sal(:knon) = delta_sal(ni(:knon)) 1813 1815 ydelta_sst(:knon) = delta_sst(ni(:knon)) 1816 ydter(:knon) = dter(ni(:knon)) 1817 ydser(:knon) = dser(ni(:knon)) 1818 ydt_ds(:knon) = dt_ds(ni(:knon)) 1814 1819 end if 1815 1820 … … 2381 2386 CASE(is_lic) 2382 2387 ! Martin 2383 CALL surf_landice(itap, dtime, knon, ni, & 2384 rlon, rlat, debut, lafin, & 2385 yrmu0, ylwdown, yalb, zgeo1, & 2386 ysolsw, ysollw, yts, ypplay(:,1), & 2387 !!jyg ycdragh, ycdragm, yrain_f, ysnow_f, yt(:,1), yq(:,1),& 2388 ycdragh, ycdragm, yrain_f, ysnow_f, yt1, yq1,& 2389 AcoefH, AcoefQ, BcoefH, BcoefQ, & 2390 AcoefU, AcoefV, BcoefU, BcoefV, & 2391 ypsref, yu1, yv1, ygustiness, yrugoro, pctsrf, & 2392 ysnow, yqsurf, yqsol, yagesno, & 2393 ytsoil, yz0m, yz0h, SFRWL, yalb_dir_new, yalb_dif_new, yevap,yfluxsens,yfluxlat, & 2394 ytsurf_new, y_dflux_t, y_dflux_q, & 2395 yzmea, yzsig, ycldt, & 2396 ysnowhgt, yqsnow, ytoice, ysissnow, & 2397 yalb3_new, yrunoff, & 2398 y_flux_u1, y_flux_v1 & 2399 #ifdef ISO 2400 & ,yxtrain_f, yxtsnow_f,yxt1,yRland_ice & 2401 & ,yxtsnow,yxtsol,yxtevap & 2388 IF (landice_opt .LT. 2) THEN 2389 ! Land ice is treated by LMDZ and not by ORCHIDEE 2390 2391 CALL surf_landice(itap, dtime, knon, ni, & 2392 rlon, rlat, debut, lafin, & 2393 yrmu0, ylwdown, yalb, zgeo1, & 2394 ysolsw, ysollw, yts, ypplay(:,1), & 2395 !!jyg ycdragh, ycdragm, yrain_f, ysnow_f, yt(:,1), yq(:,1),& 2396 ycdragh, ycdragm, yrain_f, ysnow_f, yt1, yq1,& 2397 AcoefH, AcoefQ, BcoefH, BcoefQ, & 2398 AcoefU, AcoefV, BcoefU, BcoefV, & 2399 ypsref, yu1, yv1, ygustiness, yrugoro, pctsrf, & 2400 ysnow, yqsurf, yqsol, yagesno, & 2401 ytsoil, yz0m, yz0h, SFRWL, yalb_dir_new, yalb_dif_new, yevap,yfluxsens,yfluxlat, & 2402 ytsurf_new, y_dflux_t, y_dflux_q, & 2403 yzmea, yzsig, ycldt, & 2404 ysnowhgt, yqsnow, ytoice, ysissnow, & 2405 yalb3_new, yrunoff, & 2406 y_flux_u1, y_flux_v1 & 2407 #ifdef ISO 2408 & ,yxtrain_f, yxtsnow_f,yxt1,yRland_ice & 2409 & ,yxtsnow,yxtsol,yxtevap & 2402 2410 #endif 2403 & )2404 2405 !jyg<2406 !! alb3_lic(:)=0.2407 !>jyg2408 DO j = 1, knon2409 i = ni(j)2410 alb3_lic(i) = yalb3_new(j)2411 snowhgt(i) = ysnowhgt(j)2412 qsnow(i) = yqsnow(j)2413 to_ice(i) = ytoice(j)2414 sissnow(i) = ysissnow(j)2415 runoff(i) = yrunoff(j)2416 ENDDO2417 ! Martin2418 ! Special DICE MPL 05082013 puis BOMEX MPL 201504102419 IF (ok_prescr_ust) THEN2420 DO j=1,knon2421 y_flux_u1(j)=ycdragm(j)*(1.+sqrt(yu(j,1)*yu(j,1)+yv(j,1)*yv(j,1)))*yu(j,1)*ypplay(j,1)/RD/yt(j,1)2422 y_flux_v1(j)=ycdragm(j)*(1.+sqrt(yu(j,1)*yu(j,1)+yv(j,1)*yv(j,1)))*yv(j,1)*ypplay(j,1)/RD/yt(j,1)2423 ENDDO2424 ENDIF2425 2411 & ) 2412 2413 !jyg< 2414 !! alb3_lic(:)=0. 2415 !>jyg 2416 DO j = 1, knon 2417 i = ni(j) 2418 alb3_lic(i) = yalb3_new(j) 2419 snowhgt(i) = ysnowhgt(j) 2420 qsnow(i) = yqsnow(j) 2421 to_ice(i) = ytoice(j) 2422 sissnow(i) = ysissnow(j) 2423 runoff(i) = yrunoff(j) 2424 ENDDO 2425 ! Martin 2426 ! Special DICE MPL 05082013 puis BOMEX MPL 20150410 2427 IF (ok_prescr_ust) THEN 2428 DO j=1,knon 2429 y_flux_u1(j)=ycdragm(j)*(1.+sqrt(yu(j,1)*yu(j,1)+yv(j,1)*yv(j,1)))*yu(j,1)*ypplay(j,1)/RD/yt(j,1) 2430 y_flux_v1(j)=ycdragm(j)*(1.+sqrt(yu(j,1)*yu(j,1)+yv(j,1)*yv(j,1)))*yv(j,1)*ypplay(j,1)/RD/yt(j,1) 2431 ENDDO 2432 ENDIF 2433 2426 2434 #ifdef ISOVERIF 2427 do j=1,knon2428 do ixt=1,ntraciso2429 call iso_verif_noNaN(yxtevap(ixt,j), &2430 & 'pbl_surface 1095a: apres surf_landice')2431 call iso_verif_noNaN(yxtsol(ixt,j), &2432 & 'pbl_surface 1095b: apres surf_landice')2433 enddo2434 enddo2435 do j=1,knon 2436 do ixt=1,ntraciso 2437 call iso_verif_noNaN(yxtevap(ixt,j), & 2438 & 'pbl_surface 1095a: apres surf_landice') 2439 call iso_verif_noNaN(yxtsol(ixt,j), & 2440 & 'pbl_surface 1095b: apres surf_landice') 2441 enddo 2442 enddo 2435 2443 #endif 2436 2444 #ifdef ISOVERIF 2437 !write(*,*) 'pbl_surface_mod 1060: sortie surf_landice'2438 do j=1,knon2439 if (iso_eau.gt.0) then2440 call iso_verif_egalite(yxtsnow(iso_eau,j), &2441 & ysnow(j),'pbl_surf_mod 1064')2442 endif !if (iso_eau.gt.0) then2443 enddo !do i=1,klon2444 #endif 2445 2445 !write(*,*) 'pbl_surface_mod 1060: sortie surf_landice' 2446 do j=1,knon 2447 if (iso_eau.gt.0) then 2448 call iso_verif_egalite(yxtsnow(iso_eau,j), & 2449 & ysnow(j),'pbl_surf_mod 1064') 2450 endif !if (iso_eau.gt.0) then 2451 enddo !do i=1,klon 2452 #endif 2453 END IF 2446 2454 CASE(is_oce) 2447 2455 CALL surf_ocean(rlon, rlat, ysolsw, ysollw, yalb_vis, & … … 2458 2466 y_flux_u1, y_flux_v1, ydelta_sst(:knon), ydelta_sal(:knon), & 2459 2467 yds_ns(:knon), ydt_ns(:knon), ydter(:knon), ydser(:knon), & 2460 y tkt(:knon), ytks(:knon), ytaur(:knon), ysss &2468 ydt_ds(:knon), ytkt(:knon), ytks(:knon), ytaur(:knon), ysss & 2461 2469 #ifdef ISO 2462 2470 & ,yxtrain_f, yxtsnow_f,yxt1,Roce, & … … 3390 3398 taur(ni(:knon)) = ytaur(:knon) 3391 3399 sss(ni(:knon)) = ysss(:knon) 3400 3401 if (activate_ocean_skin == 2 .and. type_ocean == "couple") then 3402 dt_ds = missing_val 3403 dt_ds(ni(:knon)) = ydt_ds(:knon) 3404 end if 3392 3405 end if 3393 3406 … … 4051 4064 USE indice_sol_mod 4052 4065 #ifdef ISO 4053 USE infotrac_phy, ONLY: ntraciso,niso ! ajout C Risi pour isos4054 4066 #ifdef ISOVERIF 4055 4067 USE isotopes_mod, ONLY: iso_eau,ridicule … … 4128 4140 4129 4141 USE indice_sol_mod 4130 use phys_state_var_mod, only: delta_sal, ds_ns, dt_ns, delta_sst 4142 use phys_state_var_mod, only: delta_sal, ds_ns, dt_ns, delta_sst, dter, & 4143 dser, dt_ds 4131 4144 use config_ocean_skin_m, only: activate_ocean_skin 4132 #ifdef ISO4133 USE infotrac_phy, ONLY: ntraciso4134 #endif4135 4145 4136 4146 … … 4237 4247 delta_sal(i) = 0. 4238 4248 delta_sst(i) = 0. 4249 dter(i) = 0. 4250 dser(i) = 0. 4251 dt_ds(i) = 0. 4239 4252 end if 4240 4253 -
LMDZ6/branches/Portage_acc/libf/phylmdiso/phyredem.F90
r4089 r4446 30 30 du_gwd_rando, du_gwd_front, u10m, v10m, & 31 31 treedrg, solswfdiff, delta_sal, ds_ns, dt_ns, & 32 delta_sst, ratqs_inter 32 delta_sst, ratqs_inter, dter, dser, dt_ds 33 33 #ifdef ISO 34 34 USE phys_state_var_mod, ONLY: xtsol, fxtevap,xtrain_fall, xtsnow_fall, & … … 39 39 USE iostart, ONLY: open_restartphy, close_restartphy, enddef_restartphy, put_field, put_var 40 40 USE traclmdz_mod, ONLY : traclmdz_to_restart 41 USE infotrac_phy, ONLY: type_trac, nqtot, tracers, nbtr, niso , ntraciso41 USE infotrac_phy, ONLY: type_trac, nqtot, tracers, nbtr, niso 42 42 #ifdef ISO 43 43 #ifdef ISOVERIF … … 45 45 #endif 46 46 #endif 47 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, co2_send 47 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, co2_send, carbon_cycle_rad, RCO2_glo 48 48 USE indice_sol_mod, ONLY: nbsrf, is_oce, is_sic, is_ter, is_lic, epsfra 49 49 USE surface_data, ONLY: type_ocean, version_ocean … … 130 130 131 131 ! co2_ppm0 : initial value of atmospheric CO2 132 tab_cntrl(16) = co2_ppm0 132 ! tab_cntrl(16) = co2_ppm0 133 134 ! PC -- initial value of RCO2 for the radiation scheme 135 ! tab_cntrl(17) = co2_ppm * 1.0e-06 * RMCO2 / RMD 136 IF (carbon_cycle_rad) tab_cntrl(17) = RCO2_glo 137 !PRINT*, "PC : phyredem RCO2_glo =",RCO2_glo 133 138 134 139 DO pass=1,2 ! pass=1 netcdf definition ; pass=2 netcdf write … … 171 176 CALL put_field(pass,"FSIC", "fraction glace mer", pctsrf(:, is_sic)) 172 177 173 IF(nbsrf>99) THEN 174 PRINT*, "Trop de sous-mailles"; CALL abort_physic("phyredem", "", 1) 175 END IF 176 IF(nsoilmx>99) THEN 177 PRINT*, "Trop de sous-surfaces"; CALL abort_physic("phyredem", "", 1) 178 END IF 179 IF(nsw>99) THEN 180 PRINT*, "Trop de bandes"; CALL abort_physic("phyredem", "", 1) 181 END IF 178 IF(nbsrf >99) CALL abort_physic("phyredem", "Trop de sous-mailles", 1) 179 IF(nsoilmx>99) CALL abort_physic("phyredem", "Trop de sous-mailles", 1) 180 IF(nsw >99) CALL abort_physic("phyredem", "Trop de bandes", 1) 182 181 183 182 ! Surface variables … … 345 344 346 345 347 ! trs from traclmdz_mod 348 IF (type_trac == 'lmdz') THEN 349 CALL traclmdz_to_restart(trs) 350 it = 0 351 DO iq = 1, nqtot 352 IF(.NOT.(tracers(iq)%isAdvected .AND. tracers(iq)%isInPhysics)) CYCLE 353 it = it+1 354 CALL put_field(pass,"trs_"//tracers(iq)%name, "", trs(:, it)) 355 END DO 356 END IF 357 358 IF (type_trac == 'co2i' .OR. type_trac == 'inco') THEN 346 IF (ANY(type_trac == ['co2i','inco'])) THEN 359 347 IF (carbon_cycle_cpl) THEN 360 348 IF (.NOT. ALLOCATED(co2_send)) THEN … … 365 353 CALL put_field(pass,"co2_send", "co2_ppm for coupling", co2_send) 366 354 END IF 355 356 ! trs from traclmdz_mod 357 ELSE IF (type_trac == 'lmdz') THEN 358 CALL traclmdz_to_restart(trs) 359 it = 0 360 DO iq = 1, nqtot 361 IF(.NOT.(tracers(iq)%isAdvected .AND. tracers(iq)%isInPhysics)) CYCLE 362 it = it+1 363 CALL put_field(pass,"trs_"//tracers(iq)%name, "", trs(:, it)) 364 END DO 367 365 END IF 368 366 … … 395 393 CALL put_field(pass, "delta_SST", & 396 394 "ocean-air interface temperature minus bulk SST", delta_sst) 395 CALL put_field(pass, "dter", & 396 "ocean-air interface temperature minus subskin temperature", & 397 dter) 398 CALL put_field(pass, "dser", & 399 "ocean-air interface salinity minus subskin salinity", dser) 400 CALL put_field(pass, "dt_ds", & 401 "(tks / tkt) * dTer", dt_ds) 397 402 end if 398 403 … … 485 490 xtrain_fall,xtsnow_fall, ql_ancien,xtl_ancien,qs_ancien,xts_ancien, & 486 491 xtsol,fxtevap 487 USE infotrac_phy,ONLY: niso, nt raciso492 USE infotrac_phy,ONLY: niso, ntiso 488 493 !USE control_mod 489 494 USE indice_sol_mod, ONLY: nbsrf 490 495 USE iostart, ONLY: put_field 491 USE isotopes_mod, ONLY: striso,iso_eau496 USE isotopes_mod, ONLY: isoName,iso_eau 492 497 #ifdef ISOVERIF 493 498 USE isotopes_verif_mod … … 509 514 !REAL xtsol(niso,klon) 510 515 REAL xtsnow(niso,klon,nbsrf) 511 !REAL xtevap(nt raciso,klon,nbsrf)516 !REAL xtevap(ntiso,klon,nbsrf) 512 517 REAL xtrun_off_lic_0(niso,klon) 513 518 REAL Rland_ice(niso,klon) … … 566 571 #endif 567 572 568 do ixt=1,ntraciso 569 570 if (ixt.le.niso) then 571 outiso=striso(ixt) 572 else 573 #ifdef ISOTRAC 574 iiso=index_iso(ixt) 575 izone=index_zone(ixt) 576 outiso=striso(iiso)//strtrac(izone) 577 #else 578 write(*,*) 'phyredem 546: ixt,ntraciso=', ixt,ntraciso 579 stop 580 #endif 581 endif !if (ixt.le.niso) then 573 do ixt=1,ntiso 574 575 outiso = TRIM(isoName(ixt)) 576 i = INDEX(outiso, '_', .TRUE.) 577 outiso = outiso(1:i-1)//outiso(i+1:LEN_TRIM(outiso)) 582 578 write(*,*) 'phyredem 550: ixt,outiso=',ixt,TRIM(outiso) 583 579 -
LMDZ6/branches/Portage_acc/libf/phylmdiso/phys_local_var_mod.F90
r4118 r4446 726 726 USE infotrac_phy, ONLY : nbtr 727 727 #ifdef ISO 728 USE infotrac_phy, ONLY : ntraciso ,niso728 USE infotrac_phy, ONLY : ntraciso=>ntiso,niso 729 729 #endif 730 730 USE aero_mod -
LMDZ6/branches/Portage_acc/libf/phylmdiso/phys_output_mod.F90
r4120 r4446 35 35 USE iophy 36 36 USE dimphy 37 USE infotrac_phy, ONLY: nqtot, tracers, type_trac, niso, ntraciso37 USE infotrac_phy, ONLY: nqtot, tracers, niso, ntraciso=>ntiso 38 38 USE strings_mod, ONLY: maxlen 39 39 USE ioipsl … … 52 52 #endif 53 53 #ifdef ISO 54 USE isotopes_mod, ONLY: striso,iso_HTO54 USE isotopes_mod, ONLY: isoName,iso_HTO 55 55 #ifdef ISOTRAC 56 56 use isotrac_mod, only: index_zone,index_iso,strtrac … … 122 122 123 123 #ifdef ISO 124 CHARACTER(LEN= LEN(striso)) :: outiso124 CHARACTER(LEN=maxlen) :: outiso 125 125 CHARACTER(LEN=20) :: unit 126 126 #endif … … 546 546 write(*,*) 'phys_output_mid 589' 547 547 do ixt=1,ntraciso 548 if (ixt <= niso) then 549 outiso=striso(ixt) 550 else 551 #ifdef ISOTRAC 552 iiso=index_iso(ixt) 553 izone=index_zone(ixt) 554 outiso=striso(iiso)//strtrac(izone) 555 #else 556 write(*,*) 'phys_output_mod 546: ixt,ntraciso=', ixt,ntraciso 557 stop 558 #endif 559 endif 548 outiso = TRIM(isoName(ixt)) 549 i = INDEX(outiso, '_', .TRUE.) 550 outiso = outiso(1:i-1)//outiso(i+1:LEN_TRIM(outiso)) 560 551 561 552 flag = [1, 1, 1, 10, 5, 10, 11, 11, 11, 11]; unit = 'kg/(s*m2)' -
LMDZ6/branches/Portage_acc/libf/phylmdiso/phys_output_var_mod.F90
r3940 r4446 135 135 ! Ocean-atmosphere interface, subskin ocean and near-surface ocean: 136 136 137 REAL, ALLOCATABLE, SAVE:: dter(:) 138 ! Temperature variation in the diffusive microlayer, that is 139 ! ocean-air interface temperature minus subskin temperature. In K. 140 141 REAL, SAVE, ALLOCATABLE:: dser(:) 142 ! Temperature variation in the diffusive microlayer, that is 143 ! subskin temperature minus ocean-air interface temperature. In K. 144 145 REAL, SAVE, ALLOCATABLE:: tkt(:) 137 REAL, SAVE, ALLOCATABLE:: tkt(:) ! (klon) 146 138 ! épaisseur (m) de la couche de diffusion thermique (microlayer) 147 139 ! cool skin thickness 148 140 149 REAL, SAVE, ALLOCATABLE:: tks(:) 141 REAL, SAVE, ALLOCATABLE:: tks(:) ! (klon) 150 142 ! épaisseur (m) de la couche de diffusion de masse (microlayer) 151 143 152 REAL, SAVE, ALLOCATABLE:: taur(:) ! momentum flux due to rain, in Pa153 154 REAL, SAVE, ALLOCATABLE:: sss(:) 144 REAL, SAVE, ALLOCATABLE:: taur(:) ! (klon) momentum flux due to rain, in Pa 145 146 REAL, SAVE, ALLOCATABLE:: sss(:) ! (klon) 155 147 ! bulk salinity of the surface layer of the ocean, in ppt 156 148 157 !$OMP THREADPRIVATE( dter, dser,tkt, tks, taur, sss)149 !$OMP THREADPRIVATE(tkt, tks, taur, sss) 158 150 159 151 CONTAINS … … 216 208 IF (ok_gwd_rando) allocate(zustr_gwd_rando(klon), zvstr_gwd_rando(klon)) 217 209 218 if (activate_ocean_skin >= 1) allocate( dter(klon), dser(klon), tkt(klon), &219 tks(klon), taur(klon),sss(klon))210 if (activate_ocean_skin >= 1) allocate(tkt(klon), tks(klon), taur(klon), & 211 sss(klon)) 220 212 221 213 END SUBROUTINE phys_output_var_init -
LMDZ6/branches/Portage_acc/libf/phylmdiso/physiq_mod.F90
r4124 r4446 39 39 USE ioipsl_getin_p_mod, ONLY : getin_p 40 40 USE indice_sol_mod 41 USE infotrac, ONLY: iso_num, iso_indnum 42 USE infotrac_phy, ONLY: nqtot, nbtr, nqo, tracers, type_trac, nqCO2, indnum_fn_num 41 USE infotrac_phy, ONLY: nqtot, nbtr, nqo, tracers, type_trac 43 42 USE readTracFiles_mod, ONLY: addPhase 44 USE strings_mod, ONLY: strIdx , strStack, int2str43 USE strings_mod, ONLY: strIdx 45 44 USE iophy 46 45 USE limit_read_mod, ONLY : init_limit_read … … 54 53 USE pbl_surface_mod, ONLY : pbl_surface 55 54 USE phyaqua_mod, only: zenang_an 55 USE phyetat0_mod, only: phyetat0 56 56 USE phystokenc_mod, ONLY: offline, phystokenc 57 57 USE phys_cal_mod, only: year_len, mth_len, days_elapsed, jh_1jan, & 58 year_cur, mth_cur,jD_cur, jH_cur, jD_ref, day_cur, hour 58 year_cur, mth_cur,jD_cur, jH_cur, jD_ref, day_cur, hour, calend 59 59 !! USE phys_local_var_mod, ONLY : a long list of variables 60 60 !! ==> see below, after "CPP Keys" section … … 69 69 USE regr_horiz_time_climoz_m, ONLY: regr_horiz_time_climoz 70 70 USE regr_pr_time_av_m, only: regr_pr_time_av 71 USE surface_data, ONLY : type_ocean, ok_veget, landice_opt 72 USE time_phylmdz_mod, only: annee_ref, current_time, day_ini, day_ref, & 73 day_step_phy, itau_phy, pdtphys, raz_date, start_time, update_time 71 USE surface_data, ONLY : type_ocean, ok_veget 72 USE time_phylmdz_mod, only: current_time, itau_phy, pdtphys, raz_date, update_time 74 73 USE tracinca_mod, ONLY: config_inca 75 74 USE tropopause_m, ONLY: dyn_tropopause 76 75 USE ice_sursat_mod, ONLY: flight_init, airplane 77 76 USE vampir 78 USE VERTICAL_LAYERS_MOD, ONLY: aps,bps, ap, bp79 77 USE write_field_phy 78 #ifdef CPP_XIOS 79 USE wxios, ONLY: g_ctx, wxios_set_context 80 #endif 81 USE lscp_ini_mod, ONLY : lscp_ini 80 82 USE lscp_mod, ONLY : lscp 83 USE wake_ini_mod, ONLY : wake_ini 81 84 USE thermcell_ini_mod, ONLY : thermcell_ini 82 85 … … 97 100 98 101 102 #ifdef INCA 103 USE geometry_mod, ONLY: longitude, latitude, boundslon, boundslat, ind_cell_glo 104 USE time_phylmdz_mod, ONLY: ndays 105 USE infotrac_phy, ONLY: nqCO2 106 #endif 99 107 #ifdef REPROBUS 100 USE CHEM_REP, ONLY : Init_chem_rep_xjour, & 101 d_q_rep,d_ql_rep,d_qi_rep,ptrop,ttrop, & 102 ztrop, gravit,itroprep, Z1,Z2,fac,B 108 USE chem_rep, ONLY: Init_chem_rep_xjour, d_q_rep, d_ql_rep, d_qi_rep, & 109 ptrop, ttrop, ztrop, gravit, itroprep, Z1, Z2, fac, B 110 #endif 111 #if defined INCA || defined REPROBUS 112 USE time_phylmdz_mod, ONLY: annee_ref, day_ini, day_ref, start_time 113 USE vertical_layers_mod, ONLY: aps, bps, ap, bp 103 114 #endif 104 115 … … 106 117 #ifdef CPP_RRTM 107 118 USE YOERAD, ONLY : NRADLP 108 USE YOESW, ONLY : RSUN119 ! USE YOESW, ONLY : RSUN 109 120 #endif 110 121 … … 116 127 117 128 #ifdef CPP_XIOS 118 USE xios, ONLY: xios_update_calendar, xios_context_finalize, & 119 xios_get_field_attr, xios_field_is_active 129 USE xios, ONLY: xios_update_calendar, xios_context_finalize 130 USE xios, ONLY: xios_get_field_attr, xios_field_is_active, xios_context 131 USE xios, ONLY: xios_set_current_context 120 132 USE wxios, ONLY: missing_val, missing_val_omp 121 133 #endif … … 126 138 127 139 #ifdef ISO 128 USE infotrac_phy, ONLY: iq iso,niso, ntraciso, nzone140 USE infotrac_phy, ONLY: iqIsoPha,niso, ntraciso=>ntiso, nzone 129 141 USE isotopes_mod, ONLY: iso_eau,iso_HDO,iso_O18,iso_O17,iso_HTO, & 130 142 & bidouille_anti_divergence,ok_bidouille_wake, & … … 180 192 d_t_ajsb,d_q_ajsb, & 181 193 d_t_ajs,d_q_ajs,d_u_ajs,d_v_ajs, & 182 d_t_ajs_w,d_q_ajs_w, &183 d_t_ajs_x,d_q_ajs_x, &194 ! d_t_ajs_w,d_q_ajs_w, & 195 ! d_t_ajs_x,d_q_ajs_x, & 184 196 ! 185 197 d_t_eva,d_q_eva,d_ql_eva,d_qi_eva, & … … 194 206 d_ts, & 195 207 ! 196 d_t_oli,d_u_oli,d_v_oli, &208 ! d_t_oli,d_u_oli,d_v_oli, & 197 209 d_t_oro,d_u_oro,d_v_oro, & 198 210 d_t_oro_gw,d_u_oro_gw,d_v_oro_gw, & … … 313 325 sij, & 314 326 ! 327 rneblsvol, & 328 zqsatl, zqsats, & 329 qclr, qcld, qss, qvc, rnebclr, rnebss, gamma_ss, & 330 Tcontr, qcontr, qcontr2, fcontrN, fcontrP, & 315 331 cldemi, & 316 332 cldfra, cldtau, fiwc, & … … 366 382 #endif 367 383 ! 368 369 384 370 385 IMPLICIT NONE … … 509 524 !====================================================================== 510 525 ! 511 INTEGER ivap ! indice de traceurs pour vapeur d'eau 512 PARAMETER (ivap=1) 513 INTEGER iliq ! indice de traceurs pour eau liquide 514 PARAMETER (iliq=2) 515 !CR: on ajoute la phase glace 516 INTEGER isol ! indice de traceurs pour eau glace 517 PARAMETER (isol=3) 518 INTEGER irneb ! indice de traceurs pour fraction nuageuse LS (optional) 519 PARAMETER (irneb=4) 526 ! indices de traceurs eau vapeur, liquide, glace, fraction nuageuse LS (optional) 527 INTEGER,SAVE :: ivap, iliq, isol, irneb 528 !$OMP THREADPRIVATE(ivap, iliq, isol, irneb) 520 529 ! 521 530 ! … … 585 594 ! 586 595 ! 587 INTEGER debug588 596 INTEGER n 589 597 !ym INTEGER npoints … … 642 650 ! Upmost level reached by deep convection and related variable (jyg) 643 651 ! 644 INTEGER izero652 ! INTEGER izero 645 653 INTEGER k_upper_cv 646 654 !------------------------------------------------------------------ … … 820 828 REAL beta_prec_fisrt(klon,klev) ! taux de conv de l'eau cond (fisrt) 821 829 ! RomP <<< 822 REAL :: calday823 830 824 831 !IM cf FH pour Tiedtke 080604 … … 876 883 !C EXTERNAL o3cm ! initialiser l'ozone 877 884 EXTERNAL orbite ! calculer l'orbite terrestre 878 EXTERNAL phyetat0 ! lire l'etat initial de la physique879 885 EXTERNAL phyredem ! ecrire l'etat de redemarrage de la physique 880 886 EXTERNAL suphel ! initialiser certaines constantes … … 941 947 real zqsat(klon,klev) 942 948 ! 943 INTEGER i, k, iq, j, nsrf, ll, l, itr949 INTEGER i, k, iq, nsrf, l, itr 944 950 #ifdef ISO 945 951 real zxt_apres(ntraciso,klon) … … 1063 1069 1064 1070 REAL picefra(klon,klev) 1071 REAL zrel_mount(klon) 1065 1072 !IM cf. AM 081204 END 1066 1073 ! … … 1272 1279 1273 1280 #ifdef INCA 1281 REAL :: calday, zxsnow_dummy(klon) 1274 1282 ! set de variables utilisees pour l'initialisation des valeurs provenant de INCA 1275 1283 REAL, DIMENSION(klon,klev,naero_grp,nbands) :: init_tauinca … … 1320 1328 phys_tstep=NINT(pdtphys) 1321 1329 #ifdef CPP_XIOS 1322 IF (.NOT. debut .AND. is_omp_master) CALL xios_update_calendar(itap+1) 1330 ! switch to XIOS LMDZ physics context 1331 IF (.NOT. debut .AND. is_omp_master) THEN 1332 CALL wxios_set_context() 1333 CALL xios_update_calendar(itap+1) 1334 ENDIF 1323 1335 #endif 1324 1336 … … 1354 1366 1355 1367 IF (first) THEN 1368 ivap = strIdx(tracers(:)%name, addPhase('H2O', 'g')) 1369 iliq = strIdx(tracers(:)%name, addPhase('H2O', 'l')) 1370 isol = strIdx(tracers(:)%name, addPhase('H2O', 's')) 1371 irneb= strIdx(tracers(:)%name, addPhase('H2O', 'r')) 1356 1372 CALL init_etat0_limit_unstruct 1357 1373 IF (.NOT. create_etat0_limit) CALL init_limit_read(days_elapsed) … … 1406 1422 WRITE (lunout, *) ' ok_ice_sursat=y requires 4 H2O tracers ', & 1407 1423 '(H2O_g, H2O_l, H2O_s, H2O_r) but nqo=', nqo, '. Might as well stop here.' 1424 abort_message='see above' 1425 CALL abort_physic(modname,abort_message,1) 1426 ENDIF 1427 1428 IF (ok_plane_h2o.AND..NOT.ok_ice_sursat) THEN 1429 WRITE (lunout, *) ' ok_plane_h2o=y requires ok_ice_sursat=y ' 1430 abort_message='see above' 1431 CALL abort_physic(modname,abort_message,1) 1432 ENDIF 1433 1434 IF (ok_plane_contrail.AND..NOT.ok_ice_sursat) THEN 1435 WRITE (lunout, *) ' ok_plane_contrail=y requires ok_ice_sursat=y ' 1408 1436 abort_message='see above' 1409 1437 CALL abort_physic(modname,abort_message,1) … … 1542 1570 tau_overturning_th(:)=0. 1543 1571 1544 IF ( type_trac == 'inca' .OR. type_trac == 'inco') THEN1572 IF (ANY(type_trac == ['inca','inco'])) THEN 1545 1573 ! jg : initialisation jusqu'au ces variables sont dans restart 1546 1574 ccm(:,:,:) = 0. … … 1850 1878 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1851 1879 ! Nouvelle initialisation pour le rayonnement RRTM 1852 !1853 1880 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1854 1881 1855 1882 CALL iniradia(klon,klev,paprs(1,1:klev+1)) 1856 1883 1857 1858 1884 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1885 CALL wake_ini(rg,rd,rv,prt_level) 1859 1886 CALL thermcell_ini(iflag_thermals,prt_level,tau_thermals,lunout, & 1860 1887 & RG,RD,RCPD,RKAPPA,RLVTT,RETV) 1888 IF (ok_new_lscp) then 1889 CALL lscp_ini(pdtphys,ok_ice_sursat) 1890 endif 1891 1892 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1893 1861 1894 ! 1862 1895 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 2154 2187 !c ENDDO 2155 2188 ! 2156 IF ( type_trac == 'inca' .OR. type_trac == 'inco') THEN! ModThL2189 IF (ANY(type_trac == ['inca','inco'])) THEN ! ModThL 2157 2190 #ifdef INCA 2158 2191 CALL VTe(VTphysiq) … … 2161 2194 WRITE(lunout,*) 'initial time chemini', days_elapsed, calday 2162 2195 2163 CALL chemini( & 2164 rg, & 2165 ra, & 2166 cell_area, & 2167 latitude_deg, & 2168 longitude_deg, & 2169 presnivs, & 2170 calday, & 2171 klon, & 2172 nqtot, & 2173 nqo+nqCO2, & 2174 pdtphys, & 2175 annee_ref, & 2176 year_cur, & 2177 day_ref, & 2178 day_ini, & 2179 start_time, & 2180 itau_phy, & 2181 date0, & 2182 io_lon, & 2183 io_lat, & 2184 chemistry_couple, & 2185 init_source, & 2186 init_tauinca, & 2187 init_pizinca, & 2188 init_cginca, & 2189 init_ccminca) 2196 call init_const_lmdz( & 2197 ndays, nbsrf, is_oce,is_sic, is_ter,is_lic, calend, & 2198 config_inca) 2199 2200 CALL init_inca_geometry( & 2201 longitude, latitude, & 2202 boundslon, boundslat, & 2203 cell_area, ind_cell_glo) 2204 2205 if (grid_type==unstructured) THEN 2206 CALL chemini( pplay, & 2207 nbp_lon, nbp_lat, & 2208 latitude_deg, & 2209 longitude_deg, & 2210 presnivs, & 2211 calday, & 2212 klon, & 2213 nqtot, & 2214 nqo+nqCO2, & 2215 pdtphys, & 2216 annee_ref, & 2217 year_cur, & 2218 day_ref, & 2219 day_ini, & 2220 start_time, & 2221 itau_phy, & 2222 date0, & 2223 chemistry_couple, & 2224 init_source, & 2225 init_tauinca, & 2226 init_pizinca, & 2227 init_cginca, & 2228 init_ccminca) 2229 ELSE 2230 CALL chemini( pplay, & 2231 nbp_lon, nbp_lat, & 2232 latitude_deg, & 2233 longitude_deg, & 2234 presnivs, & 2235 calday, & 2236 klon, & 2237 nqtot, & 2238 nqo+nqCO2, & 2239 pdtphys, & 2240 annee_ref, & 2241 year_cur, & 2242 day_ref, & 2243 day_ini, & 2244 start_time, & 2245 itau_phy, & 2246 date0, & 2247 chemistry_couple, & 2248 init_source, & 2249 init_tauinca, & 2250 init_pizinca, & 2251 init_cginca, & 2252 init_ccminca, & 2253 io_lon, & 2254 io_lat) 2255 ENDIF 2190 2256 2191 2257 … … 2289 2355 2290 2356 2357 2291 2358 ENDIF 2292 2359 ! … … 2393 2460 ql_seri(i,k) = qx(i,k,iliq) 2394 2461 !CR: ATTENTION, on rajoute la variable glace 2395 IF (nqo. eq.2) THEN2462 IF (nqo.EQ.2) THEN !--vapour and liquid only 2396 2463 qs_seri(i,k) = 0. 2397 ELSE IF (nqo.eq.3) THEN 2464 rneb_seri(i,k) = 0. 2465 ELSE IF (nqo.EQ.3) THEN !--vapour, liquid and ice 2398 2466 qs_seri(i,k) = qx(i,k,isol) 2399 ELSE IF (nqo.eq.4) THEN 2467 rneb_seri(i,k) = 0. 2468 ELSE IF (nqo.EQ.4) THEN !--vapour, liquid, ice and rneb 2400 2469 qs_seri(i,k) = qx(i,k,isol) 2401 2470 rneb_seri(i,k) = qx(i,k,irneb) … … 2412 2481 do ixt=1,ntraciso 2413 2482 #ifdef ISOVERIF 2414 write(*,*) 'physiq tmp 1762a: ixt,iqiso_vap=',ixt,iq iso(ixt,ivap)2415 write(*,*) 'physiq tmp 1762b: ixt,iqiso_liq=',ixt,iq iso(ixt,iliq)2483 write(*,*) 'physiq tmp 1762a: ixt,iqiso_vap=',ixt,iqIsoPha(ixt,ivap) 2484 write(*,*) 'physiq tmp 1762b: ixt,iqiso_liq=',ixt,iqIsoPha(ixt,iliq) 2416 2485 if (nqo.eq.3) then 2417 write(*,*) 'physiq tmp 1762c: ixt,iqiso_liq=',ixt,iq iso(ixt,iliq)2486 write(*,*) 'physiq tmp 1762c: ixt,iqiso_liq=',ixt,iqIsoPha(ixt,iliq) 2418 2487 endif !if (nqo.eq.3) then 2419 2488 #endif 2420 if (ixt.gt.niso) write(*,*) 'izone=',tracers(iq iso(ixt,ivap))%iso_iZone2489 if (ixt.gt.niso) write(*,*) 'izone=',tracers(iqIsoPha(ixt,ivap))%iso_iZone 2421 2490 DO k = 1, klev 2422 2491 DO i = 1, klon 2423 xt_seri(ixt,i,k) = qx(i,k,iq iso(ixt,ivap))2424 xtl_seri(ixt,i,k) = qx(i,k,iq iso(ixt,iliq))2492 xt_seri(ixt,i,k) = qx(i,k,iqIsoPha(ixt,ivap)) 2493 xtl_seri(ixt,i,k) = qx(i,k,iqIsoPha(ixt,iliq)) 2425 2494 if (nqo.eq.2) then 2426 2495 xts_seri(ixt,i,k) = 0. 2427 2496 else if (nqo.eq.3) then 2428 xts_seri(ixt,i,k) = qx(i,k,iq iso(ixt,isol))2497 xts_seri(ixt,i,k) = qx(i,k,iqIsoPha(ixt,isol)) 2429 2498 endif 2430 2499 enddo !DO i = 1, klon … … 2661 2730 ! !! RomP >>> td dyn traceur 2662 2731 IF (nqtot > nqo) d_tr_dyn(:,:,:)= 0.0 2732 ! !! RomP <<< 2663 2733 d_rneb_dyn(:,:)=0.0 2664 ! !! RomP <<<2665 2734 ancien_ok = .TRUE. 2666 2735 ENDIF … … 3032 3101 ! verif iso_eau 3033 3102 !write(*,*) 'physiq tmp 2748: iso_eau=',iso_eau 3034 !write(*,*) 'use_iso=',use_iso3035 3103 !write(*,*) 'iso_eau.gt.0=',iso_eau.gt.0 3036 3104 !write(*,*) 'd_xt_vdf(iso_eau,1,1),d_q_vdf(1,1)=',d_xt_vdf(iso_eau,1,1),d_q_vdf(1,1) … … 4612 4680 IF (ok_new_lscp) THEN 4613 4681 4614 CALL lscp(phys_tstep,missing_val,paprs,pplay, & 4682 !--mise à jour de flight_m et flight_h2o dans leur module 4683 IF (ok_plane_h2o .OR. ok_plane_contrail) THEN 4684 CALL airplane(debut,pphis,pplay,paprs,t_seri) 4685 ENDIF 4686 4687 CALL lscp(klon,klev,phys_tstep,missing_val,paprs,pplay, & 4615 4688 t_seri, q_seri,ptconv,ratqs, & 4616 d_t_lsc, d_q_lsc, d_ql_lsc, d_qi_lsc, rneb, rneb _seri, &4689 d_t_lsc, d_q_lsc, d_ql_lsc, d_qi_lsc, rneb, rneblsvol, rneb_seri, & 4617 4690 cldliq, picefra, rain_lsc, snow_lsc, & 4618 pfrac_impa, pfrac_nucl, pfrac_1nucl, &4619 4691 frac_impa, frac_nucl, beta_prec_fisrt, & 4620 4692 prfl, psfl, rhcl, & 4621 4693 zqasc, fraca,ztv,zpspsk,ztla,zthl,iflag_cld_th, & 4622 iflag_ice_thermo, ok_ice_sursat) 4694 iflag_ice_thermo, ok_ice_sursat, zqsatl, zqsats, & 4695 qclr, qcld, qss, qvc, rnebclr, rnebss, gamma_ss, & 4696 Tcontr, qcontr, qcontr2, fcontrN, fcontrP ) 4623 4697 4624 4698 ELSE 4699 4625 4700 CALL fisrtilp(phys_tstep,paprs,pplay, & 4626 4701 t_seri, q_seri,ptconv,ratqs, & … … 4694 4769 ENDDO 4695 4770 ENDDO 4696 IF (nqo ==3) THEN4771 IF (nqo >= 3) THEN 4697 4772 DO k = 1, klev 4698 4773 DO i = 1, klon … … 5116 5191 ENDDO 5117 5192 5118 IF ( type_trac == 'inca' .OR. type_trac == 'inco') THEN! ModThL5193 IF (ANY(type_trac == ['inca','inco'])) THEN ! ModThL 5119 5194 #ifdef INCA 5120 5195 CALL VTe(VTphysiq) … … 5501 5576 ! 5502 5577 !--interactive CO2 in ppm from carbon cycle 5503 IF (carbon_cycle_rad.AND..NOT.debut) THEN 5504 RCO2=RCO2_glo 5505 ENDIF 5578 IF (carbon_cycle_rad) RCO2=RCO2_glo 5506 5579 ! 5507 5580 IF (prt_level .GE.10) THEN … … 5559 5632 5560 5633 #ifndef CPP_XIOS 5561 !--OB 30/05/2016 modified 21/10/20165562 !--here we return swaero_diag and dryaod_diag to FALSE5563 !--and histdef will switch it back to TRUE if necessary5564 !--this is necessary to get the right swaero at first step5565 !--but only in the case of no XIOS as XIOS is covered elsewhere5566 IF (debut) swaerofree_diag = .FALSE.5567 IF (debut) swaero_diag = .FALSE.5568 IF (debut) dryaod_diag = .FALSE.5569 !--IM 15/09/2017 here we return ok_4xCO2atm to FALSE5570 !--as for swaero_diag, see above5571 IF (debut) ok_4xCO2atm = .FALSE.5572 5573 5634 ! 5574 5635 !IM 2eme calcul radiatif pour le cas perturbe ou au moins un … … 5738 5799 DO i=1,klon 5739 5800 itest(i)=0 5740 ! IF ((zstd(i).gt.10.0)) THEN 5741 IF (((zpic(i)-zmea(i)).GT.100.).AND.(zstd(i).GT.10.0)) THEN 5801 zrel_mount(i)=zstd(i)/(max(zsig(i),1.E-8)*sqrt(cell_area(i))) 5802 !zrel_mount: relative mountain height wrt relief explained by mean slope 5803 ! -> condition on zrel_mount can deactivate the drag on tilted planar terrains 5804 ! such as ice sheets (work by V. Wiener) 5805 IF (((zpic(i)-zmea(i)).GT.100.).AND.(zstd(i).GT.10.0).AND.(zrel_mount(i).GE.zrel_mount_t)) THEN 5742 5806 itest(i)=1 5743 5807 igwd=igwd+1 … … 5792 5856 DO i=1,klon 5793 5857 itest(i)=0 5794 IF ((zpic(i)-zmea(i)).GT.100.) THEN 5858 !zrel_mount: relative mountain height wrt relief explained by mean slope 5859 ! -> condition on zrel_mount can deactivate the lifting on tilted planar terrains 5860 ! such as ice sheets (work by V. Wiener) 5861 zrel_mount(i)=zstd(i)/(max(zsig(i),1.E-8)*sqrt(cell_area(i))) 5862 IF (((zpic(i)-zmea(i)).GT.100.).AND.(zrel_mount(i).GE.zrel_mount_t)) THEN 5795 5863 itest(i)=1 5796 5864 igwd=igwd+1 … … 6279 6347 ELSE 6280 6348 sh_in(:,:) = qx(:,:,ivap) 6281 IF (nqo .EQ.3) THEN6349 IF (nqo >= 3) THEN 6282 6350 ch_in(:,:) = qx(:,:,iliq) + qx(:,:,isol) 6283 6351 ELSE … … 6366 6434 ! Calculer le transport de l'eau et de l'energie (diagnostique) 6367 6435 ! 6368 CALL transp (paprs,zxtsol, & 6369 t_seri, q_seri, ql_seri, qs_seri, u_seri, v_seri, zphi, & 6370 ve, vq, ue, uq, vwat, uwat) 6436 CALL transp (paprs,zxtsol, t_seri, q_seri, ql_seri, qs_seri, u_seri, v_seri, zphi, & 6437 ue, ve, uq, vq, uwat, vwat) 6371 6438 ! 6372 6439 !IM global posePB BEG 6373 6440 IF(1.EQ.0) THEN 6374 6441 ! 6375 CALL transp_lay (paprs,zxtsol, & 6376 t_seri, q_seri, u_seri, v_seri, zphi, & 6442 CALL transp_lay (paprs,zxtsol, t_seri, q_seri, u_seri, v_seri, zphi, & 6377 6443 ve_lay, vq_lay, ue_lay, uq_lay) 6378 6444 ! 6379 6445 ENDIF !(1.EQ.0) THEN 6380 6446 !IM global posePB END 6447 ! 6381 6448 ! Accumuler les variables a stocker dans les fichiers histoire: 6382 6449 ! … … 6389 6456 d_t_ec(:,:)=0. 6390 6457 forall (k=1: nbp_lev) exner(:, k) = (pplay(:, k)/paprs(:,1))**RKAPPA 6391 CALL ener_conserv(klon,klev,pdtphys,u,v,t,qx (:,:,ivap),qx(:,:,iliq),qx(:,:,isol), &6458 CALL ener_conserv(klon,klev,pdtphys,u,v,t,qx,ivap,iliq,isol, & 6392 6459 u_seri,v_seri,t_seri,q_seri,ql_seri,qs_seri,pbl_tke(:,:,is_ave)-tke0(:,:), & 6393 6460 zmasse,exner,d_t_ec) … … 6434 6501 #endif 6435 6502 ! 6436 IF ( type_trac == 'inca' .OR. type_trac == 'inco') THEN6503 IF (ANY(type_trac == ['inca','inco'])) THEN 6437 6504 #ifdef INCA 6438 6505 CALL VTe(VTphysiq) … … 6451 6518 pphis, & 6452 6519 zx_rh, & 6453 aps, bps, ap, bp )6520 aps, bps, ap, bp, lafin) 6454 6521 6455 6522 CALL VTe(VTinca) … … 6458 6525 ENDIF 6459 6526 6527 IF (type_trac == 'repr') THEN 6528 #ifdef REPROBUS 6529 CALL coord_hyb_rep(paprs, pplay, aps, bps, ap, bp, cell_area) 6530 #endif 6531 ENDIF 6460 6532 6461 6533 ! … … 6481 6553 d_qx(i,k,iliq) = ( ql_seri(i,k) - qx(i,k,iliq) ) / phys_tstep 6482 6554 !CR: on ajoute le contenu en glace 6483 IF (nqo .ge.3) THEN6555 IF (nqo >= 3) THEN 6484 6556 d_qx(i,k,isol) = ( qs_seri(i,k) - qx(i,k,isol) ) / phys_tstep 6485 6557 ENDIF 6486 6558 !--ice_sursat: nqo=4, on ajoute rneb 6487 IF (nqo .eq.4) THEN6559 IF (nqo == 4) THEN 6488 6560 d_qx(i,k,irneb) = ( rneb_seri(i,k) - qx(i,k,irneb) ) / phys_tstep 6489 6561 ENDIF … … 6496 6568 DO k = 1, klev 6497 6569 DO i = 1, klon 6498 iq=iq iso(ixt,ivap)6570 iq=iqIsoPha(ixt,ivap) 6499 6571 d_qx(i,k,iq) = ( xt_seri(ixt,i,k) - qx(i,k,iq) ) / phys_tstep 6500 iq=iq iso(ixt,iliq)6572 iq=iqIsoPha(ixt,iliq) 6501 6573 d_qx(i,k,iq) = ( xtl_seri(ixt,i,k) - qx(i,k,iq) ) / phys_tstep 6502 6574 if (nqo.eq.3) then 6503 iq=iq iso(ixt,isol)6575 iq=iqIsoPha(ixt,isol) 6504 6576 d_qx(i,k,iq) = ( xts_seri(ixt,i,k) - qx(i,k,iq) ) / phys_tstep 6505 6577 endif … … 6507 6579 enddo ! DO k = 1, klev 6508 6580 enddo !do ixt=1,ntraciso 6509 !#ifdef ISOVERIF 6510 ! write(*,*) 'physiq 6120: d_qx(1,1,:)=',d_qx(1,1,:) 6511 ! write(*,*) 'qx(1,1,:)=',qx(1,1,:) 6512 ! write(*,*) 'xt_seri(:,1,1)=',xt_seri(:,1,1) 6513 !#endif 6514 #endif 6515 ! #ifdef ISO 6581 #endif 6516 6582 ! DC: All iterations are cycled if nqtot==nqo, so no nqtot>nqo condition required 6517 6583 itr = 0 … … 6573 6639 ql_ancien(:,:) = ql_seri(:,:) 6574 6640 qs_ancien(:,:) = qs_seri(:,:) 6641 rneb_ancien(:,:) = rneb_seri(:,:) 6575 6642 #ifdef ISO 6576 6643 xt_ancien(:,:,:)=xt_seri(:,:,:) … … 6832 6899 #ifdef CPP_XIOS 6833 6900 IF (is_omp_master) CALL xios_context_finalize 6901 6902 #ifdef INCA 6903 if (type_trac == 'inca') then 6904 IF (is_omp_master .and. grid_type==unstructured) THEN 6905 CALL finalize_inca 6906 ENDIF 6907 endif 6908 #endif 6909 6834 6910 #endif 6835 6911 WRITE(lunout,*) ' physiq fin, nombre de steps ou cvpas = 1 : ', Ncvpaseq1 -
LMDZ6/branches/Portage_acc/libf/phylmdiso/reevap.F90
r3927 r4446 9 9 USE add_phys_tend_mod, only : fl_cor_ebil 10 10 #ifdef ISO 11 USE infotrac_phy, ONLY: nt raciso11 USE infotrac_phy, ONLY: ntiso 12 12 #ifdef ISOVERIF 13 13 USE isotopes_verif_mod … … 30 30 31 31 #ifdef ISO 32 REAL, DIMENSION(nt raciso,klon,klev), INTENT(in) :: xt_seri,xtl_seri,xts_seri33 REAL, DIMENSION(nt raciso,klon,klev), INTENT(out) :: d_xt_eva,d_xtl_eva,d_xts_eva32 REAL, DIMENSION(ntiso,klon,klev), INTENT(in) :: xt_seri,xtl_seri,xts_seri 33 REAL, DIMENSION(ntiso,klon,klev), INTENT(out) :: d_xt_eva,d_xtl_eva,d_xts_eva 34 34 integer ixt 35 35 #endif … … 76 76 77 77 #ifdef ISO 78 do ixt=1,nt raciso78 do ixt=1,ntiso 79 79 zb = MAX(0.0,xtl_seri(ixt,i,k)) 80 80 d_xt_eva(ixt,i,k) = zb 81 81 d_xtl_eva(ixt,i,k) = -xtl_seri(ixt,i,k) 82 82 d_xts_eva(ixt,i,k) = 0. 83 enddo ! do ixt=1,ntraciso83 enddo 84 84 #ifdef ISOVERIF 85 do ixt=1,nt raciso85 do ixt=1,ntiso 86 86 call iso_verif_noNaN(xt_seri(ixt,i,k), & 87 87 & 'physiq 2417: apres evap tot') … … 136 136 137 137 #ifdef ISO 138 do ixt=1,nt raciso138 do ixt=1,ntiso 139 139 zb = MAX(0.0,xtl_seri(ixt,i,k)+xts_seri(ixt,i,k)) 140 140 d_xt_eva(ixt,i,k) = zb 141 141 d_xtl_eva(ixt,i,k) = -xtl_seri(ixt,i,k) 142 142 d_xts_eva(ixt,i,k) = -xts_seri(ixt,i,k) 143 enddo ! do ixt=1,ntraciso143 enddo 144 144 145 145 #ifdef ISOVERIF 146 do ixt=1,nt raciso146 do ixt=1,ntiso 147 147 call iso_verif_noNaN(xt_seri(ixt,i,k), & 148 148 & 'physiq 2417: apres evap tot') -
LMDZ6/branches/Portage_acc/libf/phylmdiso/surf_land_bucket_mod.F90
r4033 r4446 35 35 USE indice_sol_mod 36 36 #ifdef ISO 37 use infotrac_phy, ONLY: nt raciso,niso37 use infotrac_phy, ONLY: ntiso,niso 38 38 USE isotopes_mod, ONLY: iso_eau, iso_HDO, iso_O18, iso_O17, & 39 39 ridicule_qsol … … 69 69 REAL, DIMENSION(klon), INTENT(IN) :: swnet, lwnet 70 70 #ifdef ISO 71 REAL, DIMENSION(nt raciso,klon), INTENT(IN):: xtprecip_rain, xtprecip_snow72 REAL, DIMENSION(nt raciso,klon), INTENT(IN):: xtspechum71 REAL, DIMENSION(ntiso,klon), INTENT(IN) :: xtprecip_rain, xtprecip_snow 72 REAL, DIMENSION(ntiso,klon), INTENT(IN) :: xtspechum 73 73 #endif 74 74 … … 91 91 REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l 92 92 #ifdef ISO 93 REAL, DIMENSION(nt raciso,klon), INTENT(OUT):: xtevap94 REAL, DIMENSION(klon), INTENT(OUT):: h195 REAL, DIMENSION(niso,klon), INTENT(OUT):: xtrunoff_diag96 REAL, DIMENSION(klon), INTENT(OUT):: runoff_diag97 REAL, DIMENSION(niso,klon), INTENT(IN):: Rland_ice93 REAL, DIMENSION(ntiso,klon), INTENT(OUT) :: xtevap 94 REAL, DIMENSION(klon), INTENT(OUT) :: h1 95 REAL, DIMENSION(niso,klon), INTENT(OUT) :: xtrunoff_diag 96 REAL, DIMENSION(klon), INTENT(OUT) :: runoff_diag 97 REAL, DIMENSION(niso,klon), INTENT(IN) :: Rland_ice 98 98 #endif 99 99 -
LMDZ6/branches/Portage_acc/libf/phylmdiso/surf_land_mod.F90
r4033 r4446 30 30 USE dimphy 31 31 USE surface_data, ONLY : ok_veget 32 ! >> PC33 32 USE carbon_cycle_mod 34 ! << PC35 33 36 34 ! See comments in each module surf_land_orchidee_xxx for compatiblity with ORCHIDEE … … 51 49 USE surf_land_orchidee_nounstruct_mod 52 50 #else 51 #if ORCHIDEE_NOLIC 52 ! Compilation with cpp key ORCHIDEE_NOLIC 53 USE surf_land_orchidee_nolic_mod 54 #else 55 ! Default version#else 53 56 USE surf_land_orchidee_mod 57 #endif 54 58 #endif 55 59 #endif … … 61 65 USE indice_sol_mod 62 66 #ifdef ISO 63 use infotrac_phy, ONLY: nt raciso,niso67 use infotrac_phy, ONLY: ntiso,niso 64 68 use isotopes_mod, ONLY: nudge_qsol, iso_eau 65 69 #ifdef ISOVERIF … … 67 71 #endif 68 72 #endif 69 70 ! >> PC 73 71 74 USE print_control_mod, ONLY: lunout 72 ! << PC73 75 74 76 INCLUDE "dimsoil.h" … … 104 106 REAL, DIMENSION(klon), INTENT(IN) :: q2m, t2m 105 107 #ifdef ISO 106 REAL, DIMENSION(nt raciso,klon), INTENT(IN) :: xtprecip_rain, xtprecip_snow107 REAL, DIMENSION(nt raciso,klon), INTENT(IN) :: xtspechum108 REAL, DIMENSION(ntiso,klon), INTENT(IN) :: xtprecip_rain, xtprecip_snow 109 REAL, DIMENSION(ntiso,klon), INTENT(IN) :: xtspechum 108 110 #endif 109 111 … … 135 137 REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT) :: height 136 138 #ifdef ISO 137 REAL, DIMENSION(nt raciso,klon), INTENT(OUT) :: xtevap139 REAL, DIMENSION(ntiso,klon), INTENT(OUT) :: xtevap 138 140 REAL, DIMENSION(klon), INTENT(OUT) :: h1 139 141 REAL, DIMENSION(niso,klon), INTENT(OUT) :: xtrunoff_diag … … 181 183 ! write(*,*) 'surf_land 169: ok_veget=',ok_veget 182 184 do i=1,knon 183 do ixt=1,nt raciso185 do ixt=1,ntiso 184 186 call iso_verif_noNaN(xtprecip_snow(ixt,i),'surf_land 146') 185 187 enddo -
LMDZ6/branches/Portage_acc/libf/phylmdiso/surf_landice_mod.F90
r4033 r4446 37 37 #ifdef ISO 38 38 USE fonte_neige_mod, ONLY : xtrun_off_lic 39 USE infotrac_phy, ONLY : nt raciso,niso39 USE infotrac_phy, ONLY : ntiso,niso 40 40 USE isotopes_routines_mod, ONLY: calcul_iso_surf_lic_vectall 41 41 #ifdef ISOVERIF … … 82 82 REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: pctsrf 83 83 #ifdef ISO 84 REAL, DIMENSION(nt raciso,klon), INTENT(IN):: xtprecip_rain, xtprecip_snow85 REAL, DIMENSION(nt raciso,klon), INTENT(IN):: xtspechum84 REAL, DIMENSION(ntiso,klon), INTENT(IN) :: xtprecip_rain, xtprecip_snow 85 REAL, DIMENSION(ntiso,klon), INTENT(IN) :: xtspechum 86 86 #endif 87 87 … … 129 129 REAL, DIMENSION(klon), INTENT(OUT) :: runoff !Land ice runoff 130 130 #ifdef ISO 131 REAL, DIMENSION(nt raciso,klon), INTENT(OUT):: xtevap131 REAL, DIMENSION(ntiso,klon), INTENT(OUT) :: xtevap 132 132 ! real, DIMENSION(niso,klon) :: xtrun_off_lic_0_diag ! est une variable globale de 133 133 ! fonte_neige … … 144 144 INTEGER :: i,j,nt 145 145 REAL, DIMENSION(klon) :: fqfonte,ffonte 146 REAL, DIMENSION(klon) :: run_off_lic_frac 146 147 #ifdef ISO 147 148 real, parameter :: t_coup = 273.15 … … 484 485 ! Send run-off on land-ice to coupler if coupled ocean. 485 486 ! run_off_lic has been calculated in fonte_neige or surf_inlandsis 486 ! 487 !**************************************************************************************** 488 IF (type_ocean=='couple') THEN 489 CALL cpl_send_landice_fields(itime, knon, knindex, run_off_lic) 487 ! If landice_opt>=2, corresponding call is done from surf_land_orchidee 488 !**************************************************************************************** 489 IF (type_ocean=='couple' .AND. landice_opt .LT. 2) THEN 490 ! Compress fraction where run_off_lic is active (here all pctsrf(is_lic)) 491 run_off_lic_frac(:)=0.0 492 DO j = 1, knon 493 i = knindex(j) 494 run_off_lic_frac(j) = pctsrf(i,is_lic) 495 ENDDO 496 497 CALL cpl_send_landice_fields(itime, knon, knindex, run_off_lic, run_off_lic_frac) 490 498 ENDIF 491 499 -
LMDZ6/branches/Portage_acc/libf/phylmdiso/surf_ocean_mod.F90
r3940 r4446 20 20 z0m, z0h, SFRWL, alb_dir_new, alb_dif_new, evap, fluxsens, fluxlat, & 21 21 tsurf_new, dflux_s, dflux_l, lmt_bils, & 22 flux_u1, flux_v1, delta_sst, delta_sal, ds_ns, dt_ns, dter, dser, tkt, tks,&23 taur, sss &22 flux_u1, flux_v1, delta_sst, delta_sal, ds_ns, dt_ns, dter, dser, & 23 dt_ds, tkt, tks, taur, sss & 24 24 #ifdef ISO 25 25 & ,xtprecip_rain, xtprecip_snow,xtspechum,Roce, & … … 37 37 USE indice_sol_mod, ONLY : nbsrf, is_oce 38 38 #ifdef ISO 39 USE infotrac_phy, ONLY : ntraciso ,niso39 USE infotrac_phy, ONLY : ntraciso=>ntiso,niso 40 40 #ifdef ISOVERIF 41 41 USE isotopes_mod, ONLY: iso_eau,ridicule … … 114 114 ! minus foundation temperature. (Can be negative.) In K. 115 115 116 REAL, intent(inout):: dter(:) ! (knon) 117 ! Temperature variation in the diffusive microlayer, that is 118 ! ocean-air interface temperature minus subskin temperature. In 119 ! K. 120 121 REAL, intent(inout):: dser(:) ! (knon) 122 ! Salinity variation in the diffusive microlayer, that is 123 ! ocean-air interface salinity minus subskin salinity. In ppt. 124 125 real, intent(inout):: dt_ds(:) ! (knon) 126 ! (tks / tkt) * dTer, in K 127 116 128 ! Output variables 117 129 !************************************************************************** … … 129 141 REAL, DIMENSION(klon), INTENT(OUT) :: flux_u1, flux_v1 130 142 131 REAL, intent(out):: dter(:) ! (knon)132 ! Temperature variation in the diffusive microlayer, that is133 ! ocean-air interface temperature minus subskin temperature. In134 ! K.135 136 REAL, intent(out):: dser(:) ! (knon)137 ! Salinity variation in the diffusive microlayer, that is138 ! ocean-air interface salinity minus subskin salinity. In ppt.139 140 143 REAL, intent(out):: tkt(:) ! (knon) 141 144 ! épaisseur (m) de la couche de diffusion thermique (microlayer) … … 152 155 ! defined for subscripts 1:knon, but we have to declare it with 153 156 ! size klon because of the coupling machinery.) 157 154 158 #ifdef ISO 155 159 REAL, DIMENSION(ntraciso,klon), INTENT(out) :: xtevap ! isotopes in surface evaporation flux … … 172 176 real s_int(knon) ! ocean-air interface salinity, in ppt 173 177 174 !************************************************************************** ****178 !************************************************************************** 175 179 176 180 #ifdef ISO … … 213 217 ENDIF 214 218 215 216 219 rhoa = PS(:KNON) / (Rd * temp_air(:knon) * (1. + retv * spechum(:knon))) 217 218 220 !****************************************************************************** 219 221 ! Switch according to type of ocean (couple, slab or forced) … … 232 234 qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 233 235 tsurf_new, dflux_s, dflux_l, sens_prec_liq, sss, delta_sal, rhoa, & 234 delta_sst )236 delta_sst, dTer, dSer, dt_ds) 235 237 236 238 CASE('slab') … … 376 378 delta_sst = t_int - tsurf_new(:knon) 377 379 delta_sal = s_int - sss(:knon) 378 if (activate_ocean_skin >= 2) tsurf_new(:knon) = t_int 380 381 if (activate_ocean_skin == 2) then 382 tsurf_new(:knon) = t_int 383 if (type_ocean == 'couple') dt_ds = (tks / tkt) * dter 384 end if 379 385 end if 380 386 381 387 END SUBROUTINE surf_ocean 382 388 !**************************************************************************** -
LMDZ6/branches/Portage_acc/libf/phylmdiso/surf_seaice_mod.F90
r3940 r4446 35 35 USE indice_sol_mod 36 36 #ifdef ISO 37 USE infotrac_phy, ONLY : nt raciso,niso37 USE infotrac_phy, ONLY : ntiso,niso 38 38 #endif 39 39 … … 71 71 REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: pctsrf 72 72 #ifdef ISO 73 REAL, DIMENSION(nt raciso,klon), INTENT(IN) :: xtprecip_rain, xtprecip_snow73 REAL, DIMENSION(ntiso,klon), INTENT(IN) :: xtprecip_rain, xtprecip_snow 74 74 REAL, DIMENSION(klon), INTENT(IN) :: xtspechum 75 75 REAL, DIMENSION(niso,klon), INTENT(IN) :: Roce … … 101 101 REAL, DIMENSION(klon), INTENT(OUT) :: flux_u1, flux_v1 102 102 #ifdef ISO 103 REAL, DIMENSION(nt raciso,klon), INTENT(OUT) :: xtevap103 REAL, DIMENSION(ntiso,klon), INTENT(OUT) :: xtevap 104 104 #endif 105 105 -
LMDZ6/branches/Portage_acc/libf/phylmdiso/wake.F90
r4036 r4446 34 34 USE print_control_mod, ONLY: prt_level 35 35 #ifdef ISO 36 USE infotrac_phy, ONLY : ntraciso 36 USE infotrac_phy, ONLY : ntraciso=>ntiso 37 37 #ifdef ISOVERIF 38 38 USE isotopes_verif_mod … … 2550 2550 d_deltaqw, sigmaw, d_sigmaw, alpha) 2551 2551 ! ------------------------------------------------------ 2552 ! D termination du coefficient alpha tel que les tendances2552 ! D\'etermination du coefficient alpha tel que les tendances 2553 2553 ! corriges alpha*d_G, pour toutes les grandeurs G, correspondent 2554 2554 ! a une humidite positive dans la zone (x) et dans la zone (w).
Note: See TracChangeset
for help on using the changeset viewer.