Changeset 13576 for branches/UKMO/AMM15_v3_6_STABLE_package_collate/NEMOGCM/NEMO/TOP_SRC/FABM/trcnam_fabm.F90
- Timestamp:
- 2020-10-09T12:35:11+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/AMM15_v3_6_STABLE_package_collate/NEMOGCM/NEMO/TOP_SRC/FABM/trcnam_fabm.F90
r10270 r13576 4 4 !! TOP : initialisation of some run parameters for FABM bio-model 5 5 !!====================================================================== 6 !! History : 2.0 ! 2007-12 (C. Ethe, G. Madec) Original code 6 !! History : 1.0 ! 2015-04 (PML) Original code 7 !! History : 1.1 ! 2020-06 (PML) Update to FABM 1.0, improved performance 7 8 !!---------------------------------------------------------------------- 8 9 #if defined key_fabm … … 18 19 USE par_fabm 19 20 USE trcsms_fabm 20 21 21 22 22 IMPLICIT NONE … … 35 35 36 36 SUBROUTINE trc_nam_fabm 37 LOGICAL :: l_ext 38 INTEGER :: nmlunit, ios 39 NAMELIST/namfabm/ nn_adv 40 41 ! Read NEMO-FABM coupler settings from namfabm 42 nn_adv = 3 43 INQUIRE( FILE='namelist_fabm_ref', EXIST=l_ext ) 44 IF (l_ext) then 45 CALL ctl_opn( nmlunit, 'namelist_fabm_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE.) 46 READ(nmlunit, nml=namfabm, iostat=ios) 47 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namfabm in namelist_fabm_ref', .TRUE. ) 48 END IF 49 INQUIRE( FILE='namelist_fabm_cfg', EXIST=l_ext ) 50 IF (l_ext) then 51 CALL ctl_opn( nmlunit, 'namelist_fabm_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE.) 52 READ(nmlunit, nml=namfabm, iostat=ios) 53 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namfabm in namelist_fabm_cfg', .TRUE. ) 54 END IF 55 IF (nn_adv /= 1 .and. nn_adv /= 3) CALL ctl_stop( 'STOP', 'trc_ini_fabm: nn_adv must be 1 or 3.' ) 37 56 END SUBROUTINE trc_nam_fabm 38 57 39 SUBROUTINE trc_nam_fabm_override 58 SUBROUTINE trc_nam_fabm_override(sn_tracer) 59 TYPE(PTRACER), DIMENSION(jpmaxtrc), INTENT(INOUT) :: sn_tracer 60 40 61 INTEGER :: jn 62 CHARACTER(LEN=3) :: index 41 63 42 64 DO jn=1,jp_fabm 43 ctrcnm(jp_fabm_m1+jn) = model%state_variables(jn)%name 44 ctrcln(jp_fabm_m1+jn) = model%state_variables(jn)%long_name 45 ctrcun(jp_fabm_m1+jn) = model%state_variables(jn)%units 46 ln_trc_ini(jp_fabm_m1+jn) = .FALSE. 65 IF (sn_tracer(jn)%clsname /= 'NONAME' .AND. sn_tracer(jn)%clsname /= model%interior_state_variables(jn)%name) THEN 66 WRITE (index,'(i0)') jn 67 CALL ctl_stop('Tracer name mismatch in namtrc: '//TRIM(sn_tracer(jn)%clsname)//' found at sn_tracer('//TRIM(index)//') where '//TRIM(model%interior_state_variables(jn)%name)//' was expected.') 68 END IF 69 sn_tracer(jn)%clsname = TRIM(model%interior_state_variables(jn)%name) 70 sn_tracer(jn)%cllname = TRIM(model%interior_state_variables(jn)%long_name) 71 sn_tracer(jn)%clunit = TRIM(model%interior_state_variables(jn)%units) 72 sn_tracer(jn)%llinit = .FALSE. 47 73 END DO 48 74 END SUBROUTINE trc_nam_fabm_override 49 75 50 76 #else 51 77 !!----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.