Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#911 closed upgrade (Done)

IMPORTANT: Miscelaneous Update

Reported by: arango Owned by:
Priority: major Milestone: Release ROMS/TOMS 4.1
Component: Nonlinear Version: 4.0
Keywords: Cc:

Description

A couple of updates and a bug correction:

  • A change in routine io_metadata is made to allow more than a single unit test in the ROMS-JEDI interface. In addition, a FirstPass switch is passed as an argument to the calling function. In mod_ncparam.F, we now have:
         Ldone=.FALSE.
         FirstPass=.TRUE.                  ! initialize metadata processing
    !
          METADATA_LOOP : DO WHILE (.not.Ldone)
    !
    !  Load I/O metadata information.
    !
            Ldone = io_metadata(FirstPass, Vinfo, scale, add_offset)
            ...
          END DO METADATA_LOOP
    
  • The generic user parameter array (user) is now an allocatable vector with a size controlled by the User by specifying Nuser. For example, we can have in roms.in:
          NUSER =  3
           USER =  20.d0 40.d0 50.d0
    
    Then, the output NetCDF files will report with ncdump:
    dimensions:
            ...
            Nuser = 3;
    variables:
            ...
    
            double user(Nuser) ;
                    user:long_name = "user generic parameters" ;
                    user:_FillValue = 1.e+37 ;
            ...
    data:
     
    user = 20, 40, 50;
    
    If the value of NUSER is greater than the number of elements specified in USER, ROMS will repeat the last specified value (50.d0) until the user(1:Nuser) vector is filled:
          NUSER =  10
           USER =  20.d0 40.d0 50.d0
    
     will yield:
    
     user = 20, 40, 50, 50, 50, 50, 50, 50, 50, 50;
    
    Similarly,
          NUSER =  10
           USER =  20.d0 40.d0 50.d0 7*1.0d+37
    
     will yield:
    
     user = 20, 40, 50, _, _, _, _, _, _, _;
    
    It gives you some flexibility. I assume that we get messages in the Forum when Users trip on the logic.
  • Corrected bug in netcdf_close and pio_netcdf_close the switch Lupdate. We need to have instead:
            IF (.not.PRESENT(Lupdate)) THEN
              my_Lupdate=.FALSE.
            ELSE
              my_Lupdate=Lupdate
            END IF
    
    If the optional argument Lupdate is not present, my_lupdate should be false. Many thanks to Pierre St-Laurent for reporting this issue.

Change History (2)

comment:1 by arango, 2 years ago

Resolution: Done
Status: newclosed

comment:2 by arango, 2 years ago

Correct bug in mod_scalars.F that initializes the user array before it is allocated. The issue is solved by removing the initialization:

      user=0.0_r8

The management of the user array is done in read_phypar.F. Many thanks to Jangggeun Choi for reporting this bug.

Note: See TracTickets for help on using tickets.