Hello,
I have been trying to add new history output variables in VOCEmissionMod.F90, but it failed for some reason.
I have attached the html file (compressed to zip file as this forum doesn't allow for me to upload the html file format) that compares the original VOCEmissionMod.F90 on the left and with modification on the right, and the line numbers I will write below are based on the right side.
For GAMMA history output fields (GAMMA, GAMMAT, GAMMAL, GAMMAC, etc.) in CLM, I think those are averaged fields over all PFTs at each grid point, based on subgrid weights using the function hist_update_hbuf and p2g. Please correct me if I misunderstood these GAMMA fields.
So I started to modify the VOCEmissionMod.F90 code, to add GAMMA as a function of PFT, and GAMMA only for the 7th PFT, which is broadleaf_deciduous_temperate_tree (information available at the top of PatchType.F90).
You can see the new pointer variables I added to the vocemis_type (lines #63-73), gamma_out_patch_2d to save GAMMA for all different PFTs, and gamma_out_patch_p7 to save GAMMA for the 7th PFT only. Other changes in the code are highlighted in red with a yellow background.
I have two problems with this code. First, the model stopped at line #716, which I don't understand, as I didn't change any variables in this line:
meg_out(imeg)%flux_out(p) = meg_out(imeg)%flux_out(p) &
+ epsilon * gamma * megemis_units_factor*1.e-3_r8 ! Kg/m2/sec
Second, when I commented out lines for 2D GAMMA values (gamma_out_patch_2d), the model ran successfully, but gamma_p7 values have only a few points that have real numbers globally. I think my if statement is correct for this variable (line #745), maybe I am misunderstanding how CLM divides subgrids into different patches in a landunit and a gridcell.
Any comments will be appreciated, please let me know if there's anything unclear. Thanks!
I have been trying to add new history output variables in VOCEmissionMod.F90, but it failed for some reason.
I have attached the html file (compressed to zip file as this forum doesn't allow for me to upload the html file format) that compares the original VOCEmissionMod.F90 on the left and with modification on the right, and the line numbers I will write below are based on the right side.
For GAMMA history output fields (GAMMA, GAMMAT, GAMMAL, GAMMAC, etc.) in CLM, I think those are averaged fields over all PFTs at each grid point, based on subgrid weights using the function hist_update_hbuf and p2g. Please correct me if I misunderstood these GAMMA fields.
So I started to modify the VOCEmissionMod.F90 code, to add GAMMA as a function of PFT, and GAMMA only for the 7th PFT, which is broadleaf_deciduous_temperate_tree (information available at the top of PatchType.F90).
You can see the new pointer variables I added to the vocemis_type (lines #63-73), gamma_out_patch_2d to save GAMMA for all different PFTs, and gamma_out_patch_p7 to save GAMMA for the 7th PFT only. Other changes in the code are highlighted in red with a yellow background.
I have two problems with this code. First, the model stopped at line #716, which I don't understand, as I didn't change any variables in this line:
meg_out(imeg)%flux_out(p) = meg_out(imeg)%flux_out(p) &
+ epsilon * gamma * megemis_units_factor*1.e-3_r8 ! Kg/m2/sec
Second, when I commented out lines for 2D GAMMA values (gamma_out_patch_2d), the model ran successfully, but gamma_p7 values have only a few points that have real numbers globally. I think my if statement is correct for this variable (line #745), maybe I am misunderstanding how CLM divides subgrids into different patches in a landunit and a gridcell.
Any comments will be appreciated, please let me know if there's anything unclear. Thanks!