Ignore:
Timestamp:
Feb 2, 2024, 5:30:15 PM (11 months ago)
Author:
jbclement
Message:

PEM:
Small correction following r3189 in the case where "soilpem = .false.".
JBC

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

Legend:

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

    r3190 r3199  
    220220Fixing bug in writediagpem: soil layers written in the diagpem where those of the PCM and not the PEM.
    221221
     222== 02/02/2023 == JBC
     223Small correction following r3189 in the case where "soilpem = .false.".
  • trunk/LMDZ.COMMON/libf/evolution/pem.F90

    r3189 r3199  
    477477
    478478allocate(tsoil_ave(ngrid,nsoilmx,nslope))
    479 allocate(tsoil_anom(ngrid,nsoilmx,nslope))
    480479allocate(watersoil_density_PEM_ave(ngrid,nsoilmx_PEM,nslope))
    481480allocate(vmr_co2_PCM(ngrid,timelen))
     
    502501
    503502write(*,*) "Downloading data Y1..."
    504 call read_data_PCM("data_PCM_Y1.nc",timelen, iim,jjm_value,ngrid,nslope,vmr_co2_PCM,ps_timeseries,min_co2_ice(:,:,1),min_h2o_ice(:,:,1), &
     503call read_data_PCM("data_PCM_Y1.nc",timelen,iim,jjm_value,ngrid,nslope,vmr_co2_PCM,ps_timeseries,min_co2_ice(:,:,1),min_h2o_ice(:,:,1), &
    505504                   tsurf_avg_yr1,tsoil_ave,tsurf_PCM_timeseries,tsoil_PCM_timeseries,q_co2_PEM_phys,q_h2o_PEM_phys,                      &
    506505                   co2_ice_PCM,watersurf_density_ave,watersoil_density_timeseries)
    507 write(*,*) "Downloading data Y1 done"
     506write(*,*) "Downloading data Y1 done!"
    508507
    509508! Then we read the evolution of water and co2 ice (and the mass mixing ratio) over the second year of the PCM run, saving only the minimum value
    510 write(*,*) "Downloading data Y2"
     509write(*,*) "Downloading data Y2..."
    511510call read_data_PCM("data_PCM_Y2.nc",timelen,iim,jjm_value,ngrid,nslope,vmr_co2_PCM,ps_timeseries,min_co2_ice(:,:,2),min_h2o_ice(:,:,2), &
    512511                   tsurf_ave,tsoil_ave,tsurf_PCM_timeseries,tsoil_PCM_timeseries,q_co2_PEM_phys,q_h2o_PEM_phys,                         &
    513512                   co2_ice_PCM,watersurf_density_ave,watersoil_density_timeseries)
    514 write(*,*) "Downloading data Y2 done"
     513write(*,*) "Downloading data Y2 done!"
    515514
    516515!------------------------
     
    525524call ini_ice_table_porefilling(ngrid,nslope)
    526525
    527 tsoil_anom(:,:,:) = tsoil(:,:,:) - tsoil_ave(:,:,:) ! compute anomaly between Tsoil(t) in the startfi - <Tsoil> to recompute properly tsoil in the restart
    528526if (soil_pem) then
     527    allocate(tsoil_anom(ngrid,nsoilmx,nslope))
     528    tsoil_anom = tsoil - tsoil_ave ! compute anomaly between Tsoil(t) in the startfi - <Tsoil> to recompute properly tsoil in the restart
    529529    call soil_settings_PEM(ngrid,nslope,nsoilmx_PEM,nsoilmx,inertiesoil,TI_PEM)
    530530    tsoil_PEM(:,1:nsoilmx,:) = tsoil_ave
     
    989989    call interpol_TI_PEM2PCM(ngrid,nslope,nsoilmx_PEM,nsoilmx,TI_PEM,inertiesoil)
    990990    tsoil = tsoil_PEM(:,1:nsoilmx,:) + tsoil_anom
     991    deallocate(tsoil_anom)
    991992#ifndef CPP_STD
    992993    flux_geo = fluxgeo
Note: See TracChangeset for help on using the changeset viewer.