C /u/gcmpack/MITgcm/pkg/oasis/oasis_declare_fields.F,v 1.0 2005/07/18 23:05:09 Gianmaria Sannino Exp C $Name: $ cgm( #include "CPP_EEOPTIONS.h" cgm) #include "OASIS_OPTIONS.h" C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| CBOP 0 C !ROUTINE: OASIS_DECLARE_FIELDS SUBROUTINE OASIS_DECLARE_FIELDS C !DESCRIPTION: C Declare fields received and sent to OASIS C !USES: USE mod_kinds_model USE mod_prism_proto USE mod_prism_def_partition_proto USE mod_prism_put_proto USE mod_prism_get_proto USE mod_prism_grids_writing IMPLICIT NONE #include "SIZE.h" #include "EEPARAMS.h" cc#include "EESUPPORT.h" #include "PARAMS.h" #include "GRID.h" cgmoasis( cc#include "EESUPPORT.h" #include "OASIS.h" #include "OASIS_PARAMS.h" cgmoasis) C !INPUT PARAMETERS: INTEGER myThid,mpiRC CEOP C !LOCAL VARIABLES: #ifdef ALLOW_OASIS INTEGER jf INTEGER, DIMENSION(2) :: il_var_nodims INTEGER, DIMENSION(4) :: il_var_shape c CHARACTER(len=8), DIMENSION(nfldout) :: fld_out ! Symb names of fields sent c CHARACTER(len=8), DIMENSION(nfldin) :: fld_in ! Symb names of field received c CHARACTER*8 fld_out(nfldout) ! Symb names of fields sent c CHARACTER*8 fld_in(nfldin) ! Symb names of field received C-- Define the number of fields sent and received nfldout = 1 ! Number of fields sent nfldin = 4 ! Number of fields received C-- PSMILe coupling fields declaration ! il_var_nodims(1) = 2 ! rank of coupling field il_var_nodims(2) = 1 ! number of bundles in coupling field (always 1) il_var_shape(1)= 1 ! min index for the coupling field local dimension il_var_shape(2)= sNx ! max index for the coupling field local dim il_var_shape(3)= 1 ! min index for the coupling field local dimension il_var_shape(4)= sNy ! max index for the coupling field local dim C-- Define name (as in namcouple) and declare each field sent by mitgcm fld_out(1)='MITFLOUT' c fld_out(3)='' c ... ! WRITE (il_mparout,*) ' Declare OUTPUT variables ' WRITE (il_mparout,*) ' ======================== ' DO jf=1,nfldout CALL prism_def_var_proto (il_var_id_out(jf), &fld_out(jf), il_part_id, &il_var_nodims, PRISM_Out, &il_var_shape, PRISM_Real, ierror) IF (ierror .NE. PRISM_Ok) THEN WRITE(il_mparout,*) &'ERROR: ',fld_out(jf),' is not a valid name' CALL prism_abort_proto(il_comp_id, &'oasis_declare_fields.F','Abort') ELSE WRITE(il_mparout,'(i3,a2,a8,a3)') jf,'- ' &,fld_out(jf),' OK' ENDIF ENDDO C-- Define name (as in namcouple) and declare each field received by mitgcm C C Questo per ora e' vuoto perche' nella prima configurazione mitgcm C ha soltanto un file in uscita (e quindi namcouple) C fld_in(1)='SONSHLDO' fld_in(2)='SOZOTAUX' fld_in(3)='SOMETAUU' fld_in(4)='SOZOTAUV' fld_in(5)='SOMETAUY' c ! WRITE (il_mparout,*) ' Declare INPUT variables ' WRITE (il_mparout,*) ' ======================== ' DO jf=1,nfldin CALL prism_def_var_proto (il_var_id_in(jf), &fld_in(jf), il_part_id, &il_var_nodims, PRISM_In, &il_var_shape, PRISM_Real, ierror) IF (ierror .NE. PRISM_Ok) THEN WRITE(il_mparout,*) &'ERROR: ',fld_in(jf),' is not a valid name' CALL prism_abort_proto(il_comp_id, &'oasis_declare_fields.F','Abort') ELSE WRITE(il_mparout,'(i3,a2,a8,a3)') jf,'- ' &,fld_in(jf),' OK' ENDIF ENDDO C-- PSMILe end of the declaration phase CALL prism_enddef_proto (ierror) cc CALL MPI_Barrier(MPI_COMM_MODEL,mpiRC) #endif /* ALLOW_OASIS */ return end