Changeset 3980


Ignore:
Timestamp:
Nov 28, 2025, 5:38:44 PM (2 days ago)
Author:
jbclement
Message:

PEM:
Renaming the file "info_PEM.txt" into "launchPEM.info".
JBC

Location:
trunk/LMDZ.COMMON/libf/evolution
Files:
13 edited

Legend:

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

    r3979 r3980  
    805805== 28/11/2025 == JBC
    806806Addition of the periodicity to search along the longitudes to find the nearest bare soil from the place where ice disappeared + Searching with slope priority according to equator-ward orientation to try gaining efficiency + Warning if the search is unsuccessful.
     807
     808== 28/11/2025 == JBC
     809Renaming the file "info_PEM.txt" into "launchPEM.info".
  • trunk/LMDZ.COMMON/libf/evolution/conf_pem.F90

    r3860 r3980  
    4343
    4444! #---------- Martian years parameters from launching script
    45 open(100,file = 'info_PEM.txt',status = 'old',form = 'formatted',action = 'read',iostat = ierr)
     45open(100,file = 'launchPEM.info',status = 'old',form = 'formatted',action = 'read',iostat = ierr)
    4646if (ierr /= 0) then
    47     write(*,*) 'Cannot find required file "info_PEM.txt"!'
     47    write(*,*) 'Cannot find required file "launchPEM.info"!'
    4848    write(*,*) 'It should be created by the launching script...'
    4949    stop
  • trunk/LMDZ.COMMON/libf/evolution/deftank/PCMrun.job

    r3977 r3980  
    3434
    3535# Running the PCM
    36 read i_myear n_myear convert_years iPCM iPEM nPCM nPCM_ini < info_PEM.txt
     36read i_myear n_myear convert_years iPCM iPEM nPCM nPCM_ini < launchPEM.info
    3737echo "Run \"PCM $iPCM\" is starting."
    3838cp run_PCM.def run.def
     
    7777    i_myear=$(echo "$i_myear + 1." | bc -l)
    7878fi
    79 sed -i "1s/.*/$i_myear $n_myear $convert_years $iPCM $iPEM $nPCM $nPCM_ini/" info_PEM.txt
     79sed -i "1s/.*/$i_myear $n_myear $convert_years $iPCM $iPEM $nPCM $nPCM_ini/" launchPEM.info
  • trunk/LMDZ.COMMON/libf/evolution/deftank/PEMrun.job

    r3977 r3980  
    3131
    3232# Running the PEM
    33 read i_myear n_myear convert_years iPCM iPEM nPCM nPCM_ini < info_PEM.txt
     33read i_myear n_myear convert_years iPCM iPEM nPCM nPCM_ini < launchPEM.info
    3434echo "Run \"PEM $iPEM\" is starting."
    3535cp run_PEM.def run.def
     
    6161
    6262# Launch the next cycle
    63 #if [ "$(awk 'END{print $NF}' info_PEM.txt)" -eq 7 ]; then
    64 #    read i_myear n_myear convert_years iPCM iPEM nPCM nPCM_ini < info_PEM.txt
     63#if [ "$(awk 'END{print $NF}' launchPEM.info)" -eq 7 ]; then
     64#    read i_myear n_myear convert_years iPCM iPEM nPCM nPCM_ini < launchPEM.info
    6565#    ./launchPEM.sh cont # Continue the PEM run if it stopped because of job time limit
    6666#else
  • trunk/LMDZ.COMMON/libf/evolution/deftank/README

    r3977 r3980  
    6363    > the usual outputs of the PCM: "restartfi.nc", "restart.nc", "diagfi.nc", etc;
    6464    > the XIOS outputs of the PCM: "Xoutdaily4pem*.nc"/"Xoutyearly4pem*.nc";
    65     > the outputs of the chained simulation: "launchPEM.log", "info_PEM.txt" and possibly "kill_launchPEM.sh";
     65    > the outputs of the chained simulation: "launchPEM.log", "launchPEM.info" and possibly "kill_launchPEM.sh";
    6666    > the usual outputs of the PEM: "restartfi.nc", "restart.nc"/"restart1D.txt" and "diagpem.nc".
    6767During the simulation, the PCM/PEM run files are renamed conveniently and stored in the sub-directories "logs" (log files), "starts" (starting files) and "diags" (diagnostic files).
  • trunk/LMDZ.COMMON/libf/evolution/deftank/clean.sh

    r3977 r3980  
    1111# Cleaning of files in the current folder
    1212rm -f Bands*.dat
    13 rm -f info_PEM.txt
     13rm -f launchPEM.info
    1414find . -type f -name "PCMrun*.job" ! -name "PCMrun.job" -delete
    1515rm -f *.out
  • trunk/LMDZ.COMMON/libf/evolution/deftank/launchPEM.sh

    r3958 r3980  
    6868            fi
    6969        fi
    70         read i_myear n_myear convert_years iPCM iPEM nPCM nPCM_ini < info_PEM.txt
     70        read i_myear n_myear convert_years iPCM iPEM nPCM nPCM_ini < launchPEM.info
    7171        cyclelaunch $mode $counting $nPCM
    7272
    7373    # Starting a relaunch
    7474    elif [ $1 = "re" ]; then
    75         if [ ! -f "info_PEM.txt" ]; then
    76             echo "Error: file \"info_PEM.txt\" does not exist in $dir!"
     75        if [ ! -f "launchPEM.info" ]; then
     76            echo "Error: file \"launchPEM.info\" does not exist in $dir!"
    7777            echo "It is necessary to relaunch a PEM simulation."
    7878            errlaunch
     
    8888            fi
    8989        done
    90         read i_myear n_myear_old convert_years iPCM iPEM nPCM_old nPCM_ini_old < info_PEM.txt
     90        read i_myear n_myear_old convert_years iPCM iPEM nPCM_old nPCM_ini_old < launchPEM.info
    9191        while true; do
    9292            if [ $relaunch = "PCM" ]; then
     
    125125            echo "The number of initial PCM years has been modified from $n_myear_old to $n_myear."
    126126        fi
    127         sed -i "1s/.*/$i_myear $n_myear $convert_years $iPCM $iPEM $nPCM $nPCM_ini/" info_PEM.txt
     127        sed -i "1s/.*/$i_myear $n_myear $convert_years $iPCM $iPEM $nPCM $nPCM_ini/" launchPEM.info
    128128        if [ -f "kill_launchPEM.sh" ]; then
    129129            ./kill_launchPEM.sh
  • trunk/LMDZ.COMMON/libf/evolution/deftank/lib_launchPEM.sh

    r3977 r3980  
    290290
    291291    # Create a file to manage years of the chained simulation and store some info from the PEM runs
    292     echo $i_myear $n_myear $convert_years $iPCM $iPEM $nPCM $nPCM_ini > info_PEM.txt
     292    echo $i_myear $n_myear $convert_years $iPCM $iPEM $nPCM $nPCM_ini > launchPEM.info
    293293}
    294294
     
    474474            i_myear=0
    475475        fi
    476         sed -i "1s/.*/$i_myear $n_myear $convert_years $iPCM $iPEM $nPCM $nPCM_ini/" info_PEM.txt
     476        sed -i "1s/.*/$i_myear $n_myear $convert_years $iPCM $iPEM $nPCM $nPCM_ini/" launchPEM.info
    477477        cleanfiles diags/diagpem .nc $(($iPEM - 1))
    478478        cleanfiles diags/diagsoilpem .nc $(($iPEM - 1))
     
    504504        il=$(echo "($irelaunch - $nPCM_ini + 1)%$nPCM + 1" | bc)
    505505        if [ $2 -ne 0 ]; then # Counting: PCM years taken into account
    506             i_myear=$(echo "$(awk "NR==$iPEM {printf \"%s\n\", \$3}" "info_PEM.txt") + $il" | bc -l)
     506            i_myear=$(echo "$(awk "NR==$iPEM {printf \"%s\n\", \$3}" "launchPEM.info") + $il" | bc -l)
    507507        else # Counting: only PEM years count
    508             i_myear=$(awk "NR==$iPEM {printf \"%s\n\", \$3}" "info_PEM.txt")
    509         fi
    510         sed -i "1s/.*/$i_myear $n_myear $convert_years $iPCM $iPEM $nPCM $nPCM_ini/" info_PEM.txt
     508            i_myear=$(awk "NR==$iPEM {printf \"%s\n\", \$3}" "launchPEM.info")
     509        fi
     510        sed -i "1s/.*/$i_myear $n_myear $convert_years $iPCM $iPEM $nPCM $nPCM_ini/" launchPEM.info
    511511        cleanfiles diags/diagpem .nc $(($iPEM - 1))
    512512        cleanfiles diags/diagsoilpem .nc $(($iPEM - 1))
     
    539539    iPEM=$(echo "$irelaunch + 1" | bc)
    540540    iPCM=$(echo "$nPCM_ini + $nPCM*($irelaunch - 1) + 1" | bc)
    541     i_myear=$(awk "NR==$iPEM {printf \"%s\n\", \$3}" "info_PEM.txt")
    542     sed -i "1s/.*/$i_myear $n_myear $convert_years $iPCM $iPEM $nPCM $nPCM_ini/" info_PEM.txt
     541    i_myear=$(awk "NR==$iPEM {printf \"%s\n\", \$3}" "launchPEM.info")
     542    sed -i "1s/.*/$i_myear $n_myear $convert_years $iPCM $iPEM $nPCM $nPCM_ini/" launchPEM.info
    543543    cleanfiles diags/diagfi .nc $(($iPCM - 1))
    544544    cleanfiles diags/diagsoil .nc $(($iPCM - 1))
  • trunk/LMDZ.COMMON/libf/evolution/deftank/visu_evol_layering.py

    r3926 r3980  
    2222      - folder_path: directory containing NetCDF files (default: "starts")
    2323      - base_name:   base filename (default: "restartpem")
    24       - infofile:    name of the PEM info file (default: "info_PEM.txt")
     24      - infofile:    name of the PEM info file (default: "launchPEM.info")
    2525    Validates existence of folder and infofile before returning.
    2626    """
     
    4242    infofile = input(
    4343        "Enter the name of the PEM info file "
    44         "(press Enter for default [info_PEM.txt]): "
    45     ).strip() or "info_PEM.txt"
     44        "(press Enter for default [launchPEM.info]): "
     45    ).strip() or "launchPEM.info"
    4646    while not os.path.isfile(infofile):
    4747        print(f"  » \"{infofile}\" does not exist or is not a file.")
    4848        infofile = input(
    49             "Enter a valid PEM info filename (press Enter for default [info_PEM.txt]): "
    50         ).strip() or "info_PEM.txt"
     49            "Enter a valid PEM info filename (press Enter for default [launchPEM.info]): "
     50        ).strip() or "launchPEM.info"
    5151
    5252    orbfile = input(
     
    5858        orbfile = input(
    5959            "Enter a valid orbital parameters ASCII filename (press Enter for default [obl_ecc_lsp.asc]): "
    60         ).strip() or "info_PEM.txt"
     60        ).strip() or "launchPEM.info"
    6161
    6262    return folder_path, base_name, infofile, orbfile
     
    240240def read_infofile(file_name):
    241241    """
    242     Reads "info_PEM.txt". Expects:
     242    Reads "launchPEM.info". Expects:
    243243      - First line: parameters where the 3rd value is martian_to_earth conversion factor.
    244244      - Each subsequent line: floats where first value is simulation timestamp (in Mars years).
  • trunk/LMDZ.COMMON/libf/evolution/grid_conversion.F90

    r3977 r3980  
    77!=======================================================================
    88SUBROUTINE lonlat2vect(nlon,nlat,ngrid,v_ll,v_vect)
    9 
    109! To convert data from lon x lat grid (where values at the poles are duplicated) into a vector
     10! /!\ The longitudes -180 and +180 are not duplicated like in the PCM dynamics
    1111
    1212implicit none
     
    5151!=======================================================================
    5252SUBROUTINE vect2lonlat(nlon,nlat,ngrid,v_vect,v_ll)
     53! To convert data from a vector into lon x lat grid (where values at the poles are duplicated)
     54! /!\ The longitudes -180 and +180 are not duplicated like in the PCM dynamics
    5355
    5456implicit none
  • trunk/LMDZ.COMMON/libf/evolution/info_PEM_mod.F90

    r3533 r3980  
    1313!=======================================================================
    1414!
    15 ! Purpose: Update the first line of "info_PEM.txt" to count the number of simulated Martian years
    16 !          Write in "info_PEM.txt" the reason why the PEM stopped and the number of simulated years
     15! Purpose: Update the first line of "launchPEM.info" to count the number of simulated Martian years
     16!          Write in "launchPEM.info" the reason why the PEM stopped and the number of simulated years
    1717!
    1818! Author: RV, JBC
     
    3434
    3535!----- Code
    36 inquire(file = 'info_PEM.txt',exist = ok)
     36inquire(file = 'launchPEM.info',exist = ok)
    3737if (ok) then
    3838    write(fch1,'(f'//int2str(nb_digits(i_myear) + 5)//'.4)') i_myear
    3939    write(fch2,'(f'//int2str(nb_digits(n_myear) + 5)//'.4)') n_myear
    4040    write(fch3,'(f6.4)') convert_years ! 4 digits to the right of the decimal point to respect the precision of Martian year in "launch_pem.sh"
    41     call execute_command_line('sed -i "1s/.*/'//trim(fch1)//' '//trim(fch2)//' '//trim(fch3)//' '//int2str(iPCM)//' '//int2str(iPEM + 1)//' '//int2str(nPCM)//' '//int2str(nPCM_ini)//'/" info_PEM.txt',cmdstat = cstat)
     41    call execute_command_line('sed -i "1s/.*/'//trim(fch1)//' '//trim(fch2)//' '//trim(fch3)//' '//int2str(iPCM)//' '//int2str(iPEM + 1)//' '//int2str(nPCM)//' '//int2str(nPCM_ini)//'/" launchPEM.info',cmdstat = cstat)
    4242    if (cstat > 0) then
    4343        error stop 'info_PEM: command execution failed!'
     
    4545        error stop 'info_PEM: command execution not supported!'
    4646    endif
    47     open(1,file = 'info_PEM.txt',status = "old",position = "append",action = "write")
     47    open(1,file = 'launchPEM.info',status = "old",position = "append",action = "write")
    4848    ! Martian date, Number of Martians years done by the PEM run, Number of Martians years done by the chainded simulation, Code of the stopping criterion
    4949    ! The conversion ratio from Planetary years to Earth years is given in the header of the file
     
    5151    close(1)
    5252else
    53     error stop 'The file ''info_PEM.txt'' does not exist and cannot be updated!'
     53    error stop 'The file ''launchPEM.info'' does not exist and cannot be updated!'
    5454endif
    5555
  • trunk/LMDZ.COMMON/libf/evolution/recomp_orb_param_mod.F90

    r3961 r3980  
    120120
    121121END MODULE recomp_orb_param_mod
    122 
  • trunk/LMDZ.COMMON/libf/evolution/stopping_crit_mod.F90

    r3977 r3980  
    247247integer :: i, islope ! Loop
    248248!=======================================================================
    249 ! Checks to escape the subroutine
     249! Checks to escape the subroutine (adjusment not relevant in 1D or if the PEM should stop already)
    250250if (ngrid == 1 .or. stopCrit%stop_code() > 0) then
    251251    S_atm_2_h2o = 1.
Note: See TracChangeset for help on using the changeset viewer.