Custom Query (964 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (505 - 507 of 964)

Ticket Owner Reporter Resolution Summary
#616 arango arango Done VERY IMPORTANT: replaced UV_PSOURCE, Q_PSOURSE, and TS_PSOURCE with logical switches
Description

This ticket includes very important updates to the repository:

  • The CPP options UP_PSOURCE, Q_PSOURCE and TS_PSOURCE used to activate point Sources and Sinks for momentum and tracers were eliminated and replaced with logical switches (LuvSrc, LwSrc, and LtracerSrc, respectively) to facilitate nesting, specially refinement grids in applications with river runoff. These logical switches are set-up in ocean.in:
    ! Logical switches (TRUE/FALSE) to activate horizontal momentum transport
    ! point Sources/Sinks (like river runoff transport) and mass point
    ! Sources/Sinks (like volume vertical influx), [1:Ngrids].
    
          LuvSrc == F                          ! horizontal momentum transport
           LwSrc == F                          ! volume vertical influx
    
    ! Logical switches (TRUE/FALSE) to activate tracers point Sources/Sinks
    ! (like river runoff) and to specify which tracer variables to consider:
    ! [1:NAT+NPT,Ngrids].
    ! See glossary below for details.
    
      LtracerSrc == F F                        ! temperature, salinity, inert
    
    In nesting applications, turn on only the grids that needs point Sources and/or Sinks. A particular nesting grid may or may not have Sources and/or Sinks forcing. This change is required to get the correct results in nesting applications!
  • The Sources and/or Sinks input NetCDF forcing file (like river runoff) is now specified with its own keyword in ocean.in:
    ! Input Sources/Sinks forcing (like river runoff) file name.
    
         SSFNAME == ocean_rivers.nc
    
    That is, the river runoff forcing file is separated from the regular forcing file list (see FRCNAME in ocean.in) to allow manipulations over nested grids and facilitate internal processing in ROMS.
  • For example, in an application with 3 nested grids but with river forcing in grids 1 and 3 we would have:
                         LuvSrc == T F T
                          LwSrc == F F F
                     LtracerSrc == 2*T 2*F 2*T
    ...
                        SSFNAME == my_rivers_grid1.nc \
                                   my_rivers_grid2.nc \
                                   my_rivers_grid3.nc
    
    Here, my_rivers_grid2.nc is a dummy file name that will never be processed in ROMS because of the logical switches are FALSE for the second grid.

WARNING: You need to remove the UV_PSOURCE, TS_PSOURCE or Q_PSOURCE from the header file or build script. Otherwise, ROMS will give you an error and will stop running. This is to force you to make the appropriate change in your ocean.in and configuration.

  • The switch LuvSrc has the same capability than the obsolete option UV_PSOURCE. Usually, it is used to specify river runoff horizontal transport in the 2D and 3D momentum equations at the specified (Isrc,Jsrc) locations as a point Source/Sink. That is, the values of the computed horizontal momentum (ubar, vbar, u, or v) will be replaced with the specified values (computed from input transport Qsrc) according to the direction of the Source/Sink point, Dsrc. Hence, the setting of the Isrc and Jsrc is crucial in your forcing file.
  • The switch LwSrc has the same capability than the obsolete option Q_PSOURCE. Usually, it is used to specify a vertical mass influx in the W-momentum (omega) equation at the specified (Isrc,Jsrc) locations as a point Source/Sink. This is operated on the divergence of the 3D continuity equation and vertical advection. It does not input horizontal momentum to the (Isrc,Jsrc) cell but it changes its volume. Currently, we cannot activate LuvSrc and LwSrc at the same time because it uses the same fields from the input river forcing NetCDF file. I will think about how to allow both switches in the future. Anyway, in mostly all applications we will be using LuvSrc.
  • The switch LtracerSrc has the same capability as before (src:ticket:376). In addition, it is used to replace obsolete option TS_PSOURCE. Usually, it is used to specify point Sources/Sinks in the tracer equations at the specified (Isrc,Jsrc) locations. If LwSrc is off, the tracer Source/Sink is applied to the tracer horizontal advective fluxes. If LwSrc is on, the tracer Source/Sink is is applied to the tracer vertical advective flux.

In river forcing, we need to apply tracer point sources to both temperature and salinity. As before, if you want to add other tracer variables (other than temperature and salinity) as a source for a particular river(s), you just need to specify such values on those river(s). Then, set the values to ZERO on the other river(s) that do not require such river forcing for that tracer. Recall that you need to specify the tracer values for all rivers, even if their values are zero.


  • Corrected a bug that I introduced recently in ad_rho_eos.F, tl_rho_eos.F, and rp_rho_eos.F when adding the potential density pden (see src:tricket:612). This was giving a fatal algorithm result message in 4D-Var when POSTERIOR_EOFS or POSTERIOR_ERROR_I was activated. This one is kind of mysterious but it seems that the symmetry properties or the posterior error covariance was affected. We would look at the causes for this since pden will be used in the future for horizontal mixing.
  • Corrected a bug in routine error_covariance (convolve.F) when ADJUST_STFLUX and/or ADJUST_WSTRESS is turned off in the 4D-Var algorithms. Many thanks to Julia Levin for bringing this to my attention.
  • Corrected a bug in mod_ncparam.F when initializing ANANAME. This bug was introcuded recently in src:ticket:609. Many thanks to Mark Hadfield for bringing this to my attention.

The nesting algorithms seem to be working well for one-way nesting in refinement applications. We have complex refinement applications in the South China Sea and the Gulf of Mexico running successfully when ONE_WAY is activated. These applications include both tides and river forcing. I will add some figures soon to the ROMS forum. The two-way nesting set-up runs but it creates noise at the contact boundary. I either have a bug in routine fine2coarse, a logic error in coarse grid contact point inside the refined grid, or some fancy filtering is required when averaging the finer grid solution at the coarse grid locations.

Anyway, I am pleased with my progress in the nesting algorithms. It is nice to run complex coastal applications and avoid the messy lateral boundary conditions. The nesting algorithms are quite complex due to the ambitious capabilities. I hope that have two-way nesting working soon.

#617 arango arango Fixed VERY IMPORTANT: Corrected Matlab scripts for refinement
Description

Several of the Matlab scripts for grid nesting were updated. In particular, the contact points for refinement are computed in a more robust way:

  • contact.m: The native Matlab function inpolygon is used to determine the contact points inside, at the boundary, and outside of the nested grids. In complex applications with rotated grids, this determination is subject to round-off. Some points can be missing or the incorrect donor cell is selected yielding negative interpolation weights. This is not good... I have to rethink the approach to determine the contact points for refined grid configurations. The computation is now done in (XI, ETA) coordinates instead of (Lon,Lat). This fixed the problem and made the computation more robust. Now, all the interpolation weights are positive and add exactly to one. Several new plots are added to local function refinement in contact.m. The first three plots (figures 1:3) show the finer grid points with a red plus sign. All the donor grid points are marked with cyan circles. The blue circles show the donor grid cell needed to interpolate the contact points for the receiver (finer) grid from the donor (coarser) grid. There is a figure for RHO-, U-, and V-points. The next three plots (figures 4:6), illustrate the finer grid cells that need to be averaged to replace the coarser grid field values in two-way nesting. For debugging purposes, three new text files (Rweights.txt, Uweights.txt, and Vweights.txt) are written to provide detailed information about the interpolation weights used to compute the receiver grid contact points from the donor grid. I highly recommend to inspect these files before proceeding with a nesting application. This has to be done as part of the grid set-up.
  • grid_extract.m: Coastline data is now written into the extracted grid, if available. Recall that this function is used to extract a sub-grid from a larger finer grid.
  • fine2coarse.f: The logic on how to extract a coarse grid from a finer grid was revisited. In addition, coastline data is now written into the extracted grid, if available. The grid metrics (pm, pn, dndx, dmde) are re-computed at the coarser resolution using function grid_metrics. We cannot extract their values because grid spacing is larger by factor of Gfactor. The computation of metrics from discrete points is subject to round-off. There is not much that we can do here. The round-off is small and of the order 1.0E-16 (eps value).
  • grid_perimeter: Added the perimeters in (XI, ETA) coordinates for PSI-, RHO-, U-, and V-points to the grid sub-structure. In addition, the UV-perimeter is also computed to avoid round-off problems in inpolygon.

The refinement contact points for the DOGBONE refinement test case were recomputed. This NetCDF file is in the test repository. Users need to update the test repository. Instructions on how to download the Test Cases repository are given in WikiROMS.

The nesting algorithms seem to be working nicely in realistic refinement application for the South China Sea (rotated grids) and Gulf of Mexico (non rotated grids). This application run well when ONE_WAY is activated. The two-way nesting works well in the DOGBONE test case. Two-way realistic applications requires more fine tuning. I am working on an iterative algorithm to correct the finer grid bathymetry at the contact points to impose the same water column volume as the coarser grid. Perhaps, this is also required for the interior points. The finer grid volume sum must be equal to that of the coarse grid in rest conditions (zeta=0).

I am very pleased with the strategy of computing all the nesting information outside of ROMS. It will be very difficult to compute the contact points information inside ROMS for complex configurations. The parallelism will complicate matters. It is more robust to provide a NetCDF file with all the nesting information.

WARNING, WARNING, WARNING: In order for ROMS to work with nesting, you must update the Matlab nesting scripts in this repository and recompute the contact points NetCDF file. Otherwise, your nesting application will not work because incorrect nesting contact points indices...

#618 arango arango Fixed Time-averaged quadratic switches missing in biology and sediment input scripts
Description
  • Added the time-averaged switches (Aout) for biological and sediment quadratic tracers in their respective input scripts:

In bio_fennel.in we now have:

! Logical switches (TRUE/FALSE) to activate writing of time-averaged fields
! into AVERAGE output file: [1:NBT,Ngrids].

Aout(idTvar) == 12*T    ! ..., NO3, ...           biological tracer

Aout(idTTav) == 12*F    ! ..., NO3_2, ...         quadratic <t*t> tracer terms
Aout(idUTav) == 12*F    ! ..., u_NO3, ...         quadratic <u*t> tracer terms
Aout(idVTav) == 12*F    ! ..., v_NO3, ...         quadratic <v*t> tracer terms
Aout(iHUTav) == 12*F    ! ..., Huon_NO3, ...      tracer volume flux, <Huon*t>
Aout(iHVTav) == 12*F    ! ..., Hvom_NO3, ...      tracer volume flux, <Hvom*t>

In ecosim.in we now have:

! Logical switches (TRUE/FALSE) to activate writing of time-averaged fields
! into AVERAGE output file, [NBT,Ngrids] values are expected.

  Aout(idTvar) == 61*T   ! ..., DIC, ...           biological tracer

  Aout(idTTav) == 61*F   ! ..., DIC_2, ...         quadratic <t*t> tracer terms
  Aout(idUTav) == 61*F   ! ..., u_DIC, ...         quadratic <u*t> tracer terms
  Aout(idVTav) == 61*F   ! ..., v_DIC, ...         quadratic <v*t> tracer terms
  Aout(iHUTav) == 61*F   ! ..., Huon_DIC, ...      tracer volume flux, <Huon*t>
  Aout(iHVTav) == 61*F   ! ..., Hvom_DIC, ...      tracer volume flux, <Hvom*t>

In nemuro.in we now have:

! Logical switches (TRUE/FALSE) to activate writing of time-averaged fields
! into AVERAGE output file: [1;NBT,Ngrids].

Aout(idTvar) == 11*T    ! ..., NO3, ...          biological tracer

Aout(idTTav) == 11*F    ! ..., NO3_2, ...        quadratic <t*t> tracer terms
Aout(idUTav) == 11*F    ! ..., u_NO3, ...        quadratic <u*t> tracer terms
Aout(idVTav) == 11*F    ! ..., v_NO3, ...        quadratic <v*t> tracer terms
Aout(iHUTav) == 11*F    ! ..., Huon_NO3, ...     tracer volume flux, <Huon*t>
Aout(iHVTav) == 11*F    ! ..., Hvom_NO3, ...     tracer volume flux, <Hvom*t>

In npzd_Franks.in and npzd_Powell.in we now have:

! Logical switches (TRUE/FALSE) to activate writing of time-averaged fields
! into AVERAGE output file: [1:NBT,Ngrids].

Aout(idTvar) == 4*T     ! ..., NO3, ...           biological tracer

Aout(idTTav) == 4*F     ! ..., NO3_2, ...         quadratic <t*t> tracer terms
Aout(idUTav) == 4*F     ! ..., u_NO3, ...         quadratic <u*t> tracer terms
Aout(idVTav) == 4*F     ! ..., v_NO3, ...         quadratic <v*t> tracer terms
Aout(iHUTav) == 4*F     ! ..., Huon_NO3, ...      tracer volume flux, <Huon*t>
Aout(iHVTav) == 4*F     ! ..., Hvom_NO3, ...      tracer volume flux, <Hvom*t>

In npzd_iron.in we now have:

! Logical switches (TRUE/FALSE) to activate writing of time-averaged fields
! into AVERAGE output file: [1:NBT,Ngrids].

Aout(idTvar) == 6*T     ! ..., NO3, ...           biological tracer

Aout(idTTav) == 6*F     ! ..., NO3_2, ...         quadratic <t*t> tracer terms
Aout(idUTav) == 6*F     ! ..., u_NO3, ...         quadratic <u*t> tracer terms
Aout(idVTav) == 6*F     ! ..., v_NO3, ...         quadratic <v*t> tracer terms
Aout(iHUTav) == 6*F     ! ..., Huon_NO3, ...      tracer volume flux, <Huon*t>
Aout(iHVTav) == 6*F     ! ..., Hvom_NO3, ...      tracer volume flux, <Hvom*t>

In sediment.in we now have:

! Logical switches (TRUE/FALSE) to activate writing of time-averaged
! cohesive sediment fields into AVERAGE output file.

Aout(idmud)  == T       ! mud_01, ...             suspended concentration

Aout(iMTTav) == F       ! mud_01_2, ...           quadratic <t*t> tracer terms
Aout(iMUTav) == F       ! u_mud_01, ...           quadratic <u*t> tracer terms
Aout(iMVTav) == F       ! v_mud_01, ...           quadratic <v*t> tracer terms
Aout(MHUTav) == F       ! Huon_mud_01, ...        tracer volume flux, <Huon*t>
Aout(MHVTav) == F       ! Hvom_mud_01, ...        tracer volume flux, <Hvom*t>

Aout(iMUbld) == T       ! bedload_Umud_01, ...    bed load at U-points
Aout(iMVbld) == T       ! bedload_Vmud_01, ...    bed load at V-points

...

! Logical switches (TRUE/FALSE) to activate writing of time-averaged
! non-cohesive sediment fields into AVERAGE output file.

Aout(idsand) == T       ! sand_01, ...            suspended concentration

Aout(iSTTav) == F       ! sand_01_2, ...          quadratic <t*t> tracer terms
Aout(iSUTav) == F       ! u_sand_01, ...          quadratic <u*t> tracer terms
Aout(iSVTav) == F       ! v_sand_01, ...          quadratic <v*t> tracer terms
Aout(SHUTav) == F       ! Huon_sand_01, ...       tracer volume flux, <Huon*t>
Aout(SHVTav) == F       ! Hvom_sand_01, ...       tracer volume flux, <Hvom*t>

Aout(iSUbld) == T       ! bedload_Usand_01, ...   bed load at U-points
Aout(iSVbld) == T       ! bedload_Vsand_01, ...   bed load at V-points

WARNING: The name of all tracers quadratic variables were renamed for clarity. And underscore was added to the basic variable. For example, the quadratic values for temperature are:

Aout(idTTav) == F F     ! temp_2, ...        quadratic <t*t> tracer terms
Aout(idUTav) == F F     ! u_temp, ...        quadratic <u*t> tracer terms
Aout(idVTav) == F F     ! v_temp, ...        quadratic <v*t> tracer terms
Aout(iHUTav) == F F     ! Huon_temp, ...     tracer volume flux, <Huon*t>
Aout(iHVTav) == F F     ! Hvom_temp, ...     tracer volume flux, <Hvom*t>

Examples of the variable names for biology and sediment are shown above.

Many thanks to Aboozar Tabatabai for bringing this to my attention.

WARNING: Notice that all the input scripts for physics (ocean.in) in addition to the ones for biology and sediment were updated. The changes to the ocean.in are only done in the documentation for Aout. The test cases repository is also updated accordingly.

Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.