Changeset 3316 for trunk/LMDZ.MARS


Ignore:
Timestamp:
Apr 25, 2024, 3:58:31 PM (7 months ago)
Author:
jbclement
Message:

Mars PCM:
Reversion of r3305 and r3307.
JBC

Location:
trunk/LMDZ.MARS
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/changelog.txt

    r3315 r3316  
    46234623Fixing a bug in the initialization of sub-grid surface temperatures in the 1D
    46244624(subgrid slope index was missing)
     4625
     4626== 25/04/2024 == JBC
     4627Reversion of r3305 and r3307.
  • trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/iniphysiq_mod.F90

    r3305 r3316  
    33CONTAINS
    44
    5 subroutine iniphysiq(filename,ii,jj,nlayer,               &
     5subroutine iniphysiq(ii,jj,nlayer,                        &
    66                     nbp, communicator,                   &
    77                     punjours, pdayref,ptimestep,         &
     
    3232include "iniprint.h"
    3333
    34 character(*), intent(in) :: filename ! Name of the "startfi.nc" file
    3534real,intent(in) :: prad ! radius of the planet (m)
    3635real,intent(in) :: pg ! gravitational acceleration (m/s2)
     
    7271!$OMP PARALLEL COPYIN(day_ini,day_end,hour_ini)
    7372
    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,                      &
     73call phys_state_var_init(klon_omp,nlayer,nqtot,tname, &
     74                         day_ini,day_end,hour_ini,    &
     75                         punjours,ptimestep,          &
     76                         prad,pg,pr,pcpp,             &
    7877                         nqperes,nqfils) ! MVals: variables isotopes
    7978call ini_fillgeom(klon_omp,latitude,longitude,cell_area)
  • trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/newstart.F

    r3305 r3316  
    391391
    392392! Initialize the physics
    393          CALL iniphysiq('startfi.nc',iim,jjm,llm,
     393         CALL iniphysiq(iim,jjm,llm,
    394394     &                  (jjm-1)*iim+2,comm_lmdz,
    395395     &                  daysec,day_ini,dtphys,
  • trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/nogcm.F90

    r3305 r3316  
    458458     ! Physics:
    459459#ifdef CPP_PHYS
    460      CALL iniphysiq('startfi.nc',iim,jjm,llm,             &
    461           (jjm-1)*iim+2,comm_lmdz,                        &
    462           daysec,day_ini,dtphys/nsplit_phys,              &
    463           rlatu,rlatv,rlonu,rlonv,aire,cu,cv,rad,g,r,cpp, &
    464           iflag_phys)
     460     CALL iniphysiq(iim,jjm,llm,              &
     461          (jjm-1)*iim+2,comm_lmdz,            &
     462          daysec,day_ini,dtphys/nsplit_phys,  &
     463          rlatu,rlatv,rlonu,rlonv,aire,cu,cv, &
     464          rad,g,r,cpp,iflag_phys)
    465465#endif
    466466  ENDIF ! of IF ((iflag_phys==1).or.(iflag_phys>=100))
  • trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/start2archive.F

    r3305 r3316  
    160160
    161161! Initialize the physics
    162       fichnom = 'startfi.nc'
    163 
    164          CALL iniphysiq(fichnom,iim,jjm,llm,
     162         CALL iniphysiq(iim,jjm,llm,
    165163     &                  (jjm-1)*iim+2,comm_lmdz,
    166164     &                  daysec,day_ini,dtphys,
     
    168166     &                  aire,cu,cv,rad,g,r,cpp,1)
    169167
     168      fichnom = 'startfi.nc'
    170169      Lmodif=0
    171170
  • trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/start2archive_SSO.F

    r3305 r3316  
    173173
    174174! Initialize the physics
    175       fichnom = 'startfi.nc'
    176 
    177          CALL iniphysiq(fichnom,iim,jjm,llm,
     175         CALL iniphysiq(iim,jjm,llm,
    178176     &                  (jjm-1)*iim+2,comm_lmdz,
    179177     &                  daysec,day_ini,dtphys,
     
    181179     &                  aire,cu,cv,rad,g,r,cpp,1)
    182180
     181      fichnom = 'startfi.nc'
    183182      Lmodif=0
    184183
  • trunk/LMDZ.MARS/libf/phymars/dyn1d/init_testphys1d_mod.F90

    r3315 r3316  
    405405! call init_vertical_layers(nlayer,preff,scaleheight,ap,bp,aps,bps,presnivs,pseudoalt)
    406406call init_dimphy(1,nlayer) ! Initialize dimphy module
    407 call phys_state_var_init(startfiname,1,llm,nq,tname,day0,dayn,time,daysec,dttestphys,rad,g,r,cpp,nqperes,nqfils) ! MVals: variables isotopes
     407call phys_state_var_init(1,llm,nq,tname,day0,dayn,time,daysec,dttestphys,rad,g,r,cpp,nqperes,nqfils) ! MVals: variables isotopes
    408408call ini_fillgeom(1,latitude,longitude,(/1.0/))
    409409call conf_phys(1,llm,nq)
  • trunk/LMDZ.MARS/libf/phymars/phyetat0_mod.F90

    r3305 r3316  
    2828use dust_rad_adjust_mod, only: dust_rad_adjust_prev,dust_rad_adjust_next
    2929use dust_param_mod,      only: dustscaling_mode
    30 USE ioipsl_getin_p_mod,  only: getin_p
     30use ioipsl_getin_p_mod,  only: getin_p
    3131use 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
     32use comslope_mod,        only: nslope, major_slope
     33use paleoclimate_mod,    only: paleoclimate, h2o_ice_depth, lag_co2_ice, d_coef
     34use comcstfi_h,          only: pi
    3535use geometry_mod,        only: latitude
    3636
     
    5151!                        flag: startphy_file
    5252!======================================================================
    53   INTEGER nbsrf !Mars nbsrf a 1 au lieu de 4
    54   PARAMETER (nbsrf=1) ! nombre de sous-fractions pour une maille
     53integer nbsrf !Mars nbsrf a 1 au lieu de 4
     54parameter (nbsrf=1) ! nombre de sous-fractions pour une maille
    5555!======================================================================
    5656!  Arguments:
     
    9191integer :: ig, iq, lmax, islope, nid, nvarid, ierr, i, nsrf, nqold
    9292! 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
     93! integer :: length
     94! parameter (length=100)
     95character(7) :: str7
     96character(2) :: str2
     97character(1) :: yes
     98
     99real :: p_rad, p_omeg, p_g, p_mugaz, p_daysec
    100100
    101101! flag which identifies if 'startfi.nc' file is using old names (qsurf01,...)
     
    105105
    106106! 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)
     107real, allocatable :: time(:)   ! times stored in start
     108integer           :: timelen   ! number of times stored in the file
     109integer           :: indextime ! index of selected time
     110
     111integer :: edges(3),corner(3)
     112logical :: found
     113real    :: timestart  ! to pick which initial state to start from
     114real    :: surfemis   ! constant emissivity when no startfi
     115real    :: surfalbedo ! constant albedo when no startfi
     116real    :: watercaptag_tmp(ngrid)
    117117
    118118! Sub-grid scale slopes
    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
     119logical           :: startphy_slope ! to be retrocompatible and add the nslope dimension
     120real, allocatable :: default_def_slope(:)
     121real              :: sum_dist
     122real              :: current_max !var to find max distrib slope
    123123
    124124! Variables for CO2 index
    125 INTEGER :: igcm_co2_tmp
    126 
    127 CHARACTER(5) :: modname="phyetat0"
     125integer :: igcm_co2_tmp
     126
     127character(5) :: modname="phyetat0"
    128128!======================================================================
    129129
     
    870870subroutine ini_tab_controle_dyn_xios(idayref)
    871871
    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
     872use comcstfi_h,        only: g, mugaz, omeg, rad, rcp
     873use time_phylmdz_mod,  only: hour_ini, daysec, dtphys
     874use mod_grid_phy_lmdz, only: nbp_lon, nbp_lat, nbp_lev
     875
     876implicit none
     877
     878integer*4, intent(in) :: idayref ! date (initial date for this run)
     879
     880integer :: length, l
    881881parameter (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
     882real    :: tab_cntrl(length) ! run parameters are stored in this array
     883
     884do l = 1,length
     885    tab_cntrl(l) = 0.
     886enddo
    887887tab_cntrl(1)  = real(nbp_lon)
    888888tab_cntrl(2)  = real(nbp_lat-1)
  • trunk/LMDZ.MARS/libf/phymars/phys_state_var_init_mod.F90

    r3305 r3316  
    33CONTAINS
    44
    5       SUBROUTINE phys_state_var_init(filename,ngrid,nlayer,nq,tname, &
     5      SUBROUTINE phys_state_var_init(ngrid,nlayer,nq,tname, &
    66                                     day_ini,day_end,hour_ini,pdaysec,ptimestep, &
    77                                     prad,pg,pr,pcpp, &
     
    6969
    7070      IMPLICIT NONE
    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
     71     
     72      integer,      intent(in) :: ngrid, nlayer, nq
     73      character(*), 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
    7877!MVals isotopes
    7978      integer,      intent(in) :: dyn_nqperes
    8079      integer,      intent(in) :: dyn_nqfils(nq)
    81       integer :: ncid, status, nslope_dim_id
    82       integer :: nslope_read
     80      character(10) :: filename  ! name of the startfi.nc
     81      integer       :: ncid, status, nslope_dim_id
     82      integer       :: nslope_read
    8383
     84      filename = "startfi.nc"
    8485      if(is_master) then
    8586        status = nf90_open(filename, nf90_nowrite, ncid)
Note: See TracChangeset for help on using the changeset viewer.