Custom Query (964 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (568 - 570 of 964)

Ticket Owner Reporter Resolution Summary
#525 arango arango Done Added error function (ERF) routines
Description

Added a new file ROMS/Utility/erf.F to incomplete gamma function and error function:

  ERF        Error function, ERF(x)
  ERFC       Complementary error function, ERFC(x)
  ERFCC      Complementary error function, ERFCC(x): cheaper Chebyshev fitting approximation
  GAMMP      Incomplete gamma function, P(a,x)
  GAMMQ      Incomplete gamma function complement, Q(a,x)=1-P(a,x)

This functions are not part of the standard intrinsic functions in Fortran. There are handy when defining analytical expression. The implementation of these functions are adapted from Numerical Recipes.

I recommend to have a call the MPI communication routine mp_bcasti to broadcast the exit_flag in case of an internal error in the gamma function or error function computation. For example, we need to have something like this:

      DO j=JstrR,JendR
        DO i=IstrR,IendR
          fac=-0.5_r8*u0*guscale*GRID(ng)%f(i,j)*sqrt(pi)/g
          dw=(yr(i,j)-yr(i,Mm(ng)/2))/guscale
          df=fac*ERF(dw)
          zeta(i,j,1)=df
        END DO
      END DO
# ifdef DISTRIBUTE
      CALL mp_bcasti (ng, model, exit_flag)  ! in case of error in ERF
# endif

#526 arango arango Fixed Missing T_PASSIVE
Description

The T_PASSIVE conditional is missing in get_data.F and set_data.F whe processing surface and bottom inert tracers fluxes. If there is not net surface or bottom flux for these tracers, the code it is still correct since stflx and btflx is initialized to zero when the array are allocated. We need to have the following logic when processing such fields:

# if defined BIOLOGY || defined SEDIMENT || defined T_PASSIVE
  ...
# endif

The TLM, RPM, ADM version of these files are also corrected. Many thanks to Lyon Lanerolle for reporting this problem.

I also corrected the units attribute in output NetCDF files for Wsed, tau_ce, and tau_cd. We need to have instead:

        double Wsed(NST) ;
                Wsed:long_name = "sediment particle settling velocity" ;
                Wsed:units = "meter second-1" ;
        double tau_ce(NST) ;
                tau_ce:long_name = "sediment critical shear for erosion" ;
                tau_ce:units = "meter-2 second-2" ;
        double tau_cd(NST) ;
                tau_cd:long_name = "sediment critical shear for deposition" ;
                tau_cd:units = "meter-2 second-2" ;

Many thanks to Changwei Bian for bringing this to my attention.

#527 arango arango Done Updated seagrid2roms matlab script
Description

The SeaGrid Matlab GUI was written by Chuck Denham around 1999 and its becoming out of date as Matlab continue to evolve and retire obsolete functions. This GUI has always work for me with Matlab 2006b. The update here is to work with newer versions of Matlab. I tried Matlab R2010a which is installed on my iMac. In order to get SeaGrid working I have to make few changes.

It also has been reported in the past that the script seagrid2roms.m which is used to write the ROMS NetCDF from the seagrid.mat file generated by SeaGrid. The NetCDF interface inside Matlab has also evolved substantially. There are several messages about this in the ROMS forum. This issue has been in my to do list for very long time. So I finally took some time to look at these reported problems. I rewrote seagrid2roms.m to work with the mexnc interface. Notice the this script now uses:

  • matlab/grid/c_grid.m to create ROMS Grid NetCDF
  • matlab/landmask/uvp_masks.m to compute the masks at U-, V-, and PSI-points
  • matlab/utility/nc_write.m to write data into Grid NetCDF file

I did noticed that SeaGrid gives a nonzero rotation angle even if the grid is not rotated. The values are of the order 1E-12. I don't know if this is a round off error or there is something wrong in that computation. SeaGrid is complicated and has a logic that it is very difficult to follow. I am adding this in my to do list to track this computation inside the GUI in the future.

There are other minor updates that are required to the SeaGrid package as Matlab continue complaining about obsolete features. We will do this incrementally in the future. We need to reconsider the full grid generation package for ROMS after the full nesting capabilities are released in the near future.

I also added a new script:

  • matlab/utility/nc_drename.m: Generic script to rename a NetCDF dimension.
Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.