! Written by Yun (Helen) He and Chris Ding, NERSC/LBNL. program main use MPH_module implicit none include 'mpif.h' integer POP_World, comp_name, COMM_cpl_ice integer myProc, myProc_global character*80 str(5), input_file, output_file, dynamics integer i, num_str, input_data, comm integer alpha real beta character*80 debug call MPH_debug(1) POP_World = MPH_multi_instance("POP") write(*,*)'exe_id=', MPH_exe_id() if (MPH_global_proc_id() == 0) call MPH_help ('on') call MPI_COMM_RANK (POP_World, myProc, ierr) call MPI_COMM_RANK (MPH_Global_World, myProc_global, ierr) write(*,*)'comp_name=', MPH_comp_name() write(*,*)'local_id=', myProc, ', global_id=', myProc_global write(*,*)'comp_id=', MPH_comp_id() write(*,*)'exe_id=', MPH_exe_id() write(*,*)'num_comps=', MPH_num_comps() call MPH_comm_join("coupler", "ice", COMM_cpl_ice) if (myProc == 0) then call MPI_SEND(myProc_global, 1, MPI_INTEGER, & MPH_Global_id("POP_control",0), 1000, MPH_Global_World, ierr) endif call MPH_get_strings(num_str,str) call MPH_get_argument(field_num=1, field_val=input_file) write(*,*)'input_file=', input_file open(30,file=input_file,status='old') read(30,*)input_data close(30) call MPH_get_argument(field_num=2, field_val=output_file) write(*,*)'output_file=', output_file open(40,file=output_file,status='unknown') write(40,*)str(1:num_str) write(40,*)input_data close(40) if (Proc_in_component("POP1", comm) .or. & Proc_in_component("POP2", comm)) then call MPH_get_argument("alpha", alpha) write(*,*)'alpha=', alpha endif if (Proc_in_component("POP3", comm)) then call MPH_get_argument("dynamics", dynamics) endif call MPH_get_argument("beta", beta) write(*,*)'beta=', beta call MPH_get_argument("debug", debug) write(*,*)'debug=', debug call MPI_FINALIZE (ierr) end program