C $Header: /home/ubuntu/mnt/e9_copy/MITgcm_contrib/gael/pkg/smooth/smooth_inv_forcing.F,v 1.1 2007/06/19 18:23:18 gforget Exp $ cc#include "COST_CPPOPTIONS.h" #include "CPP_OPTIONS.h" subroutine smooth_inv_forcing( mythid ) c ================================================================== c SUBROUTINE cost_forcing c ================================================================== c c o Evaluate cost function contributions of surface flux forcing. c Now, these are heat flux, salt flux, zonal and meridional wind c stress. c c started: Christian Eckert eckert@mit.edu 30-Jun-1999 c c changed: Christian Eckert eckert@mit.edu 25-Feb-2000 c c - Restructured the code in order to create a package c for the MITgcmUV. c c ================================================================== c SUBROUTINE cost_forcing c ================================================================== implicit none c == global variables == #include "SIZE.h" #include "EEPARAMS.h" #include "PARAMS.h" #include "GRID.h" #include "cal.h" #ifdef ALLOW_CTRL #include "ctrl.h" #include "ctrl_dummy.h" #endif #ifdef ALLOW_COST #include "ecco_cost.h" #endif #include "smooth_inv.h" c == routine arguments == integer mythid integer myiter _RL mytime c == local variables == integer startrec integer endrec c == end of interface == #ifdef ALLOW_SMOOTH_INV c-- Evaluate the individual cost function contributions. #if (defined (ALLOW_HFLUX_COST_CONTRIBUTION) && \ defined (ALLOW_HFLUX_CONTROL)) c-- Heat flux contribution to the cost function. startrec = ncvarrecstart(3) endrec = ncvarrecsend(3) call smooth_inv_forcing_gen(startrec, endrec, maskC, & xx_hflux_file, xx_hfluxSMmR_file, xx_hfluxREF_file, & xx_hflux_dummy, xx_hfluxSMmR_dummy, mythid) #elif (defined (ALLOW_ATEMP_COST_CONTRIBUTION) && \ defined (ALLOW_ATEMP_CONTROL)) c-- Atmos. temp. contribution to the cost function. startrec = ncvarrecstart(7) endrec = ncvarrecsend(7) call smooth_inv_forcing_gen(startrec, endrec, maskC, & xx_atemp_file, xx_atempSMmR_file, xx_atempREF_file, & xx_atemp_dummy, xx_atempSMmR_dummy, mythid) #endif #if (defined (ALLOW_SFLUX_COST_CONTRIBUTION) && \ defined (ALLOW_SFLUX_CONTROL)) c-- Salt flux contribution to the cost function. startrec = ncvarrecstart(4) endrec = ncvarrecsend(4) call smooth_inv_forcing_gen(startrec, endrec, maskC, & xx_sflux_file, xx_sfluxSMmR_file, xx_sfluxREF_file, & xx_sflux_dummy, xx_sfluxSMmR_dummy, mythid) #elif (defined (ALLOW_AQH_COST_CONTRIBUTION) && \ defined (ALLOW_AQH_CONTROL)) c-- Specific humidity contribution to the cost function. startrec = ncvarrecstart(8) endrec = ncvarrecsend(8) call smooth_inv_forcing_gen(startrec, endrec, maskC, & xx_aqh_file, xx_aqhSMmR_file, xx_aqhREF_file, & xx_aqh_dummy, xx_aqhSMmR_dummy, mythid) #endif #if (defined (ALLOW_USTRESS_COST_CONTRIBUTION )&& \ defined (ALLOW_USTRESS_CONTROL)) c-- Zonal wind stress contribution to the cost function. startrec = ncvarrecstart(5) endrec = ncvarrecsend(5) call smooth_inv_forcing_gen(startrec, endrec, maskW, & xx_tauu_file, xx_tauuSMmR_file, xx_tauuREF_file, & xx_tauu_dummy, xx_tauuSMmR_dummy, mythid) #elif (defined (ALLOW_UWIND_COST_CONTRIBUTION )&& \ defined (ALLOW_UWIND_CONTROL)) c-- Zonal wind speed contribution to the cost function. startrec = ncvarrecstart(9) endrec = ncvarrecsend(9) call smooth_inv_forcing_gen(startrec, endrec, maskW, & xx_uwind_file, xx_uwindSMmR_file, xx_uwindREF_file, & xx_uwind_dummy, xx_uwindSMmR_dummy, mythid) #endif #if (defined (ALLOW_VSTRESS_COST_CONTRIBUTION) && \ defined (ALLOW_VSTRESS_CONTROL)) c-- Meridional wind stress contribution to the cost function. startrec = ncvarrecstart(6) endrec = ncvarrecsend(6) call smooth_inv_forcing_gen(startrec, endrec, maskS, & xx_tauv_file, xx_tauvSMmR_file, xx_tauvREF_file, & xx_tauv_dummy, xx_tauvSMmR_dummy, mythid) #elif (defined (ALLOW_VWIND_COST_CONTRIBUTION) && \ defined (ALLOW_VWIND_CONTROL)) c-- Meridional wind speed contribution to the cost function. startrec = ncvarrecstart(10) endrec = ncvarrecsend(10) call smooth_inv_forcing_gen(startrec, endrec, maskS, & xx_vwind_file, xx_vwindSMmR_file, xx_vwindREF_file, & xx_vwind_dummy, xx_vwindSMmR_dummy, mythid) #endif #if (defined (ALLOW_PRECIP_COST_CONTRIBUTION) && \ defined (ALLOW_PRECIP_CONTROL)) c-- Atmos. precip. contribution to the cost function. startrec = ncvarrecstart(32) endrec = ncvarrecsend(32) call smooth_inv_forcing_gen(startrec, endrec, maskC, & xx_precip_file, xx_precipSMmR_file, xx_precipREF_file, & xx_precip_dummy, xx_precipSMmR_dummy, mythid) #endif #if (defined (ALLOW_SWFLUX_COST_CONTRIBUTION) && \ defined (ALLOW_SWFLUX_CONTROL)) c-- Atmos. swflux. contribution to the cost function. startrec = ncvarrecstart(33) endrec = ncvarrecsend(33) call smooth_inv_forcing_gen(startrec, endrec, maskC, & xx_swflux_file, xx_swfluxSMmR_file, xx_swfluxREF_file, & xx_swflux_dummy, xx_swfluxSMmR_dummy, mythid) #endif #if (defined (ALLOW_SWDOWN_COST_CONTRIBUTION) && \ defined (ALLOW_SWDOWN_CONTROL)) c-- Atmos. swdown. contribution to the cost function. startrec = ncvarrecstart(33) endrec = ncvarrecsend(33) call smooth_inv_forcing_gen(startrec, endrec, maskC, & xx_swdown_file, xx_swdownSMmR_file, xx_swdownREF_file, & xx_swdown_dummy, xx_swdownSMmR_dummy, mythid) #endif #endif end