Changeset 3093


Ignore:
Timestamp:
Oct 18, 2023, 3:40:56 PM (15 months ago)
Author:
jbclement
Message:

PEM:
The optional file to define the wanted outputs in "diagpem.nc" is now "diagpem.def" (instead of "diagfi.def") + Some updates in the files of deftank.
JBC

Location:
trunk
Files:
5 edited

Legend:

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

    r3088 r3093  
    108108    - Gathering of all "diagpem.nc" outputs at the same place at the end of the main PEM loop;
    109109    - Update of "launch_pem.sh", "README" and "modify_startfi_orbit.sh" in the deftank.
     110
     111== 18/10/2023 == JBC
     112The optional file to define the wanted outputs in "diagpem.nc" is now "diagpem.def" (instead of "diagfi.def") + Some updates in the files of deftank.
  • trunk/LMDZ.COMMON/libf/evolution/writediagpem.F90

    r3088 r3093  
    3030!
    3131! Modifs: Aug.2010 Ehouarn: enforce outputs to be real*4
    32 !         Oct 2011 Francois: enable having a 'diagfi.def' file to select
     32!         Oct 2011 Francois: enable having a 'diagpem.def' file to select
    3333!                            at runtime, which variables to put in file
    3434!         Oct 2023 JB: conversion into Fortran 90 with module for the PEM
     
    9090integer, dimension(4)   :: edges, corner
    9191
    92 ! Added to use diagfi.def to select output variable
     92! Added to use diagpem.def to select output variable
    9393logical,                                  save :: diagfi_def
    9494logical                                        :: getout
     
    9898character(120), dimension(n_nom_def_max), save :: nom_def
    9999logical,                                  save :: firstcall = .true.
    100 !$OMP THREADPRIVATE(firstcall) !diagfi_def,n_nom_def,nom_def read in diagfi.def
     100!$OMP THREADPRIVATE(firstcall) !diagfi_def,n_nom_def,nom_def read in diagpem.def
    101101
    102102#ifdef CPP_PARA
     
    123123
    124124!***************************************************************
    125 ! At very first call, check if there is a "diagfi.def" to use and read it
    126 ! -----------------------------------------------------------------------
     125! At very first call, check if there is a "diagpem.def" to use and read it
     126! ------------------------------------------------------------------------
    127127IF (firstcall) THEN
    128128    firstcall=.false.
    129129
    130130!$OMP MASTER
    131     ! Open diagfi.def definition file if there is one:
    132         open(99,file="diagfi.def",status='old',form='formatted',iostat=ierr2)
     131    ! Open diagpem.def definition file if there is one:
     132        open(99,file="diagpem.def",status='old',form='formatted',iostat=ierr2)
    133133
    134134        if (ierr2 == 0) then
    135135            diagfi_def=.true.
    136             write(*,*) "******************"
    137             write(*,*) "Reading diagfi.def"
    138             write(*,*) "******************"
     136            write(*,*) "*******************"
     137            write(*,*) "Reading diagpem.def"
     138            write(*,*) "*******************"
    139139            do n=1,n_nom_def_max
    140140                read(99,fmt='(a)',end=88) nom_def(n)
     
    155155ENDIF ! of IF (firstcall)
    156156
    157 ! Get out of write_diagfi if there is diagfi.def AND variable not listed
    158 !  ---------------------------------------------------------------------
     157! Get out of write_diagfi if there is diagpem.def AND variable not listed
     158!  ----------------------------------------------------------------------
    159159if (diagfi_def) then
    160160    getout=.true.
     
    167167! Initialisation of 'firstnom' and create/open the "diagfi.nc" NetCDF file
    168168! ------------------------------------------------------------------------
    169 ! (at very first call to the subroutine, in accordance with diagfi.def)
     169! (at very first call to the subroutine, in accordance with diagpem.def)
    170170if (firstnom.eq.'1234567890') then ! .true. for the very first valid
    171171    ! call to this subroutine; now set 'firstnom'
  • trunk/LMDZ.MARS/deftank/pem/README

    r3088 r3093  
    2121
    2222# modify_startfi_orbit.sh:
    23   Bash script file to modify orbital parameters in the file "startfi.nc" (obliquity, eccentricity, Ls perihelion and possibly initial Ls). They should be consistent with Laskar data in "obl_ecc_lsp.asc" to start the chained simulation.
     23  Bash script file to modify orbital parameters in the file "startfi.nc" (obliquity, eccentricity, Ls perihelion and possibly initial Ls). They should be consistent with Laskar's data in "obl_ecc_lsp.asc" to start a chained simulation at a specific date.
    2424
    2525# concat_diagpem.sh:
    26   Bash script file to concatenate along the variable 'Time' all the "diagfi.nc" files of the PEM into one NetCDF file. 'Time' is reindexed with the numbering of Martian years simulated by the PEM.
     26  Bash script file to concatenate along the variable 'Time' all the "diagpem.nc" files of the PEM into one NetCDF file. 'Time' is re-indexed with the numbering of Martian years simulated by the PEM run.
    2727
    2828Note:
    2929  To run the chained simulation, be careful to have:
    3030      (i)   the xml files for XIOS. There should be "iodef.xml", "context_lmdz_physics.xml", "file_def_physics_mars.xml" and "field_def_physics_mars.xml" which can be found in the deftank folder. In "context_lmdz_physics.xml", the line for Xdiurnalave should be activated (enabled=".true.");
    31       (ii)  the usual def files to run the GCM with "run.def" renamed in "run_GCM.def";
    32       (iii) the "startfi.nc" file modified accordingly thanks to "modify_startfi_orbit.sh";
    33       (iv)  "diagfi_PEM.def", "diagfi_GCM.def" and eventually other files...
     31      (ii)  the usual def files to run the GCM. "run.def" should be renamed in "run_GCM.def";
     32      (iii  the starting files ("startfi.nc" and "start.nc"). The former can be modified by "modify_startfi_orbit.sh";
     33      (iv)  some optional files. For example, "diagfi.def" and "diagpem.def".
  • trunk/LMDZ.MARS/deftank/pem/launch_pem.sh

    r3088 r3093  
    110110    #--- Loop to run GCM year by year
    111111    cp run_GCM.def run.def
    112     if [ -f "diagfi.def" ]; then
    113         rm diagfi.def
    114     fi
    115     if [ -f "diagfi_GCM.def" ]; then
    116         cp diagfi_GCM.def diagfi.def
    117     fi
    118112    for ((i = 1; i <= $nGCM; i++)); do
    119113        echo "Run GCM $iGCM: call $i/$nGCM..."
     
    160154    echo "Run PEM $iPEM..."
    161155    cp run_PEM.def run.def
    162     if [ -f "diagfi.def" ]; then
    163         rm diagfi.def
    164     fi
    165     if [ -f "diagfi_PEM.def" ]; then
    166         cp diagfi_PEM.def diagfi.def
    167     fi
    168156    mv startfi.nc startfi_evol.nc
    169157    if [ -f "start.nc" ]; then
  • trunk/LMDZ.MARS/deftank/pem/modify_startfi_orbit.sh

    r3088 r3093  
    44######################################################################
    55
    6 #Name of the file to be modified
     6# Name of the file to be modified
    77name_file="startfi.nc"
    88
Note: See TracChangeset for help on using the changeset viewer.