Changeset 2424 for trunk


Ignore:
Timestamp:
Oct 22, 2020, 11:50:20 AM (4 years ago)
Author:
adelavois
Message:

Update of DYNAMICO / Mars interface with isotopes nqperes and nqfils

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ICOSA_LMDZ/src/phymars/interface_icosa_lmdz.f90

    r2271 r2424  
    4040 
    4141  CHARACTER(len=30),SAVE,ALLOCATABLE :: tname(:) ! tracer names
     42  INTEGER,SAVE :: dyn_nqperes
     43  INTEGER,SAVE,ALLOCATABLE :: dyn_nqfils(:)
    4244  REAL,SAVE :: pday ! number of ellapsed sols since Ls=0
    4345  REAL,SAVE :: ptime ! "universal time" as fraction of sol (e.g. 0.5 for noon)
     
    224226  integer :: varid ! NetCDF variable ID
    225227  real :: tab_cntrl(100)
     228  real :: time0 !! Variable in startfi.nc to determine day_ini and hour_ini
    226229
    227230    CALL init_distrib_icosa_lmdz
     
    323326
    324327      status=nf90_get_var(ncid,varid,tab_cntrl)
    325       day_ini=tab_cntrl(4)
     328      day_ini=tab_cntrl(3)
     329!      print*,"initialize_physics_omp: day_ini",day_ini
     330      hour_ini=tab_cntrl(4)
     331!      print*,"initialize_physics_omp: hour_ini",hour_ini
     332
     333      status=nf90_inq_varid(ncid,"Time",varid)
     334      if (status.ne.nf90_noerr) then
     335        write(*,*)"Failed to find Time variable"
     336        write(*,*)trim(nf90_strerror(status))
     337        stop
     338      endif
     339
     340      status=nf90_get_var(ncid,varid,time0)
     341      time0=int(time0) !AD: test fpr
     342      day_ini = day_ini + int(time0)
     343      time0   = time0 - int(time0)
     344      hour_ini = hour_ini +time0
    326345      print*,"initialize_physics_omp: day_ini",day_ini
    327       hour_ini=tab_cntrl(29)
    328346      print*,"initialize_physics_omp: hour_ini",hour_ini
    329347      status=nf90_close(ncid)
     
    332350      ENDIF ! of !IF (is_mpi_root)
    333351     
     352! pday is from dynamics, day_ini is then calculated in phyetat0 for physics
     353! iteration is nb of dyn timesteps (as an integer in start.nc)
     354! pday=nint((iteration*dt)/day_length)
     355! ptime= (iteration*dt)/day_length  -  pday
     356
    334357      CALL bcast(day_ini)
    335358      CALL bcast(hour_ini)
     
    354377!!!            latfi,lonfi,airefi,radius,g,kappa*cpp,cpp)
    355378
     379!!!    Temporary solution in order to run physics after HDO tracer implementation
     380!!!   
     381   dyn_nqperes   = nqtot
     382   allocate(dyn_nqfils(dyn_nqperes))
     383   dyn_nqfils(:) = 0
     384!!!
    356385   CALL phys_state_var_init(klon_omp,llm,nqtot,tname, &
    357386                       day_ini,hour_ini,day_length,physics_timestep, &
    358                        radius,g,kappa*cpp,cpp)
     387                       radius,g,kappa*cpp,cpp, &
     388                       dyn_nqperes,dyn_nqfils)
    359389
    360390   CALL ini_fillgeom(klon_omp,latfi,lonfi,airefi)
Note: See TracChangeset for help on using the changeset viewer.