subroutine evolps(pls,pps) use datafile_mod use comcstfi_mod, only: pi use mod_phys_lmdz_para, only : is_master implicit none !================================================================== ! Purpose ! ------- ! Get tracer fields according to the solar longitude (for 1D purpose for now) ! ! Inputs ! ------ ! pls solar longitude ! ! Outputs ! ------- ! pps surface pressure ! Both ! ---- ! ! Authors ! ------- ! Tanguy Bertrand !================================================================== !----------------------------------------------------------------------- ! Arguments REAL,INTENT(IN) :: pls REAL,INTENT(OUT) :: pps !----------------------------------------------------------------------- ! Local variables LOGICAL,SAVE :: firstcall=.true. !$OMP THREADPRIVATE(firstcall) integer Nfine parameter(Nfine=143) integer ifine character(len=100) :: file_path real,save,allocatable :: lssdat(:) real,save,allocatable :: psdat(:) !---------------- INPUT ------------------------------------------------ IF (firstcall) then firstcall=.false. !$OMP MASTER file_path=trim(datadir)//'/cycle_ps.txt' if (is_master) print*,file_path open(222,file=file_path,form='formatted') if(.not.allocated(lssdat)) then allocate(lssdat(Nfine)) endif if(.not.allocated(psdat)) then allocate(psdat(Nfine)) endif do ifine=1,Nfine read(222,*) lssdat(ifine), psdat(ifine) enddo close(222) !$OMP END MASTER !$OMP BARRIER ENDIF CALL interp_line(lssdat,psdat,Nfine,pls*180./pi,pps,1) !if (is_master) write(*,*) 'pps=',pps end subroutine evolps