program main USE mod_prism integer*4 tile, subs, trd, ierr integer*4 LLm,Lm,MMm,Mm,N, LLm0,MMm0 parameter (LLm0=159, MMm0=209, N=32) parameter (LLm=LLm0, MMm=MMm0) integer*4 Lmmpi,Mmmpi,iminmpi,imaxmpi,jminmpi,jmaxmpi common /comm_setup_mpi1/ Lmmpi,Mmmpi common /comm_setup_mpi2/ iminmpi,imaxmpi,jminmpi,jmaxmpi integer*4 NSUB_X, NSUB_E, NPP integer*4 NP_XI, NP_ETA, NNODES parameter (NP_XI=2, NP_ETA=2, NNODES=NP_XI*NP_ETA) parameter (NPP=1) parameter (NSUB_X=1, NSUB_E=1) integer*4 NWEIGHT parameter (NWEIGHT=1000) integer*4 stdout, Np, padd_X,padd_E common /stdout/stdout parameter (Np=N+1) parameter (Lm=(LLm+NP_XI-1)/NP_XI, Mm=(MMm+NP_ETA-1)/NP_ETA) parameter (padd_X=(Lm+2)/2-(Lm+1)/2) parameter (padd_E=(Mm+2)/2-(Mm+1)/2) integer*4 NSA, N2d,N3d, size_XI,size_ETA integer*4 se,sse, sz,ssz parameter (NSA=28) parameter (size_XI=7+(Lm+NSUB_X-1)/NSUB_X) parameter (size_ETA=7+(Mm+NSUB_E-1)/NSUB_E) parameter (sse=size_ETA/Np, ssz=Np/size_ETA) parameter (se=sse/(sse+ssz), sz=1-se) parameter (N2d=size_XI*(se*size_ETA+sz*Np)) parameter (N3d=size_XI*size_ETA*Np) real Vtransform parameter (Vtransform=2) integer*4 NT, NTA, itemp, NTot integer*4 ntrc_temp, ntrc_salt, ntrc_pas, ntrc_bio, ntrc_sed integer*4 ntrc_subs, ntrc_substot parameter (itemp=1) parameter (ntrc_temp=1) parameter (ntrc_salt=1) parameter (ntrc_pas=0) parameter (ntrc_bio=0) parameter (ntrc_subs=0, ntrc_substot=0) parameter (ntrc_sed=0) parameter (NTA=itemp+ntrc_salt) parameter (NT=itemp+ntrc_salt+ntrc_pas+ntrc_bio+ntrc_sed) parameter (NTot=NT) integer*4 ntrc_diats, ntrc_diauv, ntrc_diabio integer*4 ntrc_diavrt, ntrc_diaek, ntrc_diapv integer*4 ntrc_diaeddy, ntrc_surf & , isalt parameter (isalt=itemp+1) parameter (ntrc_diabio=0) parameter (ntrc_diats=0) parameter (ntrc_diauv=0) parameter (ntrc_diavrt=0) parameter (ntrc_diaek=0) parameter (ntrc_diapv=0) parameter (ntrc_diaeddy=0) parameter (ntrc_surf=0) real A2d(N2d,NSA,0:NPP-1), A3d(N3d,7,0:NPP-1) integer*4 B2d(N2d,0:NPP-1) common/private_scratch/ A2d,A3d common/private_scratch_bis/ B2d real dt, dtfast, time, time2, time_start, tdays, start_time integer*4 ndtfast, iic, kstp, krhs, knew, next_kstp & , iif, nstp, nrhs, nnew, nbstep3d logical PREDICTOR_2D_STEP common /time_indices/ dt,dtfast, time, time2,time_start, tdays, & ndtfast, iic, kstp, krhs, knew, next_kstp, & start_time, & iif, nstp, nrhs, nnew, nbstep3d, & PREDICTOR_2D_STEP real time_avg, time2_avg, rho0 & , rdrg, rdrg2, Cdb_min, Cdb_max, Zobt & , xl, el, visc2, visc4, gamma2 real theta_s, theta_b, Tcline, hc real sc_w(0:N), Cs_w(0:N), sc_r(N), Cs_r(N) real rx0, rx1 real tnu2(NT),tnu4(NT) real weight(6,0:NWEIGHT) real x_sponge, v_sponge real tauT_in, tauT_out, tauM_in, tauM_out integer*4 numthreads, ntstart, ntimes, ninfo & , nfast, nrrec, nrst, nwrt & , ntsavg, navg logical ldefhis logical got_tini(NT) common /scalars_main/ & time_avg, time2_avg, rho0, rdrg, rdrg2 & , Zobt, Cdb_min, Cdb_max & , xl, el, visc2, visc4, gamma2 & , theta_s, theta_b, Tcline, hc & , sc_w, Cs_w, sc_r, Cs_r & , rx0, rx1 & , tnu2, tnu4 & , weight & , x_sponge, v_sponge & , tauT_in, tauT_out, tauM_in, tauM_out & , numthreads, ntstart, ntimes, ninfo & , nfast, nrrec, nrst, nwrt & , ntsavg, navg & , got_tini & , ldefhis logical synchro_flag common /sync_flag/ synchro_flag integer*4 may_day_flag integer*4 tile_count, first_time, bc_count common /communicators_i/ & may_day_flag, tile_count, first_time, bc_count real hmin, hmax, grdmin, grdmax, Cu_min, Cu_max common /communicators_r/ & hmin, hmax, grdmin, grdmax, Cu_min, Cu_max real lonmin, lonmax, latmin, latmax common /communicators_lonlat/ & lonmin, lonmax, latmin, latmax real*8 Cu_Adv3d, Cu_W, Cu_Nbq_X, Cu_Nbq_Y, Cu_Nbq_Z integer*4 i_cx_max, j_cx_max, k_cx_max common /diag_vars/ Cu_Adv3d, Cu_W, & i_cx_max, j_cx_max, k_cx_max real*8 volume, avgke, avgpe, avgkp, bc_crss common /communicators_rq/ & volume, avgke, avgpe, avgkp, bc_crss real*4 CPU_time(0:31,0:NPP) integer*4 proc(0:31,0:NPP),trd_count common /timers_roms/CPU_time,proc,trd_count logical EAST_INTER2, WEST_INTER2, NORTH_INTER2, SOUTH_INTER2 logical EAST_INTER, WEST_INTER, NORTH_INTER, SOUTH_INTER logical CORNER_SW,CORNER_NW,CORNER_NE,CORNER_SE integer*4 mynode, mynode2, ii,jj, p_W,p_E,p_S,p_N, p_SW,p_SE, & p_NW,p_NE,NNODES2 common /comm_setup/ mynode, mynode2, ii,jj, p_W,p_E,p_S,p_N, & p_SW,p_SE, p_NW,p_NE, EAST_INTER, WEST_INTER, NORTH_INTER, & SOUTH_INTER, EAST_INTER2, WEST_INTER2, NORTH_INTER2, & SOUTH_INTER2, & CORNER_SW,CORNER_NW,CORNER_NE,CORNER_SE,NNODES2 real pi, deg2rad, rad2deg parameter (pi=3.14159265358979323846D0, deg2rad=pi/180.D0, & rad2deg=180.D0/pi) real Eradius, Erotation, g, day2sec,sec2day, jul_off, & year2day,day2year parameter (Eradius=6371315.0D0, Erotation=7.292115090D-5, & day2sec=86400.D0, sec2day=1.D0/86400.D0, & year2day=365.25D0, day2year=1.D0/365.25D0, & jul_off=2440000.D0) parameter (g=9.81D0) real Cp parameter (Cp=3985.0D0) real vonKar parameter (vonKar=0.41D0) real spval parameter (spval=-999.0D0) logical mask_val parameter (mask_val = .true.) integer*4 filetype_his, filetype_avg & ,filetype_dia, filetype_dia_avg & ,filetype_diaM, filetype_diaM_avg & ,filetype_diags_vrt, filetype_diags_vrt_avg & ,filetype_diags_ek, filetype_diags_ek_avg & ,filetype_diags_pv, filetype_diags_pv_avg & ,filetype_diags_eddy_avg & ,filetype_surf, filetype_surf_avg & ,filetype_diabio, filetype_diabio_avg parameter (filetype_his=1, filetype_avg=2, & filetype_dia=3, filetype_dia_avg=4, & filetype_diaM=5, filetype_diaM_avg=6, & filetype_diags_vrt=7, filetype_diags_vrt_avg=8, & filetype_diags_ek=9, filetype_diags_ek_avg=10, & filetype_diags_pv=11, filetype_diags_pv_avg=12, & filetype_diags_eddy_avg=17, & filetype_surf=13, filetype_surf_avg=14, & filetype_diabio=15,filetype_diabio_avg=16) integer*4 iloop, indextemp integer*4 indxTime, indxZ, indxUb, indxVb parameter (indxTime=1, indxZ=2, indxUb=3, indxVb=4) integer*4 indxU, indxV parameter (indxU=6, indxV=7) integer*4 indxT parameter (indxT=indxV+1) integer*4 indxS parameter (indxS=indxV+ntrc_temp+1) integer*4 indxBSD, indxBSS parameter (indxBSD=indxV+ntrc_temp+ntrc_salt+ntrc_pas+ntrc_bio+1, & indxBSS=101) integer*4 indxO, indxW, indxR, indxVisc, indxDiff, indxAkv, & indxAkt parameter (indxO=indxV+ntrc_temp+ntrc_salt+ntrc_pas+ntrc_bio & +ntrc_sed+ntrc_substot & +ntrc_diats+ntrc_diauv+ntrc_diavrt+ntrc_diaek & +ntrc_diapv+ntrc_diaeddy+ntrc_surf+ntrc_diabio+1, & indxW=indxO+1, indxR=indxO+2, indxVisc=indxO+3, & indxDiff=indxO+4,indxAkv=indxO+5, indxAkt=indxO+6) integer*4 indxAks parameter (indxAks=indxAkv+ntrc_temp+4) integer*4 indxHbl parameter (indxHbl=indxAkv+ntrc_temp+5) integer*4 indxHbbl parameter (indxHbbl=indxAkv+ntrc_temp+6) integer*4 indxSSH parameter (indxSSH=indxAkv+ntrc_temp+12) integer*4 indxbvf parameter (indxbvf=indxSSH+1) integer*4 indxSUSTR, indxSVSTR parameter (indxSUSTR=indxSSH+2, indxSVSTR=indxSSH+3) integer*4 indxTime2 parameter (indxTime2=indxSSH+4) integer*4 indxShflx, indxShflx_rsw parameter (indxShflx=indxSUSTR+5) integer*4 indxSwflx parameter (indxSwflx=indxShflx+1, indxShflx_rsw=indxShflx+2) integer*4 indxSST, indxdQdSST parameter (indxSST=indxShflx_rsw+1, indxdQdSST=indxShflx_rsw+2) integer*4 indxWstr parameter (indxWstr=indxSUSTR+23) integer*4 indxUWstr parameter (indxUWstr=indxSUSTR+24) integer*4 indxVWstr parameter (indxVWstr=indxSUSTR+25) integer*4 indxBostr parameter (indxBostr=indxSUSTR+26) integer*4 indxBustr, indxBvstr parameter (indxBustr=indxSUSTR+27, indxBvstr=indxBustr+1) integer*4 indxWWA,indxWWD,indxWWP,indxWEB,indxWED,indxWER parameter (indxWWA=indxSUSTR+42, indxWWD=indxWWA+1, & indxWWP=indxWWA+2 & ) integer*4 r2dvar, u2dvar, v2dvar, p2dvar, r3dvar, & u3dvar, v3dvar, p3dvar, w3dvar, & pw3dvar, b3dvar parameter (r2dvar=0, u2dvar=1, v2dvar=2, p2dvar=3, & r3dvar=4, u3dvar=5, v3dvar=6, p3dvar=7, w3dvar=8, & pw3dvar=11, b3dvar=12) integer*4 xi_rho,xi_u, eta_rho,eta_v parameter (xi_rho=LLm+2, xi_u=xi_rho-1, & eta_rho=MMm+2, eta_v=eta_rho-1) integer*4 ncidfrc, ncidbulk, ncidclm, ntsms & , ncidqbar, ncidbtf & , ntsrf, ntssh, ntsst, ntsss, ntuclm & , ntbulk, ntqbar, ntww integer*4 nttclm(NT), ntstf(NT), nttsrc(NT) & , ntbtf(NT) integer*4 ncidrst, nrecrst, nrpfrst & , rstTime, rstTime2, rstTstep, rstZ, rstUb, rstVb & , rstU, rstV integer*4 rstT(NT) integer*4 rstHbl integer*4 rstHbbl integer*4 ncidhis, nrechis, nrpfhis & , hisTime, hisTime2, hisTstep, hisZ, hisUb, hisVb & , hisBostr, hisWstr, hisUWstr, hisVWstr & , hisBustr, hisBvstr & , hisShflx, hisSwflx, hisShflx_rsw, hisBhflx, hisBwflx & , hisU, hisV, hisR, hisHbl, hisHbbl & , hisO, hisW, hisVisc, hisDiff & , hisAkv, hisAkt, hisAks & , hisbvf integer*4 hisT(NT) integer*4 ncidavg, nrecavg, nrpfavg & , avgTime, avgTime2, avgTstep, avgZ, avgUb, avgVb & , avgBostr, avgWstr, avgUwstr, avgVwstr & , avgBustr, avgBvstr & , avgShflx, avgSwflx, avgShflx_rsw, avgBhflx, avgBwflx & , avgU, avgV, avgR, avgHbl, avgHbbl & , avgO, avgW, avgVisc, avgDiff & , avgAkv, avgAkt, avgAks & , avgbvf integer*4 avgT(NT) logical wrthis(800+NT) & , wrtavg(800+NT) common/incscrum/ & ncidfrc, ncidbulk,ncidclm, ncidqbar, ncidbtf & , ntsms, ntsrf, ntssh, ntsst & , ntuclm, ntsss, ntbulk, ntqbar, ntww & , nttclm, ntstf, nttsrc, ntbtf & , ncidrst, nrecrst, nrpfrst & , rstTime, rstTime2, rstTstep, rstZ, rstUb, rstVb & , rstU, rstV & , rstT & , rstHbl & , rstHbbl & , ncidhis, nrechis, nrpfhis & , hisTime, hisTime2, hisTstep, hisZ, hisUb, hisVb & , hisBostr, hisWstr, hisUWstr, hisVWstr & , hisBustr, hisBvstr & , hisShflx, hisSwflx, hisShflx_rsw & , hisBhflx, hisBwflx & , hisU, hisV, hisT, hisR & , hisO, hisW, hisVisc, hisDiff & , hisAkv, hisAkt, hisAks & , hisHbl, hisHbbl & , hisbvf & , ncidavg, nrecavg, nrpfavg & , avgTime, avgTime2, avgTstep, avgZ, avgUb, avgVb & , avgBostr, avgWstr, avgUWstr, avgVWstr & , avgBustr, avgBvstr & , avgShflx, avgSwflx, avgShflx_rsw & , avgBhflx, avgBwflx & , avgU, avgV & , avgT & , avgR & , avgO, avgW, avgVisc, avgDiff & , avgAkv, avgAkt, avgAks & , avgHbl, avgHbbl & , avgbvf & , wrthis & , wrtavg character*80 date_str, title character*80 origin_date, start_date_run, xios_origin_date integer*4 start_day, start_month, start_year & , start_hour, start_minute, start_second & , origin_day, origin_month, origin_year & , origin_hour, origin_minute, origin_second REAL(kind=8) :: origin_date_in_sec, xios_origin_date_in_sec character*180 ininame, grdname, hisname & , rstname, frcname, bulkname, usrname & , qbarname, tsrcname & , btfname & , avgname & , bry_file character*75 vname(20, 800) common /cncscrum/ date_str, title & , origin_date, start_date_run & , xios_origin_date & , ininame, grdname, hisname & , rstname, frcname, bulkname, usrname & , qbarname, tsrcname & , btfname, origin_date_in_sec & , xios_origin_date_in_sec & , start_day, start_month, start_year & , start_hour, start_minute, start_second & , origin_day, origin_month, origin_year & , origin_hour, origin_minute, origin_second & , avgname & , bry_file & , vname real h(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real hinv(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real f(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real fomn(-1:Lm+2+padd_X,-1:Mm+2+padd_E) common /grid_h/h /grid_hinv/hinv /grid_f/f /grid_fomn/fomn real angler(-1:Lm+2+padd_X,-1:Mm+2+padd_E) common /grid_angler/angler real latr(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real lonr(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real latu(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real lonu(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real latv(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real lonv(-1:Lm+2+padd_X,-1:Mm+2+padd_E) common /grid_latr/latr /grid_lonr/lonr common /grid_latu/latu /grid_lonu/lonu common /grid_latv/latv /grid_lonv/lonv real pm(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real pn(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real om_r(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real on_r(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real om_u(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real on_u(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real om_v(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real on_v(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real om_p(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real on_p(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real pn_u(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real pm_v(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real pm_u(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real pn_v(-1:Lm+2+padd_X,-1:Mm+2+padd_E) common /metrics_pm/pm /metrics_pn/pn common /metrics_omr/om_r /metrics_on_r/on_r common /metrics_omu/om_u /metrics_on_u/on_u common /metrics_omv/om_v /metrics_on_v/on_v common /metrics_omp/om_p /metrics_on_p/on_p common /metrics_pnu/pn_u /metrics_pmv/pm_v common /metrics_pmu/pm_u /metrics_pnv/pn_v real dmde(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real dndx(-1:Lm+2+padd_X,-1:Mm+2+padd_E) common /metrics_dmde/dmde /metrics_dndx/dndx real pmon_p(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real pmon_r(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real pmon_u(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real pnom_p(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real pnom_r(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real pnom_v(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real grdscl(-1:Lm+2+padd_X,-1:Mm+2+padd_E) common /metrics_pmon_p/pmon_p /metrics_pnom_p/pnom_p common /metrics_pmon_r/pmon_r /metrics_pnom_r/pnom_r common /metrics_pmon_u/pmon_u /metrics_pnom_v/pnom_v common /metrics_grdscl/grdscl real rmask(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real pmask(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real umask(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real vmask(-1:Lm+2+padd_X,-1:Mm+2+padd_E) real pmask2(-1:Lm+2+padd_X,-1:Mm+2+padd_E) common /mask_r/rmask common /mask_p/pmask common /mask_u/umask common /mask_v/vmask common /mask_p2/pmask2 real zob(-1:Lm+2+padd_X,-1:Mm+2+padd_E) common /Z0B_VAR/zob real zeta(-1:Lm+2+padd_X,-1:Mm+2+padd_E,4) real ubar(-1:Lm+2+padd_X,-1:Mm+2+padd_E,4) real vbar(-1:Lm+2+padd_X,-1:Mm+2+padd_E,4) common /ocean_zeta/zeta common /ocean_ubar/ubar common /ocean_vbar/vbar !$AGRIF_DO_NOT_TREAT INTEGER*4 :: ocean_grid_comm common /cpl_comm/ ocean_grid_comm !$AGRIF_END_DO_NOT_TREAT INTEGER*4 :: comp_id CHARACTER(len=6) :: comp_name = 'crocox' INTEGER*4 :: comp_ierror INTEGER*4 :: oasis_part_id INTEGER*4 :: oasis_var_nodims(2) INTEGER*4 :: oasis_var_shape(4) INTEGER*4 :: oasis_var_type INTEGER*4 , dimension(5) :: oasis_ig_paral INTEGER*4, PARAMETER :: nmaxfld = 60 INTEGER*4, PARAMETER :: nmaxatm = 5 CHARACTER(len = 64), DIMENSION(nmaxfld) :: srcv_clname, & ssnd_clname INTEGER*4, DIMENSION(0:nmaxatm, nmaxfld) :: srcv_nid , ssnd_nid common /exchange_fields_oasis3/ srcv_clname,ssnd_clname, & srcv_nid ,ssnd_nid INTEGER*4 :: oasis_time, oasis_runtime common /exchange_times_oasis3/ oasis_time, oasis_runtime REAL cplmsk(-1:Lm+2+padd_X,-1:Mm+2+padd_E,0:nmaxatm) common /coupling_mask/cplmsk include 'mpif.h' integer*4 :: iifroot, iicroot call cpl_prism_init call MPI_Setup (ierr) if (ierr.ne.0) goto 100 call read_inp (ierr) if (ierr.ne.0) goto 100 call init_scalars (ierr) if (ierr.ne.0) goto 100 C$OMP PARALLEL DO PRIVATE(trd,subs, tile), SHARED(numthreads) do trd=0,numthreads-1 subs=NSUB_X*NSUB_E/numthreads do tile=subs*trd,subs*(trd+1)-1,+1 call start_timers() call init_arrays (tile) enddo enddo call get_grid if (may_day_flag.ne.0) goto 99 C$OMP PARALLEL DO PRIVATE(trd,subs, tile), SHARED(numthreads) do trd=0,numthreads-1 subs=NSUB_X*NSUB_E/numthreads do tile=subs*(trd+1)-1,subs*trd,-1 call setup_grid1 (tile) enddo enddo C$OMP PARALLEL DO PRIVATE(trd,subs, tile), SHARED(numthreads) do trd=0,numthreads-1 subs=NSUB_X*NSUB_E/numthreads do tile=subs*trd,subs*(trd+1)-1,+1 call setup_grid2 (tile) enddo enddo call set_scoord call set_weights C$OMP PARALLEL DO PRIVATE(trd,subs, tile), SHARED(numthreads) do trd=0,numthreads-1 subs=NSUB_X*NSUB_E/numthreads do tile=subs*(trd+1)-1,subs*trd,-1 call set_depth (tile) enddo enddo C$OMP PARALLEL DO PRIVATE(trd,subs, tile), SHARED(numthreads) do trd=0,numthreads-1 subs=NSUB_X*NSUB_E/numthreads do tile=subs*trd,subs*(trd+1)-1,+1 call grid_stiffness (tile) enddo enddo call get_initial (nrrec, 1) time=start_time tdays=time*sec2day C$OMP PARALLEL DO PRIVATE(trd,subs, tile), SHARED(numthreads) do trd=0,numthreads-1 subs=NSUB_X*NSUB_E/numthreads do tile=subs*(trd+1)-1,subs*trd,-1 call ana_initial (tile) enddo enddo if (may_day_flag.ne.0) goto 99 C$OMP PARALLEL DO PRIVATE(trd,subs, tile), SHARED(numthreads) do trd=0,numthreads-1 subs=NSUB_X*NSUB_E/numthreads do tile=subs*trd,subs*(trd+1)-1,+1 call set_depth (tile) enddo enddo C$OMP PARALLEL DO PRIVATE(trd,subs, tile), SHARED(numthreads) do trd=0,numthreads-1 subs=NSUB_X*NSUB_E/numthreads do tile=subs*(trd+1)-1,subs*trd,-1 call set_HUV (tile) enddo enddo C$OMP PARALLEL DO PRIVATE(trd,subs, tile), SHARED(numthreads) do trd=0,numthreads-1 subs=NSUB_X*NSUB_E/numthreads do tile=subs*trd,subs*(trd+1)-1,+1 call omega (tile) call rho_eos (tile) enddo enddo C$OMP PARALLEL DO PRIVATE(trd,subs, tile), SHARED(numthreads) do trd=0,numthreads-1 subs=NSUB_X*NSUB_E/numthreads do tile=subs*(trd+1)-1,subs*trd,-1 call set_nudgcof (tile) enddo enddo call get_bry call get_vbc if (may_day_flag.ne.0) goto 99 if (ldefhis .and. wrthis(indxTime)) call wrt_his if (may_day_flag.ne.0) goto 99 if (mynode.eq.0) write(stdout,'(/1x,A27/)') & 'MAIN: started time-stepping.' next_kstp=kstp time_start=time call MPI_Barrier(ocean_grid_comm, ierr) iif = -1 nbstep3d = 0 iic = ntstart do iicroot=ntstart,ntimes+1 do iifroot = 0,nfast+2 call step() enddo if (may_day_flag.ne.0) goto 99 enddo 99 continue C$OMP PARALLEL DO PRIVATE(trd,subs, tile), SHARED(numthreads) do trd=0,numthreads-1 subs=NSUB_X*NSUB_E/numthreads do tile=subs*trd,subs*(trd+1)-1,+1 call stop_timers() enddo enddo call closecdf 100 continue if (ierr.ne.0) call mpi_abort (ocean_grid_comm, ierr) call MPI_Barrier(ocean_grid_comm, ierr) call prism_terminate_proto(ierr) stop end