Changeset 2175
- Timestamp:
- Nov 7, 2019, 5:26:32 PM (5 years ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/README
r2173 r2175 2775 2775 Update non orographic GW routine so that key parameter RUWMAX is read in 2776 2776 from callphys.def 2777 2778 2779 == 07/11/2019 == JN 2780 File "newstart.F", option "composition". Added the possibility to change atmospheric 2781 composition when non-co2 gases (ar, n2, co, o2) are implicit. When this case is met, 2782 we assume the molar mass of non-co2 atmosphere to be the one measured by MSL at Ls~184. 2783 Atmospheric composition is changed at a selected grid point, and horizontal and vertical 2784 gradients are preserved. -
trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/newstart.F
r2167 r2175 173 173 real :: latref,lonref,dlatmin,dlonmin 174 174 ! Variable used to change composition 175 real :: Svmr,Smmr,Smmr_old,Smmr_new, Sn175 real :: Svmr,Smmr,Smmr_old,Smmr_new,n,Sn 176 176 real :: Mair_old,Mair_new,vmr_old,vmr_new 177 177 real,allocatable :: coefvmr(:) ! Correction coefficient when changing composition … … 992 992 993 993 ! Compute air molar mass at reference site 994 Smmr=0 995 Sn = 0 994 Smmr=0. 995 Sn = 0. 996 write(*,*) 'igcm_co2 = ', igcm_co2 997 write(*,*) 'igcm_n2 = ', igcm_n2 998 write(*,*) 'igcm_ar = ', igcm_ar 999 write(*,*) 'igcm_o2 = ', igcm_o2 1000 write(*,*) 'igcm_co = ', igcm_co 1001 write(*,*) noms 996 1002 do iq=1,nqtot 997 1003 if ((iq.eq.igcm_co2).or.(iq.eq.igcm_n2) … … 1002 1008 end if 1003 1009 end do 1004 write(*,*) "At reference site : " 1005 write(*,*) "Sum of mass mix. ratio (should be about 1)=",Smmr 1006 Mair_old =Smmr/Sn 1007 write(*,*) 1008 & "Air molar mass (g/mol) at reference site= ",Mair_old 1010 ! Special case : implicit non-co2 gases ! JN 11/2019 1011 if ((igcm_n2.eq.0) .or. (igcm_ar.eq.0)) then 1012 write(*,*) "Warning : non-co2 gases are implicit : " 1013 write(*,*) "At reference site : " 1014 ! write(*,*) "q= ", q(iref, jref, 1,igcm_co2) 1015 write(*,*) "Sum of mass mix. ratio (ie MMR(co2))=",Smmr 1016 Mair_old = 44.0*Smmr + 33.87226017157708*(1-Smmr) 1017 1018 ! 33.87226017157708 is the 1019 ! molar mass of non-co2 atmosphere measured by MSL at Ls ~184 1020 1021 write(*,*) 1022 & "Air molar mass (g/mol) at reference site= ",Mair_old 1023 end if 1009 1024 1010 1025 ! Ask for new volume mixing ratio at reference site 1011 1026 Svmr =0. 1012 1027 Sn =0. 1028 coefvmr(igcm_co2)=1. 1029 1013 1030 do iq=1,nqtot 1014 1031 coefvmr(iq) = 1. … … 1040 1057 end if 1041 1058 enddo ! of do iq=1,nqtot 1059 1060 ! Special case : implicit non-co2 gases JN 11/2019 1061 if ((igcm_n2.eq.0) .or. (igcm_ar.eq.0)) then 1062 write(*,*) "Warning : non-co2 gases are implicit" 1063 vmr_old=q(iref,jref,1,igcm_co2)*Mair_old/mmol(igcm_co2) 1064 write(*,*) "Previous vmr(co2)=", vmr_old 1065 write(*,*) "New vmr(co2) ? (MSL: 0.956521 at Ls~184)" 1066 666 read(*,*,iostat=ierr) vmr_new 1067 if(ierr.ne.0) goto 666 1068 coefvmr(igcm_co2) = vmr_new/vmr_old 1069 Svmr=Svmr+vmr_new 1070 Sn=vmr_new*mmol(igcm_co2) + (1-vmr_new) 1071 & *33.87226017157708 ! Molar mass of non-co2 atm from MSL 1072 end if 1042 1073 ! Estimation of new Air molar mass at reference site (assuming vmr_co2 = 1-Svmr) 1043 1074 Mair_new = Sn + (1-Svmr)*mmol(igcm_co2) 1075 ! Estimation of new Air molar mass when non-co2 gases are implicit 1076 if ((igcm_n2.eq.0) .or. (igcm_ar.eq.0)) then 1077 Mair_new=vmr_new*mmol(igcm_co2) + (1-vmr_new) 1078 & *33.87226017157708 ! Molar mass of non-co2 atm from MSL 1079 write(*,*) 1080 & "We consider non-co2 gases vmr measured from Curiosity" 1081 end if 1044 1082 write(*,*) 1045 1083 & "NEW Air molar mass (g/mol) at reference site= ",Mair_new … … 1047 1085 ! Compute mass mixing ratio changes 1048 1086 do iq=1,nqtot 1049 if ((iq.eq.igcm_ n2).or.(iq.eq.igcm_ar)1087 if ((iq.eq.igcm_co2).or.(iq.eq.igcm_n2).or.(iq.eq.igcm_ar) 1050 1088 & .or. (iq.eq.igcm_o2).or.(iq.eq.igcm_co)) then 1051 1089 write(*,*) "Everywhere mmr("//trim(tname(iq))// … … 1062 1100 Smmr_new = 0. 1063 1101 do iq=1,nqtot 1064 if ((iq.eq.igcm_n2).or.(iq.eq.igcm_ar) 1065 & .or. (iq.eq.igcm_o2).or.(iq.eq.igcm_co)) then 1102 if ((iq.eq.igcm_co2).or.(iq.eq.igcm_n2) 1103 & .or.(iq.eq.igcm_ar) 1104 & .or. (iq.eq.igcm_o2).or.(iq.eq.igcm_co)) then 1066 1105 Smmr_old = Smmr_old + q(i,j,l,iq) ! sum of old mmr 1067 1106 q(i,j,l,iq)=q(i,j,l,iq)*coefvmr(iq)*Mair_old/Mair_new … … 1075 1114 enddo 1076 1115 enddo 1116 1117 1118 ! do l=1,llm 1119 ! do j=1,jjp1 1120 ! do i=1,iip1 1121 ! Smmr_old = 0. 1122 ! Smmr_new = 0. 1123 ! do iq=1,nqtot 1124 ! if ((iq.eq.igcm_co2).or.(iq.eq.igcm_n2) 1125 ! & .or.(iq.eq.igcm_ar) 1126 ! & .or. (iq.eq.igcm_o2).or.(iq.eq.igcm_co)) then 1127 ! Smmr_old = Smmr_old + q(i,j,l,iq) ! sum of old mmr 1128 ! q(i,j,l,iq)=q(i,j,l,iq)*coefvmr(iq)*Mair_old/Mair_new 1129 ! Smmr_new = Smmr_new + q(i,j,l,iq) ! sum of new mmr 1130 ! end if 1131 ! enddo 1132 ! iloc = maxloc(q(i,j,l,:)) 1133 ! iqmax = iloc(1) 1134 ! q(i,j,l,iqmax) = q(i,j,l,iqmax) + Smmr_old - Smmr_new 1135 ! enddo 1136 ! enddo 1137 ! enddo 1077 1138 1078 1139 write(*,*)
Note: See TracChangeset
for help on using the changeset viewer.