• Using ISSM
  • Does the Next Run use the Output of the Previous Run as its Initialization

Hi all

I am running the Shakti model on ISSM. I am using the model for data assimilation. In the data assimilation process, I forecast the values of the various variables for the next time step, and then perform an analysis step, where I compare the forecast values with true data values and make changes to my forecast values to reduce the error between the forecast values and the true data values; then I run the simulation for one time step for the next forecast step again. I am confused as to what happens if I run solve over a model md that already contains results from a previous run. For example, does it use the new hydrology gap height values from the end of the previous run as its initial gap height for the current run? I tried running solve over a model which already contained md.results.TransientSolution and when I compared the initial gap height for the first run and the second run (by running md.hydrology.gap_height-md2.hydrology.gap_height), they were exactly the same.
Does this mean that both runs started with the same initial gap height? When I run md.results.TransientSolution(1).HydrologyGapHeight-md2.results.TransientSolution(1).HydrologyGapHeight, I get a non-zero difference (md and md2 have same moulin input, and most other variables also have same values, its just that I have run md2=loadmodel('md.mat') and then used md2=solve(md2,'Transient'); save md2.mat md2; ). Does this mean that md2 was using the end result Hydrology Gap Height of md as its initial Hydrology Gap Height? If so why does this new initial gap height not reflect in md2.hydrology.gap_height?

I am asking all of this because I need to change the values of the md.results.TransientSolution(end) in the analysis step as I explained above. Do I add these changed values (stored in, say an array named new_gap_height) of md.results.TransientSolution(end).HydrologyGapHeight to md2.hydrology.gap_height (where md2 is obtained by md2=loadmodel('md.mat') ) before running solve(md2,'Transient') or do I add these changed values to md2.results.TransientSolution(end).HydrologyGapHeight (i.e. by running md2.results.TransientSolution(end).HydrologyGapHeight=new_gap_height) before running solve(md2,'Transient')? If it is the second option, what happens to md2.results.TransientSolution(end).HydrologyHead and md2.results.TransientSolution(end).EffectivePressure, since these are interdependent values? Can I change the values of md2.results.TransientSolution(end).HydrologyHead without changing the values of md2.results.TransientSolution(end).EffectivePressure and run solve(md2.'Transient') without any problems? If its the first option, this situation would likely not be a problem since I can just change md2.hydrology.head=new_head(where new_head is the changed values of md.results.TransientSolution(end).HydrologyHead), and there is no field for effective pressure in class hydrologyshakti() to worry about.

Hi @AviGupta8a

sorry if this is not clear. ISSM will never change anything in the model, this is totally up to the user. The results are saved in md.results but the initial conditions or boundary conditions are not updated accordingly. If this is something you want to do, you can either do it manually, or try out md=transientrestart(md);. I recommend that you take a look at transientrestart to make sure that the fields that you are interested in are indeed updated in the model. If not, you can let us know and we will update the code and/or you can do it manually after you call transientrestart.
I hope this helps
Mathieu

    Hi mathieumorlighem , I think I understand your reply and after checking transientrestart.m, I found somethings that are useful to me... However I wanted to ask if I were to run solve again on and already solved model, will it use the md.results.TransientSolution already present in the model in any way? Like is there a function that issm.exe calls when it detects md.results.TransientSolution is a non-empty struct with fields, which might behave differently if md.results was a struct with no fields? Or does it use the same initilized data that is present in md.initialization, md.hydrology, etc. regardless? I understand that these initialized data will not be changed by ISSM, but I just wanted to know what ISSM does in the above scenario.

    Hi @AviGupta8a

    no the model will never use anything in md.results. This is why you should use something like transientrestart so that the appropriate initial conditions/boundary conditions are updated according to what is in md.results. It will only look at what is in md.initialization etc.
    All the best
    Mathieu