Changeset 3068


Ignore:
Timestamp:
Oct 3, 2023, 11:25:57 AM (14 months ago)
Author:
jbclement
Message:

PEM:
Following the commits r3066 and r3067, the PEM initialization in 1D has been adapted.
JBC

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/evolution/changelog.txt

    r3065 r3068  
    7777== 26/09/2023 == JBC
    7878Minor changes concerning the form of the code in the PEM.
     79
     80== 28/09/2023 == JBC
    7981Addition of a file "changelog.txt" in LMDZ.COMMON/libf/evolution/ specific to the PEM rather than using the one for Mars. Completed with changesets since 01/07/2023.
    8082
    8183== 02/10/2023 == JBC
    8284Initialization of the PEM in 1D through the subroutine "init_testphys1d_mod.F90" + Some adaptations of the Mars PCM in 1D + Update of "launch_pem.sh" in deftank.
     85
     86== 03/10/2023 == JBC
     87Following the commits r3066 and r3067, the PEM initialization in 1D has been adapted.
  • trunk/LMDZ.COMMON/libf/evolution/pem.F90

    r3065 r3068  
    138138! Variables to read starfi.nc
    139139character (len = *), parameter :: FILE_NAME = "startfi_evol.nc" ! Name of the file used for initialsing the PEM
    140 character*2 str2
    141 integer :: ncid, varid, status                      ! Variable for handling opening of files
    142 integer :: phydimid, subdimid, nlayerdimid, nqdimid ! Variable ID for Netcdf files
    143 integer :: lonvarid, latvarid, areavarid, sdvarid   ! Variable ID for Netcdf files
    144 integer :: apvarid, bpvarid                         ! Variable ID for Netcdf files
     140character(2)                   :: str2
     141integer                        :: ncid, varid, status                      ! Variable for handling opening of files
     142integer                        :: phydimid, subdimid, nlayerdimid, nqdimid ! Variable ID for Netcdf files
     143integer                        :: lonvarid, latvarid, areavarid, sdvarid   ! Variable ID for Netcdf files
     144integer                        :: apvarid, bpvarid                         ! Variable ID for Netcdf files
    145145
    146146! Variables to read starfi.nc and write restartfi.nc
     
    165165logical                             :: STOPPING_pressure    ! Logical: is the criterion (% of change in the surface pressure) reached?
    166166integer                             :: criterion_stop       ! which criterion is reached ? 1= h2o ice surf, 2 = co2 ice surf, 3 = ps, 4 = orb param
    167 real, save                          :: A , B, mmean         ! Molar mass: intermediate A, B for computations of the  mean molar mass of the layer [mol/kg]
     167real, save                          :: A, B, mmean          ! Molar mass: intermediate A, B for computations of the  mean molar mass of the layer [mol/kg]
    168168real, dimension(:,:),   allocatable :: vmr_co2_gcm          ! Physics x Times  co2 volume mixing ratio retrieve from the gcm [m^3/m^3]
    169169real, dimension(:,:),   allocatable :: vmr_co2_pem_phys     ! Physics x Times  co2 volume mixing ratio used in the PEM
     
    238238    real, dimension(:,:),   allocatable :: emis                          ! Subslope variable, only needed in the GENERIC case
    239239    real, dimension(:,:),   allocatable :: watercap                      ! Subslope variable, only needed in the GENERIC case =0 no watercap in generic model
    240     logical, dimension(:),  allocatable :: WATERCAPTAG                   ! Subslope variable, only needed in the GENERIC case =false no watercaptag in generic model
     240    logical, dimension(:),  allocatable :: watercaptag                   ! Subslope variable, only needed in the GENERIC case =false no watercaptag in generic model
    241241    real, dimension(:,:,:), allocatable :: albedo                        ! Subslope variable, only needed in the GENERIC case
    242242    real, dimension(:,:,:), allocatable :: inertiesoil                   ! Subslope variable, only needed in the GENERIC case
     
    249249
    250250    ! Dummy variables to use the subroutine 'init_testphys1d'
    251     real, dimension(:,:), allocatable :: q_tmp ! Temporary tracer mixing ratio (e.g. kg/kg)
    252     logical                           :: startfiles_1D, therestart1D, therestartfi
    253     integer                           :: ndt, day0
    254     real                              :: ptif, pks, day, gru, grv, atm_wat_profile, atm_wat_tau
    255     real, dimension(:),   allocatable :: zqsat, qsurf_tmp
    256     real, dimension(:,:), allocatable :: dq, dqdyn
    257     real, dimension(nlayer)           :: play, w
    258     real, dimension(nlayer + 1)       :: plev, q2_tmp
    259     real, dimension(nsoilmx)          :: tsoil_tmp
    260     real, dimension(1)                :: tsurf_tmp, emis_tmp
    261     real, dimension(1,1)              :: albedo_tmp
     251    logical                             :: startfiles_1D, therestart1D, therestartfi
     252    integer                             :: ndt, day0
     253    real                                :: ptif, pks, day, gru, grv, atm_wat_profile, atm_wat_tau
     254    real, dimension(:),     allocatable :: zqsat
     255    real, dimension(:,:,:), allocatable :: dq, dqdyn
     256    real, dimension(nlayer)             :: play, w
     257    real, dimension(nlayer + 1)         :: plev
    262258#else
    263259    integer, parameter                :: jjm_value = jjm
     
    301297    allocate(longitude(ngrid),latitude(ngrid),cell_area(ngrid))
    302298#else
     299    allocate(q(1,llm,nqtot))
    303300    allocate(longitude(1),latitude(1),cell_area(1))
    304     call init_testphys1d(.true.,ngrid,nlayer,610.,nq,q_tmp,time_0,ps(1),ucov,vcov,teta,startfiles_1D,therestart1D,therestartfi, &
    305                          ndt,ptif,pks,dtphys,zqsat,qsurf_tmp,dq,dqdyn,day0,day,tsurf_tmp,gru,grv,w,q2_tmp,play,plev,tsoil_tmp,              &
    306                          albedo_tmp,emis_tmp,latitude,longitude,cell_area,atm_wat_profile,atm_wat_tau)
     301    call init_testphys1d(.true.,ngrid,nlayer,610.,nq,q,time_0,ps(1),ucov,vcov,teta,startfiles_1D,therestart1D, &
     302                         therestartfi,ndt,ptif,pks,dtphys,zqsat,dq,dqdyn,day0,day,gru,grv,w,                   &
     303                         play,plev,latitude,longitude,cell_area,atm_wat_profile,atm_wat_tau)
    307304    ps(2) = ps(1)
    308     allocate(q(ip1jmp1,llm,nqtot))
    309     q(ip1jmp1,:,:) = q_tmp(:,:)
    310     deallocate(q_tmp,qsurf_tmp)
    311305    nsplit_phys = 1
    312306#endif
  • trunk/LMDZ.MARS/deftank/pem/launch_pem.sh

    r3065 r3068  
    1616# Path to the arch.env to source:
    1717source ../trunk/LMDZ.COMMON/arch.env
     18
     19# Save the current value of LC_NUMERIC and set it to a locale that uses a dot as the decimal separator
     20OLD_LC_NUMERIC=$LC_NUMERIC
     21LC_NUMERIC=en_US.UTF-8
    1822
    1923#------- Modify here the number of Earth years to be simulated ---------
     
    106110    #--- Loop to run GCM year by year
    107111    cp run_GCM.def run.def
    108     rm diagfi.def
     112    if [ -f "diagfi.def" ]; then
     113        rm diagfi.def
     114    fi
    109115    if [ -f "diagfi_GCM.def" ]; then
    110116        cp diagfi_GCM.def diagfi.def
     
    154160    echo "Run PEM $iPEM..."
    155161    cp run_PEM.def run.def
    156     rm diagfi.def
     162    if [ -f "diagfi.def" ]; then
     163        rm diagfi.def
     164    fi
    157165    if [ -f "diagfi_PEM.def" ]; then
    158166        cp diagfi_PEM.def diagfi.def
     
    191199rm tmp_PEMyears.txt
    192200
     201# Restore the previous value of LC_NUMERIC
     202LC_NUMERIC=$OLD_LC_NUMERIC
     203
    193204#----------------- Preparation for relaunch if needed ------------------
    194205#echo "Reinitializing starting files..."
Note: See TracChangeset for help on using the changeset viewer.