Custom Query (969 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (799 - 801 of 969)

Ticket Owner Reporter Resolution Summary
#780 arango Done IMPORTANT: Updated nesting Matlab script grid_connections.m
Description

The Matlab script used to compute nested grid connectivity (grid_connections.m) was updated, so it is more robust in telescoping nesting applications.

Currently, in ROMS a telescoping grid is a refined grid (refine_factor > 0) containing a finer grid inside. Notice that under this definition the coarser grid (ng=1, refine_factor=0) is not considered a telescoping grid. The last cascading grid is not considered a telescoping grid since it does not contains a finer grid inside. The telescoping definition is a technical one, and it facilitates the algorithm design.

A tricky algorithm is added at the top of these function to reject indirect connectivity in telescoping refinement. Previously, only one coincident connection between grids was allowed, as shown below:

https://www.myroms.org/trac/grids_1-and-2.png https://www.myroms.org/trac/grids_2-and-3.png https://www.myroms.org/trac/grids_1-and-3.png

Here, we have a three nested grid application. Grid-2 is a 1:3 refinement from Grid-1 and Grid-3 is a 1:3 refinement from Grid-2. The Grid-2 is the only telescoping grid in this application according to the above definition. Notice that Grid-3 is inside both Grid-2 (directly) and Grid-1 (indirectly).

The panels show the location of the donor grid (blue plus) and receiver grid (red circle) at PSI-points. Notice that in the top panel, the Grid-2 perimeter lies in the same lines as the donor Grid-1, and some of the points are coincident, as it should be. The same occurs in the middle panel between Grid-2 and Grid-3.

However, we did not allow before to have coincident grid points between the indirect connections of Grid-1 and Grid-3. We were using that property to reject indirect connections between nested grids.

I was aware of this restriction but I forgot to go back and code a robust logic in grid_connections.m to allow coincident grids points in indirect connections for telescoping applications. The restriction is removed with this update/

I know, it is a complicated subject to discuss with words. It needs to be shown geometrically.

Many thanks to Marc Mestres and John Wilkin for bringing this problem to my attention.

#781 arango Done Miscelaneous Update
Description

This update includes several improvements to ROMS code:

  • Several ROMS array allocation routines are called from read_phypar after several of the dimension parameters values are known after processed from the standard input script ocean.in. It has come to my attention that some users repeat such important parameters (like Ngrids and NtileJ) without commenting on (!) the previous assignment. The entries in ocean.in can be repeated, but the user needs to be aware the ROMS read each value and retains the last value processed. Anyway, a safeguard is coded in the following routines located in their associated modules:
    • allocate_param (mod_param.F)
    • allocate_parallel (mod_parallel.F)
    • allocate_iounits (mod_iounits.F)
    • allocate_stepping (mod_stepping.F)
    • allocate_fourdvar (mod_fourdvar.F)
    • allocate_scalars (mod_scalars.F)
    • allocate_ncparam (mod_ncparam.F)

to suppress allocation errors because variables were already allocated. Each variable in the above modules are tested for allocation:

      IF (.not.allocated(VAR)) THEN
        allocate ( VAR(...) )
      END IF

Warning: If the entries for Ngrids and NtileJ are repeated, ROMS will use the first processed value to allocate variables in the above modules. Therefore, the user needs to be careful when setting their values in ocean.in.

  • Routine read_phypar.F now use the I0 formatted statement for an nteger in a couple of places:
  70  FORMAT (/,' Resolution, Grid ',i2.2,': ',i0,'x',i0,'x',i0,        &
     &        ',',2x,'Parallel Nodes: ',i0,',',2x,'Tiling: ',i0,        &
     &        'x',i0)

  90  FORMAT (/,' Resolution, Grid ',i2.2,': ',i0,'x',i0,'x',i0,        &
     &        ',',2x,'Parallel Threads: ',i0,',',2x,'Tiling: ',i0,      &
     &        'x',i0)

to avoid overflow error in the integer format. The Iw.m descriptor with w=0 is allowed in the Fortran 2003 Standard, and it is supported by all modern compilers. The I0.m edit descriptor produces a reult with at leas m digits, and as many more digits as are necessary to represent th integer value.

  • Increased the integer format in timers.F to avoid overflow of large integers in the number of CPUs used:
  10       FORMAT (a,i5,a,f12.3)
  • The Proleptic Calendar attribute is renamed in dateclock.F to it is standard CF compliance value so it can be used by third-party software:
            calendar='proleptic_gregorian'
    
    Many thanks to Ivica Janekovic for bringing it to my attention.
#782 arango Done VERY IMPORTANT: Time units attribute in NetCDF files
Description

This change is a significant improvement, and I recommend users to update their code if have a version newer than Jun 21, 2018.

In update src:ticket:771, I made changes on how the reference time is processed in ROMS. The time attribute in input NetCDF is essential in the processing of external data. It usually has the form of:

  'time-units since YYYY-MM-DD hh:mm:ss'
  'time-units since YYYY-MM-DD hh:mm:ss.s'
  'time-units since YYYY-MM-DD hh:mm:ss.ss'

But the several variants that are still CF compliant. For example, one can have:

   'days since 1900-01-01 00:00:00'
   'seconds since 1968-05-23 12:00:00 -6'
   'years since -4713-11-24 00:00:00'        (Nov 24, 4713 BC)
   'hours since 1990-1-1 0:0:0'
   'days since 1582-10-15 00:00:0.000Z'
   'days since 1-1-1 0:0:0'
   'hours since 2010-12-1 12:5:30.5'
   'days since 1900/01/01 00:00:00' 
   'seconds since 1960-1-1'
   'days since 1-07-15 0:0:0'
   'days since 0000-01-01 0:0:0'

As you can see, people creating NetCDF files are not consistent in the format for YYYY-MM-DD hh:mm:ss. Therefore, I added a generic routine time_units to the module dateclock.F.

I am using the ASCII character set to decode the time units attribute string and replace unneeded characters with a blank space, CHAR(32). Only the following characters are retained:

!    Char  Dec  Control Action
!    ------------------------------
!    SP    32   Space
!    +     43   Plus
!    -     45   Hyphen, dash, minus
!    .     46   Period
!    0     48   Zero
!    1     49   One
!    2     50   Two
!    3     51   Three
!    4     52   Four
!    5     53   Five
!    6     54   Six
!    7     55   Seven
!    8     56   Eight
!    9     57   Nine
!
      DO i=1,lstr
        Schar=ICHAR(Tstring(i:i))
        IF (.not.(((48.le.Schar).and.(Schar.le.57)).or.                 &
     &            (Schar.eq.32).or.(Schar.eq.46))) THEN
           Tstring(i:i)=CHAR(32)                          ! blank space
        END IF
      END DO
      Tstring=ADJUSTL(TRIM(Tstring))
      lstr=LEN_TRIM(Tstring)

Then, every numerical value in the string is converted to a real variable to allow floating-point values for seconds. The year, month, day, hour, and minutes are output as integers.

Many thanks to John Wilkin for bringing this issue to my attention. If the time attribute in your input file is not in the form of time-units since YYYY-MM-DD hh:mm:ss, you will get an error when calling function netcdf_get_time.


I also updated function decode_line in inp_par.F to remove control-keys introduced when generating or editing input script ocean.in. It now checks and replaces ASCII characters CHAR(0) to CHAR(31) with a blank space:

!  Char  Dec  Key  Control Action
!  ----------------------------------------------------------------------
!  NUL   0    ^@   Null character
!  SOH   1    ^A   Start of heading, = console interrupt
!  STX   2    ^B   Start of text, maintenance mode on HP console
!  ETX   3    ^C   End of text
!  EOT   4    ^D   End of transmission, not the same as ETB
!  ENQ   5    ^E   Enquiry, goes with ACK; old HP flow control
!  ACK   6    ^F   Acknowledge, clears ENQ logon hand
!  BEL   7    ^G   Bell, rings the bell...
!  BS    8    ^H   Backspace, works on HP terminals/computers
!  HT    9    ^I   Horizontal tab, move to next tab stop
!  LF    10   ^J   Line Feed
!  VT    11   ^K   Vertical tab
!  FF    12   ^L   Form Feed, page eject
!  CR    13   ^M   Carriage Return
!  SO    14   ^N   Shift Out, alternate character set
!  SI    15   ^O   Shift In, resume default character set
!  DLE   16   ^P   Data link escape
!  DC1   17   ^Q   XON, with XOFF to pause listings; ":okay to send".
!  DC2   18   ^R   Device control 2, block-mode flow control
!  DC3   19   ^S   XOFF, with XON is TERM=18 flow control
!  DC4   20   ^T   Device control 4
!  NAK   21   ^U   Negative acknowledge
!  SYN   22   ^V   Synchronous idle
!  ETB   23   ^W   End transmission block, not the same as EOT
!  CAN   24   ^X   Cancel line, MPE echoes !!!
!  EM    25   ^Y   End of medium, Control-Y interrupt
!  SUB   26   ^Z   Substitute
!  ESC   27   ^[   Escape, next character is not echoed
!  FS    28   ^\   File separator
!  GS    29   ^]   Group separator
!  RS    30   ^^   Record separator, block-mode terminator
!  US    31   ^_   Unit separator
!
!  SP    32        Space
!
      inpline=TRIM(ADJUSTL(line_text))
      Linp=LEN_TRIM(inpline)
      DO i=1,LEN_TRIM(inpline)
        j=ICHAR(inpline(i:i))
        IF (j.lt.32) THEN
          inpline(i:i)=char(32)                           ! blank space
        END IF
      END DO
      inpline=TRIM(inpline)
Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.