Changeset 3305
- Timestamp:
- Apr 18, 2024, 11:38:40 AM (7 months ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/dyn3d/gcm.F90
r2564 r3305 467 467 ! Physics: 468 468 #ifdef CPP_PHYS 469 CALL iniphysiq( iim,jjm,llm,&470 (jjm-1)*iim+2,comm_lmdz,&471 daysec,day_ini,dtphys/nsplit_phys,&472 rlatu,rlatv,rlonu,rlonv,aire,cu,cv,rad,g,r,cpp, &473 iflag_phys)469 CALL iniphysiq('startfi.nc',iim,jjm,llm, & 470 (jjm-1)*iim+2,comm_lmdz, & 471 daysec,day_ini,dtphys/nsplit_phys, & 472 rlatu,rlatv,rlonu,rlonv,aire,cu,cv,rad,g,r,cpp, & 473 iflag_phys) 474 474 #endif 475 475 ENDIF ! of IF ((iflag_phys==1).or.(iflag_phys>=100)) … … 502 502 t_ops =((1.0*iecri)/day_step) * daysec 503 503 t_wrt = daysec ! iecri * daysec ! write output every t_wrt 504 CALL inithist(day_ref,annee_ref,time_step, & 505 t_ops,t_wrt) 504 CALL inithist(day_ref,annee_ref,time_step,t_ops,t_wrt) 506 505 endif 507 506 … … 510 509 t_ops = iperiod * time_step ! do operations every t_ops 511 510 t_wrt = periodav * daysec ! write output every t_wrt 512 CALL initdynav(day_ref,annee_ref,time_step, & 513 t_ops,t_wrt) 511 CALL initdynav(day_ref,annee_ref,time_step,t_ops,t_wrt) 514 512 END IF 515 513 dtav = iperiod*dtvr/daysec -
trunk/LMDZ.COMMON/libf/dyn3dpar/gcm.F
r2564 r3305 487 487 ! Physics 488 488 #ifdef CPP_PHYS 489 CALL iniphysiq( iim,jjm,llm,489 CALL iniphysiq('startfi.nc',iim,jjm,llm, 490 490 & distrib_phys(mpi_rank),comm_lmdz, 491 491 & daysec,day_ini,dtphys/nsplit_phys, -
trunk/LMDZ.MARS/changelog.txt
r3304 r3305 4611 4611 == 16/04/2024 == CS 4612 4612 Correction of a misspelled stats output variable name. 4613 4614 == 18/04/2024 == JBC 4615 - Addition of the "startfi" file name as an argument for "phys_state_var_init_mod.F90"/"iniphysiq_mod.F90" to be able to initialize correctly the 3D PEM with its dedicated "startfi" file name. 4616 - Small update of xml files for XIOS in the deftank, mainly to make the 3D PEM run with slopes. 4617 - Few cleanings in "phyetat0_mod.F90". -
trunk/LMDZ.MARS/deftank/field_def_physics_mars.xml
r3253 r3305 1292 1292 unit="m^2/s" /> 1293 1293 1294 1295 1294 </field_group> 1296 1295 -
trunk/LMDZ.MARS/deftank/file_def_physics_mars.xml
r3136 r3305 1 1 <!-- =========================================================================================================== --> 2 <!-- file_def_physics_mars.xml -->3 <!-- Definition of output files from Martian physics -->2 <!-- file_def_physics_mars.xml --> 3 <!-- Definition of output files from Martian physics --> 4 4 <!-- =========================================================================================================== --> 5 5 … … 125 125 <!-- FILE 4 :diurnal averages outputs for PEM with sub-slopes; output_freq is every day --> 126 126 <file id="diurnalave_s" 127 name="Xdiurnalave _s"127 name="Xdiurnalave" 128 128 output_freq="1d" 129 129 type="one_file" -
trunk/LMDZ.MARS/deftank/iodef.xml
r2223 r3305 1 1 <?xml version="1.0"?> 2 2 <simulation> 3 3 4 4 <context id="xios"> 5 5 <variable_definition> … … 24 24 </variable_definition> 25 25 </context> 26 27 26 28 27 <context id="LMDZ" src="./context_lmdz_physics.xml"/> 29 28 30 31 29 </simulation> -
trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/iniphysiq_mod.F90
r3094 r3305 3 3 CONTAINS 4 4 5 subroutine iniphysiq( ii,jj,nlayer,&6 nbp, communicator, &7 punjours, pdayref,ptimestep, &5 subroutine iniphysiq(filename,ii,jj,nlayer, & 6 nbp, communicator, & 7 punjours, pdayref,ptimestep, & 8 8 rlatudyn,rlatvdyn,rlonudyn,rlonvdyn, & 9 airedyn,cudyn,cvdyn, &9 airedyn,cudyn,cvdyn, & 10 10 prad,pg,pr,pcpp,iflag_phys) 11 11 12 12 ! Modules from the dynamics: 13 use infotrac, only : nqtot, & ! number of advected tracers14 tname, & ! tracer names15 nqperes, nqfils! MVals: variables isotopes13 use infotrac, only : nqtot, & ! number of advected tracers 14 tname, & ! tracer names 15 nqperes, nqfils ! MVals: variables isotopes 16 16 use temps_mod, only: day_ini, day_end, hour_ini 17 17 … … 23 23 use geometry_mod, only: cell_area, & ! physics grid area (m2) 24 24 longitude, & ! longitudes (rad) 25 latitude ! latitudes (rad)25 latitude ! latitudes (rad) 26 26 use phys_state_var_init_mod, only: phys_state_var_init 27 27 use mod_phys_lmdz_para, only: klon_omp ! number of columns (on local omp grid) … … 32 32 include "iniprint.h" 33 33 34 character(*), intent(in) :: filename ! Name of the "startfi.nc" file 34 35 real,intent(in) :: prad ! radius of the planet (m) 35 36 real,intent(in) :: pg ! gravitational acceleration (m/s2) … … 57 58 ! --> initialize physics distribution, global fields and geometry 58 59 ! (i.e. things in phy_common or dynphy_lonlat) 59 CALL inigeomphy(ii,jj,nlayer, &60 nbp, communicator, &61 rlatudyn,rlatvdyn, &62 rlonudyn,rlonvdyn, &63 airedyn,cudyn,cvdyn)60 CALL inigeomphy(ii,jj,nlayer, & 61 nbp, communicator, & 62 rlatudyn,rlatvdyn, & 63 rlonudyn,rlonvdyn, & 64 airedyn,cudyn,cvdyn) 64 65 65 66 ! the distinct part for all planetary physics (ie. things in phymars) … … 71 72 !$OMP PARALLEL COPYIN(day_ini,day_end,hour_ini) 72 73 73 call phys_state_var_init( klon_omp,nlayer,nqtot,tname, &74 day_ini,day_end,hour_ini, &75 punjours,ptimestep, &76 prad,pg,pr,pcpp, &74 call phys_state_var_init(filename,klon_omp,nlayer,nqtot,tname, & 75 day_ini,day_end,hour_ini, & 76 punjours,ptimestep, & 77 prad,pg,pr,pcpp, & 77 78 nqperes,nqfils) ! MVals: variables isotopes 78 79 call ini_fillgeom(klon_omp,latitude,longitude,cell_area) -
trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/newstart.F
r3203 r3305 391 391 392 392 ! Initialize the physics 393 CALL iniphysiq( iim,jjm,llm,393 CALL iniphysiq('startfi.nc',iim,jjm,llm, 394 394 & (jjm-1)*iim+2,comm_lmdz, 395 395 & daysec,day_ini,dtphys, 396 396 & rlatu,rlatv,rlonu,rlonv, 397 & aire,cu,cv,rad,g,r,cpp, 398 & 1) 397 & aire,cu,cv,rad,g,r,cpp,1) 399 398 400 399 c======================================================================= -
trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/nogcm.F90
r3217 r3305 458 458 ! Physics: 459 459 #ifdef CPP_PHYS 460 CALL iniphysiq( iim,jjm,llm,&461 (jjm-1)*iim+2,comm_lmdz, &462 daysec,day_ini,dtphys/nsplit_phys, &460 CALL iniphysiq('startfi.nc',iim,jjm,llm, & 461 (jjm-1)*iim+2,comm_lmdz, & 462 daysec,day_ini,dtphys/nsplit_phys, & 463 463 rlatu,rlatv,rlonu,rlonv,aire,cu,cv,rad,g,r,cpp, & 464 464 iflag_phys) -
trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/start2archive.F
r3216 r3305 160 160 161 161 ! Initialize the physics 162 CALL iniphysiq(iim,jjm,llm, 162 fichnom = 'startfi.nc' 163 164 CALL iniphysiq(fichnom,iim,jjm,llm, 163 165 & (jjm-1)*iim+2,comm_lmdz, 164 166 & daysec,day_ini,dtphys, 165 167 & rlatu,rlatv,rlonu,rlonv, 166 & aire,cu,cv,rad,g,r,cpp, 167 & 1) 168 169 fichnom = 'startfi.nc' 168 & aire,cu,cv,rad,g,r,cpp,1) 169 170 170 Lmodif=0 171 171 -
trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/start2archive_SSO.F
r3139 r3305 173 173 174 174 ! Initialize the physics 175 CALL iniphysiq(iim,jjm,llm, 175 fichnom = 'startfi.nc' 176 177 CALL iniphysiq(fichnom,iim,jjm,llm, 176 178 & (jjm-1)*iim+2,comm_lmdz, 177 179 & daysec,day_ini,dtphys, 178 180 & rlatu,rlatv,rlonu,rlonv, 179 & aire,cu,cv,rad,g,r,cpp, 180 & 1) 181 182 fichnom = 'startfi.nc' 181 & aire,cu,cv,rad,g,r,cpp,1) 182 183 183 Lmodif=0 184 184 -
trunk/LMDZ.MARS/libf/phymars/phyetat0_mod.F90
r3183 r3305 2 2 3 3 implicit none 4 real,save :: tab_cntrl_mod(100) 4 5 real, save :: tab_cntrl_mod(100) 5 6 6 7 !$OMP THREADPRIVATE(tab_cntrl_mod) 7 8 9 !====================================================================== 8 10 contains 9 10 subroutine phyetat0 (fichnom,tab0,Lmodif,nsoil,ngrid,nlay,nq,nqsoil, & 11 day_ini,time0,tsurf,tsoil,albedo,emis,q2,qsurf,qsoil, & 12 tauscaling,totcloudfrac,wstar,watercap,perennial_co2ice, & 13 def_slope,def_slope_mean,subslope_dist) 14 15 use tracer_mod, only: noms ! tracer names 16 use surfdat_h, only: phisfi, albedodat, z0, z0_default,& 17 zmea, zstd, zsig, zgam, zthe, hmons, summit, base,& 18 watercaptag 19 use iostart, only: nid_start, open_startphy, close_startphy, & 20 get_field, get_var, inquire_field, & 21 inquire_dimension, inquire_dimension_length 22 use nonoro_gwd_ran_mod, only: du_nonoro_gwd, dv_nonoro_gwd 23 use nonoro_gwd_mix_mod, only: du_eddymix_gwd, dv_eddymix_gwd, de_eddymix_rto, & 24 df_eddymix_flx !dr_depflux_gwd 25 26 use compute_dtau_mod, only: dtau 27 use dust_rad_adjust_mod, only: dust_rad_adjust_prev,dust_rad_adjust_next 28 use dust_param_mod, only: dustscaling_mode 29 USE ioipsl_getin_p_mod, ONLY : getin_p 30 use comsoil_h, only: flux_geo 31 USE comslope_mod, ONLY: nslope, major_slope 32 USE paleoclimate_mod, ONLY: paleoclimate, h2o_ice_depth, lag_co2_ice, d_coef 33 USE comcstfi_h, only: pi 34 use geometry_mod, only: latitude 35 implicit none 36 37 include "callkeys.h" 11 !====================================================================== 12 13 subroutine phyetat0(fichnom,tab0,Lmodif,nsoil,ngrid,nlay,nq,nqsoil, & 14 day_ini,time0,tsurf,tsoil,albedo,emis,q2,qsurf,qsoil, & 15 tauscaling,totcloudfrac,wstar,watercap,perennial_co2ice, & 16 def_slope,def_slope_mean,subslope_dist) 17 18 use tracer_mod, only: noms ! tracer names 19 use surfdat_h, only: phisfi, albedodat, z0, z0_default, zmea, zstd, & 20 zsig, zgam, zthe, hmons, summit, base, watercaptag 21 use iostart, only: nid_start, open_startphy, close_startphy, & 22 get_field, get_var, inquire_field, & 23 inquire_dimension, inquire_dimension_length 24 use nonoro_gwd_ran_mod, only: du_nonoro_gwd, dv_nonoro_gwd 25 use nonoro_gwd_mix_mod, only: du_eddymix_gwd, dv_eddymix_gwd, de_eddymix_rto, & 26 df_eddymix_flx !dr_depflux_gwd 27 use compute_dtau_mod, only: dtau 28 use dust_rad_adjust_mod, only: dust_rad_adjust_prev,dust_rad_adjust_next 29 use dust_param_mod, only: dustscaling_mode 30 USE ioipsl_getin_p_mod, only: getin_p 31 use comsoil_h, only: flux_geo 32 USE comslope_mod, only: nslope, major_slope 33 USE paleoclimate_mod, only: paleoclimate, h2o_ice_depth, lag_co2_ice, d_coef 34 USE comcstfi_h, only: pi 35 use geometry_mod, only: latitude 36 37 implicit none 38 39 include "callkeys.h" 40 38 41 !====================================================================== 39 42 ! Auteur(s) Z.X. Li (LMD/CNRS) date: 19930818 40 ! Adaptation � Mars : Yann Wanherdrick 43 ! Adaptation � Mars : Yann Wanherdrick 41 44 ! Objet: Lecture de l etat initial pour la physique 42 45 ! Modifs: Aug.2010 EM : use NetCDF90 to load variables (enables using … … 54 57 ! --------- 55 58 ! inputs: 56 ! logical,intent(in) :: startphy_file ! .true. if reading start file 57 character*(*),intent(in) :: fichnom ! "startfi.nc" file 58 integer,intent(in) :: tab0 59 integer,intent(in) :: Lmodif 60 integer,intent(in) :: nsoil ! # of soil layers 61 integer,intent(in) :: ngrid ! # of atmospheric columns 62 integer,intent(in) :: nlay ! # of atmospheric layers 63 integer,intent(in) :: nq 64 integer,intent(in) :: nqsoil ! # of tracers in the soil 65 integer :: day_ini 66 real :: time0 59 character(*), intent(in) :: fichnom ! "startfi.nc" file 60 integer, intent(in) :: tab0 61 integer, intent(in) :: Lmodif 62 integer, intent(in) :: nsoil ! # of soil layers 63 integer, intent(in) :: ngrid ! # of atmospheric columns 64 integer, intent(in) :: nlay ! # of atmospheric layers 65 integer, intent(in) :: nq 66 integer, intent(in) :: nqsoil ! # of tracers in the soil 67 integer, intent(inout) :: day_ini 68 real, intent(inout) :: time0 67 69 68 70 ! outputs: 69 real,intent(out) :: tsurf(ngrid,nslope)! surface temperature70 real,intent(out) :: tsoil(ngrid,nsoil,nslope)! soil temperature71 real,intent(out) :: albedo(ngrid,2,nslope)! surface albedo72 real,intent(out) :: emis(ngrid,nslope)! surface emissivity73 real,intent(out) :: q2(ngrid,nlay+1) ! 74 real,intent(out) :: qsurf(ngrid,nq,nslope)! tracers on surface75 real,intent(out) :: qsoil(ngrid,nsoil,nqsoil,nslope) ! tracers in the subsurface76 real,intent(out) :: tauscaling(ngrid)! dust conversion factor77 real,intent(out) :: totcloudfrac(ngrid)! total cloud fraction78 real,intent(out) :: wstar(ngrid)! Max vertical velocity in thermals (m/s)79 real,intent(out) :: watercap(ngrid,nslope)! h2o_ice_cover80 real,intent(out) :: perennial_co2ice(ngrid,nslope)! perennial co2 ice(kg/m^2)81 real,intent(out) :: def_slope(nslope+1) !boundaries for bining of the slopes82 real,intent(out) :: def_slope_mean(nslope)83 real,intent(out) :: subslope_dist(ngrid,nslope) !undermesh statistics71 real, intent(out) :: tsurf(ngrid,nslope) ! surface temperature 72 real, intent(out) :: tsoil(ngrid,nsoil,nslope) ! soil temperature 73 real, intent(out) :: albedo(ngrid,2,nslope) ! surface albedo 74 real, intent(out) :: emis(ngrid,nslope) ! surface emissivity 75 real, intent(out) :: q2(ngrid,nlay+1) 76 real, intent(out) :: qsurf(ngrid,nq,nslope) ! tracers on surface 77 real, intent(out) :: qsoil(ngrid,nsoil,nqsoil,nslope) ! tracers in the subsurface 78 real, intent(out) :: tauscaling(ngrid) ! dust conversion factor 79 real, intent(out) :: totcloudfrac(ngrid) ! total cloud fraction 80 real, intent(out) :: wstar(ngrid) ! Max vertical velocity in thermals (m/s) 81 real, intent(out) :: watercap(ngrid,nslope) ! h2o_ice_cover 82 real, intent(out) :: perennial_co2ice(ngrid,nslope) ! perennial co2 ice(kg/m^2) 83 real, intent(out) :: def_slope(nslope+1) ! boundaries for bining of the slopes 84 real, intent(out) :: def_slope_mean(nslope) 85 real, intent(out) :: subslope_dist(ngrid,nslope) ! undermesh statistics 84 86 !====================================================================== 85 87 ! Local variables: 86 87 real surffield(ngrid) ! to temporarily store a surface field 88 real xmin,xmax ! to display min and max of a field 89 ! 90 INTEGER ig,iq,lmax,islope 91 INTEGER nid, nvarid 92 INTEGER ierr, i, nsrf 93 ! integer isoil 94 ! INTEGER length 95 ! PARAMETER (length=100) 96 CHARACTER*7 str7 97 CHARACTER*2 str2 98 CHARACTER*1 yes 99 ! 100 REAL p_rad,p_omeg,p_g,p_mugaz,p_daysec 101 INTEGER nqold 88 real :: surffield(ngrid) ! to temporarily store a surface field 89 real :: xmin, xmax ! to display min and max of a field 90 91 integer :: ig, iq, lmax, islope, nid, nvarid, ierr, i, nsrf, nqold 92 ! integer :: isoil 93 ! INTEGER :: length 94 ! PARAMETER (length=100) 95 CHARACTER(7) :: str7 96 CHARACTER(2) :: str2 97 CHARACTER(1) :: yes 98 99 REAL :: p_rad, p_omeg, p_g, p_mugaz, p_daysec 102 100 103 101 ! flag which identifies if 'startfi.nc' file is using old names (qsurf01,...) 104 logical :: oldtracernames=.false. 105 integer :: count 106 character(len=30) :: txt ! to store some text 107 108 ! specific for time 109 REAL,ALLOCATABLE :: time(:) ! times stored in start 110 INTEGER timelen ! number of times stored in the file 111 INTEGER indextime ! index of selected time 112 113 INTEGER :: edges(3),corner(3) 114 LOGICAL :: found 115 116 REAL :: timestart ! to pick which initial state to start from 117 REAL :: surfemis ! constant emissivity when no startfi 118 REAL :: surfalbedo ! constant albedo when no startfi 119 120 REAL :: watercaptag_tmp(ngrid) 102 logical :: oldtracernames = .false. 103 integer :: count 104 character(30) :: txt ! to store some text 105 106 ! specific for time 107 REAL, ALLOCATABLE :: time(:) ! times stored in start 108 INTEGER :: timelen ! number of times stored in the file 109 INTEGER :: indextime ! index of selected time 110 111 INTEGER :: edges(3),corner(3) 112 LOGICAL :: found 113 REAL :: timestart ! to pick which initial state to start from 114 REAL :: surfemis ! constant emissivity when no startfi 115 REAL :: surfalbedo ! constant albedo when no startfi 116 REAL :: watercaptag_tmp(ngrid) 121 117 122 118 ! Sub-grid scale slopes 123 LOGICAL :: startphy_slope !to be retrocompatible and add the nslope dimension 124 REAL, ALLOCATABLE :: default_def_slope(:) 125 REAL :: sum_dist 126 REAL :: current_max !var to find max distrib slope 119 LOGICAL :: startphy_slope ! to be retrocompatible and add the nslope dimension 120 REAL, ALLOCATABLE :: default_def_slope(:) 121 REAL :: sum_dist 122 REAL :: current_max !var to find max distrib slope 123 127 124 ! Variables for CO2 index 128 INTEGER :: igcm_co2_tmp 129 130 CHARACTER(len=5) :: modname="phyetat0" 125 INTEGER :: igcm_co2_tmp 126 127 CHARACTER(5) :: modname="phyetat0" 128 !====================================================================== 131 129 132 130 write(*,*) "phyetat0: startphy_file", startphy_file … … 147 145 if (startphy_file) then 148 146 call get_var("def_slope",def_slope,found) 149 if (.not. found) then 147 if (.not. found) then 150 148 startphy_slope=.false. 151 149 write(*,*)'slope_settings: Problem while reading <def_slope>' … … 166 164 startphy_slope=.true. 167 165 call get_field("subslope_dist",subslope_dist,found,indextime) 168 if (.not. found) then 166 if (.not. found) then 169 167 write(*,*)'slope_settings: Problem while reading <subslope_dist>' 170 168 write(*,*)'We have to abort.' … … 183 181 call abort_physic(modname,"phyetat0: No startfi and nslope!=1",1) 184 182 endif 185 endif 183 endif 186 184 187 185 do islope = 1,nslope 188 186 def_slope_mean(islope) = (def_slope(islope) + def_slope(islope + 1))/2. 189 187 enddo 190 188 191 189 DO ig = 1,ngrid 192 190 sum_dist = 0. … … 255 253 minval(zmea), maxval(zmea) 256 254 257 258 255 ! ZSTD 259 256 if (startphy_file) then … … 269 266 minval(zstd), maxval(zstd) 270 267 271 272 268 ! ZSIG 273 269 if (startphy_file) then … … 283 279 minval(zsig), maxval(zsig) 284 280 285 286 281 ! ZGAM 287 282 if (startphy_file) then … … 296 291 write(*,*) "phyetat0: <ZGAM> range:", & 297 292 minval(zgam), maxval(zgam) 298 299 293 300 294 ! ZTHE … … 335 329 minval(hmons), maxval(hmons) 336 330 337 338 331 ! summit 339 332 if (startphy_file) then … … 355 348 endif ! if (.not.found) 356 349 else 357 summit(:)=0. 350 summit(:)=0. 358 351 endif ! if (startphy_file) 359 352 write(*,*) "phyetat0: <summit> range:", & 360 353 minval(summit), maxval(summit) 361 354 362 363 ! base 355 ! base 364 356 if (startphy_file) then 365 357 call get_field("base",base,found) … … 421 413 PRINT*, time(i) 422 414 ENDDO 423 call abort_physic(modname,"phyetat0: Time error",1) 415 call abort_physic(modname,"phyetat0: Time error",1) 424 416 ENDIF 425 417 ENDIF ! of IF (timestart .lt. 0) … … 428 420 time0 = time(indextime) + time0 429 421 day_ini = day_ini + INT(time0) 430 time0 = time0 - INT(time0) 422 time0 = time0 - INT(time0) 431 423 PRINT*, "phyetat0: Selected time ",time(indextime), & 432 424 " at index ",indextime … … 489 481 minval(dtau), maxval(dtau) 490 482 491 492 483 ! Sub-grid cloud fraction 493 484 if (startphy_file) then … … 503 494 minval(totcloudfrac), maxval(totcloudfrac) 504 495 505 506 496 ! Max vertical velocity in thermals 507 497 if (startphy_file) then … … 516 506 write(*,*) "phyetat0: Max vertical velocity in thermals <wstar> range:", & 517 507 minval(wstar),maxval(wstar) 518 519 508 520 509 ! Surface temperature : … … 581 570 minval(z0), maxval(z0) 582 571 583 584 572 ! pbl wind variance 585 573 if (startphy_file) then … … 596 584 597 585 ! Non-orographic gravity waves 598 if (startphy_file) then 586 if (startphy_file) then 599 587 call get_field("du_nonoro_gwd",du_nonoro_gwd,found,indextime) 600 588 if (.not.found) then … … 609 597 minval(du_nonoro_gwd), maxval(du_nonoro_gwd) 610 598 611 if (startphy_file) then 599 if (startphy_file) then 612 600 call get_field("dv_nonoro_gwd",dv_nonoro_gwd,found,indextime) 613 601 if (.not.found) then … … 621 609 write(*,*) " <dv_nonoro_gwd> range:", & 622 610 minval(dv_nonoro_gwd), maxval(dv_nonoro_gwd) 623 if (startphy_file) then 611 if (startphy_file) then 624 612 call get_field("du_eddymix_gwd",du_eddymix_gwd,found,indextime) 625 613 if (.not.found) then … … 633 621 write(*,*) " <du_eddymix_gwd> range:", & 634 622 minval(du_eddymix_gwd), maxval(du_eddymix_gwd) 635 636 637 if (startphy_file) then 623 624 if (startphy_file) then 638 625 call get_field("dv_nonoro_gwd",dv_nonoro_gwd,found,indextime) 639 626 if (.not.found) then … … 648 635 minval(dv_nonoro_gwd), maxval(dv_nonoro_gwd) 649 636 650 if (startphy_file) then 637 if (startphy_file) then 651 638 call get_field("dv_eddymix_gwd",dv_eddymix_gwd,found,indextime) 652 639 if (.not.found) then … … 661 648 minval(dv_eddymix_gwd), maxval(dv_eddymix_gwd) 662 649 663 !if (startphy_file) then 650 !if (startphy_file) then 664 651 ! call get_field("dr_depflux_gwd",dr_depflux_gwd,found,indextime) 665 652 ! if (.not.found) then … … 674 661 ! minval(dr_depflux_gwd), maxval(dr_depflux_gwd) 675 662 676 if (startphy_file) then 663 if (startphy_file) then 677 664 call get_field("de_eddymix_rto",de_eddymix_rto,found,indextime) 678 665 if (.not.found) then … … 687 674 minval(de_eddymix_rto), maxval(de_eddymix_rto) 688 675 689 if (startphy_file) then 676 if (startphy_file) then 690 677 call get_field("df_eddymix_flx ",df_eddymix_flx ,found,indextime) 691 678 if (.not.found) then … … 699 686 write(*,*) " <df_eddymix_flx > range:", & 700 687 minval(df_eddymix_flx ), maxval(df_eddymix_flx ) 701 702 703 688 704 689 ! tracer on surface … … 789 774 else 790 775 watercap(:,:)=0 791 endif ! of if (startphy_file) 776 endif ! of if (startphy_file) 792 777 write(*,*) "phyetat0: Surface water ice <watercap> range:", & 793 778 minval(watercap), maxval(watercap) … … 833 818 endif 834 819 835 ! Diffusion coeficent 820 ! Diffusion coeficent 836 821 call get_field("d_coef",d_coef,found,indextime) 837 822 if (.not.found) then … … 882 867 end subroutine phyetat0 883 868 884 869 !====================================================================== 885 870 subroutine ini_tab_controle_dyn_xios(idayref) 886 871 887 USE comcstfi_h, only: g, mugaz, omeg, rad, rcp 888 USE time_phylmdz_mod, ONLY: hour_ini, daysec, dtphys 889 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, nbp_lev 890 IMPLICIT NONE 891 892 893 INTEGER*4,intent(in) :: idayref ! date (initial date for this run) 894 895 896 INTEGER length,l 897 parameter (length = 100) 898 REAL tab_cntrl(length) ! run parameters are stored in this array 899 900 DO l=1,length 901 tab_cntrl(l)=0. 902 ENDDO 903 tab_cntrl(1) = real(nbp_lon) 904 tab_cntrl(2) = real(nbp_lat-1) 905 tab_cntrl(3) = real(nbp_lev) 906 tab_cntrl(4) = real(idayref) 907 tab_cntrl(5) = rad 908 tab_cntrl(6) = omeg 909 tab_cntrl(7) = g 910 tab_cntrl(8) = mugaz 911 tab_cntrl(9) = rcp 912 tab_cntrl(10) = daysec 913 tab_cntrl(11) = dtphys 914 915 tab_cntrl(27) = hour_ini 916 917 tab_cntrl_mod = tab_cntrl 872 USE comcstfi_h, only: g, mugaz, omeg, rad, rcp 873 USE time_phylmdz_mod, ONLY: hour_ini, daysec, dtphys 874 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, nbp_lev 875 876 IMPLICIT NONE 877 878 INTEGER*4, intent(in) :: idayref ! date (initial date for this run) 879 880 INTEGER :: length,l 881 parameter (length = 100) 882 REAL :: tab_cntrl(length) ! run parameters are stored in this array 883 884 DO l=1,length 885 tab_cntrl(l)=0. 886 ENDDO 887 tab_cntrl(1) = real(nbp_lon) 888 tab_cntrl(2) = real(nbp_lat-1) 889 tab_cntrl(3) = real(nbp_lev) 890 tab_cntrl(4) = real(idayref) 891 tab_cntrl(5) = rad 892 tab_cntrl(6) = omeg 893 tab_cntrl(7) = g 894 tab_cntrl(8) = mugaz 895 tab_cntrl(9) = rcp 896 tab_cntrl(10) = daysec 897 tab_cntrl(11) = dtphys 898 899 tab_cntrl(27) = hour_ini 900 901 tab_cntrl_mod = tab_cntrl 918 902 919 903 end subroutine ini_tab_controle_dyn_xios -
trunk/LMDZ.MARS/libf/phymars/phys_state_var_init_mod.F90
r3144 r3305 3 3 CONTAINS 4 4 5 SUBROUTINE phys_state_var_init( ngrid,nlayer,nq,tname, &5 SUBROUTINE phys_state_var_init(filename,ngrid,nlayer,nq,tname, & 6 6 day_ini,day_end,hour_ini,pdaysec,ptimestep, & 7 7 prad,pg,pr,pcpp, & … … 69 69 70 70 IMPLICIT NONE 71 72 INTEGER,INTENT(IN) :: ngrid,nlayer,nq 73 CHARACTER(len=*),INTENT(IN) :: tname(nq) 74 INTEGER,INTENT(IN) :: day_ini, day_end 75 REAL,INTENT(IN) :: hour_ini 76 REAL,INTENT(IN) :: pdaysec,ptimestep,prad,pg,pr,pcpp 71 72 character(*), intent(in) :: filename ! Name of the "startfi.nc" file 73 integer, intent(IN) :: ngrid,nlayer,nq 74 character(*), intent(IN) :: tname(nq) 75 integer, intent(IN) :: day_ini, day_end 76 real, intent(IN) :: hour_ini 77 real, intent(IN) :: pdaysec, ptimestep, prad, pg, pr, pcpp 77 78 !MVals isotopes 78 INTEGER,INTENT(in) :: dyn_nqperes 79 INTEGER,INTENT(in) :: dyn_nqfils(nq) 80 character(len=10) :: filename ! name of the startfi.nc 79 integer, intent(in) :: dyn_nqperes 80 integer, intent(in) :: dyn_nqfils(nq) 81 81 integer :: ncid, status, nslope_dim_id 82 82 integer :: nslope_read 83 83 84 filename="startfi.nc"85 84 if(is_master) then 86 85 status = nf90_open(filename, nf90_nowrite, ncid)
Note: See TracChangeset
for help on using the changeset viewer.