Querying whether a given ivt is a crop

Status
Not open for further replies.

samrabin

Sam Rabin
Member
Is there a convenient way to do this? Currently I'm looping through 1 to mxpft, but I need to skip PFTs that aren't crops.
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Although npcropmin is the first prognostic crop type, so it skips the two generic crops. I'll look for something else....
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
This seems a little clunky but this has been used:

if (lun%itype(patch%landunit(p)) == istcrop) then

This might be better:

use pftconMod , only :crop
crop => pftcon%crop , & ! Input: crop or not (0 =not crop and 1 = crop)
if(crop(patch%itype(p))== 0) then

It includes generic crops.
 

samrabin

Sam Rabin
Member
Excellent, thanks for the options! I'm going with npcropmin for now, because the work I'm doing doesn't really make sense for generic crops, but it's good to know all the possibilities.
 
Status
Not open for further replies.
Back
Top