Skip to content
Snippets Groups Projects
Commit e0882afd authored by Guillaume S's avatar Guillaume S
Browse files

increase maximum logical units number in the case where using prt_ctl + i/jsplit>999

fix run.stat writing logical for monoproc case
force prt_ctl + run.stat flushing when using monoproc
parent 9df45b62
No related branches found
No related tags found
No related merge requests found
......@@ -247,6 +247,7 @@ CONTAINS
END DO
ENDIF
IF( jpnij == 1 ) CALL FLUSH(inum)
END DO
!
END SUBROUTINE prt_ctl_t
......
......@@ -1648,12 +1648,12 @@ CONTAINS
!
get_unit = 15 ! choose a unit that is big enough then it is not already used in NEMO
llopn = .TRUE.
DO WHILE( (get_unit < 998) .AND. llopn )
DO WHILE( (get_unit < 9999) .AND. llopn )
get_unit = get_unit + 1
INQUIRE( unit = get_unit, opened = llopn )
END DO
IF( (get_unit == 999) .AND. llopn ) THEN
CALL ctl_stop( 'STOP', 'get_unit: All logical units until 999 are used...' )
IF( (get_unit == 9999) .AND. llopn ) THEN
CALL ctl_stop( 'STOP', 'get_unit: All logical units until 9999 are used...' )
ENDIF
!
END FUNCTION get_unit
......
......@@ -76,8 +76,8 @@ CONTAINS
IF( nstop > 0 .AND. ngrdstop > -1 ) RETURN ! stpctl was already called by a child grid
!
ll_wrtstp = ( MOD( kt-nit000, sn_cfctl%ptimincr ) == 0 ) .OR. ( kt == nitend )
ll_colruns = ll_wrtstp .AND. sn_cfctl%l_runstat .AND. jpnij > 1
ll_wrtruns = ( ll_colruns .OR. jpnij == 1 ) .AND. lwm
ll_colruns = sn_cfctl%l_runstat .AND. ll_wrtstp .AND. jpnij > 1
ll_wrtruns = sn_cfctl%l_runstat .AND. ll_wrtstp .AND. lwm
!
IF( kt == nit000 ) THEN
!
......@@ -174,6 +174,7 @@ CONTAINS
! !== done only by 1st subdomain at writting timestep ==!
IF( ll_wrtruns ) THEN
WRITE(numrun,9500) kt, zmax(1:jptst)
IF( jpnij == 1 ) CALL FLUSH(numrun)
DO ji = 1, jpvar - 2 * COUNT( .NOT. (/ln_zad_Aimp/) )
istatus = NF90_PUT_VAR( nrunid, nvarid(ji), (/zmax(ji)/), (/kt/), (/1/) )
END DO
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment