! ! $Id $ ! SUBROUTINE pemetat0(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) 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 IMPLICIT NONE !======================================================================= ! ! Read initial confitions file ! !======================================================================= include "dimensions.h" !=============================================================================== ! Arguments: ! INPUT: CHARACTER(LEN=*), INTENT(IN) :: fichnom !--- FILE NAME INTEGER :: iim_input,jjm_input,nlayer,nslope ! LOCAL: 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(:,:,:,:) ! h2o_ice_s slope of the concatenated file REAL, ALLOCATABLE :: co2_ice_s_slope(:,:,:,:) ! co2_ice_s slope of the concatenated file REAL, ALLOCATABLE :: q_co2_GCM(:,:,:) ! vmr of co2 of the first layer in the GCM year ! OUTPUT: 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_h2o_ice_slope(iim_input+1,jjm_input+1,nslope) ! Minimum of co2_ice slope 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) :: vmr_co2_gcm(iim_input+1,jjm_input+1,2676) ! vmr of co2 of the first layer in the GCM year REAL, INTENT(OUT) :: ps_GCM(iim_input+1,jjm_input+1,2676) ! Surface pressure in the GCM 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