[MITgcm-support] Control variables in adjoint sensitivity experiments

Patrick Heimbach heimbach at mit.edu
Wed Oct 21 13:47:38 EDT 2015


Hi Nora,

a quick attempt to answer in a rush:

the file ctrl_map_ini_genarr.F does not include the EXF related header files which declare those variables.

ctrl_map_ini_genarr.F may also not be the best routine to use if you want your atmospheric state control variables to be time dependent (but perhaps that’s what you intend to do initially?).

An example setup that uses ALLOW_GENTIM2D_CONTROL (which is a similar generic routine, but for 2-D time-varying controls) is verification/hs94.1x64x5/
This setup is a configuration of a simple zonally-integrated atmosphere, but the way CTRL_OPTIONS.h and data.ctrl are designed may provide some guidance.
There are other examples in the general MITgcm_contrib/ area that I can point you to when needed.

-Patrick



On Oct 21, 2015, at 10:15 AM, Nora Loose <Nora.Loose at uib.no> wrote:

> Hi all,
> 
> I am working with the verification experiment tutorial_tracer_adjsens in order to figure out how to set up the control variables in a sensitivity experiment. 
> 
> I am mostly interested in using surface fluxes as control variables (e.g., wind fields and precipitation). I modified the following files in tutorial_tracer_adjsens/code_ad:
> 
> 1. I added the package exf to packages.conf
> 2. I replaced ctrl_map_ini_genarr.F by a copy of pkg/ctrl/ctrl_map_ini_genarr.F, to which I added:
> 
> 	integer igen_windx, igen_precip
> 
> 	igen_windx=0
> 	igen_precip=0
> 
> DO iarr = 1, maxCtrlArr2D
> if (xx_genarr2d_weight(iarr).NE.' ') then
> 
>  if (xx_genarr2d_file(iarr)(1:11).EQ.'xx_windx’) 
>    &     igen_windx=iarr
> 
>  if (xx_genarr2d_file(iarr)(1:11).EQ.'xx_precip') 
>    &     igen_precip=iarr
> 
> endif
> ENDDO
> 
> if (igen_windx.GT.0)
>    &      call ctrl_map_genarr2d(uwind,igen_windx,myThid)
> 
>  if (igen_precip.GT.0)
>    &      call ctrl_map_genarr2d(precip,igen_precip,myThid)
> 
> 
> 
> The compilation fails and the TAF output file tells me:
> 
> 
> file ad_input_code.for:
> 28709      &      call ctrl_map_genarr2d(precip,igen_precip,myThid)
>                                               ^
> *ERROR* : variable precip must be available
>                                               ^
> *ERROR* : identifier not defined
> 
> 
> 
> I get the same error for swdown, lwdown, atemp and aqh. However, TAF does not complain about the variable uwind (and vwind). 
> I checked the file ad_input_code.for and the common blocks including the arrays precip, swdown, lwdown, atemp and aqh are all listed there (alongside with uwind and vwind).
> 
> Does anybody have a clue what went wrong? 
> 
> 
> Thanks in advance for your help,
> 
> Nora
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support


--------------------------------------------------------
Patrick Heimbach, Ph.D. | http://heimbach.wordpress.com

* The University of Texas at Austin *
The Institute for Computational Engineering and Sciences
Institute for Geophysics | Jackson School of Geosciences
201 East 24th Street, POB 4.232 | Austin, TX 78712 | USA
FON: +1-512-232-7694 | Email: heimbach at utexas.edu

* Massachusetts Institute of Technology *
Department of Earth, Atmospheric, and Planetary Sciences
77 Massachusetts Ave, 54-1420 | Cambridge MA 02139 | USA
FON: +1-617-253-5259 | Email: heimbach at mit.edu
--------------------------------------------------------




-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1845 bytes
Desc: not available
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20151021/0941170d/attachment.p7s>


More information about the MITgcm-support mailing list