! ! $Id $ ! SUBROUTINE read_data_GCM(fichnom,min_h2o_ice_s,min_co2_ice_s,iim_input,jjm_input,nlayer,vmr_co2_gcm,ps_GCM,timelen, & min_co2_ice_slope,min_h2o_ice_slope,nslope,tsurf_ave,tsoil_ave,tsurf_gcm,tsoil_gcm,TI_ave,q_co2_GCM,q_h2o_GCM,co2_ice_slope) use netcdf, only: nf90_open,NF90_NOWRITE,nf90_noerr,nf90_strerror, & nf90_get_var, nf90_inq_varid, nf90_inq_dimid, & nf90_inquire_dimension,nf90_close use comsoil_h, only: nsoilmx IMPLICIT NONE !======================================================================= ! ! Read initial confitions file ! !======================================================================= include "dimensions.h" !=============================================================================== ! Arguments: CHARACTER(LEN=*), INTENT(IN) :: fichnom !--- FILE NAME INTEGER :: iim_input,jjm_input,nlayer,nslope REAL, ALLOCATABLE :: h2o_ice_s(:,:,:) ! h2o_ice_s of the concatenated file REAL, ALLOCATABLE :: co2_ice_s(:,:,:) ! co2_ice_s of the concatenated file REAL, ALLOCATABLE :: h2o_ice_s_slope(:,:,:,:) ! co2_ice_s of the concatenated file REAL, INTENT(OUT) :: min_h2o_ice_s(iim_input+1,jjm_input+1) ! Minimum of h2o_ice_s of the year REAL, INTENT(OUT) :: min_co2_ice_s(iim_input+1,jjm_input+1) ! Minimum of co2_ice_s of the year REAL, INTENT(OUT) :: min_co2_ice_slope(iim_input+1,jjm_input+1,nslope) ! Minimum of co2_ice slope of the year REAL, INTENT(OUT) :: min_h2o_ice_slope(iim_input+1,jjm_input+1,nslope) ! Minimum of co2_ice slope of the year ! REAL, ALLOCATABLE :: vmr_co2_gcm(:,:,:) !!!!vmr_co2_phys_gcm(iim_input+1,jjm_input+1,timelen) REAL, INTENT(OUT) :: vmr_co2_gcm(iim_input+1,jjm_input+1,2676) !!!!vmr_co2_phys_gcm(iim_input+1,jjm_input+1,timelen) ! REAL, ALLOCATABLE :: q_h2o_GCM(:,:,:) REAL, INTENT(OUT) :: q_h2o_GCM(iim_input+1,jjm_input+1,2676) REAL, INTENT(OUT) :: q_co2_GCM(iim_input+1,jjm_input+1,2676) ! REAL, ALLOCATABLE :: q_co2_GCM(:,:,:) REAL, ALLOCATABLE :: q1_co2_GCM(:,:,:) ! real, INTENT(OUT) :: vmr_co2_phys_gcm(:,:) !!!!vmr_co2_gcm(ngrid,timelen) ! REAL, ALLOCATABLE :: ps_GCM(:,:,:) REAL, INTENT(OUT) :: ps_GCM(iim_input+1,jjm_input+1,2676) !SOIL REAL, INTENT(OUT) :: tsurf_ave(iim_input+1,jjm_input+1,nslope) ! Average surface temperature of the concatenated file REAL, INTENT(OUT) :: tsoil_ave(iim_input+1,jjm_input+1,nsoilmx,nslope) ! Average soil temperature of the concatenated file REAL ,INTENT(OUT) :: tsurf_gcm(iim_input+1,jjm_input+1,nslope,2676) ! Surface temperature of the concatenated file REAL , INTENT(OUT) :: tsoil_gcm(iim_input+1,jjm_input+1,nsoilmx,nslope,2676) ! Soil temperature of the concatenated file REAL :: TI_gcm(iim_input+1,jjm_input+1,nsoilmx,nslope,2676) ! Thermal Inertia of the concatenated file REAL, INTENT(OUT) :: TI_ave(iim_input+1,jjm_input+1,nsoilmx,nslope) ! Average Thermal Inertia of the concatenated file REAL, INTENT(OUT) :: co2_ice_slope(iim_input+1,jjm_input+1,nslope,2676) ! Minimum of co2_ice slope of the year !=============================================================================== ! Local Variables CHARACTER(LEN=256) :: msg, var, modname INTEGER,PARAMETER :: length=100 INTEGER :: iq, fID, vID, idecal INTEGER :: ierr CHARACTER(len=12) :: start_file_type="earth" ! default start file type REAL,ALLOCATABLE :: time(:) ! times stored in start INTEGER :: timelen ! number of times stored in the file INTEGER :: indextime ! index of selected time INTEGER :: edges(4),corner(4) INTEGER :: i,j,t real,save :: m_co2, m_noco2, A , B, mmean INTEGER :: islope CHARACTER*2 :: num !----------------------------------------------------------------------- modname="pemetat0" m_co2 = 44.01E-3 ! CO2 molecular mass (kg/mol) m_noco2 = 33.37E-3 ! Non condensible mol mass (kg/mol) A =(1/m_co2 - 1/m_noco2) B=1/m_noco2 ! Open initial state NetCDF file var=fichnom CALL err(NF90_OPEN(var,NF90_NOWRITE,fID),"open",var) ierr = nf90_inq_varid (fID, "temps", vID) IF (ierr .NE. nf90_noerr) THEN write(*,*)"pemetat0: Le champ est absent" write(*,*)"pemetat0: J essaie