Custom Query (964 matches)
Results (553 - 555 of 964)
Ticket | Owner | Reporter | Resolution | Summary |
---|---|---|---|---|
#509 | Done | Corrected initialization of Nfiles in inp_par.F | ||
Description |
The local variable Nfiles used to count the number of files per field(s) during record splitting was initialized before being allocated in inp_par.F. This caused unexpected behavior in some compilers that do not initialize variable to zero by default. Many thanks to Kate Hedstrom for bringing this to my attention. I also added the following conditional when computing the Infinity variable that it is needed when coupling with SWAN: #ifdef SWAN_COUPLING Infinity=one/zero #endif This is still not a solution but at least is not used everytime that we run ROMS in other applications. Many thanks to Mark Hadfield for reporting this. |
|||
#510 | Fixed | Unable to create new history NetCDF in restart mode (NRREC ≠ 0) | ||
Description |
If I run the model using a NRREC value different than 0, the subroutine def_his() always expects an existing NetCDF history and it results in: DEF_HIS - inquiring history file: ''/path/to/history.nc'' NETCDF_OPEN - unable to open existing NetCDF file: ''/path/to/history.nc'' call from: def_his.F The problem seems due to the missing initialization of the parameter idefHIS in Modules/mod_ncparam.F. Please, note that in releases prior to 553 this parameter was initialized to -1. Looking at Nonlinear/output.F the following lines of code are never executed due to the limiting condition over idefHIS (which is never assigned, hence it's always 0): 76 IF (idefHIS(ng).lt.0) THEN 77 idefHIS(ng)=((ntstart(ng)-1)/ndefHIS(ng))*ndefHIS(ng) 78 IF (idefHIS(ng).lt.iic(ng)-1) THEN 79 idefHIS(ng)=idefHIS(ng)+ndefHIS(ng) 80 END IF 81 END IF In the same subroutine the following if/then construct results in the assignment of NewFile which will be always .FALSE. whenever NRREC is not equal to 0: 82 IF ((nrrec(ng).ne.0).and.(iic(ng).eq.ntstart(ng))) THEN 83 IF ((iic(ng)-1).eq.idefHIS(ng)) THEN 84 Ldefine=.FALSE. ! finished file, delay 85 ELSE ! creation of next file 86 Ldefine=.TRUE. 87 NewFile=.FALSE. ! unfinished file, inquire 88 END IF ! content for appending 89 idefHIS(ng)=idefHIS(ng)+nHIS(ng) ! restart offset 90 ELSE IF ((iic(ng)-1).eq.idefHIS(ng)) THEN 91 idefHIS(ng)=idefHIS(ng)+ndefHIS(ng) 92 IF (nHIS(ng).ne.ndefHIS(ng).and.iic(ng).eq.ntstart(ng)) THEN 93 idefHIS(ng)=idefHIS(ng)+nHIS(ng) ! multiple record offset 94 END IF 95 Ldefine=.TRUE. 96 NewFile=.TRUE. 97 ELSE 98 Ldefine=.FALSE. 99 END IF As a workaround I re-introduced the initialization of at least the following two parameters inside Modules/mod_ncparam.F: DO ng=1,Ngrids idefAVG(ng)=-1 idefHIS(ng)=-1 END DO This lets the first aforementioned block of code (output.F: line 77) to correctly set the idefHIS(ng) parameter and in the subsequent if/then construct the NewFile parameter is permitted to be .TRUE. Thank you, Alex |
|||
#511 | Done | Time-averaged and diagnostic fields in the 4D-Var algorithms | ||
Description |
The following time-averaged CPP options are now available:
Notice that only one of these CPP options can be activated at the same time. They are mutually exclusive! This is because the same internal arrays (declared in mod_averages.F) are uses to stored the accumulated field sums. Now, the I4D-Var and 4D-PSAS algorithms (IS4DVAR and W4DPSAS, respectively) will write out the time-averaged and diagnostic fields for each outer loop in separated files if the AVERAGES and/or DIAGNOSTICS_TS/DIAGNOSTICS_UV options are activated. Warning: The CPP directives associated with AVERAGES where modified in several routines (like biology and sediment) to include instead: #if defined AVERAGES || \ (defined AD_AVERAGES && defined ADJOINT) || \ (defined RP_AVERAGES && defined TL_IOMS) || \ (defined TL_AVERAGES && defined TANGENT) Many thanks to Andy Moore for suggesting this useful capabilities for the 4D-Var data assimilation algorithms. This will become handy in 4D-Var reanalysis of ocean circulation for a particular region. |