Ignore:
Timestamp:
Oct 16, 2023, 10:31:19 AM (14 months ago)
Author:
jbclement
Message:

PEM:

  • Addition of the bash script "concat_diagpem.sh" in deftank to concatenate all the "diagpem.nc" outputs into one file;
  • Addition of "writediagpem_mod.F90" inspired by the subroutine "writediagfi.F" in phymars/;
  • Renaming of PEM outputs ('startfi_PEM' -> 'startpem' and 'diagfi' -> 'diagpem');
  • Gathering of all "diagpem.nc" outputs at the same place at the end of the main PEM loop;
  • Update of "launch_pem.sh", "README" and "modify_startfi_orbit.sh" in the deftank.

JBC

Location:
trunk/LMDZ.COMMON/libf/evolution
Files:
1 added
2 edited

Legend:

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

    r3082 r3088  
    101101    - Correction of a bug in the initialization of constants. The correct modules are now used: 'comcstfi_h' (and no longer 'comconst_mod'!) in the general case and 'comcstfi_mod' in the case of generic model;
    102102    - Addition of the variable 'ecritpem' in "run_PEM.def" to set the frequency of outputs in the "diagfi.nc". By default, 'ecritpem = 1' which means there is one output at each PEM year.
     103
     104== 16/10/2023 == JBC
     105    - Addition of the bash script "concat_diagpem.sh" in deftank to concatenate all the "diagpem.nc" outputs into one file;
     106    - Addition of "writediagpem_mod.F90" inspired by the subroutine "writediagfi.F" in phymars/;
     107    - Renaming of PEM outputs ('startfi_PEM' -> 'startpem' and 'diagfi' -> 'diagpem');
     108    - Gathering of all "diagpem.nc" outputs at the same place at the end of the main PEM loop;
     109    - Update of "launch_pem.sh", "README" and "modify_startfi_orbit.sh" in the deftank.
  • trunk/LMDZ.COMMON/libf/evolution/pem.F90

    r3082 r3088  
    88!    I_f Compute tendencies & Save initial situation
    99!    I_g Save initial PCM situation
    10 !    I_h Read the PEMstart
     10!    I_h Read the startpem.nc
    1111!    I_i Compute orbit criterion
    1212
     
    1616!    II_c CO2 & H2O glaciers flows
    1717!    II_d Update surface and soil temperatures
    18 !    II_e Update the tendencies
    19 !    II_f Checking the stopping criterion
     18!    II_e Outputs
     19!    II_f Update the tendencies
     20!    II_g Checking the stopping criterion
    2021
    2122! III Output
    2223!    III_a Update surface value for the PCM start files
    2324!    III_b Write restart_evol.nc and restartfi_evol.nc
    24 !    III_c Write restartfi_PEM.nc
     25!    III_c Write restartpem.nc
    2526!------------------------
    2627
     
    6970use recomp_tend_co2_slope_mod,    only: recomp_tend_co2_slope
    7071use soil_pem_compute_mod,         only: soil_pem_compute
     72use writediagpem_mod,             only: writediagpem
    7173
    7274#ifndef CPP_STD
     
    598600!------------------------
    599601! I   Initialization
    600 !    I_h Read the PEMstart
    601 !------------------------
    602 call pemetat0("startfi_PEM.nc",ngrid,nsoilmx,nsoilmx_PEM,nslope,timelen,timestep,TI_PEM,tsoil_PEM,porefillingice_depth, &
     602!    I_h Read the startpem.nc
     603!------------------------
     604call pemetat0("startpem.nc",ngrid,nsoilmx,nsoilmx_PEM,nslope,timelen,timestep,TI_PEM,tsoil_PEM,porefillingice_depth, &
    603605              porefillingice_thickness,tsurf_ave_yr1, tsurf_ave, q_co2_PEM_phys, q_h2o_PEM_phys,ps_timeseries,          &
    604606              tsoil_phys_PEM_timeseries,tendencies_h2o_ice,tendencies_co2_ice,qsurf(:,igcm_co2,:),                      &
     
    665667        enddo
    666668    enddo
    667     call writediagfi(ngrid,'ps_ave','Global average pressure','Pa',0,global_ave_press_new)
    668669
    669670    if (adsorption_pem) then
     
    741742    call evol_co2_ice_s(qsurf(:,igcm_co2,:),tendencies_co2_ice,iim,jjm_value,ngrid,cell_area,nslope)
    742743
    743     do islope = 1,nslope
    744         write(str2(1:2),'(i2.2)') islope
    745         call writediagfi(ngrid,'h2o_ice_s_slope'//str2,'H2O ice','kg.m-2',2,qsurf(:,igcm_h2o_ice,islope))
    746         call writediagfi(ngrid,'tendencies_h2o_ice_slope'//str2,'H2O ice tend','kg.m-2.year-1',2,tendencies_h2o_ice(:,islope))
    747         call writediagfi(ngrid,'c2ice_slope'//str2,'CO2 ice','kg.m-2',2,qsurf(:,igcm_co2,islope))
    748         call writediagfi(ngrid,'tendencies_co2_ice_slope'//str2,'CO2 ice tend','kg.m-2.year-1',2,tendencies_co2_ice(:,islope))
    749     enddo
    750 
    751744!------------------------
    752745! II  Run
     
    754747!------------------------
    755748    write(*,*) "CO2 glacier flows"
    756 
    757749    if (co2glaciersflow) call co2glaciers_evol(timelen,ngrid,nslope,iflat,subslope_dist,def_slope_mean,vmr_co2_pem_phys,ps_timeseries, &
    758750                                               global_ave_press_GCM,global_ave_press_new,qsurf(:,igcm_co2,:),flag_co2flow,flag_co2flow_mesh)
    759751
    760752    write(*,*) "H2O glacier flows"
    761 
    762753    if (h2oglaciersflow) call h2oglaciers_evol(timelen,ngrid,nslope,iflat,subslope_dist,def_slope_mean,tsurf_ave,qsurf(:,igcm_h2o_ice,:),flag_h2oflow,flag_h2oflow_mesh)
    763 
    764     do islope = 1,nslope
    765         write(str2(1:2),'(i2.2)') islope
    766         call writediagfi(ngrid,'co2ice_slope'//str2,'CO2 ice','kg.m-2',2,qsurf(:,igcm_co2,islope))
    767         call writediagfi(ngrid,'tendencies_co2_ice_slope'//str2,'CO2 ice tend','kg.m-2.year-1',2,tendencies_co2_ice(:,islope))
    768         call writediagfi(ngrid,'Flow_co2ice_slope'//str2,'CO2 ice flow','Boolean',2,flag_co2flow(:,islope))
    769     enddo
    770754
    771755!------------------------
     
    845829    enddo
    846830
    847     do islope = 1,nslope
    848         write(str2(1:2),'(i2.2)') islope
    849         call writediagfi(ngrid,'tsurf_slope'//str2,'tsurf','K',2,tsurf(:,islope))
    850     enddo
    851 
    852831    if (soil_pem) then
    853832
     
    919898!------------------------
    920899! II  Run
    921 !    II_e Update the tendencies
     900!    II_e Outputs
     901!------------------------
     902    call writediagpem(ngrid,'ps_ave','Global average pressure','Pa',0,(/global_ave_press_new/))
     903    do islope = 1,nslope
     904        write(str2(1:2),'(i2.2)') islope
     905        call writediagpem(ngrid,'h2o_ice_s_slope'//str2,'H2O ice','kg.m-2',2,qsurf(:,igcm_h2o_ice,islope))
     906        call writediagpem(ngrid,'tendencies_h2o_ice_slope'//str2,'H2O ice tend','kg.m-2.year-1',2,tendencies_h2o_ice(:,islope))
     907        call writediagpem(ngrid,'tendencies_co2_ice_slope'//str2,'CO2 ice tend','kg.m-2.year-1',2,tendencies_co2_ice(:,islope))
     908        call writediagpem(ngrid,'co2ice_slope'//str2,'CO2 ice','kg.m-2',2,qsurf(:,igcm_co2,islope))
     909        call writediagpem(ngrid,'Flow_co2ice_slope'//str2,'CO2 ice flow','Boolean',2,flag_co2flow(:,islope))
     910        call writediagpem(ngrid,'tsurf_slope'//str2,'tsurf','K',2,tsurf(:,islope))
     911    enddo
     912
     913!------------------------
     914! II  Run
     915!    II_f Update the tendencies
    922916!------------------------
    923917    write(*,*) "Adaptation of the new co2 tendencies to the current pressure"
     
    927921!------------------------
    928922! II  Run
    929 !    II_f Checking the stopping criterion
     923!    II_g Checking the stopping criterion
    930924!------------------------
    931925    call criterion_waterice_stop(cell_area,ini_surf_h2o,qsurf(:,igcm_h2o_ice,:),STOPPING_water,ngrid,initial_h2o_ice)
     
    11361130!------------------------
    11371131! III Output
    1138 !    III_c Write restartfi_PEM.nc
    1139 !------------------------
    1140 call pemdem0("restartfi_PEM.nc",longitude,latitude,cell_area,nsoilmx_PEM,ngrid, &
     1132!    III_c Write restartpem.nc
     1133!------------------------
     1134call pemdem0("restartpem.nc",longitude,latitude,cell_area,nsoilmx_PEM,ngrid, &
    11411135             float(day_ini),0.,nslope,def_slope,subslope_dist)
    1142 call pemdem1("restartfi_PEM.nc",i_myear,nsoilmx_PEM,ngrid,nslope,tsoil_PEM, &
     1136call pemdem1("restartpem.nc",i_myear,nsoilmx_PEM,ngrid,nslope,tsoil_PEM, &
    11431137             TI_PEM, porefillingice_depth,porefillingice_thickness,         &
    11441138             co2_adsorbded_phys,h2o_adsorbded_phys,water_reservoir)
    1145 write(*,*) "restartfi_PEM.nc has been written"
     1139write(*,*) "restartpem.nc has been written"
    11461140
    11471141call info_run_PEM(year_iter,criterion_stop,i_myear,n_myear)
Note: See TracChangeset for help on using the changeset viewer.