Opened 10 years ago
Closed 10 years ago
#683 closed bug (Invalid)
def_info.F flags — at Version 1
Reported by: | kate | Owned by: | arango |
---|---|---|---|
Priority: | trivial | Milestone: | Release ROMS/TOMS 3.7 |
Component: | Nonlinear | Version: | 3.7 |
Keywords: | Cc: |
Description (last modified by )
There are some settings in def_info.F which should have this change applied:
@@ -1403,8 +1403,8 @@ #if defined UV_VIS2 || defined UV_VIS4 Vinfo( 1)='LuvSponge' Vinfo( 2)='horizontal viscosity sponge activation switch' - Vinfo( 9)='.FALSE.' - Vinfo(10)='.TRUE.' + Vinfo( 7)='.FALSE.' + Vinfo( 8)='.TRUE.' status=def_var(ng, model, ncid, varid, nf90_int, & & 1, (/0/), Aval, Vinfo, ncname, & & SetParAccess = .FALSE.)
You'll know for sure which are which, but 7/8 are for true/false values.
Change History (1)
comment:1 by , 10 years ago
Description: | modified (diff) |
---|---|
Resolution: | → Invalid |
Status: | new → closed |
Summary: | def_info flags → def_info.F flags |
Note:
See TracTickets
for help on using tickets.
Nope, the code is correct as it is. Logicals with letters are not CF compliant! So I made the change to have 0 = .FALSE. and 1 = .TRUE. long time ago. If you look at the ROMS output NetCDF you will see:
and the respective values are:
It has been like this for long time. The correct syntax is to use attributes flag_values and flag_meanings. The attributes below (option_T, option_F, option_0, and option_1) are deprecated in ROMS and we use the flag_values and flag_meanings instead. See def_var.F for details.
However, we still use Vinfo(7:10) but with accepted attributes flag_values and flag_meanings instead. It turns out that Vinfo(7:8) are the same that Vinfo(9:10) but are retained for the legacy code.
As a matter of fact, attributes flag_values and flag_meanings are more flexible because you can have countless possibilities.
Notice that we have now routines to read and write logicals in ROMS. See netcdf_put_lvar and netcdf_get_lvar. They are flexible enough to take integers or characters. This is a very import issue if running with parallel I/O. Character variables are very problematic and should be only present as global attributes.
Your ticket is invalid but I am leaving it to clarify this issue. You may want to correct your added variables in the NetCDF files to follow this CF compliant rule.