Closed mee067 closed 1 month ago
If IPCP is 4 and no source for rain/snow is provided (either from MMESH or input files), the model won't see any precip.
If IPCP is 1, 2 or 3 and MMESH doesn't update the total precip variable, partitioned precip will be overwritten with total precipitation read from file. I think this is documented and why it's required to have IPCP 4 to preserve precipitation adjustments from MMESH.
IPCP 4 has a different meaning when MMESH is active, it uses the psychrometric calculations of Harder and Pomeroy (2013) in that case. We need to:
I think @fuadyassin had done something in that direction. Zel should be involved. Couldn't tag him in this Github thread. I can see some potential issues with all the overriding stuff and the sequence of calls.
I suggest that IPCP 0 means providing rain and snow separately and it should give a warning if either one is missing, or even stop. Running without P is nonsense.
Then IPCP 4 will mean using the psychrometric calculations which should be outside MMESH, or maybe duplicated outside it. MMESH does things at the tile level not the grid level like normal MESH. We need to look into it.
In MMESH, psychrometric calculations by Harder and Pomeroy (2013) were not part of the CLASSI IPCP choice at the time I implemented it in my version back in 2022. I implemented it with IPCP 5 as shown in the attachment CLASSI.txt
OK Fuad, if your changes are merged with Zel's MMESH ones at some point, we may need to rethink it to avoid code duplication.
This ties in with the restoration of P components in the output. We need to be able to see those.
What happens when IPCP = 4 without providing rain and snow files? Does that depend on whether MountainMESH (MM) is active or not?
I learnt from Zel that IPCP has to be set to 4 for MM phase adjustment (The psychrometric method of Harder and Pomeroy, 2013) to work (setting iphase=1).
From sequence of calls when running on tiles, MM is called first to adjust the forcing before CLASS is called. The CLASS call includes a call to CLASSI which will partition P into rain and snow for IPCP =1, 2, 3. For IPCP4 is does not do partitioning. It is not clear what it will do if snow and rain are not given. If IPCP=1, 2, or 3, does this override the adjustments made by MM?