Hi, I want to read in global 2D variables of stomatal parameters to be used instead of some of the PFT-specific constants (e.g. g1). And I'm just trying to see what my workflow should be. I assume it might be easiest to insert my new data into the surfdat file or similar and add some lines to read in the extra variables from that file.
The functions I'm interested in modifying are in PhotosynthesisMod.F90 and it's not clear to me where (i.e. what file) to read in the new data from and how to get the new data to this module. At a really simple level it seems I could read in my data in surfrdMod.F90, into some global variable (I know these aren't great), and then from the Photosynthesis module grab my data and operate. But it looks as though CLM splits the global grid into pieces (perhaps for parallelisation?) and those grids have patches etc. which get referred to in-code with patch or grid cell array indices like e.g.
If there's any advice general or specific I'd appreciate it, or if there are previous examples on here that'd be great too.
The functions I'm interested in modifying are in PhotosynthesisMod.F90 and it's not clear to me where (i.e. what file) to read in the new data from and how to get the new data to this module. At a really simple level it seems I could read in my data in surfrdMod.F90, into some global variable (I know these aren't great), and then from the Photosynthesis module grab my data and operate. But it looks as though CLM splits the global grid into pieces (perhaps for parallelisation?) and those grids have patches etc. which get referred to in-code with patch or grid cell array indices like e.g.
o2(bounds%begp:bounds%endp)
. So it's not a simple case of grabbing a value for a specific lat/lon and operating on it. It seems I need to initialise my variables at some higher level, read my data into those variables, and have those variables fed down to the Photosynthesis modules.If there's any advice general or specific I'd appreciate it, or if there are previous examples on here that'd be great too.