[2038] | 1 | MODULE trcnam_cfc |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE trcnam_cfc *** |
---|
| 4 | !! TOP : initialisation of some run parameters for CFC chemical model |
---|
| 5 | !!====================================================================== |
---|
| 6 | !! History : 2.0 ! 2007-12 (C. Ethe, G. Madec) from trcnam.cfc.h90 |
---|
| 7 | !!---------------------------------------------------------------------- |
---|
| 8 | #if defined key_cfc |
---|
| 9 | !!---------------------------------------------------------------------- |
---|
| 10 | !! 'key_cfc' CFC tracers |
---|
| 11 | !!---------------------------------------------------------------------- |
---|
| 12 | !! trc_nam_cfc : CFC model initialisation |
---|
| 13 | !!---------------------------------------------------------------------- |
---|
| 14 | USE oce_trc ! Ocean variables |
---|
| 15 | USE par_trc ! TOP parameters |
---|
| 16 | USE trc ! TOP variables |
---|
| 17 | USE trcsms_cfc ! CFC specific variable |
---|
[3294] | 18 | USE iom ! I/O manager |
---|
[2038] | 19 | |
---|
| 20 | IMPLICIT NONE |
---|
| 21 | PRIVATE |
---|
| 22 | |
---|
| 23 | PUBLIC trc_nam_cfc ! called by trcnam.F90 module |
---|
| 24 | |
---|
| 25 | !!---------------------------------------------------------------------- |
---|
[2287] | 26 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
[6486] | 27 | !! $Id$ |
---|
[2287] | 28 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[2038] | 29 | !!---------------------------------------------------------------------- |
---|
| 30 | |
---|
| 31 | CONTAINS |
---|
| 32 | |
---|
| 33 | SUBROUTINE trc_nam_cfc |
---|
| 34 | !!------------------------------------------------------------------- |
---|
| 35 | !! *** ROUTINE trc_nam_cfc *** |
---|
| 36 | !! |
---|
| 37 | !! ** Purpose : Definition some run parameter for CFC model |
---|
| 38 | !! |
---|
| 39 | !! ** Method : Read the namcfc namelist and check the parameter |
---|
[3294] | 40 | !! values called at the first timestep (nittrc000) |
---|
[2038] | 41 | !! |
---|
| 42 | !! ** input : Namelist namcfc |
---|
| 43 | !!---------------------------------------------------------------------- |
---|
[4147] | 44 | INTEGER :: numnatc_ref = -1 ! Logical unit for reference CFC namelist |
---|
| 45 | INTEGER :: numnatc_cfg = -1 ! Logical unit for configuration CFC namelist |
---|
| 46 | INTEGER :: numonc = -1 ! Logical unit for output namelist |
---|
| 47 | INTEGER :: ios ! Local integer output status for namelist read |
---|
[2038] | 48 | INTEGER :: jl, jn |
---|
| 49 | !! |
---|
[8280] | 50 | NAMELIST/namcfcdate/ ndate_beg, nyear_res, simu_type |
---|
[4147] | 51 | !!---------------------------------------------------------------------- |
---|
| 52 | ! ! Open namelist files |
---|
| 53 | CALL ctl_opn( numnatc_ref, 'namelist_cfc_ref' , 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) |
---|
| 54 | CALL ctl_opn( numnatc_cfg, 'namelist_cfc_cfg' , 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) |
---|
[4624] | 55 | IF(lwm) CALL ctl_opn( numonc, 'output.namelist.cfc', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) |
---|
[2038] | 56 | |
---|
[4147] | 57 | REWIND( numnatc_ref ) ! Namelist namcfcdate in reference namelist : CFC parameters |
---|
| 58 | READ ( numnatc_ref, namcfcdate, IOSTAT = ios, ERR = 901) |
---|
| 59 | 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfcdate in reference namelist', lwp ) |
---|
[2038] | 60 | |
---|
[4147] | 61 | REWIND( numnatc_cfg ) ! Namelist namcfcdate in configuration namelist : CFC parameters |
---|
| 62 | READ ( numnatc_cfg, namcfcdate, IOSTAT = ios, ERR = 902 ) |
---|
| 63 | 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfcdate in configuration namelist', lwp ) |
---|
[4624] | 64 | IF(lwm) WRITE ( numonc, namcfcdate ) |
---|
[2038] | 65 | |
---|
| 66 | IF(lwp) THEN ! control print |
---|
| 67 | WRITE(numout,*) |
---|
| 68 | WRITE(numout,*) ' trc_nam: Read namdates, namelist for CFC chemical model' |
---|
| 69 | WRITE(numout,*) ' ~~~~~~~' |
---|
| 70 | WRITE(numout,*) ' initial calendar date (aammjj) for CFC ndate_beg = ', ndate_beg |
---|
| 71 | WRITE(numout,*) ' restoring time constant (year) nyear_res = ', nyear_res |
---|
[8280] | 72 | IF (simu_type==1) THEN |
---|
| 73 | WRITE(numout,*) ' CFC running on SPIN-UP mode simu_type = ', simu_type |
---|
| 74 | ELSEIF (simu_type==2) THEN |
---|
| 75 | WRITE(numout,*) ' CFC running on HINDCAST/PROJECTION mode simu_type = ', simu_type |
---|
| 76 | ENDIF |
---|
[2038] | 77 | ENDIF |
---|
| 78 | nyear_beg = ndate_beg / 10000 |
---|
| 79 | IF(lwp) WRITE(numout,*) ' initial year (aa) nyear_beg = ', nyear_beg |
---|
| 80 | ! |
---|
| 81 | |
---|
[4624] | 82 | IF(lwm) CALL FLUSH ( numonc ) ! flush output namelist CFC |
---|
[4147] | 83 | |
---|
[2038] | 84 | END SUBROUTINE trc_nam_cfc |
---|
| 85 | |
---|
| 86 | #else |
---|
| 87 | !!---------------------------------------------------------------------- |
---|
| 88 | !! Dummy module : No CFC |
---|
| 89 | !!---------------------------------------------------------------------- |
---|
| 90 | CONTAINS |
---|
| 91 | SUBROUTINE trc_nam_cfc ! Empty routine |
---|
| 92 | END SUBROUTINE trc_nam_cfc |
---|
| 93 | #endif |
---|
| 94 | |
---|
| 95 | !!====================================================================== |
---|
| 96 | END MODULE trcnam_cfc |
---|