FSR and other reflected fields are bad at nighttime with negative longitudes.
General bug information
CTSM version you are using: ctsm1.0.dev009
Does this bug cause significantly incorrect results in the model's science? Yes
Configurations affected: both SP and BGC cases, any resolution
Details of bug
This shows up as an issue over the America's for both regional and global grids. For a simulation starting on Jan/1 at 0Z it is highest at hour 20Z. You see it in reflected fields such as FSR, but many other fields show it as well. And it happens even though both FSDS and COSZEN are correct. So the solar coming from cime/datm is correct, and shr_orb seems to be correct as well. As far as I can tell the determination of night and day ultimately comes from coszen, so I don't see how this is happening. I also don't see other dependences on longitude in the code that would explain this issue either.
This started out in issue #491. I'm putting it here so I can close that issue with the fix I have. This one will stay open until we can work on it.
As the first step to it, I am putting in an abort when a negative longitude is read in from the surface dataset.
Important details of your setup / configuration so we can reproduce the bug
It fails the BASELINE comparision with many large differences in a many fields see below. I expect that the differences would only be order of roundoff, since that's what we see in COSZEN and FSDS.
Brief summary of bug
FSR and other reflected fields are bad at nighttime with negative longitudes.
General bug information
CTSM version you are using: ctsm1.0.dev009 Does this bug cause significantly incorrect results in the model's science? Yes
Configurations affected: both SP and BGC cases, any resolution
Details of bug
This shows up as an issue over the America's for both regional and global grids. For a simulation starting on Jan/1 at 0Z it is highest at hour 20Z. You see it in reflected fields such as FSR, but many other fields show it as well. And it happens even though both FSDS and COSZEN are correct. So the solar coming from cime/datm is correct, and shr_orb seems to be correct as well. As far as I can tell the determination of night and day ultimately comes from coszen, so I don't see how this is happening. I also don't see other dependences on longitude in the code that would explain this issue either.
This started out in issue #491. I'm putting it here so I can close that issue with the fix I have. This one will stay open until we can work on it.
As the first step to it, I am putting in an abort when a negative longitude is read in from the surface dataset.
Important details of your setup / configuration so we can reproduce the bug
SMS_D_Ld3.f09_g16.I2000Clm50SpGs.cheyenne_intel.clm-default
Add these settings:
shell_commands: ./xmlchange ATM_DOMAIN_FILE=domain.lnd.fv0.9x1.25_gx1v6.090309.negative.longitude.nc ./xmlchange ATM_DOMAIN_PATH=/glade/scratch/swensosc/sfcdata ./xmlchange LND_DOMAIN_FILE=domain.lnd.fv0.9x1.25_gx1v6.090309.negative.longitude.nc ./xmlchange LND_DOMAIN_PATH=/glade/scratch/swensosc/sfcdata/
user_nl_clm: fsurdat = '/glade/scratch/swensosc/sfcdata/surfdata_0.9x1.25_16pfts_Irrig_CMIP6_simyr2000_c170824.negative.longitude.nc'
It fails the BASELINE comparision with many large differences in a many fields see below. I expect that the differences would only be order of roundoff, since that's what we see in COSZEN and FSDS.
Important output or errors that show the problem