Opened 15 years ago

Closed 15 years ago

#319 closed bug (WorksForMe)

tiny def_info bug

Reported by: kate Owned by: arango
Priority: minor Milestone: Release ROMS/TOMS 3.3
Component: Nonlinear Version: 3.3
Keywords: Cc:

Description (last modified by arango)

In def_info.F, the global attribute bio_file gets filled with '-' then written out as is. I suggest adding something like:

lstr=LEN_TRIM(BIONAME(i)) IF (lstr.gt.0) THEN

ie=is+lstr-1 bio_file(is:ie)=TRIM(BIONAME(i)) is=ie+1 bio_file(is:is)=',' is=is+2

END IF

Change History (3)

comment:1 by kate, 15 years ago

Ah, hmm, I see that doesn't work. It should be BIONAME(model), but there's nothing much in there.

comment:2 by kate, 15 years ago

Actually, if you really want this to work, you can call biology from initial, with the bio_tile getting called only in the "else" case of the test on Lbio.

comment:3 by arango, 15 years ago

Description: modified (diff)
Resolution: WorksForMe
Status: newclosed

No this is not a bug. This is completely intended!!! We cannot call any of the biology models from initial because we will introduce a big adjoint bug!!!

The way that I solved this problem is to rewrite the correct value for the attribute bio_file in the header of output NetCDF file, when the file is closed. Check routine netcdf_close in file mod_netcdf.F. The fact that you are having this problem implies that you are either checking the file before it is closed or you are not using the call to:

      CALL netcdf_close (ng, model, ncid, ncname)

everytime that a NetCDF file is closed. This is part of the new ROMS I/O design. This routine is generic and expandable, so in the future we can take care of things like this.

Anyway, I think that I forgot to document this so I don't expect anybody to know about this trick.

I had to do this trick because now we are allowing to have multitple copies of the biological models. For example, you can have a modified copy of any of the biology models in the working (application) directory. John Wilkin asked for this capability since usually the biological models are tuned (changed a little) for a particular application. This will avoid to making changes to the distribuited version of these models.

Note: See TracTickets for help on using tickets.