CABLE-LSM / CABLE-Trac-archive

Archive CABLE Trac contents as issues
Other
0 stars 0 forks source link

NPP outputting for biogeophys only run trying to use a CASA variable #208

Closed penguian closed 5 years ago

penguian commented 5 years ago

keyword_keepgit owner:jxs599@nci.org.au resolution_fixed type_defect | by amu561


The CMIP6-MOSRS branch produces an error when trying to output NPP. This is because a casa variable (casaflux%clabloss) is being used even when CASA is turned off.

Error occurs in this file: https://trac.nci.org.au/trac/cable/browser/branches/Share/CMIP6-MOSRS/offline/cable_output.F90

And this code block on line #2541:

          IF(output%casa) THEN            
                   out%NPP = out%NPP + REAL(casaflux%cnpp/86400.0 / 1.201E-5, 4)
          ELSE
               out%NPP = out%NPP + REAL((-1.0 * canopy%fpn - canopy%frp &
                - casaflux%clabloss/86400.0) / 1.201E-5, 4)
          ENDIF

Issue migrated from trac:208 at 2023-11-27 11:27:32 +1100

penguian commented 5 years ago

@amu561@nci.org.au commented


The code also tries to output NBP for non-CASA runs

penguian commented 5 years ago

@amu561@nci.org.au commented


I solved this by commenting out the use of CASA variable in the "else" part. Note I'm not 100% sure this is correct, probably worth comparing against an older code base? This shouldn't simply be rolled back as NPP was not being outputted correctly before (all zeros).

IF(output%casa) THEN              
                   out%NPP = out%NPP + REAL(casaflux%cnpp/86400.0 / 1.201E-5, 4)
          ELSE
               out%NPP = out%NPP + REAL((-1.0 * canopy%fpn - canopy%frp)) ! &
                !- casaflux%clabloss/86400.0) / 1.201E-5, 4)
          ENDIF

I also had to comment out GW variables from lines 1228 and 1467 onwards (slope, slope_std, GWdz), these should possibly go in the cable_user%gw_model if-loop?

penguian commented 5 years ago

@jxs599@nci.org.au changed status from new to assigned

penguian commented 5 years ago

@jxs599@nci.org.au changed owner from bep599 to jxs599

penguian commented 5 years ago

@jxs599@nci.org.au changed milestone from ` to3. Implementation`

penguian commented 5 years ago

@jxs599@nci.org.au commented


Suggested Action to Resolve

penguian commented 5 years ago

@jxs599@nci.org.au changed status from assigned to closed

penguian commented 5 years ago

@jxs599@nci.org.au changed resolution from ` tofixed`

penguian commented 5 years ago

@jxs599@nci.org.au changed milestone from 3. Implementation to 1. Closed

penguian commented 5 years ago

@jxs599@nci.org.au commented


Code modified @[5676]

penguian commented 1 year ago

@ccc561@nci.org.au set keywords to keepgit