Changeset 3317


Ignore:
Timestamp:
Apr 25, 2024, 5:16:51 PM (7 months ago)
Author:
jbclement
Message:

PEM:
The "start" and "startfi" file names are renamed to match those from the Mars PCM. This is necessary to initialize correctly the 3D PEM with "phys_state_var_init_mod.F90".
JBC

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

Legend:

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

    r3313 r3317  
    283283== 23/04/2024 == JBC
    284284Small correction about the dimension of an array.
     285
     286== 25/04/2024 == JBC
     287The "start" and "startfi" file names are renamed to match those from the Mars PCM. This is necessary to initialize correctly the 3D PEM with "phys_state_var_init_mod.F90".
  • trunk/LMDZ.COMMON/libf/evolution/deftank/launch_pem.sh

    r3296 r3317  
    190190echo "Run PEM $iPEM..."
    191191cp run_PEM.def run.def
    192 mv startfi.nc startfi_evol.nc
    193 if [ -f "start.nc" ]; then
    194     mv start.nc start_evol.nc
    195 elif [ -f "start1D.txt" ]; then
    196     mv start1D.txt start1D_evol.txt
    197 fi
    198192./$exePEM > out_runPEM${iPEM} 2>&1
    199 if [ ! -f "restartfi_evol.nc" ]; then # Check if run ended abnormally
     193if [ ! -f "restartfi.nc" ]; then # Check if run ended abnormally
    200194    echo "Error: the run PEM $iPEM crashed!"
    201195    exit 1
     
    209203cp restartpem.nc starts/startpem${iPEM}.nc
    210204mv restartpem.nc startpem.nc
    211 cp restartfi_evol.nc starts/startfi_postPEM${iPEM}.nc
    212 mv restartfi_evol.nc startfi.nc
    213 if [ -f "restart_evol.nc" ]; then
    214     cp restart_evol.nc starts/restart_postPEM${iPEM}.nc
    215     mv restart_evol.nc start.nc
    216 elif [ -f "restart1D_evol.txt" ]; then
    217     cp restart1D_evol.txt starts/restart1D_postPEM${iPEM}.txt
    218     mv restart1D_evol.txt start1D.txt
     205cp restartfi.nc starts/startfi_postPEM${iPEM}.nc
     206mv restartfi.nc startfi.nc
     207if [ -f "restart.nc" ]; then
     208    cp restart.nc starts/restart_postPEM${iPEM}.nc
     209    mv restart.nc start.nc
     210elif [ -f "restart1D.txt" ]; then
     211    cp restart1D.txt starts/restart1D_postPEM${iPEM}.txt
     212    mv restart1D.txt start1D.txt
    219213fi
    220214((iPEM++))
     
    274268    echo "Run PEM $iPEM..."
    275269    cp run_PEM.def run.def
    276     mv startfi.nc startfi_evol.nc
    277     if [ -f "start.nc" ]; then
    278         mv start.nc start_evol.nc
    279     elif [ -f "start1D.txt" ]; then
    280         mv start1D.txt start1D_evol.txt
    281     fi
    282270    ./$exePEM > out_runPEM${iPEM} 2>&1
    283     if [ ! -f "restartfi_evol.nc" ]; then # Check if run ended abnormally
     271    if [ ! -f "restartfi.nc" ]; then # Check if run ended abnormally
    284272        echo "Error: the run PEM $iPEM crashed!"
    285273        exit 1
     
    293281    cp restartpem.nc starts/startpem${iPEM}.nc
    294282    mv restartpem.nc startpem.nc
    295     cp restartfi_evol.nc starts/startfi_postPEM${iPEM}.nc
    296     mv restartfi_evol.nc startfi.nc
    297     if [ -f "restart_evol.nc" ]; then
    298         cp restart_evol.nc starts/restart_postPEM${iPEM}.nc
    299         mv restart_evol.nc start.nc
    300     elif [ -f "restart1D_evol.txt" ]; then
    301         cp restart1D_evol.txt starts/restart1D_postPEM${iPEM}.txt
    302         mv restart1D_evol.txt start1D.txt
     283    cp restartfi.nc starts/startfi_postPEM${iPEM}.nc
     284    mv restartfi.nc startfi.nc
     285    if [ -f "restart.nc" ]; then
     286        cp restart.nc starts/restart_postPEM${iPEM}.nc
     287        mv restart.nc start.nc
     288    elif [ -f "restart1D.txt" ]; then
     289        cp restart1D.txt starts/restart1D_postPEM${iPEM}.txt
     290        mv restart1D.txt start1D.txt
    303291    fi
    304292    ((iPEM++))
  • trunk/LMDZ.COMMON/libf/evolution/layering_mod.F90

    r3308 r3317  
    3131    real               :: thickness          ! Layer thickness [m]
    3232    real               :: top_elevation      ! Layer top_elevation (top height from the surface) [m]
    33     real               :: co2ice_volfrac     ! CO2 ice volumic fraction
    34     real               :: h2oice_volfrac     ! H2O ice volumic fraction
    35     real               :: dust_volfrac       ! Dust volumic fraction
    36     real               :: air_volfrac        ! Air volumic fraction inside pores
     33    real               :: co2ice_volfrac     ! CO2 ice volumetric fraction
     34    real               :: h2oice_volfrac     ! H2O ice volumetric fraction
     35    real               :: dust_volfrac       ! Dust volumetric fraction
     36    real               :: air_volfrac        ! Air volumetric fraction inside pores
    3737    type(stratum), pointer :: up => null()   ! Upper stratum (next node)
    3838    type(stratum), pointer :: down => null() ! Lower stratum (previous node)
     
    122122! Verification of volume fraction
    123123if (abs(1. - (str%co2ice_volfrac + str%h2oice_volfrac + str%dust_volfrac + str%air_volfrac)) > tol) &
    124      error stop 'add_stratum: properties for the new stratum are not possible (sum of volumic fraction /= 1)!'
     124     error stop 'add_stratum: properties for the new stratum are not possible (sum of volumetric fraction /= 1)!'
    125125
    126126! Increment the number of strata
     
    175175    ! Verification of volume fraction
    176176    if (abs(1. - (str%co2ice_volfrac + str%h2oice_volfrac + str%dust_volfrac + str%air_volfrac)) > tol) &
    177          error stop 'insert_stratum: properties for the new stratum are not possible (sum of volumic fraction /= 1)!'
     177         error stop 'insert_stratum: properties for the new stratum are not possible (sum of volumetric fraction /= 1)!'
    178178
    179179    ! Increment the number of strata
  • trunk/LMDZ.COMMON/libf/evolution/pem.F90

    r3308 r3317  
    22! I   Initialization
    33!    I_a Read the "run.def"
    4 !    I_b Read the "start_evol.nc" and "startfi_evol.nc"
     4!    I_b Read the "start.nc" and "startfi.nc"
    55!    I_c Subslope parametrisation
    66!    I_d Read the PCM data and convert them to the physical grid
     
    2222! III Output
    2323!    III_a Update surface value for the PCM start files
    24 !    III_b Write the "restart_evol.nc" and "restartfi_evol.nc"
     24!    III_b Write the "restart.nc" and "restartfi.nc"
    2525!    III_c Write the "restartpem.nc"
    2626!------------------------
     
    130130
    131131! Variables to read start.nc
    132 character(*), parameter :: start_name = "start_evol.nc" ! Name of the file used to initialize the PEM
     132character(*), parameter :: start_name = "start.nc" ! Name of the file used to initialize the PEM
    133133
    134134! Dynamic variables
     
    145145
    146146! Variables to read starfi.nc
    147 character(*), parameter :: startfi_name = "startfi_evol.nc" ! Name of the file used to initialize the PEM
     147character(*), parameter :: startfi_name = "startfi.nc" ! Name of the file used to initialize the PEM
    148148character(2)            :: str2
    149149integer                 :: ncid, status                           ! Variable for handling opening of files
     
    313313    endif
    314314    therestartfi = .false. ! Default value
    315     inquire(file = 'startfi_evol.nc',exist = therestartfi)
     315    inquire(file = 'startfi.nc',exist = therestartfi)
    316316    if (.not. therestartfi) then
    317         write(*,*) 'There is no "startfi_evol.nc" file!'
     317        write(*,*) 'There is no "startfi.nc" file!'
    318318        error stop 'Initialization cannot be done for the 1D PEM.'
    319319    endif
    320320
    321     call init_testphys1d('start1D_evol.txt','startfi_evol.nc',therestart1D,therestartfi,ngrid,nlayer,610.,nq,q, &
     321    call init_testphys1d('start1D_evol.txt','startfi.nc',therestart1D,therestartfi,ngrid,nlayer,610.,nq,q, &
    322322                         time_0,ps(1),ucov,vcov,teta,ndt,ptif,pks,dtphys,zqsat,dq,dqdyn,day0,day,gru,grv,w,     &
    323323                         play,plev,latitude,longitude,cell_area,atm_wat_profile,atm_wat_tau)
     
    330330!------------------------
    331331! I   Initialization
    332 !    I_b Read of the "start_evol.nc" and starfi_evol.nc
    333 !------------------------
    334 ! I_b.1 Read "start_evol.nc"
     332!    I_b Read of the "start.nc" and starfi_evol.nc
     333!------------------------
     334! I_b.1 Read "start.nc"
    335335allocate(ps_start_PCM(ngrid))
    336336#ifndef CPP_1D
     
    351351    status = nf90_close(ncid)
    352352
    353     call iniphysiq('startfi_evol.nc',iim,jjm,llm,(jjm-1)*iim+2,comm_lmdz,daysec,day_ini,dtphys/nsplit_phys,rlatu,rlatv,rlonu,rlonv,aire,cu,cv,rad,g,r,cpp,iflag_phys)
     353    call iniphysiq('startfi.nc',iim,jjm,llm,(jjm-1)*iim+2,comm_lmdz,daysec,day_ini,dtphys/nsplit_phys,rlatu,rlatv,rlonu,rlonv,aire,cu,cv,rad,g,r,cpp,iflag_phys)
    354354#else
    355355    ps_start_PCM(1) = ps(1)
     
    357357
    358358! In the PCM, these values are given to the physic by the dynamic.
    359 ! Here we simply read them in the "startfi_evol.nc" file
     359! Here we simply read them in the "startfi.nc" file
    360360status = nf90_open(startfi_name, NF90_NOWRITE, ncid)
    361361
     
    374374status = nf90_close(ncid)
    375375
    376 ! I_b.2 Read the "startfi_evol.nc"
     376! I_b.2 Read the "startfi.nc"
    377377! First we read the initial state (starfi.nc)
    378378#ifndef CPP_STD
     
    10791079!------------------------
    10801080! III Output
    1081 !    III_b Write "restart_evol.nc" and "restartfi_evol.nc"
    1082 !------------------------
    1083 ! III_b.1 Write "restart_evol.nc"
     1081!    III_b Write "restart.nc" and "restartfi.nc"
     1082!------------------------
     1083! III_b.1 Write "restart.nc"
    10841084ptimestep = iphysiq*daysec/real(day_step)/nsplit_phys ! dtphys/nsplit_phys
    10851085pday = day_ini
     
    10901090    call pression (ip1jmp1,ap,bp,ps,p)
    10911091    call massdair(p,masse)
    1092     call dynredem0("restart_evol.nc",day_ini,phis)
    1093     call dynredem1("restart_evol.nc",time_0,vcov,ucov,teta,q,masse,ps)
    1094     write(*,*) "restart_evol.nc has been written"
     1092    call dynredem0("restart.nc",day_ini,phis)
     1093    call dynredem1("restart.nc",time_0,vcov,ucov,teta,q,masse,ps)
     1094    write(*,*) "restart.nc has been written"
    10951095#else
    10961096    call writerestart1D('restart1D_evol.txt',ps(1),tsurf(1,:),nlayer,size(tsurf,2),teta,ucov,vcov,nq,noms,qsurf(1,:,:),q)
     
    10981098#endif
    10991099
    1100 ! III_b.2 Write the "restartfi_evol.nc"
     1100! III_b.2 Write the "restartfi.nc"
    11011101#ifndef CPP_STD
    1102     call physdem0("restartfi_evol.nc",longitude,latitude,nsoilmx,ngrid, &
     1102    call physdem0("restartfi.nc",longitude,latitude,nsoilmx,ngrid, &
    11031103                  nlayer,nq,ptimestep,pday,0.,cell_area,albedodat,      &
    11041104                  inertiedat,def_slope,subslope_dist)
    1105     call physdem1("restartfi_evol.nc",nsoilmx,ngrid,nlayer,nq,nqsoil, &
     1105    call physdem1("restartfi.nc",nsoilmx,ngrid,nlayer,nq,nqsoil, &
    11061106                  ptimestep,ztime_fin,tsurf,tsoil,inertiesoil,        &
    11071107                  albedo,emis,q2,qsurf,qsoil,tauscaling,totcloudfrac, &
    11081108                  wstar,watercap,perennial_co2ice)
    11091109#else
    1110     call physdem0("restartfi_evol.nc",longitude,latitude,nsoilmx,ngrid, &
     1110    call physdem0("restartfi.nc",longitude,latitude,nsoilmx,ngrid, &
    11111111                  nlayer,nq,ptimestep,pday,time_phys,cell_area,         &
    11121112                  albedo_bareground,inertiedat,zmea,zstd,zsig,zgam,zthe)
    1113     call physdem1("restartfi_evol.nc",nsoilmx,ngrid,nlayer,nq,nqsoil,  &
     1113    call physdem1("restartfi.nc",nsoilmx,ngrid,nlayer,nq,nqsoil,  &
    11141114                  ptimestep,ztime_fin,tsurf,tsoil,emis,q2,qsurf,qsoil, &
    11151115                  cloudfrac,totcloudfrac,hice,rnat,pctsrf_sic,tslab,   &
    11161116                  tsea_ice,sea_ice)
    11171117#endif
    1118 write(*,*) "restartfi_evol.nc has been written"
     1118write(*,*) "restartfi.nc has been written"
    11191119
    11201120!------------------------
Note: See TracChangeset for help on using the changeset viewer.