140 | | * With ROUTING, stop in ''routing_findbasins'': |
141 | | {{{ |
142 | | Why are we here and can not find a trip larger than 96 |
143 | | Does this mean that the basin does not have any outflow 1 -2147483648 |
144 | | }}} |
145 | | This means that there is an invalid basin number equal to -2147483648 (integer variable ''bname'' copied from the call variable ''basin''/''basin_bx'').[[BR]] |
146 | | Before the call to ''routing_findbasins'' there is a call to ''routing_getgrid'', with a real to integer conversion: |
147 | | {{{ |
148 | | basin_bx(iloc, jloc) = NINT(basins(sub_index(ib, ip, 1), sub_index(ib,ip,2))) |
149 | | }}} |
150 | | ''basins'' is a real variable read from the file ''routing.nc''. The missing value is 1.e20 (equal to ''sechiba_undef'') and NINT (1.e20) = -2147483648[[BR]] |
151 | | This hampers the filtering against an invalid basin number in ''routing_findbasins'': |
152 | | {{{ |
153 | | IF ( basin(ip,jp) .LT. undef_int) THEN |
154 | | }}} |
155 | | (undef_int = 999999999) |
156 | | - First test: the filter is temporarily replaced with: |
157 | | {{{ |
158 | | IF (basin (ip, jp). GT. 0) THEN |
159 | | }}} |
160 | | - Second test proposed by Jan: change the unvalid value just after the reading of the ''basins'' variable in ''routing_basins'': |
161 | | {{{ |
162 | | CALL flinget(fid, 'basins', iml, jml, lml, tml, 1, 1, basins) |
163 | | WHERE ( basins(:,:) .GT. undef_sechiba-1) !@FM_120531 |
164 | | basins(:,:) = undef_int+1 !@FM_120531 |
165 | | ENDWHERE !@FM_120531 |
166 | | }}} |
167 | | -> In both cases everything seems to be fine...except that: |
168 | | * With ROUTING, ''NaN'' values are detected in ''sechiba_restart.nc'', ''stomate_restart.nc'' and ''stomate_history.nc'' files.[[BR]] |
169 | | Under investigation... |