diff --git a/ROMSX_8H_source.html b/ROMSX_8H_source.html index 892a794c..38425acb 100644 --- a/ROMSX_8H_source.html +++ b/ROMSX_8H_source.html @@ -555,617 +555,616 @@
467  int nrhs, int nnew, int N, const amrex::Real dt_lev);
468 
469  /** Calculation of the RHS */
-
470  void rhs_uv_3d (const amrex::Box& bx,
+
470  void rhs_uv_3d (const amrex::Box& bx,
471  const amrex::Box& xbx,
472  const amrex::Box& ybx,
-
473  const amrex::Box& gbx,
-
474  amrex::Array4<amrex::Real> uold,
-
475  amrex::Array4<amrex::Real> vold,
-
476  amrex::Array4<amrex::Real> ru,
-
477  amrex::Array4<amrex::Real> rv,
-
478  amrex::Array4<amrex::Real> rufrc,
-
479  amrex::Array4<amrex::Real> rvfrc,
-
480  amrex::Array4<amrex::Real> sustr,
-
481  amrex::Array4<amrex::Real> svstr,
-
482  amrex::Array4<amrex::Real> bustr,
-
483  amrex::Array4<amrex::Real> bvstr,
-
484  amrex::Array4<amrex::Real> Huon,
-
485  amrex::Array4<amrex::Real> Hvom,
-
486  amrex::Array4<amrex::Real> on_u,
-
487  amrex::Array4<amrex::Real> om_v,
-
488  amrex::Array4<amrex::Real> om_u,
-
489  amrex::Array4<amrex::Real> on_v,
-
490  amrex::Array4<amrex::Real> W,
-
491  amrex::Array4<amrex::Real> FC,
-
492  int nrhs, int N);
-
493 
-
494  void rhs_2d (const amrex::Box& bx,
-
495  amrex::Array4<amrex::Real> uold,
-
496  amrex::Array4<amrex::Real> vold,
-
497  amrex::Array4<amrex::Real> ru,
-
498  amrex::Array4<amrex::Real> rv,
-
499  amrex::Array4<amrex::Real> Huon,
-
500  amrex::Array4<amrex::Real> Hvom,
-
501  int nrhs);
+
473  amrex::Array4<amrex::Real> uold,
+
474  amrex::Array4<amrex::Real> vold,
+
475  amrex::Array4<amrex::Real> ru,
+
476  amrex::Array4<amrex::Real> rv,
+
477  amrex::Array4<amrex::Real> rufrc,
+
478  amrex::Array4<amrex::Real> rvfrc,
+
479  amrex::Array4<amrex::Real> sustr,
+
480  amrex::Array4<amrex::Real> svstr,
+
481  amrex::Array4<amrex::Real> bustr,
+
482  amrex::Array4<amrex::Real> bvstr,
+
483  amrex::Array4<amrex::Real> Huon,
+
484  amrex::Array4<amrex::Real> Hvom,
+
485  amrex::Array4<amrex::Real> on_u,
+
486  amrex::Array4<amrex::Real> om_v,
+
487  amrex::Array4<amrex::Real> om_u,
+
488  amrex::Array4<amrex::Real> on_v,
+
489  amrex::Array4<amrex::Real> W,
+
490  amrex::Array4<amrex::Real> FC,
+
491  int nrhs, int N);
+
492 
+
493  void rhs_2d (const amrex::Box& bx,
+
494  amrex::Array4<amrex::Real> uold,
+
495  amrex::Array4<amrex::Real> vold,
+
496  amrex::Array4<amrex::Real> ru,
+
497  amrex::Array4<amrex::Real> rv,
+
498  amrex::Array4<amrex::Real> Huon,
+
499  amrex::Array4<amrex::Real> Hvom,
+
500  int nrhs);
+
501 
502 
-
503 
-
504  void rho_eos (const amrex::Box& bx,
-
505  amrex::Array4<amrex::Real> temp,
-
506  amrex::Array4<amrex::Real> salt,
-
507  amrex::Array4<amrex::Real> rho,
-
508  amrex::Array4<amrex::Real> rhoA,
-
509  amrex::Array4<amrex::Real> rhoS,
-
510  amrex::Array4<amrex::Real> Hz,
-
511  amrex::Array4<amrex::Real> z_w,
-
512  amrex::Array4<amrex::Real> h,
-
513  const int nrhs, const int N);
-
514 
-
515  void prsgrd (const amrex::Box& bx,
-
516  const amrex::Box& gbx,
-
517  const amrex::Box& utbx,
-
518  const amrex::Box& vtbx,
-
519  amrex::Array4<amrex::Real> ru,
-
520  amrex::Array4<amrex::Real> rv,
-
521  amrex::Array4<amrex::Real> on_u,
-
522  amrex::Array4<amrex::Real> om_v,
-
523  amrex::Array4<amrex::Real> rho,
-
524  amrex::Array4<amrex::Real> FC,
-
525  amrex::Array4<amrex::Real> Hz,
-
526  amrex::Array4<amrex::Real> z_r,
-
527  amrex::Array4<amrex::Real> z_w,
-
528  const int nrhs, const int N);
-
529 
-
530  /** Update velocities or tracers as the last part of the prestep */
-
531  void update_vel_3d (const amrex::Box& bx,
-
532  const amrex::Box& gbx,
-
533  const int ioff, const int joff,
-
534  amrex::Array4<amrex::Real> vel,
-
535  amrex::Array4<amrex::Real> vel_old,
-
536  amrex::Array4<amrex::Real> rvel,
-
537  amrex::Array4<amrex::Real> Hz,
-
538  amrex::Array4<amrex::Real> Akv,
-
539  amrex::Array4<amrex::Real> pm,
-
540  amrex::Array4<amrex::Real> pn,
-
541  amrex::Array4<amrex::Real> DC,
-
542  amrex::Array4<amrex::Real> FC,
-
543  amrex::Array4<amrex::Real> sstr,
-
544  amrex::Array4<amrex::Real> bstr,
-
545  amrex::Array4<amrex::Real> z_r,
-
546  const int iic, const int ntfirst, const int nnew, int nstp, int nrhs, int N,
-
547  const amrex::Real lambda, const amrex::Real dt_lev);
-
548 
-
549  void vert_visc_3d (const amrex::Box& bx,
-
550  const int ioff, const int joff,
-
551  amrex::Array4<amrex::Real> phi,
-
552  amrex::Array4<amrex::Real const> Hz,
-
553  amrex::Array4<amrex::Real> Hzk,
-
554  amrex::Array4<amrex::Real> oHz,
-
555  amrex::Array4<amrex::Real> AK,
-
556  amrex::Array4<amrex::Real> Akv,
-
557  amrex::Array4<amrex::Real> BC,
-
558  amrex::Array4<amrex::Real> DC,
-
559  amrex::Array4<amrex::Real> FC,
-
560  amrex::Array4<amrex::Real> CF,
-
561  const int nnew, const int N,
-
562  const amrex::Real dt_lev);
-
563 
-
564  void set_massflux_3d (amrex::Array4<amrex::Real> u,
-
565  amrex::Array4<amrex::Real> Hu,
-
566  amrex::Array4<amrex::Real> on_u,
-
567  amrex::Array4<amrex::Real> v,
-
568  amrex::Array4<amrex::Real> Hv,
-
569  amrex::Array4<amrex::Real> om_v,
-
570  amrex::Array4<amrex::Real> Hz,
-
571  const int nnew);
-
572 
-
573  void update_massflux_3d (const amrex::Box& bx,
-
574  const int ioff, const int joff,
-
575  amrex::Array4<amrex::Real> phi,
-
576  amrex::Array4<amrex::Real> phibar,
-
577  amrex::Array4<amrex::Real> Hphi,
-
578  amrex::Array4<amrex::Real const> Hz,
-
579  amrex::Array4<amrex::Real> on_u_or_om_v,
-
580  amrex::Array4<amrex::Real const> Dphi1,
-
581  amrex::Array4<amrex::Real const> Dphi2,
-
582  amrex::Array4<amrex::Real> DC,
-
583  amrex::Array4<amrex::Real> FC,
-
584  const int nnew);
-
585 
-
586  void vert_mean_3d (const amrex::Box& bx,
-
587  const int ioff, const int joff,
-
588  amrex::Array4<amrex::Real> phi,
-
589  amrex::Array4<amrex::Real const> Hz,
-
590  amrex::Array4<amrex::Real const> Dphi_avg1,
-
591  amrex::Array4<amrex::Real> DC,
-
592  amrex::Array4<amrex::Real> CF,
-
593  amrex::Array4<amrex::Real> dxlen,
-
594  const int nnew, const int N);
-
595 
-
596  /** Harmonic viscosity */
-
597  void uv3dmix (const amrex::Box& bx,
-
598  const amrex::Box& gbx,
-
599  amrex::Array4<amrex::Real> u,
-
600  amrex::Array4<amrex::Real> v,
-
601  amrex::Array4<amrex::Real> uold,
-
602  amrex::Array4<amrex::Real> vold,
-
603  amrex::Array4<amrex::Real> rufrc,
-
604  amrex::Array4<amrex::Real> rvfrc,
-
605  amrex::Array4<amrex::Real> visc2_p,
-
606  amrex::Array4<amrex::Real> visc2_r,
-
607  amrex::Array4<amrex::Real> Hz,
-
608  amrex::Array4<amrex::Real> om_r,
-
609  amrex::Array4<amrex::Real> on_r,
-
610  amrex::Array4<amrex::Real> om_p,
-
611  amrex::Array4<amrex::Real> on_p,
-
612  amrex::Array4<amrex::Real> pm,
-
613  amrex::Array4<amrex::Real> pn,
-
614  int nrhs, int nnew,
-
615  const amrex::Real dt_lev);
-
616 
-
617  /** Harmonic diffusivity for tracers */
-
618  void t3dmix (const amrex::Box& bx,
-
619  amrex::Array4<amrex::Real> t,
-
620  amrex::Array4<amrex::Real> diff2,
-
621  amrex::Array4<amrex::Real> Hz,
-
622  amrex::Array4<amrex::Real> pm,
-
623  amrex::Array4<amrex::Real> pn,
-
624  amrex::Array4<amrex::Real> pmon_u,
-
625  amrex::Array4<amrex::Real> pnom_v,
-
626  int nrhs, int nnew,
-
627  const amrex::Real dt_lev);
-
628 
-
629  void coriolis (const amrex::Box& bx,
-
630  const amrex::Box& gbx,
-
631  amrex::Array4<amrex::Real> uold,
-
632  amrex::Array4<amrex::Real> vold,
-
633  amrex::Array4<amrex::Real> ru,
-
634  amrex::Array4<amrex::Real> rv,
-
635  amrex::Array4<amrex::Real> Hz,
-
636  amrex::Array4<amrex::Real> fomn,
-
637  int nrhs, int nr);
-
638 
-
639  void set_2darrays (int lev);
-
640 
-
641  void set_bathymetry (int lev);
-
642 
-
643  void stretch_transform (int lev);
-
644 
-
645  void set_vmix (int lev);
-
646 
-
647  void set_smflux (int lev, amrex::Real time);
-
648 
-
649  void set_hmixcoef (int lev);
-
650 
-
651  void set_drag (int lev);
-
652 
-
653  void set_weights (int lev);
-
654 
-
655 private:
-
656 
-
657  ///////////////////////////
-
658  // private member functions
-
659  ///////////////////////////
-
660 
-
661  /** read in some parameters from inputs file */
-
662  void ReadParameters();
-
663 
-
664  /** set covered coarse cells to be the average of overlying fine cells */
-
665  void AverageDown ();
-
666 
-
667  void init1DArrays();
-
668 
-
669  void init_bcs();
-
670 
-
671  void init_custom(int lev);
-
672 
-
673  void init_stuff (int lev, const amrex::BoxArray& ba, const amrex::DistributionMapping& dm);
-
674 
-
675  void resize_stuff (int lev);
-
676 
-
677 #ifdef ROMSX_USE_NETCDF
-
678  void init_from_wrfinput(int lev);
-
679 #endif // ROMSX_USE_NETCDF
-
680 
-
681  /** more flexible version of AverageDown() that lets you average down across multiple levels */
-
682  void AverageDownTo (int crse_lev);
-
683 
-
684  /** compute a new multifab by copying in phi from valid region and filling ghost cells
-
685  * works for single level and 2-level cases (fill fine grid ghost by interpolating from coarse)
-
686  */
-
687  void FillPatch (int lev, amrex::Real time, const amrex::Vector<amrex::MultiFab*>& mf);
-
688 
-
689  /** compute a new multifab by copying in phi from valid region and filling ghost cells
-
690  * works for single level and 2-level cases (fill fine grid ghost by interpolating from coarse)
-
691  */
-
692  void FillPatch (int lev, amrex::Real time,
-
693  amrex::Vector<amrex::MultiFab>& mf);
-
694 
-
695  /** fill an entire multifab by interpolating from the coarser level
-
696  * this comes into play when a new level of refinement appears
-
697  */
-
698  void FillCoarsePatch (int lev, amrex::Real time,
-
699  amrex::MultiFab& mf, int icomp, int ncomp, int var_idx);
-
700 
-
701  /** fill all multifabs (and all components) in a vector of multifabs corresponding to the
-
702  * grid variables defined in vars_old and vars_new just as FillCoarsePatch.
-
703  */
-
704  void FillCoarsePatchAllVars (int lev, amrex::Real time,
-
705  amrex::Vector<amrex::MultiFab>& vmf);
-
706 
-
707  void FillPatchNoPhysBC (int lev, amrex::Real time, const amrex::Vector<amrex::MultiFab*>& mfs,
-
708  amrex::MultiFab& mf, int icomp, int ncomp,
-
709  amrex::MultiFab& crse_old, amrex::MultiFab& crse_new,
-
710  amrex::MultiFab& fine_old, amrex::MultiFab& fine_new);
-
711 
-
712  /** utility to copy in data from old and/or new state into another multifab */
-
713  TimeInterpolatedData GetDataAtTime (int lev, amrex::Real time);
-
714 
-
715  /** advance a level by dt, includes a recursive call for finer levels */
-
716  void timeStep (int lev, amrex::Real time, int iteration);
-
717 
-
718  /** advance all levels by dt, loops over finer levels */
-
719  void timeStepML (amrex::Real time, int iteration);
-
720 
-
721  //! Initialize HSE
-
722  void initHSE();
-
723 
-
724  //! Initialize Rayleigh damping profiles
-
725  void initRayleigh();
-
726 
-
727  /** a wrapper for estTimeStep() */
-
728  void ComputeDt ();
-
729 
-
730  /** get plotfile name */
-
731  std::string PlotFileName (int lev) const;
-
732 
-
733  /** set plotfile variables names */
-
734  amrex::Vector<std::string> PlotFileVarNames (amrex::Vector<std::string> plot_var_names) const;
-
735 
-
736  /** set which variables and derived quantities go into plotfiles */
-
737  void setPlotVariables (const std::string& pp_plot_var_names, amrex::Vector<std::string>& plot_var_names);
-
738 
-
739 #ifdef ROMSX_USE_NETCDF
-
740  //! Write plotfile using NETCDF
-
741  void writeNCPlotFile(int lev, int which, const std::string& dir,
-
742  const amrex::Vector<const amrex::MultiFab*> &mf,
-
743  const amrex::Vector<std::string> &varnames,
-
744  const amrex::Vector<int> level_steps, const amrex::Real time) const;
-
745 
-
746  //! Write checkpointFile using NetCdf
-
747  void WriteNCCheckpointFile () const;
-
748 
-
749  //! Read checkpointFile for restart
-
750  void ReadNCCheckpointFile ();
-
751 
-
752  //! Write MultiFab in NetCDF format
-
753  void WriteNCMultiFab (const amrex::FabArray<amrex::FArrayBox> &fab,
-
754  const std::string& name,
-
755  bool set_ghost = false) const;
-
756 
-
757  //! Read MultiFab in NetCDF format
-
758  void ReadNCMultiFab (amrex::FabArray<amrex::FArrayBox> &fab,
-
759  const std::string &name,
-
760  int coordinatorProc = amrex::ParallelDescriptor::IOProcessorNumber(),
-
761  int allow_empty_mf = 0);
-
762 
-
763  //! Create 1D vertical column output for coupling
-
764  void createNCColumnFile(const int lev,
-
765  const std::string& colfile_name, const amrex::Real xloc, const amrex::Real yloc);
-
766 
-
767  // Copy from the NC*fabs into the MultiFabs holding the boundary data
-
768  void init_from_wrfbdy(amrex::Vector<amrex::FArrayBox*> x_vel_lateral,
-
769  amrex::Vector<amrex::FArrayBox*> y_vel_lateral,
-
770  amrex::Vector<amrex::FArrayBox*> z_vel_lateral,
-
771  amrex::Vector<amrex::FArrayBox*> T_lateral);
-
772 
-
773  // *** *** FArrayBox's for holding the SURFACE data
-
774  // Data read from the wrfinput NetCDF file
-
775  amrex::FArrayBox NC_HGT_fab; // Terrain height (variable HGT in the wrfinput file)
-
776  amrex::IArrayBox NC_IVGTYP_fab; // Vegetation type (IVGTYP); Discrete numbers;
-
777  amrex::FArrayBox NC_z0_fab; // Surface Roughness, z0 = z0 (IVGTYP)
-
778  amrex::FArrayBox NC_PSFC_fab; // Surface pressure
-
779 
-
780  // TODO: Clarify the relation between SST and TSK
-
781  amrex::FArrayBox NC_SST_fab; // Sea Surface Temperature; Defined even for land area
-
782  amrex::FArrayBox NC_TSK_fab; // Surface Skin Temperature; Appears to be same as SST...
-
783 
-
784  amrex::FArrayBox NC_eta_fab, NC_phb_fab, NC_z_phy_fab;
-
785 #endif // ROMSX_USE_NETCDF
-
786 
-
787 #ifdef ROMSX_USE_NETCDF
-
788  // Vectors (over time) of Vector (over variables) of FArrayBoxs for holding the data read from the wrfbdy NetCDF file
-
789  amrex::Vector<amrex::Vector<amrex::FArrayBox>> bdy_data_xlo;
-
790  amrex::Vector<amrex::Vector<amrex::FArrayBox>> bdy_data_xhi;
-
791  amrex::Vector<amrex::Vector<amrex::FArrayBox>> bdy_data_ylo;
-
792  amrex::Vector<amrex::Vector<amrex::FArrayBox>> bdy_data_yhi;
-
793 
-
794  amrex::Real bdy_time_interval;
-
795 #endif // ROMSX_USE_NETCDF
-
796 
-
797  // write checkpoint file to disk
-
798  void WriteCheckpointFile () const;
-
799 
-
800  // read checkpoint file from disk
-
801  void ReadCheckpointFile ();
-
802 
-
803  // Read the file passed to amr.restart and use it as an initial condition for
-
804  // the current simulation. Supports a different number of components and
-
805  // ghost cells.
-
806  void InitializeFromFile ();
-
807 
-
808  // Initialize the new-time data at a level from the initial_data MultiFab
-
809  void InitializeLevelFromData (int lev, const amrex::MultiFab& initial_data);
-
810 
-
811  // utility to skip to next line in Header
-
812  static void GotoNextLine (std::istream& is);
-
813 
-
814  // Single level functions called by advance()
-
815  void post_update (amrex::MultiFab& state_mf, const amrex::Real time, const amrex::Geometry& geom);
-
816  void fill_rhs (amrex::MultiFab& rhs_mf, const amrex::MultiFab& state_mf, const amrex::Real time, const amrex::Geometry& geom);
-
817 
-
818  ////////////////
-
819  // private data members
-
820 
-
821  amrex::Vector<int> num_boxes_at_level; // how many boxes specified at each level by tagging criteria
-
822  amrex::Vector<int> num_files_at_level; // how many wrfinput files specified at each level
-
823  amrex::Vector<amrex::Vector<amrex::Box>> boxes_at_level; // the boxes specified at each level by tagging criteria
-
824 
-
825  amrex::Vector<int> istep; // which step?
-
826  amrex::Vector<int> nsubsteps; // how many substeps on each level?
-
827 
-
828  // keep track of old time, new time, and time step at each level
-
829  amrex::Vector<amrex::Real> t_new;
-
830  amrex::Vector<amrex::Real> t_old;
-
831  amrex::Vector<amrex::Real> dt;
-
832 
-
833  amrex::Vector<std::unique_ptr<ROMSXPhysBCFunct>> physbcs;
-
834  // array of multifabs to store the solution at each level of refinement
-
835  // after advancing a level we use "swap".
-
836 
-
837  amrex::Vector<std::unique_ptr<amrex::MultiFab>> mapfac_m;
-
838  amrex::Vector<std::unique_ptr<amrex::MultiFab>> mapfac_u;
-
839  amrex::Vector<std::unique_ptr<amrex::MultiFab>> mapfac_v;
-
840 
-
841  amrex::Vector<std::unique_ptr<amrex::MultiFab>> sst;
-
842 
-
843  // array of flux registers
-
844  amrex::Vector<amrex::YAFluxRegister*> advflux_reg;
-
845 
-
846  // A BCRec is essentially a 2*DIM integer array storing the boundary
-
847  // condition type at each lo/hi walls in each direction. We have one BCRec
-
848  // for each component of the cell-centered variables and each velocity component.
-
849  amrex::Vector <amrex::BCRec> domain_bcs_type;
-
850  amrex::Gpu::DeviceVector<amrex::BCRec> domain_bcs_type_d;
-
851 
-
852  // We store these so that we can print them out in the job_info file
-
853  amrex::Array<std::string,2*AMREX_SPACEDIM> domain_bc_type;
-
854 
-
855  // These hold the Dirichlet values at walls which need them ...
-
856  amrex::Array<amrex::Array<amrex::Real, AMREX_SPACEDIM*2>,AMREX_SPACEDIM+NVAR> m_bc_extdir_vals;
-
857 
-
858  // These are the "physical" boundary condition types (e.g. "inflow")
-
859  amrex::GpuArray<ROMSX_BC, AMREX_SPACEDIM*2> phys_bc_type;
-
860 
-
861  int last_plot_file_step_1;
-
862  int last_plot_file_step_2;
-
863 
-
864  int total_plot_file_step_1 = -1;
-
865 
-
866  int last_check_file_step;
-
867  int plot_file_on_restart = 1;
-
868 
-
869  ////////////////
-
870  // runtime parameters
-
871 
-
872  // maximum number of steps and stop time
-
873  int max_step = std::numeric_limits<int>::max();
-
874  amrex::Real stop_time = std::numeric_limits<amrex::Real>::max();
-
875 
-
876  // if >= 0 we restart from a checkpoint
-
877  std::string restart_chkfile = "";
-
878 
-
879  // Time step controls
-
880  static amrex::Real cfl;
-
881  static amrex::Real init_shrink;
-
882  static amrex::Real change_max;
-
883 
-
884  // Fixed dt for level 0 timesteps (only used if positive)
-
885  static amrex::Real fixed_dt;
-
886  static amrex::Real fixed_fast_dt;
-
887  static int fixed_ndtfast_ratio;
-
888  int nfast;
-
889 
-
890  // Whether to substep fine levels in time
-
891  int do_substep;
-
892 
-
893  // how often each level regrids the higher levels of refinement
-
894  // (after a level advances that many time steps)
-
895  int regrid_int = 2;
-
896 
-
897  // plotfile prefix and frequency
-
898  std::string plot_file_1 {"plt_1_"};
-
899  std::string plot_file_2 {"plt_2_"};
-
900  int plot_int_1 = -1;
-
901  int plot_int_2 = -1;
-
902 
-
903  // Checkpoint type, prefix and frequency
-
904  std::string check_file {"chk"};
-
905  std::string check_type {"native"};
-
906  std::string restart_type {"native"};
-
907  int check_int = -1;
-
908 
-
909  amrex::Vector<std::string> plot_var_names_1;
-
910  amrex::Vector<std::string> plot_var_names_2;
-
911  const amrex::Vector<std::string> velocity_names {"x_velocity", "y_velocity", "z_velocity"};
-
912  const amrex::Vector<std::string> cons_names { "density", "temp", "rhoadv_0", "omega", "salt"};
-
913 
-
914  // Note that the order of variable names here must match the order in Derive.cpp
-
915  const amrex::Vector<std::string> derived_names {"scalar", "dpdx", "dpdy"
-
916 #ifdef ROMSX_USE_PARTICLES
-
917  ,"tracer_particle_count"
-
918 #endif
-
919  };
-
920 
-
921  // algorithm choices
-
922  static SolverChoice solverChoice;
-
923 
-
924 #ifdef ROMSX_USE_PARTICLES
-
925  // Particle info
-
926  static ParticleData particleData;
-
927 #endif
-
928 
-
929  static int verbose;
-
930 
-
931  // flag to turn tracer particle generation on/off
-
932  static bool use_tracer_particles;
-
933 
-
934  // Diagnostic output interval
-
935  static int sum_interval;
-
936  static amrex::Real sum_per;
-
937 
-
938  // Native or NetCDF
-
939  static std::string plotfile_type;
-
940 
-
941  // init_type: "custom", "ideal", "real"
-
942  static std::string init_type;
-
943 
-
944  // NetCDF initialization (wrfinput) file
-
945  static amrex::Vector<amrex::Vector<std::string>> nc_init_file;
-
946 
-
947  // NetCDF initialization (wrfbdy) file
-
948  static std::string nc_bdy_file;
-
949 
-
950  // Text input_sounding file
-
951  static std::string input_sounding_file;
-
952 
-
953  // 1D CDF output (for ingestion in AMR-Wind)
-
954  static int output_1d_column;
-
955  static int column_interval;
-
956  static amrex::Real column_per;
-
957  static amrex::Real column_loc_x;
-
958  static amrex::Real column_loc_y;
-
959  static std::string column_file_name;
-
960 
-
961  // 2D BndryRegister output (for ingestion in AMR-Wind)
-
962  static int output_bndry_planes;
-
963  static int bndry_output_planes_interval;
-
964  static amrex::Real bndry_output_planes_per;
-
965  static amrex::Real bndry_output_planes_start_time;
-
966 
-
967  // 2D BndryRegister input
-
968  static int input_bndry_planes;
-
969 
-
970  amrex::Vector<amrex::Real> h_havg_density;
-
971  amrex::Vector<amrex::Real> h_havg_temperature;
-
972  amrex::Vector<amrex::Real> h_havg_pressure;
-
973  amrex::Gpu::DeviceVector<amrex::Real> d_havg_density;
-
974  amrex::Gpu::DeviceVector<amrex::Real> d_havg_temperature;
-
975  amrex::Gpu::DeviceVector<amrex::Real> d_havg_pressure;
-
976 
-
977  void refinement_criteria_setup();
-
978 
-
979  //
-
980  // Holds info for dynamically generated tagging criteria
-
981  //
-
982  static amrex::Vector<amrex::AMRErrorTag> ref_tags;
-
983 
-
984  //
-
985  // Build a mask that zeroes out values on a coarse level underlying
-
986  // grids on the next finest level
-
987  //
-
988  amrex::MultiFab fine_mask;
-
989 
-
990  AMREX_FORCE_INLINE
-
991  int
-
992  ComputeGhostCells(const int& spatial_order) {
-
993  int nGhostCells;
-
994 
-
995  switch (spatial_order) {
-
996  case 2:
-
997  nGhostCells = 2; // We need this many to compute the eddy viscosity in the ghost cells
-
998  break;
-
999  case 3:
-
1000  nGhostCells = 2;
-
1001  break;
-
1002  case 4:
-
1003  nGhostCells = 2;
-
1004  break;
-
1005  case 5:
-
1006  nGhostCells = 3;
-
1007  break;
-
1008  case 6:
-
1009  nGhostCells = 3;
-
1010  break;
-
1011  default:
-
1012  amrex::Error("Must specify spatial order to be 2,3,4,5 or 6");
-
1013  }
-
1014 
-
1015  return nGhostCells;
-
1016  }
-
1017 
-
1018  AMREX_FORCE_INLINE
-
1019  amrex::YAFluxRegister* getAdvFluxReg (int lev)
-
1020  {
-
1021  return advflux_reg[lev];
-
1022  }
-
1023 
-
1024  AMREX_FORCE_INLINE
-
1025  std::ostream&
-
1026  DataLog (int i)
-
1027  {
-
1028  return *datalog[i];
-
1029  }
-
1030 
-
1031  AMREX_FORCE_INLINE
-
1032  int
-
1033  NumDataLogs () noexcept
-
1034  {
-
1035  return datalog.size();
-
1036  }
-
1037 
-
1038  static amrex::Real startCPUTime;
-
1039  static amrex::Real previousCPUTimeUsed;
-
1040 
-
1041  amrex::Real
-
1042  getCPUTime() const
-
1043  {
-
1044  int numCores = amrex::ParallelDescriptor::NProcs();
-
1045 #ifdef _OPENMP
-
1046  numCores = numCores * omp_get_max_threads();
-
1047 #endif
-
1048 
-
1049  amrex::Real T =
-
1050  numCores * (amrex::ParallelDescriptor::second() - startCPUTime) +
-
1051  previousCPUTimeUsed;
-
1052 
-
1053  return T;
-
1054  }
-
1055 
-
1056  void setRecordDataInfo (int i, const std::string& filename)
-
1057  {
-
1058  if (amrex::ParallelDescriptor::IOProcessor())
-
1059  {
-
1060  datalog[i] = std::make_unique<std::fstream>();
-
1061  datalog[i]->open(filename.c_str(),std::ios::out|std::ios::app);
-
1062  if (!datalog[i]->good()) {
-
1063  amrex::FileOpenFailed(filename);
-
1064  }
-
1065  }
-
1066  amrex::ParallelDescriptor::Barrier("ROMSX::setRecordDataInfo");
-
1067  }
-
1068 
-
1069  amrex::Vector<std::unique_ptr<std::fstream> > datalog;
-
1070  amrex::Vector<std::string> datalogname;
-
1071 
-
1072  //! The filename of the ith datalog file.
-
1073  const std::string DataLogName (int i) const noexcept { return datalogname[i]; }
-
1074 
-
1075 public:
-
1076  void writeJobInfo(const std::string& dir) const;
-
1077  static void writeBuildInfo(std::ostream& os);
-
1078 };
-
1079 
-
1080 #endif
+
503  void rho_eos (const amrex::Box& bx,
+
504  amrex::Array4<amrex::Real> temp,
+
505  amrex::Array4<amrex::Real> salt,
+
506  amrex::Array4<amrex::Real> rho,
+
507  amrex::Array4<amrex::Real> rhoA,
+
508  amrex::Array4<amrex::Real> rhoS,
+
509  amrex::Array4<amrex::Real> Hz,
+
510  amrex::Array4<amrex::Real> z_w,
+
511  amrex::Array4<amrex::Real> h,
+
512  const int nrhs, const int N);
+
513 
+
514  void prsgrd (const amrex::Box& bx,
+
515  const amrex::Box& gbx,
+
516  const amrex::Box& utbx,
+
517  const amrex::Box& vtbx,
+
518  amrex::Array4<amrex::Real> ru,
+
519  amrex::Array4<amrex::Real> rv,
+
520  amrex::Array4<amrex::Real> on_u,
+
521  amrex::Array4<amrex::Real> om_v,
+
522  amrex::Array4<amrex::Real> rho,
+
523  amrex::Array4<amrex::Real> FC,
+
524  amrex::Array4<amrex::Real> Hz,
+
525  amrex::Array4<amrex::Real> z_r,
+
526  amrex::Array4<amrex::Real> z_w,
+
527  const int nrhs, const int N);
+
528 
+
529  /** Update velocities or tracers as the last part of the prestep */
+
530  void update_vel_3d (const amrex::Box& bx,
+
531  const amrex::Box& gbx,
+
532  const int ioff, const int joff,
+
533  amrex::Array4<amrex::Real> vel,
+
534  amrex::Array4<amrex::Real> vel_old,
+
535  amrex::Array4<amrex::Real> rvel,
+
536  amrex::Array4<amrex::Real> Hz,
+
537  amrex::Array4<amrex::Real> Akv,
+
538  amrex::Array4<amrex::Real> pm,
+
539  amrex::Array4<amrex::Real> pn,
+
540  amrex::Array4<amrex::Real> DC,
+
541  amrex::Array4<amrex::Real> FC,
+
542  amrex::Array4<amrex::Real> sstr,
+
543  amrex::Array4<amrex::Real> bstr,
+
544  amrex::Array4<amrex::Real> z_r,
+
545  const int iic, const int ntfirst, const int nnew, int nstp, int nrhs, int N,
+
546  const amrex::Real lambda, const amrex::Real dt_lev);
+
547 
+
548  void vert_visc_3d (const amrex::Box& bx,
+
549  const int ioff, const int joff,
+
550  amrex::Array4<amrex::Real> phi,
+
551  amrex::Array4<amrex::Real const> Hz,
+
552  amrex::Array4<amrex::Real> Hzk,
+
553  amrex::Array4<amrex::Real> oHz,
+
554  amrex::Array4<amrex::Real> AK,
+
555  amrex::Array4<amrex::Real> Akv,
+
556  amrex::Array4<amrex::Real> BC,
+
557  amrex::Array4<amrex::Real> DC,
+
558  amrex::Array4<amrex::Real> FC,
+
559  amrex::Array4<amrex::Real> CF,
+
560  const int nnew, const int N,
+
561  const amrex::Real dt_lev);
+
562 
+
563  void set_massflux_3d (amrex::Array4<amrex::Real> u,
+
564  amrex::Array4<amrex::Real> Hu,
+
565  amrex::Array4<amrex::Real> on_u,
+
566  amrex::Array4<amrex::Real> v,
+
567  amrex::Array4<amrex::Real> Hv,
+
568  amrex::Array4<amrex::Real> om_v,
+
569  amrex::Array4<amrex::Real> Hz,
+
570  const int nnew);
+
571 
+
572  void update_massflux_3d (const amrex::Box& bx,
+
573  const int ioff, const int joff,
+
574  amrex::Array4<amrex::Real> phi,
+
575  amrex::Array4<amrex::Real> phibar,
+
576  amrex::Array4<amrex::Real> Hphi,
+
577  amrex::Array4<amrex::Real const> Hz,
+
578  amrex::Array4<amrex::Real> on_u_or_om_v,
+
579  amrex::Array4<amrex::Real const> Dphi1,
+
580  amrex::Array4<amrex::Real const> Dphi2,
+
581  amrex::Array4<amrex::Real> DC,
+
582  amrex::Array4<amrex::Real> FC,
+
583  const int nnew);
+
584 
+
585  void vert_mean_3d (const amrex::Box& bx,
+
586  const int ioff, const int joff,
+
587  amrex::Array4<amrex::Real> phi,
+
588  amrex::Array4<amrex::Real const> Hz,
+
589  amrex::Array4<amrex::Real const> Dphi_avg1,
+
590  amrex::Array4<amrex::Real> DC,
+
591  amrex::Array4<amrex::Real> CF,
+
592  amrex::Array4<amrex::Real> dxlen,
+
593  const int nnew, const int N);
+
594 
+
595  /** Harmonic viscosity */
+
596  void uv3dmix (const amrex::Box& bx,
+
597  const amrex::Box& gbx,
+
598  amrex::Array4<amrex::Real> u,
+
599  amrex::Array4<amrex::Real> v,
+
600  amrex::Array4<amrex::Real> uold,
+
601  amrex::Array4<amrex::Real> vold,
+
602  amrex::Array4<amrex::Real> rufrc,
+
603  amrex::Array4<amrex::Real> rvfrc,
+
604  amrex::Array4<amrex::Real> visc2_p,
+
605  amrex::Array4<amrex::Real> visc2_r,
+
606  amrex::Array4<amrex::Real> Hz,
+
607  amrex::Array4<amrex::Real> om_r,
+
608  amrex::Array4<amrex::Real> on_r,
+
609  amrex::Array4<amrex::Real> om_p,
+
610  amrex::Array4<amrex::Real> on_p,
+
611  amrex::Array4<amrex::Real> pm,
+
612  amrex::Array4<amrex::Real> pn,
+
613  int nrhs, int nnew,
+
614  const amrex::Real dt_lev);
+
615 
+
616  /** Harmonic diffusivity for tracers */
+
617  void t3dmix (const amrex::Box& bx,
+
618  amrex::Array4<amrex::Real> t,
+
619  amrex::Array4<amrex::Real> diff2,
+
620  amrex::Array4<amrex::Real> Hz,
+
621  amrex::Array4<amrex::Real> pm,
+
622  amrex::Array4<amrex::Real> pn,
+
623  amrex::Array4<amrex::Real> pmon_u,
+
624  amrex::Array4<amrex::Real> pnom_v,
+
625  int nrhs, int nnew,
+
626  const amrex::Real dt_lev);
+
627 
+
628  void coriolis (const amrex::Box& bx,
+
629  const amrex::Box& gbx,
+
630  amrex::Array4<amrex::Real> uold,
+
631  amrex::Array4<amrex::Real> vold,
+
632  amrex::Array4<amrex::Real> ru,
+
633  amrex::Array4<amrex::Real> rv,
+
634  amrex::Array4<amrex::Real> Hz,
+
635  amrex::Array4<amrex::Real> fomn,
+
636  int nrhs, int nr);
+
637 
+
638  void set_2darrays (int lev);
+
639 
+
640  void set_bathymetry (int lev);
+
641 
+
642  void stretch_transform (int lev);
+
643 
+
644  void set_vmix (int lev);
+
645 
+
646  void set_smflux (int lev, amrex::Real time);
+
647 
+
648  void set_hmixcoef (int lev);
+
649 
+
650  void set_drag (int lev);
+
651 
+
652  void set_weights (int lev);
+
653 
+
654 private:
+
655 
+
656  ///////////////////////////
+
657  // private member functions
+
658  ///////////////////////////
+
659 
+
660  /** read in some parameters from inputs file */
+
661  void ReadParameters();
+
662 
+
663  /** set covered coarse cells to be the average of overlying fine cells */
+
664  void AverageDown ();
+
665 
+
666  void init1DArrays();
+
667 
+
668  void init_bcs();
+
669 
+
670  void init_custom(int lev);
+
671 
+
672  void init_stuff (int lev, const amrex::BoxArray& ba, const amrex::DistributionMapping& dm);
+
673 
+
674  void resize_stuff (int lev);
+
675 
+
676 #ifdef ROMSX_USE_NETCDF
+
677  void init_from_wrfinput(int lev);
+
678 #endif // ROMSX_USE_NETCDF
+
679 
+
680  /** more flexible version of AverageDown() that lets you average down across multiple levels */
+
681  void AverageDownTo (int crse_lev);
+
682 
+
683  /** compute a new multifab by copying in phi from valid region and filling ghost cells
+
684  * works for single level and 2-level cases (fill fine grid ghost by interpolating from coarse)
+
685  */
+
686  void FillPatch (int lev, amrex::Real time, const amrex::Vector<amrex::MultiFab*>& mf);
+
687 
+
688  /** compute a new multifab by copying in phi from valid region and filling ghost cells
+
689  * works for single level and 2-level cases (fill fine grid ghost by interpolating from coarse)
+
690  */
+
691  void FillPatch (int lev, amrex::Real time,
+
692  amrex::Vector<amrex::MultiFab>& mf);
+
693 
+
694  /** fill an entire multifab by interpolating from the coarser level
+
695  * this comes into play when a new level of refinement appears
+
696  */
+
697  void FillCoarsePatch (int lev, amrex::Real time,
+
698  amrex::MultiFab& mf, int icomp, int ncomp, int var_idx);
+
699 
+
700  /** fill all multifabs (and all components) in a vector of multifabs corresponding to the
+
701  * grid variables defined in vars_old and vars_new just as FillCoarsePatch.
+
702  */
+
703  void FillCoarsePatchAllVars (int lev, amrex::Real time,
+
704  amrex::Vector<amrex::MultiFab>& vmf);
+
705 
+
706  void FillPatchNoPhysBC (int lev, amrex::Real time, const amrex::Vector<amrex::MultiFab*>& mfs,
+
707  amrex::MultiFab& mf, int icomp, int ncomp,
+
708  amrex::MultiFab& crse_old, amrex::MultiFab& crse_new,
+
709  amrex::MultiFab& fine_old, amrex::MultiFab& fine_new);
+
710 
+
711  /** utility to copy in data from old and/or new state into another multifab */
+
712  TimeInterpolatedData GetDataAtTime (int lev, amrex::Real time);
+
713 
+
714  /** advance a level by dt, includes a recursive call for finer levels */
+
715  void timeStep (int lev, amrex::Real time, int iteration);
+
716 
+
717  /** advance all levels by dt, loops over finer levels */
+
718  void timeStepML (amrex::Real time, int iteration);
+
719 
+
720  //! Initialize HSE
+
721  void initHSE();
+
722 
+
723  //! Initialize Rayleigh damping profiles
+
724  void initRayleigh();
+
725 
+
726  /** a wrapper for estTimeStep() */
+
727  void ComputeDt ();
+
728 
+
729  /** get plotfile name */
+
730  std::string PlotFileName (int lev) const;
+
731 
+
732  /** set plotfile variables names */
+
733  amrex::Vector<std::string> PlotFileVarNames (amrex::Vector<std::string> plot_var_names) const;
+
734 
+
735  /** set which variables and derived quantities go into plotfiles */
+
736  void setPlotVariables (const std::string& pp_plot_var_names, amrex::Vector<std::string>& plot_var_names);
+
737 
+
738 #ifdef ROMSX_USE_NETCDF
+
739  //! Write plotfile using NETCDF
+
740  void writeNCPlotFile(int lev, int which, const std::string& dir,
+
741  const amrex::Vector<const amrex::MultiFab*> &mf,
+
742  const amrex::Vector<std::string> &varnames,
+
743  const amrex::Vector<int> level_steps, const amrex::Real time) const;
+
744 
+
745  //! Write checkpointFile using NetCdf
+
746  void WriteNCCheckpointFile () const;
+
747 
+
748  //! Read checkpointFile for restart
+
749  void ReadNCCheckpointFile ();
+
750 
+
751  //! Write MultiFab in NetCDF format
+
752  void WriteNCMultiFab (const amrex::FabArray<amrex::FArrayBox> &fab,
+
753  const std::string& name,
+
754  bool set_ghost = false) const;
+
755 
+
756  //! Read MultiFab in NetCDF format
+
757  void ReadNCMultiFab (amrex::FabArray<amrex::FArrayBox> &fab,
+
758  const std::string &name,
+
759  int coordinatorProc = amrex::ParallelDescriptor::IOProcessorNumber(),
+
760  int allow_empty_mf = 0);
+
761 
+
762  //! Create 1D vertical column output for coupling
+
763  void createNCColumnFile(const int lev,
+
764  const std::string& colfile_name, const amrex::Real xloc, const amrex::Real yloc);
+
765 
+
766  // Copy from the NC*fabs into the MultiFabs holding the boundary data
+
767  void init_from_wrfbdy(amrex::Vector<amrex::FArrayBox*> x_vel_lateral,
+
768  amrex::Vector<amrex::FArrayBox*> y_vel_lateral,
+
769  amrex::Vector<amrex::FArrayBox*> z_vel_lateral,
+
770  amrex::Vector<amrex::FArrayBox*> T_lateral);
+
771 
+
772  // *** *** FArrayBox's for holding the SURFACE data
+
773  // Data read from the wrfinput NetCDF file
+
774  amrex::FArrayBox NC_HGT_fab; // Terrain height (variable HGT in the wrfinput file)
+
775  amrex::IArrayBox NC_IVGTYP_fab; // Vegetation type (IVGTYP); Discrete numbers;
+
776  amrex::FArrayBox NC_z0_fab; // Surface Roughness, z0 = z0 (IVGTYP)
+
777  amrex::FArrayBox NC_PSFC_fab; // Surface pressure
+
778 
+
779  // TODO: Clarify the relation between SST and TSK
+
780  amrex::FArrayBox NC_SST_fab; // Sea Surface Temperature; Defined even for land area
+
781  amrex::FArrayBox NC_TSK_fab; // Surface Skin Temperature; Appears to be same as SST...
+
782 
+
783  amrex::FArrayBox NC_eta_fab, NC_phb_fab, NC_z_phy_fab;
+
784 #endif // ROMSX_USE_NETCDF
+
785 
+
786 #ifdef ROMSX_USE_NETCDF
+
787  // Vectors (over time) of Vector (over variables) of FArrayBoxs for holding the data read from the wrfbdy NetCDF file
+
788  amrex::Vector<amrex::Vector<amrex::FArrayBox>> bdy_data_xlo;
+
789  amrex::Vector<amrex::Vector<amrex::FArrayBox>> bdy_data_xhi;
+
790  amrex::Vector<amrex::Vector<amrex::FArrayBox>> bdy_data_ylo;
+
791  amrex::Vector<amrex::Vector<amrex::FArrayBox>> bdy_data_yhi;
+
792 
+
793  amrex::Real bdy_time_interval;
+
794 #endif // ROMSX_USE_NETCDF
+
795 
+
796  // write checkpoint file to disk
+
797  void WriteCheckpointFile () const;
+
798 
+
799  // read checkpoint file from disk
+
800  void ReadCheckpointFile ();
+
801 
+
802  // Read the file passed to amr.restart and use it as an initial condition for
+
803  // the current simulation. Supports a different number of components and
+
804  // ghost cells.
+
805  void InitializeFromFile ();
+
806 
+
807  // Initialize the new-time data at a level from the initial_data MultiFab
+
808  void InitializeLevelFromData (int lev, const amrex::MultiFab& initial_data);
+
809 
+
810  // utility to skip to next line in Header
+
811  static void GotoNextLine (std::istream& is);
+
812 
+
813  // Single level functions called by advance()
+
814  void post_update (amrex::MultiFab& state_mf, const amrex::Real time, const amrex::Geometry& geom);
+
815  void fill_rhs (amrex::MultiFab& rhs_mf, const amrex::MultiFab& state_mf, const amrex::Real time, const amrex::Geometry& geom);
+
816 
+
817  ////////////////
+
818  // private data members
+
819 
+
820  amrex::Vector<int> num_boxes_at_level; // how many boxes specified at each level by tagging criteria
+
821  amrex::Vector<int> num_files_at_level; // how many wrfinput files specified at each level
+
822  amrex::Vector<amrex::Vector<amrex::Box>> boxes_at_level; // the boxes specified at each level by tagging criteria
+
823 
+
824  amrex::Vector<int> istep; // which step?
+
825  amrex::Vector<int> nsubsteps; // how many substeps on each level?
+
826 
+
827  // keep track of old time, new time, and time step at each level
+
828  amrex::Vector<amrex::Real> t_new;
+
829  amrex::Vector<amrex::Real> t_old;
+
830  amrex::Vector<amrex::Real> dt;
+
831 
+
832  amrex::Vector<std::unique_ptr<ROMSXPhysBCFunct>> physbcs;
+
833  // array of multifabs to store the solution at each level of refinement
+
834  // after advancing a level we use "swap".
+
835 
+
836  amrex::Vector<std::unique_ptr<amrex::MultiFab>> mapfac_m;
+
837  amrex::Vector<std::unique_ptr<amrex::MultiFab>> mapfac_u;
+
838  amrex::Vector<std::unique_ptr<amrex::MultiFab>> mapfac_v;
+
839 
+
840  amrex::Vector<std::unique_ptr<amrex::MultiFab>> sst;
+
841 
+
842  // array of flux registers
+
843  amrex::Vector<amrex::YAFluxRegister*> advflux_reg;
+
844 
+
845  // A BCRec is essentially a 2*DIM integer array storing the boundary
+
846  // condition type at each lo/hi walls in each direction. We have one BCRec
+
847  // for each component of the cell-centered variables and each velocity component.
+
848  amrex::Vector <amrex::BCRec> domain_bcs_type;
+
849  amrex::Gpu::DeviceVector<amrex::BCRec> domain_bcs_type_d;
+
850 
+
851  // We store these so that we can print them out in the job_info file
+
852  amrex::Array<std::string,2*AMREX_SPACEDIM> domain_bc_type;
+
853 
+
854  // These hold the Dirichlet values at walls which need them ...
+
855  amrex::Array<amrex::Array<amrex::Real, AMREX_SPACEDIM*2>,AMREX_SPACEDIM+NVAR> m_bc_extdir_vals;
+
856 
+
857  // These are the "physical" boundary condition types (e.g. "inflow")
+
858  amrex::GpuArray<ROMSX_BC, AMREX_SPACEDIM*2> phys_bc_type;
+
859 
+
860  int last_plot_file_step_1;
+
861  int last_plot_file_step_2;
+
862 
+
863  int total_plot_file_step_1 = -1;
+
864 
+
865  int last_check_file_step;
+
866  int plot_file_on_restart = 1;
+
867 
+
868  ////////////////
+
869  // runtime parameters
+
870 
+
871  // maximum number of steps and stop time
+
872  int max_step = std::numeric_limits<int>::max();
+
873  amrex::Real stop_time = std::numeric_limits<amrex::Real>::max();
+
874 
+
875  // if >= 0 we restart from a checkpoint
+
876  std::string restart_chkfile = "";
+
877 
+
878  // Time step controls
+
879  static amrex::Real cfl;
+
880  static amrex::Real init_shrink;
+
881  static amrex::Real change_max;
+
882 
+
883  // Fixed dt for level 0 timesteps (only used if positive)
+
884  static amrex::Real fixed_dt;
+
885  static amrex::Real fixed_fast_dt;
+
886  static int fixed_ndtfast_ratio;
+
887  int nfast;
+
888 
+
889  // Whether to substep fine levels in time
+
890  int do_substep;
+
891 
+
892  // how often each level regrids the higher levels of refinement
+
893  // (after a level advances that many time steps)
+
894  int regrid_int = 2;
+
895 
+
896  // plotfile prefix and frequency
+
897  std::string plot_file_1 {"plt_1_"};
+
898  std::string plot_file_2 {"plt_2_"};
+
899  int plot_int_1 = -1;
+
900  int plot_int_2 = -1;
+
901 
+
902  // Checkpoint type, prefix and frequency
+
903  std::string check_file {"chk"};
+
904  std::string check_type {"native"};
+
905  std::string restart_type {"native"};
+
906  int check_int = -1;
+
907 
+
908  amrex::Vector<std::string> plot_var_names_1;
+
909  amrex::Vector<std::string> plot_var_names_2;
+
910  const amrex::Vector<std::string> velocity_names {"x_velocity", "y_velocity", "z_velocity"};
+
911  const amrex::Vector<std::string> cons_names { "density", "temp", "rhoadv_0", "omega", "salt"};
+
912 
+
913  // Note that the order of variable names here must match the order in Derive.cpp
+
914  const amrex::Vector<std::string> derived_names {"scalar", "dpdx", "dpdy"
+
915 #ifdef ROMSX_USE_PARTICLES
+
916  ,"tracer_particle_count"
+
917 #endif
+
918  };
+
919 
+
920  // algorithm choices
+
921  static SolverChoice solverChoice;
+
922 
+
923 #ifdef ROMSX_USE_PARTICLES
+
924  // Particle info
+
925  static ParticleData particleData;
+
926 #endif
+
927 
+
928  static int verbose;
+
929 
+
930  // flag to turn tracer particle generation on/off
+
931  static bool use_tracer_particles;
+
932 
+
933  // Diagnostic output interval
+
934  static int sum_interval;
+
935  static amrex::Real sum_per;
+
936 
+
937  // Native or NetCDF
+
938  static std::string plotfile_type;
+
939 
+
940  // init_type: "custom", "ideal", "real"
+
941  static std::string init_type;
+
942 
+
943  // NetCDF initialization (wrfinput) file
+
944  static amrex::Vector<amrex::Vector<std::string>> nc_init_file;
+
945 
+
946  // NetCDF initialization (wrfbdy) file
+
947  static std::string nc_bdy_file;
+
948 
+
949  // Text input_sounding file
+
950  static std::string input_sounding_file;
+
951 
+
952  // 1D CDF output (for ingestion in AMR-Wind)
+
953  static int output_1d_column;
+
954  static int column_interval;
+
955  static amrex::Real column_per;
+
956  static amrex::Real column_loc_x;
+
957  static amrex::Real column_loc_y;
+
958  static std::string column_file_name;
+
959 
+
960  // 2D BndryRegister output (for ingestion in AMR-Wind)
+
961  static int output_bndry_planes;
+
962  static int bndry_output_planes_interval;
+
963  static amrex::Real bndry_output_planes_per;
+
964  static amrex::Real bndry_output_planes_start_time;
+
965 
+
966  // 2D BndryRegister input
+
967  static int input_bndry_planes;
+
968 
+
969  amrex::Vector<amrex::Real> h_havg_density;
+
970  amrex::Vector<amrex::Real> h_havg_temperature;
+
971  amrex::Vector<amrex::Real> h_havg_pressure;
+
972  amrex::Gpu::DeviceVector<amrex::Real> d_havg_density;
+
973  amrex::Gpu::DeviceVector<amrex::Real> d_havg_temperature;
+
974  amrex::Gpu::DeviceVector<amrex::Real> d_havg_pressure;
+
975 
+
976  void refinement_criteria_setup();
+
977 
+
978  //
+
979  // Holds info for dynamically generated tagging criteria
+
980  //
+
981  static amrex::Vector<amrex::AMRErrorTag> ref_tags;
+
982 
+
983  //
+
984  // Build a mask that zeroes out values on a coarse level underlying
+
985  // grids on the next finest level
+
986  //
+
987  amrex::MultiFab fine_mask;
+
988 
+
989  AMREX_FORCE_INLINE
+
990  int
+
991  ComputeGhostCells(const int& spatial_order) {
+
992  int nGhostCells;
+
993 
+
994  switch (spatial_order) {
+
995  case 2:
+
996  nGhostCells = 2; // We need this many to compute the eddy viscosity in the ghost cells
+
997  break;
+
998  case 3:
+
999  nGhostCells = 2;
+
1000  break;
+
1001  case 4:
+
1002  nGhostCells = 2;
+
1003  break;
+
1004  case 5:
+
1005  nGhostCells = 3;
+
1006  break;
+
1007  case 6:
+
1008  nGhostCells = 3;
+
1009  break;
+
1010  default:
+
1011  amrex::Error("Must specify spatial order to be 2,3,4,5 or 6");
+
1012  }
+
1013 
+
1014  return nGhostCells;
+
1015  }
+
1016 
+
1017  AMREX_FORCE_INLINE
+
1018  amrex::YAFluxRegister* getAdvFluxReg (int lev)
+
1019  {
+
1020  return advflux_reg[lev];
+
1021  }
+
1022 
+
1023  AMREX_FORCE_INLINE
+
1024  std::ostream&
+
1025  DataLog (int i)
+
1026  {
+
1027  return *datalog[i];
+
1028  }
+
1029 
+
1030  AMREX_FORCE_INLINE
+
1031  int
+
1032  NumDataLogs () noexcept
+
1033  {
+
1034  return datalog.size();
+
1035  }
+
1036 
+
1037  static amrex::Real startCPUTime;
+
1038  static amrex::Real previousCPUTimeUsed;
+
1039 
+
1040  amrex::Real
+
1041  getCPUTime() const
+
1042  {
+
1043  int numCores = amrex::ParallelDescriptor::NProcs();
+
1044 #ifdef _OPENMP
+
1045  numCores = numCores * omp_get_max_threads();
+
1046 #endif
+
1047 
+
1048  amrex::Real T =
+
1049  numCores * (amrex::ParallelDescriptor::second() - startCPUTime) +
+
1050  previousCPUTimeUsed;
+
1051 
+
1052  return T;
+
1053  }
+
1054 
+
1055  void setRecordDataInfo (int i, const std::string& filename)
+
1056  {
+
1057  if (amrex::ParallelDescriptor::IOProcessor())
+
1058  {
+
1059  datalog[i] = std::make_unique<std::fstream>();
+
1060  datalog[i]->open(filename.c_str(),std::ios::out|std::ios::app);
+
1061  if (!datalog[i]->good()) {
+
1062  amrex::FileOpenFailed(filename);
+
1063  }
+
1064  }
+
1065  amrex::ParallelDescriptor::Barrier("ROMSX::setRecordDataInfo");
+
1066  }
+
1067 
+
1068  amrex::Vector<std::unique_ptr<std::fstream> > datalog;
+
1069  amrex::Vector<std::string> datalogname;
+
1070 
+
1071  //! The filename of the ith datalog file.
+
1072  const std::string DataLogName (int i) const noexcept { return datalogname[i]; }
+
1073 
+
1074 public:
+
1075  void writeJobInfo(const std::string& dir) const;
+
1076  static void writeBuildInfo(std::ostream& os);
+
1077 };
+
1078 
+
1079 #endif
DataStruct.H
AdvectedQuantity::u
@ u
AdvectedQuantity::v
@ v
@@ -1179,72 +1178,72 @@
ROMSX_PhysBCFunct.H
TimeInterpolatedData.H
ROMSX
Definition: ROMSX.H:69
-
ROMSX::domain_bcs_type
amrex::Vector< amrex::BCRec > domain_bcs_type
Definition: ROMSX.H:849
+
ROMSX::domain_bcs_type
amrex::Vector< amrex::BCRec > domain_bcs_type
Definition: ROMSX.H:848
ROMSX::WritePlotFile
void WritePlotFile(int which, amrex::Vector< std::string > plot_var_names)
Definition: Plotfile.cpp:90
-
ROMSX::getCPUTime
amrex::Real getCPUTime() const
Definition: ROMSX.H:1042
+
ROMSX::getCPUTime
amrex::Real getCPUTime() const
Definition: ROMSX.H:1041
ROMSX::vec_hOfTheConfusingName
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_hOfTheConfusingName
Definition: ROMSX.H:229
ROMSX::vec_ubar
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_ubar
Definition: ROMSX.H:298
-
ROMSX::domain_bcs_type_d
amrex::Gpu::DeviceVector< amrex::BCRec > domain_bcs_type_d
Definition: ROMSX.H:850
-
ROMSX::plot_file_1
std::string plot_file_1
Definition: ROMSX.H:898
-
ROMSX::nc_bdy_file
static std::string nc_bdy_file
Definition: ROMSX.H:948
+
ROMSX::domain_bcs_type_d
amrex::Gpu::DeviceVector< amrex::BCRec > domain_bcs_type_d
Definition: ROMSX.H:849
+
ROMSX::plot_file_1
std::string plot_file_1
Definition: ROMSX.H:897
+
ROMSX::nc_bdy_file
static std::string nc_bdy_file
Definition: ROMSX.H:947
ROMSX::build_fine_mask
amrex::MultiFab & build_fine_mask(int lev)
Definition: ROMSX_SumIQ.cpp:123
-
ROMSX::total_plot_file_step_1
int total_plot_file_step_1
Definition: ROMSX.H:864
+
ROMSX::total_plot_file_step_1
int total_plot_file_step_1
Definition: ROMSX.H:863
ROMSX::writeBuildInfo
static void writeBuildInfo(std::ostream &os)
Definition: writeJobInfo.cpp:135
-
ROMSX::d_havg_pressure
amrex::Gpu::DeviceVector< amrex::Real > d_havg_pressure
Definition: ROMSX.H:975
+
ROMSX::d_havg_pressure
amrex::Gpu::DeviceVector< amrex::Real > d_havg_pressure
Definition: ROMSX.H:974
ROMSX::vec_rhoA
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_rhoA
Definition: ROMSX.H:312
ROMSX::vec_z_r
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_z_r
Definition: ROMSX.H:263
-
ROMSX::do_substep
int do_substep
Definition: ROMSX.H:891
-
ROMSX::physbcs
amrex::Vector< std::unique_ptr< ROMSXPhysBCFunct > > physbcs
Definition: ROMSX.H:833
+
ROMSX::do_substep
int do_substep
Definition: ROMSX.H:890
+
ROMSX::physbcs
amrex::Vector< std::unique_ptr< ROMSXPhysBCFunct > > physbcs
Definition: ROMSX.H:832
ROMSX::is_it_time_for_action
bool is_it_time_for_action(int nstep, amrex::Real time, amrex::Real dt, int action_interval, amrex::Real action_per)
Definition: ROMSX_SumIQ.cpp:151
-
ROMSX::bndry_output_planes_interval
static int bndry_output_planes_interval
Definition: ROMSX.H:963
+
ROMSX::bndry_output_planes_interval
static int bndry_output_planes_interval
Definition: ROMSX.H:962
ROMSX::ROMSX
ROMSX()
Definition: ROMSX.cpp:56
ROMSX::vec_weight2
amrex::Vector< amrex::Real > vec_weight2
Definition: ROMSX.H:315
ROMSX::vec_DU_avg1
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_DU_avg1
Definition: ROMSX.H:284
ROMSX::set_massflux_3d
void set_massflux_3d(amrex::Array4< amrex::Real > u, amrex::Array4< amrex::Real > Hu, amrex::Array4< amrex::Real > on_u, amrex::Array4< amrex::Real > v, amrex::Array4< amrex::Real > Hv, amrex::Array4< amrex::Real > om_v, amrex::Array4< amrex::Real > Hz, const int nnew)
Definition: ROMSX_set_massflux_3d.cpp:18
ROMSX::initHSE
void initHSE()
Initialize HSE.
ROMSX::GetDataAtTime
TimeInterpolatedData GetDataAtTime(int lev, amrex::Real time)
Definition: ROMSX_FillPatch.cpp:94
-
ROMSX::use_tracer_particles
static bool use_tracer_particles
Definition: ROMSX.H:932
+
ROMSX::use_tracer_particles
static bool use_tracer_particles
Definition: ROMSX.H:931
ROMSX::init1DArrays
void init1DArrays()
ROMSX::vec_sustr
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_sustr
Definition: ROMSX.H:273
ROMSX::GotoNextLine
static void GotoNextLine(std::istream &is)
Definition: Checkpoint.cpp:8
ROMSX::vec_rhoS
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_rhoS
Definition: ROMSX.H:311
ROMSX::t3dmix
void t3dmix(const amrex::Box &bx, amrex::Array4< amrex::Real > t, amrex::Array4< amrex::Real > diff2, amrex::Array4< amrex::Real > Hz, amrex::Array4< amrex::Real > pm, amrex::Array4< amrex::Real > pn, amrex::Array4< amrex::Real > pmon_u, amrex::Array4< amrex::Real > pnom_v, int nrhs, int nnew, const amrex::Real dt_lev)
Definition: ROMSX_t3dmix.cpp:6
-
ROMSX::check_int
int check_int
Definition: ROMSX.H:907
+
ROMSX::check_int
int check_int
Definition: ROMSX.H:906
ROMSX::vec_Hvom
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Hvom
Definition: ROMSX.H:236
-
ROMSX::solverChoice
static SolverChoice solverChoice
Definition: ROMSX.H:922
-
ROMSX::stop_time
amrex::Real stop_time
Definition: ROMSX.H:874
+
ROMSX::solverChoice
static SolverChoice solverChoice
Definition: ROMSX.H:921
+
ROMSX::stop_time
amrex::Real stop_time
Definition: ROMSX.H:873
ROMSX::AverageDownTo
void AverageDownTo(int crse_lev)
Definition: ROMSX.cpp:575
ROMSX::Evolve
void Evolve()
Definition: ROMSX.cpp:134
ROMSX::vec_Huon
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Huon
Definition: ROMSX.H:234
-
ROMSX::last_plot_file_step_2
int last_plot_file_step_2
Definition: ROMSX.H:862
+
ROMSX::last_plot_file_step_2
int last_plot_file_step_2
Definition: ROMSX.H:861
ROMSX::FillPatch
void FillPatch(int lev, amrex::Real time, const amrex::Vector< amrex::MultiFab * > &mf)
-
ROMSX::d_havg_density
amrex::Gpu::DeviceVector< amrex::Real > d_havg_density
Definition: ROMSX.H:973
-
ROMSX::column_file_name
static std::string column_file_name
Definition: ROMSX.H:959
+
ROMSX::d_havg_density
amrex::Gpu::DeviceVector< amrex::Real > d_havg_density
Definition: ROMSX.H:972
+
ROMSX::column_file_name
static std::string column_file_name
Definition: ROMSX.H:958
ROMSX::vec_vbar
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_vbar
Definition: ROMSX.H:300
-
ROMSX::getAdvFluxReg
AMREX_FORCE_INLINE amrex::YAFluxRegister * getAdvFluxReg(int lev)
Definition: ROMSX.H:1019
-
ROMSX::num_boxes_at_level
amrex::Vector< int > num_boxes_at_level
Definition: ROMSX.H:821
-
ROMSX::DataLog
AMREX_FORCE_INLINE std::ostream & DataLog(int i)
Definition: ROMSX.H:1026
+
ROMSX::getAdvFluxReg
AMREX_FORCE_INLINE amrex::YAFluxRegister * getAdvFluxReg(int lev)
Definition: ROMSX.H:1018
+
ROMSX::num_boxes_at_level
amrex::Vector< int > num_boxes_at_level
Definition: ROMSX.H:820
+
ROMSX::DataLog
AMREX_FORCE_INLINE std::ostream & DataLog(int i)
Definition: ROMSX.H:1025
ROMSX::vec_x_r
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_x_r
Definition: ROMSX.H:259
ROMSX::initRayleigh
void initRayleigh()
Initialize Rayleigh damping profiles.
-
ROMSX::check_file
std::string check_file
Definition: ROMSX.H:904
+
ROMSX::check_file
std::string check_file
Definition: ROMSX.H:903
ROMSX::vec_t3
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_t3
Definition: ROMSX.H:305
-
ROMSX::istep
amrex::Vector< int > istep
Definition: ROMSX.H:825
-
ROMSX::ref_tags
static amrex::Vector< amrex::AMRErrorTag > ref_tags
Definition: ROMSX.H:982
-
ROMSX::last_check_file_step
int last_check_file_step
Definition: ROMSX.H:866
-
ROMSX::DataLogName
const std::string DataLogName(int i) const noexcept
The filename of the ith datalog file.
Definition: ROMSX.H:1073
+
ROMSX::istep
amrex::Vector< int > istep
Definition: ROMSX.H:824
+
ROMSX::ref_tags
static amrex::Vector< amrex::AMRErrorTag > ref_tags
Definition: ROMSX.H:981
+
ROMSX::last_check_file_step
int last_check_file_step
Definition: ROMSX.H:865
+
ROMSX::DataLogName
const std::string DataLogName(int i) const noexcept
The filename of the ith datalog file.
Definition: ROMSX.H:1072
ROMSX::RemakeLevel
virtual void RemakeLevel(int lev, amrex::Real time, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm) override
Definition: ROMSX_make_new_level.cpp:50
+
ROMSX::rhs_uv_3d
void rhs_uv_3d(const amrex::Box &bx, const amrex::Box &xbx, const amrex::Box &ybx, amrex::Array4< amrex::Real > uold, amrex::Array4< amrex::Real > vold, amrex::Array4< amrex::Real > ru, amrex::Array4< amrex::Real > rv, amrex::Array4< amrex::Real > rufrc, amrex::Array4< amrex::Real > rvfrc, amrex::Array4< amrex::Real > sustr, amrex::Array4< amrex::Real > svstr, amrex::Array4< amrex::Real > bustr, amrex::Array4< amrex::Real > bvstr, amrex::Array4< amrex::Real > Huon, amrex::Array4< amrex::Real > Hvom, amrex::Array4< amrex::Real > on_u, amrex::Array4< amrex::Real > om_v, amrex::Array4< amrex::Real > om_u, amrex::Array4< amrex::Real > on_v, amrex::Array4< amrex::Real > W, amrex::Array4< amrex::Real > FC, int nrhs, int N)
Definition: ROMSX_rhs_uv_3d.cpp:32
ROMSX::coriolis
void coriolis(const amrex::Box &bx, const amrex::Box &gbx, amrex::Array4< amrex::Real > uold, amrex::Array4< amrex::Real > vold, amrex::Array4< amrex::Real > ru, amrex::Array4< amrex::Real > rv, amrex::Array4< amrex::Real > Hz, amrex::Array4< amrex::Real > fomn, int nrhs, int nr)
Definition: ROMSX_coriolis.cpp:10
ROMSX::update_vel_3d
void update_vel_3d(const amrex::Box &bx, const amrex::Box &gbx, const int ioff, const int joff, amrex::Array4< amrex::Real > vel, amrex::Array4< amrex::Real > vel_old, amrex::Array4< amrex::Real > rvel, amrex::Array4< amrex::Real > Hz, amrex::Array4< amrex::Real > Akv, amrex::Array4< amrex::Real > pm, amrex::Array4< amrex::Real > pn, amrex::Array4< amrex::Real > DC, amrex::Array4< amrex::Real > FC, amrex::Array4< amrex::Real > sstr, amrex::Array4< amrex::Real > bstr, amrex::Array4< amrex::Real > z_r, const int iic, const int ntfirst, const int nnew, int nstp, int nrhs, int N, const amrex::Real lambda, const amrex::Real dt_lev)
Definition: ROMSX_update_vel_3d.cpp:19
ROMSX::vert_visc_3d
void vert_visc_3d(const amrex::Box &bx, const int ioff, const int joff, amrex::Array4< amrex::Real > phi, amrex::Array4< amrex::Real const > Hz, amrex::Array4< amrex::Real > Hzk, amrex::Array4< amrex::Real > oHz, amrex::Array4< amrex::Real > AK, amrex::Array4< amrex::Real > Akv, amrex::Array4< amrex::Real > BC, amrex::Array4< amrex::Real > DC, amrex::Array4< amrex::Real > FC, amrex::Array4< amrex::Real > CF, const int nnew, const int N, const amrex::Real dt_lev)
Definition: ROMSX_vert_visc_3d.cpp:10
ROMSX::set_weights
void set_weights(int lev)
Definition: ROMSX_set_weights.cpp:10
-
ROMSX::last_plot_file_step_1
int last_plot_file_step_1
Definition: ROMSX.H:861
+
ROMSX::last_plot_file_step_1
int last_plot_file_step_1
Definition: ROMSX.H:860
ROMSX::WriteGenericPlotfileHeaderWithTerrain
void WriteGenericPlotfileHeaderWithTerrain(std::ostream &HeaderFile, int nlevels, const amrex::Vector< amrex::BoxArray > &bArray, const amrex::Vector< std::string > &varnames, amrex::Real time, const amrex::Vector< int > &level_steps, const std::string &versionName, const std::string &levelPrefix, const std::string &mfPrefix) const
Definition: Plotfile.cpp:384
-
ROMSX::domain_bc_type
amrex::Array< std::string, 2 *AMREX_SPACEDIM > domain_bc_type
Definition: ROMSX.H:853
+
ROMSX::domain_bc_type
amrex::Array< std::string, 2 *AMREX_SPACEDIM > domain_bc_type
Definition: ROMSX.H:852
ROMSX::vec_svstr
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_svstr
Definition: ROMSX.H:275
ROMSX::init_stuff
void init_stuff(int lev, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm)
Definition: ROMSX_make_new_level.cpp:182
ROMSX::set_vmix
void set_vmix(int lev)
Definition: ROMSX.cpp:372
-
ROMSX::rhs_uv_3d
void rhs_uv_3d(const amrex::Box &bx, const amrex::Box &xbx, const amrex::Box &ybx, const amrex::Box &gbx, amrex::Array4< amrex::Real > uold, amrex::Array4< amrex::Real > vold, amrex::Array4< amrex::Real > ru, amrex::Array4< amrex::Real > rv, amrex::Array4< amrex::Real > rufrc, amrex::Array4< amrex::Real > rvfrc, amrex::Array4< amrex::Real > sustr, amrex::Array4< amrex::Real > svstr, amrex::Array4< amrex::Real > bustr, amrex::Array4< amrex::Real > bvstr, amrex::Array4< amrex::Real > Huon, amrex::Array4< amrex::Real > Hvom, amrex::Array4< amrex::Real > on_u, amrex::Array4< amrex::Real > om_v, amrex::Array4< amrex::Real > om_u, amrex::Array4< amrex::Real > on_v, amrex::Array4< amrex::Real > W, amrex::Array4< amrex::Real > FC, int nrhs, int N)
Definition: ROMSX_rhs_uv_3d.cpp:32
-
ROMSX::ComputeGhostCells
AMREX_FORCE_INLINE int ComputeGhostCells(const int &spatial_order)
Definition: ROMSX.H:992
+
ROMSX::ComputeGhostCells
AMREX_FORCE_INLINE int ComputeGhostCells(const int &spatial_order)
Definition: ROMSX.H:991
ROMSX::vars_new
amrex::Vector< amrex::Vector< amrex::MultiFab > > vars_new
Definition: ROMSX.H:221
ROMSX::post_update
void post_update(amrex::MultiFab &state_mf, const amrex::Real time, const amrex::Geometry &geom)
ROMSX::vec_rvfrc
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_rvfrc
Definition: ROMSX.H:244
@@ -1253,77 +1252,77 @@
ROMSX::vec_weight1
amrex::Vector< amrex::Real > vec_weight1
Definition: ROMSX.H:314
ROMSX::setPlotVariables
void setPlotVariables(const std::string &pp_plot_var_names, amrex::Vector< std::string > &plot_var_names)
Definition: Plotfile.cpp:9
ROMSX::ClearLevel
virtual void ClearLevel(int lev) override
Definition: ROMSX_make_new_level.cpp:299
-
ROMSX::m_bc_extdir_vals
amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NVAR > m_bc_extdir_vals
Definition: ROMSX.H:856
+
ROMSX::m_bc_extdir_vals
amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NVAR > m_bc_extdir_vals
Definition: ROMSX.H:855
ROMSX::AverageDown
void AverageDown()
Definition: ROMSX.cpp:565
ROMSX::vec_bvstr
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_bvstr
Definition: ROMSX.H:281
ROMSX::timeStep
void timeStep(int lev, amrex::Real time, int iteration)
Definition: ROMSX_TimeStep.cpp:9
ROMSX::Advance
void Advance(int lev, amrex::Real time, amrex::Real dt_lev, int iteration, int ncycle)
Definition: ROMSX_Advance.cpp:7
ROMSX::set_hmixcoef
void set_hmixcoef(int lev)
Definition: ROMSX.cpp:380
-
ROMSX::mapfac_m
amrex::Vector< std::unique_ptr< amrex::MultiFab > > mapfac_m
Definition: ROMSX.H:837
+
ROMSX::mapfac_m
amrex::Vector< std::unique_ptr< amrex::MultiFab > > mapfac_m
Definition: ROMSX.H:836
ROMSX::vec_bustr
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_bustr
Definition: ROMSX.H:279
ROMSX::vec_Akt
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Akt
Definition: ROMSX.H:248
ROMSX::vec_visc3d_r
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_visc3d_r
Definition: ROMSX.H:309
ROMSX::volWgtSumMF
amrex::Real volWgtSumMF(int lev, const amrex::MultiFab &mf, int comp, bool local, bool finemask)
Definition: ROMSX_SumIQ.cpp:96
ROMSX::prestep
void prestep(int lev, amrex::MultiFab &mf_uold, amrex::MultiFab &mf_vold, amrex::MultiFab &mf_u, amrex::MultiFab &mf_v, std::unique_ptr< amrex::MultiFab > &mf_ru, std::unique_ptr< amrex::MultiFab > &mf_rv, amrex::MultiFab &mf_tempold, amrex::MultiFab &mf_saltold, amrex::MultiFab &mf_temp, amrex::MultiFab &mf_salt, amrex::MultiFab &mf_W, amrex::MultiFab &mf_DC, std::unique_ptr< amrex::MultiFab > &mf_z_r, std::unique_ptr< amrex::MultiFab > &mf_z_w, std::unique_ptr< amrex::MultiFab > &mf_h, std::unique_ptr< amrex::MultiFab > &mf_sustr, std::unique_ptr< amrex::MultiFab > &mf_svstr, std::unique_ptr< amrex::MultiFab > &mf_bustr, std::unique_ptr< amrex::MultiFab > &mf_bvstr, const int iic, const int nfirst, const int nnew, int nstp, int nrhs, int N, const amrex::Real dt_lev)
Definition: ROMSX_prestep.cpp:38
-
ROMSX::fixed_ndtfast_ratio
static int fixed_ndtfast_ratio
Definition: ROMSX.H:887
+
ROMSX::fixed_ndtfast_ratio
static int fixed_ndtfast_ratio
Definition: ROMSX.H:886
ROMSX::prestep_t_3d
void prestep_t_3d(const amrex::Box &tbx, const amrex::Box &gbx, amrex::Array4< amrex::Real > tempold, amrex::Array4< amrex::Real > temp, amrex::Array4< amrex::Real > tempcache, amrex::Array4< amrex::Real > ru, amrex::Array4< amrex::Real > Hz, amrex::Array4< amrex::Real > Akt, amrex::Array4< amrex::Real > Huon, amrex::Array4< amrex::Real > Hvom, amrex::Array4< amrex::Real > pm, amrex::Array4< amrex::Real > pn, amrex::Array4< amrex::Real > W, amrex::Array4< amrex::Real > DC, amrex::Array4< amrex::Real > FC, amrex::Array4< amrex::Real > tempstore, amrex::Array4< amrex::Real > z_r, amrex::Array4< amrex::Real > z_w, amrex::Array4< amrex::Real > h, int iic, int ntfirst, int nnew, int nstp, int nrhs, int N, const amrex::Real lambda, const amrex::Real dt_lev)
Definition: ROMSX_prestep_t_3d.cpp:10
ROMSX::vec_DV_avg2
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_DV_avg2
Definition: ROMSX.H:290
ROMSX::rhs_2d
void rhs_2d(const amrex::Box &bx, amrex::Array4< amrex::Real > uold, amrex::Array4< amrex::Real > vold, amrex::Array4< amrex::Real > ru, amrex::Array4< amrex::Real > rv, amrex::Array4< amrex::Real > Huon, amrex::Array4< amrex::Real > Hvom, int nrhs)
Definition: ROMSX_rhs_uv_2d.cpp:19
ROMSX::ComputeDt
void ComputeDt()
Definition: ROMSX_ComputeTimestep.cpp:8
-
ROMSX::fine_mask
amrex::MultiFab fine_mask
Definition: ROMSX.H:988
-
ROMSX::h_havg_density
amrex::Vector< amrex::Real > h_havg_density
Definition: ROMSX.H:970
-
ROMSX::plot_var_names_1
amrex::Vector< std::string > plot_var_names_1
Definition: ROMSX.H:909
+
ROMSX::fine_mask
amrex::MultiFab fine_mask
Definition: ROMSX.H:987
+
ROMSX::h_havg_density
amrex::Vector< amrex::Real > h_havg_density
Definition: ROMSX.H:969
+
ROMSX::plot_var_names_1
amrex::Vector< std::string > plot_var_names_1
Definition: ROMSX.H:908
ROMSX::set_smflux
void set_smflux(int lev, amrex::Real time)
Definition: ROMSX.cpp:391
-
ROMSX::check_type
std::string check_type
Definition: ROMSX.H:905
-
ROMSX::nc_init_file
static amrex::Vector< amrex::Vector< std::string > > nc_init_file
Definition: ROMSX.H:945
+
ROMSX::check_type
std::string check_type
Definition: ROMSX.H:904
+
ROMSX::nc_init_file
static amrex::Vector< amrex::Vector< std::string > > nc_init_file
Definition: ROMSX.H:944
ROMSX::ReadCheckpointFile
void ReadCheckpointFile()
Definition: Checkpoint.cpp:177
-
ROMSX::column_per
static amrex::Real column_per
Definition: ROMSX.H:956
+
ROMSX::column_per
static amrex::Real column_per
Definition: ROMSX.H:955
ROMSX::advance_3d_ml
void advance_3d_ml(int lev, amrex::Real dt_lev)
Definition: ROMSX_advance_3d_ml.cpp:6
ROMSX::update_massflux_3d
void update_massflux_3d(const amrex::Box &bx, const int ioff, const int joff, amrex::Array4< amrex::Real > phi, amrex::Array4< amrex::Real > phibar, amrex::Array4< amrex::Real > Hphi, amrex::Array4< amrex::Real const > Hz, amrex::Array4< amrex::Real > on_u_or_om_v, amrex::Array4< amrex::Real const > Dphi1, amrex::Array4< amrex::Real const > Dphi2, amrex::Array4< amrex::Real > DC, amrex::Array4< amrex::Real > FC, const int nnew)
Definition: ROMSX_update_massflux_3d.cpp:23
ROMSX::vec_s_r
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_s_r
Definition: ROMSX.H:267
ROMSX::setup_step
void setup_step(int lev, amrex::Real dt_lev)
Definition: ROMSX_setup_step.cpp:7
ROMSX::vec_z_w
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_z_w
Definition: ROMSX.H:265
ROMSX::advance_2d
void advance_2d(int lev, amrex::MultiFab &mf_u, amrex::MultiFab &mf_v, std::unique_ptr< amrex::MultiFab > &mf_rhoS, std::unique_ptr< amrex::MultiFab > &mf_rhoA, std::unique_ptr< amrex::MultiFab > &mf_ru, std::unique_ptr< amrex::MultiFab > &mf_rv, std::unique_ptr< amrex::MultiFab > &mf_rufrc, std::unique_ptr< amrex::MultiFab > &mf_rvfrc, std::unique_ptr< amrex::MultiFab > &mf_Zt_avg1, std::unique_ptr< amrex::MultiFab > &mf_DU_avg1, std::unique_ptr< amrex::MultiFab > &mf_DU_avg2, std::unique_ptr< amrex::MultiFab > &mf_DV_avg1, std::unique_ptr< amrex::MultiFab > &mf_DV_avg2, std::unique_ptr< amrex::MultiFab > &mf_rubar, std::unique_ptr< amrex::MultiFab > &mf_rvbar, std::unique_ptr< amrex::MultiFab > &mf_rzeta, std::unique_ptr< amrex::MultiFab > &mf_ubar, std::unique_ptr< amrex::MultiFab > &mf_vbar, std::unique_ptr< amrex::MultiFab > &mf_zeta, std::unique_ptr< amrex::MultiFab > &mf_h, std::unique_ptr< amrex::MultiFab > &mf_visc2_p, std::unique_ptr< amrex::MultiFab > &mf_visc2_r, const int ncomp, const amrex::Real dtfast_lev, const bool predictor_2d_step, const bool first_2d_step, int my_iif, int &next_indx1)
Definition: ROMSX_advance_2d.cpp:42
-
ROMSX::plotfile_type
static std::string plotfile_type
Definition: ROMSX.H:939
-
ROMSX::h_havg_pressure
amrex::Vector< amrex::Real > h_havg_pressure
Definition: ROMSX.H:972
+
ROMSX::plotfile_type
static std::string plotfile_type
Definition: ROMSX.H:938
+
ROMSX::h_havg_pressure
amrex::Vector< amrex::Real > h_havg_pressure
Definition: ROMSX.H:971
ROMSX::vec_rvbar
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_rvbar
Definition: ROMSX.H:294
-
ROMSX::datalog
amrex::Vector< std::unique_ptr< std::fstream > > datalog
Definition: ROMSX.H:1069
-
ROMSX::mapfac_u
amrex::Vector< std::unique_ptr< amrex::MultiFab > > mapfac_u
Definition: ROMSX.H:838
-
ROMSX::velocity_names
const amrex::Vector< std::string > velocity_names
Definition: ROMSX.H:911
-
ROMSX::cfl
static amrex::Real cfl
Definition: ROMSX.H:880
+
ROMSX::datalog
amrex::Vector< std::unique_ptr< std::fstream > > datalog
Definition: ROMSX.H:1068
+
ROMSX::mapfac_u
amrex::Vector< std::unique_ptr< amrex::MultiFab > > mapfac_u
Definition: ROMSX.H:837
+
ROMSX::velocity_names
const amrex::Vector< std::string > velocity_names
Definition: ROMSX.H:910
+
ROMSX::cfl
static amrex::Real cfl
Definition: ROMSX.H:879
ROMSX::vec_DU_avg2
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_DU_avg2
Definition: ROMSX.H:286
-
ROMSX::column_loc_x
static amrex::Real column_loc_x
Definition: ROMSX.H:957
+
ROMSX::column_loc_x
static amrex::Real column_loc_x
Definition: ROMSX.H:956
ROMSX::vars_old
amrex::Vector< amrex::Vector< amrex::MultiFab > > vars_old
Definition: ROMSX.H:223
ROMSX::vec_z_phys_nd
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_z_phys_nd
Definition: ROMSX.H:269
ROMSX::MakeNewLevelFromCoarse
virtual void MakeNewLevelFromCoarse(int lev, amrex::Real time, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm) override
Definition: ROMSX_make_new_level.cpp:18
ROMSX::advance_2d_onestep
void advance_2d_onestep(int lev, amrex::Real dt_lev, amrex::Real dtfast_lev, int my_iif, int nfast_counter)
Definition: ROMSX_advance_2d_onestep.cpp:6
-
ROMSX::plot_file_on_restart
int plot_file_on_restart
Definition: ROMSX.H:867
+
ROMSX::plot_file_on_restart
int plot_file_on_restart
Definition: ROMSX.H:866
ROMSX::WriteMultiLevelPlotfileWithTerrain
void WriteMultiLevelPlotfileWithTerrain(const std::string &plotfilename, int nlevels, const amrex::Vector< const amrex::MultiFab * > &mf, const amrex::Vector< const amrex::MultiFab * > &mf_nd, const amrex::Vector< std::string > &varnames, amrex::Real time, const amrex::Vector< int > &level_steps, const std::string &versionName="HyperCLaw-V1.1", const std::string &levelPrefix="Level_", const std::string &mfPrefix="Cell", const amrex::Vector< std::string > &extra_dirs=amrex::Vector< std::string >()) const
Definition: Plotfile.cpp:299
ROMSX::InitData
void InitData()
Definition: ROMSX.cpp:246
ROMSX::refinement_criteria_setup
void refinement_criteria_setup()
Definition: ROMSX_Tagging.cpp:56
-
ROMSX::output_bndry_planes
static int output_bndry_planes
Definition: ROMSX.H:962
-
ROMSX::phys_bc_type
amrex::GpuArray< ROMSX_BC, AMREX_SPACEDIM *2 > phys_bc_type
Definition: ROMSX.H:859
+
ROMSX::output_bndry_planes
static int output_bndry_planes
Definition: ROMSX.H:961
+
ROMSX::phys_bc_type
amrex::GpuArray< ROMSX_BC, AMREX_SPACEDIM *2 > phys_bc_type
Definition: ROMSX.H:858
ROMSX::vec_y_r
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_y_r
Definition: ROMSX.H:261
-
ROMSX::d_havg_temperature
amrex::Gpu::DeviceVector< amrex::Real > d_havg_temperature
Definition: ROMSX.H:974
-
ROMSX::fixed_fast_dt
static amrex::Real fixed_fast_dt
Definition: ROMSX.H:886
-
ROMSX::plot_var_names_2
amrex::Vector< std::string > plot_var_names_2
Definition: ROMSX.H:910
-
ROMSX::output_1d_column
static int output_1d_column
Definition: ROMSX.H:954
+
ROMSX::d_havg_temperature
amrex::Gpu::DeviceVector< amrex::Real > d_havg_temperature
Definition: ROMSX.H:973
+
ROMSX::fixed_fast_dt
static amrex::Real fixed_fast_dt
Definition: ROMSX.H:885
+
ROMSX::plot_var_names_2
amrex::Vector< std::string > plot_var_names_2
Definition: ROMSX.H:909
+
ROMSX::output_1d_column
static int output_1d_column
Definition: ROMSX.H:953
ROMSX::restart
void restart()
Definition: ROMSX.cpp:347
-
ROMSX::fixed_dt
static amrex::Real fixed_dt
Definition: ROMSX.H:885
+
ROMSX::fixed_dt
static amrex::Real fixed_dt
Definition: ROMSX.H:884
ROMSX::~ROMSX
virtual ~ROMSX()
Definition: ROMSX.cpp:128
-
ROMSX::plot_file_2
std::string plot_file_2
Definition: ROMSX.H:899
-
ROMSX::plot_int_2
int plot_int_2
Definition: ROMSX.H:901
+
ROMSX::plot_file_2
std::string plot_file_2
Definition: ROMSX.H:898
+
ROMSX::plot_int_2
int plot_int_2
Definition: ROMSX.H:900
ROMSX::vec_Hz
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Hz
Definition: ROMSX.H:232
-
ROMSX::h_havg_temperature
amrex::Vector< amrex::Real > h_havg_temperature
Definition: ROMSX.H:971
+
ROMSX::h_havg_temperature
amrex::Vector< amrex::Real > h_havg_temperature
Definition: ROMSX.H:970
ROMSX::uv3dmix
void uv3dmix(const amrex::Box &bx, const amrex::Box &gbx, amrex::Array4< amrex::Real > u, amrex::Array4< amrex::Real > v, amrex::Array4< amrex::Real > uold, amrex::Array4< amrex::Real > vold, amrex::Array4< amrex::Real > rufrc, amrex::Array4< amrex::Real > rvfrc, amrex::Array4< amrex::Real > visc2_p, amrex::Array4< amrex::Real > visc2_r, amrex::Array4< amrex::Real > Hz, amrex::Array4< amrex::Real > om_r, amrex::Array4< amrex::Real > on_r, amrex::Array4< amrex::Real > om_p, amrex::Array4< amrex::Real > on_p, amrex::Array4< amrex::Real > pm, amrex::Array4< amrex::Real > pn, int nrhs, int nnew, const amrex::Real dt_lev)
Definition: ROMSX_uv3dmix.cpp:6
ROMSX::fill_rhs
void fill_rhs(amrex::MultiFab &rhs_mf, const amrex::MultiFab &state_mf, const amrex::Real time, const amrex::Geometry &geom)
-
ROMSX::bndry_output_planes_start_time
static amrex::Real bndry_output_planes_start_time
Definition: ROMSX.H:965
-
ROMSX::dt
amrex::Vector< amrex::Real > dt
Definition: ROMSX.H:831
+
ROMSX::bndry_output_planes_start_time
static amrex::Real bndry_output_planes_start_time
Definition: ROMSX.H:964
+
ROMSX::dt
amrex::Vector< amrex::Real > dt
Definition: ROMSX.H:830
ROMSX::vec_diff2_salt
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_diff2_salt
Definition: ROMSX.H:254
ROMSX::vec_visc2_r
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_visc2_r
Definition: ROMSX.H:252
ROMSX::vec_DV_avg1
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_DV_avg1
Definition: ROMSX.H:288
ROMSX::resize_stuff
void resize_stuff(int lev)
Definition: ROMSX_make_new_level.cpp:130
-
ROMSX::t_new
amrex::Vector< amrex::Real > t_new
Definition: ROMSX.H:829
+
ROMSX::t_new
amrex::Vector< amrex::Real > t_new
Definition: ROMSX.H:828
ROMSX::stretch_transform
void stretch_transform(int lev)
Definition: DepthStretchTransform.H:12
ROMSX::post_timestep
void post_timestep(int nstep, amrex::Real time, amrex::Real dt_lev)
Definition: ROMSX.cpp:217
ROMSX::init_only
void init_only(int lev, amrex::Real time)
Definition: ROMSX.cpp:399
@@ -1331,29 +1330,29 @@
ROMSX::estTimeStep
amrex::Real estTimeStep(int lev) const
Definition: ROMSX_ComputeTimestep.cpp:40
ROMSX::rhs_t_3d
void rhs_t_3d(const amrex::Box &bx, const amrex::Box &gbx, amrex::Array4< amrex::Real > t, amrex::Array4< amrex::Real > tempstore, amrex::Array4< amrex::Real > Huon, amrex::Array4< amrex::Real > Hvom, amrex::Array4< amrex::Real > Hz, amrex::Array4< amrex::Real > oHz, amrex::Array4< amrex::Real > pn, amrex::Array4< amrex::Real > pm, amrex::Array4< amrex::Real > W, amrex::Array4< amrex::Real > FC, int nrhs, int nnew, int N, const amrex::Real dt_lev)
Definition: ROMSX_rhs_t_3d.cpp:28
ROMSX::vec_zeta
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_zeta
Definition: ROMSX.H:302
-
ROMSX::nsubsteps
amrex::Vector< int > nsubsteps
Definition: ROMSX.H:826
+
ROMSX::nsubsteps
amrex::Vector< int > nsubsteps
Definition: ROMSX.H:825
ROMSX::vec_ru
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_ru
Definition: ROMSX.H:238
-
ROMSX::derived_names
const amrex::Vector< std::string > derived_names
Definition: ROMSX.H:915
-
ROMSX::verbose
static int verbose
Definition: ROMSX.H:929
-
ROMSX::startCPUTime
static amrex::Real startCPUTime
Definition: ROMSX.H:1038
+
ROMSX::derived_names
const amrex::Vector< std::string > derived_names
Definition: ROMSX.H:914
+
ROMSX::verbose
static int verbose
Definition: ROMSX.H:928
+
ROMSX::startCPUTime
static amrex::Real startCPUTime
Definition: ROMSX.H:1037
ROMSX::FillPatch
void FillPatch(int lev, amrex::Real time, amrex::Vector< amrex::MultiFab > &mf)
ROMSX::vec_rv
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_rv
Definition: ROMSX.H:240
ROMSX::vec_rufrc
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_rufrc
Definition: ROMSX.H:242
ROMSX::vec_rubar
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_rubar
Definition: ROMSX.H:292
-
ROMSX::regrid_int
int regrid_int
Definition: ROMSX.H:895
-
ROMSX::boxes_at_level
amrex::Vector< amrex::Vector< amrex::Box > > boxes_at_level
Definition: ROMSX.H:823
+
ROMSX::regrid_int
int regrid_int
Definition: ROMSX.H:894
+
ROMSX::boxes_at_level
amrex::Vector< amrex::Vector< amrex::Box > > boxes_at_level
Definition: ROMSX.H:822
ROMSX::set_bathymetry
void set_bathymetry(int lev)
Definition: ROMSX.cpp:363
ROMSX::vec_Zt_avg1
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Zt_avg1
Definition: ROMSX.H:271
-
ROMSX::plot_int_1
int plot_int_1
Definition: ROMSX.H:900
+
ROMSX::plot_int_1
int plot_int_1
Definition: ROMSX.H:899
ROMSX::init_bcs
void init_bcs()
Definition: ROMSX_init_bcs.cpp:9
ROMSX::FillCoarsePatch
void FillCoarsePatch(int lev, amrex::Real time, amrex::MultiFab &mf, int icomp, int ncomp, int var_idx)
Definition: ROMSX_FillPatch.cpp:243
-
ROMSX::init_type
static std::string init_type
Definition: ROMSX.H:942
+
ROMSX::init_type
static std::string init_type
Definition: ROMSX.H:941
ROMSX::set_2darrays
void set_2darrays(int lev)
Definition: ROMSX_init.cpp:237
-
ROMSX::setRecordDataInfo
void setRecordDataInfo(int i, const std::string &filename)
Definition: ROMSX.H:1056
+
ROMSX::setRecordDataInfo
void setRecordDataInfo(int i, const std::string &filename)
Definition: ROMSX.H:1055
ROMSX::vec_s3
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_s3
Definition: ROMSX.H:307
ROMSX::vec_rzeta
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_rzeta
Definition: ROMSX.H:296
-
ROMSX::nfast
int nfast
Definition: ROMSX.H:888
-
ROMSX::t_old
amrex::Vector< amrex::Real > t_old
Definition: ROMSX.H:830
+
ROMSX::nfast
int nfast
Definition: ROMSX.H:887
+
ROMSX::t_old
amrex::Vector< amrex::Real > t_old
Definition: ROMSX.H:829
ROMSX::ErrorEst
virtual void ErrorEst(int lev, amrex::TagBoxArray &tags, amrex::Real time, int ngrow) override
Definition: ROMSX_Tagging.cpp:15
ROMSX::vec_rdrag
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_rdrag
Definition: ROMSX.H:277
ROMSX::MakeNewLevelFromScratch
virtual void MakeNewLevelFromScratch(int lev, amrex::Real time, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm) override
Definition: ROMSX_make_new_level.cpp:94
@@ -1362,41 +1361,41 @@
ROMSX::FillCoarsePatchAllVars
void FillCoarsePatchAllVars(int lev, amrex::Real time, amrex::Vector< amrex::MultiFab > &vmf)
Definition: ROMSX_FillPatch.cpp:305
ROMSX::vert_mean_3d
void vert_mean_3d(const amrex::Box &bx, const int ioff, const int joff, amrex::Array4< amrex::Real > phi, amrex::Array4< amrex::Real const > Hz, amrex::Array4< amrex::Real const > Dphi_avg1, amrex::Array4< amrex::Real > DC, amrex::Array4< amrex::Real > CF, amrex::Array4< amrex::Real > dxlen, const int nnew, const int N)
Definition: ROMSX_vert_mean_3d.cpp:10
ROMSX::romsx_advance
void romsx_advance(int level, amrex::MultiFab &cons_old, amrex::MultiFab &cons_new, amrex::MultiFab &xvel_old, amrex::MultiFab &yvel_old, amrex::MultiFab &zvel_old, amrex::MultiFab &xvel_new, amrex::MultiFab &yvel_new, amrex::MultiFab &zvel_new, amrex::MultiFab &source, const amrex::Geometry fine_geom, const amrex::Real dt, const amrex::Real time)
-
ROMSX::max_step
int max_step
Definition: ROMSX.H:873
-
ROMSX::mapfac_v
amrex::Vector< std::unique_ptr< amrex::MultiFab > > mapfac_v
Definition: ROMSX.H:839
-
ROMSX::num_files_at_level
amrex::Vector< int > num_files_at_level
Definition: ROMSX.H:822
-
ROMSX::input_sounding_file
static std::string input_sounding_file
Definition: ROMSX.H:951
-
ROMSX::NumDataLogs
AMREX_FORCE_INLINE int NumDataLogs() noexcept
Definition: ROMSX.H:1033
-
ROMSX::sst
amrex::Vector< std::unique_ptr< amrex::MultiFab > > sst
Definition: ROMSX.H:841
-
ROMSX::restart_chkfile
std::string restart_chkfile
Definition: ROMSX.H:877
-
ROMSX::datalogname
amrex::Vector< std::string > datalogname
Definition: ROMSX.H:1070
+
ROMSX::max_step
int max_step
Definition: ROMSX.H:872
+
ROMSX::mapfac_v
amrex::Vector< std::unique_ptr< amrex::MultiFab > > mapfac_v
Definition: ROMSX.H:838
+
ROMSX::num_files_at_level
amrex::Vector< int > num_files_at_level
Definition: ROMSX.H:821
+
ROMSX::input_sounding_file
static std::string input_sounding_file
Definition: ROMSX.H:950
+
ROMSX::NumDataLogs
AMREX_FORCE_INLINE int NumDataLogs() noexcept
Definition: ROMSX.H:1032
+
ROMSX::sst
amrex::Vector< std::unique_ptr< amrex::MultiFab > > sst
Definition: ROMSX.H:840
+
ROMSX::restart_chkfile
std::string restart_chkfile
Definition: ROMSX.H:876
+
ROMSX::datalogname
amrex::Vector< std::string > datalogname
Definition: ROMSX.H:1069
ROMSX::ReadParameters
void ReadParameters()
Definition: ROMSX.cpp:429
ROMSX::PlotFileVarNames
amrex::Vector< std::string > PlotFileVarNames(amrex::Vector< std::string > plot_var_names) const
Definition: Plotfile.cpp:78
-
ROMSX::input_bndry_planes
static int input_bndry_planes
Definition: ROMSX.H:968
-
ROMSX::bndry_output_planes_per
static amrex::Real bndry_output_planes_per
Definition: ROMSX.H:964
-
ROMSX::restart_type
std::string restart_type
Definition: ROMSX.H:906
+
ROMSX::input_bndry_planes
static int input_bndry_planes
Definition: ROMSX.H:967
+
ROMSX::bndry_output_planes_per
static amrex::Real bndry_output_planes_per
Definition: ROMSX.H:963
+
ROMSX::restart_type
std::string restart_type
Definition: ROMSX.H:905
ROMSX::writeJobInfo
void writeJobInfo(const std::string &dir) const
Definition: writeJobInfo.cpp:7
-
ROMSX::column_loc_y
static amrex::Real column_loc_y
Definition: ROMSX.H:958
+
ROMSX::column_loc_y
static amrex::Real column_loc_y
Definition: ROMSX.H:957
ROMSX::vec_Akv
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Akv
Definition: ROMSX.H:246
-
ROMSX::column_interval
static int column_interval
Definition: ROMSX.H:955
+
ROMSX::column_interval
static int column_interval
Definition: ROMSX.H:954
ROMSX::rho_eos
void rho_eos(const amrex::Box &bx, amrex::Array4< amrex::Real > temp, amrex::Array4< amrex::Real > salt, amrex::Array4< amrex::Real > rho, amrex::Array4< amrex::Real > rhoA, amrex::Array4< amrex::Real > rhoS, amrex::Array4< amrex::Real > Hz, amrex::Array4< amrex::Real > z_w, amrex::Array4< amrex::Real > h, const int nrhs, const int N)
Definition: ROMSX_rho_eos.cpp:21
ROMSX::init_custom
void init_custom(int lev)
Definition: ROMSX_init.cpp:200
ROMSX::FillPatchNoPhysBC
void FillPatchNoPhysBC(int lev, amrex::Real time, const amrex::Vector< amrex::MultiFab * > &mfs, amrex::MultiFab &mf, int icomp, int ncomp, amrex::MultiFab &crse_old, amrex::MultiFab &crse_new, amrex::MultiFab &fine_old, amrex::MultiFab &fine_new)
Definition: ROMSX_FillPatch.cpp:313
ROMSX::timeStepML
void timeStepML(amrex::Real time, int iteration)
Definition: ROMSX_TimeStepML.cpp:9
-
ROMSX::sum_per
static amrex::Real sum_per
Definition: ROMSX.H:936
+
ROMSX::sum_per
static amrex::Real sum_per
Definition: ROMSX.H:935
ROMSX::vec_visc2_p
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_visc2_p
Definition: ROMSX.H:250
ROMSX::PlotFileName
std::string PlotFileName(int lev) const
ROMSX::advance_3d
void advance_3d(int lev, amrex::MultiFab &mf_u, amrex::MultiFab &mf_v, amrex::MultiFab &mf_temp, amrex::MultiFab &mf_salt, std::unique_ptr< amrex::MultiFab > &mf_tempstore, std::unique_ptr< amrex::MultiFab > &mf_saltstore, std::unique_ptr< amrex::MultiFab > &mf_ru, std::unique_ptr< amrex::MultiFab > &mf_rv, std::unique_ptr< amrex::MultiFab > &mf_DU_avg1, std::unique_ptr< amrex::MultiFab > &mf_DU_avg2, std::unique_ptr< amrex::MultiFab > &mf_DV_avg1, std::unique_ptr< amrex::MultiFab > &mf_DV_avg2, std::unique_ptr< amrex::MultiFab > &mf_ubar, std::unique_ptr< amrex::MultiFab > &mf_vbar, amrex::MultiFab &mf_AK, amrex::MultiFab &mf_DC, amrex::MultiFab &mf_Hzk, std::unique_ptr< amrex::MultiFab > &mf_Akv, std::unique_ptr< amrex::MultiFab > &mf_Akt, std::unique_ptr< amrex::MultiFab > &mf_Hz, std::unique_ptr< amrex::MultiFab > &mf_Huon, std::unique_ptr< amrex::MultiFab > &mf_Hvom, std::unique_ptr< amrex::MultiFab > &mf_z_w, std::unique_ptr< amrex::MultiFab > &mf_h, const int ncomp, const int N, const amrex::Real dt_lev)
Definition: ROMSX_advance_3d.cpp:10
ROMSX::prsgrd
void prsgrd(const amrex::Box &bx, const amrex::Box &gbx, const amrex::Box &utbx, const amrex::Box &vtbx, amrex::Array4< amrex::Real > ru, amrex::Array4< amrex::Real > rv, amrex::Array4< amrex::Real > on_u, amrex::Array4< amrex::Real > om_v, amrex::Array4< amrex::Real > rho, amrex::Array4< amrex::Real > FC, amrex::Array4< amrex::Real > Hz, amrex::Array4< amrex::Real > z_r, amrex::Array4< amrex::Real > z_w, const int nrhs, const int N)
Definition: ROMSX_prsgrd.cpp:6
ROMSX::set_drag
void set_drag(int lev)
-
ROMSX::init_shrink
static amrex::Real init_shrink
Definition: ROMSX.H:881
-
ROMSX::advflux_reg
amrex::Vector< amrex::YAFluxRegister * > advflux_reg
Definition: ROMSX.H:844
+
ROMSX::init_shrink
static amrex::Real init_shrink
Definition: ROMSX.H:880
+
ROMSX::advflux_reg
amrex::Vector< amrex::YAFluxRegister * > advflux_reg
Definition: ROMSX.H:843
ROMSX::vec_diff2_temp
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_diff2_temp
Definition: ROMSX.H:256
-
ROMSX::sum_interval
static int sum_interval
Definition: ROMSX.H:935
-
ROMSX::cons_names
const amrex::Vector< std::string > cons_names
Definition: ROMSX.H:912
+
ROMSX::sum_interval
static int sum_interval
Definition: ROMSX.H:934
+
ROMSX::cons_names
const amrex::Vector< std::string > cons_names
Definition: ROMSX.H:911
ROMSX::pp_prefix
std::string pp_prefix
Definition: ROMSX.H:218
-
ROMSX::change_max
static amrex::Real change_max
Definition: ROMSX.H:882
-
ROMSX::previousCPUTimeUsed
static amrex::Real previousCPUTimeUsed
Definition: ROMSX.H:1039
+
ROMSX::change_max
static amrex::Real change_max
Definition: ROMSX.H:881
+
ROMSX::previousCPUTimeUsed
static amrex::Real previousCPUTimeUsed
Definition: ROMSX.H:1038
InterpType
Definition: ROMSX.H:50
InterpType::CellConservativeQuartic
@ CellConservativeQuartic
Definition: ROMSX.H:58
InterpType::CellBilinear
@ CellBilinear
Definition: ROMSX.H:55
diff --git a/classROMSX-members.html b/classROMSX-members.html index 7c07cd95..3088f931 100644 --- a/classROMSX-members.html +++ b/classROMSX-members.html @@ -218,7 +218,7 @@ rho_eos(const amrex::Box &bx, amrex::Array4< amrex::Real > temp, amrex::Array4< amrex::Real > salt, amrex::Array4< amrex::Real > rho, amrex::Array4< amrex::Real > rhoA, amrex::Array4< amrex::Real > rhoS, amrex::Array4< amrex::Real > Hz, amrex::Array4< amrex::Real > z_w, amrex::Array4< amrex::Real > h, const int nrhs, const int N)ROMSX rhs_2d(const amrex::Box &bx, amrex::Array4< amrex::Real > uold, amrex::Array4< amrex::Real > vold, amrex::Array4< amrex::Real > ru, amrex::Array4< amrex::Real > rv, amrex::Array4< amrex::Real > Huon, amrex::Array4< amrex::Real > Hvom, int nrhs)ROMSX rhs_t_3d(const amrex::Box &bx, const amrex::Box &gbx, amrex::Array4< amrex::Real > t, amrex::Array4< amrex::Real > tempstore, amrex::Array4< amrex::Real > Huon, amrex::Array4< amrex::Real > Hvom, amrex::Array4< amrex::Real > Hz, amrex::Array4< amrex::Real > oHz, amrex::Array4< amrex::Real > pn, amrex::Array4< amrex::Real > pm, amrex::Array4< amrex::Real > W, amrex::Array4< amrex::Real > FC, int nrhs, int nnew, int N, const amrex::Real dt_lev)ROMSX - rhs_uv_3d(const amrex::Box &bx, const amrex::Box &xbx, const amrex::Box &ybx, const amrex::Box &gbx, amrex::Array4< amrex::Real > uold, amrex::Array4< amrex::Real > vold, amrex::Array4< amrex::Real > ru, amrex::Array4< amrex::Real > rv, amrex::Array4< amrex::Real > rufrc, amrex::Array4< amrex::Real > rvfrc, amrex::Array4< amrex::Real > sustr, amrex::Array4< amrex::Real > svstr, amrex::Array4< amrex::Real > bustr, amrex::Array4< amrex::Real > bvstr, amrex::Array4< amrex::Real > Huon, amrex::Array4< amrex::Real > Hvom, amrex::Array4< amrex::Real > on_u, amrex::Array4< amrex::Real > om_v, amrex::Array4< amrex::Real > om_u, amrex::Array4< amrex::Real > on_v, amrex::Array4< amrex::Real > W, amrex::Array4< amrex::Real > FC, int nrhs, int N)ROMSX + rhs_uv_3d(const amrex::Box &bx, const amrex::Box &xbx, const amrex::Box &ybx, amrex::Array4< amrex::Real > uold, amrex::Array4< amrex::Real > vold, amrex::Array4< amrex::Real > ru, amrex::Array4< amrex::Real > rv, amrex::Array4< amrex::Real > rufrc, amrex::Array4< amrex::Real > rvfrc, amrex::Array4< amrex::Real > sustr, amrex::Array4< amrex::Real > svstr, amrex::Array4< amrex::Real > bustr, amrex::Array4< amrex::Real > bvstr, amrex::Array4< amrex::Real > Huon, amrex::Array4< amrex::Real > Hvom, amrex::Array4< amrex::Real > on_u, amrex::Array4< amrex::Real > om_v, amrex::Array4< amrex::Real > om_u, amrex::Array4< amrex::Real > on_v, amrex::Array4< amrex::Real > W, amrex::Array4< amrex::Real > FC, int nrhs, int N)ROMSX ROMSX()ROMSX romsx_advance(int level, amrex::MultiFab &cons_old, amrex::MultiFab &cons_new, amrex::MultiFab &xvel_old, amrex::MultiFab &yvel_old, amrex::MultiFab &zvel_old, amrex::MultiFab &xvel_new, amrex::MultiFab &yvel_new, amrex::MultiFab &zvel_new, amrex::MultiFab &source, const amrex::Geometry fine_geom, const amrex::Real dt, const amrex::Real time)ROMSX set_2darrays(int lev)ROMSX diff --git a/classROMSX.html b/classROMSX.html index 00130daf..2278ee2c 100644 --- a/classROMSX.html +++ b/classROMSX.html @@ -207,8 +207,8 @@   void rhs_t_3d (const amrex::Box &bx, const amrex::Box &gbx, amrex::Array4< amrex::Real > t, amrex::Array4< amrex::Real > tempstore, amrex::Array4< amrex::Real > Huon, amrex::Array4< amrex::Real > Hvom, amrex::Array4< amrex::Real > Hz, amrex::Array4< amrex::Real > oHz, amrex::Array4< amrex::Real > pn, amrex::Array4< amrex::Real > pm, amrex::Array4< amrex::Real > W, amrex::Array4< amrex::Real > FC, int nrhs, int nnew, int N, const amrex::Real dt_lev)   -void rhs_uv_3d (const amrex::Box &bx, const amrex::Box &xbx, const amrex::Box &ybx, const amrex::Box &gbx, amrex::Array4< amrex::Real > uold, amrex::Array4< amrex::Real > vold, amrex::Array4< amrex::Real > ru, amrex::Array4< amrex::Real > rv, amrex::Array4< amrex::Real > rufrc, amrex::Array4< amrex::Real > rvfrc, amrex::Array4< amrex::Real > sustr, amrex::Array4< amrex::Real > svstr, amrex::Array4< amrex::Real > bustr, amrex::Array4< amrex::Real > bvstr, amrex::Array4< amrex::Real > Huon, amrex::Array4< amrex::Real > Hvom, amrex::Array4< amrex::Real > on_u, amrex::Array4< amrex::Real > om_v, amrex::Array4< amrex::Real > om_u, amrex::Array4< amrex::Real > on_v, amrex::Array4< amrex::Real > W, amrex::Array4< amrex::Real > FC, int nrhs, int N) -  +void rhs_uv_3d (const amrex::Box &bx, const amrex::Box &xbx, const amrex::Box &ybx, amrex::Array4< amrex::Real > uold, amrex::Array4< amrex::Real > vold, amrex::Array4< amrex::Real > ru, amrex::Array4< amrex::Real > rv, amrex::Array4< amrex::Real > rufrc, amrex::Array4< amrex::Real > rvfrc, amrex::Array4< amrex::Real > sustr, amrex::Array4< amrex::Real > svstr, amrex::Array4< amrex::Real > bustr, amrex::Array4< amrex::Real > bvstr, amrex::Array4< amrex::Real > Huon, amrex::Array4< amrex::Real > Hvom, amrex::Array4< amrex::Real > on_u, amrex::Array4< amrex::Real > om_v, amrex::Array4< amrex::Real > om_u, amrex::Array4< amrex::Real > on_v, amrex::Array4< amrex::Real > W, amrex::Array4< amrex::Real > FC, int nrhs, int N) +  void rhs_2d (const amrex::Box &bx, amrex::Array4< amrex::Real > uold, amrex::Array4< amrex::Real > vold, amrex::Array4< amrex::Real > ru, amrex::Array4< amrex::Real > rv, amrex::Array4< amrex::Real > Huon, amrex::Array4< amrex::Real > Hvom, int nrhs)   void rho_eos (const amrex::Box &bx, amrex::Array4< amrex::Real > temp, amrex::Array4< amrex::Real > salt, amrex::Array4< amrex::Real > rho, amrex::Array4< amrex::Real > rhoA, amrex::Array4< amrex::Real > rhoS, amrex::Array4< amrex::Real > Hz, amrex::Array4< amrex::Real > z_w, amrex::Array4< amrex::Real > h, const int nrhs, const int N) @@ -691,20 +691,20 @@

124  }
125  }
126 }
-
int do_substep
Definition: ROMSX.H:891
-
amrex::Vector< int > istep
Definition: ROMSX.H:825
+
int do_substep
Definition: ROMSX.H:890
+
amrex::Vector< int > istep
Definition: ROMSX.H:824
amrex::Vector< amrex::Vector< amrex::MultiFab > > vars_new
Definition: ROMSX.H:221
void setPlotVariables(const std::string &pp_plot_var_names, amrex::Vector< std::string > &plot_var_names)
Definition: Plotfile.cpp:9
-
amrex::Vector< std::string > plot_var_names_1
Definition: ROMSX.H:909
+
amrex::Vector< std::string > plot_var_names_1
Definition: ROMSX.H:908
amrex::Vector< amrex::Vector< amrex::MultiFab > > vars_old
Definition: ROMSX.H:223
void refinement_criteria_setup()
Definition: ROMSX_Tagging.cpp:56
-
amrex::Vector< std::string > plot_var_names_2
Definition: ROMSX.H:910
-
amrex::Vector< amrex::Real > dt
Definition: ROMSX.H:831
-
amrex::Vector< amrex::Real > t_new
Definition: ROMSX.H:829
-
amrex::Vector< int > nsubsteps
Definition: ROMSX.H:826
-
amrex::Vector< amrex::Real > t_old
Definition: ROMSX.H:830
+
amrex::Vector< std::string > plot_var_names_2
Definition: ROMSX.H:909
+
amrex::Vector< amrex::Real > dt
Definition: ROMSX.H:830
+
amrex::Vector< amrex::Real > t_new
Definition: ROMSX.H:828
+
amrex::Vector< int > nsubsteps
Definition: ROMSX.H:825
+
amrex::Vector< amrex::Real > t_old
Definition: ROMSX.H:829
void ReadParameters()
Definition: ROMSX.cpp:429
-
amrex::Vector< amrex::YAFluxRegister * > advflux_reg
Definition: ROMSX.H:844
+
amrex::Vector< amrex::YAFluxRegister * > advflux_reg
Definition: ROMSX.H:843
@ NumTypes
Definition: IndexDefines.H:75
void amrex_probinit(const amrex_real *problo, const amrex_real *probhi)
@@ -811,12 +811,12 @@

25  advance_3d_ml(lev, dt_lev);

26 }
-
static SolverChoice solverChoice
Definition: ROMSX.H:922
-
static int fixed_ndtfast_ratio
Definition: ROMSX.H:887
+
static SolverChoice solverChoice
Definition: ROMSX.H:921
+
static int fixed_ndtfast_ratio
Definition: ROMSX.H:886
void advance_3d_ml(int lev, amrex::Real dt_lev)
Definition: ROMSX_advance_3d_ml.cpp:6
void setup_step(int lev, amrex::Real dt_lev)
Definition: ROMSX_setup_step.cpp:7
void advance_2d_onestep(int lev, amrex::Real dt_lev, amrex::Real dtfast_lev, int my_iif, int nfast_counter)
Definition: ROMSX_advance_2d_onestep.cpp:6
-
int nfast
Definition: ROMSX.H:888
+
int nfast
Definition: ROMSX.H:887
bool use_barotropic
Definition: DataStruct.H:159
@@ -2073,7 +2073,7 @@

amrex::Vector< amrex::Real > vec_weight1
Definition: ROMSX.H:314
void rhs_2d(const amrex::Box &bx, amrex::Array4< amrex::Real > uold, amrex::Array4< amrex::Real > vold, amrex::Array4< amrex::Real > ru, amrex::Array4< amrex::Real > rv, amrex::Array4< amrex::Real > Huon, amrex::Array4< amrex::Real > Hvom, int nrhs)
Definition: ROMSX_rhs_uv_2d.cpp:19
void uv3dmix(const amrex::Box &bx, const amrex::Box &gbx, amrex::Array4< amrex::Real > u, amrex::Array4< amrex::Real > v, amrex::Array4< amrex::Real > uold, amrex::Array4< amrex::Real > vold, amrex::Array4< amrex::Real > rufrc, amrex::Array4< amrex::Real > rvfrc, amrex::Array4< amrex::Real > visc2_p, amrex::Array4< amrex::Real > visc2_r, amrex::Array4< amrex::Real > Hz, amrex::Array4< amrex::Real > om_r, amrex::Array4< amrex::Real > on_r, amrex::Array4< amrex::Real > om_p, amrex::Array4< amrex::Real > on_p, amrex::Array4< amrex::Real > pm, amrex::Array4< amrex::Real > pn, int nrhs, int nnew, const amrex::Real dt_lev)
Definition: ROMSX_uv3dmix.cpp:6
-
static int verbose
Definition: ROMSX.H:929
+
static int verbose
Definition: ROMSX.H:928
bool use_coriolis
Definition: DataStruct.H:153
@@ -2983,7 +2983,7 @@

146 
147  return fine_mask;
148 }
-
amrex::MultiFab fine_mask
Definition: ROMSX.H:988
+
amrex::MultiFab fine_mask
Definition: ROMSX.H:987
@@ -3072,9 +3072,9 @@

35  dt[lev] = dt[lev-1] / nsubsteps[lev];
36  }
37 }
-
amrex::Real stop_time
Definition: ROMSX.H:874
+
amrex::Real stop_time
Definition: ROMSX.H:873
amrex::Real estTimeStep(int lev) const
Definition: ROMSX_ComputeTimestep.cpp:40
-
static amrex::Real change_max
Definition: ROMSX.H:882
+
static amrex::Real change_max
Definition: ROMSX.H:881
@@ -3101,31 +3101,31 @@

-
992  {
-
993  int nGhostCells;
-
994 
-
995  switch (spatial_order) {
-
996  case 2:
-
997  nGhostCells = 2; // We need this many to compute the eddy viscosity in the ghost cells
-
998  break;
-
999  case 3:
-
1000  nGhostCells = 2;
-
1001  break;
-
1002  case 4:
-
1003  nGhostCells = 2;
-
1004  break;
-
1005  case 5:
-
1006  nGhostCells = 3;
-
1007  break;
-
1008  case 6:
-
1009  nGhostCells = 3;
-
1010  break;
-
1011  default:
-
1012  amrex::Error("Must specify spatial order to be 2,3,4,5 or 6");
-
1013  }
-
1014 
-
1015  return nGhostCells;
-
1016  }
+
991  {
+
992  int nGhostCells;
+
993 
+
994  switch (spatial_order) {
+
995  case 2:
+
996  nGhostCells = 2; // We need this many to compute the eddy viscosity in the ghost cells
+
997  break;
+
998  case 3:
+
999  nGhostCells = 2;
+
1000  break;
+
1001  case 4:
+
1002  nGhostCells = 2;
+
1003  break;
+
1004  case 5:
+
1005  nGhostCells = 3;
+
1006  break;
+
1007  case 6:
+
1008  nGhostCells = 3;
+
1009  break;
+
1010  default:
+
1011  amrex::Error("Must specify spatial order to be 2,3,4,5 or 6");
+
1012  }
+
1013 
+
1014  return nGhostCells;
+
1015  }
@@ -3269,10 +3269,10 @@

-
1027  {
-
1028  return *datalog[i];
-
1029  }
-
amrex::Vector< std::unique_ptr< std::fstream > > datalog
Definition: ROMSX.H:1069
+
1026  {
+
1027  return *datalog[i];
+
1028  }
+
amrex::Vector< std::unique_ptr< std::fstream > > datalog
Definition: ROMSX.H:1068
@@ -3301,8 +3301,8 @@

The filename of the ith datalog file.

-
1073 { return datalogname[i]; }
-
amrex::Vector< std::string > datalogname
Definition: ROMSX.H:1070
+
1072 { return datalogname[i]; }
+
amrex::Vector< std::string > datalogname
Definition: ROMSX.H:1069
@@ -3396,7 +3396,7 @@

48  }
49 }
#define Rho_comp
Definition: IndexDefines.H:8
-
static amrex::Vector< amrex::AMRErrorTag > ref_tags
Definition: ROMSX.H:982
+
static amrex::Vector< amrex::AMRErrorTag > ref_tags
Definition: ROMSX.H:981
void romsx_derscalar(const amrex::Box &bx, amrex::FArrayBox &dromsxab, int, int, const amrex::FArrayBox &datfab, const amrex::Geometry &, amrex::Real, const int *, const int)
Definition: Derive.cpp:40
Here is the call graph for this function:
@@ -3485,8 +3485,8 @@

96  return estdt_lowM;
97  }
98 }
-
static amrex::Real cfl
Definition: ROMSX.H:880
-
static amrex::Real fixed_dt
Definition: ROMSX.H:885
+
static amrex::Real cfl
Definition: ROMSX.H:879
+
static amrex::Real fixed_dt
Definition: ROMSX.H:884
@ zvel
Definition: IndexDefines.H:74
@@ -3586,18 +3586,18 @@

212 
213 }
void WritePlotFile(int which, amrex::Vector< std::string > plot_var_names)
Definition: Plotfile.cpp:90
-
int check_int
Definition: ROMSX.H:907
-
int last_plot_file_step_2
Definition: ROMSX.H:862
-
int last_check_file_step
Definition: ROMSX.H:866
-
int last_plot_file_step_1
Definition: ROMSX.H:861
+
int check_int
Definition: ROMSX.H:906
+
int last_plot_file_step_2
Definition: ROMSX.H:861
+
int last_check_file_step
Definition: ROMSX.H:865
+
int last_plot_file_step_1
Definition: ROMSX.H:860
void timeStep(int lev, amrex::Real time, int iteration)
Definition: ROMSX_TimeStep.cpp:9
void ComputeDt()
Definition: ROMSX_ComputeTimestep.cpp:8
-
std::string check_type
Definition: ROMSX.H:905
-
int plot_int_2
Definition: ROMSX.H:901
+
std::string check_type
Definition: ROMSX.H:904
+
int plot_int_2
Definition: ROMSX.H:900
void post_timestep(int nstep, amrex::Real time, amrex::Real dt_lev)
Definition: ROMSX.cpp:217
-
int plot_int_1
Definition: ROMSX.H:900
+
int plot_int_1
Definition: ROMSX.H:899
void WriteCheckpointFile() const
Definition: Checkpoint.cpp:15
-
int max_step
Definition: ROMSX.H:873
+
int max_step
Definition: ROMSX.H:872
void timeStepML(amrex::Real time, int iteration)
Definition: ROMSX_TimeStepML.cpp:9

Referenced by main().

@@ -3779,12 +3779,12 @@

302 }
#define NVAR
Definition: IndexDefines.H:17
Definition: ROMSX_PhysBCFunct.H:34
-
amrex::Vector< amrex::BCRec > domain_bcs_type
Definition: ROMSX.H:849
-
amrex::Gpu::DeviceVector< amrex::BCRec > domain_bcs_type_d
Definition: ROMSX.H:850
+
amrex::Vector< amrex::BCRec > domain_bcs_type
Definition: ROMSX.H:848
+
amrex::Gpu::DeviceVector< amrex::BCRec > domain_bcs_type_d
Definition: ROMSX.H:849
TimeInterpolatedData GetDataAtTime(int lev, amrex::Real time)
Definition: ROMSX_FillPatch.cpp:94
-
amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NVAR > m_bc_extdir_vals
Definition: ROMSX.H:856
+
amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NVAR > m_bc_extdir_vals
Definition: ROMSX.H:855
void FillCoarsePatch(int lev, amrex::Real time, amrex::MultiFab &mf, int icomp, int ncomp, int var_idx)
Definition: ROMSX_FillPatch.cpp:243
-
static std::string init_type
Definition: ROMSX.H:942
+
static std::string init_type
Definition: ROMSX.H:941
@ xmom
Definition: IndexDefines.H:76
@ ymom
Definition: IndexDefines.H:77
@ zmom
Definition: IndexDefines.H:78
@@ -4071,9 +4071,9 @@

-
1020  {
-
1021  return advflux_reg[lev];
-
1022  }
+
1019  {
+
1020  return advflux_reg[lev];
+
1021  }
@@ -4099,20 +4099,20 @@

-
1043  {
-
1044  int numCores = amrex::ParallelDescriptor::NProcs();
-
1045 #ifdef _OPENMP
-
1046  numCores = numCores * omp_get_max_threads();
-
1047 #endif
-
1048 
-
1049  amrex::Real T =
-
1050  numCores * (amrex::ParallelDescriptor::second() - startCPUTime) +
- -
1052 
-
1053  return T;
-
1054  }
-
static amrex::Real startCPUTime
Definition: ROMSX.H:1038
-
static amrex::Real previousCPUTimeUsed
Definition: ROMSX.H:1039
+
1042  {
+
1043  int numCores = amrex::ParallelDescriptor::NProcs();
+
1044 #ifdef _OPENMP
+
1045  numCores = numCores * omp_get_max_threads();
+
1046 #endif
+
1047 
+
1048  amrex::Real T =
+
1049  numCores * (amrex::ParallelDescriptor::second() - startCPUTime) +
+ +
1051 
+
1052  return T;
+
1053  }
+
static amrex::Real startCPUTime
Definition: ROMSX.H:1037
+
static amrex::Real previousCPUTimeUsed
Definition: ROMSX.H:1038
@ T
Definition: IndexDefines.H:45

Referenced by writeJobInfo().

@@ -4626,8 +4626,8 @@

@ no_slip_wall

-
amrex::Array< std::string, 2 *AMREX_SPACEDIM > domain_bc_type
Definition: ROMSX.H:853
-
amrex::GpuArray< ROMSX_BC, AMREX_SPACEDIM *2 > phys_bc_type
Definition: ROMSX.H:859
+
amrex::Array< std::string, 2 *AMREX_SPACEDIM > domain_bc_type
Definition: ROMSX.H:852
+
amrex::GpuArray< ROMSX_BC, AMREX_SPACEDIM *2 > phys_bc_type
Definition: ROMSX.H:858
@ RhoScalar_bc_comp
Definition: IndexDefines.H:32
@ zvel_bc
Definition: IndexDefines.H:35
@ Temp_bc_comp
Definition: IndexDefines.H:31
@@ -4929,16 +4929,16 @@

void set_vmix(int lev)
Definition: ROMSX.cpp:372
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_bvstr
Definition: ROMSX.H:281
void set_hmixcoef(int lev)
Definition: ROMSX.cpp:380
-
amrex::Vector< std::unique_ptr< amrex::MultiFab > > mapfac_m
Definition: ROMSX.H:837
+
amrex::Vector< std::unique_ptr< amrex::MultiFab > > mapfac_m
Definition: ROMSX.H:836
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_bustr
Definition: ROMSX.H:279
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_visc3d_r
Definition: ROMSX.H:309
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_s_r
Definition: ROMSX.H:267
-
amrex::Vector< std::unique_ptr< amrex::MultiFab > > mapfac_u
Definition: ROMSX.H:838
+
amrex::Vector< std::unique_ptr< amrex::MultiFab > > mapfac_u
Definition: ROMSX.H:837
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_y_r
Definition: ROMSX.H:261
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_diff2_salt
Definition: ROMSX.H:254
void set_bathymetry(int lev)
Definition: ROMSX.cpp:363
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_rdrag
Definition: ROMSX.H:277
-
amrex::Vector< std::unique_ptr< amrex::MultiFab > > mapfac_v
Definition: ROMSX.H:839
+
amrex::Vector< std::unique_ptr< amrex::MultiFab > > mapfac_v
Definition: ROMSX.H:838
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_diff2_temp
Definition: ROMSX.H:256
amrex::Real rdrag
Definition: DataStruct.H:171
@@ -5061,13 +5061,13 @@

bool is_it_time_for_action(int nstep, amrex::Real time, amrex::Real dt, int action_interval, amrex::Real action_per)
Definition: ROMSX_SumIQ.cpp:151
void sum_integrated_quantities(amrex::Real time)
Definition: ROMSX_SumIQ.cpp:9
void AverageDown()
Definition: ROMSX.cpp:565
-
int plot_file_on_restart
Definition: ROMSX.H:867
+
int plot_file_on_restart
Definition: ROMSX.H:866
void restart()
Definition: ROMSX.cpp:347
void init_only(int lev, amrex::Real time)
Definition: ROMSX.cpp:399
void init_bcs()
Definition: ROMSX_init_bcs.cpp:9
-
std::string restart_chkfile
Definition: ROMSX.H:877
-
static amrex::Real sum_per
Definition: ROMSX.H:936
-
static int sum_interval
Definition: ROMSX.H:935
+
std::string restart_chkfile
Definition: ROMSX.H:876
+
static amrex::Real sum_per
Definition: ROMSX.H:935
+
static int sum_interval
Definition: ROMSX.H:934
CouplingType coupling_type
Definition: DataStruct.H:163

Referenced by main().

@@ -5415,7 +5415,7 @@

126  resize_stuff(lev);
127  init_stuff(lev, ba, dm);
128 }
-
AMREX_FORCE_INLINE int ComputeGhostCells(const int &spatial_order)
Definition: ROMSX.H:992
+
AMREX_FORCE_INLINE int ComputeGhostCells(const int &spatial_order)
Definition: ROMSX.H:991
@ NumVars
Definition: IndexDefines.H:91
int spatial_order
Definition: DataStruct.H:179
@@ -5443,9 +5443,9 @@

-
1034  {
-
1035  return datalog.size();
-
1036  }
+
1033  {
+
1034  return datalog.size();
+
1035  }
@@ -5568,7 +5568,7 @@

240  sum_integrated_quantities(time);
241  }
242 }
-
AMREX_FORCE_INLINE amrex::YAFluxRegister * getAdvFluxReg(int lev)
Definition: ROMSX.H:1019
+
AMREX_FORCE_INLINE amrex::YAFluxRegister * getAdvFluxReg(int lev)
Definition: ROMSX.H:1018
@@ -7492,20 +7492,20 @@

559 
561 }
-
std::string plot_file_1
Definition: ROMSX.H:898
-
static std::string nc_bdy_file
Definition: ROMSX.H:948
-
amrex::Vector< int > num_boxes_at_level
Definition: ROMSX.H:821
-
std::string check_file
Definition: ROMSX.H:904
-
static amrex::Vector< amrex::Vector< std::string > > nc_init_file
Definition: ROMSX.H:945
-
static std::string plotfile_type
Definition: ROMSX.H:939
-
static amrex::Real fixed_fast_dt
Definition: ROMSX.H:886
-
std::string plot_file_2
Definition: ROMSX.H:899
-
int regrid_int
Definition: ROMSX.H:895
-
amrex::Vector< amrex::Vector< amrex::Box > > boxes_at_level
Definition: ROMSX.H:823
-
void setRecordDataInfo(int i, const std::string &filename)
Definition: ROMSX.H:1056
-
amrex::Vector< int > num_files_at_level
Definition: ROMSX.H:822
-
std::string restart_type
Definition: ROMSX.H:906
-
static amrex::Real init_shrink
Definition: ROMSX.H:881
+
std::string plot_file_1
Definition: ROMSX.H:897
+
static std::string nc_bdy_file
Definition: ROMSX.H:947
+
amrex::Vector< int > num_boxes_at_level
Definition: ROMSX.H:820
+
std::string check_file
Definition: ROMSX.H:903
+
static amrex::Vector< amrex::Vector< std::string > > nc_init_file
Definition: ROMSX.H:944
+
static std::string plotfile_type
Definition: ROMSX.H:938
+
static amrex::Real fixed_fast_dt
Definition: ROMSX.H:885
+
std::string plot_file_2
Definition: ROMSX.H:898
+
int regrid_int
Definition: ROMSX.H:894
+
amrex::Vector< amrex::Vector< amrex::Box > > boxes_at_level
Definition: ROMSX.H:822
+
void setRecordDataInfo(int i, const std::string &filename)
Definition: ROMSX.H:1055
+
amrex::Vector< int > num_files_at_level
Definition: ROMSX.H:821
+
std::string restart_type
Definition: ROMSX.H:905
+
static amrex::Real init_shrink
Definition: ROMSX.H:880
std::string pp_prefix
Definition: ROMSX.H:218
void init_params()
Definition: DataStruct.H:59
@@ -8642,8 +8642,8 @@

-

◆ rhs_uv_3d()

+ +

◆ rhs_uv_3d()

50  tbxp2.grow(IntVect(NGROW,NGROW,0));
51 
-
52  BoxArray ba_gbx1 = intersect(BoxArray(tbxp1), gbx);
-
53  AMREX_ASSERT((ba_gbx1.size() == 1));
-
54  Box gbx1 = ba_gbx1[0];
-
55 
-
56  Box bxD = bx;
-
57  bxD.makeSlab(2,0);
-
58  Box gbx1D = gbx1;
-
59  gbx1D.makeSlab(2,0);
-
60 
-
61  //
-
62  // Scratch space
-
63  //
-
64  FArrayBox fab_UFx(growLo(xbx,0,1),1,amrex::The_Async_Arena()); fab_UFx.template setVal<RunOn::Device>(0.);
-
65  FArrayBox fab_UFe(growHi(xbx,1,1),1,amrex::The_Async_Arena()); fab_UFe.template setVal<RunOn::Device>(0.);
-
66  FArrayBox fab_VFe(growLo(ybx,1,1),1,amrex::The_Async_Arena()); fab_VFe.template setVal<RunOn::Device>(0.);
-
67  FArrayBox fab_VFx(growHi(ybx,0,1),1,amrex::The_Async_Arena()); fab_VFx.template setVal<RunOn::Device>(0.);
-
68 
-
69  auto UFx=fab_UFx.array();
-
70  auto UFe=fab_UFe.array();
-
71  auto VFx=fab_VFx.array();
-
72  auto VFe=fab_VFe.array();
-
73 
-
74  //check this////////////
-
75  const Real Gadv = -0.25;
-
76 
-
77  // *************************************************************
-
78  // UPDATING U
-
79  // *************************************************************
-
80 
-
81  // Think of the cell-centered box as [ 0:nx-1, 0:ny-1] (0,0,0) cc
+
52  //
+
53  // Scratch space
+
54  //
+
55  FArrayBox fab_UFx(growLo(xbx,0,1),1,amrex::The_Async_Arena()); fab_UFx.template setVal<RunOn::Device>(0.);
+
56  FArrayBox fab_UFe(growHi(xbx,1,1),1,amrex::The_Async_Arena()); fab_UFe.template setVal<RunOn::Device>(0.);
+
57  FArrayBox fab_VFe(growLo(ybx,1,1),1,amrex::The_Async_Arena()); fab_VFe.template setVal<RunOn::Device>(0.);
+
58  FArrayBox fab_VFx(growHi(ybx,0,1),1,amrex::The_Async_Arena()); fab_VFx.template setVal<RunOn::Device>(0.);
+
59 
+
60  auto UFx=fab_UFx.array();
+
61  auto UFe=fab_UFe.array();
+
62  auto VFx=fab_VFx.array();
+
63  auto VFe=fab_VFe.array();
+
64 
+
65  //check this////////////
+
66  const Real Gadv = -0.25;
+
67 
+
68  // *************************************************************
+
69  // UPDATING U
+
70  // *************************************************************
+
71 
+
72  // Think of the cell-centered box as [ 0:nx-1, 0:ny-1] (0,0,0) cc
+
73  //
+
74  // xbx is the x-face-centered box on which we update u (with ru) [ 0:nx , 0:ny-1] (1,0,0) x-faces
+
75  // to do so requires UFx on [-1:nx , 0:ny-1] (0,0,0) cc
+
76  // which requires uold on [-2:nx+2, 0:ny-1] (1,0,0) x-faces
+
77  // and requires Huon on [-2:nx+2, 0:ny-1] (0,0,0) x-faces
+
78  // to do so requires UFe on [ 0:nx , 0:ny ] (1,1,0) xy-nodes
+
79  // which requires uold on [ 0:nx ,-2:ny+1] (1,0,0) x-faces
+
80  // and requires Hvom on [-2:nx+1, 0:ny-1] (0,1,0) y-faces
+
81 
82  //
-
83  // xbx is the x-face-centered box on which we update u (with ru) [ 0:nx , 0:ny-1] (1,0,0) x-faces
-
84  // to do so requires UFx on [-1:nx , 0:ny-1] (0,0,0) cc
-
85  // which requires uold on [-2:nx+2, 0:ny-1] (1,0,0) x-faces
-
86  // and requires Huon on [-2:nx+2, 0:ny-1] (0,0,0) x-faces
-
87  // to do so requires UFe on [ 0:nx , 0:ny ] (1,1,0) xy-nodes
-
88  // which requires uold on [ 0:nx ,-2:ny+1] (1,0,0) x-faces
-
89  // and requires Hvom on [-2:nx+1, 0:ny-1] (0,1,0) y-faces
-
90 
-
91  //
-
92  // Define UFx, the x-fluxes at cell centers for updating u
-
93  // (Note that grow arguments are (bx, dir, ng)
-
94  //
-
95  ParallelFor(growLo(xbx,0,1), [=] AMREX_GPU_DEVICE (int i, int j, int k)
-
96  {
-
97  Real cff1 = uold(i,j,k,nrhs)+uold(i+1,j,k,nrhs);
-
98 
-
99  // Upwinding
-
100  Real cff = (cff1 > 0.0) ? uold(i-1,j,k,nrhs)-2.0*uold(i ,j,k,nrhs)+uold(i+1,j,k,nrhs) :
-
101  uold(i ,j,k,nrhs)-2.0*uold(i+1,j,k,nrhs)+uold(i+2,j,k,nrhs);
+
83  // Define UFx, the x-fluxes at cell centers for updating u
+
84  // (Note that grow arguments are (bx, dir, ng)
+
85  //
+
86  ParallelFor(growLo(xbx,0,1), [=] AMREX_GPU_DEVICE (int i, int j, int k)
+
87  {
+
88  Real cff1 = uold(i,j,k,nrhs)+uold(i+1,j,k,nrhs);
+
89 
+
90  // Upwinding
+
91  Real cff = (cff1 > 0.0) ? uold(i-1,j,k,nrhs)-2.0*uold(i ,j,k,nrhs)+uold(i+1,j,k,nrhs) :
+
92  uold(i ,j,k,nrhs)-2.0*uold(i+1,j,k,nrhs)+uold(i+2,j,k,nrhs);
+
93 
+
94  Real Huxx_i = Huon(i-1,j,k)-2.0*Huon(i ,j,k)+Huon(i+1,j,k);
+
95  Real Huxx_ip1 = Huon(i ,j,k)-2.0*Huon(i+1,j,k)+Huon(i+2,j,k);
+
96  Real Huxx_avg = 0.5 * (Huxx_i + Huxx_ip1);
+
97 
+
98  Real Huon_avg = (Huon(i,j,k) + Huon(i+1,j,k));
+
99 
+
100  UFx(i,j,k) = 0.25*(cff1+Gadv*cff) * ( Huon_avg + Gadv*Huxx_avg );
+
101  });
102 
-
103  Real Huxx_i = Huon(i-1,j,k)-2.0*Huon(i ,j,k)+Huon(i+1,j,k);
-
104  Real Huxx_ip1 = Huon(i ,j,k)-2.0*Huon(i+1,j,k)+Huon(i+2,j,k);
-
105  Real Huxx_avg = 0.5 * (Huxx_i + Huxx_ip1);
-
106 
-
107  Real Huon_avg = (Huon(i,j,k) + Huon(i+1,j,k));
-
108 
-
109  UFx(i,j,k) = 0.25*(cff1+Gadv*cff) * ( Huon_avg + Gadv*Huxx_avg );
-
110  });
-
111 
-
112  //
-
113  // Define UFe, the y-fluxes at nodes for updating u
-
114  //
-
115  ParallelFor(growHi(xbx,1,1), [=] AMREX_GPU_DEVICE (int i, int j, int k)
-
116  {
-
117  Real cff1 = uold(i,j,k,nrhs) + uold(i ,j-1,k,nrhs);
-
118  Real cff2 = Hvom(i,j,k) + Hvom(i-1,j ,k);
-
119 
-
120  // Upwinding
-
121  Real cff = (cff2 > 0.0) ? uold(i,j-2,k,nrhs) - 2.0*uold(i,j-1,k,nrhs) + uold(i ,j,k,nrhs) :
-
122  uold(i,j-1,k,nrhs) - 2.0*uold(i,j ,k,nrhs) + uold(i,j+1,k,nrhs);
-
123 
-
124  Real Hvxx_i = Hvom(i-1,j,k)-2.0*Hvom(i ,j,k)+Hvom(i+1,j,k);
-
125  Real Hvxx_im1 = Hvom(i-2,j,k)-2.0*Hvom(i-1,j,k)+Hvom(i ,j,k);
-
126 
-
127  UFe(i,j,k) = 0.25 * (cff1+Gadv*cff)* (cff2+Gadv*0.5*(Hvxx_i + Hvxx_im1));
-
128  });
-
129 
-
130  //
-
131  // Define the RHS for u by differencing fluxes
-
132  //
-
133  ParallelFor(xbx, [=] AMREX_GPU_DEVICE (int i, int j, int k)
-
134  {
-
135  ru(i,j,k,nrhs) -= ( (UFx(i,j,k)-UFx(i-1,j,k)) + (UFe(i,j+1,k)-UFe(i ,j,k)) );
-
136  });
-
137 
-
138  ParallelFor(xbx, [=] AMREX_GPU_DEVICE (int i, int j, int k)
-
139  {
-
140  //-----------------------------------------------------------------------
-
141  // Add in vertical advection.
-
142  //-----------------------------------------------------------------------
-
143  Real cff1=9.0/16.0;
-
144  Real cff2=1.0/16.0;
-
145 
-
146  if (k>=1 && k<=N-2)
-
147  {
-
148  FC(i,j,k)=( cff1*(uold(i ,j,k ,nrhs)+ uold(i,j,k+1,nrhs))
-
149  -cff2*(uold(i ,j,k-1,nrhs)+ uold(i,j,k+2,nrhs)) )*
-
150  ( cff1*( W(i ,j,k)+ W(i-1,j,k))
-
151  -cff2*( W(i+1,j,k)+ W(i-2,j,k)) );
-
152  }
-
153  else // this needs to be split up so that the following can be concurrent
-
154  {
-
155  FC(i,j,N)=0.0;
-
156 
-
157  FC(i,j,N-1)=( cff1*(uold(i ,j,N-1,nrhs)+ uold(i,j,N ,nrhs))
-
158  -cff2*(uold(i ,j,N-2,nrhs)+ uold(i,j,N ,nrhs)) )*
-
159  ( cff1*( W(i ,j,N-1)+ W(i-1,j,N-1))
-
160  -cff2*( W(i+1,j,N-1)+ W(i-2,j,N-1)) );
+
103  //
+
104  // Define UFe, the y-fluxes at nodes for updating u
+
105  //
+
106  ParallelFor(growHi(xbx,1,1), [=] AMREX_GPU_DEVICE (int i, int j, int k)
+
107  {
+
108  Real cff1 = uold(i,j,k,nrhs) + uold(i ,j-1,k,nrhs);
+
109  Real cff2 = Hvom(i,j,k) + Hvom(i-1,j ,k);
+
110 
+
111  // Upwinding
+
112  Real cff = (cff2 > 0.0) ? uold(i,j-2,k,nrhs) - 2.0*uold(i,j-1,k,nrhs) + uold(i ,j,k,nrhs) :
+
113  uold(i,j-1,k,nrhs) - 2.0*uold(i,j ,k,nrhs) + uold(i,j+1,k,nrhs);
+
114 
+
115  Real Hvxx_i = Hvom(i-1,j,k)-2.0*Hvom(i ,j,k)+Hvom(i+1,j,k);
+
116  Real Hvxx_im1 = Hvom(i-2,j,k)-2.0*Hvom(i-1,j,k)+Hvom(i ,j,k);
+
117 
+
118  UFe(i,j,k) = 0.25 * (cff1+Gadv*cff)* (cff2+Gadv*0.5*(Hvxx_i + Hvxx_im1));
+
119  });
+
120 
+
121  //
+
122  // Define the RHS for u by differencing fluxes
+
123  //
+
124  ParallelFor(xbx, [=] AMREX_GPU_DEVICE (int i, int j, int k)
+
125  {
+
126  ru(i,j,k,nrhs) -= ( (UFx(i,j,k)-UFx(i-1,j,k)) + (UFe(i,j+1,k)-UFe(i ,j,k)) );
+
127  });
+
128 
+
129  ParallelFor(xbx, [=] AMREX_GPU_DEVICE (int i, int j, int k)
+
130  {
+
131  //-----------------------------------------------------------------------
+
132  // Add in vertical advection.
+
133  //-----------------------------------------------------------------------
+
134  Real cff1=9.0/16.0;
+
135  Real cff2=1.0/16.0;
+
136 
+
137  if (k>=1 && k<=N-2)
+
138  {
+
139  FC(i,j,k)=( cff1*(uold(i ,j,k ,nrhs)+ uold(i,j,k+1,nrhs))
+
140  -cff2*(uold(i ,j,k-1,nrhs)+ uold(i,j,k+2,nrhs)) )*
+
141  ( cff1*( W(i ,j,k)+ W(i-1,j,k))
+
142  -cff2*( W(i+1,j,k)+ W(i-2,j,k)) );
+
143  }
+
144  else // this needs to be split up so that the following can be concurrent
+
145  {
+
146  FC(i,j,N)=0.0;
+
147 
+
148  FC(i,j,N-1)=( cff1*(uold(i ,j,N-1,nrhs)+ uold(i,j,N ,nrhs))
+
149  -cff2*(uold(i ,j,N-2,nrhs)+ uold(i,j,N ,nrhs)) )*
+
150  ( cff1*( W(i ,j,N-1)+ W(i-1,j,N-1))
+
151  -cff2*( W(i+1,j,N-1)+ W(i-2,j,N-1)) );
+
152 
+
153  FC(i,j,0)=( cff1*(uold(i ,j,0,nrhs)+ uold(i,j,1,nrhs))
+
154  -cff2*(uold(i ,j,0,nrhs)+ uold(i,j,2,nrhs)) )*
+
155  ( cff1*( W(i ,j,0)+ W(i-1,j,0))
+
156  -cff2*( W(i+1,j,0)+ W(i-2,j,0)) );
+
157 
+
158  // FC(i,0,-1)=0.0;
+
159  }
+
160  });
161 
-
162  FC(i,j,0)=( cff1*(uold(i ,j,0,nrhs)+ uold(i,j,1,nrhs))
-
163  -cff2*(uold(i ,j,0,nrhs)+ uold(i,j,2,nrhs)) )*
-
164  ( cff1*( W(i ,j,0)+ W(i-1,j,0))
-
165  -cff2*( W(i+1,j,0)+ W(i-2,j,0)) );
-
166 
-
167  // FC(i,0,-1)=0.0;
-
168  }
-
169  });
+
162  ParallelFor(xbx, [=] AMREX_GPU_DEVICE (int i, int j, int k)
+
163  {
+
164  Real cff = (k >= 1) ? FC(i,j,k)-FC(i,j,k-1) : FC(i,j,k);
+
165 
+
166  ru(i,j,k,nrhs) -= cff;
+
167  });
+
168 
+
169  Gpu::synchronize();
170 
-
171  ParallelFor(xbx, [=] AMREX_GPU_DEVICE (int i, int j, int k)
-
172  {
-
173  Real cff = (k >= 1) ? FC(i,j,k)-FC(i,j,k-1) : FC(i,j,k);
-
174 
-
175  ru(i,j,k,nrhs) -= cff;
-
176  });
+
171  AMREX_ASSERT(xbx.smallEnd(2) == 0 && xbx.bigEnd(2) == N);
+
172  ParallelFor(makeSlab(xbx,2,0), [=] AMREX_GPU_DEVICE (int i, int j, int)
+
173  {
+
174  for (int k = 0; k <= N; ++k)
+
175  {
+
176  rufrc(i,j,0) += ru(i,j,k,nrhs);
177 
-
178  Gpu::synchronize();
+
178  Real cff = om_u(i,j,0)*on_u(i,j,0);
179 
-
180  AMREX_ASSERT(xbx.smallEnd(2) == 0 && xbx.bigEnd(2) == N);
-
181  ParallelFor(makeSlab(xbx,2,0), [=] AMREX_GPU_DEVICE (int i, int j, int)
-
182  {
-
183  for (int k = 0; k <= N; ++k)
-
184  {
-
185  rufrc(i,j,0) += ru(i,j,k,nrhs);
+
180  Real cff1 = (k == N) ? sustr(i,j,0)*cff : 0.0;
+
181  Real cff2 = (k == 0) ? -bustr(i,j,0)*cff : 0.0;
+
182 
+
183  rufrc(i,j,0) += cff1+cff2;
+
184  }
+
185  });
186 
-
187  Real cff = om_u(i,j,0)*on_u(i,j,0);
-
188 
-
189  Real cff1 = (k == N) ? sustr(i,j,0)*cff : 0.0;
-
190  Real cff2 = (k == 0) ? -bustr(i,j,0)*cff : 0.0;
-
191 
-
192  rufrc(i,j,0) += cff1+cff2;
-
193  }
-
194  });
-
195 
-
196  // *************************************************************
-
197  // UPDATING V
-
198  // *************************************************************
-
199 
-
200  // Think of the cell-centered box as [ 0:nx-1, 0:ny-1] (0,0,0) cc
-
201  //
-
202  // ybx is the y-face-centered box on which we update v (with rv) [ 0:nx-1, 0:ny ] (1,0,0) y-faces
-
203  // to do so requires VFe on [ 0:nx-1,-1:ny ] (1,1,0) xy-nodes
-
204  // which requires vold on [ 0:nx-1,-2:ny+2] (1,0,0) y-faces
-
205  // and requires Hvom on [ 0:nx-1,-2:ny+2] (0,1,0) x-faces
-
206  // to do so requires VFx on [ 0:nx , 0:ny ] (0,0,0) cc
-
207  // which requires vold on [-2:nx+1, -:ny ] (1,0,0) y-faces
-
208  // and requires Hvom on [ 0:nx-1,-2:ny+1] (0,0,0) y-faces
+
187  // *************************************************************
+
188  // UPDATING V
+
189  // *************************************************************
+
190 
+
191  // Think of the cell-centered box as [ 0:nx-1, 0:ny-1] (0,0,0) cc
+
192  //
+
193  // ybx is the y-face-centered box on which we update v (with rv) [ 0:nx-1, 0:ny ] (1,0,0) y-faces
+
194  // to do so requires VFe on [ 0:nx-1,-1:ny ] (1,1,0) xy-nodes
+
195  // which requires vold on [ 0:nx-1,-2:ny+2] (1,0,0) y-faces
+
196  // and requires Hvom on [ 0:nx-1,-2:ny+2] (0,1,0) x-faces
+
197  // to do so requires VFx on [ 0:nx , 0:ny ] (0,0,0) cc
+
198  // which requires vold on [-2:nx+1, -:ny ] (1,0,0) y-faces
+
199  // and requires Hvom on [ 0:nx-1,-2:ny+1] (0,0,0) y-faces
+
200 
+
201  // Grow ybx by one in low y-direction
+
202  ParallelFor(growLo(ybx,1,1), [=] AMREX_GPU_DEVICE (int i, int j, int k)
+
203  {
+
204  Real cff1=vold(i,j,k,nrhs)+vold(i,j+1,k,nrhs);
+
205 
+
206  // Upwinding
+
207  Real cff = (cff1 > 0.0) ? vold(i,j-1,k,nrhs)-2.0*vold(i,j,k,nrhs)+ vold(i,j+1,k,nrhs) :
+
208  vold(i,j,k,nrhs)-2.0*vold(i,j+1,k,nrhs)+ vold(i,j+2,k,nrhs);
209 
-
210  // Grow ybx by one in low y-direction
-
211  ParallelFor(growLo(ybx,1,1), [=] AMREX_GPU_DEVICE (int i, int j, int k)
-
212  {
-
213  Real cff1=vold(i,j,k,nrhs)+vold(i,j+1,k,nrhs);
-
214 
-
215  // Upwinding
-
216  Real cff = (cff1 > 0.0) ? vold(i,j-1,k,nrhs)-2.0*vold(i,j,k,nrhs)+ vold(i,j+1,k,nrhs) :
-
217  vold(i,j,k,nrhs)-2.0*vold(i,j+1,k,nrhs)+ vold(i,j+2,k,nrhs);
-
218 
-
219  Real Hvee_j = Hvom(i,j-1,k)-2.0*Hvom(i,j ,k)+Hvom(i,j+1,k);
-
220  Real Hvee_jp1 = Hvom(i,j ,k)-2.0*Hvom(i,j+1,k)+Hvom(i,j+2,k);
+
210  Real Hvee_j = Hvom(i,j-1,k)-2.0*Hvom(i,j ,k)+Hvom(i,j+1,k);
+
211  Real Hvee_jp1 = Hvom(i,j ,k)-2.0*Hvom(i,j+1,k)+Hvom(i,j+2,k);
+
212 
+
213  VFe(i,j,k) = 0.25 * (cff1+Gadv*cff) * ( Hvom(i,j ,k)+ Hvom(i,j+1,k) + 0.5 * Gadv * (Hvee_j + Hvee_jp1) );
+
214  });
+
215 
+
216  // Grow ybx by one in high x-direction
+
217  ParallelFor(growHi(ybx,0,1), [=] AMREX_GPU_DEVICE (int i, int j, int k)
+
218  {
+
219  Real cff1 = vold(i,j,k,nrhs) + vold(i-1,j ,k,nrhs);
+
220  Real cff2 = Huon(i,j,k) + Huon(i ,j-1,k);
221 
-
222  VFe(i,j,k) = 0.25 * (cff1+Gadv*cff) * ( Hvom(i,j ,k)+ Hvom(i,j+1,k) + 0.5 * Gadv * (Hvee_j + Hvee_jp1) );
-
223  });
-
224 
-
225  // Grow ybx by one in high x-direction
-
226  ParallelFor(growHi(ybx,0,1), [=] AMREX_GPU_DEVICE (int i, int j, int k)
-
227  {
-
228  Real cff1 = vold(i,j,k,nrhs) + vold(i-1,j ,k,nrhs);
-
229  Real cff2 = Huon(i,j,k) + Huon(i ,j-1,k);
-
230 
-
231  // Upwinding
-
232  Real cff = (cff2 > 0.0) ? vold(i-2,j,k,nrhs)-2.0*vold(i-1,j,k,nrhs)+vold(i ,j,k,nrhs) :
-
233  vold(i-1,j,k,nrhs)-2.0*vold(i ,j,k,nrhs)+vold(i+1,j,k,nrhs);
-
234 
-
235  Real Huee_j = Huon(i,j-1,k)-2.0*Huon(i,j ,k)+Huon(i,j+1,k);
-
236  Real Huee_jm1 = Huon(i,j-2,k)-2.0*Huon(i,j-1,k)+Huon(i,j ,k);
-
237 
-
238  VFx(i,j,k) = 0.25*(cff1+Gadv*cff)* (cff2+Gadv*0.5*(Huee_j + Huee_jm1));
-
239  });
-
240 
-
241  ParallelFor(ybx, [=] AMREX_GPU_DEVICE (int i, int j, int k)
-
242  {
-
243  rv(i,j,k,nrhs) -= ( (VFx(i+1,j,k)-VFx(i,j,k)) + (VFe(i,j,k)-VFe(i,j-1,k)) );
-
244  });
-
245 
-
246  ParallelFor(ybx, [=] AMREX_GPU_DEVICE (int i, int j, int k)
-
247  {
-
248  Real cff1=9.0/16.0;
-
249  Real cff2=1.0/16.0;
-
250  if (k>=1 && k<=N-2)
-
251  {
-
252  FC(i,j,k)=( cff1*(vold(i,j,k ,nrhs)+ vold(i,j,k+1,nrhs))
-
253  -cff2*(vold(i,j,k-1,nrhs)+ vold(i,j,k+2,nrhs)) )*
-
254  ( cff1*(W(i,j ,k)+ W(i,j-1,k))
-
255  -cff2*(W(i,j+1,k)+ W(i,j-2,k)) );
-
256  }
-
257  else // this needs to be split up so that the following can be concurrent
-
258  {
-
259  FC(i,j,N)=0.0;
-
260  FC(i,j,N-1)=( cff1*(vold(i,j,N-1,nrhs)+ vold(i,j,N ,nrhs))
-
261  -cff2*(vold(i,j,N-2,nrhs)+ vold(i,j,N ,nrhs)) )*
-
262  ( cff1*(W(i,j ,N-1)+ W(i,j-1,N-1))
-
263  -cff2*(W(i,j+1,N-1)+ W(i,j-2,N-1)) );
-
264  FC(i,j,0)=( cff1*(vold(i,j,0,nrhs)+ vold(i,j,1,nrhs))
-
265  -cff2*(vold(i,j,0,nrhs)+ vold(i,j,2,nrhs)) )*
-
266  ( cff1*(W(i,j ,0)+ W(i,j-1,0))
-
267  -cff2*(W(i,j+1,0)+ W(i,j-2,0)) );
-
268  // FC(i,0,-1)=0.0;
-
269  }
-
270  }); Gpu::synchronize();
+
222  // Upwinding
+
223  Real cff = (cff2 > 0.0) ? vold(i-2,j,k,nrhs)-2.0*vold(i-1,j,k,nrhs)+vold(i ,j,k,nrhs) :
+
224  vold(i-1,j,k,nrhs)-2.0*vold(i ,j,k,nrhs)+vold(i+1,j,k,nrhs);
+
225 
+
226  Real Huee_j = Huon(i,j-1,k)-2.0*Huon(i,j ,k)+Huon(i,j+1,k);
+
227  Real Huee_jm1 = Huon(i,j-2,k)-2.0*Huon(i,j-1,k)+Huon(i,j ,k);
+
228 
+
229  VFx(i,j,k) = 0.25*(cff1+Gadv*cff)* (cff2+Gadv*0.5*(Huee_j + Huee_jm1));
+
230  });
+
231 
+
232  ParallelFor(ybx, [=] AMREX_GPU_DEVICE (int i, int j, int k)
+
233  {
+
234  rv(i,j,k,nrhs) -= ( (VFx(i+1,j,k)-VFx(i,j,k)) + (VFe(i,j,k)-VFe(i,j-1,k)) );
+
235  });
+
236 
+
237  ParallelFor(ybx, [=] AMREX_GPU_DEVICE (int i, int j, int k)
+
238  {
+
239  Real cff1=9.0/16.0;
+
240  Real cff2=1.0/16.0;
+
241  if (k>=1 && k<=N-2)
+
242  {
+
243  FC(i,j,k)=( cff1*(vold(i,j,k ,nrhs)+ vold(i,j,k+1,nrhs))
+
244  -cff2*(vold(i,j,k-1,nrhs)+ vold(i,j,k+2,nrhs)) )*
+
245  ( cff1*(W(i,j ,k)+ W(i,j-1,k))
+
246  -cff2*(W(i,j+1,k)+ W(i,j-2,k)) );
+
247  }
+
248  else // this needs to be split up so that the following can be concurrent
+
249  {
+
250  FC(i,j,N)=0.0;
+
251  FC(i,j,N-1)=( cff1*(vold(i,j,N-1,nrhs)+ vold(i,j,N ,nrhs))
+
252  -cff2*(vold(i,j,N-2,nrhs)+ vold(i,j,N ,nrhs)) )*
+
253  ( cff1*(W(i,j ,N-1)+ W(i,j-1,N-1))
+
254  -cff2*(W(i,j+1,N-1)+ W(i,j-2,N-1)) );
+
255  FC(i,j,0)=( cff1*(vold(i,j,0,nrhs)+ vold(i,j,1,nrhs))
+
256  -cff2*(vold(i,j,0,nrhs)+ vold(i,j,2,nrhs)) )*
+
257  ( cff1*(W(i,j ,0)+ W(i,j-1,0))
+
258  -cff2*(W(i,j+1,0)+ W(i,j-2,0)) );
+
259  // FC(i,0,-1)=0.0;
+
260  }
+
261  }); Gpu::synchronize();
+
262 
+
263  ParallelFor(ybx, [=] AMREX_GPU_DEVICE (int i, int j, int k)
+
264  {
+
265  Real cff = (k >= 1) ? FC(i,j,k)-FC(i,j,k-1) : FC(i,j,k);
+
266 
+
267  rv(i,j,k,nrhs) -= cff;
+
268  });
+
269 
+
270  Gpu::synchronize();
271 
-
272  ParallelFor(ybx, [=] AMREX_GPU_DEVICE (int i, int j, int k)
-
273  {
-
274  Real cff = (k >= 1) ? FC(i,j,k)-FC(i,j,k-1) : FC(i,j,k);
-
275 
-
276  rv(i,j,k,nrhs) -= cff;
-
277  });
+
272  AMREX_ASSERT(ybx.smallEnd(2) == 0 && ybx.bigEnd(2) == N);
+
273  ParallelFor(makeSlab(ybx,2,0), [=] AMREX_GPU_DEVICE (int i, int j, int)
+
274  {
+
275  for (int k = 0; k <= N; ++k)
+
276  {
+
277  rvfrc(i,j,0) += rv(i,j,k,nrhs);
278 
-
279  Gpu::synchronize();
+
279  Real cff = om_v(i,j,0)*on_v(i,j,0);
280 
-
281  AMREX_ASSERT(ybx.smallEnd(2) == 0 && ybx.bigEnd(2) == N);
-
282  ParallelFor(makeSlab(ybx,2,0), [=] AMREX_GPU_DEVICE (int i, int j, int)
-
283  {
-
284  for (int k = 0; k <= N; ++k)
-
285  {
-
286  rvfrc(i,j,0) += rv(i,j,k,nrhs);
-
287 
-
288  Real cff = om_v(i,j,0)*on_v(i,j,0);
-
289 
-
290  Real cff1 = (k == N) ? svstr(i,j,0)*cff : 0.0;
-
291  Real cff2 = (k == 0) ? -bvstr(i,j,0)*cff : 0.0;
-
292 
-
293  rvfrc(i,j,0) += cff1+cff2;
-
294  }
-
295  });
-
296 }
+
281  Real cff1 = (k == N) ? svstr(i,j,0)*cff : 0.0;
+
282  Real cff2 = (k == 0) ? -bvstr(i,j,0)*cff : 0.0;
+
283 
+
284  rvfrc(i,j,0) += cff1+cff2;
+
285  }
+
286  });
+
287 }
@@ -9836,8 +9821,8 @@

73  plot_var_names = tmp_plot_names;
74 }
bool containerHasElement(const V &iterable, const T &query)
Definition: ROMSX.H:63
-
const amrex::Vector< std::string > derived_names
Definition: ROMSX.H:915
-
const amrex::Vector< std::string > cons_names
Definition: ROMSX.H:912
+
const amrex::Vector< std::string > derived_names
Definition: ROMSX.H:914
+
const amrex::Vector< std::string > cons_names
Definition: ROMSX.H:911
Here is the call graph for this function:
@@ -9883,17 +9868,17 @@

-
1057  {
-
1058  if (amrex::ParallelDescriptor::IOProcessor())
-
1059  {
-
1060  datalog[i] = std::make_unique<std::fstream>();
-
1061  datalog[i]->open(filename.c_str(),std::ios::out|std::ios::app);
-
1062  if (!datalog[i]->good()) {
-
1063  amrex::FileOpenFailed(filename);
-
1064  }
-
1065  }
-
1066  amrex::ParallelDescriptor::Barrier("ROMSX::setRecordDataInfo");
-
1067  }
+
1056  {
+
1057  if (amrex::ParallelDescriptor::IOProcessor())
+
1058  {
+
1059  datalog[i] = std::make_unique<std::fstream>();
+
1060  datalog[i]->open(filename.c_str(),std::ios::out|std::ios::app);
+
1061  if (!datalog[i]->good()) {
+
1062  amrex::FileOpenFailed(filename);
+
1063  }
+
1064  }
+
1065  amrex::ParallelDescriptor::Barrier("ROMSX::setRecordDataInfo");
+
1066  }

@@ -10395,7 +10380,7 @@

477  ////rufrc from 3d is set to ru, then the wind stress (and bottom stress) is added, then the mixing is added
478  //rufrc=ru+sustr*om_u*on_u
479 
-
480  rhs_uv_3d(bx, xbx, ybx, gbx, uold, vold, ru, rv, rufrc, rvfrc,
+
480  rhs_uv_3d(bx, xbx, ybx, uold, vold, ru, rv, rufrc, rvfrc,
481  sustr, svstr, bustr, bvstr, Huon, Hvom,
482  on_u, om_v, om_u, on_v, W, FC, nrhs, N);
483 
@@ -10428,7 +10413,7 @@

#define Omega_comp
Definition: IndexDefines.H:11
void set_massflux_3d(amrex::Array4< amrex::Real > u, amrex::Array4< amrex::Real > Hu, amrex::Array4< amrex::Real > on_u, amrex::Array4< amrex::Real > v, amrex::Array4< amrex::Real > Hv, amrex::Array4< amrex::Real > om_v, amrex::Array4< amrex::Real > Hz, const int nnew)
Definition: ROMSX_set_massflux_3d.cpp:18
void t3dmix(const amrex::Box &bx, amrex::Array4< amrex::Real > t, amrex::Array4< amrex::Real > diff2, amrex::Array4< amrex::Real > Hz, amrex::Array4< amrex::Real > pm, amrex::Array4< amrex::Real > pn, amrex::Array4< amrex::Real > pmon_u, amrex::Array4< amrex::Real > pnom_v, int nrhs, int nnew, const amrex::Real dt_lev)
Definition: ROMSX_t3dmix.cpp:6
-
void rhs_uv_3d(const amrex::Box &bx, const amrex::Box &xbx, const amrex::Box &ybx, const amrex::Box &gbx, amrex::Array4< amrex::Real > uold, amrex::Array4< amrex::Real > vold, amrex::Array4< amrex::Real > ru, amrex::Array4< amrex::Real > rv, amrex::Array4< amrex::Real > rufrc, amrex::Array4< amrex::Real > rvfrc, amrex::Array4< amrex::Real > sustr, amrex::Array4< amrex::Real > svstr, amrex::Array4< amrex::Real > bustr, amrex::Array4< amrex::Real > bvstr, amrex::Array4< amrex::Real > Huon, amrex::Array4< amrex::Real > Hvom, amrex::Array4< amrex::Real > on_u, amrex::Array4< amrex::Real > om_v, amrex::Array4< amrex::Real > om_u, amrex::Array4< amrex::Real > on_v, amrex::Array4< amrex::Real > W, amrex::Array4< amrex::Real > FC, int nrhs, int N)
Definition: ROMSX_rhs_uv_3d.cpp:32
+
void rhs_uv_3d(const amrex::Box &bx, const amrex::Box &xbx, const amrex::Box &ybx, amrex::Array4< amrex::Real > uold, amrex::Array4< amrex::Real > vold, amrex::Array4< amrex::Real > ru, amrex::Array4< amrex::Real > rv, amrex::Array4< amrex::Real > rufrc, amrex::Array4< amrex::Real > rvfrc, amrex::Array4< amrex::Real > sustr, amrex::Array4< amrex::Real > svstr, amrex::Array4< amrex::Real > bustr, amrex::Array4< amrex::Real > bvstr, amrex::Array4< amrex::Real > Huon, amrex::Array4< amrex::Real > Hvom, amrex::Array4< amrex::Real > on_u, amrex::Array4< amrex::Real > om_v, amrex::Array4< amrex::Real > om_u, amrex::Array4< amrex::Real > on_v, amrex::Array4< amrex::Real > W, amrex::Array4< amrex::Real > FC, int nrhs, int N)
Definition: ROMSX_rhs_uv_3d.cpp:32
void prestep(int lev, amrex::MultiFab &mf_uold, amrex::MultiFab &mf_vold, amrex::MultiFab &mf_u, amrex::MultiFab &mf_v, std::unique_ptr< amrex::MultiFab > &mf_ru, std::unique_ptr< amrex::MultiFab > &mf_rv, amrex::MultiFab &mf_tempold, amrex::MultiFab &mf_saltold, amrex::MultiFab &mf_temp, amrex::MultiFab &mf_salt, amrex::MultiFab &mf_W, amrex::MultiFab &mf_DC, std::unique_ptr< amrex::MultiFab > &mf_z_r, std::unique_ptr< amrex::MultiFab > &mf_z_w, std::unique_ptr< amrex::MultiFab > &mf_h, std::unique_ptr< amrex::MultiFab > &mf_sustr, std::unique_ptr< amrex::MultiFab > &mf_svstr, std::unique_ptr< amrex::MultiFab > &mf_bustr, std::unique_ptr< amrex::MultiFab > &mf_bvstr, const int iic, const int nfirst, const int nnew, int nstp, int nrhs, int N, const amrex::Real dt_lev)
Definition: ROMSX_prestep.cpp:38
void set_smflux(int lev, amrex::Real time)
Definition: ROMSX.cpp:391
void rho_eos(const amrex::Box &bx, amrex::Array4< amrex::Real > temp, amrex::Array4< amrex::Real > salt, amrex::Array4< amrex::Real > rho, amrex::Array4< amrex::Real > rhoA, amrex::Array4< amrex::Real > rhoS, amrex::Array4< amrex::Real > Hz, amrex::Array4< amrex::Real > z_w, amrex::Array4< amrex::Real > h, const int nrhs, const int N)
Definition: ROMSX_rho_eos.cpp:21
@@ -10790,9 +10775,9 @@

93 }
#define RhoScalar_comp
Definition: IndexDefines.H:10
-
AMREX_FORCE_INLINE std::ostream & DataLog(int i)
Definition: ROMSX.H:1026
+
AMREX_FORCE_INLINE std::ostream & DataLog(int i)
Definition: ROMSX.H:1025
amrex::Real volWgtSumMF(int lev, const amrex::MultiFab &mf, int comp, bool local, bool finemask)
Definition: ROMSX_SumIQ.cpp:96
-
AMREX_FORCE_INLINE int NumDataLogs() noexcept
Definition: ROMSX.H:1033
+
AMREX_FORCE_INLINE int NumDataLogs() noexcept
Definition: ROMSX.H:1032
@@ -12893,7 +12878,7 @@

130  amrex::ParmParse::dumpTable(jobInfoFile, true);
131  jobInfoFile.close();
132 }
-
amrex::Real getCPUTime() const
Definition: ROMSX.H:1042
+
amrex::Real getCPUTime() const
Definition: ROMSX.H:1041
std::string inputs_name
Definition: main.cpp:9
Here is the call graph for this function:
@@ -13295,7 +13280,7 @@

294  }
295  } // end multi-level
296 }
-
int total_plot_file_step_1
Definition: ROMSX.H:864
+
int total_plot_file_step_1
Definition: ROMSX.H:863
amrex::Vector< std::string > PlotFileVarNames(amrex::Vector< std::string > plot_var_names) const
Definition: Plotfile.cpp:78
void writeJobInfo(const std::string &dir) const
Definition: writeJobInfo.cpp:7
void romsx_dernull(const amrex::Box &, amrex::FArrayBox &, int, int, const amrex::FArrayBox &, const amrex::Geometry &, amrex::Real, const int *, const int)
Definition: Derive.cpp:25
diff --git a/classROMSX.js b/classROMSX.js index 325d625a..6aaa70b4 100644 --- a/classROMSX.js +++ b/classROMSX.js @@ -60,7 +60,7 @@ var classROMSX = [ "rho_eos", "classROMSX.html#af05997945f183a417b7fc334fd3e6f39", null ], [ "rhs_2d", "classROMSX.html#a68aaf031ceac86e43c40b41a5f7354f4", null ], [ "rhs_t_3d", "classROMSX.html#aaf9f32897499d17bad9d80230331db6a", null ], - [ "rhs_uv_3d", "classROMSX.html#a4dbaef1f63bd022dcbf9040e0019694a", null ], + [ "rhs_uv_3d", "classROMSX.html#a383351010df001682415bf701c47cbe8", null ], [ "romsx_advance", "classROMSX.html#ad462a3ade367c29008f7e42e4063410e", null ], [ "set_2darrays", "classROMSX.html#abd0ef9b9a56b5f6985a0903895d81e46", null ], [ "set_bathymetry", "classROMSX.html#ab93d802ac3111e738dafe04367813135", null ], diff --git a/functions_func_r.html b/functions_func_r.html index e3f784e1..deac8705 100644 --- a/functions_func_r.html +++ b/functions_func_r.html @@ -119,7 +119,7 @@

- r -

    : ROMSX
  • rhs_uv_3d() -: ROMSX +: ROMSX
  • ROMSX() : ROMSX diff --git a/functions_r.html b/functions_r.html index 4622ef85..bc97e9ee 100644 --- a/functions_r.html +++ b/functions_r.html @@ -140,7 +140,7 @@

    - r -

      : ROMSX
    • rhs_uv_3d() -: ROMSX +: ROMSX
    • ROMSX() : ROMSX diff --git a/navtreeindex1.js b/navtreeindex1.js index 648bec6e..886a09fd 100644 --- a/navtreeindex1.js +++ b/navtreeindex1.js @@ -4,6 +4,7 @@ var NAVTREEINDEX1 = "classROMSX.html#a33906f6209da9e2a247b1022f60d24ac":[2,0,4,129], "classROMSX.html#a34887f38557bf5026acaf46581e05375":[2,0,4,15], "classROMSX.html#a366c20991d6dd6d7057ff0a593c8c11f":[2,0,4,54], +"classROMSX.html#a383351010df001682415bf701c47cbe8":[2,0,4,60], "classROMSX.html#a38eb43b738a979fd1048253da2727095":[2,0,4,13], "classROMSX.html#a39cc4340b94a3842a4d7ef7d06a03ffc":[2,0,4,79], "classROMSX.html#a3a506eb0db4a850e63f4479269a97b38":[2,0,4,82], @@ -14,7 +15,6 @@ var NAVTREEINDEX1 = "classROMSX.html#a44a44e4d82bc38d55daa03f281437113":[2,0,4,200], "classROMSX.html#a45591c69e52ac45b762eaa78880c6229":[2,0,4,33], "classROMSX.html#a48b99337b5ac313ce48a95ab0b9e73dc":[2,0,4,68], -"classROMSX.html#a4dbaef1f63bd022dcbf9040e0019694a":[2,0,4,60], "classROMSX.html#a4e8f6e71ae2c366a6455882d029de926":[2,0,4,12], "classROMSX.html#a4ea53c7dac70940e948e43f7d623798b":[2,0,4,171], "classROMSX.html#a514fa82950fa541fb1ebde3f9230eb51":[2,0,4,46], diff --git a/search/all_10.js b/search/all_10.js index 287dbd15..52ed80a8 100644 --- a/search/all_10.js +++ b/search/all_10.js @@ -38,7 +38,7 @@ var searchData= ['rhoscalar_5fcomp_363',['RhoScalar_comp',['../IndexDefines_8H.html#a0296f21cd48e5d8236c62ae4ce319b2f',1,'IndexDefines.H']]], ['rhs_5f2d_364',['rhs_2d',['../classROMSX.html#a68aaf031ceac86e43c40b41a5f7354f4',1,'ROMSX']]], ['rhs_5ft_5f3d_365',['rhs_t_3d',['../classROMSX.html#aaf9f32897499d17bad9d80230331db6a',1,'ROMSX']]], - ['rhs_5fuv_5f3d_366',['rhs_uv_3d',['../classROMSX.html#a4dbaef1f63bd022dcbf9040e0019694a',1,'ROMSX']]], + ['rhs_5fuv_5f3d_366',['rhs_uv_3d',['../classROMSX.html#a383351010df001682415bf701c47cbe8',1,'ROMSX']]], ['rhsvar_367',['RHSVar',['../namespaceRHSVar.html',1,'']]], ['romsx_368',['ROMSX',['../classROMSX.html#a172ef44112e79149fd4b321e8c1ab357',1,'ROMSX::ROMSX()'],['../classROMSX.html',1,'ROMSX']]], ['romsx_2ecpp_369',['ROMSX.cpp',['../ROMSX_8cpp.html',1,'']]], diff --git a/search/functions_e.js b/search/functions_e.js index 3e435c66..3f0a463c 100644 --- a/search/functions_e.js +++ b/search/functions_e.js @@ -13,7 +13,7 @@ var searchData= ['rho_5feos_822',['rho_eos',['../classROMSX.html#af05997945f183a417b7fc334fd3e6f39',1,'ROMSX']]], ['rhs_5f2d_823',['rhs_2d',['../classROMSX.html#a68aaf031ceac86e43c40b41a5f7354f4',1,'ROMSX']]], ['rhs_5ft_5f3d_824',['rhs_t_3d',['../classROMSX.html#aaf9f32897499d17bad9d80230331db6a',1,'ROMSX']]], - ['rhs_5fuv_5f3d_825',['rhs_uv_3d',['../classROMSX.html#a4dbaef1f63bd022dcbf9040e0019694a',1,'ROMSX']]], + ['rhs_5fuv_5f3d_825',['rhs_uv_3d',['../classROMSX.html#a383351010df001682415bf701c47cbe8',1,'ROMSX']]], ['romsx_826',['ROMSX',['../classROMSX.html#a172ef44112e79149fd4b321e8c1ab357',1,'ROMSX']]], ['romsx_5fadvance_827',['romsx_advance',['../classROMSX.html#ad462a3ade367c29008f7e42e4063410e',1,'ROMSX']]], ['romsx_5fdernull_828',['romsx_dernull',['../namespacederived.html#af28239f0827a8e4bc3ed2e559c0f0019',1,'derived']]],