Skip to content

bugfixes + grids and namelists for COMBLE and ISDAC 1D cases#19

Open
BenoitVie wants to merge 1 commit into
SebastienRietteMTO:mainfrom
BenoitVie:bugfixes
Open

bugfixes + grids and namelists for COMBLE and ISDAC 1D cases#19
BenoitVie wants to merge 1 commit into
SebastienRietteMTO:mainfrom
BenoitVie:bugfixes

Conversation

@BenoitVie

Copy link
Copy Markdown
Contributor
  • 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 SebastienRietteMTO left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/phyex1d/physics.py
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)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we copy all PHYEX content in one operation?

Comment thread src/phyex1d/physics.py
Comment on lines +314 to +320
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]

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case both tskin and ts_forc are in the definition file, we prefer to read ts_for for Ts and tskin for Tskin

Comment thread src/phyex1d/physics.py
Comment on lines +494 to +497
if 'tskin' in nc.variables:
interp, nc = get_interpolator('tskin', nc)
elif 'ts_forc' in nc.variables:
interp, nc = get_interpolator('ts_forc', nc)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to reverse the two if: we prefer to read ts_forc for the Ts variable

Comment thread src/phyex1d/physics.py
# SURFACE
##################################################################
##################################################################
self.case.surface_forcing_wind='none'

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The surface forcing wind attribute should be read in the definition file, no?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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" )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants