Changeset 3384


Ignore:
Timestamp:
Jun 18, 2024, 5:42:24 PM (6 months ago)
Author:
jbclement
Message:

PEM:
Correction related to r3330 for the initialization of the global average pressure taken from the PCM: it has to be done before the call of "pemetat0".
JBC

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

Legend:

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

    r3383 r3384  
    371371
    372372== 17/06/2024 == JBC
    373 Small correction for the initialization value of dtphys + Corrections for the launching script.
     373Small correction for the initialization value of 'dtphys' + Corrections for the launching script.
     374
     375== 18/06/2024 == JBC
     376Correction related to r3330 for the initialization of the global average pressure taken from the PCM: it has to be done before the call of "pemetat0".
  • trunk/LMDZ.COMMON/libf/evolution/pem.F90

    r3383 r3384  
    77!    I_e Initialization of the PEM variable and soil
    88!    I_f Compute tendencies
    9 !    I_g Read the "startpem.nc"
    10 !    I_h Save the initial situation
     9!    I_g Save the initial situation
     10!    I_h Read the "startpem.nc"
    1111!    I_i Compute orbit criterion
    1212
     
    598598!------------------------
    599599! I   Initialization
    600 !    I_g Read the "startpem.nc"
     600!    I_g Save the initial situation
     601!------------------------
     602allocate(zplev_PCM(ngrid,nlayer + 1))
     603Total_surface = 0.
     604do ig = 1,ngrid
     605    Total_surface = Total_surface + cell_area(ig)
     606    zplev_PCM(ig,:) = ap + bp*ps_start_PCM(ig)
     607enddo
     608global_avg_press_old = sum(cell_area*ps_start_PCM)/Total_surface
     609global_avg_press_PCM = global_avg_press_old
     610global_avg_press_new = global_avg_press_old
     611write(*,*) "Total surface of the planet =", Total_surface
     612write(*,*) "Initial global average pressure =", global_avg_press_PCM
     613
     614!------------------------
     615! I   Initialization
     616!    I_h Read the "startpem.nc"
    601617!------------------------
    602618allocate(co2_ice(ngrid,nslope),h2o_ice(ngrid,nslope))
     
    616632              watersurf_density_avg,watersoil_density_PEM_avg,co2_adsorbded_phys,delta_co2_adsorbded,                &
    617633              h2o_adsorbded_phys,delta_h2o_adsorbded,stratif)
     634
     635! We save the places where h2o ice is sublimating
     636! We compute the surface of h2o ice sublimating
     637allocate(ini_co2ice_sublim(ngrid,nslope),ini_h2oice_sublim(ngrid,nslope),is_co2ice_ini(ngrid,nslope))
     638co2ice_ini_surf = 0.
     639h2oice_ini_surf = 0.
     640ini_co2ice_sublim = .false.
     641ini_h2oice_sublim = .false.
     642is_co2ice_ini = .false.
     643co2ice_disappeared = .false.
     644do i = 1,ngrid
     645    do islope = 1,nslope
     646        if (co2_ice(i,islope) > 0.) is_co2ice_ini(i,islope) = .true.
     647        if (tend_co2_ice(i,islope) < 0. .and. co2_ice(i,islope) > 0.) then
     648            ini_co2ice_sublim(i,islope) = .true.
     649            co2ice_ini_surf = co2ice_ini_surf + cell_area(i)*subslope_dist(i,islope)
     650        endif
     651        if (tend_h2o_ice(i,islope) < 0. .and. h2o_ice(i,islope) > 0.) then
     652            ini_h2oice_sublim(i,islope) = .true.
     653            h2oice_ini_surf = h2oice_ini_surf + cell_area(i)*subslope_dist(i,islope)
     654        endif
     655    enddo
     656enddo
     657write(*,*) "Total initial surface of co2 ice sublimating (slope) =", co2ice_ini_surf
     658write(*,*) "Total initial surface of h2o ice sublimating (slope) =", h2oice_ini_surf
    618659
    619660delta_h2o_icetablesublim = 0.
     
    643684endif ! adsorption
    644685deallocate(tsurf_avg_yr1)
    645 
    646 !------------------------
    647 ! I   Initialization
    648 !    I_h Save the initial situation
    649 !------------------------
    650 ! We save the places where h2o ice is sublimating
    651 ! We compute the surface of h2o ice sublimating
    652 allocate(ini_co2ice_sublim(ngrid,nslope),ini_h2oice_sublim(ngrid,nslope),is_co2ice_ini(ngrid,nslope))
    653 co2ice_ini_surf = 0.
    654 h2oice_ini_surf = 0.
    655 Total_surface = 0.
    656 ini_co2ice_sublim = .false.
    657 ini_h2oice_sublim = .false.
    658 is_co2ice_ini = .false.
    659 co2ice_disappeared = .false.
    660 do i = 1,ngrid
    661     Total_surface = Total_surface + cell_area(i)
    662     do islope = 1,nslope
    663         if (co2_ice(i,islope) > 0.) is_co2ice_ini(i,islope) = .true.
    664         if (tend_co2_ice(i,islope) < 0. .and. co2_ice(i,islope) > 0.) then
    665             ini_co2ice_sublim(i,islope) = .true.
    666             co2ice_ini_surf = co2ice_ini_surf + cell_area(i)*subslope_dist(i,islope)
    667         endif
    668         if (tend_h2o_ice(i,islope) < 0. .and. h2o_ice(i,islope) > 0.) then
    669             ini_h2oice_sublim(i,islope) = .true.
    670             h2oice_ini_surf = h2oice_ini_surf + cell_area(i)*subslope_dist(i,islope)
    671         endif
    672     enddo
    673 enddo
    674 
    675 write(*,*) "Total initial surface of co2 ice sublimating (slope) =", co2ice_ini_surf
    676 write(*,*) "Total initial surface of h2o ice sublimating (slope) =", h2oice_ini_surf
    677 write(*,*) "Total surface of the planet =", Total_surface
    678 allocate(zplev_PCM(ngrid,nlayer + 1))
    679 
    680 do ig = 1,ngrid
    681     zplev_PCM(ig,:) = ap + bp*ps_start_PCM(ig)
    682 enddo
    683 
    684 global_avg_press_old = sum(cell_area*ps_start_PCM)/Total_surface
    685 global_avg_press_PCM = global_avg_press_old
    686 global_avg_press_new = global_avg_press_old
    687 write(*,*) "Initial global average pressure =", global_avg_press_PCM
    688686
    689687!------------------------
Note: See TracChangeset for help on using the changeset viewer.