Changeset 2304
- Timestamp:
- Apr 28, 2020, 3:32:34 PM (5 years ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/README
r2303 r2304 2982 2982 Example : concat[diagfi2 (66sols from sol 61); diagfi4 (65sols from sol 193)] 2983 2983 Old output Time: [61.08,..127,|127.08,..192]; New output Time: [61.08,..127,|193.08,..258] 2984 2985 == 28/04/2020 == EM 2986 Some code tidying: use getin_p() instead of getin() and use "call abort_physic" 2987 instead of "stop" or "call abort" -
trunk/LMDZ.MARS/libf/phymars/aeropacity_mod.F
r2252 r2304 12 12 & clearsky,totcloudfrac) 13 13 14 ! to use 'getin' 15 USE ioipsl_getincom, only: getin 14 use ioipsl_getin_p_mod, only: getin_p 16 15 use tracer_mod, only: noms, igcm_h2o_ice, igcm_dust_mass, 17 16 & igcm_dust_submicron, rho_dust, rho_ice, … … 24 23 use tracer_mod, only: r3n_q, ref_r0, igcm_dust_number 25 24 #endif 26 use planete_h 27 USE comcstfi_h 25 use comcstfi_h, only: g, pi 28 26 use dimradmars_mod, only: naerkind, name_iaer, 29 27 & iaerdust,tauvis, … … 32 30 & iaer_stormdust_doubleq, 33 31 & iaer_topdust_doubleq 34 USE calcstormfract_mod 32 35 33 IMPLICIT NONE 36 34 c======================================================================= … … 227 225 ! load value of tauvis from callphys.def (if given there, 228 226 ! otherwise default value read from starfi.nc file will be used) 229 call getin ("tauvis",tauvis)227 call getin_p("tauvis",tauvis) 230 228 231 229 IF (freedust.or.rdstorm) THEN ! if rdstorm no need to held opacity constant at the first levels … … 303 301 call read_dust_scenario(ngrid,nlayer,zday,pplev,tauref) 304 302 ELSE 305 stop 'problem with iaervar in aeropacity.F'303 call abort_physic("aeropacity","wrong value for iaervar",1) 306 304 ENDIF 307 305 … … 635 633 write(*,*) "Add a local storm ?" 636 634 localstorm=.true. ! default value 637 call getin ("localstorm",localstorm)635 call getin_p("localstorm",localstorm) 638 636 write(*,*) " localstorm = ",localstorm 639 637 … … 645 643 write(*,*) "ref opacity of local dust storm" 646 644 taulocref = 4.25 ! default value 647 call getin ("taulocref",taulocref)645 call getin_p("taulocref",taulocref) 648 646 write(*,*) " taulocref = ",taulocref 649 647 650 648 write(*,*) "target altitude of local storm (km)" 651 649 ztoploc = 10.0 ! default value 652 call getin ("ztoploc",ztoploc)650 call getin_p("ztoploc",ztoploc) 653 651 write(*,*) " ztoploc = ",ztoploc 654 652 655 653 write(*,*) "radius of dust storm (degree)" 656 654 radloc = 0.5 ! default value 657 call getin ("radloc",radloc)655 call getin_p("radloc",radloc) 658 656 write(*,*) " radloc = ",radloc 659 657 660 658 write(*,*) "center longitude of storm (deg)" 661 659 lonloc = 25.0 ! default value 662 call getin ("lonloc",lonloc)660 call getin_p("lonloc",lonloc) 663 661 write(*,*) " lonloc = ",lonloc 664 662 665 663 write(*,*) "center latitude of storm (deg)" 666 664 latloc = -2.5 ! default value 667 call getin ("latloc",latloc)665 call getin_p("latloc",latloc) 668 666 write(*,*) " latloc = ",latloc 669 667 670 668 write(*,*) "reff storm (mic) 0. for background" 671 669 reffstorm = 0.0 ! default value 672 call getin ("reffstorm",reffstorm)670 call getin_p("reffstorm",reffstorm) 673 671 write(*,*) " reffstorm = ",reffstorm 674 672 -
trunk/LMDZ.MARS/libf/phymars/albedocaps.F90
r1918 r2304 4 4 ! depending on the presence of CO2 ice on the surface 5 5 6 ! to use the 'getin' routine 7 use ioipsl_getincom, only: getin 6 use ioipsl_getin_p_mod, only: getin_p 8 7 use geometry_mod, only: latitude ! grid point latitudes (rad) 9 8 use surfdat_h, only: TESicealbedo, TESice_Ncoef, TESice_Scoef, & … … 32 31 TESicealbedo=.false. ! default value 33 32 write(*,*)" albedocaps: Use TES Cap albedoes ?" 34 call getin ("TESicealbedo",TESicealbedo)33 call getin_p("TESicealbedo",TESicealbedo) 35 34 write(*,*)" albedocaps: TESicealbedo = ",TESicealbedo 36 35 … … 39 38 write(*,*)" albedocaps: Coefficient for Northern Cap ?" 40 39 TESice_Ncoef=1.0 ! default value 41 call getin ("TESice_Ncoef",TESice_Ncoef)40 call getin_p("TESice_Ncoef",TESice_Ncoef) 42 41 write(*,*)" albedocaps: TESice_Ncoef = ",TESice_Ncoef 43 42 44 43 write(*,*)" albedocaps: Coefficient for Southern Cap ?" 45 44 TESice_Scoef=1.0 ! default value 46 call getin ("TESice_Scoef",TESice_Scoef)45 call getin_p("TESice_Scoef",TESice_Scoef) 47 46 write(*,*)" albedocaps: TESice_Scoef = ",TESice_Scoef 48 47 endif … … 116 115 real :: lond ! longitude, in degrees 117 116 integer :: i 117 character(len=20),parameter :: modname="TES_icecap_albedo" 118 118 119 119 ! TES datasets: (hard coded fixed length/sizes; for now) … … 160 160 write(*,*)' can be obtained online on:' 161 161 write(*,*)' http://www.lmd.jussieu.fr/~lmdz/planets/mars/datadir' 162 CALL ABORT162 CALL abort_physic(modname,"missing input file",1) 163 163 ELSE 164 164 write(*,*) "albedocaps: using file ",trim(datadir)//"/npsc_albedo.nc" … … 169 169 write(*,*) "Failed to find longitude in file!" 170 170 write(*,*)trim(nf90_strerror(ierr)) 171 stop171 call abort_physic(modname,"failed finding longitude",1) 172 172 else 173 173 ierr=nf90_get_var(nid,nvarid,TESlon) … … 175 175 write(*,*) "Failed loading longitude data from file!" 176 176 write(*,*)trim(nf90_strerror(ierr)) 177 stop177 call abort_physic(modname,"failed loading longitude",1) 178 178 endif 179 179 endif … … 183 183 write(*,*) "Failed to find latitude in file!" 184 184 write(*,*)trim(nf90_strerror(ierr)) 185 stop185 call abort_physic(modname,"failed finding latitude",1) 186 186 else 187 187 ierr=nf90_get_var(nid,nvarid,TESlatn) … … 189 189 write(*,*) "Failed loading latitude data from file!" 190 190 write(*,*)trim(nf90_strerror(ierr)) 191 stop191 call abort_physic(modname,"failed loading latitude",1) 192 192 endif 193 193 endif … … 197 197 write(*,*) "Failed to find time in file!" 198 198 write(*,*)trim(nf90_strerror(ierr)) 199 stop199 call abort_physic(modname,"failed finding time",1) 200 200 else 201 201 ierr=nf90_get_var(nid,nvarid,TESls) … … 203 203 write(*,*) "Failed loading time data from file!" 204 204 write(*,*)trim(nf90_strerror(ierr)) 205 stop205 call abort_physic(modname,"failed loading time",1) 206 206 endif 207 207 endif … … 211 211 write(*,*) "Failed to find albedo in file!" 212 212 write(*,*)trim(nf90_strerror(ierr)) 213 stop213 call abort_physic(modname,"failed finding albedo",1) 214 214 else 215 215 ierr=nf90_get_var(nid,nvarid,TESalbn) … … 217 217 write(*,*) "Failed loading albedo data from file!" 218 218 write(*,*)trim(nf90_strerror(ierr)) 219 stop219 call abort_physic(modname,"failed loading albedo",1) 220 220 endif 221 221 endif … … 233 233 write(*,*)' can be obtained online on:' 234 234 write(*,*)' http://www.lmd.jussieu.fr/~lmdz/planets/mars/datadir' 235 CALL ABORT235 CALL abort_physic(modname,"missing input file",1) 236 236 ELSE 237 237 write(*,*) "albedocaps: using file ",trim(datadir)//"/spsc_albedo.nc" … … 242 242 write(*,*) "Failed to find latitude in file!" 243 243 write(*,*)trim(nf90_strerror(ierr)) 244 stop244 call abort_physic(modname,"failed finding latitude",1) 245 245 else 246 246 ierr=nf90_get_var(nid,nvarid,TESlats) … … 248 248 write(*,*) "Failed loading latitude data from file!" 249 249 write(*,*)trim(nf90_strerror(ierr)) 250 stop250 call abort_physic(modname,"failed loading latitude",1) 251 251 endif 252 252 endif … … 256 256 write(*,*) "Failed to find albedo in file!" 257 257 write(*,*)trim(nf90_strerror(ierr)) 258 stop258 call abort_physic(modname,"failed finding albedo",1) 259 259 else 260 260 ierr=nf90_get_var(nid,nvarid,TESalbs) … … 262 262 write(*,*) "Failed loading albedo data from file!" 263 263 write(*,*)trim(nf90_strerror(ierr)) 264 stop264 call abort_physic(modname,"failed loading albedo",1) 265 265 endif 266 266 endif -
trunk/LMDZ.MARS/libf/phymars/callsedim_mod.F
r2199 r2304 12 12 & tau,tauscaling) 13 13 14 USE ioipsl_getin com, only: getin14 USE ioipsl_getin_p_mod, only: getin_p 15 15 USE updaterad, only: updaterdust,updaterice_micro,updaterice_typ 16 16 USE tracer_mod, only: noms, igcm_dust_mass, igcm_dust_number, … … 103 103 REAL Mo,No 104 104 REAl ccntyp 105 105 character(len=20),parameter :: modname="callsedim" 106 106 107 107 … … 203 203 write(*,*) ' tracers for dust mass and number mixing' 204 204 write(*,*) ' ratio and doubleq is activated!' 205 stop205 call abort_physic(modname,"missing dust tracers",1) 206 206 endif 207 207 ENDIF !of if (doubleq) … … 225 225 write(*,*) ' tracers for ccn mass and number mixing' 226 226 write(*,*) ' ratio and microphys is activated!' 227 stop227 call abort_physic(modname,"missing ccn tracers",1) 228 228 endif 229 229 ENDIF !of if (microphys) … … 252 252 write(*,*) ' tracers for ccn co2 mass and number mixing' 253 253 write(*,*) ' ratio and co2clouds are activated!' 254 stop254 call abort_physic(modname,"missing co2 ccn tracers",1) 255 255 endif 256 256 ENDIF !of if (co2clouds) … … 259 259 write(*,*) "correction for the shape of the ice particles ?" 260 260 beta=0.75 ! default value 261 call getin ("ice_shape",beta)261 call getin_p("ice_shape",beta) 262 262 write(*,*) " ice_shape = ",beta 263 263 … … 289 289 write(*,*) ' tracers for stormdust mass and number mixing' 290 290 write(*,*) ' ratio and rdstorm is activated!' 291 stop291 call abort_physic(modname,"missing stormdust tracers",1) 292 292 endif 293 293 ENDIF !of if (rdstorm) … … 314 314 write(*,*) ' tracers for topdust mass and number mixing' 315 315 write(*,*) ' ratio and slpwind is activated!' 316 stop316 call abort_physic(modname,"missing topdust tracers",1) 317 317 endif 318 318 ENDIF !of if (slpwind) -
trunk/LMDZ.MARS/libf/phymars/conf_phys.F
r2281 r2304 33 33 ! declarations: 34 34 ! ------------- 35 ! to use 'getin'36 USE ioipsl_getincom, only : getin37 35 USE ioipsl_getin_p_mod, ONLY : getin_p 38 36 use tracer_mod, only : nuice_sed, ccn_factor, nuiceco2_sed, … … 54 52 INTEGER,INTENT(IN) :: ngrid,nlayer,nq 55 53 INTEGER ierr,j 54 character(len=20),parameter :: modname="conf_phys" 56 55 57 56 CHARACTER ch1*12 … … 60 59 ! or shared between dynamics and physics. 61 60 ecritphy=240 ! default value 62 call getin ("ecritphy",ecritphy) ! frequency of outputs in physics,61 call getin_p("ecritphy",ecritphy) ! frequency of outputs in physics, 63 62 ! in dynamical steps 64 63 day_step=960 ! default value 65 call getin ("day_step",day_step) ! number of dynamical steps per day64 call getin_p("day_step",day_step) ! number of dynamical steps per day 66 65 iphysiq=20 ! default value 67 call getin ("iphysiq",iphysiq) ! call physics every iphysiq dyn step66 call getin_p("iphysiq",iphysiq) ! call physics every iphysiq dyn step 68 67 ecritstart=0 ! default value 69 call getin ("ecritstart",ecritstart) ! write a restart every ecristart steps68 call getin_p("ecritstart",ecritstart) ! write a restart every ecristart steps 70 69 #endif 71 70 … … 88 87 write(*,*) "Directory where external input files are:" 89 88 ! default path is set in datafile_mod 90 call getin ("datadir",datadir)89 call getin_p("datadir",datadir) 91 90 write(*,*) " datadir = ",trim(datadir) 92 91 … … 98 97 write(*,*) "Run with or without tracer transport ?" 99 98 tracer=.false. ! default value 100 call getin ("tracer",tracer)99 call getin_p("tracer",tracer) 101 100 write(*,*) " tracer = ",tracer 102 101 … … 104 103 write(*,*) "(if diurnal=False, diurnal averaged solar heating)" 105 104 diurnal=.true. ! default value 106 call getin ("diurnal",diurnal)105 call getin_p("diurnal",diurnal) 107 106 write(*,*) " diurnal = ",diurnal 108 107 … … 111 110 & "set in 'start'" 112 111 season=.true. ! default value 113 call getin ("season",season)112 call getin_p("season",season) 114 113 write(*,*) " season = ",season 115 114 116 115 write(*,*) "Write some extra output to the screen ?" 117 116 lwrite=.false. ! default value 118 call getin ("lwrite",lwrite)117 call getin_p("lwrite",lwrite) 119 118 write(*,*) " lwrite = ",lwrite 120 119 … … 125 124 callstats=.true. ! default value 126 125 #endif 127 call getin ("callstats",callstats)126 call getin_p("callstats",callstats) 128 127 write(*,*) " callstats = ",callstats 129 128 … … 131 130 & "Climate Database?" 132 131 calleofdump=.false. ! default value 133 call getin ("calleofdump",calleofdump)132 call getin_p("calleofdump",calleofdump) 134 133 write(*,*) " calleofdump = ",calleofdump 135 134 … … 139 138 & "=24,25 ... 30 :Mars Year 24, ... or 30 from TES assimilation" 140 139 iaervar=3 ! default value 141 call getin ("iaervar",iaervar)140 call getin_p("iaervar",iaervar) 142 141 write(*,*) " iaervar = ",iaervar 143 142 … … 145 144 & "(matters only if iaervar=1)" 146 145 ! NB: default value of tauvis is set/read in startfi.nc file 147 call getin ("tauvis",tauvis)146 call getin_p("tauvis",tauvis) 148 147 write(*,*) " tauvis = ",tauvis 149 148 … … 152 151 & " =2 Viking scenario; =3 MGS scenario)" 153 152 iddist=3 ! default value 154 call getin ("iddist",iddist)153 call getin_p("iddist",iddist) 155 154 write(*,*) " iddist = ",iddist 156 155 157 156 write(*,*) "Dust top altitude (km). (Matters only if iddist=1)" 158 157 topdustref= 90.0 ! default value 159 call getin ("topdustref",topdustref)158 call getin_p("topdustref",topdustref) 160 159 write(*,*) " topdustref = ",topdustref 161 160 162 161 write(*,*) "Prescribed surface thermal flux (H/(rho*cp),K m/s)" 163 162 tke_heat_flux=0. ! default value 164 call getin ("tke_heat_flux",tke_heat_flux)163 call getin_p("tke_heat_flux",tke_heat_flux) 165 164 write(*,*) " tke_heat_flux = ",tke_heat_flux 166 165 write(*,*) " 0 means the usual schemes are computing" … … 168 167 write(*,*) "call radiative transfer ?" 169 168 callrad=.true. ! default value 170 call getin ("callrad",callrad)169 call getin_p("callrad",callrad) 171 170 write(*,*) " callrad = ",callrad 172 171 … … 178 177 callslope=.false. ! default value (not supported yet) 179 178 #endif 180 call getin ("callslope",callslope)179 call getin_p("callslope",callslope) 181 180 write(*,*) " callslope = ",callslope 182 181 … … 184 183 & "(matters only if callrad=T)" 185 184 callnlte=.false. ! default value 186 call getin ("callnlte",callnlte)185 call getin_p("callnlte",callnlte) 187 186 write(*,*) " callnlte = ",callnlte 188 187 … … 193 192 write(*,*) "2 -> new model" 194 193 write(*,*) "(matters only if callnlte=T)" 195 call getin ("nltemodel",nltemodel)194 call getin_p("nltemodel",nltemodel) 196 195 write(*,*) " nltemodel = ",nltemodel 197 196 … … 199 198 & "(matters only if callrad=T)" 200 199 callnirco2=.false. ! default value 201 call getin ("callnirco2",callnirco2)200 call getin_p("callnirco2",callnirco2) 202 201 write(*,*) " callnirco2 = ",callnirco2 203 202 … … 211 210 nircorr=0 !default value 212 211 #endif 213 call getin ("nircorr",nircorr)212 call getin_p("nircorr",nircorr) 214 213 write(*,*) " nircorr = ",nircorr 215 214 216 215 write(*,*) "call turbulent vertical diffusion ?" 217 216 calldifv=.true. ! default value 218 call getin ("calldifv",calldifv)217 call getin_p("calldifv",calldifv) 219 218 write(*,*) " calldifv = ",calldifv 220 219 221 220 write(*,*) "call thermals ?" 222 221 calltherm=.false. ! default value 223 call getin ("calltherm",calltherm)222 call getin_p("calltherm",calltherm) 224 223 write(*,*) " calltherm = ",calltherm 225 224 226 225 write(*,*) "call convective adjustment ?" 227 226 calladj=.true. ! default value 228 call getin ("calladj",calladj)227 call getin_p("calladj",calladj) 229 228 write(*,*) " calladj = ",calladj 230 229 … … 238 237 write(*,*) "used latest version of yamada scheme?" 239 238 callyamada4=.true. ! default value 240 call getin ("callyamada4",callyamada4)239 call getin_p("callyamada4",callyamada4) 241 240 write(*,*) " callyamada4 = ",callyamada4 242 241 … … 250 249 write(*,*) "call Richardson-based surface layer ?" 251 250 callrichsl=.false. ! default value 252 call getin ("callrichsl",callrichsl)251 call getin_p("callrichsl",callrichsl) 253 252 write(*,*) " callrichsl = ",callrichsl 254 253 … … 268 267 print*,'If you want to use the Ri. surface-layer, either 269 268 & activate thermals OR de-activate the convective adjustment.' 270 stop 269 call abort_physic(modname, 270 & "Richardson layer must be used with thermals",1) 271 271 endif 272 272 273 273 write(*,*) "call CO2 condensation ?" 274 274 callcond=.true. ! default value 275 call getin ("callcond",callcond)275 call getin_p("callcond",callcond) 276 276 write(*,*) " callcond = ",callcond 277 277 278 278 write(*,*)"call thermal conduction in the soil ?" 279 279 callsoil=.true. ! default value 280 call getin ("callsoil",callsoil)280 call getin_p("callsoil",callsoil) 281 281 write(*,*) " callsoil = ",callsoil 282 282 … … 285 285 & "scheme ?" 286 286 calllott=.true. ! default value 287 call getin ("calllott",calllott)287 call getin_p("calllott",calllott) 288 288 write(*,*)" calllott = ",calllott 289 289 … … 291 291 & "scheme ?" 292 292 calllott_nonoro=.false. ! default value 293 call getin ("calllott_nonoro",calllott_nonoro)293 call getin_p("calllott_nonoro",calllott_nonoro) 294 294 write(*,*)" calllott_nonoro = ",calllott_nonoro 295 295 … … 297 297 write(*,*)"call rocket dust storm parametrization" 298 298 rdstorm=.false. ! default value 299 call getin ("rdstorm",rdstorm)299 call getin_p("rdstorm",rdstorm) 300 300 write(*,*)" rdstorm = ",rdstorm 301 301 ! rocket dust storm detrainment coefficient 302 302 coeff_detrainment=0. ! default value 303 call getin ("coeff_detrainment",coeff_detrainment)303 call getin_p("coeff_detrainment",coeff_detrainment) 304 304 write(*,*)" coeff_detrainment = ",coeff_detrainment 305 305 … … 307 307 write(*,*)"call slope wind lifting parametrization" 308 308 slpwind=.false. ! default value 309 call getin ("slpwind",slpwind)309 call getin_p("slpwind",slpwind) 310 310 write(*,*)" slpwind = ",slpwind 311 311 … … 314 314 & " /condensation of ground water ice" 315 315 latentheat_surfwater=.true. ! default value 316 call getin ("latentheat_surfwater",latentheat_surfwater)316 call getin_p("latentheat_surfwater",latentheat_surfwater) 317 317 write(*,*)" latentheat_surfwater = ",latentheat_surfwater 318 318 … … 320 320 & " physical timestep" 321 321 iradia=1 ! default value 322 call getin ("iradia",iradia)322 call getin_p("iradia",iradia) 323 323 write(*,*)" iradia = ",iradia 324 324 … … 327 327 & "(for diagnostics only)" 328 328 callg2d=.false. ! default value 329 call getin ("callg2d",callg2d)329 call getin_p("callg2d",callg2d) 330 330 write(*,*)" callg2d = ",callg2d 331 331 332 332 write(*,*)"Rayleigh scattering : (should be .false. for now)" 333 333 rayleigh=.false. 334 call getin ("rayleigh",rayleigh)334 call getin_p("rayleigh",rayleigh) 335 335 write(*,*)" rayleigh = ",rayleigh 336 336 … … 341 341 write(*,*)"Transported dust ? (if >0, use 'dustbin' dust bins)" 342 342 dustbin=0 ! default value 343 call getin ("dustbin",dustbin)343 call getin_p("dustbin",dustbin) 344 344 write(*,*)" dustbin = ",dustbin 345 345 ! active 346 346 write(*,*)"Radiatively active dust ? (matters if dustbin>0)" 347 347 active=.false. ! default value 348 call getin ("active",active)348 call getin_p("active",active) 349 349 write(*,*)" active = ",active 350 350 … … 354 354 if (active.and.(dustbin.lt.1)) then 355 355 print*,'if active is used, then dustbin should > 0' 356 stop 356 call abort_physic(modname, 357 & "active option requires dustbin < 0",1) 357 358 endif 358 359 ! doubleq … … 360 361 & " dust size ?" 361 362 doubleq=.false. ! default value 362 call getin ("doubleq",doubleq)363 call getin_p("doubleq",doubleq) 363 364 write(*,*)" doubleq = ",doubleq 364 365 ! submicron 365 366 submicron=.false. ! default value 366 call getin ("submicron",submicron)367 call getin_p("submicron",submicron) 367 368 write(*,*)" submicron = ",submicron 368 369 … … 372 373 if (doubleq.and.(dustbin.ne.2)) then 373 374 print*,'if doubleq is used, then dustbin should be 2' 374 stop 375 call abort_physic(modname, 376 & "doubleq option requires dustbin = 2",1) 375 377 endif 376 378 if (doubleq.and.submicron.and.(nq.LT.3)) then … … 378 380 print*,' then the number of tracers has to be' 379 381 print*,' larger than 3.' 380 stop 382 call abort_physic(modname, 383 & "submicron option requires dustbin > 2",1) 381 384 endif 382 385 … … 384 387 write(*,*)"dust lifted by GCM surface winds ?" 385 388 lifting=.false. ! default value 386 call getin ("lifting",lifting)389 call getin_p("lifting",lifting) 387 390 write(*,*)" lifting = ",lifting 388 391 … … 392 395 if (lifting.and.(dustbin.lt.1)) then 393 396 print*,'if lifting is used, then dustbin should > 0' 394 stop 397 call abort_physic(modname, 398 & "lifting option requires dustbin > 0",1) 395 399 endif 396 400 397 401 ! dust injection scheme 398 402 dustinjection=0 ! default: no injection scheme 399 call getin ("dustinjection",dustinjection)403 call getin_p("dustinjection",dustinjection) 400 404 write(*,*)" dustinjection = ",dustinjection 401 405 ! dust injection scheme coefficient 402 406 coeff_injection=1. ! default value 403 call getin ("coeff_injection",coeff_injection)407 call getin_p("coeff_injection",coeff_injection) 404 408 write(*,*)" coeff_in,jection = ",coeff_injection 405 409 ! timing for dust injection 406 410 ti_injection=10. ! default value 407 411 tf_injection=12. ! default value 408 call getin ("ti_injection",ti_injection)412 call getin_p("ti_injection",ti_injection) 409 413 write(*,*)" ti_injection = ",ti_injection 410 call getin ("tf_injection",tf_injection)414 call getin_p("tf_injection",tf_injection) 411 415 write(*,*)" tf_injection = ",tf_injection 412 416 … … 415 419 write(*,*)"dust lifted by GCM surface winds ?" 416 420 freedust=.false. ! default value 417 call getin ("freedust",freedust)421 call getin_p("freedust",freedust) 418 422 write(*,*)" freedust = ",freedust 419 423 if (freedust.and..not.doubleq) then 420 424 print*,'freedust should be used with doubleq !' 421 stop 425 call abort_physic(modname, 426 & "freedust option requires doubleq",1) 422 427 endif 423 428 #ifndef MESOSCALE … … 428 433 print*,'if freedust is used and dustinjection = 0, 429 434 & then lifting should not be used' 430 stop 435 call abort_physic(modname, 436 & "freedust option with dustinjection = 0"// 437 & " requires lifting",1) 431 438 endif 432 439 endif … … 435 442 if(.not.lifting) then 436 443 print*,"if dustinjection=1, then lifting should be true" 437 stop 444 call abort_physic(modname, 445 & "dustinjection=1 requires lifting",1) 438 446 endif 439 447 if(.not.freedust) then 440 448 print*,"if dustinjection=1, then freedust should be true" 441 stop 449 call abort_physic(modname, 450 & "dustinjection=1 requires freedust",1) 442 451 endif 443 452 endif … … 448 457 print*,'if rdstorm or slpwind is used, then doubleq 449 458 & should be used !' 450 stop 459 call abort_physic(modname, 460 & "rdstorm or slpwind requires doubleq",1) 451 461 endif 452 462 if ((rdstorm.or.slpwind).and..not.active) then 453 463 print*,'if rdstorm or slpwind is used, then active 454 464 & should be used !' 455 stop 465 call abort_physic(modname, 466 & "rdstorm or slpwind requires activ",1) 456 467 endif 457 468 if (rdstorm.and..not.lifting) then 458 469 print*,'if rdstorm is used, then lifting 459 470 & should be used !' 460 stop 471 call abort_physic(modname, 472 & "rdstorm requires lifting",1) 461 473 endif 462 474 if ((rdstorm.or.slpwind).and..not.freedust) then 463 475 print*,'if rdstorm or slpwind is used, then freedust 464 476 & should be used !' 465 stop 477 call abort_physic(modname, 478 & "rdstorm or slpwind requires freedust",1) 466 479 endif 467 480 if (rdstorm.and.(dustinjection.eq.0)) then 468 481 print*,'if rdstorm is used, then dustinjection 469 482 & should be used !' 470 stop 483 call abort_physic(modname, 484 & "rdstorm requires dustinjection",1) 471 485 endif 472 486 ! Dust IR opacity … … 483 497 ! 484 498 dustiropacity="tes" !default value - is expected to shift to mcs one day 485 call getin ("dustiropacity",dustiropacity)499 call getin_p("dustiropacity",dustiropacity) 486 500 write(*,*)" dustiropacity = ",trim(dustiropacity) 487 501 select case (trim(dustiropacity)) … … 493 507 write(*,*) trim(dustiropacity), 494 508 & " is not a valid option for dustiropacity" 495 stop 509 call abort_physic(modname, 510 & "invalid dustiropacity option value",1) 496 511 end select 497 512 … … 499 514 write(*,*)" dust lifted by dust devils ?" 500 515 callddevil=.false. !default value 501 call getin ("callddevil",callddevil)516 call getin_p("callddevil",callddevil) 502 517 write(*,*)" callddevil = ",callddevil 503 518 … … 507 522 if (callddevil.and.(dustbin.lt.1)) then 508 523 print*,'if dustdevil is used, then dustbin should > 0' 509 stop 524 call abort_physic(modname, 525 & "callddevil requires dustbin > 0",1) 510 526 endif 511 527 ! sedimentation 512 528 write(*,*) "Gravitationnal sedimentation ?" 513 529 sedimentation=.true. ! default value 514 call getin ("sedimentation",sedimentation)530 call getin_p("sedimentation",sedimentation) 515 531 write(*,*) " sedimentation = ",sedimentation 516 532 ! activice … … 518 534 & "water ice ?" 519 535 activice=.false. ! default value 520 call getin ("activice",activice)536 call getin_p("activice",activice) 521 537 write(*,*) " activice = ",activice 522 538 ! water 523 539 write(*,*) "Compute water cycle ?" 524 540 water=.false. ! default value 525 call getin ("water",water)541 call getin_p("water",water) 526 542 write(*,*) " water = ",water 527 543 … … 529 545 write(*,*) "Fixed cloud fraction?" 530 546 CLFfixval=1.0 ! default value 531 call getin ("CLFfixval",CLFfixval)547 call getin_p("CLFfixval",CLFfixval) 532 548 write(*,*) "CLFfixval=",CLFfixval 533 549 ! sub-grid cloud fraction: varying 534 550 write(*,*) "Use partial nebulosity?" 535 551 CLFvarying=.false. ! default value 536 call getin ("CLFvarying",CLFvarying)552 call getin_p("CLFvarying",CLFvarying) 537 553 write(*,*)"CLFvarying=",CLFvarying 538 554 … … 540 556 write(*,*) "Compute CO2 clouds (implies microphysical scheme)?" 541 557 co2clouds=.false. ! default value 542 call getin ("co2clouds",co2clouds)558 call getin_p("co2clouds",co2clouds) 543 559 write(*,*) " co2clouds = ",co2clouds 544 560 !Can water ice particles serve as CCN for CO2clouds 545 561 write(*,*) "Use water ice as CO2 clouds CCN ?" 546 562 co2useh2o=.false. ! default value 547 call getin ("co2useh2o",co2useh2o)563 call getin_p("co2useh2o",co2useh2o) 548 564 write(*,*) " co2useh2o = ",co2useh2o 549 565 !Do we allow a supply of meteoritic paricles to serve as CO2 ice CCN? 550 566 write(*,*) "Supply meteoritic particle for CO2 clouds ?" 551 567 meteo_flux=.false. !Default value 552 call getin ("meteo_flux",meteo_flux)568 call getin_p("meteo_flux",meteo_flux) 553 569 write(*,*) " meteo_flux = ",meteo_flux 554 570 !Do we allow a sub-grid temperature distribution for the CO2 microphysics 555 571 write(*,*) "sub-grid temperature distribution for CO2 clouds?" 556 572 CLFvaryingCO2=.false. !Default value 557 call getin ("CLFvaryingCO2",CLFvaryingCO2)573 call getin_p("CLFvaryingCO2",CLFvaryingCO2) 558 574 write(*,*) " CLFvaryingCO2 = ",CLFvaryingCO2 559 575 !Amplitude of the sub-grid temperature distribution for the CO2 microphysics 560 576 write(*,*) "sub-grid temperature amplitude for CO2 clouds?" 561 577 spantCO2=0 !Default value 562 call getin ("spantCO2",spantCO2)578 call getin_p("spantCO2",spantCO2) 563 579 write(*,*) " spantCO2 = ",spantCO2 564 580 !Do you want to filter the sub-grid T distribution by a Saturation index? 565 581 write(*,*) "filter sub-grid temperature by Saturation index?" 566 582 satindexco2=.true. 567 call getin ("satindexco2",satindexco2)583 call getin_p("satindexco2",satindexco2) 568 584 write(*,*) " satindexco2 = ",satindexco2 569 585 … … 572 588 write(*,*) "Activate the thermal inertia feedback ?" 573 589 tifeedback=.false. ! default value 574 call getin ("tifeedback",tifeedback)590 call getin_p("tifeedback",tifeedback) 575 591 write(*,*) " tifeedback = ",tifeedback 576 592 … … 580 596 print*,'if tifeedback is used,' 581 597 print*,'water should be used too' 582 stop 598 call abort_physic(modname, 599 & "tifeedback requires water",1) 583 600 endif 584 601 … … 586 603 print*,'if tifeedback is used,' 587 604 print*,'callsoil should be used too' 588 stop 605 call abort_physic(modname, 606 & "tifeedback requires callsoil",1) 589 607 endif 590 608 591 609 if (activice.and..not.water) then 592 610 print*,'if activice is used, water should be used too' 593 stop 611 call abort_physic(modname, 612 & "activeice requires water",1) 594 613 endif 595 614 596 615 if (water.and..not.tracer) then 597 616 print*,'if water is used, tracer should be used too' 598 stop 617 call abort_physic(modname, 618 & "water requires tracer",1) 599 619 endif 600 620 … … 602 622 write(*,*) "Sed effective variance for water ice clouds ?" 603 623 nuice_sed=0.45 604 call getin ("nuice_sed",nuice_sed)624 call getin_p("nuice_sed",nuice_sed) 605 625 write(*,*) "water_param nueff Sedimentation:", nuice_sed 606 626 607 627 write(*,*) "Sed effective variance for CO2 clouds ?" 608 628 nuiceco2_sed=0.45 609 call getin ("nuiceco2_sed",nuiceco2_sed)629 call getin_p("nuiceco2_sed",nuiceco2_sed) 610 630 write(*,*) "CO2 nueff Sedimentation:", nuiceco2_sed 611 631 612 632 write(*,*) "REF effective variance for CO2 clouds ?" 613 633 nuiceco2_ref=0.45 614 call getin ("nuiceco2_ref",nuiceco2_ref)634 call getin_p("nuiceco2_ref",nuiceco2_ref) 615 635 write(*,*) "CO2 nueff Sedimentation:", nuiceco2_ref 616 636 617 637 write(*,*) "REF effective variance for water clouds ?" 618 638 nuice_ref=0.45 619 call getin ("nuice_ref",nuice_ref)639 call getin_p("nuice_ref",nuice_ref) 620 640 write(*,*) "CO2 nueff Sedimentation:", nuice_ref 621 641 … … 624 644 write(*,*) "water param CCN reduc. factor ?" 625 645 ccn_factor = 4.5 626 call getin ("ccn_factor",ccn_factor)646 call getin_p("ccn_factor",ccn_factor) 627 647 write(*,*)" ccn_factor = ",ccn_factor 628 648 write(*,*)"Careful: only used when microphys=F, otherwise" … … 632 652 write(*,*)"Microphysical scheme for water-ice clouds?" 633 653 microphys=.false. ! default value 634 call getin ("microphys",microphys)654 call getin_p("microphys",microphys) 635 655 write(*,*)" microphys = ",microphys 636 656 … … 638 658 write(*,*)"Allow super-saturation of water vapor?" 639 659 supersat=.true. ! default value 640 call getin ("supersat",supersat)660 call getin_p("supersat",supersat) 641 661 write(*,*)"supersat = ",supersat 642 662 … … 644 664 write(*,*) "water contact parameter ?" 645 665 mteta = 0.95 646 call getin ("mteta",mteta)666 call getin_p("mteta",mteta) 647 667 write(*,*) "mteta = ", mteta 648 668 … … 650 670 write(*,*)"Dust scavenging by H2O/CO2 snowfall ?" 651 671 scavenging=.false. ! default value 652 call getin ("scavenging",scavenging)672 call getin_p("scavenging",scavenging) 653 673 write(*,*)" scavenging = ",scavenging 654 674 … … 661 681 print*,'if microphys is used, then doubleq,' 662 682 print*,'and water must be used!' 663 stop 683 call abort_physic(modname, 684 & "microphys requires water and doubleq",1) 664 685 endif 665 686 if (microphys.and..not.scavenging) then … … 675 696 print*,'if scavenging is used, then microphys' 676 697 print*,'must be used!' 677 stop 698 call abort_physic(modname, 699 & "scavenging requires microphys",1) 678 700 endif 679 701 … … 682 704 write(*,*)"Dust scavenging by instantaneous CO2 snowfall ?" 683 705 scavco2cond=.false. ! default value 684 call getin ("scavco2cond",scavco2cond)706 call getin_p("scavco2cond",scavco2cond) 685 707 write(*,*)" scavco2cond = ",scavco2cond 686 708 ! Test of incompatibility: … … 688 710 if (scavco2cond.and.(dustbin.lt.1))then 689 711 print*,'if scavco2cond is used, then dustbin should be > 0' 690 stop 712 call abort_physic(modname, 713 & "scavco2cond requires dustbin > 0",1) 691 714 endif 692 715 ! if co2clouds is used, then there is no need for scavco2cond … … 698 721 print*,'----------------WARNING-----------------' 699 722 print*,'' 700 stop 723 call abort_physic(modname, 724 & "incompatible co2cloud and scavco2cond options",1) 701 725 endif 702 726 … … 708 732 & "and South pole is a cold trap)" 709 733 caps=.true. ! default value 710 call getin ("caps",caps)734 call getin_p("caps",caps) 711 735 write(*,*) " caps = ",caps 712 736 … … 714 738 write(*,*) "water ice albedo ?" 715 739 albedo_h2o_ice=0.45 716 call getin ("albedo_h2o_ice",albedo_h2o_ice)740 call getin_p("albedo_h2o_ice",albedo_h2o_ice) 717 741 write(*,*) " albedo_h2o_ice = ",albedo_h2o_ice 718 742 ! inert_h2o_ice 719 743 write(*,*) "water ice thermal inertia ?" 720 744 inert_h2o_ice=2400 ! (J.m^-2.K^-1.s^-1/2) 721 call getin ("inert_h2o_ice",inert_h2o_ice)745 call getin_p("inert_h2o_ice",inert_h2o_ice) 722 746 write(*,*) " inert_h2o_ice = ",inert_h2o_ice 723 747 ! frost_albedo_threshold 724 748 write(*,*) "frost thickness threshold for albedo ?" 725 749 frost_albedo_threshold=0.005 ! 5.4 mic (i.e 0.005 kg.m-2) 726 call getin ("frost_albedo_threshold",750 call getin_p("frost_albedo_threshold", 727 751 & frost_albedo_threshold) 728 752 write(*,*) " frost_albedo_threshold = ", … … 732 756 write(*,*) "Titus crocus line ?" 733 757 tituscap=.false. ! default value 734 call getin ("tituscap",tituscap)758 call getin_p("tituscap",tituscap) 735 759 write(*,*) "tituscap",tituscap 736 760 … … 738 762 write(*,*) "photochemistry: include chemical species" 739 763 photochem=.false. ! default value 740 call getin ("photochem",photochem)764 call getin_p("photochem",photochem) 741 765 write(*,*) " photochem = ",photochem 742 766 … … 744 768 & "every ichemistry physics step (default: ichemistry=1)" 745 769 ichemistry=1 746 call getin ("ichemistry",ichemistry)770 call getin_p("ichemistry",ichemistry) 747 771 write(*,*) " ichemistry = ",ichemistry 748 772 … … 751 775 write(*,*) "how many scatterers?" 752 776 naerkind=1 ! default value 753 call getin ("naerkind",naerkind)777 call getin_p("naerkind",naerkind) 754 778 write(*,*)" naerkind = ",naerkind 755 779 … … 761 785 WRITE(*,*) 'to TRUE, and "naerkind" must be at least' 762 786 WRITE(*,*) 'equal to 2.' 763 CALL ABORT 787 call abort_physic(modname, 788 & "radiatively active dust and water"// 789 & " require naerkind > 1",1) 764 790 ENDIF 765 791 … … 807 833 write(*,*) "call thermosphere ?" 808 834 callthermos=.false. ! default value 809 call getin ("callthermos",callthermos)835 call getin_p("callthermos",callthermos) 810 836 write(*,*) " callthermos = ",callthermos 811 837 … … 814 840 & "(only if water=.false.)" 815 841 thermoswater=.false. ! default value 816 call getin ("thermoswater",thermoswater)842 call getin_p("thermoswater",thermoswater) 817 843 write(*,*) " thermoswater = ",thermoswater 818 844 … … 820 846 & " (only if callthermos=.true.)" 821 847 callconduct=.false. ! default value 822 call getin ("callconduct",callconduct)848 call getin_p("callconduct",callconduct) 823 849 write(*,*) " callconduct = ",callconduct 824 850 … … 826 852 & " (only if callthermos=.true.)" 827 853 calleuv=.false. ! default value 828 call getin ("calleuv",calleuv)854 call getin_p("calleuv",calleuv) 829 855 write(*,*) " calleuv = ",calleuv 830 856 … … 832 858 & " (only if callthermos=.true.)" 833 859 callmolvis=.false. ! default value 834 call getin ("callmolvis",callmolvis)860 call getin_p("callmolvis",callmolvis) 835 861 write(*,*) " callmolvis = ",callmolvis 836 862 … … 838 864 & " (only if callthermos=.true.)" 839 865 callmoldiff=.false. ! default value 840 call getin ("callmoldiff",callmoldiff)866 call getin_p("callmoldiff",callmoldiff) 841 867 write(*,*) " callmoldiff = ",callmoldiff 842 868 … … 845 871 & " (only if callthermos=.true.)" 846 872 thermochem=.false. ! default value 847 call getin ("thermochem",thermochem)873 call getin_p("thermochem",thermochem) 848 874 write(*,*) " thermochem = ",thermochem 849 875 … … 852 878 & "1-> daily evolution of E10.7 (for given solvaryear)" 853 879 solvarmod=1 854 call getin ("solvarmod",solvarmod)880 call getin_p("solvarmod",solvarmod) 855 881 write(*,*) " solvarmod = ",solvarmod 856 882 … … 858 884 write(*,*) " (min=80 , ave=140, max=320)" 859 885 fixed_euv_value=140 ! default value 860 call getin ("fixed_euv_value",fixed_euv_value)886 call getin_p("fixed_euv_value",fixed_euv_value) 861 887 write(*,*) " fixed_euv_value = ",fixed_euv_value 862 888 … … 864 890 write(*,*) "Only if solvarmod=1" 865 891 solvaryear=24 866 call getin ("solvaryear",solvaryear)892 call getin_p("solvaryear",solvaryear) 867 893 write(*,*) " solvaryear = ",solvaryear 868 894 … … 871 897 & "lower values may be used to compensate low 15 um cooling" 872 898 euveff=0.21 !default value 873 call getin ("euveff",euveff)899 call getin_p("euveff",euveff) 874 900 write(*,*) " euveff = ", euveff 875 901 … … 878 904 if (thermoswater) then 879 905 print*,'if thermoswater is set, callthermos must be true' 880 stop 906 call abort_physic(modname, 907 & "thermoswater requires callthermos",1) 881 908 endif 882 909 if (callconduct) then 883 910 print*,'if callconduct is set, callthermos must be true' 884 stop 911 call abort_physic(modname, 912 & "callconduct requires callthermos",1) 885 913 endif 886 914 if (calleuv) then 887 915 print*,'if calleuv is set, callthermos must be true' 888 stop 916 call abort_physic(modname, 917 & "calleuv requires callthermos",1) 889 918 endif 890 919 if (callmolvis) then 891 920 print*,'if callmolvis is set, callthermos must be true' 892 stop 921 call abort_physic(modname, 922 & "callmolvis requires callthermos",1) 893 923 endif 894 924 if (callmoldiff) then 895 925 print*,'if callmoldiff is set, callthermos must be true' 896 stop 926 call abort_physic(modname, 927 & "callmoldiff requires callthermos",1) 897 928 endif 898 929 if (thermochem) then 899 930 print*,'if thermochem is set, callthermos must be true' 900 stop 931 call abort_physic(modname, 932 & "thermochem requires callthermos",1) 901 933 endif 902 934 endif … … 907 939 if (photochem.and..not.water) then 908 940 print*,'if photochem is used, water should be used too' 909 stop 941 call abort_physic(modname, 942 & "photochem requires water",1) 910 943 endif 911 944 … … 917 950 print*,'if callthermos is used, water or thermoswater 918 951 & should be used too' 919 stop 952 call abort_physic(modname, 953 & "callthermos requires water or thermoswater",1) 920 954 endif 921 955 endif … … 927 961 write(*,*) 928 962 write(*,*) 'Cannot read file callphys.def. Is it here ?' 929 stop 963 call abort_physic(modname, 964 & "missing callphys.def file",1) 930 965 ENDIF 931 966 -
trunk/LMDZ.MARS/libf/phymars/improvedclouds_mod.F
r2151 r2304 9 9 & pqeff,sum_subpdq,subpdqcloud,subpdtcloud, 10 10 & nq,tauscaling) 11 ! to use 'getin' 12 USE ioipsl_getincom 13 USE updaterad 11 USE updaterad, ONLY: updaterice_micro, updaterccn 14 12 USE watersat_mod, ONLY: watersat 15 13 use tracer_mod, only: rho_ice, nuice_sed, igcm_h2o_vap, … … 18 16 & igcm_ccn_number 19 17 use conc_mod, only: mmean 20 USE comcstfi_h18 use comcstfi_h, only: pi, cpp 21 19 implicit none 22 20
Note: See TracChangeset
for help on using the changeset viewer.