bugfixes + grids and namelists for COMBLE and ISDAC 1D cases#19
bugfixes + grids and namelists for COMBLE and ISDAC 1D cases#19BenoitVie wants to merge 1 commit into
Conversation
BenoitVie
commented
Jun 12, 2026
- add grid files for COMBLE and ISDAC cases
- add namel files for COMBLE and ISDAC cases
- bugfixes in physics.py:
- add a check on CTURB == TKEL before reading TKEMIN in the namelist
- copy variables from nml['PHYEX'] in self.full_phyex_namel so that the namelist parameters are really used in the simulation
- dirty workaround for the tskin / Tskin / ts / ts_force problems
- set the type of variables set to 0 as numpy.float64 to avoid issues when using var.copy()
SebastienRietteMTO
left a comment
There was a problem hiding this comment.
I added some comments.
Moreover, I would prefer that namelist names not be case names. Instead, namelist names should reflect option choices in order to keep the case selection and the namelist choice independent.
Similarly, grid names should instead indicate the number of levels and where the resolution is refined.
| LDCHANGEMODEL=False, LDDEFAULTVAL=False, LDREADNAM=False, | ||
| LDCHECK=False, KPRINT=1, LDINIT=False) | ||
| self.full_phyex_namel = f90nml.read(f'fort.{numnml}') | ||
| set_default(self.full_phyex_namel) |
There was a problem hiding this comment.
Can we copy all PHYEX content in one operation?
| for var in ('Ts', 'Tskin'): | ||
| if var not in init_state: | ||
| if 'tskin' in nc.variables: | ||
| init_state[var] = nc['tskin'][0] | ||
| elif 'ts_forc' in nc.variables: | ||
| init_state[var] = nc['ts_forc'][0] | ||
|
|
There was a problem hiding this comment.
In case both tskin and ts_forc are in the definition file, we prefer to read ts_for for Ts and tskin for Tskin
| if 'tskin' in nc.variables: | ||
| interp, nc = get_interpolator('tskin', nc) | ||
| elif 'ts_forc' in nc.variables: | ||
| interp, nc = get_interpolator('ts_forc', nc) |
There was a problem hiding this comment.
It would be better to reverse the two if: we prefer to read ts_forc for the Ts variable
| # SURFACE | ||
| ################################################################## | ||
| ################################################################## | ||
| self.case.surface_forcing_wind='none' |
There was a problem hiding this comment.
The surface forcing wind attribute should be read in the definition file, no?
There was a problem hiding this comment.
surface_forcing_wind is read in the .nc case description file. But with the only surface param currently available, WASP, having anything else than 'none' triggers an abort below. We probably do not want to change anything in the reference case description files, so setting it to 'none' here is only a way around the abort call. Another option was to comment out the abort call in the WASP section below (also tested with the COMBLE case, with surface_forcing_wind = "z0" )