Custom Query (964 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (667 - 669 of 964)

Ticket Owner Reporter Resolution Summary
#802 arango Done Added several Matlab scripts to repository
Description

Added several new Matlab scripts to the repository:

  • forcing/add_heatflux.m: Adds the heat flux components (shortwave, longwave, latent, and sensible) to an existent NetCDF file if not present. The file must contain the net surface heat flux variable so it can be used as metadata for the heat flux components. It is primarily used to write field from coupling during debugging.
  • netcdf/nc_stats.m: Computes the statistics of requested NetCDF variable for the specified record(s). If land/sea mask is available, it computes the statistic for the water points only. I can be used to determine global colormap dynamical range for animations.
  • netcdf/nc_time.m: Reads the time variable from the specified NetCDF file, and computes the elapsed time since the specified reference date. If the time record (Tindex) is omitted, it processes all the available records.
  • utility/roms_field.m: Computes requested secondary 2D or 3D field from ROMS state output history/average data. Currently, there is code for compute 2D or 3D relative vorticity.
  • utility/rvorticity.m: Computes 2D or 3D relative vorticity from ROMS fields.
  • utility/vector4stream.m: Given velocity components and grid information, it interpolates data to a monotonic and plaid grid (as if produced by MESHGRID) for the plotting of streamlines elsewhere using streamslice qor 'm_streamline'. The user may specify the monotonic grid corners bounded by (Llon,Blat) and (Rlon,Tlat).

https://www.myroms.org/trac/sstr_vec.png

  • utility/wrt_latlon.m: Writes the (lat,lon) pairs into an ASCII so it may be used in the ROMS plotting package.
  • Updated landmask/edit mask.m to improve the logic of the coastline file to use. Many thanks to John Warner for bringing this to my attention.
#803 arango Done IMPORTANT: Global and EAST longitudes are now allowed in regrid.F
Description

This one has been in my TODO lists for a long time. Finally, I have a global forcing data with longitudes ranging between 0-360 for an application.

  • Updated regrid.F to allow global grids and EAST longitudes. Introduced a new work variable GRID(:)%MyLon for the interpolation of data to ROMS grid, and passed as argument:
         SUBROUTINE regrid (ng, model, ncname, ncid,                       &
        &                   ncvname, ncvarid, gtype, iflag,                &
        &                   Nx, Ny, Finp, Amin, Amax,                      &
        &                   LBi, UBi, LBj, UBj,                            &
        &                   Imin, Imax, Jmin, Jmax,                        &
        &                   MyXout, Xout, Yout, Fout)
    
    
    as MyXout dummy argument. The Following code is added for processing application grid longitude. Notice that input data longitude is not modified:
    !
    !  Copy longitude coordinate Xout to MyXout. If the longitude of the
    !  data is from a global grid [0-360] or in degrees_east, convert Xout
    !  to east longitudes (MyXout) to facilitate regridding. In such case,
    !  positive multiples of 360 map to 360 and negative multiples of 360
    !  map to zero using the MODULO intrinsic Fortran function.
    !
          IF ((Xmin.ge.0.0_r8).and.(Xmax.gt.0.0_r8).and.                    &
         &    ((Xmax-Xmin).gt.315.0_r8)) THEN
            EastLon=.TRUE.
            MyLonMin=MODULO(LonMin(ng), 360.0_r8)
            IF ((MyLonMin.eq.0.0_r8).and.                                   &
         &          (LonMin(ng).gt.0.0_r8)) MyLonMin=360.0_r8
            MyLonMax=MODULO(LonMax(ng), 360.0_r8)
            IF ((MyLonMax.eq.0.0_r8).and.                                   &
         &          (LonMax(ng).gt.0.0_r8)) MyLonMax=360.0_r8
          ELSE
            EastLon=.FALSE.
            MyLonMin=LonMin(ng)
            MyLonMax=LonMax(ng)
          END IF
          IF (EastLon) THEN
            DO j=Jmin,Jmax
              DO i=Imin,Imax
                MyXout(i,j)=MODULO(Xout(i,j), 360.0_r8)   ! range [0 360]
                IF ((MyXout(i,j).eq.0.0_r8).and.                            &
         &          (Xout(i,j).gt.0.0_r8)) MyXout(i,j)=360.0_r8
              END DO
            END DO
          ELSE
            DO j=Jmin,Jmax
              DO i=Imin,Imax
                MyXout(i,j)=Xout(i,j)                     ! range [-180 180]
              END DO
            END DO
          END IF
    
    The routine nf_fread2d.F was modified to add the extra argument to the regrid call. the mod_grid.F now includes the MyLon variable in the structure.
  • The routines in check_multifile.F and inquiry.F are more robust by allowing lowercase, uppercase or a combination when searching for the time coordinste associated with a NetCDF variable
        IF ((INDEX(TRIM(lowercase(var_name(i))),'time').ne.0).and.      &
     &            (var_ndim(i).eq.1)) THEN
          TvarName=TRIM(var_name(i))
          foundit=.TRUE.
          EXIT
          ...
        END IF

Notice that we convert to lowercase to simplify the comparison in the conditional.

  • Corrected argument to load_l in read_stapar.F:
               CASE ('Sout(idTsur)')
                 Npts=load_l(Nval, Cval, MT, Ngrids, Ltracer)
                 DO ng=1,Ngrids
                   DO itrc=1,NAT
                     Sout(idTsur(itrc),ng)=Ltracer(itrc,ng)
                   END DO
                 END DO
    
    Many thanks to John Warner for reporting this issue.
#804 arango Fixed VERY IMPORTANT: missing argument to regrid call in nf_fread2d.F
Description
  • The update made on src:ticket:803 missed the extra argument in routine nf_fread2d.F for state variables at U-points. We need to have instead:
             CASE (u2dvar, u3dvar)
               CALL regrid (ng, model, ncname, ncid, ncvname, ncvarid,     &
        &                   MyType, InterpFlag,                            &
        &                   Ilen, Jlen, wrk, Amin, Amax,                   &
        &                   LBi, UBi, LBj, UBj,                            &
        &                   Imin, Imax, Jmin, Jmax,                        &
        &                   GRID(ng) % MyLon,                              &
        &                   GRID(ng) % lonu,                               &
        &                   GRID(ng) % latu,                               &
        &                   A)
    
  • Corrected typo in sediment_inp.h. We need to have Qout instead of Hout:
               CASE ('Qout(iMmass)')
                 Npts=load_l(Nval, Cval, NCS, Ngrids, Lmud)
                 DO ng=1,Ngrids
                   DO itrc=1,NCS
                     i=idBmas(itrc)
                     Qout(i,ng)=Lmud(itrc,ng)
                   END DO
                 END DO
    
    Many thanks to Catherine Drinkorn for bringing this to our attention.
  • Make sure that DIURNAL_SRFLUX is only available when SOLVE3D is activated in analytical.F.
Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.